diff --git a/.github/workflows/build_test_cmake.yml b/.github/workflows/build_test_cmake.yml index 22610fb454..8296f7bc9f 100644 --- a/.github/workflows/build_test_cmake.yml +++ b/.github/workflows/build_test_cmake.yml @@ -17,17 +17,17 @@ jobs: name: "Build with Intel toolchain" - tag: gnu - build_args: "-DENABLE_LIBXC=1 -DDENABLE_MLALGO=1 -DENABLE_LIBRI=1" + build_args: "-DENABLE_LIBXC=1 -DENABLE_MLALGO=1 -DENABLE_LIBRI=1" name: "Build extra components with GNU toolchain" - tag: intel - build_args: "-DENABLE_LIBXC=1 -DENABLE_MLALGO=1 -DENABLE_LIBRI=1" + build_args: "-DENABLE_LIBXC=1 -DENABLE_PEXSI=1 -DENABLE_MLALGO=1 -DENABLE_LIBRI=1" name: "Build extra components with Intel toolchain" - tag: cuda build_args: "-DUSE_CUDA=1" name: "Build with CUDA support" - tag: gnu - build_args: "-DENABLE_LCAO=OFF" + build_args: "-DENABLE_LCAO=0" name: "Build without LCAO" - tag: gnu build_args: "-DUSE_ELPA=0 " @@ -43,12 +43,17 @@ jobs: container: ghcr.io/deepmodeling/abacus-${{ matrix.tag }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive - name: Build run: | git config --global --add safe.directory `pwd` + export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} + export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} + export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} + export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} + rm -rf build cmake -B build ${{ matrix.build_args }} cmake --build build -j2 diff --git a/.github/workflows/build_test_makefile.yml b/.github/workflows/build_test_makefile.yml index 237d25ebf8..b0cabbce97 100644 --- a/.github/workflows/build_test_makefile.yml +++ b/.github/workflows/build_test_makefile.yml @@ -16,10 +16,12 @@ jobs: container: ghcr.io/deepmodeling/abacus-${{ matrix.tag }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Build run: | export I_MPI_CXX=icpx + chmod a+x generate_build_info.sh cd source - make -j2 ${{ matrix.build_args }} + mkdir build && cd build + make -f ../Makefile -j2 ${{ matrix.build_args }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c664bf796c..b0a5834d2c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -4,33 +4,87 @@ on: workflow_dispatch: push: tags: - - 'v*' + - 'v*' jobs: test-coverage: name: Generate Coverage Report runs-on: X64 container: ghcr.io/deepmodeling/abacus-gnu steps: - - name: Checkout - uses: actions/checkout@v5 - - name: Install Requirements for Coverage Testing - run: | - apt update && apt install -y lcov gpg curl jq ca-certificates - - name: Building - run: | - cmake -B build -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON - cmake --build build -j`nproc` - cmake --install build - - name: Testing - env: - OMP_NUM_THREADS: 1 - run: | - cmake --build build --target test ARGS="-V --timeout 21600" || exit 0 - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v5 - if: ${{ ! cancelled() }} - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - skip_validation: true - verbose: true + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Install Perl Dependencies and Coverage Tools + run: | + apt update && apt install -y curl jq ca-certificates python3-pip + apt install -y lcov perl-modules + apt install -y libcapture-tiny-perl libdatetime-perl libjson-perl libperlio-gzip-perl + lcov --version + + - name: Building with Coverage + run: | + rm -rf build/ + rm -f CMakeCache.txt + + mkdir -p build + chmod -R 755 build/ + + cmake -B build \ + -DENABLE_COVERAGE=ON \ + -DBUILD_TESTING=ON \ + -DENABLE_MLALGO=ON \ + -DENABLE_LIBXC=ON \ + -DENABLE_LIBRI=ON \ + -DENABLE_GOOGLEBENCH=ON \ + -DENABLE_RAPIDJSON=ON \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage" \ + -DCMAKE_EXE_LINKER_FLAGS="--coverage" + cmake --build build -j`nproc` + cmake --install build + + - name: Testing + env: + OMP_NUM_THREADS: 1 + run: | + chmod -R 755 build/ + cmake --build build --target test ARGS="-V --timeout 21600" || echo "Some tests failed but continuing for coverage" + + - name: Generate Coverage Data + run: | + cd build + + lcov --directory . --capture --output-file coverage.info + + lcov --remove coverage.info '/usr/*' '*/test/*' '*/external/*' '*/build/*' --output-file coverage.filtered.info + + genhtml coverage.filtered.info --output-directory coverage-report + + cd .. + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v5 + if: ${{ ! cancelled() }} + with: + fail_ci_if_error: true + files: ./build/coverage.xml,./build/coverage.info + directory: ./build/ + flags: unittests + name: codecov-umbrella + verbose: true + + use_oidc: true + - name: Upload Coverage Report Artifact + uses: actions/upload-artifact@v6 + if: always() + with: + name: coverage-report + path: | + build/coverage-report/ + build/coverage.info + build/coverage.xml + retention-days: 30 +permissions: + id-token: write diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 14e829e546..33992d894c 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -33,6 +33,7 @@ jobs: - name: Build run: | nvidia-smi + rm -rf build cmake -B build -DUSE_CUDA=ON -DBUILD_TESTING=ON cmake --build build -j4 cmake --install build diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index ef9bbbfc84..80b45d4075 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -1,6 +1,7 @@ name: Container on: + create: push: branches: - develop @@ -16,8 +17,14 @@ jobs: matrix: dockerfile: ["gnu","intel","cuda"] steps: + - name: Force Clean Workspace + run: | + sudo chattr -i -R ${{ github.workspace }} 2>/dev/null || true + sudo chown -R $USER:$USER ${{ github.workspace }} + sudo find ${{ github.workspace }} -mindepth 1 -delete + - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Docker meta id: meta @@ -30,6 +37,11 @@ jobs: type=semver,pattern={{version}},enable=${{ github.ref_type == 'tag' }} type=raw,value=latest + - name: Fix Docker Directory Permissions + run: | + sudo mkdir -p /home/runner/.docker + sudo chown -R $USER:$USER /home/runner/.docker + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 1b9f5b266e..bbf6bdd8e7 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -30,7 +30,7 @@ jobs: if: github.repository_owner == 'deepmodeling' steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install Doxygen run: sudo apt-get install doxygen graphviz -y diff --git a/.github/workflows/dynamic.yml b/.github/workflows/dynamic.yml index ec6c3addde..fe20f5b1aa 100644 --- a/.github/workflows/dynamic.yml +++ b/.github/workflows/dynamic.yml @@ -13,7 +13,7 @@ jobs: container: ghcr.io/deepmodeling/abacus-gnu steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Building run: | cmake -B build -DENABLE_ASAN=1 -DENABLE_MLALGO=1 -DENABLE_LIBXC=1 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 2d886bb31b..9312caefe8 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 2880 steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install Requirements run: | apt install -y time diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1e78dfb0a1..23c1074b75 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -11,7 +11,7 @@ jobs: image: ghcr.io/deepmodeling/abacus-gnu steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df1dfb29dc..a44a22ffdb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - /tmp/ccache:/github/home/.ccache steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 # We will handle submodules manually after fixing ownership @@ -60,130 +60,130 @@ jobs: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R integrated_test" - + ctest --test-dir build -V --timeout 1700 -R integrated_test + - name: Module_Base Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_BASE" - + ctest --test-dir build -V --timeout 1700 -R MODULE_BASE + - name: Module_IO Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_IO" - + ctest --test-dir build -V --timeout 1700 -R MODULE_IO + - name: Module_HSolver Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_HSOLVER" - + ctest --test-dir build -V --timeout 1700 -R MODULE_HSOLVER + - name: Module_Cell Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_CELL" - + ctest --test-dir build -V --timeout 1700 -R MODULE_CELL + - name: Module_MD Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_MD" - + ctest --test-dir build -V --timeout 1700 -R MODULE_MD + - name: source_psi Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R source_psi" - + ctest --test-dir build -V --timeout 1700 -R source_psi + - name: Module_RI Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R MODULE_RI" - + ctest --test-dir build -V --timeout 1700 -R MODULE_RI + - name: 01_PW Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 01_PW" - + ctest --test-dir build -V --timeout 1700 -R 01_PW + - name: 02_NAO_Gamma Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 02_NAO_Gamma" - + ctest --test-dir build -V --timeout 1700 -R 02_NAO_Gamma + - name: 03_NAO_multik Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 03_NAO_multik" - + ctest --test-dir build -V --timeout 1700 -R 03_NAO_multik + - name: 04_FF Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 04_FF" - + ctest --test-dir build -V --timeout 1700 -R 04_FF + - name: 05_rtTDDFT Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 05_rtTDDFT" - + ctest --test-dir build -V --timeout 1700 -R 05_rtTDDFT + - name: 06_SDFT Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 06_SDFT" - + ctest --test-dir build -V --timeout 1700 -R 06_SDFT + - name: 07_OFDFT Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 07_OFDFT" - + ctest --test-dir build -V --timeout 1700 -R 07_OFDFT + - name: 08_EXX Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 08_EXX" - + ctest --test-dir build -V --timeout 1700 -R 08_EXX + - name: 09_DeePKS Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 09_DeePKS" - + ctest --test-dir build -V --timeout 1700 -R 09_DeePKS + - name: 10_others Test env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -R 10_others" - + ctest --test-dir build -V --timeout 1700 -R 10_others + - name: Other Unittests env: GTEST_COLOR: 'yes' OMP_NUM_THREADS: '2' run: | - cmake --build build --target test ARGS="-V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|source_psi|MODULE_RI'" + ctest --test-dir build -V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|source_psi|MODULE_RI' diff --git a/.github/workflows/version_check.yml b/.github/workflows/version_check.yml index 3be88b2720..8e4a8cd4bd 100644 --- a/.github/workflows/version_check.yml +++ b/.github/workflows/version_check.yml @@ -7,7 +7,7 @@ jobs: validate_version: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 # Fetch complete git history for version comparison @@ -33,7 +33,7 @@ jobs: fi # Verify that the version in version.h matches the tag - if [[ "${{ steps.versions.outputs.current_tag }}" != "v${CODE_VERSION}" ]]; then + if [[ "${{ steps.versions.outputs.current_tag }}" != "${CODE_VERSION}" ]]; then echo "::error::Version mismatch: tag=${{ steps.versions.outputs.current_tag }} ≠ code=${CODE_VERSION}" exit 1 fi diff --git a/.gitignore b/.gitignore index 9f99297aca..850ef94bf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /build* +build_info.h bin obj *.o @@ -24,4 +25,4 @@ abacus.json *.npy toolchain/install/ toolchain/abacus_env.sh -.trae \ No newline at end of file +.trae diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e921dce23..be44e42b78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,12 @@ option(ENABLE_RAPIDJSON "Enable rapid-json usage" OFF) option(ENABLE_CNPY "Enable cnpy usage" OFF) option(ENABLE_CUSOLVERMP "Enable cusolvermp" OFF) +if(NOT DEFINED NVHPC_ROOT_DIR AND DEFINED ENV{NVHPC_ROOT}) + set(NVHPC_ROOT_DIR + "$ENV{NVHPC_ROOT}" + CACHE PATH "Path to NVIDIA HPC SDK root directory.") +endif() + # enable json support if(ENABLE_RAPIDJSON) find_package(RapidJSON) @@ -74,8 +80,8 @@ if(ENABLE_RAPIDJSON) OFF CACHE INTERNAL "") FetchContent_MakeAvailable(rapidjson) - set(RapidJSON_INCLUDE_PATH "${rapidjson_SOURCE_DIR}/include") endif() + set(RapidJSON_INCLUDE_PATH "${rapidjson_SOURCE_DIR}/include") add_compile_definitions(__RAPIDJSON) add_definitions(-DRAPIDJSON_HAS_CXX11_NOEXCEPT=0) include_directories(${RapidJSON_INCLUDE_PATH}) @@ -123,16 +129,63 @@ if(NOT ENABLE_MPI) endif() # Different exe files of ABACUS -if(ENABLE_LCAO AND ENABLE_MPI) - set(ABACUS_BIN_NAME abacus) -elseif(NOT ENABLE_LCAO AND ENABLE_MPI) - set(ABACUS_BIN_NAME abacus_pw) -elseif(NOT ENABLE_LCAO AND NOT ENABLE_MPI) - set(ABACUS_BIN_NAME abacus_pw_serial) -elseif(ENABLE_LCAO AND NOT ENABLE_MPI) - set(ABACUS_BIN_NAME abacus_serial) +unset(ABACUS_BIN_NAME CACHE) + +# Case : LCAO or PW +if(ENABLE_LCAO) + # Case: CUDA is enabled (suffix with 'g' for GPU) + if(USE_CUDA) + if(ENABLE_MPI) + if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_2g) + elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_3g) + elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_4g) + elseif(ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_5g) + endif() + endif() + # Case: CPU is enabled (suffix with 'p' for parallel) + else() + if(ENABLE_MPI) + if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_2p) + elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_3p) + elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_4p) + elseif(ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_5p) + endif() + else() + if(NOT ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_2s) + elseif(ENABLE_LIBRI AND NOT ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_3s) + elseif(NOT ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_4s) + elseif(ENABLE_LIBRI AND ENABLE_MLALGO) + set(ABACUS_BIN_NAME abacus_5s) + endif() + endif() + endif() +# Case : PW only +else() + if(USE_CUDA) + if(ENABLE_MPI) + set(ABACUS_BIN_NAME abacus_1g) + endif() + else() + if(ENABLE_MPI) + set(ABACUS_BIN_NAME abacus_1p) + else() + set(ABACUS_BIN_NAME abacus_1s) + endif() + endif() endif() + # Use DSP hardware if (USE_DSP) set(USE_ELPA OFF) @@ -156,10 +209,14 @@ if(ENABLE_COVERAGE) include(FetchContent) FetchContent_Declare( cmakecodecov - URL https://github.com/baixiaokuang/CMake-codecov/archive/refs/heads/master.zip + GIT_REPOSITORY https://github.com/RWTH-HPC/CMake-codecov.git + GIT_TAG master + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE ) FetchContent_Populate(cmakecodecov) list(APPEND CMAKE_MODULE_PATH ${cmakecodecov_SOURCE_DIR}/cmake) + set(CMAKE_MODULE_PATH "${cmakecodecov_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) find_package(codecov REQUIRED) endif() endif() @@ -170,7 +227,9 @@ set(ABACUS_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR}/${ABACUS_BIN_NAME}) include_directories(${ABACUS_SOURCE_DIR}) include_directories(${ABACUS_SOURCE_DIR}/source_base/module_container) -set(CMAKE_CXX_STANDARD 11) +if(NOT DEFINED CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 11) +endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(${ABACUS_BIN_NAME} source/source_main/main.cpp) @@ -178,6 +237,7 @@ if(ENABLE_COVERAGE) add_coverage(${ABACUS_BIN_NAME}) endif() + macro(set_if_higher VARIABLE VALUE) if(${VARIABLE} LESS ${VALUE}) set(${VARIABLE} ${VALUE}) @@ -286,10 +346,6 @@ if (USE_SW) include_directories(${SW_FFT}/include) target_link_libraries(${ABACUS_BIN_NAME} ${SW_FFT}/lib/libfftw3.a) - target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswfft.a) - target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswscalapack.a) - target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswlapack.a) - target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswblas.a) endif() find_package(Threads REQUIRED) @@ -328,22 +384,38 @@ endif() if(USE_CUDA) cmake_minimum_required(VERSION 3.18) # required by `CUDA_ARCHITECTURES` below + + # Always find CUDAToolkit to get CUDAToolkit_VERSION + find_package(CUDAToolkit REQUIRED) + set_if_higher(CMAKE_CXX_STANDARD 14) + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "13.0") + message(STATUS "CUDA ${CUDAToolkit_VERSION} detected. Setting CMAKE_CUDA_STANDARD to 17.") + set_if_higher(CMAKE_CXX_STANDARD 17) + endif() set(CMAKE_CXX_EXTENSIONS ON) set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD}) set(CMAKE_CUDA_STANDARD_REQUIRED ON) set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) - find_package(CUDAToolkit REQUIRED) # check # https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/Internal/CMakeCUDAArchitecturesAll.cmake - # for available architechures in different CUDA versions - set(CMAKE_CUDA_ARCHITECTURES - 60 # P100 - 70 # V100 - # Add your CUDA arch here Check the Compute Capability version of your - # GPU at: https://en.wikipedia.org/wiki/CUDA#GPUs_supported - ) + # for available architectures in different CUDA versions + + # CUDA 13.0+ dropped support for architectures below 75 + if(CUDAToolkit_VERSION VERSION_LESS "13.0") + set(CMAKE_CUDA_ARCHITECTURES + 60 # P100 + 70 # V100 + ) + else() + # Start with empty list; architectures 75+ will be added below + set(CMAKE_CUDA_ARCHITECTURES) + endif() + + # Add your CUDA arch here Check the Compute Capability version of your + # GPU at: https://en.wikipedia.org/wiki/CUDA#GPUs_supported + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.0) list(APPEND CMAKE_CUDA_ARCHITECTURES 75) # T4 endif() @@ -378,21 +450,9 @@ if(USE_CUDA) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=${OpenMP_CXX_FLAGS}" CACHE STRING "CUDA flags" FORCE) endif() if (ENABLE_CUSOLVERMP) - add_compile_definitions(__CUSOLVERMP) - find_library(CAL_LIBRARY - NAMES cal - PATHS ${CAL_CUSOLVERMP_PATH} - NO_DEFAULT_PATH - ) - find_library(CUSOLVERMP_LIBRARY - NAMES cusolverMp - PATHS ${CAL_CUSOLVERMP_PATH} - NO_DEFAULT_PATH - ) - target_link_libraries(${ABACUS_BIN_NAME} - ${CAL_LIBRARY} - ${CUSOLVERMP_LIBRARY} - ) + # Keep cuSolverMp discovery/linking logic in a dedicated module. + include(cmake/SetupCuSolverMp.cmake) + abacus_setup_cusolvermp(${ABACUS_BIN_NAME}) endif() endif() endif() @@ -466,24 +526,21 @@ if(MKLROOT) find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) - list(APPEND math_libs MKL::MKL MKL::MKL_SCALAPACK) + list(APPEND math_libs MKL::MKL) if(CMAKE_CXX_COMPILER_ID MATCHES Intel) list(APPEND math_libs ifcore) endif() -elseif(USE_SW) - list(APPEND math_libs gfortran) - # SW architecture can only use its own math library -else() +elseif(NOT USE_SW) find_package(FFTW3 REQUIRED) find_package(Lapack REQUIRED) include_directories(${FFTW3_INCLUDE_DIRS}) list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK BLAS::BLAS) -if(USE_DSP) - target_link_libraries(${ABACUS_BIN_NAME} ${SCALAPACK_LIBRARY_DIR}) -else() - find_package(ScaLAPACK REQUIRED) - list(APPEND math_libs ScaLAPACK::ScaLAPACK) -endif() + if(USE_DSP) + target_link_libraries(${ABACUS_BIN_NAME} ${SCALAPACK_LIBRARY_DIR}) + else() + find_package(ScaLAPACK REQUIRED) + list(APPEND math_libs ScaLAPACK::ScaLAPACK) + endif() if(USE_OPENMP) list(APPEND math_libs FFTW3::FFTW3_OMP) endif() @@ -619,10 +676,6 @@ if(ENABLE_LIBCOMM) endif() - -list(APPEND math_libs m) -target_link_libraries(${ABACUS_BIN_NAME} ${math_libs}) - if(DEFINED Libxc_DIR) set(ENABLE_LIBXC ON) endif() @@ -676,73 +729,13 @@ if(INFO) # modifications on blas_connector and lapack_connector endif() -# Add performance test in abacus -if(ENABLE_GOOGLEBENCH) - set(BUILD_TESTING ON) - find_package(benchmark HINTS ${BENCHMARK_DIR}) - if(NOT ${benchmark_FOUND}) - set(BENCHMARK_USE_BUNDLED_GTEST OFF) - include(FetchContent) - FetchContent_Declare( - benchmark - GIT_REPOSITORY https://github.com/google/benchmark.git - GIT_TAG "origin/main" - GIT_SHALLOW TRUE - GIT_PROGRESS TRUE) - set(BENCHMARK_ENABLE_TESTING OFF) - FetchContent_MakeAvailable(benchmark) - endif() -endif() - -if(BUILD_TESTING) - set_if_higher(CMAKE_CXX_STANDARD 14) # Required in orbital - include(CTest) - enable_testing() - find_package(GTest HINTS /usr/local/lib/ ${GTEST_DIR}) - if(NOT ${GTest_FOUND}) - include(FetchContent) - FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG "origin/main" - GIT_SHALLOW TRUE - GIT_PROGRESS TRUE) - FetchContent_MakeAvailable(googletest) - endif() - # TODO: Try the GoogleTest module. - # https://cmake.org/cmake/help/latest/module/GoogleTest.html - add_subdirectory(tests) # Contains integration tests - - function(AddTest) # function for UT - cmake_parse_arguments(UT "DYN" "TARGET" - "LIBS;DYN_LIBS;STATIC_LIBS;SOURCES;DEPENDS" ${ARGN}) - add_executable(${UT_TARGET} ${UT_SOURCES}) - - if(ENABLE_COVERAGE) - add_coverage(${UT_TARGET}) - endif() - - # dependencies & link library - target_link_libraries(${UT_TARGET} ${UT_LIBS} Threads::Threads - GTest::gtest_main GTest::gmock_main) - if(ENABLE_GOOGLEBENCH) - target_link_libraries( - ${UT_TARGET} benchmark::benchmark) - endif() - - if(USE_OPENMP) - target_link_libraries(${UT_TARGET} OpenMP::OpenMP_CXX) - endif() - install(TARGETS ${UT_TARGET} DESTINATION ${CMAKE_BINARY_DIR}/tests) - add_test( - NAME ${UT_TARGET} - COMMAND ${UT_TARGET} - WORKING_DIRECTORY $) - endfunction(AddTest) -endif() +include(cmake/Testing.cmake) add_subdirectory(source) +include(cmake/BuildInfo.cmake) +setup_build_info() + target_link_libraries( ${ABACUS_BIN_NAME} base @@ -789,13 +782,24 @@ if(ENABLE_LCAO) target_link_libraries(${ABACUS_BIN_NAME} genelpa) endif() if(USE_CUDA) - target_link_libraries(diag_cusolver) + target_link_libraries(${ABACUS_BIN_NAME} diag_cusolver) endif() endif() if(ENABLE_RAPIDJSON) target_link_libraries(${ABACUS_BIN_NAME} json_output) endif() +if (USE_SW) + target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswfft.a) + target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswscalapack.a) + target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswlapack.a) + target_link_libraries(${ABACUS_BIN_NAME} ${SW_MATH}/libswblas.a) + list(APPEND math_libs gfortran) +endif() + +list(APPEND math_libs m) +target_link_libraries(${ABACUS_BIN_NAME} ${math_libs}) + install(PROGRAMS ${ABACUS_BIN_PATH} TYPE BIN # DESTINATION ${CMAKE_INSTALL_BINDIR} @@ -803,4 +807,4 @@ install(PROGRAMS ${ABACUS_BIN_PATH} if(ENABLE_COVERAGE) coverage_evaluate() -endif() \ No newline at end of file +endif() diff --git a/Dockerfile.cuda b/Dockerfile.cuda index 6b9b812e1f..7b42580664 100644 --- a/Dockerfile.cuda +++ b/Dockerfile.cuda @@ -3,7 +3,7 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 RUN apt update && apt install -y --no-install-recommends \ libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libfftw3-dev libcereal-dev \ libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy \ - bc cmake git g++ make bc time sudo unzip vim wget libopenmpi-dev gfortran libtool-bin + bc cmake git g++ make time sudo unzip vim wget libopenmpi-dev gfortran libtool-bin ENV GIT_SSL_NO_VERIFY=true TERM=xterm-256color \ OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \ diff --git a/Dockerfile.gnu b/Dockerfile.gnu index 23c6b71c5e..693814a545 100644 --- a/Dockerfile.gnu +++ b/Dockerfile.gnu @@ -11,7 +11,7 @@ FROM ubuntu:22.04 RUN apt update && apt install -y --no-install-recommends \ libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev \ libxc-dev libgtest-dev libgmock-dev libbenchmark-dev python3-numpy \ - bc cmake git g++ make bc time sudo unzip vim wget gfortran + bc cmake git g++ make time sudo unzip vim wget gfortran # If you wish to use the LLVM compiler, replace 'g++' above with 'clang libomp-dev'. ENV GIT_SSL_NO_VERIFY=true TERM=xterm-256color \ diff --git a/Dockerfile.intel b/Dockerfile.intel index 5bf6308e79..a83033065c 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -2,7 +2,8 @@ FROM ubuntu:22.04 RUN apt-get update && apt-get install -y \ bc cmake git gnupg gcc g++ python3-numpy sudo wget vim unzip \ - libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev + libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev \ + pkg-config build-essential autoconf automake libtool # Following steps by https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html . RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ @@ -16,21 +17,44 @@ RUN apt-get update && \ intel-oneapi-compiler-dpcpp-cpp \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl-devel \ - intel-oneapi-mpi-devel="2021.11.*" \ + intel-oneapi-mkl-sycl-devel \ + intel-oneapi-mkl-sycl-distributed-dft-devel \ + intel-oneapi-mpi-devel \ intel-oneapi-vtune && \ - rm /opt/intel/oneapi/mpi/latest && ln -s /opt/intel/oneapi/mpi/2021.11 /opt/intel/oneapi/mpi/latest -ENV I_MPI_ROOT=/opt/intel/oneapi/mpi/latest \ - LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib/:/opt/intel/oneapi/ippcp/latest/lib/:/opt/intel/oneapi/ipp/latest/lib:/opt/intel/oneapi/dpl/latest/lib:/opt/intel/oneapi/dnnl/latest/lib:/opt/intel/oneapi/dal/latest/lib:/opt/intel/oneapi/compiler/latest/lib:/opt/intel/oneapi/ccl/latest/lib/ \ - LD_LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/lib:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib:/opt/intel/oneapi/itac/latest/slib:/opt/intel/oneapi/ippcp/latest/lib/:/opt/intel/oneapi/ipp/latest/lib:/opt/intel/oneapi/dpl/latest/lib:/opt/intel/oneapi/dnnl/latest/lib:/opt/intel/oneapi/debugger/latest/opt/debugger/lib:/opt/intel/oneapi/dal/latest/lib:/opt/intel/oneapi/compiler/latest/opt/oclfpga/host/linux64/lib:/opt/intel/oneapi/compiler/latest/opt/compiler/lib:/opt/intel/oneapi/compiler/latest/lib:/opt/intel/oneapi/ccl/latest/lib/ \ - PATH=/opt/intel/oneapi/vtune/latest/bin64:/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/bin:/opt/intel/oneapi/mpi/latest/bin:/opt/intel/oneapi/mkl/latest/bin/:/opt/intel/oneapi/itac/latest/bin:/opt/intel/oneapi/inspector/latest/bin64:/opt/intel/oneapi/dpcpp-ct/latest/bin:/opt/intel/oneapi/dev-utilities/latest/bin:/opt/intel/oneapi/debugger/latest/opt/debugger/bin:/opt/intel/oneapi/compiler/latest/opt/oclfpga/bin:/opt/intel/oneapi/compiler/latest/bin:/opt/intel/oneapi/advisor/latest/bin64:/opt/mamba/bin:/opt/mamba/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - MKLROOT=/opt/intel/oneapi/mkl/latest \ - FI_PROVIDER_PATH=/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/lib/prov:/usr/lib/x86_64-linux-gnu/libfabric \ - CMAKE_PREFIX_PATH=/opt/intel/oneapi/tbb/latest/env/..:/opt/intel/oneapi/mkl/latest/lib/cmake:/opt/intel/oneapi/ipp/latest/lib/cmake/ipp:/opt/intel/oneapi/dpl/latest/lib/cmake/oneDPL:/opt/intel/oneapi/dnnl/latest/lib/cmake:/opt/intel/oneapi/dal/latest:/opt/intel/oneapi/compiler/latest \ - CMPLR_ROOT=/opt/intel/oneapi/compiler/latest + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*sycl*dft* +RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*dis* + +# Set oneAPI environment variables +ENV ONEAPI_ROOT=/opt/intel/oneapi +ENV I_MPI_ROOT=${ONEAPI_ROOT}/mpi/latest +ENV MKLROOT=${ONEAPI_ROOT}/mkl/latest +ENV CMPLR_ROOT=${ONEAPI_ROOT}/compiler/latest + +# Set library paths and include paths +ENV LIBRARY_PATH=${ONEAPI_ROOT}/tbb/latest/lib/intel64/gcc4.8:${ONEAPI_ROOT}/mpi/latest/lib:${MKLROOT}/lib/intel64:${ONEAPI_ROOT}/compiler/latest/lib/:${LIBRARY_PATH} +ENV LD_LIBRARY_PATH=${ONEAPI_ROOT}/tbb/latest/lib/intel64/gcc4.8:${ONEAPI_ROOT}/mpi/latest/lib:${MKLROOT}/lib/intel64:${ONEAPI_ROOT}/compiler/latest/lib/:${LD_LIBRARY_PATH} +ENV PATH=${ONEAPI_ROOT}/vtune/latest/bin64:${ONEAPI_ROOT}/mpi/latest/bin:${MKLROOT}/bin/intel64:${ONEAPI_ROOT}/compiler/latest/bin:${PATH} +ENV CPATH=${MKLROOT}/include:${ONEAPI_ROOT}/mpi/latest/include:${CPATH} +ENV PKG_CONFIG_PATH=${MKLROOT}/lib/pkgconfig:${ONEAPI_ROOT}/mpi/latest/lib/pkgconfig:${PKG_CONFIG_PATH} + +# Set CMAKE related paths +ENV CMAKE_PREFIX_PATH=${ONEAPI_ROOT}/tbb/latest:${MKLROOT}/lib/cmake:${ONEAPI_ROOT}/dpl/latest/lib/cmake:${ONEAPI_ROOT}/dnnl/latest/lib/cmake:${ONEAPI_ROOT}/dal/latest:${ONEAPI_ROOT}/compiler/latest:${CMAKE_PREFIX_PATH} SHELL ["/bin/bash", "-c"] ENV CC=mpiicx CXX=mpiicpx FC=mpiifx +# Verify oneAPI installation +RUN source ${ONEAPI_ROOT}/setvars.sh && \ + echo "=== Verify compiler ===" && \ + which mpiicx && mpiicx --version && \ + echo "=== Verify MKL ===" && \ + ls ${MKLROOT}/lib/intel64/ && \ + echo "=== Verify MPI ===" && \ + which mpirun && mpirun --version + # https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html RUN source /opt/intel/oneapi/setvars.sh && \ cd /tmp && \ @@ -39,28 +63,141 @@ RUN source /opt/intel/oneapi/setvars.sh && \ tar xzf elpa-$ELPA_VER.tar.gz && rm elpa-$ELPA_VER.tar.gz && \ cd elpa-$ELPA_VER && mkdir build && cd build && \ ../configure CFLAGS="-O3 -march=native" FCFLAGS="-O3 -qmkl=cluster" --enable-openmp && \ - make -j`nproc` && \ + make -j$(nproc) && \ make PREFIX=/usr/local install && \ ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \ cd /tmp && rm -rf elpa-$ELPA_VER -RUN cd /tmp && git clone https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ \ - && rm -rf rapidjson +# rapidjson and libtorch +RUN cd /tmp && git clone --depth 1 https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ && rm -rf rapidjson +RUN wget -q https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -O /tmp/libtorch.zip && \ + unzip -q /tmp/libtorch.zip -d /opt && rm -f /tmp/libtorch.zip +ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake:${CMAKE_PREFIX_PATH} -RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip \ - --no-check-certificate --quiet -O libtorch.zip && \ - unzip -q libtorch.zip -d /opt && rm libtorch.zip -ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake +###### PEXSI PART: pexsi and gklib and metis and parmetis and superlu_dist +ENV GKLIB_VERSION="master" +ENV METIS_VERSION="master" +ENV PARMETIS_VERSION="main" +ENV SUPERLU_DIST_VERSION=7.2.0 +ENV PEXSI_VERSION="master" +ENV GKLIB_ROOT=/usr/local/gklib-${GKLIB_VERSION} +ENV METIS32_ROOT=/usr/local/metis32-${METIS_VERSION} +ENV PARMETIS32_ROOT=/usr/local/parmetis32-${PARMETIS_VERSION} +ENV PEXSI32_ROOT=/usr/local/pexsi32-${PEXSI_VERSION} +ENV SUPERLU_DIST32_ROOT=/usr/local/superlu_dist32-${SUPERLU_DIST_VERSION} -ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null +# 2. install GKlib +RUN wget https://codeload.github.com/KarypisLab/GKlib/zip/refs/heads/${GKLIB_VERSION} -O GKlib-${GKLIB_VERSION}.zip && \ + unzip GKlib-${GKLIB_VERSION}.zip && \ + cd GKlib-${GKLIB_VERSION} && \ + make config shared=1 prefix=${GKLIB_ROOT} openmp=set && \ + make -j$(nproc) && \ + make install && \ + ls ${GKLIB_ROOT}/lib && \ + cp ${GKLIB_ROOT}/lib/libGKlib.so.0 ${GKLIB_ROOT}/lib/libGKlib.so && \ + cd / && rm -rf GKlib-${GKLIB_VERSION} GKlib-${GKLIB_VERSION}.zip +#.so file CANNOT be found otherwise. +# 2. install METIS +RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \ + wget https://codeload.github.com/KarypisLab/METIS/zip/refs/heads/${METIS_VERSION} -O METIS-${METIS_VERSION}.zip && \ + unzip METIS-${METIS_VERSION}.zip && \ + cd METIS-${METIS_VERSION} && \ + make config shared=1 prefix=${METIS32_ROOT} gklib_path=${GKLIB_ROOT} && \ + make -j$(nproc) && \ + make install && \ + cd / && rm -rf METIS-${METIS_VERSION} METIS-${METIS_VERSION}.zip -RUN source /opt/intel/oneapi/setvars.sh && \ - git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ +# 3. install ParMETIS +RUN export LD_LIBRARY_PATH=${METIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \ + wget https://codeload.github.com/KarypisLab/ParMETIS/zip/refs/heads/${PARMETIS_VERSION} -O ParMETIS-${PARMETIS_VERSION}.zip && \ + unzip ParMETIS-${PARMETIS_VERSION}.zip && \ + cd ParMETIS-${PARMETIS_VERSION} && \ + make config shared=1 prefix=${PARMETIS32_ROOT} gklib_path=${GKLIB_ROOT} metis_path=${METIS32_ROOT} && \ + make -j$(nproc) && \ + make install && \ + cd / && rm -rf ParMETIS-${PARMETIS_VERSION} ParMETIS-${PARMETIS_VERSION}.zip + +# 4. install SuperLU_DIST +RUN wget https://codeload.github.com/xiaoyeli/superlu_dist/tar.gz/refs/tags/v${SUPERLU_DIST_VERSION} -O v${SUPERLU_DIST_VERSION}.tar.gz && \ + tar -xzf v${SUPERLU_DIST_VERSION}.tar.gz && \ + cd superlu_dist-${SUPERLU_DIST_VERSION} && \ + mkdir build && cd build && \ + cmake .. \ + -DTPL_ENABLE_PARMETISLIB=ON \ + -DTPL_PARMETIS_LIBRARIES="${PARMETIS32_ROOT}/lib/libparmetis.so;${METIS32_ROOT}/lib/libmetis.so;${GKLIB_ROOT}/lib/libGKlib.so" \ + -DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS32_ROOT}/include;${METIS32_ROOT}/include;${GKLIB_ROOT}/include" \ + -DTPL_ENABLE_INTERNAL_BLASLIB=OFF \ + -DTPL_ENABLE_LAPACKLIB=ON \ + -DTPL_ENABLE_COMBBLASLIB=OFF \ + -DTPL_ENABLE_CUDALIB=OFF \ + -Denable_complex16=ON \ + -DXSDK_INDEX_SIZE=32 \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_PREFIX=${SUPERLU_DIST32_ROOT} \ + -DCMAKE_C_FLAGS="-O3 -fopenmp" \ + -DCMAKE_CXX_FLAGS="-O3 -fopenmp" \ + -DXSDK_ENABLE_Fortran=ON \ + -DCMAKE_Fortran_COMPILER=mpiifx && \ + make -j$(nproc) && \ + make install && \ + cd / && rm -rf superlu_dist-${SUPERLU_DIST_VERSION} v${SUPERLU_DIST_VERSION}.tar.gz + +### -DCMAKE_C_COMPILER=mpiicc \ +### -DCMAKE_CXX_COMPILER=mpiicpc \ +### -DCMAKE_CUDA_COMPILER=nvcc \ + +# 5. install PEXSI +RUN export LD_LIBRARY_PATH=${SUPERLU_DIST32_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \ + export LIBRARY_PATH=${SUPERLU_DIST32_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LIBRARY_PATH} && \ + export PKG_CONFIG_PATH=${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${GKLIB_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} && \ + export CPATH=${SUPERLU_DIST32_ROOT}/include:${PARMETIS32_ROOT}/include:${METIS32_ROOT}/include:${GKLIB_ROOT}/include:${CMAKE_PREFIX_PATH} && \ + export CMAKE_PREFIX_PATH=${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} && \ + wget https://codeload.github.com/MCresearch/pexsi/tar.gz/refs/heads/${PEXSI_VERSION} -O pexsi-${PEXSI_VERSION}.tar.gz && \ + tar -xzf pexsi-${PEXSI_VERSION}.tar.gz && \ + cd pexsi-${PEXSI_VERSION} && \ + sed -i 's/^add_pexsi_f_example_exe/# add_pexsi_f_example_exe/g' fortran/CMakeLists.txt && \ + sed -i 's/^add_pexsi_example_exe/# add_pexsi_example_exe/g' examples/CMakeLists.txt && \ + sed -i 's/add_executable/# add_executable/g' fortran/CMakeLists.txt && \ + sed -i 's/add_executable/# add_executable/g' examples/CMakeLists.txt && \ + mkdir build && cd build && \ + cmake .. \ + -DCMAKE_INSTALL_PREFIX=${PEXSI32_ROOT} \ + -DPEXSI_ENABLE_OPENMP=ON \ + -DPEXSI_ENABLE_FORTRAN=OFF && \ + make pexsi -j$(nproc) && \ + make install && \ + cd / && rm -rf pexsi-${PEXSI_VERSION} pexsi-${PEXSI_VERSION}.tar.gz + +ENV LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} +ENV PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} +ENV CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} +ENV CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} + +### -DCMAKE_C_COMPILER=mpiicc \ +### -DCMAKE_CXX_COMPILER=mpiicpc \ +###### END of PEXSI PART + +# Clone and build abacus (optional during image build; keep for CI image) +ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null +RUN cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ - cmake -B build -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_RAPIDJSON=ON && \ - cmake --build build -j`nproc` && \ + cmake -B build \ + -DENABLE_MLALGO=ON \ + -DENABLE_PEXSI=ON \ + -DENABLE_LIBXC=ON \ + -DENABLE_LIBRI=ON \ + -DENABLE_RAPIDJSON=ON \ + -DCMAKE_BUILD_TYPE=Release && \ + cmake --build build -j"$(nproc)" && \ cmake --install build && \ - rm -rf build && \ - abacus --version - #&& rm -rf abacus-develop + (/usr/local/bin/abacus --version || echo "ABACUS installed but version check failed") && \ + rm -rf /tmp/abacus-develop + # -DMKL_SYCL=OFF \ + # -DMKL_SYCL_DISTRIBUTED_DFT:BOOL=OFF \ + # cd /tmp && wget https://github.com/deepmodeling/abacus-develop/archive/refs/tags/v3.9.0.17.zip -O abacus-develop-3.9.0.17.zip && \ + # unzip abacus-develop-3.9.0.17.zip && \ + # cd abacus-develop-3.9.0.17 && \ + # sed -i '3i\#include "source_estate/elecstate_lcao.h"' source/source_lcao/edm.cpp && \ +# Default entry +CMD ["/bin/bash"] diff --git a/cmake/BuildInfo.cmake b/cmake/BuildInfo.cmake new file mode 100644 index 0000000000..94a267e9c6 --- /dev/null +++ b/cmake/BuildInfo.cmake @@ -0,0 +1,28 @@ +# ============================================================================= +# Generate Build Information Header (Including Information Collection) +# ============================================================================== + +# include_guard(GLOBAL) + +function(setup_build_info) + message(STATUS "Setting up build information...") + + include(cmake/CollectBuildInfoVars.cmake) + +set(BUILD_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/source/source_io/build_info.h.in") +set(BUILD_INFO_OUTPUT "${CMAKE_BINARY_DIR}/source/source_io/build_info.h") + +configure_file( + ${BUILD_INFO_TEMPLATE} + ${BUILD_INFO_OUTPUT} + @ONLY +) + + # add_library(BuildInfo::Headers INTERFACE IMPORTED GLOBAL) + # target_include_directories(BuildInfo::Headers + # INTERFACE + # ${CMAKE_BINARY_DIR}/source/source_io + # ) + + message(STATUS "Build info header configured: ${BUILD_INFO_OUTPUT}") +endfunction() diff --git a/cmake/CollectBuildInfoVars.cmake b/cmake/CollectBuildInfoVars.cmake new file mode 100644 index 0000000000..79e925af1d --- /dev/null +++ b/cmake/CollectBuildInfoVars.cmake @@ -0,0 +1,416 @@ +# ============================================================================= +# This script is included to set all build information variables in the +# calling scope. It does not use a function to avoid variable scope issues. +# ============================================================================== + +# --- 1. Collect Basic Build Information --- +if(NOT CMAKE_BUILD_TYPE) + set(ABACUS_BUILD_TYPE "Custom (no CMAKE_BUILD_TYPE)") +else() + set(ABACUS_BUILD_TYPE ${CMAKE_BUILD_TYPE}) +endif() +if(DEFINED ENV{USER}) + set(ABACUS_BUILD_USER "$ENV{USER}") +else() + set(ABACUS_BUILD_USER "Unknown") +endif() +site_name(ABACUS_BUILD_HOST) +set(ABACUS_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}) +set(ABACUS_CXX_COMPILER_PATH ${CMAKE_CXX_COMPILER}) +set(ABACUS_CXX_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) +set(TEMP_CXX_FLAGS_LIST "${CMAKE_CXX_FLAGS}") +#if(DEFINED CMAKE_BUILD_TYPE) +# string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) +# list(APPEND TEMP_CXX_FLAGS_LIST "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}") +#endif() +string(REPLACE ";" " " ABACUS_CXX_FLAGS "${TEMP_CXX_FLAGS_LIST}") +set(TEMP_LINKER_FLAGS_LIST "${CMAKE_EXE_LINKER_FLAGS}") +#if(DEFINED CMAKE_BUILD_TYPE) +# string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) +# list(APPEND TEMP_LINKER_FLAGS_LIST "${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}") +#endif() +string(REPLACE ";" " " ABACUS_LINKER_FLAGS "${TEMP_LINKER_FLAGS_LIST}") +set(TEMP_CUDA_FLAGS_LIST "${CMAKE_EXE_CUDA_FLAGS}") +string(REPLACE ";" " " ABACUS_CUDA_FLAGS "${TEMP_CUDA_FLAGS_LIST}") + +# --- 2. Determine Target Platform --- +if(USE_DSP) + set(ABACUS_PLATFORM_NAME "DSP") +elseif(USE_SW) + set(ABACUS_PLATFORM_NAME "CPU + SW-MATH") +elseif(USE_CUDA_ON_DCU) + set(ABACUS_PLATFORM_NAME "CPU + DCU (Hygon CUDA)") +elseif(USE_CUDA) + set(ABACUS_PLATFORM_NAME "CPU + NVIDIA CUDA") +elseif(USE_ROCM) + set(ABACUS_PLATFORM_NAME "CPU + AMD ROCm") +else() + set(ABACUS_PLATFORM_NAME "CPU") +endif() + +# --- 3. Sanitizers & Debugging --- +if(ENABLE_ASAN) + set(ABACUS_ASAN_STATUS "yes") +else() + set(ABACUS_ASAN_STATUS "no") +endif() +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(ABACUS_DEBUG_SYMBOLS "yes") +else() + set(ABACUS_DEBUG_SYMBOLS "no") +endif() + +# --- 4. Get Dependency Versions (Enhanced with path fallback) --- +# MPI Implementation and Version +set(ABACUS_MPI_IMPLEMENTATION "no") +set(ABACUS_MPI_VERSION "no") +set(ABACUS_CUDA_AWARE_MPI "no") +if(ENABLE_MPI) + execute_process(COMMAND ${MPI_CXX_COMPILER} --version OUTPUT_VARIABLE MPI_VERSION_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + if(MPI_VERSION_OUTPUT MATCHES "Intel") + set(ABACUS_MPI_IMPLEMENTATION "Intel MPI") + string(REGEX MATCH "Intel\\(R\\) oneAPI DPC\\+\\+/C\\+\\+ Compiler ([0-9]+\\.[0-9]+\\.[0-9]+)" _ "${MPI_VERSION_OUTPUT}") + if(CMAKE_MATCH_1) + set(MPI_DETECTED_VERSION "${CMAKE_MATCH_1}") + else() + string(REGEX MATCH "icpc \\(ICC\\) ([0-9]+\\.[0-9]+\\.[0-9]+)" _ "${MPI_VERSION_OUTPUT}") + if(CMAKE_MATCH_1) + set(MPI_DETECTED_VERSION "${CMAKE_MATCH_1}") + endif() + endif() + elseif(MPI_VERSION_OUTPUT MATCHES "Open MPI") + set(ABACUS_MPI_IMPLEMENTATION "OpenMPI") + elseif(MPI_VERSION_OUTPUT MATCHES "MPICH") + set(ABACUS_MPI_IMPLEMENTATION "MPICH") + else() + set(ABACUS_MPI_IMPLEMENTATION "Unknown") + endif() + # Fallback: try mpirun/mpiexec + if(NOT MPI_DETECTED_VERSION) + find_program(MPIRUN_EXECUTABLE mpirun) + if(MPIRUN_EXECUTABLE) + execute_process(COMMAND ${MPIRUN_EXECUTABLE} --version OUTPUT_VARIABLE MPIRUN_VERSION_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + if(MPIRUN_VERSION_OUTPUT MATCHES "Open MPI") + set(ABACUS_MPI_IMPLEMENTATION "OpenMPI") + string(REGEX MATCH "Open MPI ([0-9]+\\.[0-9]+\\.[0-9]+)" _ "${MPIRUN_VERSION_OUTPUT}") + if(CMAKE_MATCH_1) + set(MPI_DETECTED_VERSION "${CMAKE_MATCH_1}") + endif() + elseif(MPIRUN_VERSION_OUTPUT MATCHES "MPICH") + set(ABACUS_MPI_IMPLEMENTATION "MPICH") + string(REGEX MATCH "MPICH Version: ([0-9]+\\.[0-9]+\\.[0-9]+)" _ "${MPIRUN_VERSION_OUTPUT}") + if(CMAKE_MATCH_1) + set(MPI_DETECTED_VERSION "${CMAKE_MATCH_1}") + endif() + endif() + endif() + endif() + if(MPI_DETECTED_VERSION) + set(ABACUS_MPI_VERSION "yes (v${MPI_DETECTED_VERSION})") + elseif(MPI_VERSION) + set(ABACUS_MPI_VERSION "yes (v${MPI_VERSION})") + else() + set(ABACUS_MPI_VERSION "yes (version unknown)") + endif() + if(USE_CUDA) + # OpenMPI hint + find_program(OMPI_INFO_EXECUTABLE ompi_info) + if(OMPI_INFO_EXECUTABLE) + execute_process(COMMAND ${OMPI_INFO_EXECUTABLE} --parsable --all OUTPUT_VARIABLE OMPI_INFO_OUT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + if(OMPI_INFO_OUT MATCHES "mpi_built_with_cuda_support:value:true") + set(ABACUS_CUDA_AWARE_MPI "yes") + else() + set(ABACUS_CUDA_AWARE_MPI "no (or undetectable)") + endif() + else() + execute_process(COMMAND ${MPI_CXX_COMPILER} -showme:compile OUTPUT_VARIABLE MPI_COMPILE_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + if(MPI_COMPILE_FLAGS MATCHES "cuda" OR MPI_COMPILE_FLAGS MATCHES "CUDA") + set(ABACUS_CUDA_AWARE_MPI "yes (likely)") + else() + set(ABACUS_CUDA_AWARE_MPI "no (or undetectable)") + endif() + endif() + else() + set(ABACUS_CUDA_AWARE_MPI "no (CUDA not enabled)") + endif() +endif() + +# OpenMP Version +if(USE_OPENMP AND OpenMP_CXX_VERSION) + set(ABACUS_OPENMP_VERSION "yes (v${OpenMP_CXX_VERSION})") +elseif(USE_OPENMP) + set(ABACUS_OPENMP_VERSION "yes (version unknown)") +else() + set(ABACUS_OPENMP_VERSION "no") +endif() + +# Core Math Libraries +if(ENABLE_LCAO AND USE_ELPA) + set(ABACUS_ELPA_VERSION "yes (version unknown)") + if(ELPA_VERSION) + set(ABACUS_ELPA_VERSION "yes (v${ELPA_VERSION})") + else() + find_program(ELPA_VERSION_EXE elpa2_print_version PATHS ${ELPA_DIR}/bin NO_DEFAULT_PATH) + if(ELPA_VERSION_EXE) + execute_process(COMMAND ${ELPA_VERSION_EXE} OUTPUT_VARIABLE ELPA_VER_RAW OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + if(ELPA_VER_RAW) + set(ABACUS_ELPA_VERSION "yes (${ELPA_VER_RAW})") +endif() + endif() + endif() + if(ABACUS_ELPA_VERSION STREQUAL "yes (version unknown)" AND ELPA_DIR) + set(ABACUS_ELPA_VERSION "yes (path: ${ELPA_DIR})") + endif() +else() + set(ABACUS_ELPA_VERSION "no") +endif() + +if(MKLROOT) + set(ABACUS_MKL_SUPPORT "yes (version unknown)") + find_path(MKL_VERSION_HEADER mkl_version.h PATHS ${MKL_INCLUDE} NO_DEFAULT_PATH) + if(MKL_VERSION_HEADER) + file(STRINGS "${MKL_VERSION_HEADER}" MKL_VERSION_LINE REGEX "^#define INTEL_MKL_VERSION [0-9]+") + string(REGEX REPLACE "^#define INTEL_MKL_VERSION ([0-9]+)" "\\1" MKL_VER_NUM "${MKL_VERSION_LINE}") + if(MKL_VER_NUM) + math(EXPR MKL_MAJOR "${MKL_VER_NUM} / 10000") + math(EXPR MKL_MINOR "(${MKL_VER_NUM} % 10000) / 100") + math(EXPR MKL_PATCH "${MKL_VER_NUM} % 100") + set(ABACUS_MKL_SUPPORT "yes (v${MKL_MAJOR}.${MKL_MINOR}.${MKL_PATCH})") + endif() + endif() +else() + set(ABACUS_MKL_SUPPORT "no") +endif() + +if(ENABLE_LIBXC AND Libxc_VERSION) + set(ABACUS_LIBXC_VERSION "yes (v${Libxc_VERSION})") +elseif(ENABLE_LIBXC) + set(ABACUS_LIBXC_VERSION "yes (path: ${Libxc_DIR})") +else() + set(ABACUS_LIBXC_VERSION "no") +endif() + +if(NOT USE_SW AND NOT MKLROOT AND FFTW3_VERSION) + set(ABACUS_FFTW_VERSION "yes (v${FFTW3_VERSION})") +elseif(NOT USE_SW AND NOT MKLROOT) + if(FFTW3_INCLUDE_DIR AND EXISTS "${FFTW3_INCLUDE_DIR}/fftw3.h") + file(STRINGS "${FFTW3_INCLUDE_DIR}/fftw3.h" _fftw_ver_line REGEX "^#define[\t ]+FFTW_VERSION[\t ]+\"[^\"]+\"") + if(_fftw_ver_line) + string(REGEX REPLACE "^#define[\t ]+FFTW_VERSION[\t ]+\"([^\"]+)\"" "\\1" FFTW3_VERSION "${_fftw_ver_line}") + set(ABACUS_FFTW_VERSION "yes (v${FFTW3_VERSION})") + else() + set(ABACUS_FFTW_VERSION "yes (version unknown)") + endif() + else() + set(ABACUS_FFTW_VERSION "yes (version unknown)") + endif() +else() + set(ABACUS_FFTW_VERSION "no (using MKL or SW)") +endif() + +# Cereal Version (Enhanced) +if(ENABLE_LCAO) + set(ABACUS_CEREAL_VERSION "yes (version unknown)") + if(NOT CEREAL_INCLUDE_DIR) + find_path(CEREAL_INCLUDE_DIR cereal/version.hpp) + endif() + if(CEREAL_INCLUDE_DIR AND EXISTS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp") + file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MAJOR_LINE REGEX "^#define CEREAL_VERSION_MAJOR") + file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_MINOR_LINE REGEX "^#define CEREAL_VERSION_MINOR") + file(STRINGS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp" CEREAL_PATCH_LINE REGEX "^#define CEREAL_VERSION_PATCH") + string(REGEX REPLACE "^#define CEREAL_VERSION_MAJOR +([0-9]+).*" "\\1" CEREAL_MAJOR "${CEREAL_MAJOR_LINE}") + string(REGEX REPLACE "^#define CEREAL_VERSION_MINOR +([0-9]+).*" "\\1" CEREAL_MINOR "${CEREAL_MINOR_LINE}") + string(REGEX REPLACE "^#define CEREAL_VERSION_PATCH +([0-9]+).*" "\\1" CEREAL_PATCH "${CEREAL_PATCH_LINE}") + if(CEREAL_MAJOR AND CEREAL_MINOR AND CEREAL_PATCH) + set(ABACUS_CEREAL_VERSION "yes (v${CEREAL_MAJOR}.${CEREAL_MINOR}.${CEREAL_PATCH})") + endif() + endif() + if(ABACUS_CEREAL_VERSION STREQUAL "yes (version unknown)" AND CEREAL_INCLUDE_DIR) + set(ABACUS_CEREAL_VERSION "yes (path: ${CEREAL_INCLUDE_DIR})") + endif() +else() + set(ABACUS_CEREAL_VERSION "no") +endif() + +# Accelerators +if(USE_CUDA AND CUDAToolkit_VERSION) + set(ABACUS_CUDA_VERSION "yes (v${CUDAToolkit_VERSION})") +elseif(USE_CUDA) + set(ABACUS_CUDA_VERSION "yes (version unknown)") +else() + set(ABACUS_CUDA_VERSION "no") +endif() + +if(USE_ROCM) + set(ABACUS_ROCM_VERSION "yes (version unknown)") + if(HIP_VERSION) + set(ABACUS_ROCM_VERSION "yes (v${HIP_VERSION})") + else() + find_program(HIPCC_EXECUTABLE hipcc) + if(HIPCC_EXECUTABLE) + execute_process(COMMAND ${HIPCC_EXECUTABLE} --version OUTPUT_VARIABLE HIPCC_VERSION_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + string(REGEX MATCH "HIP version: ([0-9]+\\.[0-9]+\\.[0-9]+)" _ "${HIPCC_VERSION_OUTPUT}") + if(CMAKE_MATCH_1) + set(ABACUS_ROCM_VERSION "yes (v${CMAKE_MATCH_1})") +endif() + endif() + endif() + if(ABACUS_ROCM_VERSION STREQUAL "yes (version unknown)" AND ROCM_PATH) + set(ABACUS_ROCM_VERSION "yes (path: ${ROCM_PATH})") + endif() +else() + set(ABACUS_ROCM_VERSION "no") +endif() + +if(DEFINED CAL_CUSOLVERMP_PATH AND ENABLE_CUSOLVERMP) + set(ABACUS_CUSOLVERMP_VERSION "yes (path: ${CAL_CUSOLVERMP_PATH})") +elseif(ENABLE_CUSOLVERMP) + set(ABACUS_CUSOLVERMP_VERSION "yes (version unknown)") +else() + set(ABACUS_CUSOLVERMP_VERSION "no") +endif() + +# EXX Libraries +if(ENABLE_LIBRI) + set(ABACUS_LIBRI_VERSION "yes (version unknown)") + set(LIBRI_VERSION_HEADER "${LIBRI_DIR}/include/RI/version.h") + if(EXISTS ${LIBRI_VERSION_HEADER}) + file(STRINGS "${LIBRI_VERSION_HEADER}" LIBRI_MAJOR_LINE REGEX "__LIBRI_VERSION_MAJOR") + file(STRINGS "${LIBRI_VERSION_HEADER}" LIBRI_MINOR_LINE REGEX "__LIBRI_VERSION_MINOR") + file(STRINGS "${LIBRI_VERSION_HEADER}" LIBRI_PATCH_LINE REGEX "__LIBRI_VERSION_PATCH") + string(REGEX MATCH "([0-9]+)" LIBRI_MAJOR "${LIBRI_MAJOR_LINE}") + string(REGEX MATCH "([0-9]+)" LIBRI_MINOR "${LIBRI_MINOR_LINE}") + string(REGEX MATCH "([0-9]+)" LIBRI_PATCH "${LIBRI_PATCH_LINE}") + if(LIBRI_MAJOR AND LIBRI_MINOR AND LIBRI_PATCH) + set(ABACUS_LIBRI_VERSION "yes (v${LIBRI_MAJOR}.${LIBRI_MINOR}.${LIBRI_PATCH})") + endif() + endif() + if(ABACUS_LIBRI_VERSION STREQUAL "yes (version unknown)" AND LIBRI_DIR) + set(ABACUS_LIBRI_VERSION "yes (path: ${LIBRI_DIR})") + endif() +else() + set(ABACUS_LIBRI_VERSION "no") +endif() + +if(ENABLE_LIBCOMM AND LIBCOMM_DIR) + set(ABACUS_LIBCOMM_VERSION "yes (path: ${LIBCOMM_DIR})") +elseif(ENABLE_LIBCOMM) + set(ABACUS_LIBCOMM_VERSION "yes (version unknown)") +else() + set(ABACUS_LIBCOMM_VERSION "no") +endif() + +# ML & AI Libraries +if((DEFINED Torch_DIR OR ENABLE_MLALGO) AND Torch_VERSION) + set(ABACUS_LIBTORCH_VERSION "yes (v${Torch_VERSION})") +elseif(DEFINED Torch_DIR OR ENABLE_MLALGO) + set(ABACUS_LIBTORCH_VERSION "yes (path: ${Torch_DIR})") +else() + set(ABACUS_LIBTORCH_VERSION "no") +endif() + +if(DEFINED DeePMD_DIR) + set(ABACUS_DEEPMD_VERSION "yes (version unknown)") + set(DEEPMD_VERSION_HEADER "${DeePMD_DIR}/include/deepmd/version.h") + if(EXISTS ${DEEPMD_VERSION_HEADER}) + file(STRINGS "${DEEPMD_VERSION_HEADER}" DEEPMD_VERSION_LINE REGEX "global_install_prefix") + if(DEEPMD_VERSION_LINE) + string(REGEX MATCH "global_install_prefix=\".*deepmd-kit-([0-9]+\\.[0-9]+\\.[0-9]+)\"" _ "${DEEPMD_VERSION_LINE}") + if(CMAKE_MATCH_1) + set(ABACUS_DEEPMD_VERSION "yes (v${CMAKE_MATCH_1})") +endif() + endif() + endif() + if(ABACUS_DEEPMD_VERSION STREQUAL "yes (version unknown)") + set(ABACUS_DEEPMD_VERSION "yes (path: ${DeePMD_DIR})") + endif() +else() + set(ABACUS_DEEPMD_VERSION "no") +endif() + +if(DEFINED NEP_DIR AND NEP_VERSION) + set(ABACUS_NEP_VERSION "yes (v${NEP_VERSION})") +elseif(DEFINED NEP_DIR) + set(ABACUS_NEP_VERSION "yes (path: ${NEP_DIR})") +else() + set(ABACUS_NEP_VERSION "no") +endif() + +if(DEFINED TensorFlow_DIR) + set(ABACUS_TENSORFLOW_VERSION "yes (path: ${TensorFlow_DIR})") +else() + set(ABACUS_TENSORFLOW_VERSION "no") +endif() + +# Testing & Other Libraries +if(BUILD_TESTING) + set(ABACUS_GTEST_VERSION "yes (from git origin/main)") +else() + set(ABACUS_GTEST_VERSION "no") +endif() + +if(ENABLE_GOOGLEBENCH) + set(ABACUS_GOOGLEBENCH_VERSION "yes (from git origin/main)") +else() + set(ABACUS_GOOGLEBENCH_VERSION "no") +endif() + +if(DEFINED RapidJSON_DIR AND ENABLE_RAPIDJSON) + set(ABACUS_RAPIDJSON_VERSION "yes (path: ${RapidJSON_DIR})") +elseif(ENABLE_RAPIDJSON) + set(ABACUS_RAPIDJSON_VERSION "yes (from git origin/master)") +else() + set(ABACUS_RAPIDJSON_VERSION "no") +endif() + +if(ENABLE_MLALGO) + set(ABACUS_LIBNPY_VERSION "yes (path: ${libnpy_SOURCE_DIR})") +else() + set(ABACUS_LIBNPY_VERSION "no") +endif() + +if(ENABLE_PEXSI) + set(ABACUS_PEXSI_VERSION "yes (version unknown)") + if(PEXSI_VERSION) + set(ABACUS_PEXSI_VERSION "yes (v${PEXSI_VERSION})") + elseif(PEXSI_DIR) + set(ABACUS_PEXSI_VERSION "yes (path: ${PEXSI_DIR})") + endif() +else() + set(ABACUS_PEXSI_VERSION "no") +endif() + +if(ENABLE_CNPY) + set(ABACUS_CNPY_VERSION "yes (path: ${cnpy_SOURCE_DIR})") +else() + set(ABACUS_CNPY_VERSION "no") +endif() + +# --- 5. Collect CMake Configuration Summary --- +set(ABACUS_CMAKE_OPTIONS "Build Options:") +list(APPEND CMAKE_OPTIONS_LIST " ENABLE_MPI=${ENABLE_MPI}") +list(APPEND CMAKE_OPTIONS_LIST " USE_OPENMP=${USE_OPENMP}") +list(APPEND CMAKE_OPTIONS_LIST " USE_CUDA=${USE_CUDA}") +list(APPEND CMAKE_OPTIONS_LIST " USE_ROCM=${USE_ROCM}") +list(APPEND CMAKE_OPTIONS_LIST " ENABLE_LCAO=${ENABLE_LCAO}") +list(APPEND CMAKE_OPTIONS_LIST " USE_ELPA=${USE_ELPA}") +list(APPEND CMAKE_OPTIONS_LIST " ENABLE_LIBXC=${ENABLE_LIBXC}") +list(APPEND CMAKE_OPTIONS_LIST " ENABLE_MLALGO=${ENABLE_MLALGO}") +list(APPEND CMAKE_OPTIONS_LIST " ENABLE_ASAN=${ENABLE_ASAN}") +list(APPEND CMAKE_OPTIONS_LIST " BUILD_TESTING=${BUILD_TESTING}") +foreach(option_line ${CMAKE_OPTIONS_LIST}) + set(ABACUS_CMAKE_OPTIONS "${ABACUS_CMAKE_OPTIONS}${option_line}") +endforeach() + +set(ABACUS_CMAKE_FIND_PACKAGES "FindPackage Results:") +list(APPEND CMAKE_FIND_PACKAGES_LIST " MPI Found=${MPI_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " OpenMP Found=${OpenMP_CXX_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " CUDA Found=${CUDA_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " ROCm Found=${ROCM_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " ELPA Found=${ELPA_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " Libxc Found=${Libxc_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " PEXSI Found=${PEXSI_FOUND}") +list(APPEND CMAKE_FIND_PACKAGES_LIST " LibRI Found=${LIBRI_FOUND}") +foreach(package_line ${CMAKE_FIND_PACKAGES_LIST}) + set(ABACUS_CMAKE_FIND_PACKAGES "${ABACUS_CMAKE_FIND_PACKAGES}${package_line}") +endforeach() diff --git a/cmake/FindCereal.cmake b/cmake/FindCereal.cmake index 3486cffdec..801420a491 100644 --- a/cmake/FindCereal.cmake +++ b/cmake/FindCereal.cmake @@ -15,7 +15,7 @@ if(NOT CEREAL_INCLUDE_DIR) include(FetchContent) FetchContent_Declare( cereal - URL https://codeload.github.com/USCiLab/cereal/tar.gz/master + URL https://codeload.github.com/MCresearch/cereal/tar.gz/master ) FetchContent_Populate(cereal) set(CEREAL_INCLUDE_DIR ${cereal_SOURCE_DIR}/include) diff --git a/cmake/FindFFTW3.cmake b/cmake/FindFFTW3.cmake index 7ae0b7a2ab..b79f97013c 100644 --- a/cmake/FindFFTW3.cmake +++ b/cmake/FindFFTW3.cmake @@ -49,6 +49,14 @@ if(FFTW3_FOUND) set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR}) + # Try to extract FFTW version from header + if(FFTW3_INCLUDE_DIR AND EXISTS "${FFTW3_INCLUDE_DIR}/fftw3.h") + file(STRINGS "${FFTW3_INCLUDE_DIR}/fftw3.h" _fftw_ver_line REGEX "^#define[\t ]+FFTW_VERSION[\t ]+\"[^\"]+\"") + if(_fftw_ver_line) + string(REGEX REPLACE "^#define[\t ]+FFTW_VERSION[\t ]+\"([^\"]+)\"" "\\1" FFTW3_VERSION "${_fftw_ver_line}") + endif() + endif() + if(NOT TARGET FFTW3::FFTW3) add_library(FFTW3::FFTW3 UNKNOWN IMPORTED) set_target_properties(FFTW3::FFTW3 PROPERTIES diff --git a/cmake/FindLibRI.cmake b/cmake/FindLibRI.cmake index b8f060a483..7fd62718c7 100644 --- a/cmake/FindLibRI.cmake +++ b/cmake/FindLibRI.cmake @@ -16,7 +16,7 @@ if(NOT LIBRI_DIR) include(FetchContent) FetchContent_Declare( LibRI - URL https://github.com/abacusmodeling/LibRI/archive/refs/tags/v0.2.1.1.tar.gz + URL https://codeload.github.com/abacusmodeling/LibRI//tar.gz/v0.2.1.1 ) FetchContent_Populate(LibRI) set(LIBRI_DIR ${libri_SOURCE_DIR}) diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index a0c389b5ae..3680b8a92c 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -4,7 +4,7 @@ # MKL_INCLUDE - where to find mkl.h, etc. # MKL_FOUND - True if mkl found. -find_package(MKL NO_MODULE) # try using official module first +# find_package(MKL NO_MODULE) # try using official module first if(NOT TARGET MKL::MKL) find_path(MKL_INCLUDE mkl_service.h HINTS ${MKLROOT}/include) @@ -70,7 +70,9 @@ if(MKL_FOUND) set_property(TARGET MKL::MKL PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--start-group" - MKL::INTEL MKL::INTEL_THREAD MKL::CORE) + MKL::INTEL MKL::INTEL_THREAD MKL::CORE + "-Wl,--end-group" + ) endif() endif() @@ -91,5 +93,12 @@ endif() if(NOT TARGET MKL::MKL_SCALAPACK) find_library(MKL_SCALAPACK NAMES mkl_scalapack_lp64 HINTS ${MKLROOT}/lib ${MKLROOT}/lib/intel64) message(STATUS "Found MKL_SCALAPACK: ${MKL_SCALAPACK}") - add_library(MKL::MKL_SCALAPACK OBJECT IMPORTED MKL_SCALAPACK) + if(MKL_SCALAPACK) + # create an IMPORTED target that points to the discovered library file + add_library(MKL::MKL_SCALAPACK UNKNOWN IMPORTED) + set_target_properties(MKL::MKL_SCALAPACK PROPERTIES + IMPORTED_LOCATION "${MKL_SCALAPACK}" + INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE}" + ) + endif() endif() diff --git a/cmake/SetupCuSolverMp.cmake b/cmake/SetupCuSolverMp.cmake new file mode 100644 index 0000000000..a2bcd00bdf --- /dev/null +++ b/cmake/SetupCuSolverMp.cmake @@ -0,0 +1,136 @@ +# ============================================================================= +# Configure cuSolverMp dependencies and linking for ABACUS +# ============================================================================= + +include_guard(GLOBAL) + +function(abacus_setup_cusolvermp target_name) + add_compile_definitions(__CUSOLVERMP) + + # Find cuSolverMp first, then decide communicator backend. + find_library(CUSOLVERMP_LIBRARY NAMES cusolverMp + HINTS ${CAL_CUSOLVERMP_PATH} ${NVHPC_ROOT_DIR} + PATH_SUFFIXES lib lib64 math_libs/lib math_libs/lib64) + + find_path(CUSOLVERMP_INCLUDE_DIR NAMES cusolverMp.h + HINTS ${CAL_CUSOLVERMP_PATH} ${NVHPC_ROOT_DIR} + PATH_SUFFIXES include math_libs/include) + + if(NOT CUSOLVERMP_LIBRARY OR NOT CUSOLVERMP_INCLUDE_DIR) + message(FATAL_ERROR + "cusolverMp not found. Set CUSOLVERMP_PATH or NVHPC_ROOT_DIR." + ) + endif() + + message(STATUS "Found cusolverMp: ${CUSOLVERMP_LIBRARY}") + + set(CUSOLVERMP_VERSION_STR "") + set(CUSOLVERMP_VERSION_HEADER "${CUSOLVERMP_INCLUDE_DIR}/cusolverMp.h") + if(EXISTS "${CUSOLVERMP_VERSION_HEADER}") + file(STRINGS "${CUSOLVERMP_VERSION_HEADER}" CUSOLVERMP_MAJOR_LINE + REGEX "^#define[ \t]+CUSOLVERMP_VER_MAJOR[ \t]+[0-9]+") + file(STRINGS "${CUSOLVERMP_VERSION_HEADER}" CUSOLVERMP_MINOR_LINE + REGEX "^#define[ \t]+CUSOLVERMP_VER_MINOR[ \t]+[0-9]+") + file(STRINGS "${CUSOLVERMP_VERSION_HEADER}" CUSOLVERMP_PATCH_LINE + REGEX "^#define[ \t]+CUSOLVERMP_VER_PATCH[ \t]+[0-9]+") + string(REGEX MATCH "([0-9]+)" CUSOLVERMP_VER_MAJOR "${CUSOLVERMP_MAJOR_LINE}") + string(REGEX MATCH "([0-9]+)" CUSOLVERMP_VER_MINOR "${CUSOLVERMP_MINOR_LINE}") + string(REGEX MATCH "([0-9]+)" CUSOLVERMP_VER_PATCH "${CUSOLVERMP_PATCH_LINE}") + if(NOT CUSOLVERMP_VER_MAJOR STREQUAL "" + AND NOT CUSOLVERMP_VER_MINOR STREQUAL "" + AND NOT CUSOLVERMP_VER_PATCH STREQUAL "") + set(CUSOLVERMP_VERSION_STR + "${CUSOLVERMP_VER_MAJOR}.${CUSOLVERMP_VER_MINOR}.${CUSOLVERMP_VER_PATCH}") + endif() + endif() + + # Check minimum version requirement (>= 0.4.0) + if(CUSOLVERMP_VERSION_STR AND CUSOLVERMP_VERSION_STR VERSION_LESS "0.4.0") + message(FATAL_ERROR + "cuSolverMp version ${CUSOLVERMP_VERSION_STR} is too old. " + "ABACUS requires cuSolverMp >= 0.4.0 (NVIDIA HPC SDK >= 23.5). " + "Please upgrade your NVIDIA HPC SDK installation." + ) + endif() + + # Auto-select communicator backend by cuSolverMp version. + # cuSolverMp < 0.7.0 -> CAL, otherwise -> NCCL. + set(_use_cal OFF) + if(CUSOLVERMP_VERSION_STR AND CUSOLVERMP_VERSION_STR VERSION_LESS "0.7.0") + set(_use_cal ON) + message(STATUS + "Detected cuSolverMp ${CUSOLVERMP_VERSION_STR} (< 0.7.0). Using CAL backend.") + elseif(CUSOLVERMP_VERSION_STR) + message(STATUS + "Detected cuSolverMp ${CUSOLVERMP_VERSION_STR} (>= 0.7.0). Using NCCL backend.") + elseif(NOT CUSOLVERMP_VERSION_STR) + message(WARNING + "Unable to detect cuSolverMp version from header. Using NCCL backend by default.") + endif() + + # Backend selection: + # - _use_cal=ON -> cal communicator backend + # - _use_cal=OFF -> NCCL communicator backend + if(_use_cal) + add_compile_definitions(__USE_CAL) + + find_library(CAL_LIBRARY NAMES cal + HINTS ${CAL_CUSOLVERMP_PATH} ${NVHPC_ROOT_DIR} + PATH_SUFFIXES lib lib64 math_libs/lib64) + find_path(CAL_INCLUDE_DIR NAMES cal.h + HINTS ${CAL_CUSOLVERMP_PATH} ${NVHPC_ROOT_DIR} + PATH_SUFFIXES include math_libs/include) + + if(NOT CAL_LIBRARY OR NOT CAL_INCLUDE_DIR) + message(FATAL_ERROR "CAL not found. Set CAL_PATH or NVHPC_ROOT_DIR.") + endif() + + message(STATUS "Found CAL: ${CAL_LIBRARY}") + if(NOT TARGET CAL::CAL) + add_library(CAL::CAL IMPORTED INTERFACE) + set_target_properties(CAL::CAL PROPERTIES + INTERFACE_LINK_LIBRARIES "${CAL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CAL_INCLUDE_DIR}") + endif() + else() + + find_library(NCCL_LIBRARY NAMES nccl + HINTS ${NCCL_PATH} ${NVHPC_ROOT_DIR} + PATH_SUFFIXES lib lib64 comm_libs/nccl/lib) + find_path(NCCL_INCLUDE_DIR NAMES nccl.h + HINTS ${NCCL_PATH} ${NVHPC_ROOT_DIR} + PATHS ${CUDA_TOOLKIT_ROOT_DIR} + PATH_SUFFIXES include comm_libs/nccl/include) + + if(NOT NCCL_LIBRARY OR NOT NCCL_INCLUDE_DIR) + message(FATAL_ERROR "NCCL not found. Set NCCL_PATH or NVHPC_ROOT_DIR.") + endif() + + message(STATUS "Found NCCL: ${NCCL_LIBRARY}") + if(NOT TARGET NCCL::NCCL) + add_library(NCCL::NCCL IMPORTED INTERFACE) + set_target_properties(NCCL::NCCL PROPERTIES + INTERFACE_LINK_LIBRARIES "${NCCL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${NCCL_INCLUDE_DIR}") + endif() + endif() + + # Create cusolverMp::cusolverMp imported target + if(NOT TARGET cusolverMp::cusolverMp) + add_library(cusolverMp::cusolverMp IMPORTED INTERFACE) + set_target_properties(cusolverMp::cusolverMp PROPERTIES + INTERFACE_LINK_LIBRARIES "${CUSOLVERMP_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CUSOLVERMP_INCLUDE_DIR}") + endif() + + # === Link libraries === + if(_use_cal) + target_link_libraries(${target_name} + CAL::CAL + cusolverMp::cusolverMp) + else() + target_link_libraries(${target_name} + NCCL::NCCL + cusolverMp::cusolverMp) + endif() +endfunction() diff --git a/cmake/Testing.cmake b/cmake/Testing.cmake new file mode 100644 index 0000000000..551b1d7182 --- /dev/null +++ b/cmake/Testing.cmake @@ -0,0 +1,83 @@ +# ============================================================================= +# Setup Testing Environment (GTest, CTest, AddTest function) +# ============================================================================== + +# include_guard(GLOBAL) + +# --- Helper Macro: Ensure a minimum C++ standard version --- +macro(set_if_higher VARIABLE VALUE) + if(${VARIABLE} LESS ${VALUE}) + set(${VARIABLE} ${VALUE}) + endif() +endmacro() + +# Add performance test in abacus +if(ENABLE_GOOGLEBENCH) + set(BUILD_TESTING ON) + find_package(benchmark HINTS ${BENCHMARK_DIR}) + if(NOT ${benchmark_FOUND}) + set(BENCHMARK_USE_BUNDLED_GTEST OFF) + include(FetchContent) + FetchContent_Declare( + benchmark + GIT_REPOSITORY https://github.com/google/benchmark.git + GIT_TAG "origin/main" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE) + set(BENCHMARK_ENABLE_TESTING OFF) + FetchContent_MakeAvailable(benchmark) + endif() +endif() + + function(AddTest) # function for UT + cmake_parse_arguments(UT "DYN" "TARGET" + "LIBS;DYN_LIBS;STATIC_LIBS;SOURCES;DEPENDS" ${ARGN}) + add_executable(${UT_TARGET} ${UT_SOURCES}) + + if(ENABLE_COVERAGE) + add_coverage(${UT_TARGET}) + endif() + + # dependencies & link library + target_link_libraries(${UT_TARGET} ${UT_LIBS} Threads::Threads + GTest::gtest_main GTest::gmock_main) + if(ENABLE_GOOGLEBENCH) + target_link_libraries( + ${UT_TARGET} benchmark::benchmark) + endif() + + if(USE_OPENMP) + target_link_libraries(${UT_TARGET} OpenMP::OpenMP_CXX) + endif() + + # Link to build info if needed + if("${UT_SOURCES}" MATCHES "parse_args.cpp") + target_include_directories(${UT_TARGET} PUBLIC ${CMAKE_BINARY_DIR}/source/source_io) + endif() + + install(TARGETS ${UT_TARGET} DESTINATION ${CMAKE_BINARY_DIR}/tests) + add_test( + NAME ${UT_TARGET} + COMMAND ${UT_TARGET} + WORKING_DIRECTORY $) + endfunction(AddTest) + +if(BUILD_TESTING) + set_if_higher(CMAKE_CXX_STANDARD 14) # Required in orbital + include(CTest) + enable_testing() + find_package(GTest HINTS /usr/local/lib/ ${GTEST_DIR}) + if(NOT ${GTest_FOUND}) + include(FetchContent) + FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG "origin/main" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE) + FetchContent_MakeAvailable(googletest) + endif() + # TODO: Try the GoogleTest module. + # https://cmake.org/cmake/help/latest/module/GoogleTest.html + add_subdirectory(tests) # Contains integration tests +endif() diff --git a/docs/CITATIONS.md b/docs/CITATIONS.md index 5f2508f82a..a25cb3e596 100644 --- a/docs/CITATIONS.md +++ b/docs/CITATIONS.md @@ -14,7 +14,7 @@ The following references are required to be cited when using ABACUS. Specificall *For LCAO and PW basis:* - Weiqing Zhou, Deye Zheng, Qianrui Liu, et al. ABACUS: An Electronic Structure Analysis Package for the AI Era. arXiv preprint arXiv:2501.08697, 2025. + Weiqing Zhou, Daye Zheng, Qianrui Liu, et al. ABACUS: An Electronic Structure Analysis Package for the AI Era. arXiv preprint arXiv:2501.08697, 2025. - **If Stochastic DFT is used:** diff --git a/docs/advanced/acceleration/cuda.md b/docs/advanced/acceleration/cuda.md index 5a468e7fb4..64d4753275 100644 --- a/docs/advanced/acceleration/cuda.md +++ b/docs/advanced/acceleration/cuda.md @@ -37,7 +37,8 @@ The ABACUS program will automatically determine whether the current ELPA support In `INPUT` file we need to set the input parameter [device](../input_files/input-main.md#device) to `gpu`. If this parameter is not set, ABACUS will try to determine if there are available GPUs. - Set `ks_solver`: For the PW basis, CG, BPCG and Davidson methods are supported on GPU; set the input parameter [ks_solver](../input_files/input-main.md#ks_solver) to `cg`, `bpcg` or `dav`. For the LCAO basis, `cusolver`, `cusolvermp` and `elpa` is supported on GPU. -- **multi-card**: ABACUS allows for multi-GPU acceleration. If you have multiple GPU cards, you can run ABACUS with several MPI processes, and each process will utilize one GPU card. For example, the command `mpirun -n 2 abacus` will by default launch two GPUs for computation. If you only have one card, this command will only start one GPU. +- **single-card**: ABACUS allows for single-GPU acceleration. You can run ABACUS without any MPI process by command `abacus`, and `ks_solver cusolver` is recommended for the LCAO basis. *note: avoid using `mpirun -n 1 abacus`*. +- **multi-cards**: ABACUS allows for multi-GPU acceleration. If you have multiple GPU cards, you can run ABACUS with several MPI processes, and each process will utilize one GPU card. For example, the command `mpirun -n 2 abacus` will by default launch two GPUs for computation. If you only have one card, this command will only start one GPU. *note: the number of MPI processes SHOULD be equal to the number of GPU cards, unless you are using MPS in your computer.* ## Examples We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/gpu) of gpu calculations. @@ -45,7 +46,7 @@ We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/devel ## Known limitations PW basis: - Only k point parallelization is supported, so the input keyword `kpar` will be set to match the number of MPI tasks automatically. -- By default, CUDA architectures 60, 70, 75, 80, 86, and 89 are compiled (if supported). It can be overriden using the CMake variable [`CMAKE_CUDA_ARCHITECTURES`](https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html) or the environmental variable [`CUDAARCHS`](https://cmake.org/cmake/help/latest/envvar/CUDAARCHS.html). +- By default, CUDA architectures are automatically selected based on the CUDA Toolkit version. For CUDA versions before 13.0, architectures 60, 70, 75, 80, 86, 89, and 90 are compiled (if supported by the CUDA version). For CUDA 13.0 and later, only architectures 75 and above are compiled, as CUDA 13 dropped support for older architectures. This can be overridden using the CMake variable [`CMAKE_CUDA_ARCHITECTURES`](https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html) or the environmental variable [`CUDAARCHS`](https://cmake.org/cmake/help/latest/envvar/CUDAARCHS.html). LCAO basis: - Unless there is a specific reason, avoid using multiple GPUs, as it can be slower than using a single GPU. This is because the generalized eigenvalue solution of the LCAO basis set will incur additional communication overhead when calculated on multiple cards. When the memory limit of a GPU card makes it insufficient to complete the task, it is recommended to use multiple cards for calculation. diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 32d4eafc53..090cc61f92 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -135,6 +135,7 @@ - [cell\_factor](#cell_factor) - [Output Variables](#variables-related-to-output-information) - [out\_freq\_ion](#out_freq_ion) + - [out\_freq\_td](#out_freq_td) - [out\_freq\_elec](#out_freq_elec) - [out\_chg](#out_chg) - [out\_pot](#out_pot) @@ -302,6 +303,9 @@ - [Exact Exchange (PW)](#exact-exchange-pw) - [exxace](#exxace) - [exx\_gamma\_extrapolation](#exx_gamma_extrapolation) + - [ecutexx](#ecutexx) + - [exx_thr_type](#exx_thr_type) + - [exx_ene_thr](#exx_ene_thr) - [Molecular Dynamics](#molecular-dynamics) - [md\_type](#md_type) - [md\_nstep](#md_nstep) @@ -532,7 +536,7 @@ These variables are used to control general system parameters. - ofdft: orbital-free density functional theory - tdofdft: time-dependent orbital-free density functional theory - sdft: [stochastic density functional theory](#electronic-structure-sdft) - - tddft: real-time time-dependent density functional theory (TDDFT) + - tddft: real-time time-dependent density functional theory (RT-TDDFT) - lj: Leonard Jones potential - dp: DeeP potential, see details in [md.md](../md.md#dpmd) - nep: Neuroevolution Potential, see details in [md.md](../md.md#nep) @@ -553,6 +557,7 @@ These variables are used to control general system parameters. - If ([dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0 or [rpa](#rpa)==True). - If [efield_flag](#efield_flag)==1 - 1: else +- **Note**: When symmetry is enabled (value 1), k-points are reduced to the irreducible Brillouin zone (IBZ). For explicit k-point lists with custom weights (see [KPT file](./kpt.md#k-point-weights-and-symmetry)), the custom weights are preserved during symmetry reduction. For Monkhorst-Pack grids, uniform weights are used. ### symmetry_prec @@ -634,8 +639,10 @@ These variables are used to control general system parameters. - **Description**: This variable is used for both plane wave set and localized orbitals set. It indicates the type of starting density. - atomic: the density is starting from the summation of the atomic density of single atoms. - - file: the density will be read in from a binary file `charge-density.dat` first. If it does not exist, the charge density will be read in from cube files. Besides, when you do `nspin=1` calculation, you only need the density file chgs1.cube. However, if you do `nspin=2` calculation, you also need the density file chgs2.cube. The density file should be output with these names if you set out_chg = 1 in INPUT file. + - file: the density will be read in from a binary file `charge-density.dat` first. If it does not exist, the charge density will be read in from cube files. When you do `nspin=1` calculation, you only need the density file `chg.cube`. For `nspin=2 or 4` calculation, you need the density file `chgs1.cube` and `chgs2.cube` (and `chgs3.cube`, `chgs4.cube` if needed). The density file should be output with these names if you set out_chg = 1 in INPUT file. - wfc: the density will be calculated by wavefunctions and occupations. Wavefunctions are read in from binary files `wf*.dat` (see [out_wfc_pw](#out_wfc_pw)) while occupations are read in from file `eig.txt`. + - dm: the density will be calculated by real space density matrix(DMR) of LCAO base. DMR is read in from file `dmrs1_nao.csr` in directory [read_file_dir](#read_file_dir). + - hr: the real space Hamiltonian matrix(HR) will be read in from file `hrs1_nao.csr` in directory [read_file_dir](#read_file_dir), and DMR and charge density will be calculated from it. - auto: Abacus first attempts to read the density from a file; if not found, it defaults to using atomic density. - **Default**: atomic @@ -1363,28 +1370,46 @@ Note: In new angle mixing, you should set `mixing_beta_mag >> mixing_beta`. The ### lspinorb - **Type**: Boolean -- **Description**: Whether to consider spin-orbital coupling effect in the calculation. - - True: Consider spin-orbital coupling effect, and `nspin` is also automatically set to 4. - - False: Do not consider spin-orbital coupling effect. +- **Description**: Whether to consider spin-orbit coupling (SOC) effect in the calculation. + - **True**: Consider spin-orbit coupling effect. When enabled: + - `nspin` is automatically set to 4 (noncollinear spin representation) + - Symmetry is automatically disabled (SOC breaks inversion symmetry) + - **Requires** full-relativistic pseudopotentials with `has_so=true` in the UPF header + - **False**: Do not consider spin-orbit coupling effect. + - **Common Error**: "no soc upf used for lspinorb calculation" - ensure you are using full-relativistic pseudopotentials + - See [Spin-polarization and SOC](../scf/spin.md#soc-effects) for detailed usage and examples - **Default**: False ### noncolin - **Type**: Boolean -- **Description**: Whether to allow non-collinear polarization, in which case the coupling between spin up and spin down will be taken into account. - - True: Allow non-collinear polarization, and `nspin` is also automatically set to 4. - - False: Do not allow non-collinear polarization. +- **Description**: Whether to allow non-collinear magnetic moments, where magnetization can point in arbitrary directions (x, y, z components) rather than being constrained to the z-axis. + - **True**: Allow non-collinear polarization. When enabled: + - `nspin` is automatically set to 4 + - Wave function dimension is doubled (`npol=2`), and the number of occupied states is doubled + - Charge density has 4 components (Pauli spin matrices: ρ_total, ρ_x, ρ_y, ρ_z) + - **Constraint**: Cannot be used with `gamma_only=true` + - Can be combined with `lspinorb=true` for SOC effects with non-collinear magnetism + - **False**: Do not allow non-collinear polarization (magnetization constrained to z-axis). + - **Relationship with lspinorb**: + - `noncolin=0, lspinorb=1`: SOC with z-axis magnetism only (for non-magnetic materials with SOC) + - `noncolin=1, lspinorb=0`: Non-collinear magnetism without SOC + - `noncolin=1, lspinorb=1`: Both non-collinear magnetism and SOC + - See [Noncollinear Spin Polarized Calculations](../scf/spin.md#noncollinear-spin-polarized-calculations) for usage examples - **Default**: False ### soc_lambda - **Type**: Real -- **Availability**: Relevant for soc calculations. -- **Description**: Sometimes, for some real materials, both scalar-relativistic and full-relativistic can not describe the exact spin-orbit coupling. Artificial modulation may help in such cases. +- **Availability**: Only works when `lspinorb=true` +- **Description**: Modulates the strength of spin-orbit coupling effect. Sometimes, for some real materials, both scalar-relativistic and full-relativistic pseudopotentials cannot describe the exact spin-orbit coupling. Artificial modulation may help in such cases. - `soc_lambda`, which has value range [0.0, 1.0] , is used for modulate SOC effect. + `soc_lambda`, which has value range [0.0, 1.0], is used to modulate SOC effect: + - `soc_lambda 0.0`: Scalar-relativistic case (no SOC) + - `soc_lambda 1.0`: Full-relativistic case (full SOC) + - Intermediate values: Partial-relativistic SOC (interpolation between scalar and full) - In particular, `soc_lambda 0.0` refers to scalar-relativistic case and `soc_lambda 1.0` refers to full-relativistic case. + **Use case**: When experimental or high-level theoretical results suggest that the SOC effect is weaker or stronger than what full-relativistic pseudopotentials predict, you can adjust this parameter to match the target behavior. - **Default**: 1.0 ### dfthalf_type @@ -1505,27 +1530,45 @@ These variables are used to control the geometry relaxation. ### relax_method - **Type**: Vector of string -- **Description**: The methods to do geometry optimization. - the first element: - - cg: using the conjugate gradient (CG) algorithm. Note that there are two implementations of the conjugate gradient (CG) method, see [relax_new](#relax_new). - - bfgs : using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm. - - lbfgs: using the Limited-memory Broyden–Fletcher–Goldfarb–Shanno (LBFGS) algorithm. - - cg_bfgs: using the CG method for the initial steps, and switching to BFGS method when the force convergence is smaller than [relax_cg_thr](#relax_cg_thr). - - sd: using the steepest descent (SD) algorithm. - - fire: the Fast Inertial Relaxation Engine method (FIRE), a kind of molecular-dynamics-based relaxation algorithm, is implemented in the molecular dynamics (MD) module. The algorithm can be used by setting [calculation](#calculation) to `md` and [md_type](#md_type) to `fire`. Also ionic velocities should be set in this case. See [fire](../md.md#fire) for more details. - - the second element: - when the first element is bfgs, if the second parameter is 1, it indicates the use of the new BFGS algorithm; if the second parameter is not 1, it indicates the use of the old BFGS algorithm. -- **Default**: cg 1 -- **Note**:In the 3.10-LTS version, the type of this parameter is std::string. It can be set to "cg","bfgs","cg_bfgs","bfgs_trad","lbfgs","sd","fire". +- **Description**: The methods to do geometry optimization. The available algorithms depend on the [relax_new](#relax_new) setting. + + **First element** (algorithm selection): + - `cg`: Conjugate gradient (CG) algorithm. Available for both `relax_new = True` (default, simultaneous optimization) and `relax_new = False` (nested optimization). See [relax_new](#relax_new) for implementation details. + - `bfgs`: Broyden–Fletcher–Goldfarb–Shanno (BFGS) quasi-Newton algorithm. **Only available when `relax_new = False`**. + - `lbfgs`: Limited-memory BFGS algorithm, suitable for large systems. **Only available when `relax_new = False`**. + - `cg_bfgs`: Mixed method starting with CG and switching to BFGS when force convergence reaches [relax_cg_thr](#relax_cg_thr). **Only available when `relax_new = False`**. + - `sd`: Steepest descent algorithm. **Only available when `relax_new = False`**. Not recommended for production use. + - `fire`: Fast Inertial Relaxation Engine method, a molecular-dynamics-based relaxation algorithm. Use by setting [calculation](#calculation) to `md` and [md_type](#md_type) to `fire`. Ionic velocities must be set in STRU file. See [fire](../md.md#fire) for details. + + **Second element** (BFGS variant, only when first element is `bfgs`): + - `1`: Traditional BFGS that updates the Hessian matrix B and then inverts it. + - `2` or omitted: Default BFGS that directly updates the inverse Hessian (recommended). + +- **Default**: `cg 1` +- **Note**: In the 3.10-LTS version, the type of this parameter is std::string. It can be set to "cg", "bfgs", "cg_bfgs", "bfgs_trad", "lbfgs", "sd", "fire". ### relax_new - **Type**: Boolean -- **Description**: At around the end of 2022 we made a new implementation of the Conjugate Gradient (CG) method for `relax` and `cell-relax` calculations. But the old implementation was also kept. - - True: use the new implementation of CG method for `relax` and `cell-relax` calculations. - - False: use the old implementation of CG method for `relax` and `cell-relax` calculations. +- **Description**: Controls which implementation of geometry relaxation to use. At the end of 2022, a new implementation of the Conjugate Gradient (CG) method was introduced for `relax` and `cell-relax` calculations, while the old implementation was kept for backward compatibility. + + - **True** (default): Use the new CG implementation with the following features: + - Simultaneous optimization of ionic positions and cell parameters (for `cell-relax`) + - Line search algorithm for step size determination + - Only CG algorithm is available (`relax_method` must be `cg`) + - Supports advanced cell constraints: `fixed_axes = "shape"`, `"volume"`, `"a"`, `"b"`, `"c"`, etc. + - Supports `fixed_ibrav` to maintain lattice type + - More efficient for variable-cell relaxation + - Step size controlled by [relax_scale_force](#relax_scale_force) + + - **False**: Use the old implementation with the following features: + - Nested optimization procedure: ionic positions optimized first, then cell parameters (for `cell-relax`) + - Multiple algorithms available: `cg`, `bfgs`, `lbfgs`, `sd`, `cg_bfgs` + - Limited cell constraints: only `fixed_axes = "volume"` is supported + - Traditional approach with separate ionic and cell optimization steps + - **Default**: True +- **Recommendation**: Use `relax_new = True` (default) for most cases, especially for `cell-relax` calculations. Use `relax_new = False` only if you need BFGS/LBFGS algorithms or for reproducing old results. ### relax_scale_force @@ -1543,7 +1586,8 @@ These variables are used to control the geometry relaxation. ### relax_cg_thr - **Type**: Real -- **Description**: When move-method is set to `cg_bfgs`, a mixed algorithm of conjugate gradient (CG) method and Broyden–Fletcher–Goldfarb–Shanno (BFGS) method is used. The ions first move according to CG method, then switched to BFGS method when the maximum of force on atoms is reduced below the CG force threshold, which is set by this parameter. +- **Availability**: Only used when `relax_new = False` and `relax_method = cg_bfgs` +- **Description**: When `relax_method` is set to `cg_bfgs`, a mixed algorithm of conjugate gradient (CG) and Broyden–Fletcher–Goldfarb–Shanno (BFGS) is used. The ions first move according to the CG method, then switch to the BFGS method when the maximum force on atoms is reduced below this threshold. - **Default**: 0.5 - **Unit**: eV/Angstrom @@ -1579,33 +1623,38 @@ These variables are used to control the geometry relaxation. ### relax_bfgs_w1 - **Type**: Real -- **Description**: Controls the Wolfe condition for Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. You can look into the paper Phys.Chem.Chem.Phys.,2000,2,2177 for more information. +- **Availability**: Only used when `relax_new = False` and `relax_method` is `bfgs` or `cg_bfgs` +- **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the sufficient decrease condition (c1 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177. - **Default**: 0.01 ### relax_bfgs_w2 - **Type**: Real -- **Description**: Controls the Wolfe condition for Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. You can look into the paper Phys.Chem.Chem.Phys.,2000,2,2177 for more information. +- **Availability**: Only used when `relax_new = False` and `relax_method` is `bfgs` or `cg_bfgs` +- **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the curvature condition (c2 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177. - **Default**: 0.5 ### relax_bfgs_rmax - **Type**: Real -- **Description**: For geometry optimization. It stands for the maximal movement of all the atoms. The sum of the movements from all atoms can be increased during the optimization steps. However, it can not be larger than `relax_bfgs_rmax` -- **Unit**: Bohr +- **Availability**: Only used when `relax_new = False` and `relax_method` is `bfgs` or `cg_bfgs` +- **Description**: Maximum allowed total displacement of all atoms during geometry optimization. The sum of atomic displacements can increase during optimization steps but cannot exceed this value. - **Default**: 0.8 +- **Unit**: Bohr ### relax_bfgs_rmin - **Type**: Real -- **Description**: For geometry optimization. It indicates the minimal movement of all the atoms. When the movement of all the atoms is smaller than relax_bfgs_rmin Bohr, and the force convergence is still not achieved, the calculation will break down. +- **Availability**: Only used when `relax_new = False` and `relax_method = bfgs 1` (traditional BFGS) +- **Description**: Minimum allowed total displacement of all atoms. When the total atomic displacement falls below this value and force convergence is not achieved, the calculation will terminate. **Note**: This parameter is not used in the default BFGS algorithm (`relax_method = bfgs 2` or `bfgs`). - **Default**: 1e-5 - **Unit**: Bohr ### relax_bfgs_init - **Type**: Real -- **Description**: For geometry optimization. It stands for the sum of initial movements of all of the atoms. +- **Availability**: Only used when `relax_new = False` and `relax_method` is `bfgs` or `cg_bfgs` +- **Description**: Initial total displacement of all atoms in the first BFGS step. This sets the scale for the initial movement. - **Default**: 0.5 - **Unit**: Bohr @@ -1634,31 +1683,38 @@ These variables are used to control the geometry relaxation. ### fixed_axes - **Type**: String -- **Availability**: Only used when `calculation` set to `cell-relax` -- **Description**: Axes that are fixed during cell relaxation. Possible choices are: - - None**: default; all of the axes can relax - - volume**: relaxation with fixed volume - - shape**: fix shape but change volume (i.e. only lattice constant changes) - - a: fix a axis during relaxation - - b: fix b axis during relaxation - - c: fix c axis during relaxation - - ab: fix both a and b axes during relaxation - - ac: fix both a and c axes during relaxation - - bc: fix both b and c axes during relaxation - -> Note : fixed_axes = "shape" and "volume" are only available for [relax_new](#relax_new) = True +- **Availability**: Only used when `calculation` is set to `cell-relax` +- **Description**: Specifies which cell degrees of freedom are fixed during variable-cell relaxation. The available options depend on the [relax_new](#relax_new) setting: + + **When `relax_new = True` (default)**, all options are available: + - `None`: Default; all cell parameters can relax freely + - `volume`: Relaxation with fixed volume (allows shape changes) + - `shape`: Fix shape but allow volume changes (hydrostatic pressure only) + - `a`: Fix the a-axis lattice vector during relaxation + - `b`: Fix the b-axis lattice vector during relaxation + - `c`: Fix the c-axis lattice vector during relaxation + - `ab`: Fix both a and b axes during relaxation + - `ac`: Fix both a and c axes during relaxation + - `bc`: Fix both b and c axes during relaxation + + **When `relax_new = False`**, all options are now available: + - `None`: Default; all cell parameters can relax freely + - `volume`: Relaxation with fixed volume (allows shape changes). Volume is preserved by rescaling the lattice after each update. + - `shape`: Fix shape but allow volume changes (hydrostatic pressure only). Stress tensor is replaced with isotropic pressure. + - `a`, `b`, `c`, `ab`, `ac`, `bc`: Fix specific lattice vectors. Gradients for fixed vectors are set to zero. - **Default**: None +- **Note**: For VASP users, see the [ISIF correspondence table](../opt.md#fixing-cell-parameters) in the geometry optimization documentation. Both implementations now support all constraint types. ### fixed_ibrav - **Type**: Boolean -- **Availability**: Must be used along with [relax_new](#relax_new) set to True, and a specific [latname](#latname) must be provided +- **Availability**: Can be used with both `relax_new = True` and `relax_new = False`. A specific [latname](#latname) must be provided. - **Description**: - - True: the lattice type will be preserved during relaxation + - True: the lattice type will be preserved during relaxation. The lattice vectors are reconstructed to match the specified Bravais lattice type after each update. - False: No restrictions are exerted during relaxation in terms of lattice type -> Note: it is possible to use `fixed_ibrav` with `fixed_axes`, but please make sure you know what you are doing. For example, if we are doing relaxation of a simple cubic lattice (`latname` = "sc"), and we use `fixed_ibrav` along with `fixed_axes` = "volume", then the cell is never allowed to move and as a result, the relaxation never converges. +> Note: it is possible to use `fixed_ibrav` with `fixed_axes`, but please make sure you know what you are doing. For example, if we are doing relaxation of a simple cubic lattice (`latname` = "sc"), and we use `fixed_ibrav` along with `fixed_axes` = "volume", then the cell is never allowed to move and as a result, the relaxation never converges. When both are used, `fixed_ibrav` is applied first, then `fixed_axes = "volume"` rescaling is applied. - **Default**: False @@ -1685,15 +1741,22 @@ These variables are used to control the output of properties. ### out_freq_ion - **Type**: Integer -- **Description**: Control the interval to print information every few ion steps. These properties cover charge density, local potential, electrostatic potential, Hamiltonian matrix, overlap matrix, density matrix, Mulliken population analysis and so on. +- **Description**: Controls the output interval in **ionic steps**. When set to a positive integer $N$, information such as charge density, local potential, electrostatic potential, Hamiltonian matrix, overlap matrix, density matrix, and Mulliken population analysis is printed every $N$ ionic steps. +- **Default**: 0 +- **Note**: In RT-TDDFT calculations, this parameter is inactive; output frequency is instead controlled by [`out_freq_td`](#out_freq_td)—see its description for details. + +### out_freq_td + +- **Type**: Integer +- **Description**: Controls the output interval in **completed electronic evolution steps** during RT-TDDFT calculations. When set to a positive integer $N$, detailed information (see [`out_freq_ion`](#out_freq_ion)) is printed every $N$ electron time-evolution steps (i.e., every $N$ `STEP OF ELECTRON EVOLVE`). For example, if you wish to output information once per ionic step, you should set `out_freq_td` equal to [`estep_per_md`](#estep_per_md), since one ionic step corresponds to [`estep_per_md`](#estep_per_md) electronic evolution steps. - **Default**: 0 -- **Note**: The integer indicates to print information every 'out_freq_ion' ion steps. +- **Note**: This parameter is **only active in RT-TDDFT mode** (`esolver_type = tddft`). It has no effect in ground-state calculations. ### out_freq_elec - **Type**: Integer -- **Description**: Output the charge density (only binary format, controlled by [out_chg](#out_chg)), wavefunction (controlled by [out_wfc_pw](#out_wfc_pw)) per `out_freq_elec` electronic iterations. Note that they are always output when converged or reach the maximum iterations [scf_nmax](#scf_nmax). -- **Default**: [scf_nmax](#scf_nmax) +- **Description**: Output the charge density (only binary format, controlled by [`out_chg`](#out_chg)), wavefunction (controlled by [`out_wfc_pw`](#out_wfc_pw)) per `out_freq_elec` electronic iterations. Note that they are always output when converged or reach the maximum iterations [`scf_nmax`](#scf_nmax). +- **Default**: [`scf_nmax`](#scf_nmax) ### out_chg @@ -2070,10 +2133,12 @@ These variables are used to control the output of properties. - **Availability**: Only for Kohn-Sham DFT and Orbital Free DFT. - **Description**: Whether to output the electron localization function (ELF) in the folder `OUT.${suffix}`. The files are named as - nspin = 1: - - ELF.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i}|^2} - \frac{|\nabla\rho|^2}{8\rho}}{\frac{3}{10}(3\pi^2)^{2/3}\rho^{5/3}}$; + - elf.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i}|^2} - \frac{|\nabla\rho|^2}{8\rho}}{\frac{3}{10}(3\pi^2)^{2/3}\rho^{5/3}}$; - nspin = 2: - - ELF_SPIN1.cube, ELF_SPIN2.cube: ${\rm{ELF}}_\sigma = \frac{1}{1+\chi_\sigma^2}$, $\chi_\sigma = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i,\sigma}|^2} - \frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}$; - - ELF.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i,\sigma}{f_i |\nabla\psi_{i,\sigma}|^2} - \sum_{\sigma}{\frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}}{\sum_{\sigma}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}}$; + - elf1.cube, elf2.cube: ${\rm{ELF}}_\sigma = \frac{1}{1+\chi_\sigma^2}$, $\chi_\sigma = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i,\sigma}|^2} - \frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}$; + - elf.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i,\sigma}{f_i |\nabla\psi_{i,\sigma}|^2} - \sum_{\sigma}{\frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}}{\sum_{\sigma}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}}$; + - nspin = 4 (noncollinear): + - elf.cube: ELF for total charge density, ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i}|^2} - \frac{|\nabla\rho|^2}{8\rho}}{\frac{3}{10}(3\pi^2)^{2/3}\rho^{5/3}}$ The second integer controls the precision of the kinetic energy density output, if not given, will use `3` as default. For purpose restarting from this file and other high-precision involved calculation, recommend to use `10`. @@ -2968,6 +3033,12 @@ These variables are relevant when using hybrid functionals with *[basis_type](#b - **Description**: See also the entry [exx_pca_threshold](#exx_pca_threshold). Smaller components (less than exx_c_threshold) of the $C^{a}_{ik}$ matrix are neglected to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 1e-4. - **Default**: 1E-4 +### exx_cs_inv_thr + +- **Type**: Real +- **Description**: By default, the Coulomb matrix inversion required for obtaining LRI coefficients is performed using LU decomposition. However, this approach may suffer from numerical instabilities when a large set of auxiliary basis functions (ABFs) is employed. When `exx_cs_inv_thr > 0`, the inversion is instead carried out via matrix diagonalization. Eigenvalues smaller than `exx_cs_inv_thr` are discarded to improve numerical stability. A relatively safe and commonly recommended value is `1e-5`. +- **Default**: -1 + ### exx_v_threshold - **Type**: Real @@ -3013,7 +3084,7 @@ These variables are relevant when using hybrid functionals with *[basis_type](#b ### exx_ccp_rmesh_times - **Type**: Real -- **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. The value should be at least 1. Reducing this value can effectively increase the speed of self-consistent calculations using hybrid functionals. +- **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. The value should be larger than 0. Reducing this value can effectively increase the speed of self-consistent calculations using hybrid functionals. - **Default**: - 5: if *[dft_functional](#dft_functional)==hf/pbe0/scan0/muller/power/wp22* - 1.5: if *[dft_functional](#dft_functional)==hse/cwp22* @@ -3101,6 +3172,26 @@ These variables are relevant when using hybrid functionals with *[basis_type](#b - **Description**: Whether to use the gamma point extrapolation method to calculate the Fock exchange operator. See [https://doi.org/10.1103/PhysRevB.79.205114](https://doi.org/10.1103/PhysRevB.79.205114) for details. Should be set to true most of the time. - **Default**: True +### ecutexx +- **Type**: Real +- **Description**: The energy cutoff for EXX (Fock) exchange operator in plane wave basis calculations. Reducing `ecutexx` below `ecutrho` may significantly accelerate EXX computations. This speed improvement comes with a reduced numerical accuracy in the exchange energy calculation. +- **Default**: same as *[ecutrho](#ecutrho)* +- **Unit**: Ry + +### exx_thr_type +- **Type**: String +- **Description**: The type of threshold used to judge whether the outer loop has converged in the separate loop EXX calculation. + - energy: use the change of exact exchange energy to judge convergence. + - density: if the change of charge density difference between two successive outer loop iterations is seen as converged according to *[scf_thr](#scf_thr)*, then the outer loop is seen as converged. +- **Default**: `density` + +### exx_ene_thr +- **Type**: Real +- **Availability**: *[exx_thr_type](#exx_thr_type)*==`energy` +- **Description**: The threshold for the change of exact exchange energy to judge convergence of the outer loop in the separate loop EXX calculation. +- **Default**: 1e-5 +- **Unit**: Ry + ## Molecular dynamics These variables are used to control molecular dynamics calculations. For more information, please refer to [md.md](../md.md#molecular-dynamics) in detail. @@ -3162,14 +3253,14 @@ These variables are used to control molecular dynamics calculations. For more in - **Type**: Boolean - **Description**: Control whether to restart molecular dynamics calculations and time-dependent density functional theory calculations. - - True: ABACUS will read in `${read_file_dir}/Restart_md.dat` to determine the current step `${md_step}`, then read in the corresponding `STRU_MD_${md_step}` in the folder `OUT.$suffix/STRU/` automatically. For tddft, ABACUS will also read in `WFC_NAO_K${kpoint}` of the last step (You need to set out_wfc_lcao=1 and out_app_flag=0 to obtain this file). + - True: ABACUS will read in `${read_file_dir}/Restart_md.txt` to determine the current step `${md_step}`, then read in the corresponding `STRU_MD_${md_step}` in the folder `OUT.$suffix/STRU/` automatically. For tddft, ABACUS will also read in `WFC_NAO_K${kpoint}` of the last step (You need to set out_wfc_lcao=1 and out_app_flag=0 to obtain this file). - False: ABACUS will start molecular dynamics calculations normally from the first step. - **Default**: False ### md_restartfreq - **Type**: Integer -- **Description**: The output frequency of `OUT.${suffix}/Restart_md.dat` and structural files in the directory `OUT.${suffix}/STRIU/`, which are used to restart molecular dynamics calculations, see [md_restart](#md_restart) in detail. +- **Description**: The output frequency of `OUT.${suffix}/Restart_md.txt` and structural files in the directory `OUT.${suffix}/STRIU/`, which are used to restart molecular dynamics calculations, see [md_restart](#md_restart) in detail. - **Default**: 5 ### md_dumpfreq @@ -3414,8 +3505,9 @@ These variables are used to control molecular dynamics calculations. For more in ### cal_syns - **Type**: Boolean -- **Description**: Whether the asynchronous overlap matrix is calculated for Hefei-NAMD. +- **Description**: Whether to calculate and output asynchronous overlap matrix for Hefei-NAMD interface. When enabled, calculates `` by computing overlap between basis functions at atomic positions from previous time step and current time step. The overlap is calculated by shifting atom positions backward by `velocity × md_dt`. Output file: `OUT.*/syns_nao.csr` in CSR format. - **Default**: False +- **Note**: Only works with LCAO basis and molecular dynamics calculations. Requires atomic velocities. Output starts from the second MD step (istep > 0). ### dmax @@ -3859,10 +3951,13 @@ These variables are used to control berry phase and wannier90 interface paramete - **Description**: Type of electric field in the time domain. - 0: Gaussian type function: + $$ E(t) = A \cos\left[2\pi f(t-t_0)+\varphi\right]\exp\left[-\frac{(t-t_0)^2}{2\sigma^2}\right] $$ + - 1: Trapezoid function: + $$ E(t) = \begin{cases} @@ -3872,11 +3967,15 @@ These variables are used to control berry phase and wannier90 interface paramete 0, & t \geqslant t_3 \end{cases} $$ + - 2: Trigonometric function: + $$ E(t) = A \cos(2\pi f_1 t + \varphi_1) \sin^2(2\pi f_2 t + \varphi_2) $$ + - 3: Heaviside step function: + $$ E(t) = \begin{cases} @@ -3884,6 +3983,7 @@ These variables are used to control berry phase and wannier90 interface paramete 0, & t \geqslant t_0 \end{cases} $$ + - **Default**: 0 ### td_tstart @@ -4067,11 +4167,12 @@ These variables are used to control berry phase and wannier90 interface paramete ### out_current -- **Type**: Boolean +- **Type**: Integer - **Description**: - - True: Output current. - - False: Do not output current. -- **Default**: False + - 0: Do not output current. + - 1: Output current using the two-center integral, faster. + - 2: Output current using the matrix commutation, more precise. +- **Default**: 0 ### out_current_k diff --git a/docs/advanced/input_files/kpt.md b/docs/advanced/input_files/kpt.md index 853a3dc340..1aac138fd0 100644 --- a/docs/advanced/input_files/kpt.md +++ b/docs/advanced/input_files/kpt.md @@ -58,6 +58,40 @@ Direct //`Direct' or `Cartesian' coordinate 0.5 0.5 0.5 0.125 ``` +### K-point Weights and Symmetry + +When explicitly setting k-points, you can specify custom weights for each k-point. These weights determine the contribution of each k-point to the total energy and density calculations. + +**Important notes about k-point weights:** + +1. **Custom weights are preserved**: When using explicit k-point lists (non-Monkhorst-Pack), ABACUS preserves the custom weights you specify, even when symmetry operations are applied to reduce the k-points to the irreducible Brillouin zone (IBZ). + +2. **Symmetry reduction**: When [`symmetry`](./input-main.md#symmetry) is set to 1, ABACUS will analyze the crystal symmetry and reduce the k-point set to the irreducible Brillouin zone. During this reduction: + - For **Monkhorst-Pack grids** (automatically generated): All k-points have uniform weights (1/N where N is the total number of k-points) + - For **explicit k-point lists**: Custom weights are preserved and properly combined when symmetry-equivalent k-points are merged + +3. **Weight normalization**: After symmetry reduction, k-point weights are normalized so that their sum equals `degspin` (2 for non-spin-polarized calculations, 1 for spin-polarized calculations). + +**Example with custom weights:** + +``` +K_POINTS +5 +Direct +0.0 0.0 0.0 0.1 // Gamma point with weight 0.1 +0.5 0.0 0.0 0.2 // X point with weight 0.2 +0.0 0.5 0.0 0.3 // Y point with weight 0.3 +0.5 0.5 0.0 0.2 // M point with weight 0.2 +0.0 0.0 0.5 0.2 // Z point with weight 0.2 +``` + +In this example, different k-points have different weights, which might be useful for: +- Special sampling schemes +- Convergence testing with specific k-point importance +- Custom integration methods + +> **Note**: When using custom weights with symmetry, ensure that your weight distribution is consistent with the crystal symmetry. ABACUS will preserve your weights during IBZ reduction, but inconsistent weights may lead to unexpected results. + [back to top](#the-kpt-file) ## Band structure calculations diff --git a/docs/advanced/input_files/stru.md b/docs/advanced/input_files/stru.md index dff5ae3020..a30064351a 100644 --- a/docs/advanced/input_files/stru.md +++ b/docs/advanced/input_files/stru.md @@ -99,6 +99,7 @@ information that comes below. 2. [SG15-ONCV](http://quantum-simulation.org/potentials/sg15_oncv/upf/). 3. [DOJO](http://www.pseudo-dojo.org/). 4. [BLPS](https://github.com/PrincetonUniversity/BLPSLibrary). + 5. For additional pseudopotential options and to view the basic benchmark test results of these pseudopotentials in ABACUS, please refer to the [Benchmarks website](https://kirk0830.github.io/ABACUS-Pseudopot-Nao-Square/pseudopotential/pseudopotential.html) ### NUMERICAL_ORBITAL @@ -110,6 +111,9 @@ information that comes below. ‘Si_gga_8au_60Ry_2s2p1d.orb’ is name of the numerical orbital file. Again here the path is not specified, which means that this file is located in the work directory. Numerical atomic orbitals may be downloaded from the [official website](http://abacus.ustc.edu.cn/pseudo/list.htm). + Recommendation for Pseudopotential and Orbital Sets +For general usage requirements, the APNSv1.0 pseudopotential and orbital set is recommended. You can access it via [AIS square website](https://www.aissquare.com/datasets/detail?pageType=datasets&name=ABACUS-APNS-PPORBs-v1%253Apre-release&id=326) + ### LATTICE_CONSTANT The lattice constant of the system in unit of Bohr. @@ -248,7 +252,7 @@ information that comes below. Several other parameters could be defined after the atom position using key words : - `m` or NO key word: three numbers, which take value in 0 or 1, control how the atom move in geometry relaxation calculations. In example below, the numbers `0 0 0` following the coordinates of the first atom means this atom are *not allowed* to move in all three directions, and the numbers `1 1 1` following the coordinates of the second atom means this atom *can* move in all three directions. - - `v` or `vel` or `velocity`: set the three components of initial velocity of atoms in geometry relaxation calculations(e. g. `v 1.0 1.0 1.0`). + - `v` or `vel` or `velocity`: set the three components of initial velocity of atoms, used only for restarting MD calculations (e.g., `v 1.0 1.0 1.0`). - `mag` or `magmom` : set the start magnetization for each atom. In colinear case only one number should be given. In non-colinear case one have two choice:either set one number for the norm of magnetization here and specify two polar angle later(e. g. see below), or set three number for the xyz commponent of magnetization here (e. g. `mag 0.0 0.0 1.0`). Note that if this parameter is set, the initial magnetic moment setting in the second line will be overrided. - `angle1`: in non-colinear case, specify the angle between z-axis and real spin, in angle measure instead of radian measure - `angle2`: in non-colinear case, specify angle between x-axis and real spin in projection in xy-plane , in angle measure instead of radian measure @@ -305,4 +309,35 @@ information that comes below. 0.0 0.0 0.0 m 0 0 0 mag 1 1 1 0.5 0.5 0.5 m 1 1 1 mag 1 1 1 ``` - However, this autoset will not be vaild once `STRU` specalize a finite magnetic for any single atom. \ No newline at end of file + However, this autoset will not be vaild once `STRU` specalize a finite magnetic for any single atom. + + - `lambda`: Lagrange multiplier vector for spin constraint method. Can specify one value (z-component) or three values for x, y, z components (e.g., `lambda 0.5` or `lambda 0.1 0.2 0.3`). Values are in eV and will be converted to Rydberg internally. Used with spin-constrained DFT (enable with `sc_mag_switch` in INPUT file). + + - `sc`: set the spin constraint target magnetization for each atom. Can specify one value (z-component) or three values for x, y, z components (e.g., `sc 1.0` or `sc 0.5 0.5 1.0`). Used with spin-constrained DFT (enable with `sc_mag_switch` in INPUT file). + +### Important Notes for ATOMIC_POSITIONS + +1. **Coordinate System Selection**: Choose the appropriate coordinate system based on your needs: + - Use `Direct` for fractional coordinates (most common for periodic systems) + - Use `Cartesian_angstrom` when working with molecular structures or experimental data + - Use centered coordinate systems (`Cartesian_angstrom_center_xy/xz/yz/xyz`) for surface or slab calculations where you want to center the structure + +2. **Magnetization Settings**: + - For collinear calculations (`nspin=2`), only specify one magnetization value per atom + - For non-collinear calculations (`nspin=4`), you can specify: + - Three components directly: `mag 1.0 0.0 0.0` (mx, my, mz) + - Magnitude with angles: `mag 1.0 angle1 90 angle2 0` (magnitude, polar angle, azimuthal angle) + - If no magnetization is specified for any atom, ABACUS will automatically set default values (1.0 for nspin=2, or (1,1,1) for nspin=4) + +3. **Movement Constraints**: + - Use `m 1 1 1` to allow the atom to move freely in all directions during relaxation + - Use `m 0 0 0` to fix the atom completely + - Use `m 1 0 1` to allow movement only in x and z directions (useful for constraining surface atoms) + +4. **Keyword Order**: The optional keywords (m, v, mag, angle1, angle2, lambda, sc) can appear in any order after the atomic coordinates, but each keyword should only appear once per atom. + +5. **Common Mistakes to Avoid**: + - Don't mix Direct and Cartesian coordinates in the same STRU file + - Ensure the number of atoms specified matches the actual number of coordinate lines provided + - When using vector magnetization (`mag x y z`), don't also specify angles for the same atom + - Remember that angles are in degrees, not radians \ No newline at end of file diff --git a/docs/advanced/interface/index.rst b/docs/advanced/interface/index.rst index 99d656885f..6622e821b7 100644 --- a/docs/advanced/interface/index.rst +++ b/docs/advanced/interface/index.rst @@ -6,6 +6,7 @@ Interfaces to Other Softwares :maxdepth: 1 :caption: Examples + pyabacus deepks dpgen deeph diff --git a/docs/advanced/interface/pyabacus.md b/docs/advanced/interface/pyabacus.md new file mode 100644 index 0000000000..ffe32d4350 --- /dev/null +++ b/docs/advanced/interface/pyabacus.md @@ -0,0 +1,313 @@ +# PyABACUS + +PyABACUS is the official Python interface for ABACUS, providing a convenient way to run DFT calculations directly from Python scripts. + +## Installation + +### From Source (Recommended) + +```bash +cd /path/to/abacus-develop/python/pyabacus +pip install -e . +``` + +### With C++ Driver Support + +For full functionality including direct library calls (faster than subprocess), build ABACUS with Python bindings: + +```bash +cmake -B build -DENABLE_PYABACUS=ON -DENABLE_LCAO=ON +cmake --build build -j8 +pip install -e python/pyabacus +``` + +**Note:** The `pyabacus` package on PyPI is a different project and is NOT related to ABACUS. Please install from source as shown above. + +## Quick Start + +### Basic SCF Calculation + +```python +import pyabacus + +# Run calculation from a directory containing INPUT, STRU, KPT files +result = pyabacus.abacus("./Si_scf/") + +# Check results +print(f"Converged: {result.converged}") +print(f"Total energy: {result.etot_ev:.6f} eV") +print(result.summary()) +``` + +### Calculate Forces and Stress + +```python +result = pyabacus.abacus( + "./Si_relax/", + calculate_force=True, + calculate_stress=True, +) + +# Access forces (in eV/Angstrom) +if result.has_forces: + forces = result.forces_ev_ang + print(f"Max force: {forces.max():.6f} eV/Ang") + +# Access stress tensor (in kbar) +if result.has_stress: + print(f"Stress tensor:\n{result.stress}") +``` + +### Parallel Calculation + +```python +# Run with MPI and OpenMP parallelization +result = pyabacus.abacus( + "./Si_scf/", + nprocs=4, # 4 MPI processes (mpirun -np 4) + nthreads=2, # 2 OpenMP threads (OMP_NUM_THREADS=2) +) +``` + +This is equivalent to running: +```bash +OMP_NUM_THREADS=2 mpirun -np 4 abacus +``` + +### Silent Mode + +```python +# Run without output +result = pyabacus.abacus("./Si_scf/", verbosity=0) +``` + +## API Reference + +### `pyabacus.abacus()` + +Main function for running ABACUS calculations. + +```python +def abacus( + input_dir: str = None, + *, + input_file: str = None, + stru_file: str = None, + kpt_file: str = None, + pseudo_dir: str = None, + orbital_dir: str = None, + output_dir: str = None, + calculate_force: bool = True, + calculate_stress: bool = False, + verbosity: int = 1, + nprocs: int = 1, + nthreads: int = 1, +) -> CalculationResult +``` + +**Parameters:** + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `input_dir` | str | `"."` | Directory containing INPUT, STRU, KPT files | +| `input_file` | str | None | Explicit path to INPUT file | +| `stru_file` | str | None | Explicit path to STRU file | +| `kpt_file` | str | None | Explicit path to KPT file | +| `pseudo_dir` | str | None | Directory containing pseudopotentials | +| `orbital_dir` | str | None | Directory containing orbital files (LCAO) | +| `output_dir` | str | `"OUT.PYABACUS"` | Directory for output files | +| `calculate_force` | bool | True | Whether to calculate forces | +| `calculate_stress` | bool | False | Whether to calculate stress tensor | +| `verbosity` | int | 1 | Output level (0=silent, 1=normal, 2=verbose) | +| `nprocs` | int | 1 | Number of MPI processes | +| `nthreads` | int | 1 | Number of OpenMP threads | + +**Returns:** `CalculationResult` object + +### `CalculationResult` + +Container for calculation results. + +**Attributes:** + +| Attribute | Type | Description | +|-----------|------|-------------| +| `converged` | bool | Whether SCF converged | +| `niter` | int | Number of SCF iterations | +| `drho` | float | Final charge density difference | +| `etot` | float | Total energy (Ry) | +| `etot_ev` | float | Total energy (eV) | +| `forces` | ndarray | Forces on atoms (nat, 3) in Ry/Bohr | +| `forces_ev_ang` | ndarray | Forces in eV/Angstrom | +| `stress` | ndarray | Stress tensor (3, 3) in kbar | +| `fermi_energy` | float | Fermi energy (eV) | +| `bandgap` | float | Band gap (eV) | +| `nat` | int | Number of atoms | +| `ntype` | int | Number of atom types | +| `nbands` | int | Number of bands | +| `nks` | int | Number of k-points | +| `output_dir` | str | Path to output directory (OUT.$suffix) | +| `log_file` | str | Path to the main log file | +| `output_files` | dict | Dictionary of output files (filename -> path) | + +**Methods:** + +| Method | Description | +|--------|-------------| +| `summary()` | Return a formatted summary string | +| `energies` | Dictionary of all energy components | +| `has_forces` | Whether forces are available | +| `has_stress` | Whether stress is available | +| `has_output_dir` | Whether output directory exists | +| `get_output_file(name)` | Get full path to specific output file | +| `list_output_files()` | List all output file names | + +## Output File Tracking + +PyABACUS automatically tracks output files generated during calculations: + +```python +result = pyabacus.abacus("./Si_scf/") + +# Check output directory +print(f"Output directory: {result.output_dir}") +print(f"Log file: {result.log_file}") + +# List all output files +print("Output files:") +for filename in result.list_output_files(): + print(f" {filename}") + +# Get path to specific file +bands_file = result.get_output_file("BANDS_1.dat") +if bands_file: + # Read and process band structure data + import numpy as np + bands = np.loadtxt(bands_file) +``` + +### Common Output Files + +| File | Description | +|------|-------------| +| `running_scf.log` | Main calculation log | +| `BANDS_1.dat` | Band structure data | +| `PDOS` | Projected density of states | +| `CHARGE.cube` | Charge density in cube format | +| `SPIN1_CHG.cube` | Spin-up charge density | +| `SPIN2_CHG.cube` | Spin-down charge density | +| `istate.info` | Band eigenvalues and occupations | +| `kpoints` | K-point information | + +## Convenience Functions + +### `run_scf()` + +Alias for `abacus()` with default SCF parameters: + +```python +result = pyabacus.run_scf("./Si_scf/") +``` + +### `run_relax()` + +Alias for `abacus()` with force calculation enabled: + +```python +result = pyabacus.run_relax("./Si_relax/") +``` + +## Examples + +### Energy vs. Lattice Constant + +```python +import pyabacus +import numpy as np + +lattice_constants = np.linspace(5.0, 5.5, 11) +energies = [] + +for a in lattice_constants: + # Modify STRU file with new lattice constant + # ... (file modification code) + + result = pyabacus.abacus("./Si_eos/", verbosity=0) + energies.append(result.etot_ev) + +# Plot equation of state +import matplotlib.pyplot as plt +plt.plot(lattice_constants, energies, 'o-') +plt.xlabel("Lattice constant (Ang)") +plt.ylabel("Energy (eV)") +plt.savefig("eos.png") +``` + +### Parallel Batch Calculations + +```python +import pyabacus +from pathlib import Path + +# Run calculations for multiple systems with parallelization +systems = ["Si", "Ge", "C"] +results = {} + +for system in systems: + input_dir = Path(f"./{system}_scf/") + if input_dir.exists(): + result = pyabacus.abacus( + str(input_dir), + nprocs=4, + nthreads=2, + ) + results[system] = { + "energy": result.etot_ev, + "converged": result.converged, + "bandgap": result.bandgap, + } + +# Print summary +for system, data in results.items(): + print(f"{system}: E={data['energy']:.4f} eV, gap={data['bandgap']:.2f} eV") +``` + +## Troubleshooting + +### ABACUS executable not found + +If you see "ABACUS executable not found", ensure: +1. ABACUS is installed and in your PATH +2. Or build with C++ driver support (see Installation) + +### MPI not found + +If you see "mpirun/mpiexec not found" when using `nprocs > 1`: +1. Install MPI (OpenMPI or MPICH) +2. Ensure `mpirun` or `mpiexec` is in your PATH +3. Or set `nprocs=1` to run without MPI + +### Import errors + +If `import pyabacus` fails: +1. Ensure pyabacus is installed: `pip install pyabacus` +2. Check Python version compatibility (Python 3.8+) + +### Calculation not converging + +Check the log file for details: +```python +result = pyabacus.abacus("./problem_case/") +if not result.converged: + log_path = result.get_output_file("running_scf.log") + if log_path: + with open(log_path) as f: + print(f.read()[-2000:]) # Print last 2000 chars +``` + +### Forces or stress not available + +Forces and stress are parsed from the ABACUS output log. Ensure: +1. `cal_force` is set in your INPUT file for forces +2. `cal_stress` is set in your INPUT file for stress +3. The calculation completed successfully diff --git a/docs/advanced/opt.md b/docs/advanced/opt.md index 9c2023b655..4f0bdf32a0 100644 --- a/docs/advanced/opt.md +++ b/docs/advanced/opt.md @@ -2,41 +2,76 @@ By setting `calculation` to be `relax` or `cell-relax`, ABACUS supports structural relaxation and variable-cell relaxation. -Current implementation of variable-cell relaxation in ABACUS now follows a nested procedure: fixed cell structural relaxation will be performed, followed by an update of the cell parameters, and the process is repeated until convergence is achieved. +ABACUS provides two implementations for variable-cell relaxation, controlled by the [relax_new](./input_files/input-main.md#relax_new) parameter: -An example of the variable cell relaxation can be found in our [repository](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/relax/pw_al), which is provided with the reference output file log.ref. Note that in log.ref, each ionic step is labelled in the following manner: +- **New implementation** (`relax_new = True`, default since v3.8): Uses a simultaneous conjugate gradient (CG) optimization for both ionic positions and cell parameters. Both degrees of freedom are optimized together in each step. + +- **Old implementation** (`relax_new = False`): Follows a nested procedure where fixed-cell structural relaxation is performed first, followed by an update of the cell parameters, and the process is repeated until convergence is achieved. + +An example of the variable cell relaxation can be found in our [repository](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/relax/pw_al), which is provided with the reference output file log.ref. When using the old implementation (`relax_new = False`), each ionic step is labelled in the following manner: ``` ------------------------------------------- RELAX CELL : 3 RELAX IONS : 1 (in total: 15) ------------------------------------------- -``` +``` indicating that this is the first ionic step of the 3rd cell configuration, and it is the 15-th ionic step in total. ## Optimization Algorithms -In the nested procedure mentioned above, we used CG method to perform cell relaxation, while offering four different algorithms for doing fixed-cell structural relaxation: BFGS, SD(steepest descent), CG(conjugate gradient), as well as a mixed CG-BFGS method. The optimziation algorithm can be selected using keyword [relax_method](./input_files/input-main.md#relax_method). We also provide a [list of keywords](./input_files/input-main.md#geometry-relaxation) for controlling the relaxation process. + +ABACUS offers multiple optimization algorithms for structural relaxation, which can be selected using the [relax_method](./input_files/input-main.md#relax_method) keyword. The available algorithms and their behavior depend on the [relax_new](./input_files/input-main.md#relax_new) setting: + +### Algorithm Availability + +**New implementation** (`relax_new = True`, default): +- **CG (Conjugate Gradient)**: Simultaneous optimization of both ionic positions and cell parameters using CG with line search. This is the only algorithm available for the new implementation. + +**Old implementation** (`relax_new = False`): +- **CG (Conjugate Gradient)**: For ionic relaxation; CG is also used for cell parameter optimization in the nested procedure +- **BFGS**: Quasi-Newton method for ionic relaxation +- **LBFGS**: Limited-memory BFGS for ionic relaxation +- **SD (Steepest Descent)**: Simple gradient descent for ionic relaxation +- **CG-BFGS**: Mixed method that starts with CG and switches to BFGS when force convergence reaches the threshold set by [relax_cg_thr](./input_files/input-main.md#relax_cg_thr) + +We also provide a [list of keywords](./input_files/input-main.md#geometry-relaxation) for controlling the relaxation process. ### BFGS method -The [BFGS method](https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm) is a quasi-Newton method for solving nonlinear optimization problem. It belongs to the class of quasi-Newton method where the Hessian matrix is approximated during the optimization process. If the initial point is not far from the extrema, BFGS tends to work better than gradient-based methods. +The [BFGS method](https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm) is a quasi-Newton method for solving nonlinear optimization problems. It belongs to the class of quasi-Newton methods where the Hessian matrix is approximated during the optimization process. If the initial point is not far from the extrema, BFGS tends to work better than gradient-based methods. + +**Note**: BFGS is only available with the old implementation (`relax_new = False`). + +ABACUS provides two BFGS implementations, controlled by the second element of [relax_method](./input_files/input-main.md#relax_method): + +- **Default BFGS** (`relax_method = bfgs 2` or `relax_method = bfgs`): Updates the inverse of the approximate Hessian matrix B directly. This is the recommended implementation. -There is an alternative traditional BFGS method, which can be called by using the keyword 'bfgs_trad'. The bfgs_trad method is a quasi-Newton method that substitute an approximate matrix B for the Hessian matrix. The main difference between 'bfgs' and 'bfgs_trad' is that 'bfgs' updates the inverse of matrix B while 'bfgs_trad' updates matrix B and obtains the inverse of B by solving the matrix eigenvalues and taking the reciprocal of the eigenvalues. Both methods are mathematically equivalent, but in some cases, 'bfgs_trad' performs better. +- **Traditional BFGS** (`relax_method = bfgs 1`): Updates the approximate Hessian matrix B itself, then obtains the inverse by solving matrix eigenvalues and taking their reciprocals. Both methods are mathematically equivalent, but in some cases the traditional variant may perform better. -In ABACUS, we implemented the BFGS method for doing fixed-cell structural relaxation. Users can choose which implementation of BFGS to call by adding the 'bfgs_trad' or 'bfgs' parameter. +### LBFGS method + +The [L-BFGS (Limited-memory BFGS)](https://en.wikipedia.org/wiki/Limited-memory_BFGS) method is a memory-efficient variant of BFGS that stores only a few vectors representing the Hessian approximation instead of the full matrix. This makes it particularly suitable for large systems with many atoms. + +**Note**: LBFGS is only available with the old implementation (`relax_new = False`). Set `relax_method = lbfgs` to use this method. ### SD method -The [SD (steepest descent) method](https://en.wikipedia.org/wiki/Gradient_descent) is one of the simplest first-order optimization methods, where in each step the motion is along the direction of the gradient, where the function descents the fastest. +The [SD (steepest descent) method](https://en.wikipedia.org/wiki/Gradient_descent) is one of the simplest first-order optimization methods, where in each step the motion is along the direction of the gradient, where the function descends the fastest. + +**Note**: SD is only available with the old implementation (`relax_new = False`). -In practice, SD method may take many iterations to converge, and is generally not used. +In practice, the SD method may take many iterations to converge, and is generally not recommended for production calculations. ### CG method The [CG (conjugate gradient) method](https://en.wikipedia.org/wiki/Conjugate_gradient_method) is one of the most widely used methods for solving optimization problems. -In ABACUS, we implemented the CG method for doing fixed-cell structural relaxation as well as the optimization of cell parameters. +ABACUS provides two implementations of the CG method: + +- **New CG implementation** (`relax_new = True`, default): Performs simultaneous optimization of both ionic positions and cell parameters using a line search algorithm. This implementation is more efficient for `cell-relax` calculations as it optimizes all degrees of freedom together. The step size can be controlled by [relax_scale_force](./input_files/input-main.md#relax_scale_force). + +- **Old CG implementation** (`relax_new = False`): Uses a nested procedure where ionic positions are optimized first using CG, followed by cell parameter optimization (also using CG) in `cell-relax` calculations. This is the traditional approach where the two optimization steps are separated. ## Constrained Optimization @@ -71,7 +106,26 @@ then the first Al atom will not be allowed to move in z direction. Fixing atomic position is sometimes helpful during relaxation of isolated molecule/cluster, to prevent the system from drifting in space. ### Fixing Cell Parameters -Sometimes we want to do variable-cell relaxation with some of the cell degrees of freedom fixed. This is achieved by keywords such as [fixed_axes](./input_files/input-main.md#fixed_axes), [fixed_ibrav](./input_files/input-main.md#fixed_ibrav) and [fixed_atoms](./input_files/input-main.md#fixed_atoms). Specifically, if users are familiar with the `ISIF` option from VASP, then we offer the following correspondence: + +Sometimes we want to do variable-cell relaxation with some of the cell degrees of freedom fixed. This is achieved by keywords such as [fixed_axes](./input_files/input-main.md#fixed_axes), [fixed_ibrav](./input_files/input-main.md#fixed_ibrav) and [fixed_atoms](./input_files/input-main.md#fixed_atoms). + +**Available constraints by implementation:** + +- **New implementation** (`relax_new = True`): + - `fixed_axes = "shape"`: Only allows volume changes (hydrostatic pressure), cell shape is fixed + - `fixed_axes = "volume"`: Allows shape changes but keeps volume constant + - `fixed_axes = "a"`, `"b"`, `"c"`, etc.: Fix specific lattice vectors or combinations + - `fixed_ibrav = True`: Maintain the Bravais lattice type during relaxation + +- **Old implementation** (`relax_new = False`): + - **All `fixed_axes` options now supported**: "shape", "volume", "a", "b", "c", "ab", "ac", "bc", "abc" + - **`fixed_ibrav` now supported**: Maintains Bravais lattice type during relaxation + - Can combine `fixed_axes` with `fixed_ibrav` for constrained relaxation + - **Implementation approach**: Uses post-update constraint enforcement (volume rescaling and lattice reconstruction after each CG step) + +**VASP ISIF correspondence:** + +If you are familiar with the `ISIF` option from VASP, here is the correspondence: - ISIF = 0 : calculation = "relax" - ISIF = 1, 2 : calculation = "relax", cal_stress = 1 @@ -79,7 +133,7 @@ Sometimes we want to do variable-cell relaxation with some of the cell degrees o - ISIF = 4 : calculation = "cell-relax", fixed_axes = "volume" - ISIF = 5 : calculation = "cell-relax", fixed_axes = "volume", fixed_atoms = True - ISIF = 6 : calculation = "cell-relax", fixed_atoms = True -- ISIF = 7 : calculation = "cell-realx", fixed_axes = "shape", fixed_atoms = True +- ISIF = 7 : calculation = "cell-relax", fixed_axes = "shape", fixed_atoms = True ### Stop Geometry Optimization Manually diff --git a/docs/advanced/output_files/running_scf.log.md b/docs/advanced/output_files/running_scf.log.md index 64c2ed401f..07d16a4f54 100644 --- a/docs/advanced/output_files/running_scf.log.md +++ b/docs/advanced/output_files/running_scf.log.md @@ -1249,9 +1249,9 @@ TIME STATISTICS Grid_Driver Find_atom 0.03 792 0.00 0.01 LCAO_domain grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 - OverlapNew initialize_SR 0.00 1 0.00 0.00 - EkineticNew initialize_HR 0.00 1 0.00 0.00 - NonlocalNew initialize_HR 0.00 1 0.00 0.00 + Overlap initialize_SR 0.00 1 0.00 0.00 + Ekinetic initialize_HR 0.00 1 0.00 0.00 + Nonlocal initialize_HR 0.00 1 0.00 0.00 Charge set_rho_core 0.14 1 0.14 0.03 PW_Basis_Sup recip2real 3.44 122 0.03 0.69 PW_Basis_Sup gathers_scatterp 1.72 122 0.01 0.34 @@ -1279,12 +1279,12 @@ TIME STATISTICS Gint_interface cal_gint_vlocal 114.33 17 6.73 22.83 Gint_Tools cal_psir_ylm 82.79 272000 0.00 16.53 Gint_k transfer_pvpR 3.98 17 0.23 0.79 - OverlapNew calculate_SR 0.67 1 0.67 0.13 - OverlapNew contributeHk 0.06 17 0.00 0.01 - EkineticNew contributeHR 0.67 17 0.04 0.13 - EkineticNew calculate_HR 0.67 1 0.67 0.13 - NonlocalNew contributeHR 0.49 17 0.03 0.10 - NonlocalNew calculate_HR 0.45 1 0.45 0.09 + Overlap calculate_SR 0.67 1 0.67 0.13 + Overlap contributeHk 0.06 17 0.00 0.01 + Ekinetic contributeHR 0.67 17 0.04 0.13 + Ekinetic calculate_HR 0.67 1 0.67 0.13 + Nonlocal contributeHR 0.49 17 0.03 0.10 + Nonlocal calculate_HR 0.45 1 0.45 0.09 OperatorLCAO contributeHk 0.09 17 0.01 0.02 HSolverLCAO hamiltSolvePsiK 90.50 17 5.32 18.07 ElecStateLCAO psiToRho 132.45 17 7.79 26.45 diff --git a/docs/advanced/pp_orb.md b/docs/advanced/pp_orb.md index 953ddc85aa..06a5f1292b 100644 --- a/docs/advanced/pp_orb.md +++ b/docs/advanced/pp_orb.md @@ -65,7 +65,57 @@ $$ ## Pseudopotentials ### Supported formats -ABACUS supports both norm-conserving and ultrasoft pseudopotentials. For norm-conserving pseudopotentials, UPF, UPF2, VWR, and BLPS formats are supported. For ultrasoft pseudopotentials, UPF and UPF2 formats are supported. +ABACUS supports both norm-conserving and ultrasoft pseudopotentials. For norm-conserving pseudopotentials, UPF, UPF2, VWR, and BLPS formats are supported. For ultrasoft pseudopotentials, UPF and UPF2 formats are supported. + +### Pseudopotentials for SOC Calculations + +When performing spin-orbit coupling (SOC) calculations with `lspinorb=1`, specific pseudopotential requirements must be met: + +#### Identifying SOC Pseudopotentials + +Full-relativistic pseudopotentials suitable for SOC calculations can be identified by checking the UPF file header (`PP_HEADER` section): + +```xml + +``` + +- **`relativistic="full"`**: Indicates a full-relativistic pseudopotential +- **`has_so="T"` or `has_so="1"`**: Indicates SOC information is included in the pseudopotential + +#### Usage Rules + +1. **SOC calculations** (`lspinorb=1`): + - **Required**: Full-relativistic pseudopotentials with `has_so=true` + - **Error if not met**: "no soc upf used for lspinorb calculation" + +2. **Non-SOC calculations** (`lspinorb=0`): + - **Flexible**: Can use either scalar-relativistic (`relativistic="scalar"`) or full-relativistic pseudopotentials + - **Automatic conversion**: If full-relativistic PP is used, ABACUS automatically transforms it to scalar-relativistic version + +3. **Ultrasoft pseudopotentials (USPP)**: + - **Constraint**: Full-relativistic USPP must be used with `lspinorb=true` + - **Warning if violated**: "FR-USPP please use lspinorb=.true." + +#### Validation by ABACUS + +ABACUS performs automatic validation when reading pseudopotentials: +- Checks if `lspinorb=1` but pseudopotential has `has_so=false` → terminates with error +- Checks if full-relativistic USPP is used without `lspinorb=1` → shows warning +- Automatically averages SOC-related beta functions when `lspinorb=0` + +#### Where to Find SOC Pseudopotentials + +For SOC calculations, download full-relativistic pseudopotentials from: +- **SG15_ONCV**: [quantum-simulation.org](http://quantum-simulation.org/potentials/sg15_oncv/upf/) - widely used in ABACUS +- **PseudoDOJO**: [pseudo-dojo.org](http://www.pseudo-dojo.org/) - provides both scalar and full-relativistic versions +- **ABACUS official**: [abacus.ustc.edu.cn](http://abacus.ustc.edu.cn/pseudo/list.htm) - includes both pseudopotentials and numerical atomic orbitals + +For more details on SOC calculations, see [Spin-polarization and SOC](./scf/spin.md#soc-effects). ### Usage For more information about pseudopotential usage, check the `ATOMIC_SPECIES` section in the specification of the [STRU file](./input_files/stru.md). diff --git a/docs/advanced/scf/spin.md b/docs/advanced/scf/spin.md index e9f8d03a49..1749db156d 100644 --- a/docs/advanced/scf/spin.md +++ b/docs/advanced/scf/spin.md @@ -29,23 +29,24 @@ If **"ocp=1"** and **"ocp_set"** is set in INPUT file, the occupations of states If **"nupdown"** is set to non-zero, number of spin-up and spin-down electrons will be fixed, and Fermi energy level will split to E_Fermi_up and E_Fermi_down. By the way, total magnetization will also be fixed, and will be the value of **"nupdown"**. ## Noncollinear Spin Polarized Calculations -The spin non-collinear polarization calculation corresponds to setting **"noncolin 1"**, in which case the coupling between spin up and spin down will be taken into account. +The spin non-collinear polarization calculation corresponds to setting **"noncolin 1"**, in which case the coupling between spin up and spin down will be taken into account. In this case, nspin is automatically set to 4, which is usually not required to be specified manually. -The weight of each band will not change, but the number of occupied states will be double. +The weight of each band will not change, but the number of occupied states will be double. If the nbands parameter is set manually, it is generally set to twice what it would be when nspin<4. -In general, non-collinear magnetic moment settings are often used in calculations considering [SOC effects](#soc-effects). When **"lspinorb 1"** in INPUT file, "nspin" is also automatically set to 4. +In general, non-collinear magnetic moment settings are often used in calculations considering [SOC effects](#soc-effects). When **"lspinorb 1"** in INPUT file, "nspin" is also automatically set to 4. + Note: different settings for "noncolin" and "lspinorb" correspond to different calculations: - - noncolin=0 lspinorb=0 nspin<4 : -Non-collinear magnetic moments and SOC effects are not considered. - - noncolin=0 lspinorb=0 nspin=4 : -Actualy same as the above setting, but the calculation will be larger. So the setting is not recommended. - - noncolin=1 lspinorb=0 : -Non-collinear magnetic moments are considered but SOC effects are not considered - - noncolin=0 lspinorb=1 : -The SOC effect is considered but the magnetic moment is limited to the Z direction - - noncolin=1 lspinorb=1 : -The SOC effect and non-collinear magnetic moment are both calculated. + +| noncolin | lspinorb | nspin | Effect | When to Use | +|----------|----------|-------|--------|-------------| +| 0 | 0 | <4 | No non-collinear magnetism, no SOC | Standard collinear spin-polarized or non-spin-polarized calculations | +| 0 | 0 | 4 | Same as above, but larger calculation | **Not recommended** - wastes computational resources | +| 1 | 0 | 4 | Non-collinear magnetism WITHOUT SOC | Systems with complex magnetic structures (e.g., spin spirals, frustrated magnets) where SOC is negligible | +| 0 | 1 | 4 | SOC WITH z-axis magnetism only | Non-magnetic materials with SOC (e.g., semiconductors with band splitting), or magnetic materials where magnetism is along z-axis | +| 1 | 1 | 4 | Both SOC AND non-collinear magnetism | Heavy-element magnetic materials where both SOC and non-collinear magnetism are important (e.g., magnetic anisotropy, Dzyaloshinskii-Moriya interaction) | + +**Special case**: `noncolin=0, lspinorb=1` is commonly used for non-magnetic materials with SOC effects (e.g., topological insulators, semiconductors with spin-orbit splitting). In this case, the magnetization is NOT automatically set, implying no magnetic moments in the system. ## For the continuation job - Continuation job for "nspin 1" need file "SPIN1_CHG.cube" which is generated by setting "out_chg=1" in task before. By setting "init_chg file" in new job's INPUT file, charge density will start from file but not atomic. @@ -53,12 +54,12 @@ The SOC effect and non-collinear magnetic moment are both calculated. - Continuation job for "nspin 4" need files "SPIN%s_CHG.cube", where %s in {1,2,3,4}, which are generated by "out_chg 1" with any variable setting leading to 'nspin'=4, and refer to charge densities in Pauli spin matrixes. It should be note that reading charge density files printing by 'nspin'=2 case is supported, which means only $\sigma_{tot}$ and $\sigma_{z}$ are read. # SOC Effects -## SOC +## SOC `lspinorb` is used for control whether or not SOC(spin-orbit coupling) effects should be considered. Both `basis_type=pw` and `basis_type=lcao` support `scf` and `nscf` calculation with SOC effects. -Atomic forces and cell stresses can not be calculated with SOC effects yet. +Atomic forces and cell stresses can be calculated with SOC effects (supported since ABACUS v3.9.0). ## Pseudopotentials and Numerical Atomic Orbitals For Norm-Conserving pseudopotentials, there are differences between SOC version and non-SOC version. @@ -72,9 +73,146 @@ When full-relativistic pseudopotential is used for non-SOC calculation, ABACUS w Numerical atomic orbitals in ABACUS are unrelated with spin, and same orbital file can be used for SOC and non-SOC calculation. ## Partial-relativistic SOC Effect -Sometimes, for some real materials, both scalar-relativistic and full-relativistic can not describe the exact spin-orbit coupling. +Sometimes, for some real materials, both scalar-relativistic and full-relativistic can not describe the exact spin-orbit coupling. Artificial modulation can help for these cases. `soc_lambda`, which has value range [0.0, 1.0] , is used for modulate SOC effect. In particular, `soc_lambda 0.0` refers to scalar-relativistic case and `soc_lambda 1.0` refers to full-relativistic case. +## Pseudopotential Requirements for SOC + +When performing SOC calculations (`lspinorb=1`), specific pseudopotential requirements must be met: + +### Checking Pseudopotential Files + +In the UPF (Unified Pseudopotential Format) file header (`PP_HEADER` section), look for: +- `has_so="T"` or `has_so="1"`: Indicates SOC information is included +- `relativistic="full"`: Indicates full-relativistic pseudopotential + +Example from a full-relativistic UPF file: +``` + +``` + +### Pseudopotential Usage Rules + +1. **For SOC calculations** (`lspinorb=1`): + - **MUST** use full-relativistic pseudopotentials with `has_so=true` + - Code will terminate with error: "no soc upf used for lspinorb calculation" if scalar-relativistic PP is used + +2. **For non-SOC calculations** (`lspinorb=0`): + - Can use either scalar-relativistic or full-relativistic pseudopotentials + - If full-relativistic PP is used, ABACUS automatically transforms it to scalar-relativistic version + +3. **For ultrasoft pseudopotentials (USPP)**: + - Full-relativistic USPP **requires** `lspinorb=true` + - Code will show warning: "FR-USPP please use lspinorb=.true." if this requirement is not met + +### Where to Find SOC Pseudopotentials + +- **SG15_ONCV**: Full-relativistic versions available at [quantum-simulation.org](http://quantum-simulation.org/potentials/sg15_oncv/upf/) +- **PseudoDOJO**: Provides both scalar and full-relativistic versions +- **ABACUS official**: [abacus.ustc.edu.cn](http://abacus.ustc.edu.cn/pseudo/list.htm) + +## Automatic Parameter Settings + +When using SOC or non-collinear calculations, ABACUS automatically adjusts several parameters: + +### When `lspinorb=true`: +1. **nspin**: Automatically set to 4 (noncollinear spin representation) +2. **Symmetry**: Automatically disabled (`symm_flag=-1`) because SOC breaks inversion symmetry +3. **Magnetization**: NOT automatically set when `noncolin=0` (implies non-magnetic material with SOC) + +### When `noncolin=true`: +1. **nspin**: Automatically set to 4 +2. **npol**: Set to 2 (wave function has two spinor components) +3. **Magnetization**: Automatically set if user provides zero values (unless `lspinorb=1` and `noncolin=0`) + +### Important Notes: +- You do NOT need to manually set `nspin=4` when using `lspinorb=1` or `noncolin=1` +- Symmetry operations are incompatible with SOC, so they are automatically turned off +- For `lspinorb=1, noncolin=0`: This is a special case for non-magnetic materials with SOC, where magnetization is not initialized + +## Common Errors and Solutions + +### Error: "no soc upf used for lspinorb calculation" +**Cause**: Using scalar-relativistic pseudopotentials with `lspinorb=1` + +**Solution**: Download and use full-relativistic pseudopotentials with `has_so=true`. Check the UPF file header to verify `relativistic="full"` and `has_so="T"`. + +### Error: "nspin=4(soc or noncollinear-spin) does not support gamma only calculation" +**Cause**: Trying to use `gamma_only=true` with `lspinorb=1` or `noncolin=1` + +**Solution**: Set `gamma_only=false` or `gamma_only=0` in your INPUT file. SOC and non-collinear calculations require k-point sampling beyond the gamma point. + +### Warning: "FR-USPP please use lspinorb=.true." +**Cause**: Using full-relativistic ultrasoft pseudopotentials without enabling SOC + +**Solution**: Set `lspinorb=true` in your INPUT file, or switch to scalar-relativistic USPP if SOC is not needed. + +### Issue: Forces or stresses not calculated +**Note**: This issue has been resolved. Atomic forces and cell stresses can now be calculated with SOC effects (supported since ABACUS v3.9.0). + +If you are using an older version of ABACUS (before v3.9.0), force and stress calculations with SOC were not supported. Please upgrade to the latest version to use this feature. + +## INPUT File Examples + +### Example 1: SOC without Non-collinear Magnetism +For non-magnetic materials with SOC (e.g., GaAs, topological insulators): + +``` +INPUT_PARAMETERS +calculation scf +basis_type pw +ecutwfc 50 +lspinorb 1 # Enable SOC +noncolin 0 # No non-collinear magnetism +# nspin will be automatically set to 4 +# symmetry will be automatically disabled +``` + +### Example 2: Non-collinear Magnetism without SOC +For systems with complex magnetic structures but negligible SOC: + +``` +INPUT_PARAMETERS +calculation scf +basis_type lcao +lspinorb 0 # No SOC +noncolin 1 # Enable non-collinear magnetism +# nspin will be automatically set to 4 +# Magnetization directions should be specified in STRU file +``` + +### Example 3: Both SOC and Non-collinear Magnetism +For heavy-element magnetic materials (e.g., Fe with SOC, materials with DMI): + +``` +INPUT_PARAMETERS +calculation scf +basis_type pw +ecutwfc 60 +lspinorb 1 # Enable SOC +noncolin 1 # Enable non-collinear magnetism +# nspin will be automatically set to 4 +# symmetry will be automatically disabled +# Magnetization directions should be specified in STRU file +``` + +### Example 4: Partial-relativistic SOC +For fine-tuning SOC strength: + +``` +INPUT_PARAMETERS +calculation scf +basis_type pw +ecutwfc 50 +lspinorb 1 # Enable SOC +soc_lambda 0.5 # 50% SOC strength +# Useful when full SOC overestimates or underestimates experimental results +``` diff --git a/docs/community/faq.md b/docs/community/faq.md index df5db1ec5b..1e372a180d 100644 --- a/docs/community/faq.md +++ b/docs/community/faq.md @@ -12,6 +12,12 @@ Users are referred to the introduction of features of ABACUS in the [feature list](http://abacus.ustc.edu.cn/features/list.htm). +**2. How to contact the ABACUS community?** + +Users can contact the ABACUS community by join ABACUS WeChat or QQ group. One can quickly join the QQ group via group ID: 759914681 + +If users have any questions or suggestions, please feel free to contact us in group or by raising issue in GitHub repo. + ## Installation ## Setting up jobs @@ -38,7 +44,23 @@ Non-periodic systems such as liquid systems can be calculated by using supercell **6. How to perform spin-orbital coupling (SOC) calculations in ABACUS?** -Apart from setting relavant keys (`lspinorb` to 1) in the `INPUT` file, SOC calculations can only be performed with fully-relativistic pseudopotentials. Users are suggested to download fully-relativistic versions of SG15_ONCV pseudopotential files from a [website](http://quantum-simulation.org/potentials/sg15_oncv/upf/). The numerical orbital files generated from the corresponding scalar-relativistic pseudoptential files by ABACUS ([here](http://abacus.ustc.edu.cn/pseudo/list.htm)) can be used in collaboration with the fully-relativistic pseudopotentials. +To perform SOC calculations in ABACUS, follow these steps: + +1. **Set `lspinorb=1` in the INPUT file**: This enables spin-orbit coupling effects +2. **Use full-relativistic pseudopotentials**: SOC calculations require pseudopotentials with `has_so=true` in the UPF header + - Download full-relativistic versions of SG15_ONCV pseudopotentials from [quantum-simulation.org](http://quantum-simulation.org/potentials/sg15_oncv/upf/) + - Check the UPF file header for `relativistic="full"` and `has_so="T"` +3. **Verify automatic settings**: When `lspinorb=1` is set, `nspin` is automatically set to 4 and symmetry is automatically disabled + +**Basis set support**: Both `basis_type=pw` (plane wave) and `basis_type=lcao` (numerical atomic orbitals) support SOC calculations for both SCF and NSCF. + +**Force and stress calculations**: Atomic forces and cell stresses can be calculated with SOC (supported since ABACUS v3.9.0). + +**Numerical atomic orbitals**: The numerical orbital files generated from scalar-relativistic pseudopotentials (available at [abacus.ustc.edu.cn](http://abacus.ustc.edu.cn/pseudo/list.htm)) can be used with full-relativistic pseudopotentials, as orbitals are spin-independent. + +**Common error**: If you see "no soc upf used for lspinorb calculation", ensure you are using full-relativistic pseudopotentials with `has_so=true`. + +For detailed information, examples, and troubleshooting, see [Spin-polarization and SOC](../advanced/scf/spin.md#soc-effects). **7. How to restart jobs in abacus?** diff --git a/docs/quick_start/easy_install.md b/docs/quick_start/easy_install.md index a3e67230cf..aae9bca308 100644 --- a/docs/quick_start/easy_install.md +++ b/docs/quick_start/easy_install.md @@ -1,6 +1,6 @@ # Easy Installation -This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS (and possibly its requirements) from the source code using the latest compiler for the best performace. You can try [toolchain](#install-requirements-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker. +This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS (and possibly its requirements) from the source code using the latest compiler for the best performace. You can use [toolchain](#install-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker. ## Get ABACUS source code @@ -12,6 +12,34 @@ ABACUS source code can be obtained via one of the following choices: - Get the source code of a stable version [here](https://github.com/deepmodeling/abacus-develop/releases) - If you have connection issues accessing GitHub, please try out our official [Gitee repo](https://gitee.com/deepmodeling/abacus-develop/): e.g. `git clone https://gitee.com/deepmodeling/abacus-develop.git`. This Gitee repo is updated synchronously with GitHub. +## Update to latest release by git + +Please check the [release page](https://github.com/deepmodeling/abacus-develop/releases) for the release note of a new version. + +It is OK to download the new source code from beginning following the previous step. + +You can update your cloned git repo (from Github or Gitee) in-place with the following commands: + +```bash +git remote -v +# Check if the output contains the line below +# origin https://github.com/deepmodeling/abacus-develop.git (fetch) +# The remote name is marked as "upstream" if you clone the repo from your own fork. + +# Replace "origin" with "upstream" or the remote name corresponding to deepmodeling/abacus-develop if necessary +git fetch origin +git checkout v3.x.x # Replace the tag with the latest version, like v3.10.0 +git describe --tags # Verify if the tag has been successfully checked out +``` + +Then proceed to the [Build and Install](#build-and-install) part. If you encountered errors, try remove the `build` directory first and reconfigure. + +To use the codes under active development: + +```bash +git checkout develop +git pull +``` ## Prerequisites @@ -34,65 +62,83 @@ These requirements support the calculation of plane-wave basis in ABACUS. For LC - [CEREAL](https://uscilab.github.io/cereal/). - [ELPA](https://elpa.mpcdf.mpg.de/) >= 2017 (optional). -## Install requirements +## Install by toolchain -Some of these packages can be installed with popular package management system, such as `apt` and `yum`: +We offer a set of [toolchain](https://github.com/deepmodeling/abacus-develop/tree/develop/toolchain) +scripts to compile and install all the requirements and ABACUS itself +automatically and suitable for machine characteristic in an online or offline way. +The toolchain can be downloaded with ABACUS repo, and users can easily compile the requirements by running *toolchain_[gnu,intel,gcc-aocl,aocc-aocl].sh* and ABACUS itself by running *build_abacus_[gnu,intel,gcc-aocl,aocc-aocl].sh* script in the toolchain directory in `GNU`, `Intel-oneAPI` , `GCC-AMD AOCL` and `AMD AOCC-AOCL` toolchain. +Sometimes, ABACUS by toolchain installation may have better efficient performance due to the suitable compiled dependencies. One should read the [README in toolchain](https://github.com/deepmodeling/abacus-develop/tree/develop/toolchain/README.md) for most of the information before use, and related tutorials can be accessed via ABACUS WeChat platform. + +## Install by conda + +Conda is a package management system with a separated environment, not requiring system privileges. +You can refer to [DeepModeling conda FAQ](https://docs.deepmodeling.com/faq/conda.html) for how to setup a conda environment. +A pre-built ABACUS binary with all requirements is available at [conda-forge](https://anaconda.org/conda-forge/abacus). It supports advanced features including Libxc, LibRI, and DeePKS. Conda will install the GPU-supported version of ABACUS if a valid GPU driver is present. Please refer to [the advanced installation guide](../advanced/install.md) for more details. ```bash -sudo apt update && sudo apt install -y libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc git pkgconf -``` +# Install +# We recommend installing ABACUS in a new environment to avoid potential conflicts: +conda create -n abacus_env abacus "libblas=*=*mkl" mpich -c conda-forge -> Installing ELPA by apt only matches requirements on Ubuntu 22.04. For earlier linux distributions, you should build ELPA from source. +# Run +conda activate abacus_env +OMP_NUM_THREADS=1 mpirun -n 4 abacus -We recommend [Intel® oneAPI toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/commercial-base-hpc.html) (former Intel® Parallel Studio) as toolchain. The [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#base-kit) contains Intel® oneAPI Math Kernel Library (aka `MKL`), including `BLAS`, `LAPACK`, `ScaLAPACK` and `FFTW3`. The [Intel® oneAPI HPC Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#hpc-kit) contains Intel® MPI Library, and C++ compiler(including MPI compiler). -> Please note that building `elpa` with a different MPI library may cause conflict. -> Don't forget to [set environment variables](https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-render-linux/top/configure-your-system.html) before you start! `cmake` will use Intel MKL if the environment variable `MKLROOT` is set. +# Update +conda update -n abacus_env abacus -c conda-forge +``` -Please refer to our [guide](https://github.com/deepmodeling/abacus-develop/wiki/Building-and-Running-ABACUS) on installing requirements. +> If OpenBLAS gives warning about OpenMP threads, please install conda package `"openblas=*=openmp*"` or `"libblas=*=*mkl"`. See [switching BLAS implementation in conda](https://conda-forge.org/docs/maintainer/knowledge_base.html#switching-blas-implementation). -## Install requirements by toolchain +> ABACUS supports `OpenMPI` and `MPICH` variant. Install `mpich` or `openmpi` package to switch MPI library if required. -We offer a set of [toolchain](https://github.com/deepmodeling/abacus-develop/tree/develop/toolchain) -scripts to compile and install all the requirements -automatically and suitable for machine characteristic in an online or offline way. -The toolchain can be downloaded with ABACUS repo, and users can easily compile the requirements by running *toolchain_[gnu,intel].sh* and ABACUS itself by running *build_abacus_[gnu,intel].sh* script in the toolchain directory in both `GNU` and `Intel-oneAPI` toolchain. -Sometimes, ABACUS by toolchain installation may have better efficient performance due to the suitable compiled dependencies. +For more details on building a conda package of ABACUS locally, please refer to the [conda recipe file](https://github.com/deepmodeling/abacus-develop/blob/develop/conda/meta.yaml). -Users should read the README in toolchain directory for most of the information before use, and a tutorial for using this toolchain can be accessed in [bohrium-notebook](https://nb.bohrium.dp.tech/detail/5215742477) as reference. +> Note: The [deepmodeling conda channel](https://anaconda.org/deepmodeling/abacus) offers historical versions of ABACUS. -> Notice: the toolchain is under development, please let we know if you encounter any problem in using this toolchain by raising issue or contacting us. +### Developing with conda +It is possible to build ABACUS from source based on the conda environment. -## Update to latest release by git +```bash +conda create -n abacus_env abacus -c conda-forge +conda activate abacus_env +export CMAKE_PREFIX_PATH=$CONDA_PREFIX:$CMAKE_PREFIX_PATH -Please check the [release page](https://github.com/deepmodeling/abacus-develop/releases) for the release note of a new version. +# By default OpenBLAS is used; run `conda install "blas=*=mkl" mkl_fft mkl-devel -c conda-forge` to switch implementation. +export MKLROOT=$CONDA_PREFIX # If Intel MKL is required. -It is OK to download the new source code from beginning following the previous step. +export CMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'`:$CMAKE_PREFIX_PATH # If DEEPKS support is required; +# usually expands to `$CONDA_PREFIX/lib/python3.1/site-packages/torch/share/cmake` +``` -You can update your cloned git repo (from Github or Gitee) in-place with the following commands: +And, follow the instructions in [Build and Install](#build-and-install) part above withou manually setting paths to dependencies. +See [the advanced installation guide](../advanced/install.md) for more features. +Make sure the environment variables are set before running `cmake`. +Possible command: `cmake -B build -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON`. -```bash -git remote -v -# Check if the output contains the line below -# origin https://github.com/deepmodeling/abacus-develop.git (fetch) -# The remote name is marked as "upstream" if you clone the repo from your own fork. -# Replace "origin" with "upstream" or the remote name corresponding to deepmodeling/abacus-develop if necessary -git fetch origin -git checkout v3.x.x # Replace the tag with the latest version, like v3.10.0 -git describe --tags # Verify if the tag has been successfully checked out -``` +## Install ABACUS manually -Then proceed to the [Build and Install](#build-and-install) part. If you encountered errors, try remove the `build` directory first and reconfigure. +### Install requirements -To use the codes under active development: +Some of these packages can be installed with popular package management system via root permission if you have, such as `apt` and `yum`: ```bash -git checkout develop -git pull +sudo apt update && sudo apt install -y libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc git pkgconf ``` -## Configure +> Installing ELPA by apt only matches requirements on Ubuntu 22.04. For earlier linux distributions, you should build ELPA from source. + +We recommend [Intel® oneAPI toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/commercial-base-hpc.html) (former Intel® Parallel Studio) as toolchain. The [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#base-kit) contains Intel® oneAPI Math Kernel Library (aka `MKL`), including `BLAS`, `LAPACK`, `ScaLAPACK` and `FFTW3`. The [Intel® oneAPI HPC Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#hpc-kit) contains Intel® MPI Library, and C++ compiler(including MPI compiler). +> Please note that building `elpa` with a different MPI library may cause conflict. +> Don't forget to [set environment variables](https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-render-linux/top/configure-your-system.html) before you start! `cmake` will use Intel MKL if the environment variable `MKLROOT` is set. + +Please refer to our [guide](https://github.com/deepmodeling/abacus-develop/wiki/Building-and-Running-ABACUS) on installing requirements. + + +### Configure The basic command synopsis is: @@ -139,7 +185,7 @@ Here is an example: CXX=mpiicpx cmake -B build -DCMAKE_INSTALL_PREFIX=~/abacus -DELPA_DIR=~/elpa-2025.01.001/build -DCEREAL_INCLUDE_DIR=~/cereal/include ``` -## Build and Install +### Build and Install After configuring, build and install by: @@ -150,7 +196,9 @@ cmake --install build You can change the number after `-j` on your need: set to the number of CPU cores(`nproc`) to reduce compilation time. -## Run +## Run ABACUS + +### Load ABACUS If ABACUS is installed into a custom directory using `CMAKE_INSTALL_PREFIX`, please add it to your environment variable `PATH` to locate the correct executable. *(Note: `my-install-dir` should be changed to the location of your installed abacus:`/home/your-path/abacus/bin/`.)* @@ -165,6 +213,14 @@ If ABACUS is installed by toolchain, there will be an environment script in the source /path/to/abacus/toolchain/abacus_env.sh ``` +If ABACUS is installed by conda, please make sure the conda environment is activated before running ABACUS. + +```bash +conda activate abacus_env +``` + +### Run with Parallelism Setting + Please set OpenMP threads by setting environment variable: ```bash @@ -215,64 +271,16 @@ For online development environment, we support [GitHub Codespaces](https://githu We also support [Gitpod](https://www.gitpod.io/): [Open in Gitpod](https://gitpod.io/#https://github.com/deepmodeling/abacus-develop) -## Install by conda - -Conda is a package management system with a separated environment, not requiring system privileges. -You can refer to [DeepModeling conda FAQ](https://docs.deepmodeling.com/faq/conda.html) for how to setup a conda environment. -A pre-built ABACUS binary with all requirements is available at [conda-forge](https://anaconda.org/conda-forge/abacus). It supports advanced features including Libxc, LibRI, and DeePKS. Conda will install the GPU-supported version of ABACUS if a valid GPU driver is present. Please refer to [the advanced installation guide](../advanced/install.md) for more details. - -```bash -# Install -# We recommend installing ABACUS in a new environment to avoid potential conflicts: -conda create -n abacus_env abacus "libblas=*=*mkl" mpich -c conda-forge - -# Run -conda activate abacus_env -OMP_NUM_THREADS=1 mpirun -n 4 abacus - -# Update -conda update -n abacus_env abacus -c conda-forge -``` - -> If OpenBLAS gives warning about OpenMP threads, please install conda package `"openblas=*=openmp*"` or `"libblas=*=*mkl"`. See [switching BLAS implementation in conda](https://conda-forge.org/docs/maintainer/knowledge_base.html#switching-blas-implementation). - -> ABACUS supports `OpenMPI` and `MPICH` variant. Install `mpich` or `openmpi` package to switch MPI library if required. - -For more details on building a conda package of ABACUS locally, please refer to the [conda recipe file](https://github.com/deepmodeling/abacus-develop/blob/develop/conda/meta.yaml). - -> Note: The [deepmodeling conda channel](https://anaconda.org/deepmodeling/abacus) offers historical versions of ABACUS. - -### Developing with conda - -It is possible to build ABACUS from source based on the conda environment. - -```bash -conda create -n abacus_env abacus -c conda-forge -conda activate abacus_env -export CMAKE_PREFIX_PATH=$CONDA_PREFIX:$CMAKE_PREFIX_PATH - -# By default OpenBLAS is used; run `conda install "blas=*=mkl" mkl_fft mkl-devel -c conda-forge` to switch implementation. -export MKLROOT=$CONDA_PREFIX # If Intel MKL is required. - -export CMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'`:$CMAKE_PREFIX_PATH # If DEEPKS support is required; -# usually expands to `$CONDA_PREFIX/lib/python3.1/site-packages/torch/share/cmake` -``` - -And, follow the instructions in [Build and Install](#build-and-install) part above withou manually setting paths to dependencies. -See [the advanced installation guide](../advanced/install.md) for more features. -Make sure the environment variables are set before running `cmake`. -Possible command: `cmake -B build -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON`. - ## Command line options Users can check the version of ABACUS by running the command `abacus --version`, the result will be like: ``` -ABACUS version v3.6.5 +ABACUS version v3.9.0.2 ``` Users may check the correctness of the setting of parameters in the `INPUT` file by running the command `abacus --check-input`, the result will be like: ``` - ABACUS v3.6.5 + ABACUS v3.9.0.2 Atomic-orbital Based Ab-initio Computation at UStc diff --git a/docs/quick_start/input.md b/docs/quick_start/input.md index c13d04e342..d7a94449e0 100644 --- a/docs/quick_start/input.md +++ b/docs/quick_start/input.md @@ -95,7 +95,7 @@ O #Name of element > **Note:** users may choose a different name for their structure file using the keyword `stru_file`. The order of the pseudopotential file list and the numerical orbital list (if LCAO is applied) MUST be consistent with that of the atomic type given in `ATOMIC_POSITIONS`. -For a more detailed description of STRU file, please consult [here](../advanced/input_files/stru.md). +> **Important:** When specifying atomic positions, you can use various coordinate systems (Direct, Cartesian, Cartesian_angstrom, etc.) and add optional properties like magnetization, velocity, and movement constraints. See the [detailed STRU documentation](../advanced/input_files/stru.md) for all available options and best practices. ## *KPT* diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index e109197b7b..39a3a477f0 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -2312,7 +2312,7 @@ HAVE_DOT = YES # Minimum value: 0, maximum value: 32, default value: 0. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_NUM_THREADS = 0 +DOT_NUM_THREADS = 2 # When you want a differently looking font in the dot files that doxygen # generates you can specify the font name using DOT_FONTNAME. You need to make diff --git a/examples/03_spin_polarized/AFM/reference/running_scf.log.ref b/examples/03_spin_polarized/AFM/reference/running_scf.log.ref index 03045b0f05..0125faebfc 100644 --- a/examples/03_spin_polarized/AFM/reference/running_scf.log.ref +++ b/examples/03_spin_polarized/AFM/reference/running_scf.log.ref @@ -4811,9 +4811,9 @@ Record_adj for_2d 0.00 1 0.00 0. Grid_Driver Find_atom 0.00 112 0.00 0.01 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.00 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.00 Charge set_rho_core 0.00 1 0.00 0.00 Charge atomic_rho 0.00 1 0.00 0.01 PW_Basis_Sup recip2real 0.03 219 0.00 0.07 @@ -4838,12 +4838,12 @@ Gint_interface cal_gint 27.76 69 0.40 70. Gint_interface cal_gint_vlocal 15.79 46 0.34 40.29 Gint_Tools cal_psir_ylm 2.18 9936 0.00 5.56 Gint_k transfer_pvpR 0.75 46 0.02 1.92 -OverlapNew calculate_SR 0.09 1 0.09 0.24 -OverlapNew contributeHk 0.86 2898 0.00 2.21 -EkineticNew contributeHR 0.09 46 0.00 0.24 -EkineticNew calculate_HR 0.09 1 0.09 0.24 -NonlocalNew contributeHR 0.08 46 0.00 0.20 -NonlocalNew calculate_HR 0.07 1 0.07 0.18 +Overlap calculate_SR 0.09 1 0.09 0.24 +Overlap contributeHk 0.86 2898 0.00 2.21 +Ekinetic contributeHR 0.09 46 0.00 0.24 +Ekinetic calculate_HR 0.09 1 0.09 0.24 +Nonlocal contributeHR 0.08 46 0.00 0.20 +Nonlocal calculate_HR 0.07 1 0.07 0.18 OperatorLCAO contributeHk 0.98 2898 0.00 2.49 HSolverLCAO hamiltSolvePsiK 6.35 2898 0.00 16.19 DiagoElpa elpa_solve 5.46 2898 0.00 13.93 diff --git a/examples/03_spin_polarized/AFM/reference/scf.output.ref b/examples/03_spin_polarized/AFM/reference/scf.output.ref index 5a76fc513f..d34ff54d90 100644 --- a/examples/03_spin_polarized/AFM/reference/scf.output.ref +++ b/examples/03_spin_polarized/AFM/reference/scf.output.ref @@ -101,9 +101,9 @@ Record_adj for_2d 0.00 1 0.00 0. Grid_Driver Find_atom 0.00 112 0.00 0.01 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.00 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.00 Charge set_rho_core 0.00 1 0.00 0.00 Charge atomic_rho 0.00 1 0.00 0.01 PW_Basis_Sup recip2real 0.03 219 0.00 0.07 @@ -128,12 +128,12 @@ Gint_interface cal_gint 27.76 69 0.40 70. Gint_interface cal_gint_vlocal 15.79 46 0.34 40.29 Gint_Tools cal_psir_ylm 2.18 9936 0.00 5.56 Gint_k transfer_pvpR 0.75 46 0.02 1.92 -OverlapNew calculate_SR 0.09 1 0.09 0.24 -OverlapNew contributeHk 0.86 2898 0.00 2.21 -EkineticNew contributeHR 0.09 46 0.00 0.24 -EkineticNew calculate_HR 0.09 1 0.09 0.24 -NonlocalNew contributeHR 0.08 46 0.00 0.20 -NonlocalNew calculate_HR 0.07 1 0.07 0.18 +Overlap calculate_SR 0.09 1 0.09 0.24 +Overlap contributeHk 0.86 2898 0.00 2.21 +Ekinetic contributeHR 0.09 46 0.00 0.24 +Ekinetic calculate_HR 0.09 1 0.09 0.24 +Nonlocal contributeHR 0.08 46 0.00 0.20 +Nonlocal calculate_HR 0.07 1 0.07 0.18 OperatorLCAO contributeHk 0.98 2898 0.00 2.49 HSolverLCAO hamiltSolvePsiK 6.35 2898 0.00 16.19 DiagoElpa elpa_solve 5.46 2898 0.00 13.93 diff --git a/examples/03_spin_polarized/ATOM/reference/running_scf.log.ref b/examples/03_spin_polarized/ATOM/reference/running_scf.log.ref index 74008dd00f..68f568f337 100644 --- a/examples/03_spin_polarized/ATOM/reference/running_scf.log.ref +++ b/examples/03_spin_polarized/ATOM/reference/running_scf.log.ref @@ -597,9 +597,9 @@ Grid_BigCell grid_expansion_index 0.01 2 0.01 0. Record_adj for_2d 0.00 1 0.00 0.00 Grid_Driver Find_atom 0.00 7 0.00 0.00 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.00 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 LOC Alltoall 0.00 1 0.00 0.00 Charge set_rho_core 0.01 1 0.01 0.03 @@ -621,12 +621,12 @@ H_Ewald_pw compute_ewald 0.05 1 0.05 0. HSolverLCAO solve 0.46 7 0.07 2.81 HamiltLCAO updateHk 0.11 14 0.01 0.68 OperatorLCAO init 0.11 42 0.00 0.68 -OverlapNew calculate_SR 0.00 1 0.00 0.00 -OverlapNew contributeHk 0.00 1 0.00 0.00 -EkineticNew contributeHR 0.00 14 0.00 0.00 -EkineticNew calculate_HR 0.00 1 0.00 0.00 -NonlocalNew contributeHR 0.00 14 0.00 0.00 -NonlocalNew calculate_HR 0.00 1 0.00 0.00 +Overlap calculate_SR 0.00 1 0.00 0.00 +Overlap contributeHk 0.00 1 0.00 0.00 +Ekinetic contributeHR 0.00 14 0.00 0.00 +Ekinetic calculate_HR 0.00 1 0.00 0.00 +Nonlocal contributeHR 0.00 14 0.00 0.00 +Nonlocal calculate_HR 0.00 1 0.00 0.00 Veff contributeHR 0.06 7 0.01 0.39 Gint_interface cal_gint 0.27 23 0.01 1.62 Gint_interface cal_gint_vlocal 0.11 14 0.01 0.66 diff --git a/examples/03_spin_polarized/ATOM/reference/scf.output.ref b/examples/03_spin_polarized/ATOM/reference/scf.output.ref index ba20a7423f..41fe4824a0 100644 --- a/examples/03_spin_polarized/ATOM/reference/scf.output.ref +++ b/examples/03_spin_polarized/ATOM/reference/scf.output.ref @@ -84,9 +84,9 @@ Grid_BigCell grid_expansion_index 0.01 2 0.01 0. Record_adj for_2d 0.00 1 0.00 0.00 Grid_Driver Find_atom 0.00 7 0.00 0.00 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.00 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 LOC Alltoall 0.00 1 0.00 0.00 Charge set_rho_core 0.01 1 0.01 0.03 @@ -108,12 +108,12 @@ H_Ewald_pw compute_ewald 0.05 1 0.05 0. HSolverLCAO solve 0.46 7 0.07 2.81 HamiltLCAO updateHk 0.11 14 0.01 0.68 OperatorLCAO init 0.11 42 0.00 0.68 -OverlapNew calculate_SR 0.00 1 0.00 0.00 -OverlapNew contributeHk 0.00 1 0.00 0.00 -EkineticNew contributeHR 0.00 14 0.00 0.00 -EkineticNew calculate_HR 0.00 1 0.00 0.00 -NonlocalNew contributeHR 0.00 14 0.00 0.00 -NonlocalNew calculate_HR 0.00 1 0.00 0.00 +Overlap calculate_SR 0.00 1 0.00 0.00 +Overlap contributeHk 0.00 1 0.00 0.00 +Ekinetic contributeHR 0.00 14 0.00 0.00 +Ekinetic calculate_HR 0.00 1 0.00 0.00 +Nonlocal contributeHR 0.00 14 0.00 0.00 +Nonlocal calculate_HR 0.00 1 0.00 0.00 Veff contributeHR 0.06 7 0.01 0.39 Gint_interface cal_gint 0.27 23 0.01 1.62 Gint_interface cal_gint_vlocal 0.11 14 0.01 0.66 diff --git a/examples/03_spin_polarized/FM/reference/running_scf.log.ref b/examples/03_spin_polarized/FM/reference/running_scf.log.ref index e72057936e..a2b17a38ac 100644 --- a/examples/03_spin_polarized/FM/reference/running_scf.log.ref +++ b/examples/03_spin_polarized/FM/reference/running_scf.log.ref @@ -5305,9 +5305,9 @@ Record_adj for_2d 0.00 1 0.00 0. Grid_Driver Find_atom 0.00 76 0.00 0.01 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.01 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.01 Charge set_rho_core 0.00 1 0.00 0.00 Charge atomic_rho 0.00 1 0.00 0.01 PW_Basis_Sup recip2real 0.02 138 0.00 0.07 @@ -5332,12 +5332,12 @@ Gint_interface cal_gint 16.57 42 0.39 68. Gint_interface cal_gint_vlocal 9.47 28 0.34 39.40 Gint_Tools cal_psir_ylm 1.26 6048 0.00 5.23 Gint_k transfer_pvpR 0.56 28 0.02 2.32 -OverlapNew calculate_SR 0.09 1 0.09 0.39 -OverlapNew contributeHk 0.52 1764 0.00 2.18 -EkineticNew contributeHR 0.09 28 0.00 0.40 -EkineticNew calculate_HR 0.09 1 0.09 0.39 -NonlocalNew contributeHR 0.08 28 0.00 0.31 -NonlocalNew calculate_HR 0.07 1 0.07 0.29 +Overlap calculate_SR 0.09 1 0.09 0.39 +Overlap contributeHk 0.52 1764 0.00 2.18 +Ekinetic contributeHR 0.09 28 0.00 0.40 +Ekinetic calculate_HR 0.09 1 0.09 0.39 +Nonlocal contributeHR 0.08 28 0.00 0.31 +Nonlocal calculate_HR 0.07 1 0.07 0.29 OperatorLCAO contributeHk 0.59 1764 0.00 2.46 HSolverLCAO hamiltSolvePsiK 3.90 1764 0.00 16.25 DiagoElpa elpa_solve 3.33 1764 0.00 13.86 diff --git a/examples/03_spin_polarized/FM/reference/scf.output.ref b/examples/03_spin_polarized/FM/reference/scf.output.ref index f2b2d9578e..77aa7a6488 100644 --- a/examples/03_spin_polarized/FM/reference/scf.output.ref +++ b/examples/03_spin_polarized/FM/reference/scf.output.ref @@ -92,9 +92,9 @@ Record_adj for_2d 0.00 1 0.00 0. Grid_Driver Find_atom 0.00 76 0.00 0.01 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.01 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.01 Charge set_rho_core 0.00 1 0.00 0.00 Charge atomic_rho 0.00 1 0.00 0.01 PW_Basis_Sup recip2real 0.02 138 0.00 0.07 @@ -119,12 +119,12 @@ Gint_interface cal_gint 16.57 42 0.39 68. Gint_interface cal_gint_vlocal 9.47 28 0.34 39.40 Gint_Tools cal_psir_ylm 1.26 6048 0.00 5.23 Gint_k transfer_pvpR 0.56 28 0.02 2.32 -OverlapNew calculate_SR 0.09 1 0.09 0.39 -OverlapNew contributeHk 0.52 1764 0.00 2.18 -EkineticNew contributeHR 0.09 28 0.00 0.40 -EkineticNew calculate_HR 0.09 1 0.09 0.39 -NonlocalNew contributeHR 0.08 28 0.00 0.31 -NonlocalNew calculate_HR 0.07 1 0.07 0.29 +Overlap calculate_SR 0.09 1 0.09 0.39 +Overlap contributeHk 0.52 1764 0.00 2.18 +Ekinetic contributeHR 0.09 28 0.00 0.40 +Ekinetic calculate_HR 0.09 1 0.09 0.39 +Nonlocal contributeHR 0.08 28 0.00 0.31 +Nonlocal calculate_HR 0.07 1 0.07 0.29 OperatorLCAO contributeHk 0.59 1764 0.00 2.46 HSolverLCAO hamiltSolvePsiK 3.90 1764 0.00 16.25 DiagoElpa elpa_solve 3.33 1764 0.00 13.86 diff --git a/examples/04_noncollinear/BCC_Fe_NC_ground_state/reference/scf.output.ref b/examples/04_noncollinear/BCC_Fe_NC_ground_state/reference/scf.output.ref index f9f0970f67..7882dc68ff 100644 --- a/examples/04_noncollinear/BCC_Fe_NC_ground_state/reference/scf.output.ref +++ b/examples/04_noncollinear/BCC_Fe_NC_ground_state/reference/scf.output.ref @@ -102,9 +102,9 @@ Record_adj for_2d 0.00 1 0.00 0. Grid_Driver Find_atom 0.00 68 0.00 0.00 LCAO_Hamilt grid_prepare 0.00 1 0.00 0.00 Veff initialize_HR 0.00 1 0.00 0.00 -OverlapNew initialize_SR 0.00 1 0.00 0.00 -EkineticNew initialize_HR 0.00 1 0.00 0.00 -NonlocalNew initialize_HR 0.00 1 0.00 0.00 +Overlap initialize_SR 0.00 1 0.00 0.00 +Ekinetic initialize_HR 0.00 1 0.00 0.00 +Nonlocal initialize_HR 0.00 1 0.00 0.00 Charge set_rho_core 0.01 1 0.01 0.00 PW_Basis recip2real 0.04 306 0.00 0.03 PW_Basis gathers_scatterp 0.01 306 0.00 0.01 @@ -129,12 +129,12 @@ Gint_interface cal_gint 103.55 120 0.86 90. Gint_interface cal_gint_vlocal 58.66 96 0.61 51.50 Gint_Tools cal_psir_ylm 5.41 17280 0.00 4.75 Gint_k transfer_pvpR 4.83 24 0.20 4.24 -OverlapNew calculate_SR 0.13 1 0.13 0.11 -OverlapNew contributeHk 0.12 192 0.00 0.11 -EkineticNew contributeHR 0.13 24 0.01 0.11 -EkineticNew calculate_HR 0.13 1 0.13 0.11 -NonlocalNew contributeHR 0.79 24 0.03 0.70 -NonlocalNew calculate_HR 0.77 1 0.77 0.68 +Overlap calculate_SR 0.13 1 0.13 0.11 +Overlap contributeHk 0.12 192 0.00 0.11 +Ekinetic contributeHR 0.13 24 0.01 0.11 +Ekinetic calculate_HR 0.13 1 0.13 0.11 +Nonlocal contributeHR 0.79 24 0.03 0.70 +Nonlocal calculate_HR 0.77 1 0.77 0.68 OperatorLCAO contributeHk 0.10 192 0.00 0.09 HSolverLCAO hamiltSolvePsiK 1.08 192 0.01 0.95 DiagoElpa elpa_solve 0.90 192 0.00 0.79 diff --git a/examples/36_gpu/si16_lcao/INPUT b/examples/36_gpu/si16_lcao/INPUT index 1ecbd7e13a..2aea35eb9c 100644 --- a/examples/36_gpu/si16_lcao/INPUT +++ b/examples/36_gpu/si16_lcao/INPUT @@ -3,9 +3,8 @@ INPUT_PARAMETERS suffix autotest calculation scf device gpu -gamma_only 1 # GPU acceleration currently only support gamma_only set to 1. ### Abacus will generate/overwrite a KPT file when gamma_only is set to 1. ks_solver cusolver # if not set, the default ks_solver is cusolver, - # you can also choose genelpa or scalapack_gvx. + # you can also choose cusolvermp or elpa if compiled. #nbands 8 symmetry 1 @@ -26,7 +25,7 @@ smearing_sigma 0.002 #Parameters (5.Mixing) mixing_type broyden -mixing_beta 0.3 +mixing_beta 0.4 ### [1] Energy cutoff determines the quality of numerical quadratures in your calculations. diff --git a/examples/36_gpu/si16_lcao/KPT b/examples/36_gpu/si16_lcao/KPT index da8500ebdb..5acdc7a0f7 100644 --- a/examples/36_gpu/si16_lcao/KPT +++ b/examples/36_gpu/si16_lcao/KPT @@ -1,5 +1,7 @@ K_POINTS 0 Gamma -1 1 1 0 0 0 -###This file will be overwritten by Abacus because either kspacing is used or gamma_only is set to 1 +5 5 5 0 0 0 +### If you are running an energy calculation, please make sure your final energy is +### converged with respect to the k-point settings, unless you set a loose k-point +### mesh on purpose. diff --git a/examples/36_gpu/si16_pw/INPUT b/examples/36_gpu/si16_pw/INPUT index 67e75edbca..c14489af3b 100644 --- a/examples/36_gpu/si16_pw/INPUT +++ b/examples/36_gpu/si16_pw/INPUT @@ -21,7 +21,7 @@ smearing_sigma 0.002 #Parameters (5.Mixing) mixing_type broyden -mixing_beta 0.3 +mixing_beta 0.4 ### [1] Energy cutoff determines the quality of numerical quadratures in your calculations. diff --git a/generate_build_info.sh b/generate_build_info.sh new file mode 100644 index 0000000000..d7a2075cfd --- /dev/null +++ b/generate_build_info.sh @@ -0,0 +1,294 @@ +#!/bin/bash + +# ============================================================================== +# generate_build_info.sh +# +# A script to generate build_info.h for Makefile-based builds. +# It attempts to detect system information, compiler flags, and library versions +# to provide a feature-rich build report similar to the CMake system. +# ============================================================================== + +# set -e # Exit immediately if a command exits with a non-zero status. + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi +OUTPUT_FILE=$1 + +# --- Helper Functions --- + +# Function to get version from a command's output +# Usage: get_version_from_command "" "" +get_version_from_command() { + local cmd="$1" + local regex="$2" + if command -v "$cmd" > /dev/null; then + local output=$($cmd 2>&1) + if [[ $output =~ $regex ]]; then + echo "${BASH_REMATCH[1]}" + return 0 + fi + fi + return 1 +} + +# Function to get version from a header file +# Usage: get_version_from_header "" "" +get_version_from_header() { + local header_path="$1" + local regex="$2" + if [ -f "$header_path" ]; then + local line=$(grep -E "$regex" "$header_path" | head -n 1) + if [[ $line =~ $regex ]]; then + echo "${BASH_REMATCH[1]}" + return 0 + fi + fi + return 1 +} + +# --- Main Detection Logic --- + +# 1. Basic Info +PLATFORM_NAME="CPU" +BUILD_USER=$(whoami) +BUILD_HOST=$(hostname) +CXX_COMPILER_PATH="${CXX:-g++}" +CXX_COMPILER_VERSION=$($CXX_COMPILER_PATH --version 2>&1 | head -n 1) +CXX_FLAGS="${CXXFLAGS:-}" +LINKER_FLAGS="${LDFLAGS:-}" +CUDA_FLAGS="${CUDAFLAGS:-}" + +# Detect Platform based on environment variables +if [ "${USE_ROCM}" == "ON" ]; then PLATFORM_NAME="CPU + AMD ROCm"; fi +if [ "${USE_CUDA}" == "ON" ]; then PLATFORM_NAME="CPU + NVIDIA CUDA"; fi +if [ "${USE_ELPA}" == "ON" ] && [ "${ENABLE_LCAO}" == "ON" ]; then PLATFORM_NAME="${PLATFORM_NAME} + ELPA"; fi + +# 2. MPI +MPI_IMPLEMENTATION="no" +MPI_VERSION="no" +if [ "${ENABLE_MPI}" == "ON" ]; then + MPI_IMPLEMENTATION="Unknown" + MPI_COMPILER="${MPI_CXX_COMPILER:-mpicxx}" + if command -v "$MPI_COMPILER" > /dev/null; then + # Intel MPI (oneAPI) + version=$(get_version_from_command "$MPI_COMPILER --version" "Intel\(R\) oneAPI DPC\+\+/C\+\+ Compiler ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then MPI_IMPLEMENTATION="Intel MPI"; MPI_VERSION="$version"; fi + # Intel MPI (classic) + if [ -z "$version" ]; then + version=$(get_version_from_command "$MPI_COMPILER --version" "icpc \(ICC\) ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then MPI_IMPLEMENTATION="Intel MPI"; MPI_VERSION="$version"; fi + fi + # OpenMPI + if [ -z "$version" ]; then + version=$(get_version_from_command "$MPI_COMPILER --version" "Open MPI ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then MPI_IMPLEMENTATION="OpenMPI"; MPI_VERSION="$version"; fi + fi + # MPICH + if [ -z "$version" ]; then + version=$(get_version_from_command "$MPI_COMPILER --version" "MPICH Version: ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then MPI_IMPLEMENTATION="MPICH"; MPI_VERSION="$version"; fi + fi + # Fallback via mpirun + if [ -z "$version" ] && command -v mpirun > /dev/null; then + mr_out=$(mpirun --version 2>&1) + if [[ $mr_out =~ Open\ MPI\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then + MPI_IMPLEMENTATION="OpenMPI"; MPI_VERSION="${BASH_REMATCH[1]}" + elif [[ $mr_out =~ MPICH\ Version:\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then + MPI_IMPLEMENTATION="MPICH"; MPI_VERSION="${BASH_REMATCH[1]}" + fi + fi + fi + if [ "$MPI_VERSION" == "no" ]; then MPI_VERSION="yes (version unknown)"; else MPI_VERSION="yes (v$MPI_VERSION)"; fi +else + MPI_IMPLEMENTATION="no" + MPI_VERSION="no" +fi + +# 3. OpenMP +OPENMP_VERSION="no" +if [[ "$CXX_FLAGS" == *"-fopenmp"* ]]; then + OPENMP_VERSION="yes (version unknown)" + # Try to get version from compiler + if command -v "$CXX_COMPILER_PATH" > /dev/null; then + version=$($CXX_COMPILER_PATH -dM -E - < /dev/null 2>&1 | grep '#define _OPENMP ' | awk '{print $3}') + if [ -n "$version" ]; then + # Convert YYYYMM to a more readable format if possible + year=$((version / 10000)) + month=$((version % 10000)) + OPENMP_VERSION="yes (v${year}.${month})" + fi + fi +fi + +# 4. MKL +MKL_SUPPORT="no" +if [ -n "$MKLROOT" ]; then + MKL_SUPPORT="yes (version unknown)" + version=$(get_version_from_header "$MKLROOT/include/mkl_version.h" "INTEL_MKL_VERSION ([0-9]+)") + if [ -n "$version" ]; then + major=$((version / 10000)) + minor=$(( (version % 10000) / 100 )) + patch=$((version % 100)) + MKL_SUPPORT="yes (v${major}.${minor}.${patch})" + fi +fi + +# 5. Libxc +LIBXC_VERSION="no" +if [ "${ENABLE_LIBXC}" == "ON" ]; then + LIBXC_VERSION="yes (version unknown)" + # Try pkg-config first + if command -v pkg-config > /dev/null; then + version=$(pkg-config --modversion libxc 2>/dev/null) + if [ -n "$version" ]; then LIBXC_VERSION="yes (v$version)"; fi + fi + # Fallback to header + if [[ "$LIBXC_VERSION" == *"unknown"* ]]; then + # Assuming standard include paths + version=$(get_version_from_header "/usr/include/libxc/libxc.h" "LIBXC_VERSION_ \"([0-9]+\.[0-9]+\.[0-9]+)\"") + if [ -n "$version" ]; then LIBXC_VERSION="yes (v$version)"; fi + fi +fi + +# 6. CUDA +CUDA_VERSION="no" +if [ "${USE_CUDA}" == "ON" ]; then + CUDA_VERSION="yes (version unknown)" + if [ -n "$CUDA_HOME" ]; then + version=$(get_version_from_command "$CUDA_HOME/bin/nvcc --version" "release ([0-9]+\.[0-9]+)") + if [ -n "$version" ]; then CUDA_VERSION="yes (v$version)"; fi + elif command -v nvcc > /dev/null; then + version=$(get_version_from_command "nvcc --version" "release ([0-9]+\.[0-9]+)") + if [ -n "$version" ]; then CUDA_VERSION="yes (v$version)"; fi + fi +fi + +# 7. ROCm/HIP +ROCM_VERSION="no" +if [ "${USE_ROCM}" == "ON" ]; then + ROCM_VERSION="yes (version unknown)" + if [ -n "$ROCM_PATH" ]; then + version=$(get_version_from_command "$ROCM_PATH/bin/hipcc --version" "HIP version: ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then ROCM_VERSION="yes (v$version)"; fi + elif command -v hipcc > /dev/null; then + version=$(get_version_from_command "hipcc --version" "HIP version: ([0-9]+\.[0-9]+\.[0-9]+)") + if [ -n "$version" ]; then ROCM_VERSION="yes (v$version)"; fi + fi +fi + +# 8. DeePMD-kit +DEEPMD_VERSION="no" +if [ -n "$DeePMD_DIR" ]; then + DEEPMD_VERSION="yes (version unknown)" + version=$(get_version_from_header "$DeePMD_DIR/include/deepmd/version.h" "global_install_prefix=\".*deepmd-kit-([0-9]+\.[0-9]+\.[0-9]+)\"") + if [ -n "$version" ]; then DEEPMD_VERSION="yes (v$version)"; else DEEPMD_VERSION="yes (path: $DeePMD_DIR)"; fi +fi + +# 9. ELPA +ELPA_VERSION="no" +if [ "${USE_ELPA}" == "ON" ] && [ -n "$ELPA_DIR" ]; then + ELPA_VERSION="yes (version unknown)" + if [ -f "$ELPA_DIR/bin/elpa2_print_version" ]; then + version=$("$ELPA_DIR/bin/elpa2_print_version" 2>/dev/null) + if [ -n "$version" ]; then ELPA_VERSION="yes ($version)"; fi + else + ELPA_VERSION="yes (path: $ELPA_DIR)" + fi +fi + +# 10. Cereal +CEREAL_VERSION="no" +if [ -n "$CEREAL_DIR" ]; then + CEREAL_VERSION="yes (version unknown)" + major=$(get_version_from_header "$CEREAL_DIR/include/cereal/version.hpp" "__CEREAL_VERSION_MAJOR[[:space:]]+([0-9]+)") + minor=$(get_version_from_header "$CEREAL_DIR/include/cereal/version.hpp" "__CEREAL_VERSION_MINOR[[:space:]]+([0-9]+)") + patch=$(get_version_from_header "$CEREAL_DIR/include/cereal/version.hpp" "__CEREAL_VERSION_PATCH[[:space:]]+([0-9]+)") + if [ -n "$major" ] && [ -n "$minor" ] && [ -n "$patch" ]; then + CEREAL_VERSION="yes (v${major}.${minor}.${patch})" + else + CEREAL_VERSION="yes (path: $CEREAL_DIR)" + fi +fi + +# 11. LibRI +LIBRI_VERSION="no" +if [ -n "$LIBRI_DIR" ]; then + LIBRI_VERSION="yes (version unknown)" + major=$(get_version_from_header "$LIBRI_DIR/include/RI/version.h" "__LIBRI_VERSION_MAJOR[[:space:]]+([0-9]+)") + minor=$(get_version_from_header "$LIBRI_DIR/include/RI/version.h" "__LIBRI_VERSION_MINOR[[:space:]]+([0-9]+)") + patch=$(get_version_from_header "$LIBRI_DIR/include/RI/version.h" "__LIBRI_VERSION_PATCH[[:space:]]+([0-9]+)") + if [ -n "$major" ] && [ -n "$minor" ] && [ -n "$patch" ]; then + LIBRI_VERSION="yes (v${major}.${minor}.${patch})" + else + LIBRI_VERSION="yes (path: $LIBRI_DIR)" + fi +fi + +# 12. LibComm +LIBCOMM_VERSION="no" +if [ -n "$LIBCOMM_DIR" ]; then + LIBCOMM_VERSION="yes (path: $LIBCOMM_DIR)" +fi + +# 13. FFTW (non-MKL) +FFTW3_VERSION="no" +if [ -z "$MKLROOT" ] && [ -n "$FFTW3_INCLUDE_DIR" ]; then + FFTW3_VERSION="yes (version unknown)" + hdr="$FFTW3_INCLUDE_DIR/fftw3.h" + version=$(get_version_from_header "$hdr" "FFTW_VERSION\s+\"([^\"]+)\"") + if [ -n "$version" ]; then FFTW3_VERSION="yes (v$version)"; fi +fi + +# CUDA-aware MPI +CUDA_AWARE_MPI="no" +if [ "${USE_CUDA}" == "ON" ]; then + if command -v ompi_info > /dev/null; then + out=$(ompi_info --parsable --all 2>/dev/null) + if echo "$out" | grep -q "mpi_built_with_cuda_support:value:true"; then + CUDA_AWARE_MPI="yes" + else + CUDA_AWARE_MPI="no (or undetectable)" + fi + else + CUDA_AWARE_MPI="no (or undetectable)" + fi +fi +# --- Final File Generation --- + +INPUT_FILE="source_io/build_info.h.in" + +# Use sed to replace all placeholders with detected values +# Note the use of different delimiters (#) for paths to avoid conflicts with / +sed \ + -e "s#@ABACUS_PLATFORM_NAME@#$PLATFORM_NAME#g" \ + -e "s#@ABACUS_BUILD_TYPE@#${BUILD_TYPE:-Release}#g" \ + -e "s#@ABACUS_BUILD_USER@#$BUILD_USER#g" \ + -e "s#@ABACUS_BUILD_HOST@#$BUILD_HOST#g" \ + -e "s#@ABACUS_CXX_COMPILER_ID@#${CXX_COMPILER_ID:-Unknown}#g" \ + -e "s#@ABACUS_CXX_COMPILER_PATH@#$CXX_COMPILER_PATH#g" \ + -e "s#@ABACUS_CXX_COMPILER_VERSION@#$CXX_COMPILER_VERSION#g" \ + -e "s#@ABACUS_CXX_FLAGS@#$CXX_FLAGS#g" \ + -e "s#@ABACUS_LINKER_FLAGS@#$LINKER_FLAGS#g" \ + -e "s#@ABACUS_CUDA_FLAGS@#$CUDA_FLAGS#g" \ + -e "s#@ABACUS_MPI_IMPLEMENTATION@#$MPI_IMPLEMENTATION#g" \ + -e "s#@ABACUS_MPI_VERSION@#$MPI_VERSION#g" \ + -e "s#@ABACUS_CUDA_AWARE_MPI@#$CUDA_AWARE_MPI#g" \ + -e "s#@ABACUS_OPENMP_VERSION@#$OPENMP_VERSION#g" \ + -e "s#@ABACUS_MKL_SUPPORT@#$MKL_SUPPORT#g" \ + -e "s#@ABACUS_LIBXC_VERSION@#$LIBXC_VERSION#g" \ + -e "s#@ABACUS_FFTW_VERSION@#$FFTW3_VERSION#g" \ + -e "s#@ABACUS_CUDA_VERSION@#$CUDA_VERSION#g" \ + -e "s#@ABACUS_ROCM_VERSION@#$ROCM_VERSION#g" \ + -e "s#@ABACUS_DEEPMD_VERSION@#$DEEPMD_VERSION#g" \ + -e "s#@ABACUS_ELPA_VERSION@#$ELPA_VERSION#g" \ + -e "s#@ABACUS_CEREAL_VERSION@#$CEREAL_VERSION#g" \ + -e "s#@ABACUS_LIBRI_VERSION@#$LIBRI_VERSION#g" \ + -e "s#@ABACUS_LIBCOMM_VERSION@#$LIBCOMM_VERSION#g" \ + -e "s#@ABACUS_ASAN_STATUS@#${ENABLE_ASAN:-no}#g" \ + -e "s#@ABACUS_CMAKE_OPTIONS@#Not available with Makefile#g" \ + -e "s#@ABACUS_CMAKE_FIND_PACKAGES@#Not available with Makefile#g" \ + "$INPUT_FILE" > "$OUTPUT_FILE" + +echo "Generated $OUTPUT_FILE successfully." diff --git a/python/pyabacus/CMakeLists.txt b/python/pyabacus/CMakeLists.txt index 30896c01dd..621087125f 100644 --- a/python/pyabacus/CMakeLists.txt +++ b/python/pyabacus/CMakeLists.txt @@ -96,8 +96,18 @@ execute_process( set(TARGET_PACK pyabacus) set(CMAKE_INSTALL_RPATH "${PYTHON_SITE_PACKAGES}/${TARGET_PACK}") +# Option to build the driver module (requires full ABACUS library) +option(BUILD_PYABACUS_DRIVER "Build PyABACUS driver module" OFF) + # add subdirectories for submodules add_subdirectory(${PROJECT_SOURCE_DIR}/src/hsolver) add_subdirectory(${PROJECT_SOURCE_DIR}/src/ModuleBase) add_subdirectory(${PROJECT_SOURCE_DIR}/src/ModuleNAO) +add_subdirectory(${PROJECT_SOURCE_DIR}/src/ModuleESolver) + +# Conditionally add driver module +if(BUILD_PYABACUS_DRIVER) + message(STATUS "Building PyABACUS driver module") + add_subdirectory(${PROJECT_SOURCE_DIR}/src/ModuleDriver) +endif() diff --git a/python/pyabacus/examples/lcao_workflow_example.py b/python/pyabacus/examples/lcao_workflow_example.py new file mode 100644 index 0000000000..20f2a1db1e --- /dev/null +++ b/python/pyabacus/examples/lcao_workflow_example.py @@ -0,0 +1,283 @@ +#!/usr/bin/env python3 +""" +Example: LCAO workflow with breakpoint support + +This example demonstrates how to use the LCAOWorkflow class to run +LCAO calculations with Python-controlled SCF and breakpoint support. + +Usage: + python lcao_workflow_example.py + +Requirements: + - pyabacus with ESolver support + - Input files (INPUT, STRU, KPT, etc.) in current directory +""" + +import numpy as np +from pathlib import Path + + +def example_basic_scf(): + """ + Basic SCF calculation example. + + Shows how to run a simple SCF calculation and get results. + """ + from pyabacus.esolver import LCAOWorkflow + + print("=" * 60) + print("Example 1: Basic SCF Calculation") + print("=" * 60) + + # Initialize workflow + workflow = LCAOWorkflow("./", gamma_only=True) + workflow.initialize() + + # Run SCF + result = workflow.run_scf(max_iter=100) + + # Print results + print(result.summary()) + print(f"\nEnergy breakdown:") + for key, value in result.energy.to_dict().items(): + print(f" {key}: {value:.8f} Ry") + + +def example_with_callbacks(): + """ + SCF calculation with callbacks example. + + Shows how to register callbacks to monitor SCF progress + and inspect state at breakpoints. + """ + from pyabacus.esolver import LCAOWorkflow + + print("\n" + "=" * 60) + print("Example 2: SCF with Callbacks") + print("=" * 60) + + # Initialize workflow + workflow = LCAOWorkflow("./", gamma_only=True) + workflow.initialize() + + # Define callback for each iteration + def print_iteration_info(wf, iter_num): + energy = wf.energy + drho = wf.drho + print(f" Iter {iter_num:3d}: E = {energy.etot:16.8f} Ry, drho = {drho:.2e}") + + # Define callback for breakpoint before after_scf + def save_final_state(wf): + print("\n[Breakpoint] Before after_scf - saving state...") + + # Get charge density + charge = wf.charge + if charge.rho.size > 0: + print(f" Charge density shape: {charge.rho.shape}") + print(f" Total charge: {charge.total_charge():.6f}") + # Save to file + np.save("charge_density.npy", charge.rho) + print(" Saved charge density to charge_density.npy") + + # Get energy + energy = wf.energy + print(f" Total energy: {energy.etot:.8f} Ry") + + # Get Hamiltonian (if available) + hamiltonian = wf.hamiltonian + if hamiltonian.nbasis > 0: + print(f" Number of basis functions: {hamiltonian.nbasis}") + print(f" Number of k-points: {hamiltonian.nks}") + + print("[Breakpoint] State inspection complete\n") + + # Register callbacks + workflow.register_callback('after_iter', print_iteration_info) + workflow.register_callback('before_after_scf', save_final_state) + + # Run SCF + print("\nStarting SCF iterations:") + result = workflow.run_scf(max_iter=100) + + print(f"\nFinal result: {'Converged' if result.converged else 'Not converged'}") + + +def example_manual_control(): + """ + Manual SCF control example. + + Shows how to manually control the SCF loop for maximum flexibility. + """ + from pyabacus.esolver import LCAOWorkflow + + print("\n" + "=" * 60) + print("Example 3: Manual SCF Control") + print("=" * 60) + + # Initialize workflow + workflow = LCAOWorkflow("./", gamma_only=True) + workflow.initialize() + + # Manual SCF control + workflow.before_scf(istep=0) + + print("\nManual SCF loop:") + max_iter = 100 + for iter_num in range(1, max_iter + 1): + # Run single iteration + workflow.run_scf_step(iter_num) + + # Get current state + energy = workflow.energy + drho = workflow.drho + + print(f" Iter {iter_num}: E = {energy.etot:.8f} Ry") + + # Custom convergence check or early termination + if workflow.is_converged: + print(f"\n Converged at iteration {iter_num}") + break + + # Example: Custom breakpoint at iteration 5 + if iter_num == 5: + print("\n [Custom breakpoint at iter 5]") + print(f" Current energy: {energy.etot:.8f} Ry") + print(f" Current drho: {drho:.2e}") + # Could save intermediate state here + + # Inspect state before finalization + print("\n[Before after_scf]") + charge = workflow.charge + hamiltonian = workflow.hamiltonian + print(f" Charge nspin: {charge.nspin}") + print(f" Hamiltonian nbasis: {hamiltonian.nbasis}") + + # Finalize + workflow.after_scf(istep=0) + print("\nSCF completed.") + + +def example_multi_k(): + """ + Multi-k calculation example. + + Shows how to run calculations with multiple k-points. + """ + from pyabacus.esolver import LCAOWorkflow + + print("\n" + "=" * 60) + print("Example 4: Multi-k Calculation") + print("=" * 60) + + # Initialize workflow with multi-k + workflow = LCAOWorkflow("./", gamma_only=False) + workflow.initialize() + + # Run SCF + result = workflow.run_scf(max_iter=100) + + print(f"\nNumber of k-points: {workflow.nks}") + print(f"Number of bands: {workflow.nbands}") + + # Access k-point specific data + for ik in range(min(workflow.nks, 3)): # Show first 3 k-points + kvec = workflow.get_kvec(ik) + eigenvalues = workflow.get_eigenvalues(ik) + print(f"\nK-point {ik}: ({kvec[0]:.4f}, {kvec[1]:.4f}, {kvec[2]:.4f})") + if eigenvalues.size > 0: + print(f" Eigenvalues (first 5): {eigenvalues[:5]}") + + +def example_data_extraction(): + """ + Data extraction example. + + Shows how to extract various data for post-processing. + """ + from pyabacus.esolver import LCAOWorkflow + + print("\n" + "=" * 60) + print("Example 5: Data Extraction") + print("=" * 60) + + workflow = LCAOWorkflow("./", gamma_only=True) + workflow.initialize() + + # Run SCF + result = workflow.run_scf(max_iter=100) + + # Extract data + print("\n1. Energy Data:") + energy = result.energy + print(f" Total energy: {energy.etot:.8f} Ry ({energy.etot * 13.6057:.8f} eV)") + energy_ev = energy.to_eV() + print(f" Band energy: {energy_ev.eband:.8f} eV") + + print("\n2. Charge Density:") + if result.charge is not None and result.charge.rho.size > 0: + charge = result.charge + print(f" Shape: {charge.rho.shape}") + print(f" Min/Max: {charge.rho.min():.6f} / {charge.rho.max():.6f}") + + print("\n3. Hamiltonian Matrices:") + hamiltonian = workflow.hamiltonian + if hamiltonian.nbasis > 0: + print(f" Number of basis: {hamiltonian.nbasis}") + print(f" Number of k-points: {hamiltonian.nks}") + if len(hamiltonian.Hk) > 0: + print(f" H(k=0) shape: {hamiltonian.Hk[0].shape}") + + print("\n4. Density Matrix:") + dm = workflow.density_matrix + if dm.nks > 0: + print(f" DM dimensions: {dm.nrow} x {dm.ncol}") + print(f" Number of k-points: {dm.nks}") + + +def main(): + """Run all examples.""" + print("PyABACUS LCAO Workflow Examples") + print("================================\n") + + # Check if input files exist + input_file = Path("INPUT") + if not input_file.exists(): + print("Note: INPUT file not found in current directory.") + print("These examples require ABACUS input files (INPUT, STRU, etc.)") + print("Please run from a directory with valid input files.\n") + print("Showing example code structure only...\n") + + # Show code structure without running + import inspect + for func in [example_basic_scf, example_with_callbacks, + example_manual_control, example_data_extraction]: + print(f"\n{'=' * 60}") + print(f"Function: {func.__name__}") + print("=" * 60) + print(func.__doc__) + return + + # Run examples + try: + example_basic_scf() + except Exception as e: + print(f"Example 1 failed: {e}") + + try: + example_with_callbacks() + except Exception as e: + print(f"Example 2 failed: {e}") + + try: + example_manual_control() + except Exception as e: + print(f"Example 3 failed: {e}") + + try: + example_data_extraction() + except Exception as e: + print(f"Example 5 failed: {e}") + + +if __name__ == "__main__": + main() diff --git a/python/pyabacus/pyproject.toml b/python/pyabacus/pyproject.toml index 7b1c4891a8..6b28b35d71 100644 --- a/python/pyabacus/pyproject.toml +++ b/python/pyabacus/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core>=0.3.3", "pybind11"] +requires = ["scikit-build-core>=0.3.3", "pybind11>=2.10.0"] build-backend = "scikit_build_core.build" @@ -12,16 +12,16 @@ authors = [ { name = "Jie Li", email = "lij@aisi.ac.cn" }, { name = "Chenxu Bai", email = "chenxu.bai@stu.pku.edu.cn" }, ] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] [project.optional-dependencies] diff --git a/python/pyabacus/src/ModuleBase/CMakeLists.txt b/python/pyabacus/src/ModuleBase/CMakeLists.txt index e89a065147..8d1ea32942 100644 --- a/python/pyabacus/src/ModuleBase/CMakeLists.txt +++ b/python/pyabacus/src/ModuleBase/CMakeLists.txt @@ -5,6 +5,7 @@ list(APPEND pymodule_base ${BASE_PATH}/kernels/math_kernel_op_vec.cpp ${BASE_PATH}/module_device/memory_op.cpp ${BASE_PATH}/module_device/device.cpp + ${BASE_PATH}/module_device/device_helpers.cpp ) pybind11_add_module(_base_pack MODULE ${pymodule_base}) diff --git a/python/pyabacus/src/ModuleBase/py_base_math.cpp b/python/pyabacus/src/ModuleBase/py_base_math.cpp index 3b2c54ef63..fd58284e78 100644 --- a/python/pyabacus/src/ModuleBase/py_base_math.cpp +++ b/python/pyabacus/src/ModuleBase/py_base_math.cpp @@ -5,8 +5,12 @@ #include "source_base/math_integral.h" #include "source_base/spherical_bessel_transformer.h" +#include "../utils/pybind_utils.h" + namespace py = pybind11; using namespace pybind11::literals; +using namespace pyabacus::utils; + template using overload_cast_ = pybind11::detail::overload_cast_impl; @@ -19,204 +23,99 @@ void bind_base_math(py::module& m) .def_static("dsphbesj", overload_cast_()(&ModuleBase::Sphbes::dsphbesj), "l"_a, "x"_a) .def_static("sphbesj", [](const int n, py::array_t r, const double q, const int l, py::array_t jl) { - py::buffer_info r_info = r.request(); - if (r_info.ndim != 1) - { - throw std::runtime_error("r array must be 1-dimensional"); - } - py::buffer_info jl_info = jl.request(); - if (jl_info.ndim != 1) - { - throw std::runtime_error("jl array must be 1-dimensional"); - } + check_1d_array(r, "r"); + check_1d_array(jl, "jl"); ModuleBase::Sphbes::sphbesj(n, - static_cast(r_info.ptr), + get_array_ptr(r), q, l, - static_cast(jl_info.ptr)); + get_array_ptr(jl)); }) .def_static("dsphbesj", [](const int n, py::array_t r, const double q, const int l, py::array_t djl) { - py::buffer_info r_info = r.request(); - if (r_info.ndim != 1) - { - throw std::runtime_error("r array must be 1-dimensional"); - } - py::buffer_info djl_info = djl.request(); - if (djl_info.ndim != 1) - { - throw std::runtime_error("djl array must be 1-dimensional"); - } + check_1d_array(r, "r"); + check_1d_array(djl, "djl"); ModuleBase::Sphbes::dsphbesj(n, - static_cast(r_info.ptr), + get_array_ptr(r), q, l, - static_cast(djl_info.ptr)); + get_array_ptr(djl)); }) .def_static("sphbes_zeros", [](const int l, const int n, py::array_t zeros) { - py::buffer_info zeros_info = zeros.request(); - if (zeros_info.ndim != 1) - { - throw std::runtime_error("zeros array must be 1-dimensional"); - } - ModuleBase::Sphbes::sphbes_zeros(l, n, static_cast(zeros_info.ptr)); + check_1d_array(zeros, "zeros"); + ModuleBase::Sphbes::sphbes_zeros(l, n, get_array_ptr(zeros)); }); // python binding for class Integral py::class_(m, "Integral") .def(py::init<>()) .def_static("Simpson_Integral", [](const int mesh, py::array_t func, py::array_t rab, double asum) { - py::buffer_info func_info = func.request(); - if (func_info.ndim != 1) - { - throw std::runtime_error("func array must be 1-dimensional"); - } - py::buffer_info rab_info = rab.request(); - if (rab.ndim() != 1) - { - throw std::runtime_error("rab array must be 1-dimensional"); - } + check_1d_array(func, "func"); + check_1d_array(rab, "rab"); double isum = asum; ModuleBase::Integral::Simpson_Integral(mesh, - static_cast(func_info.ptr), - static_cast(rab_info.ptr), + get_array_ptr(func), + get_array_ptr(rab), isum); return isum; }) .def_static("Simpson_Integral", [](const int mesh, py::array_t func, const double dr, double asum){ - py::buffer_info func_info = func.request(); - if (func_info.ndim != 1) - { - throw std::runtime_error("func array must be 1-dimensional"); - } - - double isum = asum; - ModuleBase::Integral::Simpson_Integral(mesh, - static_cast(func_info.ptr), - dr, - isum); - return isum; + check_1d_array(func, "func"); + + double isum = asum; + ModuleBase::Integral::Simpson_Integral(mesh, + get_array_ptr(func), + dr, + isum); + return isum; }) .def_static("Simpson_Integral_0toall", [](const int mesh, py::array_t func, py::array_t rab, py::array_t asum){ - py::buffer_info func_info = func.request(); - if (func_info.ndim != 1) - { - throw std::runtime_error("func array must be 1-dimensional"); - } - py::buffer_info rab_info = rab.request(); - if (rab.ndim() != 1) - { - throw std::runtime_error("rab array must be 1-dimensional"); - } - py::buffer_info asum_info = asum.request(); - if (asum.ndim() != 1) - { - throw std::runtime_error("asum array must be 1-dimensional"); - } + check_1d_array(func, "func"); + check_1d_array(rab, "rab"); + check_1d_array(asum, "asum"); ModuleBase::Integral::Simpson_Integral_0toall(mesh, - static_cast(func_info.ptr), - static_cast(rab_info.ptr), - static_cast(asum_info.ptr)); + get_array_ptr(func), + get_array_ptr(rab), + get_array_ptr(asum)); }) .def_static("Simpson_Integral_alltoinf", [](const int mesh, py::array_t func, py::array_t rab, py::array_t asum){ - py::buffer_info func_info = func.request(); - if (func_info.ndim != 1) - { - throw std::runtime_error("func array must be 1-dimensional"); - } - py::buffer_info rab_info = rab.request(); - if (rab.ndim() != 1) - { - throw std::runtime_error("rab array must be 1-dimensional"); - } - py::buffer_info asum_info = asum.request(); - if (asum.ndim() != 1) - { - throw std::runtime_error("asum array must be 1-dimensional"); - } + check_1d_array(func, "func"); + check_1d_array(rab, "rab"); + check_1d_array(asum, "asum"); ModuleBase::Integral::Simpson_Integral_alltoinf(mesh, - static_cast(func_info.ptr), - static_cast(rab_info.ptr), - static_cast(asum_info.ptr)); - }) - .def_static("Simpson_Integral_alltoinf", [](const int mesh, py::array_t func, py::array_t rab, py::array_t asum){ - py::buffer_info func_info = func.request(); - if (func_info.ndim != 1) - { - throw std::runtime_error("func array must be 1-dimensional"); - } - py::buffer_info rab_info = rab.request(); - if (rab.ndim() != 1) - { - throw std::runtime_error("rab array must be 1-dimensional"); - } - py::buffer_info asum_info = asum.request(); - if (asum.ndim() != 1) - { - throw std::runtime_error("asum array must be 1-dimensional"); - } - ModuleBase::Integral::Simpson_Integral_alltoinf(mesh, - static_cast(func_info.ptr), - static_cast(rab_info.ptr), - static_cast(asum_info.ptr)); + get_array_ptr(func), + get_array_ptr(rab), + get_array_ptr(asum)); }) .def_static("simpson", [](const int n, py::array_t f, const double dx){ - py::buffer_info f_info = f.request(); - if (f_info.ndim != 1) - { - throw std::runtime_error("f array must be 1-dimensional"); - } + check_1d_array(f, "f"); return ModuleBase::Integral::simpson(n, - static_cast(f_info.ptr), + get_array_ptr(f), dx); }) .def_static("simpson", [](const int n, py::array_t f, py::array_t h){ - py::buffer_info f_info = f.request(); - if (f_info.ndim != 1) - { - throw std::runtime_error("f array must be 1-dimensional"); - } - py::buffer_info h_info = h.request(); - if (h.ndim() != 1) - { - throw std::runtime_error("h array must be 1-dimensional"); - } + check_1d_array(f, "f"); + check_1d_array(h, "h"); return ModuleBase::Integral::simpson(n, - static_cast(f_info.ptr), - static_cast(h_info.ptr)); + get_array_ptr(f), + get_array_ptr(h)); }) .def_static("Gauss_Legendre_grid_and_weight", [](const int n, py::array_t x, py::array_t w){ - py::buffer_info x_info = x.request(); - if (x_info.ndim != 1) - { - throw std::runtime_error("x array must be 1-dimensional"); - } - py::buffer_info w_info = w.request(); - if (w.ndim() != 1) - { - throw std::runtime_error("w array must be 1-dimensional"); - } + check_1d_array(x, "x"); + check_1d_array(w, "w"); ModuleBase::Integral::Gauss_Legendre_grid_and_weight(n, - static_cast(x_info.ptr), - static_cast(w_info.ptr)); + get_array_ptr(x), + get_array_ptr(w)); }) .def_static("Gauss_Legendre_grid_and_weight", [](const double xmin, const double xmax, const int n, py::array_t x, py::array_t w){ - py::buffer_info x_info = x.request(); - if (x_info.ndim != 1) - { - throw std::runtime_error("x array must be 1-dimensional"); - } - py::buffer_info w_info = w.request(); - if (w.ndim() != 1) - { - throw std::runtime_error("w array must be 1-dimensional"); - } + check_1d_array(x, "x"); + check_1d_array(w, "w"); ModuleBase::Integral::Gauss_Legendre_grid_and_weight(xmin, xmax, n, - static_cast(x_info.ptr), - static_cast(w_info.ptr)); + get_array_ptr(x), + get_array_ptr(w)); }); py::class_(m, "SphericalBesselTransformer") .def(py::init<>()); @@ -227,4 +126,4 @@ PYBIND11_MODULE(_base_pack, m) m.doc() = "Submodule for pyabacus: ModuleBase"; bind_base_math(m); -} \ No newline at end of file +} diff --git a/python/pyabacus/src/ModuleDriver/CMakeLists.txt b/python/pyabacus/src/ModuleDriver/CMakeLists.txt new file mode 100644 index 0000000000..9eb8f764e0 --- /dev/null +++ b/python/pyabacus/src/ModuleDriver/CMakeLists.txt @@ -0,0 +1,21 @@ +# CMakeLists.txt for ModuleDriver Python bindings +# This module provides Python bindings for the ABACUS Driver +# +# IMPORTANT: This module requires the full ABACUS library to be built with -fPIC. +# Currently, the standard ABACUS build does not support this. +# +# To use pyabacus.abacus(), you need to: +# 1. Build ABACUS as a shared library (not yet supported upstream) +# 2. Or use the subprocess-based fallback implementation +# +# For now, this module is disabled and the Python-side implementation +# uses subprocess to call the abacus executable. + +message(STATUS "PyABACUS driver module: C++ bindings require ABACUS to be built as a shared library") +message(STATUS "PyABACUS driver module: Using subprocess-based fallback implementation instead") +message(STATUS "PyABACUS driver module: Skipping C++ driver build") + +# The driver module is not built - Python fallback is used instead +return() + + diff --git a/python/pyabacus/src/ModuleDriver/py_driver.cpp b/python/pyabacus/src/ModuleDriver/py_driver.cpp new file mode 100644 index 0000000000..7f5279e8e7 --- /dev/null +++ b/python/pyabacus/src/ModuleDriver/py_driver.cpp @@ -0,0 +1,660 @@ +/** + * @file py_driver.cpp + * @brief Implementation of PyDriver and pybind11 bindings + * + * This file implements the PyDriver class that wraps the complete ABACUS + * calculation workflow for Python access. + */ + +#include "py_driver.hpp" + +#include +#include +#include + +// ABACUS headers +#include "source_main/driver.h" +#include "source_cell/unitcell.h" +#include "source_cell/check_atomic_stru.h" +#include "source_esolver/esolver.h" +#include "source_io/read_input.h" +#include "source_io/input_conv.h" +#include "source_io/module_parameter/parameter.h" +#include "source_base/global_variable.h" +#include "source_base/global_file.h" +#include "source_base/timer.h" +#include "source_base/memory.h" +#include "source_base/matrix.h" +#include "source_relax/relax_driver.h" + +#include +#include +#include +#include +#include +#include + +namespace py = pybind11; +namespace fs = std::filesystem; + +namespace py_driver +{ + +/** + * @brief RAII class for managing global state + * + * Saves and restores global state to allow multiple calculations + * in the same Python session. + */ +class GlobalStateGuard +{ +public: + GlobalStateGuard() + { + // Save current state + saved_my_rank_ = GlobalV::MY_RANK; + saved_nproc_ = GlobalV::NPROC; + } + + ~GlobalStateGuard() + { + // Restore state + GlobalV::MY_RANK = saved_my_rank_; + GlobalV::NPROC = saved_nproc_; + } + +private: + int saved_my_rank_ = 0; + int saved_nproc_ = 1; +}; + +/** + * @brief Implementation class for PyDriver (PIMPL pattern) + */ +class PyDriver::Impl +{ +public: + Impl() = default; + ~Impl() { cleanup(); } + + void cleanup() + { + if (p_esolver_) + { + delete p_esolver_; + p_esolver_ = nullptr; + } + ucell_.reset(); + } + + // ESolver instance + ModuleESolver::ESolver* p_esolver_ = nullptr; + + // UnitCell instance + std::unique_ptr ucell_; + + // Output stream for running log + std::ofstream ofs_running_; + std::ofstream ofs_warning_; + + // Original working directory + std::string original_cwd_; + + // Null stream for silent mode + std::ofstream null_stream_; + + // Store original stream buffers + std::streambuf* orig_running_buf_ = nullptr; + std::streambuf* orig_warning_buf_ = nullptr; +}; + +PyDriver::PyDriver() : impl_(std::make_unique()) +{ +} + +PyDriver::~PyDriver() +{ + cleanup_context(); +} + +void PyDriver::initialize_context() +{ + // Set up for serial mode (no MPI in Python context) + PARAM.set_pal_param(0, 1, 1); // rank=0, nproc=1, nthread=1 + GlobalV::MY_RANK = 0; + GlobalV::NPROC = 1; + + initialized_ = true; +} + +void PyDriver::cleanup_context() +{ + if (impl_) + { + impl_->cleanup(); + + // Restore original stream buffers + // Note: We use static_cast to std::ostream& because std::ofstream::rdbuf() + // doesn't accept arguments, but std::ostream::rdbuf(streambuf*) does + if (impl_->orig_running_buf_) + { + static_cast(GlobalV::ofs_running).rdbuf(impl_->orig_running_buf_); + impl_->orig_running_buf_ = nullptr; + } + if (impl_->orig_warning_buf_) + { + static_cast(GlobalV::ofs_warning).rdbuf(impl_->orig_warning_buf_); + impl_->orig_warning_buf_ = nullptr; + } + + // Close output streams + if (impl_->ofs_running_.is_open()) + { + impl_->ofs_running_.close(); + } + if (impl_->ofs_warning_.is_open()) + { + impl_->ofs_warning_.close(); + } + if (impl_->null_stream_.is_open()) + { + impl_->null_stream_.close(); + } + + // Restore working directory if changed + if (!impl_->original_cwd_.empty()) + { + try + { + fs::current_path(impl_->original_cwd_); + } + catch (...) + { + // Ignore errors + } + impl_->original_cwd_.clear(); + } + } + + initialized_ = false; +} + +void PyDriver::setup_output(const std::string& output_dir, int verbosity) +{ + std::string out_dir = output_dir.empty() ? "OUT.PYABACUS" : output_dir; + + // Create output directory + fs::create_directories(out_dir); + + // Save original stream buffers + impl_->orig_running_buf_ = GlobalV::ofs_running.rdbuf(); + impl_->orig_warning_buf_ = GlobalV::ofs_warning.rdbuf(); + + // Open log files based on verbosity + if (verbosity >= 1) + { + std::string running_log = out_dir + "/running.log"; + impl_->ofs_running_.open(running_log); + if (impl_->ofs_running_.is_open()) + { + static_cast(GlobalV::ofs_running).rdbuf(impl_->ofs_running_.rdbuf()); + } + } + else + { + // Silent mode - redirect to null + impl_->null_stream_.open("/dev/null"); + if (impl_->null_stream_.is_open()) + { + static_cast(GlobalV::ofs_running).rdbuf(impl_->null_stream_.rdbuf()); + } + } + + std::string warning_log = out_dir + "/warning.log"; + impl_->ofs_warning_.open(warning_log); + if (impl_->ofs_warning_.is_open()) + { + static_cast(GlobalV::ofs_warning).rdbuf(impl_->ofs_warning_.rdbuf()); + } +} + +void PyDriver::read_input( + const std::string& input_dir, + const std::string& input_file, + const std::string& stru_file, + const std::string& kpt_file, + const std::string& pseudo_dir, + const std::string& orbital_dir, + const std::string& output_dir) +{ + // Save original working directory + impl_->original_cwd_ = fs::current_path().string(); + + // Determine input file path + std::string input_path; + if (!input_file.empty()) + { + input_path = fs::absolute(input_file).string(); + } + else + { + input_path = (fs::absolute(input_dir) / "INPUT").string(); + } + + // Check if input file exists + if (!fs::exists(input_path)) + { + throw std::runtime_error("INPUT file not found: " + input_path); + } + + // Change to input directory for relative paths + std::string work_dir = input_dir; + if (work_dir.empty()) + { + work_dir = fs::path(input_path).parent_path().string(); + } + if (!work_dir.empty() && work_dir != ".") + { + fs::current_path(work_dir); + } + + // Read INPUT file + // Note: ReadInput will set PARAM.globalv.global_in_card internally + ModuleIO::ReadInput reader(0); // rank 0 + std::string input_filename = fs::path(input_path).filename().string(); + reader.read_parameters(PARAM, input_filename); + + // Create output directory + reader.create_directory(PARAM); + + // Convert input parameters to internal format + Input_Conv::Convert(); +} + +CalculationResult PyDriver::collect_results(bool calculate_force, bool calculate_stress) +{ + CalculationResult result; + + if (!impl_->p_esolver_ || !impl_->ucell_) + { + return result; + } + + // Get convergence info + result.converged = impl_->p_esolver_->conv_esolver; + + // Get energy + result.etot = impl_->p_esolver_->cal_energy(); + + // Get system info from UnitCell + result.nat = impl_->ucell_->nat; + result.ntype = impl_->ucell_->ntype; + + // Calculate forces if requested + if (calculate_force) + { + ModuleBase::matrix force(result.nat, 3); + impl_->p_esolver_->cal_force(*impl_->ucell_, force); + + // Convert to numpy array + std::vector shape = {static_cast(result.nat), 3}; + result.forces = py::array_t(shape); + auto buf = result.forces.request(); + double* ptr = static_cast(buf.ptr); + + for (int i = 0; i < result.nat; ++i) + { + for (int j = 0; j < 3; ++j) + { + ptr[i * 3 + j] = force(i, j); + } + } + result.has_forces = true; + } + + // Calculate stress if requested + if (calculate_stress) + { + ModuleBase::matrix stress(3, 3); + impl_->p_esolver_->cal_stress(*impl_->ucell_, stress); + + // Convert to numpy array + std::vector shape = {3, 3}; + result.stress = py::array_t(shape); + auto buf = result.stress.request(); + double* ptr = static_cast(buf.ptr); + + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + ptr[i * 3 + j] = stress(i, j); + } + } + result.has_stress = true; + } + + // Collect output file tracking information + result.output_dir = PARAM.sys.global_out_dir; + + // Find the log file + if (!result.output_dir.empty() && fs::exists(result.output_dir)) + { + // Look for running_*.log files + std::vector log_patterns = { + "running_scf.log", + "running_relax.log", + "running_cell-relax.log", + "running_nscf.log", + "running_md.log" + }; + + for (const auto& log_name : log_patterns) + { + std::string log_path = result.output_dir + "/" + log_name; + if (fs::exists(log_path)) + { + result.log_file = log_path; + break; + } + } + + // Iterate directory to populate output_files map + try + { + for (const auto& entry : fs::directory_iterator(result.output_dir)) + { + if (entry.is_regular_file()) + { + std::string filename = entry.path().filename().string(); + std::string full_path = entry.path().string(); + result.output_files[filename] = full_path; + } + } + } + catch (const std::exception& e) + { + // Ignore errors during directory iteration + } + } + + return result; +} + +CalculationResult PyDriver::run( + const std::string& input_dir, + const std::string& input_file, + const std::string& stru_file, + const std::string& kpt_file, + const std::string& pseudo_dir, + const std::string& orbital_dir, + const std::string& output_dir, + bool calculate_force, + bool calculate_stress, + int verbosity) +{ + // Use RAII guard for global state + GlobalStateGuard state_guard; + + // Clean up any previous calculation + cleanup_context(); + + // Initialize context + initialize_context(); + + // Setup output + setup_output(output_dir, verbosity); + + // Start timer + ModuleBase::timer::start(); + + try + { + // Read input files + read_input(input_dir, input_file, stru_file, kpt_file, + pseudo_dir, orbital_dir, output_dir); + + // Create UnitCell + impl_->ucell_ = std::make_unique(); + impl_->ucell_->setup( + PARAM.inp.latname, + PARAM.inp.ntype, + PARAM.inp.lmaxmax, + PARAM.inp.init_vel, + PARAM.inp.fixed_axes + ); + + // Read structure + impl_->ucell_->setup_cell(PARAM.globalv.global_in_stru, GlobalV::ofs_running); + + // Check atomic structure + unitcell::check_atomic_stru(*impl_->ucell_, PARAM.inp.min_dist_coef); + + // Initialize ESolver + impl_->p_esolver_ = ModuleESolver::init_esolver(PARAM.inp, *impl_->ucell_); + + // Run before_all_runners + impl_->p_esolver_->before_all_runners(*impl_->ucell_, PARAM.inp); + + // Run calculation based on calculation type + const std::string& cal = PARAM.inp.calculation; + + if (cal == "scf" || cal == "relax" || cal == "cell-relax" || cal == "nscf") + { + Relax_Driver rl_driver; + rl_driver.relax_driver(impl_->p_esolver_, *impl_->ucell_, PARAM.inp); + } + else if (cal == "get_s") + { + impl_->p_esolver_->runner(*impl_->ucell_, 0); + } + else + { + throw std::runtime_error("Unsupported calculation type: " + cal); + } + + // Collect results + last_result_ = collect_results(calculate_force, calculate_stress); + + // Run after_all_runners + impl_->p_esolver_->after_all_runners(*impl_->ucell_); + } + catch (const std::exception& e) + { + // Stop timer on error + ModuleBase::timer::finish(GlobalV::ofs_running); + // Clean up on error + cleanup_context(); + throw; + } + + // Stop timer + ModuleBase::timer::finish(GlobalV::ofs_running); + + // Print memory usage + ModuleBase::Memory::print_all(GlobalV::ofs_running); + + return last_result_; +} + +} // namespace py_driver + +// ============================================================================ +// Pybind11 Module Definition +// ============================================================================ + +PYBIND11_MODULE(_driver_pack, m) +{ + m.doc() = R"pbdoc( + PyABACUS Driver Module + ---------------------- + + This module provides Python bindings for running complete ABACUS + DFT calculations. + + Main Classes + ------------ + PyDriver : Main driver class for running calculations + CalculationResult : Container for calculation results + + Example + ------- + >>> from pyabacus.driver import PyDriver + >>> driver = PyDriver() + >>> result = driver.run("./Si_scf/") + >>> print(f"Energy: {result.etot_eV()} eV") + >>> print(result.summary()) + )pbdoc"; + + // Bind CalculationResult + py::class_(m, "CalculationResult", + R"pbdoc( + Container for DFT calculation results. + + Attributes + ---------- + converged : bool + Whether SCF converged + niter : int + Number of SCF iterations + drho : float + Final charge density difference + etot : float + Total energy in Rydberg + forces : numpy.ndarray + Forces on atoms (nat, 3) in Ry/Bohr + stress : numpy.ndarray + Stress tensor (3, 3) in kbar + )pbdoc") + .def(py::init<>()) + .def_readonly("converged", &py_driver::CalculationResult::converged, + "Whether SCF converged") + .def_readonly("niter", &py_driver::CalculationResult::niter, + "Number of SCF iterations") + .def_readonly("drho", &py_driver::CalculationResult::drho, + "Final charge density difference") + .def_readonly("etot", &py_driver::CalculationResult::etot, + "Total energy (Ry)") + .def_readonly("eband", &py_driver::CalculationResult::eband, + "Band energy (Ry)") + .def_readonly("hartree_energy", &py_driver::CalculationResult::hartree_energy, + "Hartree energy (Ry)") + .def_readonly("etxc", &py_driver::CalculationResult::etxc, + "Exchange-correlation energy (Ry)") + .def_readonly("ewald_energy", &py_driver::CalculationResult::ewald_energy, + "Ewald energy (Ry)") + .def_readonly("demet", &py_driver::CalculationResult::demet, + "-TS term for metals (Ry)") + .def_readonly("exx", &py_driver::CalculationResult::exx, + "Exact exchange energy (Ry)") + .def_readonly("evdw", &py_driver::CalculationResult::evdw, + "van der Waals energy (Ry)") + .def_readonly("forces", &py_driver::CalculationResult::forces, + "Forces on atoms (nat, 3) in Ry/Bohr") + .def_readonly("has_forces", &py_driver::CalculationResult::has_forces, + "Whether forces are available") + .def_readonly("stress", &py_driver::CalculationResult::stress, + "Stress tensor (3, 3) in kbar") + .def_readonly("has_stress", &py_driver::CalculationResult::has_stress, + "Whether stress is available") + .def_readonly("fermi_energy", &py_driver::CalculationResult::fermi_energy, + "Fermi energy (eV)") + .def_readonly("bandgap", &py_driver::CalculationResult::bandgap, + "Band gap (eV)") + .def_readonly("nat", &py_driver::CalculationResult::nat, + "Number of atoms") + .def_readonly("ntype", &py_driver::CalculationResult::ntype, + "Number of atom types") + .def_readonly("nbands", &py_driver::CalculationResult::nbands, + "Number of bands") + .def_readonly("nks", &py_driver::CalculationResult::nks, + "Number of k-points") + .def_readonly("output_dir", &py_driver::CalculationResult::output_dir, + "Path to output directory (OUT.$suffix)") + .def_readonly("log_file", &py_driver::CalculationResult::log_file, + "Path to the main log file") + .def_readonly("output_files", &py_driver::CalculationResult::output_files, + "Dictionary of output files (filename -> full path)") + .def("etot_eV", &py_driver::CalculationResult::etot_eV, + "Get total energy in eV") + .def("get_energies", &py_driver::CalculationResult::get_energies, + "Get all energies as a dictionary") + .def("get_forces_eV_Ang", &py_driver::CalculationResult::get_forces_eV_Ang, + "Get forces in eV/Angstrom") + .def("summary", &py_driver::CalculationResult::summary, + "Get a summary string of the calculation result") + .def("__repr__", [](const py_driver::CalculationResult& r) { + std::ostringstream ss; + ss << ""; + return ss.str(); + }); + + // Bind PyDriver + py::class_(m, "PyDriver", + R"pbdoc( + Python wrapper for ABACUS Driver. + + This class provides a Python interface for running complete ABACUS + DFT calculations. + + Example + ------- + >>> driver = PyDriver() + >>> result = driver.run( + ... input_dir="./Si_scf/", + ... calculate_force=True, + ... calculate_stress=True + ... ) + >>> print(f"Energy: {result.etot_eV()} eV") + >>> print(f"Converged: {result.converged}") + )pbdoc") + .def(py::init<>()) + .def("run", &py_driver::PyDriver::run, + R"pbdoc( + Run a complete DFT calculation. + + Parameters + ---------- + input_dir : str, optional + Directory containing INPUT, STRU, KPT files (default: ".") + input_file : str, optional + Explicit path to INPUT file + stru_file : str, optional + Explicit path to STRU file + kpt_file : str, optional + Explicit path to KPT file + pseudo_dir : str, optional + Directory containing pseudopotentials + orbital_dir : str, optional + Directory containing orbital files + output_dir : str, optional + Directory for output files + calculate_force : bool, optional + Whether to calculate forces (default: True) + calculate_stress : bool, optional + Whether to calculate stress (default: False) + verbosity : int, optional + Output verbosity level (0=silent, 1=normal, 2=verbose) + + Returns + ------- + CalculationResult + Container with all calculation results + )pbdoc", + py::arg("input_dir") = ".", + py::arg("input_file") = "", + py::arg("stru_file") = "", + py::arg("kpt_file") = "", + py::arg("pseudo_dir") = "", + py::arg("orbital_dir") = "", + py::arg("output_dir") = "", + py::arg("calculate_force") = true, + py::arg("calculate_stress") = false, + py::arg("verbosity") = 1) + .def("is_ready", &py_driver::PyDriver::is_ready, + "Check if the driver is ready for calculation") + .def("get_last_result", &py_driver::PyDriver::get_last_result, + py::return_value_policy::reference_internal, + "Get the last calculation result"); +} diff --git a/python/pyabacus/src/ModuleDriver/py_driver.hpp b/python/pyabacus/src/ModuleDriver/py_driver.hpp new file mode 100644 index 0000000000..db426cee0b --- /dev/null +++ b/python/pyabacus/src/ModuleDriver/py_driver.hpp @@ -0,0 +1,249 @@ +/** + * @file py_driver.hpp + * @brief Python bindings for ABACUS Driver - complete DFT calculation workflow + * + * This file provides the PyDriver class that wraps the complete ABACUS + * calculation workflow, enabling Python to run full DFT calculations. + */ + +#ifndef PY_DRIVER_HPP +#define PY_DRIVER_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace py = pybind11; + +namespace py_driver +{ + +/** + * @brief Result container for calculation results + * + * Stores all results from a DFT calculation including energies, + * forces, stress, and convergence information. + */ +struct CalculationResult +{ + // Convergence info + bool converged = false; + int niter = 0; + double drho = 0.0; + + // Energies (in Rydberg) + double etot = 0.0; + double eband = 0.0; + double hartree_energy = 0.0; + double etxc = 0.0; + double ewald_energy = 0.0; + double demet = 0.0; + double exx = 0.0; + double evdw = 0.0; + + // Forces (nat x 3, in Ry/Bohr) + py::array_t forces; + bool has_forces = false; + + // Stress (3 x 3, in kbar) + py::array_t stress; + bool has_stress = false; + + // Electronic structure info + double fermi_energy = 0.0; // in eV + double bandgap = 0.0; // in eV + int nat = 0; + int ntype = 0; + int nbands = 0; + int nks = 0; + + // Output file tracking + std::string output_dir = ""; // Path to OUT.$suffix folder + std::string log_file = ""; // Path to the main log file + std::map output_files; // filename -> full path + + // Unit conversion constants + static constexpr double Ry_to_eV = 13.605693122994; + static constexpr double Bohr_to_Ang = 0.529177249; + + // Convenience methods + double etot_eV() const { return etot * Ry_to_eV; } + + py::dict get_energies() const + { + py::dict result; + result["etot"] = etot; + result["etot_eV"] = etot * Ry_to_eV; + result["eband"] = eband; + result["hartree_energy"] = hartree_energy; + result["etxc"] = etxc; + result["ewald_energy"] = ewald_energy; + result["demet"] = demet; + result["exx"] = exx; + result["evdw"] = evdw; + return result; + } + + py::array_t get_forces_eV_Ang() const + { + if (!has_forces) + { + throw std::runtime_error("Forces not available. Set calculate_force=True."); + } + // Convert from Ry/Bohr to eV/Ang + auto buf = forces.request(); + auto result = py::array_t(buf.shape); + auto result_buf = result.request(); + double* src = static_cast(buf.ptr); + double* dst = static_cast(result_buf.ptr); + double factor = Ry_to_eV / Bohr_to_Ang; + for (ssize_t i = 0; i < buf.size; ++i) + { + dst[i] = src[i] * factor; + } + return result; + } + + std::string summary() const + { + std::ostringstream ss; + ss << "=== ABACUS Calculation Result ===\n"; + ss << "Converged: " << (converged ? "Yes" : "No") << "\n"; + ss << "SCF iterations: " << niter << "\n"; + ss << "Final drho: " << std::scientific << drho << "\n"; + ss << "\nEnergies:\n"; + ss << std::fixed << std::setprecision(8); + ss << " Total energy: " << etot << " Ry (" << etot * Ry_to_eV << " eV)\n"; + ss << " Band energy: " << eband << " Ry\n"; + ss << " Hartree: " << hartree_energy << " Ry\n"; + ss << " XC energy: " << etxc << " Ry\n"; + ss << " Ewald: " << ewald_energy << " Ry\n"; + if (has_forces) + { + ss << "\nForces: calculated (" << nat << " atoms)\n"; + } + if (has_stress) + { + ss << "Stress: calculated\n"; + } + ss << "\nSystem info:\n"; + ss << " Atoms: " << nat << ", Types: " << ntype << "\n"; + ss << " Bands: " << nbands << ", K-points: " << nks << "\n"; + if (fermi_energy != 0.0) + { + ss << " Fermi energy: " << fermi_energy << " eV\n"; + } + if (bandgap > 0.0) + { + ss << " Band gap: " << bandgap << " eV\n"; + } + // Output file tracking + if (!output_dir.empty()) + { + ss << "\nOutput:\n"; + ss << " Directory: " << output_dir << "\n"; + if (!log_file.empty()) + { + // Extract just the filename from the path + size_t pos = log_file.find_last_of("/\\"); + std::string log_filename = (pos != std::string::npos) ? log_file.substr(pos + 1) : log_file; + ss << " Log file: " << log_filename << "\n"; + } + if (!output_files.empty()) + { + ss << " Files: " << output_files.size() << " output files\n"; + } + } + return ss.str(); + } +}; + +/** + * @brief Python wrapper for ABACUS Driver + * + * This class provides a Python interface for running complete ABACUS + * DFT calculations. It handles: + * - Input file reading (INPUT, STRU, KPT) + * - ESolver initialization and execution + * - Result collection (energy, forces, stress) + * - Global state management + */ +class PyDriver +{ +public: + PyDriver(); + ~PyDriver(); + + // Disable copy + PyDriver(const PyDriver&) = delete; + PyDriver& operator=(const PyDriver&) = delete; + + /** + * @brief Run a complete DFT calculation + * + * @param input_dir Directory containing INPUT, STRU, KPT files + * @param input_file Optional: explicit path to INPUT file + * @param stru_file Optional: explicit path to STRU file + * @param kpt_file Optional: explicit path to KPT file + * @param pseudo_dir Optional: directory containing pseudopotentials + * @param orbital_dir Optional: directory containing orbital files + * @param output_dir Optional: directory for output files + * @param calculate_force Whether to calculate forces + * @param calculate_stress Whether to calculate stress + * @param verbosity Output verbosity level (0=silent, 1=normal, 2=verbose) + * @return CalculationResult containing all results + */ + CalculationResult run( + const std::string& input_dir = ".", + const std::string& input_file = "", + const std::string& stru_file = "", + const std::string& kpt_file = "", + const std::string& pseudo_dir = "", + const std::string& orbital_dir = "", + const std::string& output_dir = "", + bool calculate_force = true, + bool calculate_stress = false, + int verbosity = 1 + ); + + /** + * @brief Check if the driver is ready for calculation + */ + bool is_ready() const { return initialized_; } + + /** + * @brief Get the last calculation result + */ + const CalculationResult& get_last_result() const { return last_result_; } + +private: + class Impl; + std::unique_ptr impl_; + + bool initialized_ = false; + CalculationResult last_result_; + + // Internal methods + void initialize_context(); + void cleanup_context(); + void read_input(const std::string& input_dir, + const std::string& input_file, + const std::string& stru_file, + const std::string& kpt_file, + const std::string& pseudo_dir, + const std::string& orbital_dir, + const std::string& output_dir); + void setup_output(const std::string& output_dir, int verbosity); + CalculationResult collect_results(bool calculate_force, bool calculate_stress); +}; + +} // namespace py_driver + +#endif // PY_DRIVER_HPP diff --git a/python/pyabacus/src/ModuleESolver/CMakeLists.txt b/python/pyabacus/src/ModuleESolver/CMakeLists.txt new file mode 100644 index 0000000000..e45f032dcf --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/CMakeLists.txt @@ -0,0 +1,53 @@ +# CMakeLists.txt for ModuleESolver Python bindings +# This module provides Python bindings for ESolver_KS_LCAO + +# Set paths for ESolver related sources +set(ESOLVER_PATH "${ABACUS_SOURCE_DIR}/source_esolver") +set(ESTATE_PATH "${ABACUS_SOURCE_DIR}/source_estate") +set(LCAO_PATH "${ABACUS_SOURCE_DIR}/source_lcao") +set(HAMILT_PATH "${ABACUS_SOURCE_DIR}/source_hamilt") +set(CELL_PATH "${ABACUS_SOURCE_DIR}/source_cell") +set(PSI_PATH "${ABACUS_SOURCE_DIR}/source_psi") +set(BASIS_PATH "${ABACUS_SOURCE_DIR}/source_basis") +set(IO_PATH "${ABACUS_SOURCE_DIR}/source_io") + +# Python module source files - only the binding code +list(APPEND pymodule_esolver + ${PROJECT_SOURCE_DIR}/src/ModuleESolver/py_esolver_lcao.cpp +) + +# Create pybind11 module +pybind11_add_module(_esolver_pack MODULE ${pymodule_esolver}) + +target_include_directories(_esolver_pack PRIVATE + ${ABACUS_SOURCE_DIR} + ${ESOLVER_PATH} + ${ESTATE_PATH} + ${ESTATE_PATH}/module_charge + ${ESTATE_PATH}/module_dm + ${ESTATE_PATH}/potentials + ${LCAO_PATH} + ${LCAO_PATH}/module_hcontainer + ${HAMILT_PATH} + ${CELL_PATH} + ${PSI_PATH} + ${BASIS_PATH} + ${BASIS_PATH}/module_ao + ${BASIS_PATH}/module_nao + ${IO_PATH} + ${IO_PATH}/module_parameter +) + +# Only link pybind11 headers - the module uses placeholder implementations +# that don't require actual ABACUS libraries +target_link_libraries(_esolver_pack PRIVATE + pybind11::headers +) + +target_compile_definitions(_esolver_pack PRIVATE VERSION_INFO=${PROJECT_VERSION}) + +# Set RPATH for shared libraries +set_target_properties(_esolver_pack PROPERTIES INSTALL_RPATH "$ORIGIN") + +# Install targets +install(TARGETS _esolver_pack DESTINATION ${TARGET_PACK}/esolver) diff --git a/python/pyabacus/src/ModuleESolver/components/charge_mixer_wrapper.hpp b/python/pyabacus/src/ModuleESolver/components/charge_mixer_wrapper.hpp new file mode 100644 index 0000000000..0fc299ddf6 --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/components/charge_mixer_wrapper.hpp @@ -0,0 +1,314 @@ +/** + * @file charge_mixer_wrapper.hpp + * @brief Wrapper implementation for ABACUS Charge_Mixing + * + * Wraps the ABACUS Charge_Mixing class to implement IChargeMixer interface. + */ + +#ifndef PYABACUS_ESOLVER_CHARGE_MIXER_WRAPPER_HPP +#define PYABACUS_ESOLVER_CHARGE_MIXER_WRAPPER_HPP + +#include "../interfaces/i_charge_mixer.hpp" +#include "../../utils/pybind_utils.h" + +#include +#include + +namespace pyabacus { +namespace esolver { + +/** + * @brief Wrapper for ABACUS Charge_Mixing class + * + * This class wraps the ABACUS charge mixing functionality + * to provide a clean Python interface. + */ +class ChargeMixerWrapper : public IChargeMixer +{ +public: + ChargeMixerWrapper() = default; + + ChargeMixerWrapper(int nspin, int nrxx) + : nspin_(nspin), nrxx_(nrxx) + { + // Initialize history buffers for Pulay mixing + rho_history_.reserve(config_.ndim); + residual_history_.reserve(config_.ndim); + } + + ~ChargeMixerWrapper() override = default; + + // ==================== Core Mixing Operations ==================== + + py::array_t mix(const py::array_t& rho_in, + const py::array_t& rho_out) override + { + using namespace pyabacus::utils; + + // Validate input arrays + check_array_size(rho_in, static_cast(nspin_ * nrxx_), "rho_in"); + check_array_size(rho_out, static_cast(nspin_ * nrxx_), "rho_out"); + + const double* in_ptr = get_array_ptr(rho_in); + const double* out_ptr = get_array_ptr(rho_out); + + // Create output array + py::array_t rho_mixed({static_cast(nspin_), + static_cast(nrxx_)}); + double* mixed_ptr = get_array_ptr(rho_mixed); + + // Calculate drho + drho_ = 0.0; + for (size_t i = 0; i < static_cast(nspin_ * nrxx_); ++i) + { + double diff = out_ptr[i] - in_ptr[i]; + drho_ += diff * diff; + } + drho_ = std::sqrt(drho_ / (nspin_ * nrxx_)); + + // Perform mixing based on method + switch (config_.method) + { + case MixingMethod::Plain: + mix_plain(in_ptr, out_ptr, mixed_ptr); + break; + case MixingMethod::Pulay: + mix_pulay(in_ptr, out_ptr, mixed_ptr); + break; + case MixingMethod::Broyden: + mix_broyden(in_ptr, out_ptr, mixed_ptr); + break; + case MixingMethod::Anderson: + mix_anderson(in_ptr, out_ptr, mixed_ptr); + break; + default: + mix_plain(in_ptr, out_ptr, mixed_ptr); + } + + iteration_++; + return rho_mixed; + } + + void reset() override + { + iteration_ = 0; + drho_ = 0.0; + rho_history_.clear(); + residual_history_.clear(); + } + + // ==================== State Queries ==================== + + double get_drho() const override { return drho_; } + + int get_iteration() const override { return iteration_; } + + // ==================== Configuration ==================== + + void set_config(const MixingConfig& config) override + { + config_ = config; + reset(); // Reset history when config changes + } + + MixingConfig get_config() const override { return config_; } + + void set_mixing_beta(double beta) override + { + if (beta <= 0.0 || beta > 1.0) + { + throw std::invalid_argument("beta must be in (0, 1]"); + } + config_.beta = beta; + } + + double get_mixing_beta() const override { return config_.beta; } + + void set_mixing_method(MixingMethod method) override + { + config_.method = method; + reset(); + } + + MixingMethod get_mixing_method() const override { return config_.method; } + + // ==================== Dimension Setters ==================== + + void set_dimensions(int nspin, int nrxx) + { + nspin_ = nspin; + nrxx_ = nrxx; + reset(); + } + +private: + // Plain linear mixing: rho_new = (1-beta)*rho_in + beta*rho_out + void mix_plain(const double* rho_in, const double* rho_out, double* rho_mixed) + { + const double beta = config_.beta; + const double one_minus_beta = 1.0 - beta; + + for (size_t i = 0; i < static_cast(nspin_ * nrxx_); ++i) + { + rho_mixed[i] = one_minus_beta * rho_in[i] + beta * rho_out[i]; + } + } + + // Pulay mixing (DIIS) + void mix_pulay(const double* rho_in, const double* rho_out, double* rho_mixed) + { + const size_t size = static_cast(nspin_ * nrxx_); + + // Store current rho and residual in history + std::vector current_rho(rho_in, rho_in + size); + std::vector current_residual(size); + for (size_t i = 0; i < size; ++i) + { + current_residual[i] = rho_out[i] - rho_in[i]; + } + + // Add to history (circular buffer) + if (static_cast(rho_history_.size()) >= config_.ndim) + { + rho_history_.erase(rho_history_.begin()); + residual_history_.erase(residual_history_.begin()); + } + rho_history_.push_back(current_rho); + residual_history_.push_back(current_residual); + + const int nhist = static_cast(rho_history_.size()); + + if (nhist < 2) + { + // Not enough history, use plain mixing + mix_plain(rho_in, rho_out, rho_mixed); + return; + } + + // Build overlap matrix of residuals + std::vector A((nhist + 1) * (nhist + 1), 0.0); + std::vector b(nhist + 1, 0.0); + + for (int i = 0; i < nhist; ++i) + { + for (int j = 0; j <= i; ++j) + { + double dot = 0.0; + for (size_t k = 0; k < size; ++k) + { + dot += residual_history_[i][k] * residual_history_[j][k]; + } + A[i * (nhist + 1) + j] = dot; + A[j * (nhist + 1) + i] = dot; + } + A[i * (nhist + 1) + nhist] = 1.0; + A[nhist * (nhist + 1) + i] = 1.0; + } + b[nhist] = 1.0; + + // Solve linear system for coefficients (simple Gaussian elimination) + std::vector coeff = solve_linear_system(A, b, nhist + 1); + + // Compute mixed density + std::fill(rho_mixed, rho_mixed + size, 0.0); + for (int i = 0; i < nhist; ++i) + { + for (size_t k = 0; k < size; ++k) + { + rho_mixed[k] += coeff[i] * (rho_history_[i][k] + + config_.beta * residual_history_[i][k]); + } + } + } + + // Broyden mixing (simplified) + void mix_broyden(const double* rho_in, const double* rho_out, double* rho_mixed) + { + // For simplicity, use Pulay mixing as approximation + mix_pulay(rho_in, rho_out, rho_mixed); + } + + // Anderson mixing + void mix_anderson(const double* rho_in, const double* rho_out, double* rho_mixed) + { + // Anderson mixing is similar to Pulay + mix_pulay(rho_in, rho_out, rho_mixed); + } + + // Simple linear system solver (Gaussian elimination with partial pivoting) + std::vector solve_linear_system(std::vector& A, + std::vector& b, + int n) + { + std::vector x(n, 0.0); + + // Forward elimination + for (int k = 0; k < n - 1; ++k) + { + // Find pivot + int max_row = k; + double max_val = std::abs(A[k * n + k]); + for (int i = k + 1; i < n; ++i) + { + if (std::abs(A[i * n + k]) > max_val) + { + max_val = std::abs(A[i * n + k]); + max_row = i; + } + } + + // Swap rows + if (max_row != k) + { + for (int j = 0; j < n; ++j) + { + std::swap(A[k * n + j], A[max_row * n + j]); + } + std::swap(b[k], b[max_row]); + } + + // Eliminate + for (int i = k + 1; i < n; ++i) + { + if (std::abs(A[k * n + k]) < 1e-12) continue; + double factor = A[i * n + k] / A[k * n + k]; + for (int j = k; j < n; ++j) + { + A[i * n + j] -= factor * A[k * n + j]; + } + b[i] -= factor * b[k]; + } + } + + // Back substitution + for (int i = n - 1; i >= 0; --i) + { + x[i] = b[i]; + for (int j = i + 1; j < n; ++j) + { + x[i] -= A[i * n + j] * x[j]; + } + if (std::abs(A[i * n + i]) > 1e-12) + { + x[i] /= A[i * n + i]; + } + } + + return x; + } + + int nspin_ = 1; + int nrxx_ = 0; + int iteration_ = 0; + double drho_ = 0.0; + MixingConfig config_; + + // History for Pulay/Broyden mixing + std::vector> rho_history_; + std::vector> residual_history_; +}; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_CHARGE_MIXER_WRAPPER_HPP diff --git a/python/pyabacus/src/ModuleESolver/components/diagonalizer_wrapper.hpp b/python/pyabacus/src/ModuleESolver/components/diagonalizer_wrapper.hpp new file mode 100644 index 0000000000..7ed88294d3 --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/components/diagonalizer_wrapper.hpp @@ -0,0 +1,337 @@ +/** + * @file diagonalizer_wrapper.hpp + * @brief Wrapper implementation for diagonalizers + * + * Wraps the ABACUS diagonalization solvers to implement IDiagonalizer interface. + */ + +#ifndef PYABACUS_ESOLVER_DIAGONALIZER_WRAPPER_HPP +#define PYABACUS_ESOLVER_DIAGONALIZER_WRAPPER_HPP + +#include "../interfaces/i_diagonalizer.hpp" +#include "../../utils/pybind_utils.h" +#include "../../hsolver/diago_adapter.hpp" + +#include + +namespace pyabacus { +namespace esolver { + +/** + * @brief Wrapper for diagonalization solvers + * + * This class wraps the various ABACUS diagonalization methods + * to provide a unified Python interface. + * + * @tparam TK Type for k-space quantities + */ +template +class DiagonalizerWrapper : public IDiagonalizer +{ +public: + DiagonalizerWrapper() = default; + + DiagonalizerWrapper(int nbasis, int nbands) + : nbasis_(nbasis), nbands_(nbands) + { + } + + ~DiagonalizerWrapper() override = default; + + // ==================== Direct Diagonalization ==================== + + DiagResult diagonalize(int ik, + const py::array_t& Hk, + const py::array_t& Sk, + const py::array_t& psi_init) override + { + DiagResult result; + + // For direct diagonalization, we would use LAPACK/ScaLAPACK + // This is a placeholder - actual implementation would call + // the appropriate ABACUS solver + + // Create hpsi and spsi functions from matrices + auto hpsi_func = [&Hk, this](const py::array_t& psi) -> py::array_t { + return matrix_vector_multiply(Hk, psi); + }; + + auto spsi_func = [&Sk, this](const py::array_t& psi) -> py::array_t { + return matrix_vector_multiply(Sk, psi); + }; + + // Use iterative method as fallback + py::array_t precond = compute_preconditioner(Hk); + return diagonalize_iterative(ik, hpsi_func, spsi_func, psi_init, precond); + } + + // ==================== Iterative Diagonalization ==================== + + DiagResult diagonalize_iterative( + int ik, + std::function(const py::array_t&)> hpsi_func, + std::function(const py::array_t&)> spsi_func, + const py::array_t& psi_init, + const py::array_t& precond) override + { + DiagResult result; + + switch (config_.method) + { + case DiagMethod::Davidson: + result = diagonalize_davidson(hpsi_func, psi_init, precond); + break; + case DiagMethod::DavSubspace: + result = diagonalize_dav_subspace(hpsi_func, psi_init, precond); + break; + case DiagMethod::CG: + result = diagonalize_cg(hpsi_func, psi_init, precond); + break; + default: + result = diagonalize_davidson(hpsi_func, psi_init, precond); + } + + return result; + } + + // ==================== Configuration ==================== + + void set_config(const DiagConfig& config) override + { + config_ = config; + } + + DiagConfig get_config() const override { return config_; } + + void set_tolerance(double tol) override + { + config_.tolerance = tol; + } + + void set_max_iterations(int max_iter) override + { + config_.max_iterations = max_iter; + } + + // ==================== Dimension Queries ==================== + + int get_nbasis() const override { return nbasis_; } + + int get_nbands() const override { return nbands_; } + + void set_nbands(int nbands) override { nbands_ = nbands; } + + void set_nbasis(int nbasis) { nbasis_ = nbasis; } + +private: + // Davidson diagonalization + DiagResult diagonalize_davidson( + std::function(const py::array_t&)> hpsi_func, + const py::array_t& psi_init, + const py::array_t& precond) + { + DiagResult result; + + // Create Davidson adapter + hsolver::PyDiagoDavidAdapter david(nbasis_, nbands_); + + // Set initial psi + david.set_psi(psi_init); + david.init_eigenvalue(); + + // Convert preconditioner to vector + std::vector precond_vec(precond.data(), precond.data() + precond.size()); + + // Create diag_ethr vector + std::vector diag_ethr(nbands_, config_.tolerance); + + // Create comm_info (single process for now) + ::hsolver::diag_comm_info comm_info(0, 1); + + // Run diagonalization + int niter = david.diag( + hpsi_func, + precond_vec, + config_.dav_ndim, + config_.tolerance, + diag_ethr, + config_.max_iterations, + config_.use_paw, + comm_info + ); + + // Get results + result.psi = david.get_psi(); + result.eigenvalues = david.get_eigenvalue(); + result.iterations = niter; + result.converged = (niter < config_.max_iterations); + + return result; + } + + // Davidson-Subspace diagonalization + DiagResult diagonalize_dav_subspace( + std::function(const py::array_t&)> hpsi_func, + const py::array_t& psi_init, + const py::array_t& precond) + { + DiagResult result; + + // Create DavSubspace adapter + hsolver::PyDiagoDavSubspaceAdapter dav_sub(nbasis_, nbands_); + + // Set initial psi + dav_sub.set_psi(psi_init); + dav_sub.init_eigenvalue(); + + // Convert preconditioner to vector + std::vector precond_vec(precond.data(), precond.data() + precond.size()); + + // Create diag_ethr vector + std::vector diag_ethr(nbands_, config_.tolerance); + + // Create comm_info + ::hsolver::diag_comm_info comm_info(0, 1); + + // Run diagonalization + int niter = dav_sub.diag( + hpsi_func, + precond_vec, + config_.dav_ndim, + config_.tolerance, + config_.max_iterations, + false, // need_subspace + diag_ethr, + true, // scf_type + comm_info, + 0, // diag_subspace (LAPACK) + 1 // nb2d + ); + + // Get results + result.psi = dav_sub.get_psi(); + result.eigenvalues = dav_sub.get_eigenvalue(); + result.iterations = niter; + result.converged = (niter < config_.max_iterations); + + return result; + } + + // CG diagonalization + DiagResult diagonalize_cg( + std::function(const py::array_t&)> hpsi_func, + const py::array_t& psi_init, + const py::array_t& precond) + { + DiagResult result; + +#ifdef __ENABLE_ATEN + // Create CG adapter + hsolver::PyDiagoCGAdapter cg(nbasis_, nbands_); + + // Set initial psi and preconditioner + cg.set_psi(psi_init); + cg.init_eig(); + cg.set_prec(precond); + + // Create diag_ethr vector + std::vector diag_ethr(nbands_, config_.tolerance); + + // Run diagonalization + cg.diag( + hpsi_func, + config_.dav_ndim, + config_.tolerance, + diag_ethr, + false, // need_subspace + true, // scf_type + config_.nproc_in_pool + ); + + // Get results + result.psi = cg.get_psi(); + result.eigenvalues = cg.get_eig(); + result.converged = true; +#else + // Fall back to Davidson if ATen not available + result = diagonalize_davidson(hpsi_func, psi_init, precond); +#endif + + return result; + } + + // Helper: Matrix-vector multiplication + py::array_t matrix_vector_multiply(const py::array_t& matrix, + const py::array_t& vec) + { + using namespace pyabacus::utils; + + auto mat_buf = matrix.request(); + auto vec_buf = vec.request(); + + if (mat_buf.ndim != 2) + { + throw std::runtime_error("Matrix must be 2D"); + } + + const ssize_t nrow = mat_buf.shape[0]; + const ssize_t ncol = mat_buf.shape[1]; + const ssize_t nvec = (vec_buf.ndim == 1) ? 1 : vec_buf.shape[1]; + + py::array_t result({nrow, nvec}); + auto res_buf = result.request(); + + const TK* mat_ptr = static_cast(mat_buf.ptr); + const TK* vec_ptr = static_cast(vec_buf.ptr); + TK* res_ptr = static_cast(res_buf.ptr); + + // Simple matrix-vector multiplication + for (ssize_t i = 0; i < nrow; ++i) + { + for (ssize_t v = 0; v < nvec; ++v) + { + TK sum = TK(0); + for (ssize_t j = 0; j < ncol; ++j) + { + sum += mat_ptr[i * ncol + j] * vec_ptr[j * nvec + v]; + } + res_ptr[i * nvec + v] = sum; + } + } + + return result; + } + + // Helper: Compute diagonal preconditioner from Hamiltonian + py::array_t compute_preconditioner(const py::array_t& Hk) + { + auto buf = Hk.request(); + const ssize_t n = buf.shape[0]; + const TK* ptr = static_cast(buf.ptr); + + py::array_t precond(n); + double* prec_ptr = precond.mutable_data(); + + for (ssize_t i = 0; i < n; ++i) + { + // Use diagonal elements as preconditioner + TK diag = ptr[i * n + i]; + prec_ptr[i] = std::max(std::abs(diag), 1.0); + } + + return precond; + } + + int nbasis_ = 0; + int nbands_ = 0; + DiagConfig config_; +}; + +// Type aliases +using DiagonalizerWrapperGamma = DiagonalizerWrapper; +using DiagonalizerWrapperMultiK = DiagonalizerWrapper>; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_DIAGONALIZER_WRAPPER_HPP diff --git a/python/pyabacus/src/ModuleESolver/components/hamiltonian_builder_lcao.hpp b/python/pyabacus/src/ModuleESolver/components/hamiltonian_builder_lcao.hpp new file mode 100644 index 0000000000..9796567460 --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/components/hamiltonian_builder_lcao.hpp @@ -0,0 +1,300 @@ +/** + * @file hamiltonian_builder_lcao.hpp + * @brief LCAO Hamiltonian builder implementation + * + * Wraps the ABACUS LCAO Hamiltonian construction to implement IHamiltonianBuilder. + */ + +#ifndef PYABACUS_ESOLVER_HAMILTONIAN_BUILDER_LCAO_HPP +#define PYABACUS_ESOLVER_HAMILTONIAN_BUILDER_LCAO_HPP + +#include "../interfaces/i_hamiltonian_builder.hpp" +#include "../../utils/pybind_utils.h" + +#include +#include +#include +#include + +namespace pyabacus { +namespace esolver { + +/** + * @brief LCAO Hamiltonian builder implementation + * + * This class provides Hamiltonian construction for LCAO calculations, + * wrapping the ABACUS HamiltLCAO functionality. + * + * @tparam TK Type for k-space quantities + * @tparam TR Type for real-space quantities + */ +template +class HamiltonianBuilderLCAO : public IHamiltonianBuilder +{ +public: + HamiltonianBuilderLCAO() = default; + + HamiltonianBuilderLCAO(int nbasis, int nks, int nrow, int ncol) + : nbasis_(nbasis), nks_(nks), nrow_(nrow), ncol_(ncol) + { + // Allocate storage for H(k) and S(k) matrices + Hk_matrices_.resize(nks); + Sk_matrices_.resize(nks); + for (int ik = 0; ik < nks; ++ik) + { + Hk_matrices_[ik].resize(nrow * ncol, TK(0)); + Sk_matrices_[ik].resize(nrow * ncol, TK(0)); + } + } + + ~HamiltonianBuilderLCAO() override = default; + + // ==================== Build/Update ==================== + + void build_from_rho(const py::array_t& rho) override + { + // Store rho for potential reconstruction + // In full implementation, this would: + // 1. Compute Hartree potential from rho + // 2. Compute XC potential from rho + // 3. Update H(R) matrices + // 4. Invalidate H(k) cache + + using namespace pyabacus::utils; + auto buf = rho.request(); + + if (buf.ndim != 2) + { + throw std::runtime_error("rho must be 2D array with shape (nspin, nrxx)"); + } + + nspin_ = static_cast(buf.shape[0]); + nrxx_ = static_cast(buf.shape[1]); + + // Store rho + rho_data_.assign(static_cast(buf.ptr), + static_cast(buf.ptr) + nspin_ * nrxx_); + + // Mark H(k) as needing update + hk_valid_.assign(nks_, false); + valid_ = true; + } + + void update_Hk(int ik) override + { + if (ik < 0 || ik >= nks_) + { + throw std::out_of_range("k-point index out of range"); + } + + // In full implementation, this would: + // 1. Fourier transform H(R) to H(k) for k-point ik + // 2. Store result in Hk_matrices_[ik] + + hk_valid_[ik] = true; + } + + void invalidate() override + { + hk_valid_.assign(nks_, false); + valid_ = false; + } + + // ==================== K-space Matrix Access ==================== + + py::array_t get_Hk(int ik) const override + { + validate_kpoint(ik); + + return utils::numpy_from_ptr_copy_2d( + Hk_matrices_[ik].data(), + static_cast(nrow_), + static_cast(ncol_) + ); + } + + py::array_t get_Sk(int ik) const override + { + validate_kpoint(ik); + + return utils::numpy_from_ptr_copy_2d( + Sk_matrices_[ik].data(), + static_cast(nrow_), + static_cast(ncol_) + ); + } + + // ==================== Real-space Matrix Access ==================== + + py::dict get_HR() const override + { + py::dict result; + // In full implementation, would return H(R) data + // Format: {(iat1, iat2, (R0, R1, R2)): matrix} + return result; + } + + py::dict get_SR() const override + { + py::dict result; + // In full implementation, would return S(R) data + return result; + } + + // ==================== Matrix-Vector Products ==================== + + py::array_t apply_H(int ik, const py::array_t& psi_in) const override + { + validate_kpoint(ik); + + // H * psi + return matrix_multiply(Hk_matrices_[ik], psi_in); + } + + py::array_t apply_S(int ik, const py::array_t& psi_in) const override + { + validate_kpoint(ik); + + // S * psi + return matrix_multiply(Sk_matrices_[ik], psi_in); + } + + // ==================== Dimension Queries ==================== + + int get_nbasis() const override { return nbasis_; } + + int get_nks() const override { return nks_; } + + std::pair get_local_dims() const override + { + return {nrow_, ncol_}; + } + + bool is_valid() const override { return valid_; } + + // ==================== Data Setters (for testing/compatibility) ==================== + + void set_Hk_data(int ik, const TK* data, int nrow, int ncol) + { + if (ik < 0 || ik >= nks_) + { + throw std::out_of_range("k-point index out of range"); + } + + nrow_ = nrow; + ncol_ = ncol; + + if (static_cast(Hk_matrices_[ik].size()) != nrow * ncol) + { + Hk_matrices_[ik].resize(nrow * ncol); + } + + std::copy(data, data + nrow * ncol, Hk_matrices_[ik].begin()); + hk_valid_[ik] = true; + valid_ = true; + } + + void set_Sk_data(int ik, const TK* data, int nrow, int ncol) + { + if (ik < 0 || ik >= nks_) + { + throw std::out_of_range("k-point index out of range"); + } + + if (static_cast(Sk_matrices_[ik].size()) != nrow * ncol) + { + Sk_matrices_[ik].resize(nrow * ncol); + } + + std::copy(data, data + nrow * ncol, Sk_matrices_[ik].begin()); + } + + void set_dimensions(int nbasis, int nks, int nrow, int ncol) + { + nbasis_ = nbasis; + nks_ = nks; + nrow_ = nrow; + ncol_ = ncol; + + Hk_matrices_.resize(nks); + Sk_matrices_.resize(nks); + hk_valid_.resize(nks, false); + + for (int ik = 0; ik < nks; ++ik) + { + Hk_matrices_[ik].resize(nrow * ncol, TK(0)); + Sk_matrices_[ik].resize(nrow * ncol, TK(0)); + } + } + +private: + void validate_kpoint(int ik) const + { + if (!valid_) + { + throw std::runtime_error("Hamiltonian not built. Call build_from_rho first."); + } + if (ik < 0 || ik >= nks_) + { + throw std::out_of_range("k-point index out of range"); + } + } + + py::array_t matrix_multiply(const std::vector& matrix, + const py::array_t& vec) const + { + auto vec_buf = vec.request(); + const TK* vec_ptr = static_cast(vec_buf.ptr); + + const ssize_t nvec = (vec_buf.ndim == 1) ? 1 : + (vec_buf.ndim == 2) ? vec_buf.shape[1] : 1; + const ssize_t vec_rows = (vec_buf.ndim == 1) ? vec_buf.shape[0] : vec_buf.shape[0]; + + if (vec_rows != ncol_) + { + throw std::runtime_error("Vector dimension mismatch"); + } + + py::array_t result({static_cast(nrow_), nvec}); + auto res_buf = result.request(); + TK* res_ptr = static_cast(res_buf.ptr); + + // Matrix-vector multiplication + for (int i = 0; i < nrow_; ++i) + { + for (ssize_t v = 0; v < nvec; ++v) + { + TK sum = TK(0); + for (int j = 0; j < ncol_; ++j) + { + sum += matrix[i * ncol_ + j] * vec_ptr[j * nvec + v]; + } + res_ptr[i * nvec + v] = sum; + } + } + + return result; + } + + int nbasis_ = 0; + int nks_ = 0; + int nrow_ = 0; + int ncol_ = 0; + int nspin_ = 1; + int nrxx_ = 0; + bool valid_ = false; + + std::vector> Hk_matrices_; + std::vector> Sk_matrices_; + std::vector hk_valid_; + std::vector rho_data_; +}; + +// Type aliases +using HamiltonianBuilderLCAOGamma = HamiltonianBuilderLCAO; +using HamiltonianBuilderLCAOMultiK = HamiltonianBuilderLCAO, double>; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_HAMILTONIAN_BUILDER_LCAO_HPP diff --git a/python/pyabacus/src/ModuleESolver/components/scf_controller_lcao.hpp b/python/pyabacus/src/ModuleESolver/components/scf_controller_lcao.hpp new file mode 100644 index 0000000000..c5dac087fb --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/components/scf_controller_lcao.hpp @@ -0,0 +1,255 @@ +/** + * @file scf_controller_lcao.hpp + * @brief LCAO SCF controller implementation + * + * Implements the ISCFController interface for LCAO calculations. + */ + +#ifndef PYABACUS_ESOLVER_SCF_CONTROLLER_LCAO_HPP +#define PYABACUS_ESOLVER_SCF_CONTROLLER_LCAO_HPP + +#include "../interfaces/i_scf_controller.hpp" +#include "../interfaces/i_hamiltonian_builder.hpp" +#include "../interfaces/i_charge_mixer.hpp" +#include "../interfaces/i_diagonalizer.hpp" +#include "hamiltonian_builder_lcao.hpp" +#include "charge_mixer_wrapper.hpp" +#include "diagonalizer_wrapper.hpp" + +#include +#include + +namespace pyabacus { +namespace esolver { + +/** + * @brief LCAO SCF controller implementation + * + * This class implements the SCF loop for LCAO calculations, + * coordinating the Hamiltonian builder, charge mixer, and diagonalizer. + * + * @tparam TK Type for k-space quantities + * @tparam TR Type for real-space quantities + */ +template +class SCFControllerLCAO : public ISCFController +{ +public: + SCFControllerLCAO() = default; + + SCFControllerLCAO(int nbasis, int nks, int nbands, int nspin, int nrxx) + : nbasis_(nbasis) + , nks_(nks) + , nbands_(nbands) + , nspin_(nspin) + , nrxx_(nrxx) + { + // Initialize components + hamilt_builder_ = std::make_unique>( + nbasis, nks, nbasis, nbasis); + charge_mixer_ = std::make_unique(nspin, nrxx); + diagonalizer_ = std::make_unique>(nbasis, nbands); + } + + ~SCFControllerLCAO() override = default; + + // ==================== Lifecycle ==================== + + void initialize(int istep) override + { + istep_ = istep; + iteration_ = 0; + drho_ = 0.0; + energy_ = 0.0; + status_ = SCFStatus::NotStarted; + + // Reset charge mixer + if (charge_mixer_) + { + charge_mixer_->reset(); + } + + initialized_ = true; + } + + void finalize(int istep) override + { + // Cleanup after SCF + initialized_ = false; + } + + // ==================== Iteration Control ==================== + + SCFStatus run_iteration(int iter) override + { + if (!initialized_) + { + throw std::runtime_error("SCF not initialized. Call initialize() first."); + } + + iteration_ = iter; + status_ = SCFStatus::Running; + + // SCF iteration steps: + // 1. Build Hamiltonian from current charge density + // 2. Diagonalize to get new wave functions + // 3. Calculate new charge density from wave functions + // 4. Mix old and new charge densities + // 5. Check convergence + + // For now, this is a placeholder that simulates convergence + // In full implementation, would call actual ABACUS routines + + // Simulate drho decreasing + drho_ = 1.0 / (iter * iter + 1); + + // Simulate energy + energy_ = -10.0 - 0.1 / iter; + + return status_; + } + + SCFStatus run_scf(const SCFConvergenceCriteria& criteria, + SCFIterationCallback callback) override + { + initialize(istep_); + status_ = SCFStatus::Running; + + for (int iter = 1; iter <= criteria.max_iterations; ++iter) + { + run_iteration(iter); + + // Check convergence + bool converged = true; + if (criteria.check_drho && drho_ > criteria.drho_threshold) + { + converged = false; + } + + // Call callback if provided + if (callback) + { + bool continue_scf = callback(iter, drho_, energy_); + if (!continue_scf) + { + status_ = SCFStatus::Failed; + return status_; + } + } + + if (converged) + { + status_ = SCFStatus::Converged; + return status_; + } + } + + status_ = SCFStatus::MaxIterReached; + return status_; + } + + bool is_converged() const override + { + return status_ == SCFStatus::Converged; + } + + SCFStatus get_status() const override { return status_; } + + // ==================== State Queries ==================== + + int get_iteration() const override { return iteration_; } + + double get_drho() const override { return drho_; } + + double get_energy() const override { return energy_; } + + // ==================== Component Access ==================== + + void* get_hamiltonian_builder() override + { + return hamilt_builder_.get(); + } + + IChargeMixer* get_charge_mixer() override + { + return charge_mixer_.get(); + } + + void* get_diagonalizer() override + { + return diagonalizer_.get(); + } + + // ==================== Typed Component Access ==================== + + HamiltonianBuilderLCAO* get_hamiltonian_builder_typed() + { + return hamilt_builder_.get(); + } + + DiagonalizerWrapper* get_diagonalizer_typed() + { + return diagonalizer_.get(); + } + + // ==================== Configuration ==================== + + void set_convergence_criteria(const SCFConvergenceCriteria& criteria) + { + criteria_ = criteria; + } + + SCFConvergenceCriteria get_convergence_criteria() const + { + return criteria_; + } + + void set_mixing_config(const MixingConfig& config) + { + if (charge_mixer_) + { + charge_mixer_->set_config(config); + } + } + + void set_diag_config(const DiagConfig& config) + { + if (diagonalizer_) + { + diagonalizer_->set_config(config); + } + } + +private: + // Dimensions + int nbasis_ = 0; + int nks_ = 0; + int nbands_ = 0; + int nspin_ = 1; + int nrxx_ = 0; + + // State + int istep_ = 0; + int iteration_ = 0; + double drho_ = 0.0; + double energy_ = 0.0; + bool initialized_ = false; + SCFStatus status_ = SCFStatus::NotStarted; + + // Configuration + SCFConvergenceCriteria criteria_; + + // Components + std::unique_ptr> hamilt_builder_; + std::unique_ptr charge_mixer_; + std::unique_ptr> diagonalizer_; +}; + +// Type aliases +using SCFControllerLCAOGamma = SCFControllerLCAO; +using SCFControllerLCAOMultiK = SCFControllerLCAO, double>; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_SCF_CONTROLLER_LCAO_HPP diff --git a/python/pyabacus/src/ModuleESolver/interfaces/i_charge_mixer.hpp b/python/pyabacus/src/ModuleESolver/interfaces/i_charge_mixer.hpp new file mode 100644 index 0000000000..43ac40fc58 --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/interfaces/i_charge_mixer.hpp @@ -0,0 +1,155 @@ +/** + * @file i_charge_mixer.hpp + * @brief Abstract interface for charge density mixer + * + * Defines the interface for mixing charge densities during SCF iterations. + */ + +#ifndef PYABACUS_ESOLVER_I_CHARGE_MIXER_HPP +#define PYABACUS_ESOLVER_I_CHARGE_MIXER_HPP + +#include +#include + +#include + +namespace py = pybind11; + +namespace pyabacus { +namespace esolver { + +/** + * @brief Mixing method types + */ +enum class MixingMethod +{ + Plain, ///< Simple linear mixing + Pulay, ///< Pulay mixing (DIIS) + Broyden, ///< Broyden mixing + Anderson ///< Anderson mixing +}; + +/** + * @brief Configuration for charge mixing + */ +struct MixingConfig +{ + MixingMethod method = MixingMethod::Pulay; + double beta = 0.7; ///< Mixing parameter + int ndim = 8; ///< Number of history steps for Pulay/Broyden + double gg0 = 1.0; ///< Kerker mixing parameter + bool mix_gg0 = false; ///< Whether to use Kerker mixing + bool mix_rho = true; ///< Mix charge density (vs potential) +}; + +/** + * @brief Abstract interface for charge density mixer + * + * This interface defines the contract for mixing charge densities + * during SCF iterations to achieve convergence. + */ +class IChargeMixer +{ +public: + virtual ~IChargeMixer() = default; + + // ==================== Core Mixing Operations ==================== + + /** + * @brief Mix input and output charge densities + * @param rho_in Input charge density (from previous iteration) + * @param rho_out Output charge density (from current iteration) + * @return Mixed charge density for next iteration + */ + virtual py::array_t mix(const py::array_t& rho_in, + const py::array_t& rho_out) = 0; + + /** + * @brief Reset mixer state (clear history) + */ + virtual void reset() = 0; + + // ==================== State Queries ==================== + + /** + * @brief Get charge density difference from last mixing + * @return drho value + */ + virtual double get_drho() const = 0; + + /** + * @brief Get current iteration count + * @return Number of mixing iterations performed + */ + virtual int get_iteration() const = 0; + + // ==================== Configuration ==================== + + /** + * @brief Set mixing configuration + * @param config Mixing configuration + */ + virtual void set_config(const MixingConfig& config) = 0; + + /** + * @brief Get current mixing configuration + * @return Current configuration + */ + virtual MixingConfig get_config() const = 0; + + /** + * @brief Set mixing parameter (beta) + * @param beta Mixing parameter (0 < beta <= 1) + */ + virtual void set_mixing_beta(double beta) = 0; + + /** + * @brief Get mixing parameter + * @return Current beta value + */ + virtual double get_mixing_beta() const = 0; + + /** + * @brief Set mixing method + * @param method Mixing method to use + */ + virtual void set_mixing_method(MixingMethod method) = 0; + + /** + * @brief Get current mixing method + * @return Current method + */ + virtual MixingMethod get_mixing_method() const = 0; +}; + +/** + * @brief Convert MixingMethod enum to string + */ +inline std::string mixing_method_to_string(MixingMethod method) +{ + switch (method) + { + case MixingMethod::Plain: return "plain"; + case MixingMethod::Pulay: return "pulay"; + case MixingMethod::Broyden: return "broyden"; + case MixingMethod::Anderson: return "anderson"; + default: return "unknown"; + } +} + +/** + * @brief Convert string to MixingMethod enum + */ +inline MixingMethod string_to_mixing_method(const std::string& str) +{ + if (str == "plain") return MixingMethod::Plain; + if (str == "pulay") return MixingMethod::Pulay; + if (str == "broyden") return MixingMethod::Broyden; + if (str == "anderson") return MixingMethod::Anderson; + return MixingMethod::Pulay; // default +} + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_I_CHARGE_MIXER_HPP diff --git a/python/pyabacus/src/ModuleESolver/interfaces/i_diagonalizer.hpp b/python/pyabacus/src/ModuleESolver/interfaces/i_diagonalizer.hpp new file mode 100644 index 0000000000..6c5f968b39 --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/interfaces/i_diagonalizer.hpp @@ -0,0 +1,200 @@ +/** + * @file i_diagonalizer.hpp + * @brief Abstract interface for eigenvalue solver (diagonalizer) + * + * Defines the interface for diagonalizing Hamiltonian matrices + * to obtain eigenvalues and eigenvectors. + */ + +#ifndef PYABACUS_ESOLVER_I_DIAGONALIZER_HPP +#define PYABACUS_ESOLVER_I_DIAGONALIZER_HPP + +#include +#include +#include + +#include +#include +#include +#include + +namespace py = pybind11; + +namespace pyabacus { +namespace esolver { + +/** + * @brief Diagonalization method types + */ +enum class DiagMethod +{ + Davidson, ///< Davidson iterative method + DavSubspace, ///< Davidson with subspace rotation + CG, ///< Conjugate gradient + LAPACK, ///< Direct LAPACK diagonalization + ScaLAPACK, ///< Parallel ScaLAPACK + ELPA ///< ELPA eigensolver +}; + +/** + * @brief Result of diagonalization + */ +template +struct DiagResult +{ + py::array_t psi; ///< Eigenvectors + py::array_t eigenvalues; ///< Eigenvalues + int iterations = 0; ///< Number of iterations (for iterative methods) + bool converged = false; ///< Whether converged + double residual = 0.0; ///< Final residual +}; + +/** + * @brief Configuration for diagonalization + */ +struct DiagConfig +{ + DiagMethod method = DiagMethod::Davidson; + double tolerance = 1e-6; ///< Convergence tolerance + int max_iterations = 100; ///< Maximum iterations + int dav_ndim = 4; ///< Davidson subspace dimension multiplier + bool use_paw = false; ///< Use PAW method + int nproc_in_pool = 1; ///< Number of processes in pool +}; + +/** + * @brief Abstract interface for diagonalizer + * + * This interface defines the contract for eigenvalue solvers, + * supporting both direct and iterative methods. + * + * @tparam TK Type for k-space quantities (double or complex) + */ +template +class IDiagonalizer +{ +public: + virtual ~IDiagonalizer() = default; + + // ==================== Direct Diagonalization ==================== + + /** + * @brief Diagonalize H(k) and S(k) matrices directly + * @param ik K-point index + * @param Hk Hamiltonian matrix + * @param Sk Overlap matrix + * @param psi_init Initial guess for eigenvectors (optional) + * @return Diagonalization result + */ + virtual DiagResult diagonalize(int ik, + const py::array_t& Hk, + const py::array_t& Sk, + const py::array_t& psi_init) = 0; + + // ==================== Iterative Diagonalization ==================== + + /** + * @brief Diagonalize using matrix-vector product functions + * + * For iterative methods that don't need explicit matrices. + * + * @param ik K-point index + * @param hpsi_func Function computing H|psi> + * @param spsi_func Function computing S|psi> + * @param psi_init Initial guess for eigenvectors + * @param precond Preconditioner (diagonal approximation to H) + * @return Diagonalization result + */ + virtual DiagResult diagonalize_iterative( + int ik, + std::function(const py::array_t&)> hpsi_func, + std::function(const py::array_t&)> spsi_func, + const py::array_t& psi_init, + const py::array_t& precond) = 0; + + // ==================== Configuration ==================== + + /** + * @brief Set diagonalization configuration + * @param config Configuration + */ + virtual void set_config(const DiagConfig& config) = 0; + + /** + * @brief Get current configuration + * @return Current configuration + */ + virtual DiagConfig get_config() const = 0; + + /** + * @brief Set convergence tolerance + * @param tol Tolerance + */ + virtual void set_tolerance(double tol) = 0; + + /** + * @brief Set maximum iterations + * @param max_iter Maximum iterations + */ + virtual void set_max_iterations(int max_iter) = 0; + + // ==================== Dimension Queries ==================== + + /** + * @brief Get number of basis functions + * @return Number of basis functions + */ + virtual int get_nbasis() const = 0; + + /** + * @brief Get number of bands to compute + * @return Number of bands + */ + virtual int get_nbands() const = 0; + + /** + * @brief Set number of bands to compute + * @param nbands Number of bands + */ + virtual void set_nbands(int nbands) = 0; +}; + +// Type aliases for common use cases +using IDiagonalizerGamma = IDiagonalizer; +using IDiagonalizerMultiK = IDiagonalizer>; + +/** + * @brief Convert DiagMethod enum to string + */ +inline std::string diag_method_to_string(DiagMethod method) +{ + switch (method) + { + case DiagMethod::Davidson: return "davidson"; + case DiagMethod::DavSubspace: return "dav_subspace"; + case DiagMethod::CG: return "cg"; + case DiagMethod::LAPACK: return "lapack"; + case DiagMethod::ScaLAPACK: return "scalapack"; + case DiagMethod::ELPA: return "elpa"; + default: return "unknown"; + } +} + +/** + * @brief Convert string to DiagMethod enum + */ +inline DiagMethod string_to_diag_method(const std::string& str) +{ + if (str == "davidson") return DiagMethod::Davidson; + if (str == "dav_subspace") return DiagMethod::DavSubspace; + if (str == "cg") return DiagMethod::CG; + if (str == "lapack") return DiagMethod::LAPACK; + if (str == "scalapack") return DiagMethod::ScaLAPACK; + if (str == "elpa") return DiagMethod::ELPA; + return DiagMethod::Davidson; // default +} + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_I_DIAGONALIZER_HPP diff --git a/python/pyabacus/src/ModuleESolver/interfaces/i_hamiltonian_builder.hpp b/python/pyabacus/src/ModuleESolver/interfaces/i_hamiltonian_builder.hpp new file mode 100644 index 0000000000..794b8c119e --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/interfaces/i_hamiltonian_builder.hpp @@ -0,0 +1,139 @@ +/** + * @file i_hamiltonian_builder.hpp + * @brief Abstract interface for Hamiltonian builder + * + * Defines the interface for building and accessing Hamiltonian matrices, + * supporting both k-space and real-space representations. + */ + +#ifndef PYABACUS_ESOLVER_I_HAMILTONIAN_BUILDER_HPP +#define PYABACUS_ESOLVER_I_HAMILTONIAN_BUILDER_HPP + +#include +#include + +#include +#include + +namespace py = pybind11; + +namespace pyabacus { +namespace esolver { + +/** + * @brief Abstract interface for Hamiltonian builder + * + * This interface defines the contract for building Hamiltonian matrices + * from charge density and providing access to H(k), S(k), H(R), S(R). + * + * @tparam TK Type for k-space quantities (double or complex) + * @tparam TR Type for real-space quantities (typically double) + */ +template +class IHamiltonianBuilder +{ +public: + virtual ~IHamiltonianBuilder() = default; + + // ==================== Build/Update ==================== + + /** + * @brief Build Hamiltonian from charge density + * @param rho Charge density array with shape (nspin, nrxx) + */ + virtual void build_from_rho(const py::array_t& rho) = 0; + + /** + * @brief Update H(k) for a specific k-point + * @param ik K-point index + */ + virtual void update_Hk(int ik) = 0; + + /** + * @brief Invalidate cached matrices (force rebuild) + */ + virtual void invalidate() = 0; + + // ==================== K-space Matrix Access ==================== + + /** + * @brief Get H(k) matrix for specific k-point + * @param ik K-point index + * @return Hamiltonian matrix as numpy array + */ + virtual py::array_t get_Hk(int ik) const = 0; + + /** + * @brief Get S(k) overlap matrix for specific k-point + * @param ik K-point index + * @return Overlap matrix as numpy array + */ + virtual py::array_t get_Sk(int ik) const = 0; + + // ==================== Real-space Matrix Access ==================== + + /** + * @brief Get H(R) in sparse format + * @return Dictionary mapping (iat1, iat2, R) -> matrix + */ + virtual py::dict get_HR() const = 0; + + /** + * @brief Get S(R) in sparse format + * @return Dictionary mapping (iat1, iat2, R) -> matrix + */ + virtual py::dict get_SR() const = 0; + + // ==================== Matrix-Vector Products ==================== + + /** + * @brief Apply Hamiltonian to wave function: H|psi> + * @param ik K-point index + * @param psi_in Input wave function + * @return H * psi_in + */ + virtual py::array_t apply_H(int ik, const py::array_t& psi_in) const = 0; + + /** + * @brief Apply overlap matrix to wave function: S|psi> + * @param ik K-point index + * @param psi_in Input wave function + * @return S * psi_in + */ + virtual py::array_t apply_S(int ik, const py::array_t& psi_in) const = 0; + + // ==================== Dimension Queries ==================== + + /** + * @brief Get number of basis functions + * @return Number of basis functions + */ + virtual int get_nbasis() const = 0; + + /** + * @brief Get number of k-points + * @return Number of k-points + */ + virtual int get_nks() const = 0; + + /** + * @brief Get local matrix dimensions (for 2D distribution) + * @return Pair of (nrow, ncol) + */ + virtual std::pair get_local_dims() const = 0; + + /** + * @brief Check if Hamiltonian data is valid + * @return true if valid + */ + virtual bool is_valid() const = 0; +}; + +// Type aliases for common use cases +using IHamiltonianBuilderGamma = IHamiltonianBuilder; +using IHamiltonianBuilderMultiK = IHamiltonianBuilder, double>; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_I_HAMILTONIAN_BUILDER_HPP diff --git a/python/pyabacus/src/ModuleESolver/interfaces/i_scf_controller.hpp b/python/pyabacus/src/ModuleESolver/interfaces/i_scf_controller.hpp new file mode 100644 index 0000000000..401a7e6dac --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/interfaces/i_scf_controller.hpp @@ -0,0 +1,159 @@ +/** + * @file i_scf_controller.hpp + * @brief Abstract interface for SCF controller + * + * Defines the interface for controlling SCF iterations, + * allowing different implementations and Python-controlled workflows. + */ + +#ifndef PYABACUS_ESOLVER_I_SCF_CONTROLLER_HPP +#define PYABACUS_ESOLVER_I_SCF_CONTROLLER_HPP + +#include +#include + +namespace pyabacus { +namespace esolver { + +/** + * @brief SCF convergence status + */ +enum class SCFStatus +{ + NotStarted, ///< SCF has not been started + Running, ///< SCF is in progress + Converged, ///< SCF converged successfully + MaxIterReached, ///< Maximum iterations reached without convergence + Failed ///< SCF failed due to error +}; + +/** + * @brief SCF convergence criteria + */ +struct SCFConvergenceCriteria +{ + double drho_threshold = 1e-6; ///< Charge density difference threshold + double energy_threshold = 1e-6; ///< Energy difference threshold (Ry) + int max_iterations = 100; ///< Maximum number of iterations + bool check_energy = true; ///< Whether to check energy convergence + bool check_drho = true; ///< Whether to check charge density convergence +}; + +/** + * @brief Callback type for SCF iteration events + * + * Called after each SCF iteration with: + * - iter: current iteration number + * - drho: charge density difference + * - energy: current total energy + * + * Return true to continue, false to stop SCF. + */ +using SCFIterationCallback = std::function; + +// Forward declarations for component interfaces +template class IHamiltonianBuilder; +class IChargeMixer; +template class IDiagonalizer; + +/** + * @brief Abstract interface for SCF controller + * + * This interface defines the contract for SCF loop control, + * allowing different implementations (LCAO, PW, etc.) and + * enabling Python-controlled SCF workflows with breakpoints. + */ +class ISCFController +{ +public: + virtual ~ISCFController() = default; + + // ==================== Lifecycle ==================== + + /** + * @brief Initialize SCF calculation + * @param istep Ion step index (for MD/relaxation) + */ + virtual void initialize(int istep = 0) = 0; + + /** + * @brief Finalize SCF calculation + * @param istep Ion step index + */ + virtual void finalize(int istep = 0) = 0; + + // ==================== Iteration Control ==================== + + /** + * @brief Run a single SCF iteration + * @param iter Iteration number (1-based) + * @return Current SCF status + */ + virtual SCFStatus run_iteration(int iter) = 0; + + /** + * @brief Run complete SCF loop + * @param criteria Convergence criteria + * @param callback Optional callback for each iteration + * @return Final SCF status + */ + virtual SCFStatus run_scf(const SCFConvergenceCriteria& criteria, + SCFIterationCallback callback = nullptr) = 0; + + /** + * @brief Check if SCF is converged + * @return true if converged + */ + virtual bool is_converged() const = 0; + + /** + * @brief Get current SCF status + * @return Current status + */ + virtual SCFStatus get_status() const = 0; + + // ==================== State Queries ==================== + + /** + * @brief Get current iteration number + * @return Iteration number (0 if not started) + */ + virtual int get_iteration() const = 0; + + /** + * @brief Get current charge density difference + * @return drho value + */ + virtual double get_drho() const = 0; + + /** + * @brief Get current total energy + * @return Total energy in Ry + */ + virtual double get_energy() const = 0; + + // ==================== Component Access ==================== + + /** + * @brief Get Hamiltonian builder component + * @return Pointer to Hamiltonian builder (may be nullptr) + */ + virtual void* get_hamiltonian_builder() = 0; + + /** + * @brief Get charge mixer component + * @return Pointer to charge mixer (may be nullptr) + */ + virtual IChargeMixer* get_charge_mixer() = 0; + + /** + * @brief Get diagonalizer component + * @return Pointer to diagonalizer (may be nullptr) + */ + virtual void* get_diagonalizer() = 0; +}; + +} // namespace esolver +} // namespace pyabacus + +#endif // PYABACUS_ESOLVER_I_SCF_CONTROLLER_HPP diff --git a/python/pyabacus/src/ModuleESolver/py_esolver_lcao.cpp b/python/pyabacus/src/ModuleESolver/py_esolver_lcao.cpp new file mode 100644 index 0000000000..9261a9225c --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/py_esolver_lcao.cpp @@ -0,0 +1,1003 @@ +/** + * @file py_esolver_lcao.cpp + * @brief Python bindings for ESolver_KS_LCAO + * + * This file provides pybind11 bindings for the LCAO ESolver, + * enabling Python-controlled SCF workflows with breakpoint support. + */ + +#include +#include +#include +#include +#include + +#include "py_esolver_lcao.hpp" + +// ABACUS headers for actual implementation +#include "source_estate/module_charge/charge.h" +#include "source_estate/fp_energy.h" +#include "source_estate/elecstate.h" +#include "source_estate/module_dm/density_matrix.h" +#include "source_lcao/hamilt_lcao.h" +#include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_basis/module_ao/parallel_orbitals.h" + +#include +#include +#include + +namespace py = pybind11; +using namespace pybind11::literals; + +namespace py_esolver +{ + +// ============================================================================ +// PyChargeAccessor Implementation +// ============================================================================ + +void PyChargeAccessor::set_from_charge(const Charge* chr) +{ + if (chr == nullptr) + { + chr_ptr_ = nullptr; + rho_ptr_ = nullptr; + nspin_ = 0; + nrxx_ = 0; + ngmc_ = 0; + return; + } + + chr_ptr_ = chr; + rho_ptr_ = nullptr; // Use chr_ptr_ instead + nspin_ = chr->nspin; + nrxx_ = chr->nrxx; + ngmc_ = chr->ngmc; +} + +void PyChargeAccessor::set_data(const double* rho_ptr, int nspin, int nrxx) +{ + chr_ptr_ = nullptr; // Not using Charge object + rho_ptr_ = rho_ptr; + nspin_ = nspin; + nrxx_ = nrxx; + ngmc_ = 0; +} + +py::array_t PyChargeAccessor::get_rho() const +{ + if (!is_valid()) + { + throw std::runtime_error("Charge data not available. Run SCF first."); + } + + // Create numpy array with shape (nspin, nrxx) + std::vector shape = {static_cast(nspin_), static_cast(nrxx_)}; + + auto result = py::array_t(shape); + auto buf = result.request(); + double* ptr = static_cast(buf.ptr); + + // Copy data from either chr_ptr_ or rho_ptr_ + if (chr_ptr_ != nullptr && chr_ptr_->rho != nullptr) + { + // Copy from Charge object (rho is double** with shape [nspin][nrxx]) + for (int is = 0; is < nspin_; ++is) + { + if (chr_ptr_->rho[is] != nullptr) + { + std::copy(chr_ptr_->rho[is], chr_ptr_->rho[is] + nrxx_, ptr + is * nrxx_); + } + } + } + else if (rho_ptr_ != nullptr) + { + // Copy from flat array (legacy mode) + std::copy(rho_ptr_, rho_ptr_ + nspin_ * nrxx_, ptr); + } + else + { + throw std::runtime_error("No valid charge data source."); + } + + return result; +} + +py::array_t> PyChargeAccessor::get_rhog() const +{ + if (chr_ptr_ == nullptr || chr_ptr_->rhog == nullptr) + { + throw std::runtime_error("Reciprocal-space charge density not available."); + } + + // Create numpy array with shape (nspin, ngmc) + std::vector shape = {static_cast(nspin_), static_cast(ngmc_)}; + + auto result = py::array_t>(shape); + auto buf = result.request(); + std::complex* ptr = static_cast*>(buf.ptr); + + // Copy from Charge object (rhog is complex** with shape [nspin][ngmc]) + for (int is = 0; is < nspin_; ++is) + { + if (chr_ptr_->rhog[is] != nullptr) + { + std::copy(chr_ptr_->rhog[is], chr_ptr_->rhog[is] + ngmc_, ptr + is * ngmc_); + } + } + + return result; +} + +py::array_t PyChargeAccessor::get_rho_core() const +{ + if (chr_ptr_ == nullptr || chr_ptr_->rho_core == nullptr) + { + throw std::runtime_error("Core charge density not available."); + } + + // Create numpy array with shape (nrxx,) + std::vector shape = {static_cast(nrxx_)}; + + auto result = py::array_t(shape); + auto buf = result.request(); + double* ptr = static_cast(buf.ptr); + + std::copy(chr_ptr_->rho_core, chr_ptr_->rho_core + nrxx_, ptr); + + return result; +} + +// ============================================================================ +// PyEnergyAccessor Implementation +// ============================================================================ + +void PyEnergyAccessor::set_from_fenergy(const elecstate::fenergy* f_en) +{ + if (f_en == nullptr) + { + etot_ = 0.0; + eband_ = 0.0; + hartree_energy_ = 0.0; + etxc_ = 0.0; + ewald_energy_ = 0.0; + demet_ = 0.0; + exx_ = 0.0; + evdw_ = 0.0; + return; + } + + etot_ = f_en->etot; + eband_ = f_en->eband; + hartree_energy_ = f_en->hartree_energy; + etxc_ = f_en->etxc; + ewald_energy_ = f_en->ewald_energy; + demet_ = f_en->demet; + exx_ = f_en->exx; + evdw_ = f_en->evdw; +} + +void PyEnergyAccessor::set_energies(double etot, double eband, double hartree, + double etxc, double ewald, double demet, + double exx, double evdw) +{ + etot_ = etot; + eband_ = eband; + hartree_energy_ = hartree; + etxc_ = etxc; + ewald_energy_ = ewald; + demet_ = demet; + exx_ = exx; + evdw_ = evdw; +} + +py::dict PyEnergyAccessor::get_all_energies() const +{ + py::dict result; + result["etot"] = etot_; + result["eband"] = eband_; + result["hartree_energy"] = hartree_energy_; + result["etxc"] = etxc_; + result["ewald_energy"] = ewald_energy_; + result["demet"] = demet_; + result["exx"] = exx_; + result["evdw"] = evdw_; + return result; +} + +// ============================================================================ +// PyHamiltonianAccessor Implementation (template) +// ============================================================================ + +template +void PyHamiltonianAccessor::set_from_hamilt(hamilt::HamiltLCAO* hamilt_lcao, int nks, const Parallel_Orbitals* pv) +{ + hamilt_ptr_ = hamilt_lcao; + pv_ = pv; + nks_ = nks; + + if (hamilt_lcao == nullptr) + { + nbasis_ = 0; + nloc_ = 0; + nrow_ = 0; + ncol_ = 0; + return; + } + + // Get dimensions from Parallel_Orbitals if available + if (pv != nullptr) + { + nrow_ = pv->get_row_size(); + ncol_ = pv->get_col_size(); + nloc_ = nrow_ * ncol_; + nbasis_ = pv->get_global_row_size(); + } + + // Initialize pointer arrays for compatibility mode + hk_ptrs_.resize(nks, nullptr); + sk_ptrs_.resize(nks, nullptr); + matrix_dims_.resize(nks, {nrow_, ncol_}); +} + +template +void PyHamiltonianAccessor::set_dimensions(int nbasis, int nks) +{ + nbasis_ = nbasis; + nks_ = nks; + hk_ptrs_.resize(nks, nullptr); + sk_ptrs_.resize(nks, nullptr); + matrix_dims_.resize(nks, {0, 0}); +} + +template +void PyHamiltonianAccessor::set_Hk_data(int ik, const TK* data, int nrow, int ncol) +{ + if (ik >= 0 && ik < nks_) + { + hk_ptrs_[ik] = data; + matrix_dims_[ik] = {nrow, ncol}; + } +} + +template +void PyHamiltonianAccessor::set_Sk_data(int ik, const TK* data, int nrow, int ncol) +{ + if (ik >= 0 && ik < nks_) + { + sk_ptrs_[ik] = data; + matrix_dims_[ik] = {nrow, ncol}; + } +} + +template +py::array_t PyHamiltonianAccessor::get_Hk(int ik) const +{ + if (!is_valid() || ik < 0 || ik >= nks_) + { + throw std::runtime_error("Invalid k-point index or Hamiltonian not available."); + } + + if (hk_ptrs_[ik] == nullptr) + { + throw std::runtime_error("H(k) data not set for this k-point."); + } + + auto [nrow, ncol] = matrix_dims_[ik]; + std::vector shape = {nrow, ncol}; + + auto result = py::array_t(shape); + auto buf = result.request(); + TK* ptr = static_cast(buf.ptr); + + std::copy(hk_ptrs_[ik], hk_ptrs_[ik] + nrow * ncol, ptr); + + return result; +} + +template +py::array_t PyHamiltonianAccessor::get_Sk(int ik) const +{ + if (!is_valid() || ik < 0 || ik >= nks_) + { + throw std::runtime_error("Invalid k-point index or overlap matrix not available."); + } + + if (sk_ptrs_[ik] == nullptr) + { + throw std::runtime_error("S(k) data not set for this k-point."); + } + + auto [nrow, ncol] = matrix_dims_[ik]; + std::vector shape = {nrow, ncol}; + + auto result = py::array_t(shape); + auto buf = result.request(); + TK* ptr = static_cast(buf.ptr); + + std::copy(sk_ptrs_[ik], sk_ptrs_[ik] + nrow * ncol, ptr); + + return result; +} + +template +py::dict PyHamiltonianAccessor::get_HR() const +{ + // Placeholder: will be implemented when full ABACUS integration is available + py::dict result; + return result; +} + +template +py::dict PyHamiltonianAccessor::get_SR() const +{ + // Placeholder: will be implemented when full ABACUS integration is available + py::dict result; + return result; +} + +// Explicit template instantiations +template class PyHamiltonianAccessor; +template class PyHamiltonianAccessor, double>; + +// ============================================================================ +// PyDensityMatrixAccessor Implementation (template) +// ============================================================================ + +template +void PyDensityMatrixAccessor::set_from_dm(elecstate::DensityMatrix* dm) +{ + dm_ptr_ = dm; + + if (dm == nullptr) + { + nks_ = 0; + nrow_ = 0; + ncol_ = 0; + return; + } + + nks_ = dm->get_DMK_nks(); + nrow_ = dm->get_DMK_nrow(); + ncol_ = dm->get_DMK_ncol(); + + // Initialize pointer arrays for compatibility mode + dmk_ptrs_.resize(nks_, nullptr); +} + +template +void PyDensityMatrixAccessor::set_dimensions(int nks, int nrow, int ncol) +{ + nks_ = nks; + nrow_ = nrow; + ncol_ = ncol; + dmk_ptrs_.resize(nks, nullptr); +} + +template +void PyDensityMatrixAccessor::set_DMK_data(int ik, const TK* data) +{ + if (ik >= 0 && ik < nks_) + { + dmk_ptrs_[ik] = data; + } +} + +template +py::array_t PyDensityMatrixAccessor::get_DMK(int ik) const +{ + if (!is_valid() || ik < 0 || ik >= nks_) + { + throw std::runtime_error("Invalid k-point index or density matrix not available."); + } + + if (dmk_ptrs_[ik] == nullptr) + { + throw std::runtime_error("DM(k) data not set for this k-point."); + } + + std::vector shape = {static_cast(nrow_), static_cast(ncol_)}; + + auto result = py::array_t(shape); + auto buf = result.request(); + TK* ptr = static_cast(buf.ptr); + + std::copy(dmk_ptrs_[ik], dmk_ptrs_[ik] + nrow_ * ncol_, ptr); + + return result; +} + +template +std::vector> PyDensityMatrixAccessor::get_DMK_all() const +{ + std::vector> result; + for (int ik = 0; ik < nks_; ++ik) + { + result.push_back(get_DMK(ik)); + } + return result; +} + +template +py::dict PyDensityMatrixAccessor::get_DMR() const +{ + // Placeholder: will be implemented when full ABACUS integration is available + py::dict result; + return result; +} + +// Explicit template instantiations +template class PyDensityMatrixAccessor; +template class PyDensityMatrixAccessor, double>; + +// ============================================================================ +// PyESolverLCAO Implementation (template) +// ============================================================================ + +template +PyESolverLCAO::PyESolverLCAO() +{ + // Constructor - initialization deferred to initialize() +} + +template +PyESolverLCAO::~PyESolverLCAO() +{ + // Destructor - cleanup will be implemented in Phase 3 +} + +template +void PyESolverLCAO::initialize(const std::string& input_dir) +{ + // Placeholder: will be implemented in Phase 3 + // This will: + // 1. Read INPUT file from input_dir + // 2. Initialize UnitCell + // 3. Create ESolver_KS_LCAO instance + initialized_ = true; + std::cout << "[PyESolverLCAO] Initialized with input directory: " << input_dir << std::endl; +} + +template +void PyESolverLCAO::before_all_runners() +{ + if (!initialized_) + { + throw std::runtime_error("ESolver not initialized. Call initialize() first."); + } + // Placeholder: will call esolver_->before_all_runners() in Phase 3 + std::cout << "[PyESolverLCAO] before_all_runners called" << std::endl; +} + +template +void PyESolverLCAO::before_scf(int istep) +{ + if (!initialized_) + { + throw std::runtime_error("ESolver not initialized. Call initialize() first."); + } + istep_ = istep; + scf_started_ = true; + conv_esolver_ = false; + niter_ = 0; + // Placeholder: will call esolver_->before_scf() in Phase 3 + std::cout << "[PyESolverLCAO] before_scf called for step " << istep << std::endl; +} + +template +void PyESolverLCAO::run_scf_iteration(int iter) +{ + if (!scf_started_) + { + throw std::runtime_error("SCF not started. Call before_scf() first."); + } + niter_ = iter; + // Placeholder: will implement actual SCF iteration in Phase 3 + // 1. iter_init() + // 2. hamilt2rho() + // 3. iter_finish() + std::cout << "[PyESolverLCAO] SCF iteration " << iter << std::endl; +} + +template +void PyESolverLCAO::run_scf(int max_iter) +{ + before_scf(istep_); + + for (int iter = 1; iter <= max_iter; ++iter) + { + run_scf_iteration(iter); + if (conv_esolver_) + { + break; + } + } +} + +template +void PyESolverLCAO::after_scf(int istep) +{ + if (!scf_started_) + { + throw std::runtime_error("SCF not started. Call before_scf() first."); + } + // Placeholder: will call esolver_->after_scf() in Phase 3 + std::cout << "[PyESolverLCAO] after_scf called for step " << istep << std::endl; + scf_started_ = false; +} + +template +PyChargeAccessor PyESolverLCAO::get_charge() const +{ + PyChargeAccessor accessor; + // Note: esolver_ connection will be implemented when full ABACUS integration is available + // For now, return empty accessor + return accessor; +} + +template +PyEnergyAccessor PyESolverLCAO::get_energy() const +{ + PyEnergyAccessor accessor; + // Note: esolver_ connection will be implemented when full ABACUS integration is available + // For now, return empty accessor + return accessor; +} + +template +PyHamiltonianAccessor PyESolverLCAO::get_hamiltonian() const +{ + PyHamiltonianAccessor accessor; + // Note: esolver_ connection will be implemented when full ABACUS integration is available + // For now, return empty accessor + return accessor; +} + +template +PyDensityMatrixAccessor PyESolverLCAO::get_density_matrix() const +{ + PyDensityMatrixAccessor accessor; + // Note: esolver_ connection will be implemented when full ABACUS integration is available + // For now, return empty accessor + return accessor; +} + +template +py::array_t PyESolverLCAO::get_psi(int ik) const +{ + // Note: Will return wave function coefficients when full ABACUS integration is available + return py::array_t(); +} + +template +py::array_t PyESolverLCAO::get_eigenvalues(int ik) const +{ + // Note: Will return eigenvalues when full ABACUS integration is available + return py::array_t(); +} + +template +py::array_t PyESolverLCAO::get_occupations(int ik) const +{ + // Note: Will return occupation numbers when full ABACUS integration is available + return py::array_t(); +} + +template +int PyESolverLCAO::get_nks() const +{ + // Note: Will return actual nks when full ABACUS integration is available + return 0; +} + +template +py::array_t PyESolverLCAO::get_kvec_d(int ik) const +{ + std::vector shape = {3}; + auto result = py::array_t(shape); + auto buf = result.request(); + double* ptr = static_cast(buf.ptr); + ptr[0] = ptr[1] = ptr[2] = 0.0; + return result; +} + +template +py::array_t PyESolverLCAO::get_wk() const +{ + // Note: Will return k-point weights when full ABACUS integration is available + return py::array_t(); +} + +template +int PyESolverLCAO::get_nbasis() const +{ + // Note: Will return actual nbasis when full ABACUS integration is available + return 0; +} + +template +int PyESolverLCAO::get_nbands() const +{ + // Note: Will return actual nbands when full ABACUS integration is available + return 0; +} + +template +int PyESolverLCAO::get_nspin() const +{ + // Note: Will return actual nspin when full ABACUS integration is available + return 1; +} + +template +int PyESolverLCAO::get_nat() const +{ + // Note: Will return actual nat when full ABACUS integration is available + return 0; +} + +// Explicit template instantiations +template class PyESolverLCAO; +template class PyESolverLCAO, double>; + +} // namespace py_esolver + +// ============================================================================ +// Pybind11 Module Definition +// ============================================================================ + +void bind_charge_accessor(py::module& m) +{ + py::class_(m, "ChargeAccessor", + R"pbdoc( + Accessor for charge density data. + + Provides access to real-space charge density (rho) and related quantities. + )pbdoc") + .def(py::init<>()) + .def("get_rho", &py_esolver::PyChargeAccessor::get_rho, + R"pbdoc( + Get real-space charge density as numpy array. + + Returns + ------- + numpy.ndarray + Charge density with shape (nspin, nrxx) + )pbdoc") + .def("get_rhog", &py_esolver::PyChargeAccessor::get_rhog, + R"pbdoc( + Get reciprocal-space charge density as numpy array. + + Returns + ------- + numpy.ndarray + Charge density in G-space with shape (nspin, ngmc) + )pbdoc") + .def("get_rho_core", &py_esolver::PyChargeAccessor::get_rho_core, + R"pbdoc( + Get core charge density as numpy array. + + Returns + ------- + numpy.ndarray + Core charge density with shape (nrxx,) + )pbdoc") + .def_property_readonly("nspin", &py_esolver::PyChargeAccessor::get_nspin, + "Number of spin channels") + .def_property_readonly("nrxx", &py_esolver::PyChargeAccessor::get_nrxx, + "Number of real-space grid points") + .def_property_readonly("ngmc", &py_esolver::PyChargeAccessor::get_ngmc, + "Number of G-vectors for charge density") + .def("is_valid", &py_esolver::PyChargeAccessor::is_valid, + "Check if charge data is available"); +} + +void bind_energy_accessor(py::module& m) +{ + py::class_(m, "EnergyAccessor", + R"pbdoc( + Accessor for energy data. + + Provides access to various energy components from the calculation. + All energies are in Rydberg units. + )pbdoc") + .def(py::init<>()) + .def_property_readonly("etot", &py_esolver::PyEnergyAccessor::get_etot, + "Total energy (Ry)") + .def_property_readonly("eband", &py_esolver::PyEnergyAccessor::get_eband, + "Band energy (Ry)") + .def_property_readonly("hartree_energy", &py_esolver::PyEnergyAccessor::get_hartree_energy, + "Hartree energy (Ry)") + .def_property_readonly("etxc", &py_esolver::PyEnergyAccessor::get_etxc, + "Exchange-correlation energy (Ry)") + .def_property_readonly("ewald_energy", &py_esolver::PyEnergyAccessor::get_ewald_energy, + "Ewald energy (Ry)") + .def_property_readonly("demet", &py_esolver::PyEnergyAccessor::get_demet, + "-TS term for metals (Ry)") + .def_property_readonly("exx", &py_esolver::PyEnergyAccessor::get_exx, + "Exact exchange energy (Ry)") + .def_property_readonly("evdw", &py_esolver::PyEnergyAccessor::get_evdw, + "van der Waals energy (Ry)") + .def("get_all_energies", &py_esolver::PyEnergyAccessor::get_all_energies, + "Get all energies as a dictionary"); +} + +template +void bind_hamiltonian_accessor(py::module& m, const std::string& suffix) +{ + using HamiltAccessor = py_esolver::PyHamiltonianAccessor; + + std::string class_name = "HamiltonianAccessor" + suffix; + + py::class_(m, class_name.c_str(), + R"pbdoc( + Accessor for Hamiltonian matrix data. + + Provides access to H(k), S(k), H(R), and S(R) matrices. + )pbdoc") + .def(py::init<>()) + .def_property_readonly("nbasis", &HamiltAccessor::get_nbasis, + "Number of basis functions") + .def_property_readonly("nks", &HamiltAccessor::get_nks, + "Number of k-points") + .def("get_Hk", &HamiltAccessor::get_Hk, + R"pbdoc( + Get H(k) matrix for specific k-point. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + numpy.ndarray + Hamiltonian matrix at k-point ik + )pbdoc", "ik"_a) + .def("get_Sk", &HamiltAccessor::get_Sk, + R"pbdoc( + Get S(k) overlap matrix for specific k-point. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + numpy.ndarray + Overlap matrix at k-point ik + )pbdoc", "ik"_a) + .def("get_HR", &HamiltAccessor::get_HR, + "Get H(R) in sparse format") + .def("get_SR", &HamiltAccessor::get_SR, + "Get S(R) in sparse format") + .def("is_valid", &HamiltAccessor::is_valid, + "Check if Hamiltonian data is available"); +} + +template +void bind_density_matrix_accessor(py::module& m, const std::string& suffix) +{ + using DMAccessor = py_esolver::PyDensityMatrixAccessor; + + std::string class_name = "DensityMatrixAccessor" + suffix; + + py::class_(m, class_name.c_str(), + R"pbdoc( + Accessor for density matrix data. + + Provides access to DM(k) and DM(R) matrices. + )pbdoc") + .def(py::init<>()) + .def_property_readonly("nks", &DMAccessor::get_nks, + "Number of k-points") + .def_property_readonly("nrow", &DMAccessor::get_nrow, + "Number of rows in density matrix") + .def_property_readonly("ncol", &DMAccessor::get_ncol, + "Number of columns in density matrix") + .def("get_DMK", &DMAccessor::get_DMK, + R"pbdoc( + Get DM(k) for specific k-point. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + numpy.ndarray + Density matrix at k-point ik + )pbdoc", "ik"_a) + .def("get_DMK_all", &DMAccessor::get_DMK_all, + "Get all DM(k) matrices as a list") + .def("get_DMR", &DMAccessor::get_DMR, + "Get DM(R) in sparse format") + .def("is_valid", &DMAccessor::is_valid, + "Check if density matrix data is available"); +} + +template +void bind_esolver_lcao(py::module& m, const std::string& suffix) +{ + using ESolver = py_esolver::PyESolverLCAO; + + std::string class_name = "ESolverLCAO" + suffix; + + py::class_(m, class_name.c_str(), + R"pbdoc( + Python wrapper for ESolver_KS_LCAO. + + This class provides a Python interface for LCAO calculations + with support for breakpoints and state inspection during SCF. + + Example + ------- + >>> esolver = ESolverLCAO_gamma() + >>> esolver.initialize("./") + >>> esolver.before_all_runners() + >>> esolver.before_scf(0) + >>> for iter in range(1, 101): + ... esolver.run_scf_iteration(iter) + ... energy = esolver.get_energy() + ... print(f"Iter {iter}: E = {energy.etot}") + ... if esolver.is_converged(): + ... break + >>> # Breakpoint before after_scf - inspect state here + >>> charge = esolver.get_charge() + >>> hamiltonian = esolver.get_hamiltonian() + >>> esolver.after_scf(0) + )pbdoc") + .def(py::init<>()) + + // Initialization + .def("initialize", &ESolver::initialize, + R"pbdoc( + Initialize ESolver from INPUT file. + + Parameters + ---------- + input_dir : str + Directory containing INPUT, STRU, and other input files + )pbdoc", "input_dir"_a) + .def("before_all_runners", &ESolver::before_all_runners, + "Initialize calculation environment") + + // SCF Control + .def("before_scf", &ESolver::before_scf, + R"pbdoc( + Prepare for SCF calculation. + + Parameters + ---------- + istep : int, optional + Ion step index (default: 0) + )pbdoc", "istep"_a = 0) + .def("run_scf_iteration", &ESolver::run_scf_iteration, + R"pbdoc( + Run a single SCF iteration. + + Parameters + ---------- + iter : int + Iteration number (1-based) + )pbdoc", "iter"_a) + .def("run_scf", &ESolver::run_scf, + R"pbdoc( + Run complete SCF loop. + + Parameters + ---------- + max_iter : int, optional + Maximum number of iterations (default: 100) + )pbdoc", "max_iter"_a = 100) + .def("after_scf", &ESolver::after_scf, + R"pbdoc( + Finalize SCF calculation. + + Parameters + ---------- + istep : int, optional + Ion step index (default: 0) + )pbdoc", "istep"_a = 0) + + // Status + .def("is_converged", &ESolver::is_converged, + "Check if SCF is converged") + .def_property_readonly("niter", &ESolver::get_niter, + "Current iteration number") + .def_property_readonly("drho", &ESolver::get_drho, + "Charge density difference") + .def_property_readonly("istep", &ESolver::get_istep, + "Current ion step") + + // Data Accessors + .def("get_charge", &ESolver::get_charge, + "Get charge density accessor") + .def("get_energy", &ESolver::get_energy, + "Get energy accessor") + .def("get_hamiltonian", &ESolver::get_hamiltonian, + "Get Hamiltonian accessor") + .def("get_density_matrix", &ESolver::get_density_matrix, + "Get density matrix accessor") + + // Wave functions + .def("get_psi", &ESolver::get_psi, + "Get wave function coefficients for k-point ik", "ik"_a) + .def("get_eigenvalues", &ESolver::get_eigenvalues, + "Get eigenvalues for k-point ik", "ik"_a) + .def("get_occupations", &ESolver::get_occupations, + "Get occupation numbers for k-point ik", "ik"_a) + + // K-points + .def_property_readonly("nks", &ESolver::get_nks, + "Number of k-points") + .def("get_kvec_d", &ESolver::get_kvec_d, + "Get k-vector in direct coordinates", "ik"_a) + .def("get_wk", &ESolver::get_wk, + "Get k-point weights") + + // System info + .def_property_readonly("nbasis", &ESolver::get_nbasis, + "Number of basis functions") + .def_property_readonly("nbands", &ESolver::get_nbands, + "Number of bands") + .def_property_readonly("nspin", &ESolver::get_nspin, + "Number of spin channels") + .def_property_readonly("nat", &ESolver::get_nat, + "Number of atoms"); +} + +PYBIND11_MODULE(_esolver_pack, m) +{ + m.doc() = R"pbdoc( + PyABACUS ESolver Module + ----------------------- + + This module provides Python bindings for ABACUS ESolver_KS_LCAO, + enabling Python-controlled SCF workflows with breakpoint support. + + Main Classes + ------------ + ESolverLCAO_gamma : ESolver for gamma-only calculations + ESolverLCAO_multi_k : ESolver for multi-k calculations + + Accessor Classes + ---------------- + ChargeAccessor : Access charge density data + EnergyAccessor : Access energy components + HamiltonianAccessor_gamma/multi_k : Access Hamiltonian matrices + DensityMatrixAccessor_gamma/multi_k : Access density matrices + + Example + ------- + >>> from pyabacus.esolver import ESolverLCAO_gamma + >>> esolver = ESolverLCAO_gamma() + >>> esolver.initialize("./") + >>> esolver.before_all_runners() + >>> esolver.before_scf(0) + >>> # Run SCF with breakpoint support + >>> for iter in range(1, 101): + ... esolver.run_scf_iteration(iter) + ... if esolver.is_converged(): + ... break + >>> # Inspect state before after_scf + >>> charge = esolver.get_charge() + >>> energy = esolver.get_energy() + >>> esolver.after_scf(0) + )pbdoc"; + + // Bind accessor classes + bind_charge_accessor(m); + bind_energy_accessor(m); + bind_hamiltonian_accessor(m, "_gamma"); + bind_hamiltonian_accessor>(m, "_multi_k"); + bind_density_matrix_accessor(m, "_gamma"); + bind_density_matrix_accessor>(m, "_multi_k"); + + // Bind ESolver classes + bind_esolver_lcao(m, "_gamma"); + bind_esolver_lcao, double>(m, "_multi_k"); +} diff --git a/python/pyabacus/src/ModuleESolver/py_esolver_lcao.hpp b/python/pyabacus/src/ModuleESolver/py_esolver_lcao.hpp new file mode 100644 index 0000000000..61e6b24cbe --- /dev/null +++ b/python/pyabacus/src/ModuleESolver/py_esolver_lcao.hpp @@ -0,0 +1,472 @@ +#ifndef PY_ESOLVER_LCAO_HPP +#define PY_ESOLVER_LCAO_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "../utils/pybind_utils.h" +#include "interfaces/i_scf_controller.hpp" +#include "interfaces/i_hamiltonian_builder.hpp" +#include "interfaces/i_charge_mixer.hpp" +#include "interfaces/i_diagonalizer.hpp" +#include "components/scf_controller_lcao.hpp" + +// Forward declarations for ABACUS types +class UnitCell; +class Charge; +class Parallel_Orbitals; +namespace elecstate { + struct fenergy; + class ElecState; + template class DensityMatrix; +} +namespace hamilt { + template class HContainer; + template class AtomPair; + template class BaseMatrix; + template class HamiltLCAO; +} +namespace ModuleESolver { + template class ESolver_KS_LCAO; +} + +namespace py = pybind11; + +namespace py_esolver +{ + +/** + * @brief Accessor class for charge density data + * + * Provides Python access to charge density (rho) in real and reciprocal space + */ +class PyChargeAccessor +{ +public: + PyChargeAccessor() = default; + + /// Set internal pointers from Charge object + void set_from_charge(const Charge* chr); + + /// Set data directly (for compatibility with existing code) + void set_data(const double* rho_ptr, int nspin, int nrxx); + + /// Get real-space charge density as numpy array (nspin, nrxx) + py::array_t get_rho() const; + + /// Get reciprocal-space charge density as numpy array (nspin, ngmc) + py::array_t> get_rhog() const; + + /// Get core charge density + py::array_t get_rho_core() const; + + /// Get number of spin channels + int get_nspin() const { return nspin_; } + + /// Get number of real-space grid points + int get_nrxx() const { return nrxx_; } + + /// Get number of G-vectors + int get_ngmc() const { return ngmc_; } + + /// Check if data is valid + bool is_valid() const { return (chr_ptr_ != nullptr || rho_ptr_ != nullptr) && nspin_ > 0; } + +private: + const Charge* chr_ptr_ = nullptr; + const double* rho_ptr_ = nullptr; // Direct pointer for compatibility + int nspin_ = 0; + int nrxx_ = 0; + int ngmc_ = 0; +}; + +/** + * @brief Accessor class for energy data + * + * Provides Python access to various energy components + */ +class PyEnergyAccessor +{ +public: + PyEnergyAccessor() = default; + + /// Set from fenergy structure + void set_from_fenergy(const elecstate::fenergy* f_en); + + /// Set energies directly (for compatibility) + void set_energies(double etot, double eband, double hartree, + double etxc, double ewald, double demet, + double exx, double evdw); + + /// Get total energy (Ry) + double get_etot() const { return etot_; } + + /// Get band energy (Ry) + double get_eband() const { return eband_; } + + /// Get Hartree energy (Ry) + double get_hartree_energy() const { return hartree_energy_; } + + /// Get exchange-correlation energy (Ry) + double get_etxc() const { return etxc_; } + + /// Get Ewald energy (Ry) + double get_ewald_energy() const { return ewald_energy_; } + + /// Get -TS term for metals (Ry) + double get_demet() const { return demet_; } + + /// Get exact exchange energy (Ry) + double get_exx() const { return exx_; } + + /// Get van der Waals energy (Ry) + double get_evdw() const { return evdw_; } + + /// Get all energies as a dictionary + py::dict get_all_energies() const; + +private: + double etot_ = 0.0; + double eband_ = 0.0; + double hartree_energy_ = 0.0; + double etxc_ = 0.0; + double ewald_energy_ = 0.0; + double demet_ = 0.0; + double exx_ = 0.0; + double evdw_ = 0.0; +}; + +/** + * @brief Accessor class for Hamiltonian matrix data + * + * Provides Python access to H(R), S(R), H(k), S(k) matrices + */ +template +class PyHamiltonianAccessor +{ +public: + PyHamiltonianAccessor() = default; + + /// Set from HamiltLCAO object + void set_from_hamilt(hamilt::HamiltLCAO* hamilt_lcao, int nks, const Parallel_Orbitals* pv); + + /// Set dimensions directly (for compatibility) + void set_dimensions(int nbasis, int nks); + + /// Set H(k) data for a specific k-point + void set_Hk_data(int ik, const TK* data, int nrow, int ncol); + + /// Set S(k) data for a specific k-point + void set_Sk_data(int ik, const TK* data, int nrow, int ncol); + + /// Get number of basis functions + int get_nbasis() const { return nbasis_; } + + /// Get number of k-points + int get_nks() const { return nks_; } + + /// Get local matrix size (for 2D distribution) + int get_nloc() const { return nloc_; } + + /// Get H(k) matrix for specific k-point (local part in 2D distribution) + py::array_t get_Hk(int ik) const; + + /// Get S(k) matrix for specific k-point (local part in 2D distribution) + py::array_t get_Sk(int ik) const; + + /// Get H(R) in sparse COO format: returns (row_indices, col_indices, R_vectors, values) + py::tuple get_HR_sparse() const; + + /// Get S(R) in sparse COO format: returns (row_indices, col_indices, R_vectors, values) + py::tuple get_SR_sparse() const; + + /// Get H(R) as dictionary: {(iat1, iat2, R): matrix} + py::dict get_HR() const; + + /// Get S(R) as dictionary: {(iat1, iat2, R): matrix} + py::dict get_SR() const; + + /// Check if data is valid + bool is_valid() const { return (hamilt_ptr_ != nullptr || nbasis_ > 0) && nks_ > 0; } + +private: + hamilt::HamiltLCAO* hamilt_ptr_ = nullptr; + const Parallel_Orbitals* pv_ = nullptr; + int nbasis_ = 0; + int nks_ = 0; + int nloc_ = 0; + int nrow_ = 0; + int ncol_ = 0; + + // For direct data access (compatibility mode) + std::vector hk_ptrs_; + std::vector sk_ptrs_; + std::vector> matrix_dims_; +}; + +/** + * @brief Accessor class for density matrix data + * + * Provides Python access to DM(k) and DM(R) + */ +template +class PyDensityMatrixAccessor +{ +public: + PyDensityMatrixAccessor() = default; + + /// Set from DensityMatrix object + void set_from_dm(elecstate::DensityMatrix* dm); + + /// Set dimensions directly (for compatibility) + void set_dimensions(int nks, int nrow, int ncol); + + /// Set DM(k) data for a specific k-point + void set_DMK_data(int ik, const TK* data); + + /// Get DM(k) for specific k-point + py::array_t get_DMK(int ik) const; + + /// Get all DM(k) matrices + std::vector> get_DMK_all() const; + + /// Get DM(R) in sparse format as dictionary + py::dict get_DMR() const; + + /// Get number of k-points + int get_nks() const { return nks_; } + + /// Get matrix row dimension + int get_nrow() const { return nrow_; } + + /// Get matrix column dimension + int get_ncol() const { return ncol_; } + + /// Check if data is valid + bool is_valid() const { return (dm_ptr_ != nullptr || nks_ > 0); } + +private: + elecstate::DensityMatrix* dm_ptr_ = nullptr; + int nks_ = 0; + int nrow_ = 0; + int ncol_ = 0; + + // For direct data access (compatibility mode) + std::vector dmk_ptrs_; +}; + +/** + * @brief Main wrapper class for ESolver_KS_LCAO + * + * Provides Python interface for LCAO calculations with breakpoint support. + * Now uses the component-based architecture with ISCFController. + * + * Template parameters: + * TK: Type for k-space quantities (double for gamma-only, complex for multi-k) + * TR: Type for real-space quantities (typically double) + */ +template +class PyESolverLCAO +{ +public: + PyESolverLCAO(); + ~PyESolverLCAO(); + + // ==================== Initialization ==================== + + /// Initialize from INPUT file directory + void initialize(const std::string& input_dir); + + /// Call before_all_runners + void before_all_runners(); + + // ==================== SCF Control ==================== + + /// Prepare for SCF calculation + void before_scf(int istep = 0); + + /// Run a single SCF iteration + void run_scf_iteration(int iter); + + /// Run complete SCF loop + void run_scf(int max_iter = 100); + + /// Finalize SCF calculation + void after_scf(int istep = 0); + + // ==================== Status Queries ==================== + + /// Check if SCF is converged + bool is_converged() const { return conv_esolver_; } + + /// Get current iteration number + int get_niter() const { return niter_; } + + /// Get charge density difference (drho) + double get_drho() const { return drho_; } + + /// Get current SCF step + int get_istep() const { return istep_; } + + // ==================== Data Accessors ==================== + + /// Get charge density accessor + PyChargeAccessor get_charge() const; + + /// Get energy accessor + PyEnergyAccessor get_energy() const; + + /// Get Hamiltonian accessor + PyHamiltonianAccessor get_hamiltonian() const; + + /// Get density matrix accessor + PyDensityMatrixAccessor get_density_matrix() const; + + // ==================== Wave Function Access ==================== + + /// Get wave function coefficients for k-point ik + py::array_t get_psi(int ik) const; + + /// Get eigenvalues for k-point ik + py::array_t get_eigenvalues(int ik) const; + + /// Get occupation numbers for k-point ik + py::array_t get_occupations(int ik) const; + + // ==================== K-point Information ==================== + + /// Get number of k-points + int get_nks() const; + + /// Get k-vector in direct coordinates for k-point ik + py::array_t get_kvec_d(int ik) const; + + /// Get k-point weights + py::array_t get_wk() const; + + // ==================== System Information ==================== + + /// Get number of basis functions + int get_nbasis() const; + + /// Get number of bands + int get_nbands() const; + + /// Get number of spin channels + int get_nspin() const; + + /// Get number of atoms + int get_nat() const; + + // ==================== Component Access (New API) ==================== + + /// Get SCF controller component + pyabacus::esolver::ISCFController* get_scf_controller() + { + return scf_controller_.get(); + } + + /// Get Hamiltonian builder component + pyabacus::esolver::IHamiltonianBuilder* get_hamiltonian_builder() + { + if (scf_controller_) + { + return static_cast*>( + scf_controller_->get_hamiltonian_builder()); + } + return nullptr; + } + + /// Get charge mixer component + pyabacus::esolver::IChargeMixer* get_charge_mixer() + { + if (scf_controller_) + { + return scf_controller_->get_charge_mixer(); + } + return nullptr; + } + + /// Get diagonalizer component + pyabacus::esolver::IDiagonalizer* get_diagonalizer() + { + if (scf_controller_) + { + return static_cast*>( + scf_controller_->get_diagonalizer()); + } + return nullptr; + } + + // ==================== Configuration (New API) ==================== + + /// Set SCF convergence criteria + void set_convergence_criteria(double drho_threshold, double energy_threshold, int max_iter) + { + pyabacus::esolver::SCFConvergenceCriteria criteria; + criteria.drho_threshold = drho_threshold; + criteria.energy_threshold = energy_threshold; + criteria.max_iterations = max_iter; + + if (auto* ctrl = dynamic_cast*>(scf_controller_.get())) + { + ctrl->set_convergence_criteria(criteria); + } + } + + /// Set mixing parameters + void set_mixing_beta(double beta) + { + if (auto* mixer = get_charge_mixer()) + { + mixer->set_mixing_beta(beta); + } + } + + /// Set mixing method + void set_mixing_method(const std::string& method) + { + if (auto* mixer = get_charge_mixer()) + { + mixer->set_mixing_method(pyabacus::esolver::string_to_mixing_method(method)); + } + } + +private: + // Internal state + bool initialized_ = false; + bool scf_started_ = false; + bool conv_esolver_ = false; + int istep_ = 0; + int niter_ = 0; + double drho_ = 0.0; + double diag_ethr_ = 1e-2; + + // ABACUS objects - will be properly initialized in Phase 3 + // For now, these are placeholders that will be connected to actual ABACUS instances + ModuleESolver::ESolver_KS_LCAO* esolver_ = nullptr; + UnitCell* ucell_ = nullptr; + + // Flag to indicate if we own the esolver (for cleanup) + bool owns_esolver_ = false; + + // Component-based SCF controller (new architecture) + std::unique_ptr> scf_controller_; +}; + +// Type aliases for common use cases +using PyESolverLCAO_Gamma = PyESolverLCAO; +using PyESolverLCAO_MultiK = PyESolverLCAO, double>; + +} // namespace py_esolver + +#endif // PY_ESOLVER_LCAO_HPP diff --git a/python/pyabacus/src/ModuleNAO/CMakeLists.txt b/python/pyabacus/src/ModuleNAO/CMakeLists.txt index 686695566a..2822ef9df6 100644 --- a/python/pyabacus/src/ModuleNAO/CMakeLists.txt +++ b/python/pyabacus/src/ModuleNAO/CMakeLists.txt @@ -1,4 +1,4 @@ -# add nao shared library +# add nao shared library list(APPEND _naos ${NAO_PATH}/atomic_radials.cpp ${NAO_PATH}/beta_radials.cpp @@ -19,6 +19,7 @@ list(APPEND _naos # ${ABACUS_SOURCE_DIR}/source_psi/kernels/psi_memory_op.cpp ${ABACUS_SOURCE_DIR}/source_base/module_device/memory_op.cpp ${ABACUS_SOURCE_DIR}/source_base/module_device/device.cpp + ${ABACUS_SOURCE_DIR}/source_base/module_device/device_helpers.cpp ) add_library(naopack SHARED ${_naos} diff --git a/python/pyabacus/src/ModuleNAO/py_m_nao.cpp b/python/pyabacus/src/ModuleNAO/py_m_nao.cpp index 22db0f99b0..c6c21e5fdf 100644 --- a/python/pyabacus/src/ModuleNAO/py_m_nao.cpp +++ b/python/pyabacus/src/ModuleNAO/py_m_nao.cpp @@ -6,8 +6,12 @@ #include "source_basis/module_nao/radial_collection.h" #include "source_basis/module_nao/two_center_integrator.h" +#include "../utils/pybind_utils.h" + namespace py = pybind11; using namespace pybind11::literals; +using namespace pyabacus::utils; + template using overload_cast_ = pybind11::detail::overload_cast_impl; @@ -16,10 +20,10 @@ void bind_m_nao(py::module& m) // Bind the RadialCollection class py::class_(m, "RadialCollection") .def(py::init<>(), R"pbdoc( - A class that holds all numerical radial functions of the same kind. - - An instance of this class could be the collection of all radial functions - of numerical atomic orbitals, or all Kleinman-Bylander beta functions from + A class that holds all numerical radial functions of the same kind. + + An instance of this class could be the collection of all radial functions + of numerical atomic orbitals, or all Kleinman-Bylander beta functions from all elements involved in a calculation. )pbdoc") .def( @@ -57,12 +61,8 @@ void bind_m_nao(py::module& m) const int ngrid, py::array_t grid, const char mode = 'i') { - py::buffer_info grid_info = grid.request(); - if (grid_info.size != ngrid) - { - throw std::runtime_error("grid array must be of size ngrid"); - } - self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); + check_array_size(grid, static_cast(ngrid), "grid"); + self.set_grid(for_r_space, ngrid, get_array_ptr(grid), mode); }, "Sets a common grid for all RadialSet objects.", "for_r_space"_a, @@ -97,11 +97,11 @@ void bind_m_nao(py::module& m) This class computes two-center integrals of the form: - / + / I(R) = | dr phi1(r) (op) phi2(r - R) - / + / - as well as their gradients, where op is 1 (overlap) or minus Laplacian (kinetic), and phi1, + as well as their gradients, where op is 1 (overlap) or minus Laplacian (kinetic), and phi1, phi2 are "atomic-orbital-like" functions of the form: phi(r) = chi(|r|) * Ylm(r/|r|) @@ -144,12 +144,8 @@ void bind_m_nao(py::module& m) const int m2, py::array_t pvR, bool cal_grad = false) { - py::buffer_info pvR_info = pvR.request(); - if (pvR_info.size != 3) - { - throw std::runtime_error("Radial part must have 3 elements"); - } - double* cvR = static_cast(pvR_info.ptr); + check_array_size(pvR, 3, "pvR"); + double* cvR = get_array_ptr(pvR); ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); double out[1] = {0.0}; double grad_out[3] = {0.0, 0.0, 0.0}; @@ -172,9 +168,9 @@ void bind_m_nao(py::module& m) This function calculates the two-center integral - / + / I(R) = | dr phi1(r) (op_) phi2(r - R) - / + / or its gradient by using the tabulated radial part and real Gaunt coefficients. @@ -200,7 +196,7 @@ void bind_m_nao(py::module& m) R2 - R1, the displacement vector between the two centers. cal_grad : bool, optional The gradient will not be computed if cal_grad is false. - + Returns ------- out_array : array_like @@ -228,12 +224,8 @@ void bind_m_nao(py::module& m) const int itype2, py::array_t pvR, const bool deriv) { - py::buffer_info pvR_info = pvR.request(); - if (pvR_info.size != 3) - { - throw std::runtime_error("Radial part must have 3 elements"); - } - double* cvR = static_cast(pvR_info.ptr); + check_array_size(pvR, 3, "pvR"); + double* cvR = get_array_ptr(pvR); ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); // TODO: check deriv & out memory allocation std::vector> out; @@ -276,17 +268,12 @@ void bind_m_nao(py::module& m) const std::string symbol = "", const int itype = 0, const bool init_sbt = true) { - py::buffer_info grid_info = grid.request(); - py::buffer_info value_info = value.request(); - if (grid_info.size != ngrid) - { - throw std::runtime_error("grid array must be of size ngrid"); - } + check_array_size(grid, static_cast(ngrid), "grid"); self.build(l, for_r_space, ngrid, - static_cast(grid_info.ptr), - static_cast(value_info.ptr), + get_array_ptr(grid), + get_array_ptr(value), p, izeta, symbol, @@ -360,12 +347,8 @@ void bind_m_nao(py::module& m) const int ngrid, py::array_t grid, const char mode = 'i') { - py::buffer_info grid_info = grid.request(); - if (grid_info.size != ngrid) - { - throw std::runtime_error("grid array must be of size ngrid"); - } - self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); + check_array_size(grid, static_cast(ngrid), "grid"); + self.set_grid(for_r_space, ngrid, get_array_ptr(grid), mode); }, R"pbdoc( Sets up a grid. @@ -423,8 +406,7 @@ void bind_m_nao(py::module& m) .def( "set_value", [](NumericalRadial& self, const bool for_r_space, py::array_t value, const int p) { - py::buffer_info value_info = value.request(); - self.set_value(for_r_space, static_cast(value_info.ptr), p); + self.set_value(for_r_space, get_array_ptr(value), p); }, R"pbdoc( Updates values on an existing grid. @@ -467,23 +449,19 @@ void bind_m_nao(py::module& m) .def_property_readonly("sbt", &NumericalRadial::sbt) .def_property_readonly("rgrid", [](NumericalRadial& self) { - const double* rgrid = self.rgrid(); - return py::array_t(self.nr(), rgrid); + return numpy_from_ptr_copy(self.rgrid(), static_cast(self.nr())); }) .def_property_readonly("kgrid", [](NumericalRadial& self) { - const double* kgrid = self.kgrid(); - return py::array_t(self.nk(), kgrid); + return numpy_from_ptr_copy(self.kgrid(), static_cast(self.nk())); }) .def_property_readonly("rvalue", [](NumericalRadial& self) { - const double* rvalue = self.rvalue(); - return py::array_t(self.nr(), rvalue); + return numpy_from_ptr_copy(self.rvalue(), static_cast(self.nr())); }) .def_property_readonly("kvalue", [](NumericalRadial& self) { - const double* kvalue = self.kvalue(); - return py::array_t(self.nk(), kvalue); + return numpy_from_ptr_copy(self.kvalue(), static_cast(self.nk())); }) .def_property_readonly("is_fft_compliant", overload_cast_<>()(&NumericalRadial::is_fft_compliant, py::const_)); } @@ -493,4 +471,4 @@ PYBIND11_MODULE(_nao_pack, m) m.doc() = "Module for Numerical Atomic Orbitals (NAO) in ABACUS"; bind_m_nao(m); -} \ No newline at end of file +} diff --git a/python/pyabacus/src/hsolver/CMakeLists.txt b/python/pyabacus/src/hsolver/CMakeLists.txt index 1246b791ec..764305098b 100644 --- a/python/pyabacus/src/hsolver/CMakeLists.txt +++ b/python/pyabacus/src/hsolver/CMakeLists.txt @@ -16,8 +16,9 @@ list(APPEND _diago ${BASE_PATH}/kernels/math_kernel_op_vec.cpp ${BASE_PATH}/kernels/math_ylm_op.cpp ${BASE_PATH}/module_device/device.cpp + ${BASE_PATH}/module_device/device_helpers.cpp ${BASE_PATH}/module_device/memory_op.cpp - + ${PSI_PATH}/psi.cpp ) add_library(diagopack SHARED diff --git a/python/pyabacus/src/hsolver/diago_adapter.hpp b/python/pyabacus/src/hsolver/diago_adapter.hpp new file mode 100644 index 0000000000..2a019d0143 --- /dev/null +++ b/python/pyabacus/src/hsolver/diago_adapter.hpp @@ -0,0 +1,336 @@ +/** + * @file diago_adapter.hpp + * @brief Template adapter for diagonalizer wrappers + * + * This header provides a unified template adapter that wraps different + * diagonalization solvers (David, DavSubspace, CG) with a common interface. + */ + +#ifndef PYABACUS_HSOLVER_DIAGO_ADAPTER_HPP +#define PYABACUS_HSOLVER_DIAGO_ADAPTER_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "diago_traits.hpp" +#include "../utils/pybind_utils.h" + +namespace py = pybind11; + +namespace pyabacus { +namespace hsolver { + +// ============================================================================ +// PyDiagoDavid Adapter +// ============================================================================ + +/** + * @brief Adapter for DiagoDavid solver + */ +class PyDiagoDavidAdapter +{ +public: + using Traits = DiagoDavidTraits; + using T = typename Traits::T; + using SolverType = typename Traits::SolverType; + + PyDiagoDavidAdapter(int nbasis, int nband) + : nbasis_(nbasis), nband_(nband) + { + storage_.allocate(nbasis, nband); + } + + PyDiagoDavidAdapter(const PyDiagoDavidAdapter&) = delete; + PyDiagoDavidAdapter& operator=(const PyDiagoDavidAdapter&) = delete; + + PyDiagoDavidAdapter(PyDiagoDavidAdapter&& other) noexcept + : storage_(std::move(other.storage_)) + , nbasis_(other.nbasis_) + , nband_(other.nband_) + { + } + + void set_psi(py::array_t psi_in) + { + storage_.set_psi(psi_in); + } + + py::array_t get_psi() const + { + return storage_.get_psi(); + } + + void init_eigenvalue() + { + storage_.init_eigenvalue(); + } + + py::array_t get_eigenvalue() const + { + return storage_.get_eigenvalue(); + } + + int diag( + std::function(py::array_t)> mm_op, + std::vector& precond_vec, + int dav_ndim, + double tol, + std::vector& diag_ethr, + int max_iter, + bool use_paw, + ::hsolver::diag_comm_info comm_info) + { + auto hpsi_func = make_hpsi_func_fstyle(mm_op); + auto spsi_func = make_spsi_func_identity(); + + solver_ = std::make_unique( + precond_vec.data(), + nband_, + nbasis_, + dav_ndim, + use_paw, + comm_info + ); + + return solver_->diag( + hpsi_func, + spsi_func, + nbasis_, + storage_.psi_ptr(), + storage_.eigenvalue_ptr(), + diag_ethr, + max_iter + ); + } + +private: + RawPointerStorage storage_; + std::unique_ptr solver_; + int nbasis_; + int nband_; +}; + +// ============================================================================ +// PyDiagoDavSubspace Adapter +// ============================================================================ + +/** + * @brief Adapter for DiagoDavSubspace solver + */ +class PyDiagoDavSubspaceAdapter +{ +public: + using Traits = DiagoDavSubspaceTraits; + using T = typename Traits::T; + using SolverType = typename Traits::SolverType; + + PyDiagoDavSubspaceAdapter(int nbasis, int nband) + : nbasis_(nbasis), nband_(nband) + { + storage_.allocate(nbasis, nband); + } + + PyDiagoDavSubspaceAdapter(const PyDiagoDavSubspaceAdapter&) = delete; + PyDiagoDavSubspaceAdapter& operator=(const PyDiagoDavSubspaceAdapter&) = delete; + + PyDiagoDavSubspaceAdapter(PyDiagoDavSubspaceAdapter&& other) noexcept + : storage_(std::move(other.storage_)) + , nbasis_(other.nbasis_) + , nband_(other.nband_) + { + } + + void set_psi(py::array_t psi_in) + { + storage_.set_psi(psi_in); + } + + py::array_t get_psi() const + { + return storage_.get_psi(); + } + + void init_eigenvalue() + { + storage_.init_eigenvalue(); + } + + py::array_t get_eigenvalue() const + { + return storage_.get_eigenvalue(); + } + + int diag( + std::function(py::array_t)> mm_op, + std::vector& precond_vec, + int dav_ndim, + double tol, + int max_iter, + bool need_subspace, + std::vector& diag_ethr, + bool scf_type, + ::hsolver::diag_comm_info comm_info, + int diag_subspace, + int nb2d) + { + auto hpsi_func = make_hpsi_func_fstyle(mm_op); + auto spsi_func = make_spsi_func_identity(); + + solver_ = std::make_unique( + precond_vec, + nband_, + nbasis_, + dav_ndim, + tol, + max_iter, + comm_info, + diag_subspace, + nb2d + ); + + return solver_->diag( + hpsi_func, + spsi_func, + storage_.psi_ptr(), + nbasis_, + storage_.eigenvalue_ptr(), + diag_ethr, + scf_type + ); + } + +private: + RawPointerStorage storage_; + std::unique_ptr solver_; + int nbasis_; + int nband_; +}; + +#ifdef __ENABLE_ATEN +// ============================================================================ +// PyDiagoCG Adapter +// ============================================================================ + +/** + * @brief Adapter for DiagoCG solver + */ +class PyDiagoCGAdapter +{ +public: + using Traits = DiagoCGTraits; + using T = typename Traits::T; + using SolverType = typename Traits::SolverType; + + PyDiagoCGAdapter(int dim, int num_eigs) + : dim_(dim), num_eigs_(num_eigs) + { + storage_.allocate(dim, num_eigs); + } + + PyDiagoCGAdapter(const PyDiagoCGAdapter&) = delete; + PyDiagoCGAdapter& operator=(const PyDiagoCGAdapter&) = delete; + + PyDiagoCGAdapter(PyDiagoCGAdapter&& other) noexcept + : storage_(std::move(other.storage_)) + , dim_(other.dim_) + , num_eigs_(other.num_eigs_) + { + } + + void set_psi(py::array_t psi_in) + { + storage_.set_psi(psi_in); + } + + py::array_t get_psi() const + { + return storage_.get_psi(); + } + + void init_eig() + { + storage_.init_eigenvalue(); + } + + py::array_t get_eig() const + { + return storage_.get_eigenvalue(); + } + + void set_prec(py::array_t prec_in) + { + storage_.set_preconditioner(prec_in); + } + + void diag( + std::function(py::array_t)> mm_op, + int diag_ndim, + double tol, + const std::vector& diag_ethr, + bool need_subspace, + bool scf_type, + int nproc_in_pool = 1) + { + const std::string basis_type = "pw"; + const std::string calculation = scf_type ? "scf" : "nscf"; + + auto hpsi_func = make_hpsi_func_tensor(mm_op); + auto spsi_func = make_spsi_func_tensor_identity(); + auto subspace_func = [](const ct::Tensor& psi_in, ct::Tensor& psi_out, const bool S_orth) { + // Do nothing - placeholder + }; + + solver_ = std::make_unique( + basis_type, + calculation, + need_subspace, + subspace_func, + tol, + diag_ndim, + nproc_in_pool + ); + + solver_->diag( + hpsi_func, + spsi_func, + *storage_.psi_tensor(), + *storage_.eig_tensor(), + diag_ethr, + *storage_.prec_tensor() + ); + } + +private: + TensorStorage storage_; + std::unique_ptr solver_; + int dim_; + int num_eigs_; +}; +#endif // __ENABLE_ATEN + +// ============================================================================ +// Backward Compatibility Aliases +// ============================================================================ + +namespace py_hsolver_compat { + +using PyDiagoDavid = PyDiagoDavidAdapter; +using PyDiagoDavSubspace = PyDiagoDavSubspaceAdapter; + +#ifdef __ENABLE_ATEN +using PyDiagoCG = PyDiagoCGAdapter; +#endif + +} // namespace py_hsolver_compat + +} // namespace hsolver +} // namespace pyabacus + +#endif // PYABACUS_HSOLVER_DIAGO_ADAPTER_HPP diff --git a/python/pyabacus/src/hsolver/diago_traits.hpp b/python/pyabacus/src/hsolver/diago_traits.hpp new file mode 100644 index 0000000000..c23d9f3a9f --- /dev/null +++ b/python/pyabacus/src/hsolver/diago_traits.hpp @@ -0,0 +1,490 @@ +/** + * @file diago_traits.hpp + * @brief Type traits and storage policies for diagonalizer adapters + * + * This header defines: + * - Storage policies for different memory management strategies + * - Solver traits for different diagonalization algorithms + */ + +#ifndef PYABACUS_HSOLVER_DIAGO_TRAITS_HPP +#define PYABACUS_HSOLVER_DIAGO_TRAITS_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "source_hsolver/diago_david.h" +#include "source_hsolver/diago_dav_subspace.h" +#include "source_hsolver/diago_cg.h" +#include "source_base/module_device/memory_op.h" + +#ifdef __ENABLE_ATEN +#include +#include +#include +#endif + +namespace py = pybind11; + +namespace pyabacus { +namespace hsolver { + +// ============================================================================ +// Storage Policies +// ============================================================================ + +/** + * @brief Storage policy using raw pointers + * + * Used by DiagoDavid and DiagoDavSubspace which work with raw arrays. + */ +template +class RawPointerStorage +{ +public: + using value_type = T; + + RawPointerStorage() = default; + + void allocate(int nbasis, int nband) + { + nbasis_ = nbasis; + nband_ = nband; + psi_ = new T[nbasis * nband]; + eigenvalue_ = new double[nband]; + } + + ~RawPointerStorage() + { + cleanup(); + } + + // Move semantics + RawPointerStorage(RawPointerStorage&& other) noexcept + : psi_(other.psi_) + , eigenvalue_(other.eigenvalue_) + , nbasis_(other.nbasis_) + , nband_(other.nband_) + { + other.psi_ = nullptr; + other.eigenvalue_ = nullptr; + } + + RawPointerStorage& operator=(RawPointerStorage&& other) noexcept + { + if (this != &other) + { + cleanup(); + psi_ = other.psi_; + eigenvalue_ = other.eigenvalue_; + nbasis_ = other.nbasis_; + nband_ = other.nband_; + other.psi_ = nullptr; + other.eigenvalue_ = nullptr; + } + return *this; + } + + // Disable copy + RawPointerStorage(const RawPointerStorage&) = delete; + RawPointerStorage& operator=(const RawPointerStorage&) = delete; + + void set_psi(py::array_t psi_in) + { + if (static_cast(psi_in.size()) != static_cast(nbasis_ * nband_)) + { + throw std::runtime_error("psi_in size mismatch"); + } + for (size_t i = 0; i < static_cast(nbasis_ * nband_); ++i) + { + psi_[i] = psi_in.at(i); + } + } + + py::array_t get_psi() const + { + py::array_t psi_out(nband_ * nbasis_); + py::buffer_info buf = psi_out.request(); + T* ptr = static_cast(buf.ptr); + for (size_t i = 0; i < static_cast(nband_ * nbasis_); ++i) + { + ptr[i] = psi_[i]; + } + return psi_out; + } + + void init_eigenvalue() + { + for (int i = 0; i < nband_; ++i) + { + eigenvalue_[i] = 0.0; + } + } + + py::array_t get_eigenvalue() const + { + py::array_t eig_out(nband_); + py::buffer_info buf = eig_out.request(); + double* ptr = static_cast(buf.ptr); + for (int i = 0; i < nband_; ++i) + { + ptr[i] = eigenvalue_[i]; + } + return eig_out; + } + + // Accessors for solver + T* psi_ptr() { return psi_; } + double* eigenvalue_ptr() { return eigenvalue_; } + int nbasis() const { return nbasis_; } + int nband() const { return nband_; } + +private: + void cleanup() + { + if (psi_ != nullptr) + { + delete[] psi_; + psi_ = nullptr; + } + if (eigenvalue_ != nullptr) + { + delete[] eigenvalue_; + eigenvalue_ = nullptr; + } + } + + T* psi_ = nullptr; + double* eigenvalue_ = nullptr; + int nbasis_ = 0; + int nband_ = 0; +}; + +#ifdef __ENABLE_ATEN +/** + * @brief Storage policy using ATen tensors + * + * Used by DiagoCG which works with ATen tensor interface. + */ +template +class TensorStorage +{ +public: + using value_type = T; + + TensorStorage() = default; + + void allocate(int dim, int num_eigs) + { + dim_ = dim; + num_eigs_ = num_eigs; + // Tensors are allocated lazily + } + + ~TensorStorage() + { + cleanup(); + } + + // Move semantics + TensorStorage(TensorStorage&& other) noexcept + : psi_(other.psi_) + , eig_(other.eig_) + , prec_(other.prec_) + , dim_(other.dim_) + , num_eigs_(other.num_eigs_) + { + other.psi_ = nullptr; + other.eig_ = nullptr; + other.prec_ = nullptr; + } + + TensorStorage& operator=(TensorStorage&& other) noexcept + { + if (this != &other) + { + cleanup(); + psi_ = other.psi_; + eig_ = other.eig_; + prec_ = other.prec_; + dim_ = other.dim_; + num_eigs_ = other.num_eigs_; + other.psi_ = nullptr; + other.eig_ = nullptr; + other.prec_ = nullptr; + } + return *this; + } + + // Disable copy + TensorStorage(const TensorStorage&) = delete; + TensorStorage& operator=(const TensorStorage&) = delete; + + void set_psi(py::array_t psi_in) + { + py::buffer_info buf = psi_in.request(); + T* ptr = static_cast(buf.ptr); + + psi_ = new ct::TensorMap( + ptr, + ct::DataType::DT_COMPLEX_DOUBLE, + ct::DeviceType::CpuDevice, + ct::TensorShape({num_eigs_, dim_}) + ); + } + + py::array_t get_psi() const + { + if (psi_ == nullptr) + { + throw std::runtime_error("psi is not initialized"); + } + py::array_t psi_out({num_eigs_, dim_}); + py::buffer_info buf = psi_out.request(); + T* ptr = static_cast(buf.ptr); + T* psi_ptr = psi_->data(); + std::copy(psi_ptr, psi_ptr + psi_->NumElements(), ptr); + return psi_out; + } + + void init_eigenvalue() + { + eig_ = new ct::Tensor(ct::DataType::DT_DOUBLE, {num_eigs_}); + eig_->zero(); + } + + py::array_t get_eigenvalue() const + { + if (eig_ == nullptr) + { + throw std::runtime_error("eigenvalue is not initialized"); + } + py::array_t eig_out(eig_->NumElements()); + py::buffer_info buf = eig_out.request(); + double* ptr = static_cast(buf.ptr); + double* eig_ptr = eig_->data(); + std::copy(eig_ptr, eig_ptr + eig_->NumElements(), ptr); + return eig_out; + } + + void set_preconditioner(py::array_t prec_in) + { + py::buffer_info buf = prec_in.request(); + double* ptr = static_cast(buf.ptr); + + prec_ = new ct::TensorMap( + ptr, + ct::DataType::DT_DOUBLE, + ct::DeviceType::CpuDevice, + ct::TensorShape({dim_}) + ); + } + + // Accessors for solver + ct::Tensor* psi_tensor() { return psi_; } + ct::Tensor* eig_tensor() { return eig_; } + ct::Tensor* prec_tensor() { return prec_; } + int dim() const { return dim_; } + int num_eigs() const { return num_eigs_; } + +private: + void cleanup() + { + if (psi_ != nullptr) + { + delete psi_; + psi_ = nullptr; + } + if (eig_ != nullptr) + { + delete eig_; + eig_ = nullptr; + } + if (prec_ != nullptr) + { + delete prec_; + prec_ = nullptr; + } + } + + ct::Tensor* psi_ = nullptr; + ct::Tensor* eig_ = nullptr; + ct::Tensor* prec_ = nullptr; + int dim_ = 0; + int num_eigs_ = 0; +}; +#endif // __ENABLE_ATEN + +// ============================================================================ +// Solver Traits +// ============================================================================ + +/** + * @brief Traits for DiagoDavid solver + */ +struct DiagoDavidTraits +{ + using T = std::complex; + using SolverType = ::hsolver::DiagoDavid; + using StoragePolicy = RawPointerStorage; + + static constexpr const char* name = "diago_david"; + static constexpr bool uses_f_style = true; // Column-major arrays + static constexpr bool has_preconditioner = true; + + // Memory synchronization operation + using syncmem_op = base_device::memory::synchronize_memory_op< + T, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; +}; + +/** + * @brief Traits for DiagoDavSubspace solver + */ +struct DiagoDavSubspaceTraits +{ + using T = std::complex; + using SolverType = ::hsolver::Diago_DavSubspace; + using StoragePolicy = RawPointerStorage; + + static constexpr const char* name = "diago_dav_subspace"; + static constexpr bool uses_f_style = true; // Column-major arrays + static constexpr bool has_preconditioner = true; + + // Memory synchronization operation + using syncmem_op = base_device::memory::synchronize_memory_op< + T, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; +}; + +#ifdef __ENABLE_ATEN +/** + * @brief Traits for DiagoCG solver + */ +struct DiagoCGTraits +{ + using T = std::complex; + using SolverType = ::hsolver::DiagoCG; + using StoragePolicy = TensorStorage; + + static constexpr const char* name = "diago_cg"; + static constexpr bool uses_f_style = false; // Row-major arrays + static constexpr bool has_preconditioner = true; + + // Memory synchronization operation for tensor interface + using syncmem_op = base_device::memory::synchronize_memory_op< + T, base_device::DEVICE_CPU, base_device::DEVICE_CPU>; +}; +#endif // __ENABLE_ATEN + +// ============================================================================ +// Helper Functions for Creating HPsi/SPsi Lambdas +// ============================================================================ + +/** + * @brief Create hpsi_func lambda for raw pointer interface (F-style) + * + * Wraps a Python callable to work with ABACUS raw pointer interface. + * Handles array layout conversion between Python (row-major) and + * ABACUS (column-major for Davidson methods). + */ +template +auto make_hpsi_func_fstyle( + std::function(py::array_t)> mm_op) +{ + return [mm_op](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) { + // Create F-style numpy array (column-major) + py::array_t psi({ld_psi, nvec}); + py::buffer_info buf = psi.request(); + T* ptr = static_cast(buf.ptr); + std::copy(psi_in, psi_in + nvec * ld_psi, ptr); + + // Call Python function + py::array_t hpsi = mm_op(psi); + + // Copy result back + py::buffer_info hpsi_buf = hpsi.request(); + T* hpsi_ptr = static_cast(hpsi_buf.ptr); + std::copy(hpsi_ptr, hpsi_ptr + nvec * ld_psi, hpsi_out); + }; +} + +/** + * @brief Create spsi_func lambda for raw pointer interface (identity) + * + * For non-orthogonal basis, S*psi = psi (identity operation). + */ +template +auto make_spsi_func_identity() +{ + using T = typename Traits::T; + using syncmem_op = typename Traits::syncmem_op; + + return [](const T* psi_in, T* spsi_out, const int nrow, const int nbands) { + syncmem_op()(spsi_out, psi_in, static_cast(nbands * nrow)); + }; +} + +#ifdef __ENABLE_ATEN +/** + * @brief Create hpsi_func lambda for tensor interface + */ +template +auto make_hpsi_func_tensor( + std::function(py::array_t)> mm_op) +{ + return [mm_op](const ct::Tensor& psi_in, ct::Tensor& hpsi_out) { + const auto ndim = psi_in.shape().ndim(); + REQUIRES_OK(ndim <= 2, "dims of psi_in should be less than or equal to 2"); + const int nvec = ndim == 1 ? 1 : psi_in.shape().dim_size(0); + const int ld_psi = ndim == 1 ? psi_in.NumElements() : psi_in.shape().dim_size(1); + + // Create numpy array (row-major for CG) + py::array_t psi({ld_psi, nvec}); + py::buffer_info buf = psi.request(); + T* ptr = static_cast(buf.ptr); + std::copy(psi_in.data(), psi_in.data() + nvec * ld_psi, ptr); + + // Call Python function + py::array_t hpsi = mm_op(psi); + + // Copy result back + py::buffer_info hpsi_buf = hpsi.request(); + T* hpsi_ptr = static_cast(hpsi_buf.ptr); + std::copy(hpsi_ptr, hpsi_ptr + nvec * ld_psi, hpsi_out.data()); + }; +} + +/** + * @brief Create spsi_func lambda for tensor interface (identity) + */ +template +auto make_spsi_func_tensor_identity() +{ + using T = typename Traits::T; + using syncmem_op = typename Traits::syncmem_op; + + return [](const ct::Tensor& psi_in, ct::Tensor& spsi_out) { + const auto ndim = psi_in.shape().ndim(); + REQUIRES_OK(ndim <= 2, "dims of psi_in should be less than or equal to 2"); + const int nrow = ndim == 1 ? psi_in.NumElements() : psi_in.shape().dim_size(1); + const int nbands = ndim == 1 ? 1 : psi_in.shape().dim_size(0); + syncmem_op()( + spsi_out.data(), + psi_in.data(), + static_cast(nrow * nbands) + ); + }; +} +#endif // __ENABLE_ATEN + +} // namespace hsolver +} // namespace pyabacus + +#endif // PYABACUS_HSOLVER_DIAGO_TRAITS_HPP diff --git a/python/pyabacus/src/hsolver/py_hsolver.cpp b/python/pyabacus/src/hsolver/py_hsolver.cpp index c37ea43b4b..fa7a22d9bc 100644 --- a/python/pyabacus/src/hsolver/py_hsolver.cpp +++ b/python/pyabacus/src/hsolver/py_hsolver.cpp @@ -1,3 +1,11 @@ +/** + * @file py_hsolver.cpp + * @brief Python bindings for HSolver diagonalization methods + * + * This file provides pybind11 bindings for the diagonalization solvers + * using the unified adapter template approach. + */ + #include #include #include @@ -9,37 +17,39 @@ #include "source_base/kernels/math_kernel_op.h" #include "source_base/module_device/types.h" -#include "./py_diago_dav_subspace.hpp" -#include "./py_diago_david.hpp" -#include "./py_diago_cg.hpp" +#include "diago_adapter.hpp" namespace py = pybind11; using namespace pybind11::literals; +using namespace pyabacus::hsolver; + void bind_hsolver(py::module& m) { + // Bind diag_comm_info struct py::class_(m, "diag_comm_info") .def(py::init(), "rank"_a, "nproc"_a) .def_readonly("rank", &hsolver::diag_comm_info::rank) .def_readonly("nproc", &hsolver::diag_comm_info::nproc); - py::class_(m, "diago_dav_subspace") + // Bind PyDiagoDavSubspace using adapter + py::class_(m, "diago_dav_subspace") .def(py::init(), R"pbdoc( - Constructor of diago_dav_subspace, a class for diagonalizing + Constructor of diago_dav_subspace, a class for diagonalizing a linear operator using the Davidson-Subspace Method. - This class serves as a backend computation class. The interface - for invoking this class is a function defined in _hsolver.py, + This class serves as a backend computation class. The interface + for invoking this class is a function defined in _hsolver.py, which uses this class to perform the calculations. Parameters ---------- - nbasis : int + nbasis : int The number of basis functions. - nband : int + nband : int The number of bands to be calculated. )pbdoc", "nbasis"_a, "nband"_a) - .def("diag", &py_hsolver::PyDiagoDavSubspace::diag, R"pbdoc( + .def("diag", &PyDiagoDavSubspaceAdapter::diag, R"pbdoc( Diagonalize the linear operator using the Davidson-Subspace Method. Parameters @@ -50,7 +60,7 @@ void bind_hsolver(py::module& m) precond_vec : np.ndarray The preconditioner vector. dav_ndim : int - The number of vectors, which is a multiple of the number of + The number of vectors, which is a multiple of the number of eigenvectors to be calculated. tol : double The tolerance for the convergence. @@ -74,48 +84,49 @@ void bind_hsolver(py::module& m) 0: LAPACK, 1: Gen-ELPA, 2: ScaLAPACK nb2d : int The block size in 2d block cyclic distribution if use elpa or scalapack. - )pbdoc", - "mm_op"_a, - "precond_vec"_a, - "dav_ndim"_a, - "tol"_a, - "max_iter"_a, - "need_subspace"_a, - "diag_ethr"_a, - "scf_type"_a, + )pbdoc", + "mm_op"_a, + "precond_vec"_a, + "dav_ndim"_a, + "tol"_a, + "max_iter"_a, + "need_subspace"_a, + "diag_ethr"_a, + "scf_type"_a, "comm_info"_a, "diago_subspace"_a, "nb2d"_a) - .def("set_psi", &py_hsolver::PyDiagoDavSubspace::set_psi, R"pbdoc( + .def("set_psi", &PyDiagoDavSubspaceAdapter::set_psi, R"pbdoc( Set the initial guess of the eigenvectors, i.e. the wave functions. )pbdoc", "psi_in"_a) - .def("get_psi", &py_hsolver::PyDiagoDavSubspace::get_psi, R"pbdoc( + .def("get_psi", &PyDiagoDavSubspaceAdapter::get_psi, R"pbdoc( Get the eigenvectors. )pbdoc") - .def("init_eigenvalue", &py_hsolver::PyDiagoDavSubspace::init_eigenvalue, R"pbdoc( + .def("init_eigenvalue", &PyDiagoDavSubspaceAdapter::init_eigenvalue, R"pbdoc( Initialize the eigenvalues as zero. )pbdoc") - .def("get_eigenvalue", &py_hsolver::PyDiagoDavSubspace::get_eigenvalue, R"pbdoc( - Get the eigenvalues. + .def("get_eigenvalue", &PyDiagoDavSubspaceAdapter::get_eigenvalue, R"pbdoc( + Get the eigenvalues. )pbdoc"); - py::class_(m, "diago_david") + // Bind PyDiagoDavid using adapter + py::class_(m, "diago_david") .def(py::init(), R"pbdoc( - Constructor of diago_david, a class for diagonalizing + Constructor of diago_david, a class for diagonalizing a linear operator using the Davidson Method. - This class serves as a backend computation class. The interface - for invoking this class is a function defined in _hsolver.py, + This class serves as a backend computation class. The interface + for invoking this class is a function defined in _hsolver.py, which uses this class to perform the calculations. Parameters ---------- - nbasis : int + nbasis : int The number of basis functions. - nband : int + nband : int The number of bands to be calculated. )pbdoc", "nbasis"_a, "nband"_a) - .def("diag", &py_hsolver::PyDiagoDavid::diag, R"pbdoc( + .def("diag", &PyDiagoDavidAdapter::diag, R"pbdoc( Diagonalize the linear operator using the Davidson Method. Parameters @@ -126,7 +137,7 @@ void bind_hsolver(py::module& m) precond_vec : np.ndarray The preconditioner vector. dav_ndim : int - The number of vectors, which is a multiple of the number of + The number of vectors, which is a multiple of the number of eigenvectors to be calculated. tol : double The tolerance for the convergence. @@ -136,39 +147,41 @@ void bind_hsolver(py::module& m) The maximum number of iterations. use_paw : bool Whether to use the projector augmented wave method. - )pbdoc", - "mm_op"_a, - "precond_vec"_a, - "dav_ndim"_a, - "tol"_a, + )pbdoc", + "mm_op"_a, + "precond_vec"_a, + "dav_ndim"_a, + "tol"_a, "diag_ethr"_a, - "max_iter"_a, - "use_paw"_a, + "max_iter"_a, + "use_paw"_a, "comm_info"_a) - .def("set_psi", &py_hsolver::PyDiagoDavid::set_psi, R"pbdoc( + .def("set_psi", &PyDiagoDavidAdapter::set_psi, R"pbdoc( Set the initial guess of the eigenvectors, i.e. the wave functions. )pbdoc", "psi_in"_a) - .def("get_psi", &py_hsolver::PyDiagoDavid::get_psi, R"pbdoc( + .def("get_psi", &PyDiagoDavidAdapter::get_psi, R"pbdoc( Get the eigenvectors. )pbdoc") - .def("init_eigenvalue", &py_hsolver::PyDiagoDavid::init_eigenvalue, R"pbdoc( + .def("init_eigenvalue", &PyDiagoDavidAdapter::init_eigenvalue, R"pbdoc( Initialize the eigenvalues as zero. )pbdoc") - .def("get_eigenvalue", &py_hsolver::PyDiagoDavid::get_eigenvalue, R"pbdoc( - Get the eigenvalues. + .def("get_eigenvalue", &PyDiagoDavidAdapter::get_eigenvalue, R"pbdoc( + Get the eigenvalues. )pbdoc"); - py::class_(m, "diago_cg") +#ifdef __ENABLE_ATEN + // Bind PyDiagoCG using adapter (only when ATen is available) + py::class_(m, "diago_cg") .def(py::init(), R"pbdoc( - Constructor of diago_cg, a class for diagonalizing + Constructor of diago_cg, a class for diagonalizing a linear operator using the Conjugate Gradient Method. - This class serves as a backend computation class. The interface - for invoking this class is a function defined in _hsolver.py, + This class serves as a backend computation class. The interface + for invoking this class is a function defined in _hsolver.py, which uses this class to perform the calculations. )pbdoc") .def("diag", - &py_hsolver::PyDiagoCG::diag, + &PyDiagoCGAdapter::diag, R"pbdoc( Diagonalize the linear operator using the Conjugate Gradient Method. @@ -190,25 +203,31 @@ void bind_hsolver(py::module& m) "mm_op"_a, "max_iter"_a, "tol"_a, - "diag_ethr"_a, + "diag_ethr"_a, "need_subspace"_a, "scf_type"_a, "nproc_in_pool"_a) - .def("init_eig", &py_hsolver::PyDiagoCG::init_eig, R"pbdoc( + .def("init_eig", &PyDiagoCGAdapter::init_eig, R"pbdoc( Initialize the eigenvalues. )pbdoc") - .def("get_eig", &py_hsolver::PyDiagoCG::get_eig, R"pbdoc( + .def("get_eig", &PyDiagoCGAdapter::get_eig, R"pbdoc( Get the eigenvalues. )pbdoc") - .def("set_psi", &py_hsolver::PyDiagoCG::set_psi, R"pbdoc( + .def("set_psi", &PyDiagoCGAdapter::set_psi, R"pbdoc( Set the eigenvectors. )pbdoc", "psi_in"_a) - .def("get_psi", &py_hsolver::PyDiagoCG::get_psi, R"pbdoc( + .def("get_psi", &PyDiagoCGAdapter::get_psi, R"pbdoc( Get the eigenvectors. )pbdoc") - .def("set_prec", &py_hsolver::PyDiagoCG::set_prec, R"pbdoc( + .def("set_prec", &PyDiagoCGAdapter::set_prec, R"pbdoc( Set the preconditioner. )pbdoc", "prec_in"_a); +#else + // Provide stub binding when ATen is not available + // This allows the module to load but will raise an error if used + m.def("diago_cg_available", []() { return false; }, + "Check if diago_cg is available (requires ATen)"); +#endif } PYBIND11_MODULE(_hsolver_pack, m) @@ -216,4 +235,4 @@ PYBIND11_MODULE(_hsolver_pack, m) m.doc() = "Submodule for pyabacus: hsolver"; bind_hsolver(m); -} \ No newline at end of file +} diff --git a/python/pyabacus/src/py_numerical_radial.cpp b/python/pyabacus/src/py_numerical_radial.cpp index ead8e7acca..18500641cf 100644 --- a/python/pyabacus/src/py_numerical_radial.cpp +++ b/python/pyabacus/src/py_numerical_radial.cpp @@ -3,8 +3,12 @@ #include "source_basis/module_nao/numerical_radial.h" +#include "utils/pybind_utils.h" + namespace py = pybind11; using namespace pybind11::literals; +using namespace pyabacus::utils; + template using overload_cast_ = pybind11::detail::overload_cast_impl; @@ -28,22 +32,15 @@ void bind_numerical_radial(py::module& m) const std::string symbol = "", const int itype, const bool init_sbt = true) { - py::buffer_info grid_info = grid.request(); - py::buffer_info value_info = value.request(); - if (grid_info.ndim != 1 || value_info.ndim != 1) - { - throw std::runtime_error("Input arrays must be 1-dimensional"); - } - if (grid_info.shape[0] != value_info.shape[0]) - { - throw std::runtime_error("Grid and value arrays must have the same size"); - } + check_1d_array(grid, "grid"); + check_1d_array(value, "value"); + check_same_size(grid, value, "grid", "value"); self.build(l, for_r_space, - grid_info.shape[0], - static_cast(grid_info.ptr), - static_cast(value_info.ptr), + static_cast(grid.size()), + get_array_ptr(grid), + get_array_ptr(value), p, izeta, symbol, @@ -68,13 +65,9 @@ void bind_numerical_radial(py::module& m) const int ngrid, py::array_t grid, const char mode) { - py::buffer_info grid_info = grid.request(); - if (grid_info.ndim != 1) - { - throw std::runtime_error("Input array must be 1-dimensional"); - } + check_1d_array(grid, "grid"); - self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); + self.set_grid(for_r_space, ngrid, get_array_ptr(grid), mode); }, "for_r_space"_a, "ngrid"_a, @@ -86,17 +79,13 @@ void bind_numerical_radial(py::module& m) "ngrid"_a, "cutoff"_a, "mode"_a = 'i', - "enable+fft"_a = false) + "enable_fft"_a = false) .def( "set_value", [](NumericalRadial& self, const bool for_r_space, py::array_t value, const int p) { - py::buffer_info value_info = value.request(); - if (value_info.ndim != 1) - { - throw std::runtime_error("Input array must be 1-dimensional"); - } + check_1d_array(value, "value"); - self.set_value(for_r_space, static_cast(value_info.ptr), p); + self.set_value(for_r_space, get_array_ptr(value), p); }, "for_r_space"_a, "value"_a, @@ -112,13 +101,9 @@ void bind_numerical_radial(py::module& m) const int nr_tab, const double rmax_tab, const bool deriv) { - py::buffer_info table_info = table.request(); - if (table_info.ndim != 1) - { - throw std::runtime_error("Table array must be 1-dimensional"); - } + check_1d_array(table, "table"); - self.radtab(op, ket, l, static_cast(table_info.ptr), nr_tab, rmax_tab, deriv); + self.radtab(op, ket, l, get_array_ptr(table), nr_tab, rmax_tab, deriv); }, "op"_a, "ket"_a, @@ -139,30 +124,21 @@ void bind_numerical_radial(py::module& m) .def_property_readonly("kcut", &NumericalRadial::kcut) .def_property_readonly("rgrid", [](NumericalRadial& self) { - const double* rgrid = self.rgrid(); - return py::array_t({self.nr()}, rgrid); + return numpy_from_ptr_copy(self.rgrid(), static_cast(self.nr())); }) .def_property_readonly("kgrid", [](NumericalRadial& self) { - const double* kgrid = self.kgrid(); - return py::array_t({self.nk()}, kgrid); + return numpy_from_ptr_copy(self.kgrid(), static_cast(self.nk())); }) .def_property_readonly("rvalue", [](NumericalRadial& self) { - const double* rvalue = self.rvalue(); - return py::array_t({self.nr()}, rvalue); + return numpy_from_ptr_copy(self.rvalue(), static_cast(self.nr())); }) .def_property_readonly("kvalue", [](NumericalRadial& self) { - const double* kvalue = self.kvalue(); - return py::array_t({self.nk()}, kvalue); + return numpy_from_ptr_copy(self.kvalue(), static_cast(self.nk())); }) .def_property_readonly("pr", &NumericalRadial::pr) .def_property_readonly("pk", &NumericalRadial::pk) - .def_property_readonly("is_fft_compliant", overload_cast_<>()(&NumericalRadial::is_fft_compliant, py::const_)) - // leave transformer for future - .def_property_readonly("rgrid", overload_cast_()(&NumericalRadial::rgrid, py::const_)) - .def_property_readonly("kgrid", overload_cast_()(&NumericalRadial::kgrid, py::const_)) - .def_property_readonly("rvalue", overload_cast_()(&NumericalRadial::rvalue, py::const_)) - .def_property_readonly("kvalue", overload_cast_()(&NumericalRadial::kvalue, py::const_)); -} \ No newline at end of file + .def_property_readonly("is_fft_compliant", overload_cast_<>()(&NumericalRadial::is_fft_compliant, py::const_)); +} diff --git a/python/pyabacus/src/pyabacus/__init__.py b/python/pyabacus/src/pyabacus/__init__.py index d8a6e22b72..4d138ef007 100644 --- a/python/pyabacus/src/pyabacus/__init__.py +++ b/python/pyabacus/src/pyabacus/__init__.py @@ -1,8 +1,9 @@ from __future__ import annotations -__submodules__ = ["ModuleBase", "ModuleNAO", "hsolver", "Cell", "IntegralCalculator", "io"] -__all__ = list(__submodules__) +__submodules__ = ["ModuleBase", "ModuleNAO", "hsolver", "Cell", "IntegralCalculator", "io", "esolver", "driver"] +__all__ = list(__submodules__) + ["abacus", "CalculationResult"] +# Import the main abacus() function for convenience def __getattr__(attr): if attr == "ModuleBase": import pyabacus.ModuleBase as ModuleBase @@ -19,5 +20,17 @@ def __getattr__(attr): elif attr == "io": import pyabacus.io as io return io + elif attr == "esolver": + import pyabacus.esolver as esolver + return esolver + elif attr == "driver": + import pyabacus.driver as driver + return driver + elif attr == "abacus": + from pyabacus.driver import abacus + return abacus + elif attr == "CalculationResult": + from pyabacus.driver import CalculationResult + return CalculationResult else: raise AttributeError(f"module {__name__} has no attribute {attr}") \ No newline at end of file diff --git a/python/pyabacus/src/pyabacus/driver/__init__.py b/python/pyabacus/src/pyabacus/driver/__init__.py new file mode 100644 index 0000000000..879414a930 --- /dev/null +++ b/python/pyabacus/src/pyabacus/driver/__init__.py @@ -0,0 +1,31 @@ +""" +PyABACUS Driver Module +====================== + +This module provides the high-level `abacus()` function for running +complete ABACUS DFT calculations from Python. + +Example +------- +>>> import pyabacus +>>> result = pyabacus.abacus("./Si_scf/") +>>> print(f"Energy: {result.etot_ev:.6f} eV") +>>> print(f"Converged: {result.converged}") +""" + +from .runner import abacus, CalculationResult + +# Try to import C++ bindings +try: + from ._driver_pack import PyDriver, CalculationResult as _CppResult + _HAS_CPP_DRIVER = True +except ImportError: + _HAS_CPP_DRIVER = False + PyDriver = None + _CppResult = None + +__all__ = [ + 'abacus', + 'CalculationResult', + 'PyDriver', +] diff --git a/python/pyabacus/src/pyabacus/driver/runner.py b/python/pyabacus/src/pyabacus/driver/runner.py new file mode 100644 index 0000000000..eb122f873a --- /dev/null +++ b/python/pyabacus/src/pyabacus/driver/runner.py @@ -0,0 +1,931 @@ +""" +High-level runner interface for ABACUS calculations. + +This module provides the `abacus()` function - the main entry point +for running ABACUS DFT calculations from Python. + +Two implementations are available: +1. C++ bindings (if available) - direct library calls +2. Subprocess fallback - calls the abacus executable +""" + +from dataclasses import dataclass, field +from typing import Optional, Dict, Any, Union, List +from pathlib import Path +import numpy as np +import os +import subprocess +import re + + +# Unit conversion constants +RY_TO_EV = 13.605693122994 # 1 Ry = 13.6057 eV +BOHR_TO_ANG = 0.529177249 # 1 Bohr = 0.529 Angstrom + + +@dataclass +class CalculationResult: + """ + Container for ABACUS calculation results. + + All energies are stored in eV units. + + Attributes + ---------- + converged : bool + Whether SCF converged + niter : int + Number of SCF iterations + etot : float + Total energy in eV + forces : np.ndarray, optional + Forces on atoms (nat, 3) in eV/Angstrom + stress : np.ndarray, optional + Stress tensor (3, 3) in kbar + energies : dict + Dictionary of energy components (all in eV) + fermi_energy : float + Fermi energy in eV + bandgap : float + Band gap in eV + nat : int + Number of atoms + ntype : int + Number of atom types + nbands : int + Number of bands + nks : int + Number of k-points + """ + # Convergence info + converged: bool = False + niter: int = 0 + drho: float = 0.0 + + # Energies (all in eV) + etot: float = 0.0 + eband: float = 0.0 + hartree_energy: float = 0.0 + etxc: float = 0.0 + ewald_energy: float = 0.0 + demet: float = 0.0 + exx: float = 0.0 + evdw: float = 0.0 + + # Forces (in eV/Angstrom) and stress (in kbar) + forces: Optional[np.ndarray] = None + stress: Optional[np.ndarray] = None + + # Electronic structure info + fermi_energy: float = 0.0 # in eV + bandgap: float = 0.0 # in eV + + # System info + nat: int = 0 + ntype: int = 0 + nbands: int = 0 + nks: int = 0 + + # Output file tracking + output_dir: str = "" # Path to OUT.$suffix folder + log_file: str = "" # Path to the main log file (running_*.log) + output_files: Dict[str, str] = field(default_factory=dict) # filename -> full path + + @property + def etot_ev(self) -> float: + """Total energy in eV (same as etot, for compatibility).""" + return self.etot + + @property + def energies(self) -> Dict[str, float]: + """Dictionary of all energy components (all in eV).""" + return { + 'etot': self.etot, + 'eband': self.eband, + 'hartree_energy': self.hartree_energy, + 'etxc': self.etxc, + 'ewald_energy': self.ewald_energy, + 'demet': self.demet, + 'exx': self.exx, + 'evdw': self.evdw, + } + + @property + def forces_ev_ang(self) -> Optional[np.ndarray]: + """Forces in eV/Angstrom (same as forces, for compatibility).""" + return self.forces + + @property + def has_forces(self) -> bool: + """Whether forces are available.""" + return self.forces is not None + + @property + def has_stress(self) -> bool: + """Whether stress is available.""" + return self.stress is not None + + @property + def has_output_dir(self) -> bool: + """Whether output directory exists and is set.""" + return bool(self.output_dir) and os.path.isdir(self.output_dir) + + def get_output_file(self, filename: str) -> Optional[str]: + """ + Get full path to a specific output file. + + Parameters + ---------- + filename : str + Name of the output file (e.g., 'running_scf.log', 'BANDS_1.dat') + + Returns + ------- + str or None + Full path to the file if it exists, None otherwise + """ + return self.output_files.get(filename) + + def list_output_files(self) -> List[str]: + """ + List all output file names. + + Returns + ------- + list of str + List of output file names + """ + return list(self.output_files.keys()) + + def summary(self) -> str: + """Return a summary string of the calculation result.""" + lines = [ + "=== ABACUS Calculation Result ===", + f"Converged: {'Yes' if self.converged else 'No'}", + f"SCF iterations: {self.niter}", + f"Final drho: {self.drho:.2e}", + "", + "Energies (eV):", + f" Total energy: {self.etot:.8f}", + f" Band energy: {self.eband:.8f}", + f" Hartree: {self.hartree_energy:.8f}", + f" XC energy: {self.etxc:.8f}", + f" Ewald: {self.ewald_energy:.8f}", + f" Entropy(-TS): {self.demet:.8f}", + f" EXX: {self.exx:.8f}", + f" VdW: {self.evdw:.8f}", + ] + + lines.extend([ + "", + "System info:", + f" Atoms: {self.nat}, Types: {self.ntype}", + f" Bands: {self.nbands}, K-points: {self.nks}", + f" Fermi energy: {self.fermi_energy:.6f} eV", + f" Band gap: {self.bandgap:.6f} eV", + ]) + + lines.append("") + lines.append("Forces (eV/Angstrom):") + if self.has_forces and self.forces is not None: + max_force = np.max(np.abs(self.forces)) + lines.append(f" Calculated ({self.nat} atoms), Max force: {max_force:.6f}") + for i, f in enumerate(self.forces): + lines.append(f" Atom {i+1}: [{f[0]:12.8f}, {f[1]:12.8f}, {f[2]:12.8f}]") + else: + lines.append(" Not calculated") + + lines.append("") + lines.append("Stress (kbar):") + if self.has_stress and self.stress is not None: + lines.append(" Calculated:") + for i, row in enumerate(self.stress): + lines.append(f" [{row[0]:12.6f}, {row[1]:12.6f}, {row[2]:12.6f}]") + else: + lines.append(" Not calculated") + + # Output file tracking + lines.extend([ + "", + "Output:", + f" Directory: {self.output_dir if self.output_dir else 'N/A'}", + f" Log file: {os.path.basename(self.log_file) if self.log_file else 'N/A'}", + f" Files: {len(self.output_files)} output files", + ]) + + return "\n".join(lines) + + def __repr__(self) -> str: + return ( + f"" + ) + + +def _find_abacus_executable() -> Optional[str]: + """Find the abacus executable in PATH or common locations.""" + import shutil + + # Check PATH first + abacus_path = shutil.which("abacus") + if abacus_path: + return abacus_path + + # Check common locations + common_paths = [ + "/usr/local/bin/abacus", + "/usr/bin/abacus", + os.path.expanduser("~/abacus/build/abacus"), + os.path.expanduser("~/.local/bin/abacus"), + ] + + for path in common_paths: + if os.path.isfile(path) and os.access(path, os.X_OK): + return path + + return None + + +def _parse_running_log(log_path: str) -> CalculationResult: + """Parse the running log file to extract calculation results (all energies in eV).""" + result = CalculationResult() + + if not os.path.exists(log_path): + return result + + with open(log_path, 'r') as f: + content = f.read() + + # Parse convergence - check multiple patterns + convergence_patterns = [ + r"#SCF IS CONVERGED#", + r"charge density convergence is achieved", + r"convergence is achieved", + r"SCF CONVERGED", + ] + for pattern in convergence_patterns: + if re.search(pattern, content, re.IGNORECASE): + result.converged = True + break + + # Parse total energy (look for final energy first) + # Pattern 1: !FINAL_ETOT_IS -57.02190809937956 eV + final_match = re.search(r"!FINAL_ETOT_IS\s+([-\d.]+)\s+eV", content) + if final_match: + result.etot = float(final_match.group(1)) # Already in eV + else: + # Pattern 2: E_KohnSham lines - get the last one (Ry, eV) + ks_matches = re.findall(r"E_KohnSham\s+([-\d.]+)\s+([-\d.]+)", content) + if ks_matches: + result.etot = float(ks_matches[-1][1]) # Second value is in eV + + # Parse number of SCF iterations - count ELEC ITER lines + iter_matches = re.findall(r"#ELEC ITER#\s+(\d+)", content) + if iter_matches: + result.niter = int(iter_matches[-1]) + + # Parse drho - get the last value (Electron density deviation) + drho_matches = re.findall(r"Electron density deviation\s+([\d.eE+-]+)", content) + if drho_matches: + result.drho = float(drho_matches[-1]) + + # Parse number of atoms + nat_match = re.search(r"TOTAL ATOM NUMBER\s*=\s*(\d+)", content) + if nat_match: + result.nat = int(nat_match.group(1)) + + # Parse number of types - count "READING ATOM TYPE" lines + ntype_matches = re.findall(r"READING ATOM TYPE\s+(\d+)", content) + if ntype_matches: + result.ntype = int(ntype_matches[-1]) + + # Parse number of bands + nbands_match = re.search(r"Number of electronic states \(NBANDS\)\s*=\s*(\d+)", content) + if nbands_match: + result.nbands = int(nbands_match.group(1)) + + # Parse number of k-points (nkstot now = X after reduction) + nkstot_match = re.search(r"nkstot now\s*=\s*(\d+)", content) + if nkstot_match: + result.nks = int(nkstot_match.group(1)) + else: + # Fallback to original nkstot + nkstot_match = re.search(r"nkstot\s*=\s*(\d+)", content) + if nkstot_match: + result.nks = int(nkstot_match.group(1)) + + # Parse Fermi energy - format: E_Fermi 0.4657978215 6.3375044881 (Ry, eV) + fermi_match = re.search(r"E_Fermi\s+([-\d.]+)\s+([-\d.]+)", content) + if fermi_match: + result.fermi_energy = float(fermi_match.group(2)) # Second value is in eV + + # Parse band gap - format: E_gap(k) 0.1070873708 1.4569984261 (Ry, eV) + gap_match = re.search(r"E_gap\(k\)\s+([-\d.]+)\s+([-\d.]+)", content) + if gap_match: + result.bandgap = float(gap_match.group(2)) # Second value is in eV + + # Parse energy components from the final SCF iteration + # Format: E_xxx value_Ry value_eV - we take the eV value (second column) + + # E_band (band energy) + eband_match = re.search(r"E_band\s+([-\d.]+)\s+([-\d.]+)", content) + if eband_match: + result.eband = float(eband_match.group(2)) # eV + + # E_Hartree + hartree_match = re.search(r"E_Hartree\s+([-\d.]+)\s+([-\d.]+)", content) + if hartree_match: + result.hartree_energy = float(hartree_match.group(2)) # eV + + # E_xc (exchange-correlation) + etxc_match = re.search(r"E_xc\s+([-\d.]+)\s+([-\d.]+)", content) + if etxc_match: + result.etxc = float(etxc_match.group(2)) # eV + + # E_Ewald + ewald_match = re.search(r"E_Ewald\s+([-\d.]+)\s+([-\d.]+)", content) + if ewald_match: + result.ewald_energy = float(ewald_match.group(2)) # eV + + # E_entropy(-TS) for metals + demet_match = re.search(r"E_entropy\(-TS\)\s+([-\d.]+)\s+([-\d.]+)", content) + if demet_match: + result.demet = float(demet_match.group(2)) # eV + + # E_exx (exact exchange) + exx_match = re.search(r"E_exx\s+([-\d.]+)\s+([-\d.]+)", content) + if exx_match: + result.exx = float(exx_match.group(2)) # eV + + return result + + +def _get_suffix_from_input(input_dir: str) -> str: + """Parse the suffix from INPUT file.""" + input_file = os.path.join(input_dir, "INPUT") + suffix = "ABACUS" # default suffix + + if os.path.exists(input_file): + with open(input_file, 'r') as f: + for line in f: + line = line.strip() + if line.startswith('#') or not line: + continue + # Parse suffix parameter + if 'suffix' in line.lower(): + parts = line.split() + if len(parts) >= 2: + suffix = parts[1] + break + return suffix + + +def _collect_output_files(output_dir: str) -> Dict[str, str]: + """ + Collect all output files from the output directory. + + Parameters + ---------- + output_dir : str + Path to the output directory (OUT.$suffix) + + Returns + ------- + dict + Dictionary mapping filename to full path + """ + output_files = {} + if output_dir and os.path.isdir(output_dir): + try: + for entry in os.listdir(output_dir): + full_path = os.path.join(output_dir, entry) + if os.path.isfile(full_path): + output_files[entry] = full_path + except OSError: + pass # Ignore errors during directory iteration + return output_files + + +def _parse_forces_from_log(log_path: str, nat: int) -> Optional[np.ndarray]: + """Parse forces from the running log file (returns forces in eV/Angstrom).""" + if not os.path.exists(log_path) or nat <= 0: + return None + + with open(log_path, 'r') as f: + content = f.read() + + # Try multiple force block formats + # Format 1: #TOTAL-FORCE (eV/Angstrom)# + # ------------------------------------------------------------------------- + # Atoms Force_x Force_y Force_z + # ------------------------------------------------------------------------- + # Al1 0.0000000000 0.0000000000 0.0000000000 + force_pattern1 = r"#TOTAL-FORCE \(eV/Angstrom\)#.*?-{10,}\s*\n\s*Atoms\s+Force_x\s+Force_y\s+Force_z\s*\n\s*-{10,}\s*\n((?:\s*\S+\s+[-\d.eE+]+\s+[-\d.eE+]+\s+[-\d.eE+]+\s*\n)+)" + match = re.search(force_pattern1, content, re.DOTALL) + + if not match: + # Format 2: TOTAL-FORCE (eV/Angstrom) + # ---------------------------- + # atom x y z + # Si1 0.001 0.002 0.003 + force_pattern2 = r"TOTAL-FORCE \(eV/Angstrom\).*?-{10,}\s*\n\s*atom.*?\n((?:\s*\S+\s+[-\d.eE+]+\s+[-\d.eE+]+\s+[-\d.eE+]+\s*\n)+)" + match = re.search(force_pattern2, content, re.DOTALL) + + if match: + force_lines = match.group(1).strip().split('\n') + forces = [] + for line in force_lines: + parts = line.split() + if len(parts) >= 4: + # parts[0] is atom label, parts[1:4] are fx, fy, fz in eV/Angstrom + try: + fx, fy, fz = float(parts[1]), float(parts[2]), float(parts[3]) + forces.append([fx, fy, fz]) # Already in eV/Angstrom + except (ValueError, IndexError): + continue + + if len(forces) == nat: + return np.array(forces) + + return None + + +def _parse_stress_from_log(log_path: str) -> Optional[np.ndarray]: + """Parse stress tensor from the running log file (returns stress in kbar).""" + if not os.path.exists(log_path): + return None + + with open(log_path, 'r') as f: + content = f.read() + + # Try multiple stress block formats + # Format 1: #TOTAL-STRESS (kbar)# + # ---------------------------------------------------------------- + # Stress_x Stress_y Stress_z + # ---------------------------------------------------------------- + # 15.7976835472 0.0000000000 0.0000000000 + stress_pattern1 = r"#TOTAL-STRESS \(kbar\)#.*?-{10,}\s*\n\s*Stress_x\s+Stress_y\s+Stress_z\s*\n\s*-{10,}\s*\n((?:\s*[-\d.eE+]+\s+[-\d.eE+]+\s+[-\d.eE+]+\s*\n){3})" + match = re.search(stress_pattern1, content, re.DOTALL | re.IGNORECASE) + + if not match: + # Format 2: TOTAL-STRESS (KBAR) + # ---------------------------- + # 1.234 0.000 0.000 + stress_pattern2 = r"TOTAL-STRESS \(KBAR\).*?-{10,}\s*\n((?:\s*[-\d.eE+]+\s+[-\d.eE+]+\s+[-\d.eE+]+\s*\n){3})" + match = re.search(stress_pattern2, content, re.DOTALL | re.IGNORECASE) + + if match: + stress_lines = match.group(1).strip().split('\n') + stress = [] + for line in stress_lines: + parts = line.split() + if len(parts) >= 3: + try: + stress.append([float(parts[0]), float(parts[1]), float(parts[2])]) + except (ValueError, IndexError): + continue + + if len(stress) == 3: + return np.array(stress) + + return None + + +def _modify_input_file(input_dir: str, calculate_force: bool, calculate_stress: bool) -> Optional[str]: + """ + Modify INPUT file to add cal_force and cal_stress parameters. + + Returns the path to the backup file if modifications were made, None otherwise. + """ + input_file = os.path.join(input_dir, "INPUT") + if not os.path.exists(input_file): + return None + + # Read original content + with open(input_file, 'r') as f: + lines = f.readlines() + + # Check if cal_force/cal_stress already exist + has_cal_force = False + has_cal_stress = False + for line in lines: + line_lower = line.lower().strip() + if line_lower.startswith('cal_force'): + has_cal_force = True + if line_lower.startswith('cal_stress'): + has_cal_stress = True + + # If both already exist, no need to modify + if has_cal_force and has_cal_stress: + return None + + # Create backup + backup_file = input_file + ".pyabacus_backup" + with open(backup_file, 'w') as f: + f.writelines(lines) + + # Add missing parameters + new_lines = lines.copy() + if not has_cal_force: + new_lines.append(f"cal_force {1 if calculate_force else 0}\n") + if not has_cal_stress: + new_lines.append(f"cal_stress {1 if calculate_stress else 0}\n") + + # Write modified file + with open(input_file, 'w') as f: + f.writelines(new_lines) + + return backup_file + + +def _restore_input_file(input_dir: str, backup_file: Optional[str]): + """Restore INPUT file from backup.""" + if backup_file is None: + return + + input_file = os.path.join(input_dir, "INPUT") + if os.path.exists(backup_file): + # Restore original + with open(backup_file, 'r') as f: + content = f.read() + with open(input_file, 'w') as f: + f.write(content) + # Remove backup + os.remove(backup_file) + + +def _run_abacus_subprocess( + input_dir: str, + output_dir: str, + verbosity: int, + calculate_force: bool = True, + calculate_stress: bool = False, + nprocs: int = 1, + nthreads: int = 1, +) -> CalculationResult: + """Run ABACUS using subprocess and parse results.""" + import shutil + + # Find abacus executable + abacus_exe = _find_abacus_executable() + if abacus_exe is None: + raise RuntimeError( + "ABACUS executable not found. Please ensure 'abacus' is in your PATH " + "or install ABACUS from https://github.com/deepmodeling/abacus-develop" + ) + + # Convert to absolute path + input_dir = os.path.abspath(input_dir) + + # Modify INPUT file to add cal_force and cal_stress + backup_file = _modify_input_file(input_dir, calculate_force, calculate_stress) + + try: + # Get the suffix from INPUT file to know where output will be + suffix = _get_suffix_from_input(input_dir) + expected_out_dir = os.path.join(input_dir, f"OUT.{suffix}") + + # Set up environment + env = os.environ.copy() + env["OMP_NUM_THREADS"] = str(nthreads) + + # Build command + if nprocs > 1: + # Find mpirun or mpiexec + mpirun = shutil.which("mpirun") or shutil.which("mpiexec") + if mpirun is None: + raise RuntimeError( + f"MPI requested (nprocs={nprocs}) but mpirun/mpiexec not found. " + "Please install MPI or set nprocs=1." + ) + cmd = [mpirun, "-np", str(nprocs), abacus_exe] + else: + cmd = [abacus_exe] + + # Set up stdout/stderr based on verbosity + if verbosity >= 2: + stdout = None + stderr = None + elif verbosity == 1: + stdout = subprocess.PIPE + stderr = subprocess.PIPE + else: + stdout = subprocess.DEVNULL + stderr = subprocess.DEVNULL + + try: + proc = subprocess.run( + cmd, + cwd=input_dir, + env=env, + stdout=stdout, + stderr=stderr, + timeout=None, # No timeout + ) + except subprocess.TimeoutExpired: + raise RuntimeError("ABACUS calculation timed out") + except Exception as e: + raise RuntimeError(f"Failed to run ABACUS: {e}") + + # Find and parse the output + # First try the expected output directory based on suffix + log_path = None + if os.path.exists(expected_out_dir): + for log_name in ["running_scf.log", "running_relax.log", "running_cell-relax.log", "running_nscf.log"]: + candidate = os.path.join(expected_out_dir, log_name) + if os.path.exists(candidate): + log_path = candidate + break + + # Fallback: find the most recently modified OUT.* directory + if log_path is None: + out_dirs = [d for d in os.listdir(input_dir) if d.startswith("OUT.") and os.path.isdir(os.path.join(input_dir, d))] + if out_dirs: + latest_out = max(out_dirs, key=lambda d: os.path.getmtime(os.path.join(input_dir, d))) + out_dir_path = os.path.join(input_dir, latest_out) + for log_name in ["running_scf.log", "running_relax.log", "running_cell-relax.log", "running_nscf.log"]: + candidate = os.path.join(out_dir_path, log_name) + if os.path.exists(candidate): + log_path = candidate + break + + if log_path and os.path.exists(log_path): + result = _parse_running_log(log_path) + # Set output tracking fields + result.log_file = os.path.abspath(log_path) + result.output_dir = os.path.abspath(os.path.dirname(log_path)) + result.output_files = _collect_output_files(result.output_dir) + + # Parse forces if requested + if calculate_force and result.nat > 0: + forces = _parse_forces_from_log(log_path, result.nat) + if forces is not None: + result.forces = forces + + # Parse stress if requested + if calculate_stress: + stress = _parse_stress_from_log(log_path) + if stress is not None: + result.stress = stress + else: + result = CalculationResult() + # Try to find output directory even if log file wasn't found + if os.path.exists(expected_out_dir): + result.output_dir = os.path.abspath(expected_out_dir) + result.output_files = _collect_output_files(result.output_dir) + + finally: + # Restore original INPUT file + _restore_input_file(input_dir, backup_file) + + return result + + +def abacus( + input_dir: Optional[str] = None, + *, + input_file: Optional[str] = None, + stru_file: Optional[str] = None, + kpt_file: Optional[str] = None, + pseudo_dir: Optional[str] = None, + orbital_dir: Optional[str] = None, + output_dir: Optional[str] = None, + calculate_force: bool = True, + calculate_stress: bool = False, + verbosity: int = 1, + nprocs: int = 1, + nthreads: int = 1, +) -> CalculationResult: + """ + Run an ABACUS DFT calculation. + + This is the main entry point for running ABACUS calculations from Python. + It provides the same functionality as the ABACUS command-line program. + + Parameters + ---------- + input_dir : str, optional + Directory containing INPUT, STRU, KPT files. + If not specified, uses current directory. + input_file : str, optional + Explicit path to INPUT file. Overrides input_dir/INPUT. + stru_file : str, optional + Explicit path to STRU file. Overrides value in INPUT. + kpt_file : str, optional + Explicit path to KPT file. Overrides value in INPUT. + pseudo_dir : str, optional + Directory containing pseudopotential files. + Overrides pseudo_dir in INPUT. + orbital_dir : str, optional + Directory containing orbital files (for LCAO). + Overrides orbital_dir in INPUT. + output_dir : str, optional + Directory for output files. Default: "OUT.PYABACUS" + calculate_force : bool, optional + Whether to calculate forces. Default: True + calculate_stress : bool, optional + Whether to calculate stress tensor. Default: False + verbosity : int, optional + Output verbosity level: + - 0: Silent (no output) + - 1: Normal (default) + - 2: Verbose (detailed output) + nprocs : int, optional + Number of MPI processes. Default: 1 + Equivalent to: mpirun -np nprocs abacus + nthreads : int, optional + Number of OpenMP threads. Default: 1 + Equivalent to: OMP_NUM_THREADS=nthreads + + Returns + ------- + CalculationResult + Object containing all calculation results including: + - converged: Whether SCF converged + - etot: Total energy (Ry) + - etot_ev: Total energy (eV) + - forces: Forces on atoms (if calculate_force=True) + - stress: Stress tensor (if calculate_stress=True) + - energies: Dictionary of energy components + + Raises + ------ + FileNotFoundError + If INPUT file is not found + RuntimeError + If calculation fails or ABACUS is not installed + + Examples + -------- + Basic SCF calculation: + + >>> result = pyabacus.abacus("./Si_scf/") + >>> print(f"Energy: {result.etot_ev:.6f} eV") + >>> print(f"Converged: {result.converged}") + + Calculate forces and stress: + + >>> result = pyabacus.abacus( + ... "./Si_relax/", + ... calculate_force=True, + ... calculate_stress=True, + ... ) + >>> print(f"Max force: {np.max(np.abs(result.forces_ev_ang)):.4f} eV/Ang") + + Parallel calculation with MPI and OpenMP: + + >>> result = pyabacus.abacus( + ... "./Si_scf/", + ... nprocs=4, # 4 MPI processes + ... nthreads=2, # 2 OpenMP threads per process + ... ) + + Silent mode: + + >>> result = pyabacus.abacus("./Si_scf/", verbosity=0) + """ + # Try to use C++ driver first + try: + from ._driver_pack import PyDriver + _HAS_CPP_DRIVER = True + except ImportError: + _HAS_CPP_DRIVER = False + + # Determine input directory + if input_dir is None: + if input_file is not None: + input_dir = str(Path(input_file).parent) + else: + input_dir = "." + + # Validate input directory exists + input_path = Path(input_dir) + if not input_path.exists(): + raise FileNotFoundError(f"Input directory not found: {input_dir}") + + # Check for INPUT file + if input_file is None: + input_file_path = input_path / "INPUT" + if not input_file_path.exists(): + raise FileNotFoundError( + f"INPUT file not found in {input_dir}. " + "Please provide input_file parameter or ensure INPUT exists." + ) + + # Set default output directory + if output_dir is None: + output_dir = "OUT.PYABACUS" + + if _HAS_CPP_DRIVER: + # Use C++ driver + driver = PyDriver() + + cpp_result = driver.run( + input_dir=str(input_dir), + input_file=input_file or "", + stru_file=stru_file or "", + kpt_file=kpt_file or "", + pseudo_dir=pseudo_dir or "", + orbital_dir=orbital_dir or "", + output_dir=output_dir or "", + calculate_force=calculate_force, + calculate_stress=calculate_stress, + verbosity=verbosity, + ) + + # Convert C++ result to Python dataclass + result = CalculationResult( + converged=cpp_result.converged, + niter=cpp_result.niter, + drho=cpp_result.drho, + etot=cpp_result.etot, + eband=cpp_result.eband, + hartree_energy=cpp_result.hartree_energy, + etxc=cpp_result.etxc, + ewald_energy=cpp_result.ewald_energy, + demet=cpp_result.demet, + exx=cpp_result.exx, + evdw=cpp_result.evdw, + fermi_energy=cpp_result.fermi_energy, + bandgap=cpp_result.bandgap, + nat=cpp_result.nat, + ntype=cpp_result.ntype, + nbands=cpp_result.nbands, + nks=cpp_result.nks, + ) + + # Copy forces if available + if cpp_result.has_forces: + result.forces = np.array(cpp_result.forces) + + # Copy stress if available + if cpp_result.has_stress: + result.stress = np.array(cpp_result.stress) + + # Copy output tracking fields + result.output_dir = cpp_result.output_dir + result.log_file = cpp_result.log_file + result.output_files = dict(cpp_result.output_files) + else: + # Use subprocess fallback + result = _run_abacus_subprocess( + input_dir=str(input_dir), + output_dir=output_dir, + verbosity=verbosity, + calculate_force=calculate_force, + calculate_stress=calculate_stress, + nprocs=nprocs, + nthreads=nthreads, + ) + + return result + + +def run_scf( + input_dir: str, + **kwargs +) -> CalculationResult: + """ + Convenience function for running SCF calculation. + + This is an alias for `abacus()` with default parameters + suitable for single-point SCF calculations. + + Parameters + ---------- + input_dir : str + Directory containing input files + **kwargs + Additional arguments passed to `abacus()` + + Returns + ------- + CalculationResult + Calculation results + """ + return abacus(input_dir, **kwargs) + + +def run_relax( + input_dir: str, + **kwargs +) -> CalculationResult: + """ + Convenience function for running geometry optimization. + + This is an alias for `abacus()` with force calculation enabled. + + Parameters + ---------- + input_dir : str + Directory containing input files + **kwargs + Additional arguments passed to `abacus()` + + Returns + ------- + CalculationResult + Calculation results + """ + kwargs.setdefault('calculate_force', True) + return abacus(input_dir, **kwargs) diff --git a/python/pyabacus/src/pyabacus/esolver/__init__.py b/python/pyabacus/src/pyabacus/esolver/__init__.py new file mode 100644 index 0000000000..57d50ec204 --- /dev/null +++ b/python/pyabacus/src/pyabacus/esolver/__init__.py @@ -0,0 +1,81 @@ +""" +PyABACUS ESolver Module +======================= + +This module provides Python bindings for ABACUS ESolver_KS_LCAO, +enabling Python-controlled SCF workflows with breakpoint support. + +Main Classes +------------ +ESolverLCAO_gamma : ESolver for gamma-only calculations +ESolverLCAO_multi_k : ESolver for multi-k calculations +LCAOWorkflow : High-level workflow wrapper with callback support + +Example +------- +>>> from pyabacus.esolver import LCAOWorkflow +>>> +>>> workflow = LCAOWorkflow("./") +>>> workflow.initialize() +>>> +>>> # Register callback for breakpoint before after_scf +>>> def save_state(wf): +... charge = wf.charge +... energy = wf.energy +... print(f"Total energy: {energy.etot}") +>>> +>>> workflow.register_callback('before_after_scf', save_state) +>>> result = workflow.run_scf(max_iter=100) +""" + +from .workflow import LCAOWorkflow +from .data_types import ChargeData, EnergyData, HamiltonianData, DensityMatrixData, SCFResult + +# Import C++ bindings +try: + from ._esolver_pack import ( + ESolverLCAO_gamma, + ESolverLCAO_multi_k, + ChargeAccessor, + EnergyAccessor, + HamiltonianAccessor_gamma, + HamiltonianAccessor_multi_k, + DensityMatrixAccessor_gamma, + DensityMatrixAccessor_multi_k, + ) +except ImportError as e: + import warnings + warnings.warn(f"Could not import _esolver_pack: {e}. " + "ESolver bindings may not be available.") + + # Define placeholder classes for documentation + ESolverLCAO_gamma = None + ESolverLCAO_multi_k = None + ChargeAccessor = None + EnergyAccessor = None + HamiltonianAccessor_gamma = None + HamiltonianAccessor_multi_k = None + DensityMatrixAccessor_gamma = None + DensityMatrixAccessor_multi_k = None + +__all__ = [ + # High-level interface + 'LCAOWorkflow', + + # Data types + 'ChargeData', + 'EnergyData', + 'HamiltonianData', + 'DensityMatrixData', + 'SCFResult', + + # Low-level C++ bindings + 'ESolverLCAO_gamma', + 'ESolverLCAO_multi_k', + 'ChargeAccessor', + 'EnergyAccessor', + 'HamiltonianAccessor_gamma', + 'HamiltonianAccessor_multi_k', + 'DensityMatrixAccessor_gamma', + 'DensityMatrixAccessor_multi_k', +] diff --git a/python/pyabacus/src/pyabacus/esolver/data_types.py b/python/pyabacus/src/pyabacus/esolver/data_types.py new file mode 100644 index 0000000000..b8ca5dc5ac --- /dev/null +++ b/python/pyabacus/src/pyabacus/esolver/data_types.py @@ -0,0 +1,233 @@ +""" +Data types for PyABACUS ESolver module. + +This module defines dataclasses for storing calculation results +in a structured and type-safe manner. +""" + +from dataclasses import dataclass, field +from typing import Dict, List, Tuple, Optional, Any +import numpy as np + + +@dataclass +class ChargeData: + """ + Container for charge density data. + + Attributes + ---------- + rho : np.ndarray + Real-space charge density with shape (nspin, nrxx) + rhog : np.ndarray, optional + Reciprocal-space charge density with shape (nspin, ngmc) + nspin : int + Number of spin channels (1, 2, or 4) + nrxx : int + Number of real-space grid points + ngmc : int, optional + Number of G-vectors for charge density + """ + rho: np.ndarray + nspin: int + nrxx: int + rhog: Optional[np.ndarray] = None + ngmc: Optional[int] = None + + def total_charge(self) -> float: + """Calculate total charge by integrating rho.""" + return np.sum(self.rho) + + def spin_density(self) -> Optional[np.ndarray]: + """ + Calculate spin density (rho_up - rho_down) for spin-polarized calculations. + + Returns None for non-spin-polarized calculations. + """ + if self.nspin == 2: + return self.rho[0] - self.rho[1] + return None + + +@dataclass +class EnergyData: + """ + Container for energy data. + + All energies are in Rydberg units. + + Attributes + ---------- + etot : float + Total energy + eband : float + Band (kinetic + local potential) energy + hartree_energy : float + Hartree (electron-electron Coulomb) energy + etxc : float + Exchange-correlation energy + ewald_energy : float + Ewald (ion-ion Coulomb) energy + demet : float + -TS term for metallic systems (smearing correction) + exx : float + Exact exchange energy (for hybrid functionals) + evdw : float + van der Waals correction energy + """ + etot: float = 0.0 + eband: float = 0.0 + hartree_energy: float = 0.0 + etxc: float = 0.0 + ewald_energy: float = 0.0 + demet: float = 0.0 + exx: float = 0.0 + evdw: float = 0.0 + + def to_dict(self) -> Dict[str, float]: + """Convert to dictionary.""" + return { + 'etot': self.etot, + 'eband': self.eband, + 'hartree_energy': self.hartree_energy, + 'etxc': self.etxc, + 'ewald_energy': self.ewald_energy, + 'demet': self.demet, + 'exx': self.exx, + 'evdw': self.evdw, + } + + def to_eV(self) -> 'EnergyData': + """ + Convert all energies from Rydberg to eV. + + Returns a new EnergyData instance with energies in eV. + """ + Ry_to_eV = 13.605693122994 # 1 Ry = 13.6057 eV + return EnergyData( + etot=self.etot * Ry_to_eV, + eband=self.eband * Ry_to_eV, + hartree_energy=self.hartree_energy * Ry_to_eV, + etxc=self.etxc * Ry_to_eV, + ewald_energy=self.ewald_energy * Ry_to_eV, + demet=self.demet * Ry_to_eV, + exx=self.exx * Ry_to_eV, + evdw=self.evdw * Ry_to_eV, + ) + + +@dataclass +class HamiltonianData: + """ + Container for Hamiltonian matrix data. + + Attributes + ---------- + Hk : List[np.ndarray] + List of H(k) matrices for each k-point + Sk : List[np.ndarray] + List of S(k) overlap matrices for each k-point + HR : Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray], optional + H(R) in sparse format: {(iat1, iat2, (R1, R2, R3)): matrix} + SR : Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray], optional + S(R) in sparse format: {(iat1, iat2, (R1, R2, R3)): matrix} + nbasis : int + Number of basis functions + nks : int + Number of k-points + """ + Hk: List[np.ndarray] = field(default_factory=list) + Sk: List[np.ndarray] = field(default_factory=list) + HR: Optional[Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray]] = None + SR: Optional[Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray]] = None + nbasis: int = 0 + nks: int = 0 + + def get_Hk(self, ik: int) -> np.ndarray: + """Get H(k) matrix for k-point ik.""" + if ik < 0 or ik >= len(self.Hk): + raise IndexError(f"K-point index {ik} out of range [0, {len(self.Hk)})") + return self.Hk[ik] + + def get_Sk(self, ik: int) -> np.ndarray: + """Get S(k) matrix for k-point ik.""" + if ik < 0 or ik >= len(self.Sk): + raise IndexError(f"K-point index {ik} out of range [0, {len(self.Sk)})") + return self.Sk[ik] + + +@dataclass +class DensityMatrixData: + """ + Container for density matrix data. + + Attributes + ---------- + DMK : List[np.ndarray] + List of DM(k) matrices for each k-point + DMR : Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray], optional + DM(R) in sparse format: {(iat1, iat2, (R1, R2, R3)): matrix} + nks : int + Number of k-points + nrow : int + Number of rows in density matrix + ncol : int + Number of columns in density matrix + """ + DMK: List[np.ndarray] = field(default_factory=list) + DMR: Optional[Dict[Tuple[int, int, Tuple[int, int, int]], np.ndarray]] = None + nks: int = 0 + nrow: int = 0 + ncol: int = 0 + + def get_DMK(self, ik: int) -> np.ndarray: + """Get DM(k) matrix for k-point ik.""" + if ik < 0 or ik >= len(self.DMK): + raise IndexError(f"K-point index {ik} out of range [0, {len(self.DMK)})") + return self.DMK[ik] + + def trace(self, ik: int) -> complex: + """Calculate trace of DM(k) for k-point ik.""" + return np.trace(self.get_DMK(ik)) + + +@dataclass +class SCFResult: + """ + Container for SCF calculation results. + + Attributes + ---------- + converged : bool + Whether SCF converged + niter : int + Number of iterations performed + drho : float + Final charge density difference + energy : EnergyData + Final energy data + charge : ChargeData, optional + Final charge density + hamiltonian : HamiltonianData, optional + Final Hamiltonian matrices + density_matrix : DensityMatrixData, optional + Final density matrix + """ + converged: bool + niter: int + drho: float + energy: EnergyData + charge: Optional[ChargeData] = None + hamiltonian: Optional[HamiltonianData] = None + density_matrix: Optional[DensityMatrixData] = None + + def summary(self) -> str: + """Return a summary string of the SCF result.""" + status = "converged" if self.converged else "not converged" + return ( + f"SCF Result: {status}\n" + f" Iterations: {self.niter}\n" + f" Final drho: {self.drho:.2e}\n" + f" Total energy: {self.energy.etot:.8f} Ry " + f"({self.energy.etot * 13.6057:.8f} eV)" + ) diff --git a/python/pyabacus/src/pyabacus/esolver/workflow.py b/python/pyabacus/src/pyabacus/esolver/workflow.py new file mode 100644 index 0000000000..4e4748f6ca --- /dev/null +++ b/python/pyabacus/src/pyabacus/esolver/workflow.py @@ -0,0 +1,498 @@ +""" +High-level workflow interface for LCAO calculations. + +This module provides a Pythonic interface for controlling LCAO calculations +with support for callbacks and breakpoints. +""" + +from typing import Callable, Dict, List, Optional, Any +import numpy as np + +from .data_types import ( + ChargeData, + EnergyData, + HamiltonianData, + DensityMatrixData, + SCFResult, +) + + +class LCAOWorkflow: + """ + High-level workflow wrapper for LCAO calculations. + + This class provides a Pythonic interface for controlling LCAO calculations + with support for callbacks at various stages of the SCF loop. + + Parameters + ---------- + input_dir : str + Directory containing INPUT, STRU, and other input files + gamma_only : bool, optional + Whether to use gamma-only calculation (default: True) + + Example + ------- + >>> workflow = LCAOWorkflow("./") + >>> workflow.initialize() + >>> + >>> # Register callback for breakpoint before after_scf + >>> def inspect_state(wf): + ... print(f"Energy: {wf.energy.etot}") + ... np.save("charge.npy", wf.charge.rho) + >>> + >>> workflow.register_callback('before_after_scf', inspect_state) + >>> result = workflow.run_scf(max_iter=100) + >>> print(result.summary()) + """ + + # Event names for callbacks + EVENTS = [ + 'before_scf', # Called after before_scf() + 'after_iter', # Called after each SCF iteration + 'before_after_scf', # Called before after_scf() - main breakpoint + 'after_scf', # Called after after_scf() + ] + + def __init__(self, input_dir: str, gamma_only: bool = True): + """ + Initialize LCAOWorkflow. + + Parameters + ---------- + input_dir : str + Directory containing input files + gamma_only : bool + Use gamma-only calculation if True, multi-k if False + """ + self._input_dir = input_dir + self._gamma_only = gamma_only + self._esolver = None + self._initialized = False + self._scf_running = False + + # Callback registry + self._callbacks: Dict[str, List[Callable]] = { + event: [] for event in self.EVENTS + } + + def initialize(self) -> None: + """ + Initialize the calculation. + + This must be called before running any SCF calculations. + """ + # Import the appropriate ESolver class + try: + if self._gamma_only: + from ._esolver_pack import ESolverLCAO_gamma + self._esolver = ESolverLCAO_gamma() + else: + from ._esolver_pack import ESolverLCAO_multi_k + self._esolver = ESolverLCAO_multi_k() + except ImportError as e: + raise ImportError( + f"Could not import ESolver bindings: {e}. " + "Make sure pyabacus is properly installed with ESolver support." + ) from e + + self._esolver.initialize(self._input_dir) + self._esolver.before_all_runners() + self._initialized = True + + def register_callback(self, event: str, callback: Callable[['LCAOWorkflow'], None]) -> None: + """ + Register a callback function for a specific event. + + Parameters + ---------- + event : str + Event name. One of: 'before_scf', 'after_iter', 'before_after_scf', 'after_scf' + callback : Callable[[LCAOWorkflow], None] + Callback function that takes the workflow instance as argument. + For 'after_iter', the callback receives (workflow, iter_num). + + Raises + ------ + ValueError + If event name is not recognized + """ + if event not in self.EVENTS: + raise ValueError( + f"Unknown event '{event}'. Valid events: {self.EVENTS}" + ) + self._callbacks[event].append(callback) + + def unregister_callback(self, event: str, callback: Callable) -> bool: + """ + Unregister a callback function. + + Parameters + ---------- + event : str + Event name + callback : Callable + Callback function to remove + + Returns + ------- + bool + True if callback was found and removed, False otherwise + """ + if event in self._callbacks and callback in self._callbacks[event]: + self._callbacks[event].remove(callback) + return True + return False + + def clear_callbacks(self, event: Optional[str] = None) -> None: + """ + Clear all callbacks for an event, or all events if event is None. + + Parameters + ---------- + event : str, optional + Event name. If None, clears all callbacks. + """ + if event is None: + for e in self.EVENTS: + self._callbacks[e].clear() + elif event in self._callbacks: + self._callbacks[event].clear() + + def _fire_callbacks(self, event: str, *args, **kwargs) -> None: + """Fire all callbacks for an event.""" + for callback in self._callbacks[event]: + callback(self, *args, **kwargs) + + def run_scf( + self, + max_iter: int = 100, + istep: int = 0, + callback: Optional[Callable[['LCAOWorkflow', int], None]] = None + ) -> SCFResult: + """ + Run SCF calculation with callback support. + + Parameters + ---------- + max_iter : int + Maximum number of SCF iterations + istep : int + Ion step index (for MD/relaxation) + callback : Callable, optional + Additional callback called after each iteration. + Receives (workflow, iter_num) as arguments. + + Returns + ------- + SCFResult + Result of the SCF calculation + + Raises + ------ + RuntimeError + If workflow is not initialized + """ + if not self._initialized: + raise RuntimeError("Workflow not initialized. Call initialize() first.") + + self._scf_running = True + + # before_scf + self._esolver.before_scf(istep) + self._fire_callbacks('before_scf') + + # SCF loop + for iter_num in range(1, max_iter + 1): + self._esolver.run_scf_iteration(iter_num) + + # Fire after_iter callbacks + self._fire_callbacks('after_iter', iter_num) + + # Call user-provided callback + if callback is not None: + callback(self, iter_num) + + # Check convergence + if self._esolver.is_converged(): + break + + # Breakpoint before after_scf - this is the main inspection point + self._fire_callbacks('before_after_scf') + + # Collect result before after_scf + result = self._collect_result() + + # after_scf + self._esolver.after_scf(istep) + self._fire_callbacks('after_scf') + + self._scf_running = False + + return result + + def run_scf_step(self, iter_num: int) -> None: + """ + Run a single SCF iteration. + + This is useful for manual control of the SCF loop. + + Parameters + ---------- + iter_num : int + Iteration number (1-based) + """ + if not self._scf_running: + raise RuntimeError( + "SCF not started. Call before_scf() first or use run_scf()." + ) + self._esolver.run_scf_iteration(iter_num) + + def before_scf(self, istep: int = 0) -> None: + """ + Prepare for SCF calculation. + + Call this before manually running SCF iterations. + + Parameters + ---------- + istep : int + Ion step index + """ + if not self._initialized: + raise RuntimeError("Workflow not initialized. Call initialize() first.") + self._esolver.before_scf(istep) + self._scf_running = True + self._fire_callbacks('before_scf') + + def after_scf(self, istep: int = 0) -> None: + """ + Finalize SCF calculation. + + Call this after manually running SCF iterations. + + Parameters + ---------- + istep : int + Ion step index + """ + self._fire_callbacks('before_after_scf') + self._esolver.after_scf(istep) + self._fire_callbacks('after_scf') + self._scf_running = False + + def _collect_result(self) -> SCFResult: + """Collect SCF result from current state.""" + return SCFResult( + converged=self._esolver.is_converged(), + niter=self._esolver.niter, + drho=self._esolver.drho, + energy=self.energy, + charge=self.charge, + ) + + # ==================== Properties for data access ==================== + + @property + def charge(self) -> ChargeData: + """ + Get current charge density. + + Returns + ------- + ChargeData + Charge density data container + """ + accessor = self._esolver.get_charge() + if not accessor.is_valid(): + return ChargeData(rho=np.array([]), nspin=0, nrxx=0) + + return ChargeData( + rho=accessor.get_rho(), + nspin=accessor.nspin, + nrxx=accessor.nrxx, + ) + + @property + def energy(self) -> EnergyData: + """ + Get current energy data. + + Returns + ------- + EnergyData + Energy data container with all energy components + """ + accessor = self._esolver.get_energy() + return EnergyData( + etot=accessor.etot, + eband=accessor.eband, + hartree_energy=accessor.hartree_energy, + etxc=accessor.etxc, + ewald_energy=accessor.ewald_energy, + demet=accessor.demet, + exx=accessor.exx, + evdw=accessor.evdw, + ) + + @property + def hamiltonian(self) -> HamiltonianData: + """ + Get current Hamiltonian matrices. + + Returns + ------- + HamiltonianData + Hamiltonian data container with H(k), S(k), H(R), S(R) + """ + accessor = self._esolver.get_hamiltonian() + if not accessor.is_valid(): + return HamiltonianData() + + nks = accessor.nks + Hk = [accessor.get_Hk(ik) for ik in range(nks)] + Sk = [accessor.get_Sk(ik) for ik in range(nks)] + + return HamiltonianData( + Hk=Hk, + Sk=Sk, + HR=accessor.get_HR(), + SR=accessor.get_SR(), + nbasis=accessor.nbasis, + nks=nks, + ) + + @property + def density_matrix(self) -> DensityMatrixData: + """ + Get current density matrix. + + Returns + ------- + DensityMatrixData + Density matrix data container with DM(k) and DM(R) + """ + accessor = self._esolver.get_density_matrix() + if not accessor.is_valid(): + return DensityMatrixData() + + nks = accessor.nks + DMK = [accessor.get_DMK(ik) for ik in range(nks)] + + return DensityMatrixData( + DMK=DMK, + DMR=accessor.get_DMR(), + nks=nks, + nrow=accessor.nrow, + ncol=accessor.ncol, + ) + + @property + def is_converged(self) -> bool: + """Check if SCF is converged.""" + return self._esolver.is_converged() + + @property + def niter(self) -> int: + """Get current iteration number.""" + return self._esolver.niter + + @property + def drho(self) -> float: + """Get current charge density difference.""" + return self._esolver.drho + + @property + def nks(self) -> int: + """Get number of k-points.""" + return self._esolver.nks + + @property + def nbasis(self) -> int: + """Get number of basis functions.""" + return self._esolver.nbasis + + @property + def nbands(self) -> int: + """Get number of bands.""" + return self._esolver.nbands + + @property + def nspin(self) -> int: + """Get number of spin channels.""" + return self._esolver.nspin + + def get_psi(self, ik: int) -> np.ndarray: + """ + Get wave function coefficients for k-point ik. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + np.ndarray + Wave function coefficients with shape (nbands, nbasis) + """ + return self._esolver.get_psi(ik) + + def get_eigenvalues(self, ik: int) -> np.ndarray: + """ + Get eigenvalues for k-point ik. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + np.ndarray + Eigenvalues with shape (nbands,) + """ + return self._esolver.get_eigenvalues(ik) + + def get_occupations(self, ik: int) -> np.ndarray: + """ + Get occupation numbers for k-point ik. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + np.ndarray + Occupation numbers with shape (nbands,) + """ + return self._esolver.get_occupations(ik) + + def get_kvec(self, ik: int) -> np.ndarray: + """ + Get k-vector in direct coordinates. + + Parameters + ---------- + ik : int + K-point index + + Returns + ------- + np.ndarray + K-vector with shape (3,) + """ + return self._esolver.get_kvec_d(ik) + + def get_kweights(self) -> np.ndarray: + """ + Get k-point weights. + + Returns + ------- + np.ndarray + K-point weights with shape (nks,) + """ + return self._esolver.get_wk() diff --git a/python/pyabacus/src/pyabacus/hsolver/_hsolver.py b/python/pyabacus/src/pyabacus/hsolver/_hsolver.py index 7c60ce538c..76001720b4 100644 --- a/python/pyabacus/src/pyabacus/hsolver/_hsolver.py +++ b/python/pyabacus/src/pyabacus/hsolver/_hsolver.py @@ -9,7 +9,15 @@ from typing import Tuple, List, Union, Callable from ._hsolver_pack import diag_comm_info as _diag_comm_info -from ._hsolver_pack import diago_dav_subspace, diago_david, diago_cg +from ._hsolver_pack import diago_dav_subspace, diago_david + +# diago_cg requires ATen support, which may not be available +try: + from ._hsolver_pack import diago_cg + _HAS_DIAGO_CG = True +except ImportError: + _HAS_DIAGO_CG = False + diago_cg = None class diag_comm_info(_diag_comm_info): def __init__(self, rank: int, nproc: int): @@ -196,6 +204,10 @@ def davidson( return e, v +def cg_available() -> bool: + """Check if the CG diagonalizer is available (requires ATen support).""" + return _HAS_DIAGO_CG + def cg( mvv_op: Callable[[NDArray[np.complex128]], NDArray[np.complex128]], init_v: NDArray[np.complex128], @@ -248,7 +260,10 @@ def cg( """ if not callable(mvv_op): raise TypeError("mvv_op must be a callable object.") - + + if not _HAS_DIAGO_CG: + raise RuntimeError("CG diagonalizer is not available. It requires ATen support.") + if init_v.ndim != 1 or init_v.dtype != np.complex128: # the shape of init_v is (num_eigs, dim) = (dim, num_eigs).T if init_v.ndim == 2: diff --git a/python/pyabacus/src/utils/pybind_utils.h b/python/pyabacus/src/utils/pybind_utils.h new file mode 100644 index 0000000000..1fc24fbf2b --- /dev/null +++ b/python/pyabacus/src/utils/pybind_utils.h @@ -0,0 +1,522 @@ +/** + * @file pybind_utils.h + * @brief Utility functions for pybind11 array operations in PyABACUS + * + * This header provides common utilities for: + * - Array validation (dimension, size checks) + * - Array pointer access + * - Array conversion (copy and zero-copy views) + * - Safe Python function calls + * - Buffer helper class + */ + +#ifndef PYABACUS_UTILS_PYBIND_UTILS_H +#define PYABACUS_UTILS_PYBIND_UTILS_H + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace py = pybind11; + +namespace pyabacus { +namespace utils { + +// ============================================================================ +// Array Validation Functions +// ============================================================================ + +/** + * @brief Check that a numpy array is 1-dimensional + * @param arr The numpy array to check + * @param name Name of the array for error messages + * @throws std::runtime_error if array is not 1D + */ +template +void check_1d_array(const py::array_t& arr, const std::string& name = "array") +{ + py::buffer_info info = arr.request(); + if (info.ndim != 1) + { + throw std::runtime_error(name + " must be 1-dimensional, got " + + std::to_string(info.ndim) + " dimensions"); + } +} + +/** + * @brief Check that a numpy array is 2-dimensional + * @param arr The numpy array to check + * @param name Name of the array for error messages + * @throws std::runtime_error if array is not 2D + */ +template +void check_2d_array(const py::array_t& arr, const std::string& name = "array") +{ + py::buffer_info info = arr.request(); + if (info.ndim != 2) + { + throw std::runtime_error(name + " must be 2-dimensional, got " + + std::to_string(info.ndim) + " dimensions"); + } +} + +/** + * @brief Check that a numpy array has the expected size + * @param arr The numpy array to check + * @param expected_size Expected total number of elements + * @param name Name of the array for error messages + * @throws std::runtime_error if size doesn't match + */ +template +void check_array_size(const py::array_t& arr, size_t expected_size, + const std::string& name = "array") +{ + if (static_cast(arr.size()) != expected_size) + { + throw std::runtime_error(name + " must have size " + + std::to_string(expected_size) + ", got " + + std::to_string(arr.size())); + } +} + +/** + * @brief Check that a numpy array has the expected shape + * @param arr The numpy array to check + * @param expected_shape Expected shape as vector + * @param name Name of the array for error messages + * @throws std::runtime_error if shape doesn't match + */ +template +void check_array_shape(const py::array_t& arr, + const std::vector& expected_shape, + const std::string& name = "array") +{ + py::buffer_info info = arr.request(); + if (info.ndim != static_cast(expected_shape.size())) + { + throw std::runtime_error(name + " has wrong number of dimensions"); + } + for (size_t i = 0; i < expected_shape.size(); ++i) + { + if (info.shape[i] != expected_shape[i]) + { + throw std::runtime_error(name + " has wrong shape at dimension " + + std::to_string(i)); + } + } +} + +/** + * @brief Check that two arrays have the same size + * @param arr1 First array + * @param arr2 Second array + * @param name1 Name of first array + * @param name2 Name of second array + * @throws std::runtime_error if sizes don't match + */ +template +void check_same_size(const py::array_t& arr1, const py::array_t& arr2, + const std::string& name1 = "array1", + const std::string& name2 = "array2") +{ + if (arr1.size() != arr2.size()) + { + throw std::runtime_error(name1 + " and " + name2 + + " must have the same size"); + } +} + +// ============================================================================ +// Array Pointer Access +// ============================================================================ + +/** + * @brief Get mutable pointer to array data + * @param arr The numpy array + * @return Pointer to the array data + */ +template +T* get_array_ptr(py::array_t& arr) +{ + py::buffer_info info = arr.request(); + return static_cast(info.ptr); +} + +/** + * @brief Get const pointer to array data + * @param arr The numpy array + * @return Const pointer to the array data + */ +template +const T* get_array_ptr(const py::array_t& arr) +{ + py::buffer_info info = arr.request(); + return static_cast(info.ptr); +} + +/** + * @brief Get pointer to array data with 1D validation + * @param arr The numpy array + * @param name Name for error messages + * @return Pointer to the array data + */ +template +T* get_1d_array_ptr(py::array_t& arr, const std::string& name = "array") +{ + check_1d_array(arr, name); + return get_array_ptr(arr); +} + +/** + * @brief Get const pointer to array data with 1D validation + * @param arr The numpy array + * @param name Name for error messages + * @return Const pointer to the array data + */ +template +const T* get_1d_array_ptr(const py::array_t& arr, const std::string& name = "array") +{ + check_1d_array(arr, name); + return get_array_ptr(arr); +} + +// ============================================================================ +// Array Conversion (Copy) +// ============================================================================ + +/** + * @brief Create numpy array from std::vector (copy) + * @param vec Source vector + * @return New numpy array with copied data + */ +template +py::array_t numpy_from_vector_copy(const std::vector& vec) +{ + py::array_t result(vec.size()); + std::memcpy(result.mutable_data(), vec.data(), vec.size() * sizeof(T)); + return result; +} + +/** + * @brief Create 1D numpy array from raw pointer (copy) + * @param ptr Source pointer + * @param size Number of elements + * @return New numpy array with copied data + */ +template +py::array_t numpy_from_ptr_copy(const T* ptr, size_t size) +{ + py::array_t result(size); + std::memcpy(result.mutable_data(), ptr, size * sizeof(T)); + return result; +} + +/** + * @brief Create 2D numpy array from raw pointer (copy, row-major) + * @param ptr Source pointer + * @param nrow Number of rows + * @param ncol Number of columns + * @return New numpy array with copied data + */ +template +py::array_t numpy_from_ptr_copy_2d(const T* ptr, size_t nrow, size_t ncol) +{ + std::vector shape = {static_cast(nrow), + static_cast(ncol)}; + py::array_t result(shape); + std::memcpy(result.mutable_data(), ptr, nrow * ncol * sizeof(T)); + return result; +} + +/** + * @brief Create numpy array with specified shape from raw pointer (copy) + * @param ptr Source pointer + * @param shape Shape of the output array + * @return New numpy array with copied data + */ +template +py::array_t numpy_from_ptr_copy_nd(const T* ptr, const std::vector& shape) +{ + py::array_t result(shape); + size_t total_size = 1; + for (auto dim : shape) + { + total_size *= static_cast(dim); + } + std::memcpy(result.mutable_data(), ptr, total_size * sizeof(T)); + return result; +} + +// ============================================================================ +// Zero-Copy Views with Lifetime Management +// ============================================================================ + +/** + * @brief Create numpy array view with keepalive (zero-copy) + * + * Creates a numpy array that references existing memory without copying. + * The owner_ptr shared_ptr ensures the underlying data stays alive. + * + * @param ptr Pointer to the data + * @param shape Shape of the array + * @param owner_ptr Shared pointer to the owner object (keeps data alive) + * @return Numpy array view + */ +template +py::array_t numpy_view_with_keepalive(T* ptr, + const std::vector& shape, + std::shared_ptr owner_ptr) +{ + // Calculate strides for C-contiguous array + std::vector strides(shape.size()); + ssize_t stride = sizeof(T); + for (int i = static_cast(shape.size()) - 1; i >= 0; --i) + { + strides[i] = stride; + stride *= shape[i]; + } + + // Create capsule to prevent deallocation + py::capsule free_when_done(owner_ptr.get(), [](void*) { + // The shared_ptr prevents deallocation, capsule just holds reference + }); + + return py::array_t(shape, strides, ptr, free_when_done); +} + +/** + * @brief Create 1D numpy array view (zero-copy, no ownership management) + * + * WARNING: Caller must ensure the data outlives the returned array! + * + * @param ptr Pointer to the data + * @param size Number of elements + * @return Numpy array view + */ +template +py::array_t numpy_view_1d(T* ptr, size_t size) +{ + return py::array_t({static_cast(size)}, + {sizeof(T)}, + ptr, + py::none()); +} + +/** + * @brief Create 2D numpy array view (zero-copy, no ownership management) + * + * WARNING: Caller must ensure the data outlives the returned array! + * + * @param ptr Pointer to the data + * @param nrow Number of rows + * @param ncol Number of columns + * @return Numpy array view (row-major) + */ +template +py::array_t numpy_view_2d(T* ptr, size_t nrow, size_t ncol) +{ + return py::array_t( + {static_cast(nrow), static_cast(ncol)}, + {static_cast(ncol * sizeof(T)), sizeof(T)}, + ptr, + py::none() + ); +} + +// ============================================================================ +// Safe Python Function Calls +// ============================================================================ + +/** + * @brief Call a Python function safely with exception handling + * + * Wraps Python function calls to provide better error messages + * and handle GIL properly. + * + * @param func Python function to call + * @param args Arguments to pass to the function + * @return Return value from the function + */ +template +Ret call_python_safe(const py::function& func, Args&&... args) +{ + try + { + return func(std::forward(args)...).template cast(); + } + catch (const py::error_already_set& e) + { + throw std::runtime_error(std::string("Python callback error: ") + e.what()); + } + catch (const py::cast_error& e) + { + throw std::runtime_error(std::string("Python return type error: ") + e.what()); + } +} + +/** + * @brief Call a Python function that returns void + * @param func Python function to call + * @param args Arguments to pass to the function + */ +template +void call_python_safe_void(const py::function& func, Args&&... args) +{ + try + { + func(std::forward(args)...); + } + catch (const py::error_already_set& e) + { + throw std::runtime_error(std::string("Python callback error: ") + e.what()); + } +} + +// ============================================================================ +// Buffer Helper Class +// ============================================================================ + +/** + * @brief Helper class for working with numpy buffer info + * + * Provides convenient access to buffer properties and validation methods. + */ +template +struct BufferHelper +{ + py::buffer_info info; + T* ptr; + size_t size; + + /** + * @brief Construct from numpy array + * @param arr The numpy array + */ + explicit BufferHelper(py::array_t& arr) + : info(arr.request()) + , ptr(static_cast(info.ptr)) + , size(static_cast(arr.size())) + { + } + + /** + * @brief Construct from const numpy array + * @param arr The numpy array + */ + explicit BufferHelper(const py::array_t& arr) + : info(arr.request()) + , ptr(static_cast(info.ptr)) + , size(static_cast(arr.size())) + { + } + + /** + * @brief Require array to be 1-dimensional + * @param name Name for error messages + * @throws std::runtime_error if not 1D + */ + void require_1d(const std::string& name = "array") const + { + if (info.ndim != 1) + { + throw std::runtime_error(name + " must be 1-dimensional"); + } + } + + /** + * @brief Require array to be 2-dimensional + * @param name Name for error messages + * @throws std::runtime_error if not 2D + */ + void require_2d(const std::string& name = "array") const + { + if (info.ndim != 2) + { + throw std::runtime_error(name + " must be 2-dimensional"); + } + } + + /** + * @brief Require array to have specific size + * @param expected Expected size + * @param name Name for error messages + * @throws std::runtime_error if size doesn't match + */ + void require_size(size_t expected, const std::string& name = "array") const + { + if (size != expected) + { + throw std::runtime_error(name + " must have size " + + std::to_string(expected) + ", got " + + std::to_string(size)); + } + } + + /** + * @brief Require array to have specific shape + * @param expected_shape Expected shape + * @param name Name for error messages + * @throws std::runtime_error if shape doesn't match + */ + void require_shape(const std::vector& expected_shape, + const std::string& name = "array") const + { + if (info.ndim != static_cast(expected_shape.size())) + { + throw std::runtime_error(name + " has wrong number of dimensions"); + } + for (size_t i = 0; i < expected_shape.size(); ++i) + { + if (info.shape[i] != expected_shape[i]) + { + throw std::runtime_error(name + " has wrong shape at dimension " + + std::to_string(i)); + } + } + } + + /** + * @brief Get number of dimensions + * @return Number of dimensions + */ + ssize_t ndim() const { return info.ndim; } + + /** + * @brief Get shape at dimension i + * @param i Dimension index + * @return Size at dimension i + */ + ssize_t shape(size_t i) const { return info.shape[i]; } + + /** + * @brief Get number of rows (for 2D arrays) + * @return Number of rows + */ + ssize_t nrow() const { return info.shape[0]; } + + /** + * @brief Get number of columns (for 2D arrays) + * @return Number of columns + */ + ssize_t ncol() const { return info.shape[1]; } +}; + +// ============================================================================ +// Convenience Type Aliases +// ============================================================================ + +using DoubleBuffer = BufferHelper; +using ComplexBuffer = BufferHelper>; +using IntBuffer = BufferHelper; + +} // namespace utils +} // namespace pyabacus + +#endif // PYABACUS_UTILS_PYBIND_UTILS_H diff --git a/python/pyabacus/tests/test_driver.py b/python/pyabacus/tests/test_driver.py new file mode 100644 index 0000000000..b263933833 --- /dev/null +++ b/python/pyabacus/tests/test_driver.py @@ -0,0 +1,586 @@ +""" +Unit tests for PyABACUS driver module. + +This module contains tests for the abacus() function and related classes. +""" + +import pytest +import numpy as np +from pathlib import Path +from unittest.mock import Mock, patch, MagicMock +import tempfile +import os + + +class TestCalculationResult: + """Tests for CalculationResult dataclass.""" + + def test_default_values(self): + """Test default initialization.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult() + assert result.converged is False + assert result.niter == 0 + assert result.etot == 0.0 + assert result.forces is None + assert result.stress is None + + def test_energy_conversion(self): + """Test energy unit conversion.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult(etot=-10.0) + # etot is now in eV, etot_ev is the same value for compatibility + assert result.etot_ev == pytest.approx(-10.0) + + def test_energies_dict(self): + """Test energies dictionary property.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult( + etot=-10.0, + eband=-5.0, + hartree_energy=2.0, + etxc=-3.0, + ewald_energy=-4.0, + ) + + energies = result.energies + assert 'etot' in energies + assert energies['etot'] == -10.0 # All in eV now + assert energies['eband'] == -5.0 + + def test_forces_conversion(self): + """Test force unit conversion.""" + from pyabacus.driver.runner import CalculationResult + + # Forces are now stored in eV/Angstrom directly + forces = np.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) + result = CalculationResult(forces=forces) + + # forces_ev_ang is now the same as forces (for compatibility) + forces_ev_ang = result.forces_ev_ang + assert forces_ev_ang is not None + assert forces_ev_ang[0, 0] == pytest.approx(1.0) + + def test_forces_none(self): + """Test forces_ev_ang when forces is None.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult() + assert result.forces_ev_ang is None + assert result.has_forces is False + + def test_has_forces(self): + """Test has_forces property.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult() + assert result.has_forces is False + + result.forces = np.array([[1.0, 0.0, 0.0]]) + assert result.has_forces is True + + def test_has_stress(self): + """Test has_stress property.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult() + assert result.has_stress is False + + result.stress = np.eye(3) + assert result.has_stress is True + + def test_summary(self): + """Test summary string generation.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult( + converged=True, + niter=10, + drho=1e-8, + etot=-10.0, + nat=2, + ntype=1, + nbands=8, + nks=4, + ) + + summary = result.summary() + assert "Converged: Yes" in summary + assert "SCF iterations: 10" in summary + assert "Total energy:" in summary + assert "Atoms: 2" in summary + + def test_repr(self): + """Test string representation.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult(converged=True, etot=-10.0) + repr_str = repr(result) + assert "converged=True" in repr_str + assert "etot=" in repr_str + + +class TestAbacusFunction: + """Tests for the abacus() function.""" + + def test_file_not_found_error_nonexistent_dir(self): + """Test FileNotFoundError for missing input directory.""" + from pyabacus.driver.runner import abacus + + with pytest.raises(FileNotFoundError, match="Input directory not found"): + abacus("./nonexistent/") + + def test_file_not_found_error(self): + """Test FileNotFoundError for missing input directory.""" + from pyabacus.driver.runner import abacus + + with pytest.raises(FileNotFoundError, match="Input directory not found"): + abacus("/nonexistent/path/that/does/not/exist/") + + def test_input_file_not_found(self): + """Test FileNotFoundError for missing INPUT file.""" + from pyabacus.driver.runner import abacus + + with tempfile.TemporaryDirectory() as tmpdir: + mock_driver_module = MagicMock() + with patch.dict('sys.modules', {'pyabacus.driver._driver_pack': mock_driver_module}): + with pytest.raises(FileNotFoundError, match="INPUT file not found"): + abacus(tmpdir) + + def test_default_input_dir(self): + """Test that default input_dir is current directory.""" + from pyabacus.driver.runner import abacus + + # Create a mock driver + mock_driver = MagicMock() + mock_result = MagicMock() + mock_result.converged = True + mock_result.niter = 10 + mock_result.drho = 1e-8 + mock_result.etot = -10.0 + mock_result.eband = -5.0 + mock_result.hartree_energy = 2.0 + mock_result.etxc = -3.0 + mock_result.ewald_energy = -4.0 + mock_result.demet = 0.0 + mock_result.exx = 0.0 + mock_result.evdw = 0.0 + mock_result.fermi_energy = 5.0 + mock_result.bandgap = 1.0 + mock_result.nat = 2 + mock_result.ntype = 1 + mock_result.nbands = 8 + mock_result.nks = 4 + mock_result.has_forces = False + mock_result.has_stress = False + mock_driver.run.return_value = mock_result + + mock_driver_class = MagicMock(return_value=mock_driver) + mock_module = MagicMock() + mock_module.PyDriver = mock_driver_class + + with tempfile.TemporaryDirectory() as tmpdir: + # Create INPUT file + input_file = Path(tmpdir) / "INPUT" + input_file.write_text("INPUT_PARAMETERS\ncalculation scf\n") + + with patch.dict('sys.modules', {'pyabacus.driver._driver_pack': mock_module}): + # Change to temp directory and run + old_cwd = os.getcwd() + try: + os.chdir(tmpdir) + result = abacus() + assert result.converged is True + finally: + os.chdir(old_cwd) + + +class TestRunScf: + """Tests for run_scf convenience function.""" + + def test_run_scf_calls_abacus(self): + """Test that run_scf calls abacus with correct arguments.""" + from pyabacus.driver.runner import run_scf, abacus + + with patch('pyabacus.driver.runner.abacus') as mock_abacus: + mock_result = MagicMock() + mock_abacus.return_value = mock_result + + result = run_scf("./test_dir/", verbosity=0) + + mock_abacus.assert_called_once_with("./test_dir/", verbosity=0) + + +class TestRunRelax: + """Tests for run_relax convenience function.""" + + def test_run_relax_enables_forces(self): + """Test that run_relax enables force calculation by default.""" + from pyabacus.driver.runner import run_relax + + with patch('pyabacus.driver.runner.abacus') as mock_abacus: + mock_result = MagicMock() + mock_abacus.return_value = mock_result + + result = run_relax("./test_dir/") + + # Check that calculate_force=True was passed + call_kwargs = mock_abacus.call_args[1] + assert call_kwargs.get('calculate_force', False) is True + + +class TestDriverModule: + """Tests for the driver module initialization.""" + + def test_module_exports(self): + """Test that module exports expected symbols.""" + from pyabacus import driver + + assert hasattr(driver, 'abacus') + assert hasattr(driver, 'CalculationResult') + + def test_pyabacus_exports_abacus(self): + """Test that pyabacus exports abacus function.""" + import pyabacus + + # The abacus function should be accessible + assert 'abacus' in pyabacus.__all__ + assert 'CalculationResult' in pyabacus.__all__ + + +class TestIntegration: + """Integration tests (require actual ABACUS installation).""" + + @pytest.mark.skip(reason="Requires ABACUS installation and test data") + def test_si_scf(self): + """Test SCF calculation on Si.""" + from pyabacus import abacus + + result = abacus("./tests/integrate/101_PW_15_f_pseudopots/") + + assert result.converged + assert result.etot < 0 # Energy should be negative + assert result.nat > 0 + + @pytest.mark.skip(reason="Requires ABACUS installation and test data") + def test_si_forces(self): + """Test force calculation on Si.""" + from pyabacus import abacus + + result = abacus( + "./tests/integrate/101_PW_15_f_pseudopots/", + calculate_force=True, + ) + + assert result.converged + assert result.has_forces + assert result.forces.shape == (result.nat, 3) + + +class TestCalculationResultOutputTracking: + """Tests for CalculationResult output file tracking.""" + + def test_default_output_values(self): + """Test default output tracking values.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult() + assert result.output_dir == "" + assert result.log_file == "" + assert result.output_files == {} + assert result.has_output_dir is False + + def test_output_dir_set(self): + """Test output directory tracking.""" + from pyabacus.driver.runner import CalculationResult + + with tempfile.TemporaryDirectory() as tmpdir: + result = CalculationResult(output_dir=tmpdir) + assert result.output_dir == tmpdir + assert result.has_output_dir is True + + def test_output_dir_nonexistent(self): + """Test has_output_dir with non-existent directory.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult(output_dir="/nonexistent/path") + assert result.output_dir == "/nonexistent/path" + assert result.has_output_dir is False + + def test_output_files_dict(self): + """Test output files dictionary.""" + from pyabacus.driver.runner import CalculationResult + + output_files = { + "running_scf.log": "/path/to/OUT.ABACUS/running_scf.log", + "BANDS_1.dat": "/path/to/OUT.ABACUS/BANDS_1.dat", + } + result = CalculationResult(output_files=output_files) + + assert len(result.output_files) == 2 + assert "running_scf.log" in result.output_files + assert result.output_files["running_scf.log"] == "/path/to/OUT.ABACUS/running_scf.log" + + def test_get_output_file(self): + """Test get_output_file method.""" + from pyabacus.driver.runner import CalculationResult + + output_files = { + "running_scf.log": "/path/to/OUT.ABACUS/running_scf.log", + } + result = CalculationResult(output_files=output_files) + + assert result.get_output_file("running_scf.log") == "/path/to/OUT.ABACUS/running_scf.log" + assert result.get_output_file("nonexistent.dat") is None + + def test_list_output_files(self): + """Test list_output_files method.""" + from pyabacus.driver.runner import CalculationResult + + output_files = { + "running_scf.log": "/path/to/OUT.ABACUS/running_scf.log", + "BANDS_1.dat": "/path/to/OUT.ABACUS/BANDS_1.dat", + "CHARGE.cube": "/path/to/OUT.ABACUS/CHARGE.cube", + } + result = CalculationResult(output_files=output_files) + + file_list = result.list_output_files() + assert len(file_list) == 3 + assert "running_scf.log" in file_list + assert "BANDS_1.dat" in file_list + assert "CHARGE.cube" in file_list + + def test_summary_includes_output_info(self): + """Test that summary includes output tracking info.""" + from pyabacus.driver.runner import CalculationResult + + with tempfile.TemporaryDirectory() as tmpdir: + # Create a mock log file + log_file = os.path.join(tmpdir, "running_scf.log") + with open(log_file, 'w') as f: + f.write("test log") + + output_files = { + "running_scf.log": log_file, + "BANDS_1.dat": os.path.join(tmpdir, "BANDS_1.dat"), + } + + result = CalculationResult( + converged=True, + etot=-10.0, + output_dir=tmpdir, + log_file=log_file, + output_files=output_files, + ) + + summary = result.summary() + assert "Output:" in summary + assert "Directory:" in summary + assert tmpdir in summary + assert "Log file: running_scf.log" in summary + assert "2 output files" in summary + + def test_summary_without_output_info(self): + """Test that summary works without output tracking info.""" + from pyabacus.driver.runner import CalculationResult + + result = CalculationResult(converged=True, etot=-10.0) + summary = result.summary() + + # Output section is always present, but shows N/A when not set + assert "Output:" in summary + assert "Directory: N/A" in summary + assert "Log file: N/A" in summary + assert "0 output files" in summary + + +class TestCollectOutputFiles: + """Tests for _collect_output_files helper function.""" + + def test_collect_output_files(self): + """Test collecting output files from directory.""" + from pyabacus.driver.runner import _collect_output_files + + with tempfile.TemporaryDirectory() as tmpdir: + # Create some test files + files = ["running_scf.log", "BANDS_1.dat", "CHARGE.cube"] + for f in files: + Path(tmpdir, f).touch() + + # Create a subdirectory (should be ignored) + os.makedirs(os.path.join(tmpdir, "subdir")) + + output_files = _collect_output_files(tmpdir) + + assert len(output_files) == 3 + for f in files: + assert f in output_files + assert output_files[f] == os.path.join(tmpdir, f) + + def test_collect_output_files_empty_dir(self): + """Test collecting from empty directory.""" + from pyabacus.driver.runner import _collect_output_files + + with tempfile.TemporaryDirectory() as tmpdir: + output_files = _collect_output_files(tmpdir) + assert output_files == {} + + def test_collect_output_files_nonexistent(self): + """Test collecting from non-existent directory.""" + from pyabacus.driver.runner import _collect_output_files + + output_files = _collect_output_files("/nonexistent/path") + assert output_files == {} + + +class TestParseForces: + """Tests for _parse_forces_from_log helper function.""" + + def test_parse_forces_from_log(self): + """Test parsing forces from log file.""" + from pyabacus.driver.runner import _parse_forces_from_log + + with tempfile.TemporaryDirectory() as tmpdir: + log_file = os.path.join(tmpdir, "running_scf.log") + log_content = """ + TOTAL-FORCE (eV/Angstrom) + ------------------------------------------------------------------------------------ + atom x y z + Si1 0.00100000 0.00200000 0.00300000 + Si2 -0.00100000 -0.00200000 -0.00300000 + ------------------------------------------------------------------------------------ +""" + with open(log_file, 'w') as f: + f.write(log_content) + + forces = _parse_forces_from_log(log_file, 2) + assert forces is not None + assert forces.shape == (2, 3) + # Forces are now in eV/Angstrom directly (no conversion) + assert abs(forces[0, 0] - 0.001) < 1e-10 + assert abs(forces[0, 1] - 0.002) < 1e-10 + assert abs(forces[1, 0] - (-0.001)) < 1e-10 + + def test_parse_forces_no_forces(self): + """Test parsing when no forces in log.""" + from pyabacus.driver.runner import _parse_forces_from_log + + with tempfile.TemporaryDirectory() as tmpdir: + log_file = os.path.join(tmpdir, "running_scf.log") + with open(log_file, 'w') as f: + f.write("No forces here\n") + + forces = _parse_forces_from_log(log_file, 2) + assert forces is None + + def test_parse_forces_nonexistent_file(self): + """Test parsing from non-existent file.""" + from pyabacus.driver.runner import _parse_forces_from_log + + forces = _parse_forces_from_log("/nonexistent/file.log", 2) + assert forces is None + + +class TestParseStress: + """Tests for _parse_stress_from_log helper function.""" + + def test_parse_stress_from_log(self): + """Test parsing stress from log file.""" + from pyabacus.driver.runner import _parse_stress_from_log + + with tempfile.TemporaryDirectory() as tmpdir: + log_file = os.path.join(tmpdir, "running_scf.log") + log_content = """ + TOTAL-STRESS (KBAR) + ------------------------------------------------------------------------------------ + 1.23456789 0.00000000 0.00000000 + 0.00000000 1.23456789 0.00000000 + 0.00000000 0.00000000 1.23456789 + ------------------------------------------------------------------------------------ +""" + with open(log_file, 'w') as f: + f.write(log_content) + + stress = _parse_stress_from_log(log_file) + assert stress is not None + assert stress.shape == (3, 3) + assert abs(stress[0, 0] - 1.23456789) < 1e-6 + assert abs(stress[1, 1] - 1.23456789) < 1e-6 + + def test_parse_stress_no_stress(self): + """Test parsing when no stress in log.""" + from pyabacus.driver.runner import _parse_stress_from_log + + with tempfile.TemporaryDirectory() as tmpdir: + log_file = os.path.join(tmpdir, "running_scf.log") + with open(log_file, 'w') as f: + f.write("No stress here\n") + + stress = _parse_stress_from_log(log_file) + assert stress is None + + +class TestParallelParameters: + """Tests for nprocs and nthreads parameters.""" + + def test_abacus_accepts_parallel_params(self): + """Test that abacus() accepts nprocs and nthreads parameters.""" + from pyabacus.driver.runner import abacus + import inspect + + sig = inspect.signature(abacus) + params = sig.parameters + + assert 'nprocs' in params + assert 'nthreads' in params + assert params['nprocs'].default == 1 + assert params['nthreads'].default == 1 + + +# Fixtures for test data +@pytest.fixture +def mock_cpp_result(): + """Create a mock C++ CalculationResult.""" + result = MagicMock() + result.converged = True + result.niter = 15 + result.drho = 1e-9 + result.etot = -15.5 + result.eband = -8.0 + result.hartree_energy = 3.5 + result.etxc = -4.2 + result.ewald_energy = -6.8 + result.demet = 0.0 + result.exx = 0.0 + result.evdw = 0.0 + result.fermi_energy = 6.5 + result.bandgap = 1.2 + result.nat = 2 + result.ntype = 1 + result.nbands = 10 + result.nks = 8 + result.has_forces = True + result.has_stress = False + result.forces = np.array([[0.01, 0.02, 0.03], [-0.01, -0.02, -0.03]]) + return result + + +@pytest.fixture +def temp_input_dir(): + """Create a temporary directory with INPUT file.""" + with tempfile.TemporaryDirectory() as tmpdir: + input_file = Path(tmpdir) / "INPUT" + input_file.write_text("""INPUT_PARAMETERS +calculation scf +basis_type pw +ecutwfc 50 +scf_thr 1e-8 +""") + yield tmpdir + + +if __name__ == "__main__": + pytest.main([__file__, "-v"]) diff --git a/python/pyabacus/tests/test_hsolver.py b/python/pyabacus/tests/test_hsolver.py index 82b54c5a3a..07872076f3 100644 --- a/python/pyabacus/tests/test_hsolver.py +++ b/python/pyabacus/tests/test_hsolver.py @@ -32,26 +32,29 @@ def mm_op(x): args = (mm_op, v0, nbasis, nband, precond, 1e-12, 5000) else: raise ValueError(f"Method {method} not available") - + e, _ = algo(*args) - + return e def diag_eigsh(h_sparse, nband): e, _ = scipy.sparse.linalg.eigsh(h_sparse, k=nband, which='SA', maxiter=5000, tol=1e-12) return e +# Check if CG is available +_cg_available = hsolver.cg_available() + @pytest.mark.parametrize("method", [ ('dav_subspace'), ('davidson'), - ('cg') + pytest.param('cg', marks=pytest.mark.skipif(not _cg_available, reason="CG requires ATen support")) ]) def test_random_matrix_diag(method): np.random.seed(12) n = 500 h_sparse = np.random.rand(n,n) h_sparse = h_sparse + h_sparse.conj().T + np.diag(np.random.random(n))*10 - + e_pyabacus = diag_pyabacus(h_sparse, 8, method) e_scipy = diag_eigsh(h_sparse, 8) np.testing.assert_allclose(e_pyabacus, e_scipy, atol=1e-8) @@ -59,10 +62,10 @@ def test_random_matrix_diag(method): @pytest.mark.parametrize("file_name, nband, atol, method", [ ('./test_diag/Si2.mat', 16, 1e-8, 'dav_subspace'), ('./test_diag/Si2.mat', 16, 1e-8, 'davidson'), - ('./test_diag/Si2.mat', 16, 1e-8, 'cg'), + pytest.param('./test_diag/Si2.mat', 16, 1e-8, 'cg', marks=pytest.mark.skipif(not _cg_available, reason="CG requires ATen support")), ('./test_diag/Na5.mat', 16, 1e-8, 'dav_subspace'), ('./test_diag/Na5.mat', 16, 1e-8, 'davidson'), - ('./test_diag/Na5.mat', 16, 1e-8, 'cg'), + pytest.param('./test_diag/Na5.mat', 16, 1e-8, 'cg', marks=pytest.mark.skipif(not _cg_available, reason="CG requires ATen support")), ]) def test_diag(file_name, nband, atol, method): h_sparse = scipy.io.loadmat(file_name)['Problem']['A'][0, 0] diff --git a/python/pyabacus/tests/test_lifetime.py b/python/pyabacus/tests/test_lifetime.py new file mode 100644 index 0000000000..fcec2844ad --- /dev/null +++ b/python/pyabacus/tests/test_lifetime.py @@ -0,0 +1,169 @@ +from __future__ import annotations + +""" +Tests for memory lifetime safety of pyabacus bindings. + +These tests verify that numpy arrays returned from C++ objects +are safe to use even after the C++ object is destroyed (because +they are copies, not views). +""" + +import pytest +import numpy as np +from pyabacus import ModuleNAO as nao + + +def test_array_lifetime_after_object_deletion(): + """Test that arrays remain valid after C++ object deletion.""" + chi = nao.NumericalRadial() + + # Build the object + sz = 100 + dr = 0.1 + grid = np.array([i * dr for i in range(sz)], dtype=np.float64) + values = np.exp(-grid) + + chi.build( + l=0, + for_r_space=True, + ngrid=sz, + grid=grid, + value=values, + p=-1, + izeta=0, + symbol="Test", + itype=0, + init_sbt=True + ) + + # Get arrays + rgrid = chi.rgrid + rvalue = chi.rvalue + + # Save copies for comparison + rgrid_copy = rgrid.copy() + rvalue_copy = rvalue.copy() + + # Delete the C++ object + del chi + + # Arrays should still be valid and contain correct data + # (because they are copies, not views) + np.testing.assert_array_equal(rgrid, rgrid_copy) + np.testing.assert_array_equal(rvalue, rvalue_copy) + + +def test_array_modification_isolation(): + """Test that modifying returned arrays doesn't affect original data.""" + chi = nao.NumericalRadial() + + sz = 100 + dr = 0.1 + grid = np.array([i * dr for i in range(sz)], dtype=np.float64) + values = np.exp(-grid) + + chi.build( + l=0, + for_r_space=True, + ngrid=sz, + grid=grid, + value=values + ) + + # Get first array and modify it + rgrid1 = chi.rgrid + original_value = rgrid1[0] + rgrid1[0] = 999.0 + + # Get second array - should have original value + rgrid2 = chi.rgrid + assert rgrid2[0] == original_value, "Modification should not affect original data" + assert rgrid1[0] == 999.0, "Modified array should retain modification" + + +def test_multiple_array_accesses(): + """Test that multiple accesses return independent copies.""" + chi = nao.NumericalRadial() + + sz = 50 + dr = 0.2 + grid = np.array([i * dr for i in range(sz)], dtype=np.float64) + values = np.exp(-grid) + + chi.build( + l=1, + for_r_space=True, + ngrid=sz, + grid=grid, + value=values + ) + + # Get multiple arrays + arrays = [chi.rgrid for _ in range(5)] + + # Modify each differently + for i, arr in enumerate(arrays): + arr[0] = float(i) + + # Verify each has its own modification + for i, arr in enumerate(arrays): + assert arr[0] == float(i), f"Array {i} should have value {i}" + + +def test_radial_collection_array_lifetime(): + """Test array lifetime for RadialCollection objects.""" + orb_dir = '../../../tests/PP_ORB/' + file_list = [orb_dir + "C_gga_8au_100Ry_2s2p1d.orb"] + + try: + orb = nao.RadialCollection() + orb.build(1, file_list, 'o') + + # Get a NumericalRadial from the collection + nr = orb(0, 0, 0) + + # Get arrays from it + rgrid = nr.rgrid + rvalue = nr.rvalue + + # Save copies + rgrid_copy = rgrid.copy() + rvalue_copy = rvalue.copy() + + # Delete the collection (which owns the NumericalRadial) + del orb + + # Arrays should still be valid + np.testing.assert_array_equal(rgrid, rgrid_copy) + np.testing.assert_array_equal(rvalue, rvalue_copy) + except (FileNotFoundError, RuntimeError): + pytest.skip("Orbital files not available for testing") + + +def test_empty_array_handling(): + """Test handling of arrays when k-space is not initialized.""" + chi = nao.NumericalRadial() + + sz = 50 + dr = 0.2 + grid = np.array([i * dr for i in range(sz)], dtype=np.float64) + values = np.exp(-grid) + + chi.build( + l=0, + for_r_space=True, + ngrid=sz, + grid=grid, + value=values, + init_sbt=False # Don't initialize SBT, so k-space won't be set + ) + + # r-space should be valid + assert chi.nr == sz + rgrid = chi.rgrid + assert len(rgrid) == sz + + # k-space should be empty (nk == 0) + assert chi.nk == 0 + kgrid = chi.kgrid + assert len(kgrid) == 0 diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index a4eaf0b197..6f127a1722 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -43,6 +43,7 @@ list(APPEND device_srcs # source_psi/kernels/device.cpp source_base/module_device/device.cpp + source_base/module_device/device_helpers.cpp source_base/module_device/output_device.cpp source_base/module_device/memory_op.cpp source_base/kernels/math_kernel_op.cpp @@ -81,6 +82,7 @@ if(USE_CUDA) source_pw/module_pwdft/kernels/cuda/stress_op.cu source_pw/module_pwdft/kernels/cuda/wf_op.cu source_pw/module_pwdft/kernels/cuda/vnl_op.cu + source_base/module_device/cuda_compat.cpp source_base/kernels/cuda/math_ylm_op.cu source_base/kernels/cuda/math_kernel_op.cu source_base/kernels/cuda/math_kernel_op_vec.cu diff --git a/source/Makefile b/source/Makefile index 6d072ef714..5cc3ce9907 100644 --- a/source/Makefile +++ b/source/Makefile @@ -1,10 +1,17 @@ # This is the Makefile of ABACUS -include Makefile.vars +ABACUS_ROOT := $(dir $(firstword $(MAKEFILE_LIST))) + +BUILD_DIR ?= build +OBJ_DIR = $(BUILD_DIR)/obj +BIN_DIR = $(BUILD_DIR)/bin +BUILD_INFO_DIR = $(BUILD_DIR)/source_io + +include $(ABACUS_ROOT)Makefile.vars + #========================== # Compiler information #========================== - -INCLUDES = -I. -Isource_main -Isource_main/commands -Icommands -I../ -Isource_base/module_container +INCLUDES = -I$(ABACUS_ROOT) -I$(ABACUS_ROOT)source_main -I$(ABACUS_ROOT)source_main/commands -I$(ABACUS_ROOT)commands -I$(BUILD_INFO_DIR) -I$(ABACUS_ROOT)../ -I$(ABACUS_ROOT)source_base/module_container LIBS = -lm -lpthread OPTS = -std=c++14 -pedantic -m64 ${INCLUDES} @@ -21,9 +28,8 @@ ifeq ($(OPENMP), ON) else ELPA_NAME = elpa endif -OBJ_DIR = obj -BIN_DIR = ../bin -SOURCE_DIR = . + +SOURCE_DIR = $(ABACUS_ROOT) ifeq ($(findstring mpi, $(CXX)), mpi) # We do not support EXX in sequential version temporarily. HONG += -D__MPI -DUSE_CEREAL_SERIALIZATION @@ -186,7 +192,9 @@ ifdef PEXSI_DIR HONG += -D__PEXSI endif -include Makefile.Objects +include $(ABACUS_ROOT)Makefile.Objects +VPATH := $(patsubst ./%,$(ABACUS_ROOT)%,$(VPATH)) +HEADERS := $(patsubst %,$(ABACUS_ROOT)%,$(HEADERS)) #========================== # Optional HONG @@ -208,6 +216,44 @@ endif FP_OBJS=$(patsubst %.o, ${OBJ_DIR}/%.o, ${OBJS_ABACUS}) +###### START of ABACUS INFO PART ###### + +# Rule to generate the build_info.h file using the shell script. +# This rule is executed whenever build_info.h.in, the script, or any of the +# relevant Makefile variables change. +$(BUILD_INFO_DIR)/build_info.h:$(ABACUS_ROOT)source_io/build_info.h.in $(ABACUS_ROOT)../generate_build_info.sh + @echo "Generating build information header..." + @# Make sure directory is available + @mkdir -p $(dir $@) + @# Export all necessary Makefile variables as environment for the script + @export BUILD_TYPE="Release"; \ + if [ "$(DEBUG)" = "ON" ]; then export BUILD_TYPE="Debug"; export ENABLE_ASAN="yes"; else export ENABLE_ASAN="no"; fi; \ + export CXX="${CXX}"; \ + export CXXFLAGS="${OPTS} ${HONG}"; \ + export MKLROOT="${MKLROOT}"; \ + export ELPA_DIR="${ELPA_DIR}"; \ + export FFTW_DIR="${FFTW_DIR}"; \ + export CEREAL_DIR="${CEREAL_DIR}"; \ + export LIBXC_DIR="${LIBXC_DIR}"; \ + export LIBRI_DIR="${LIBRI_DIR}"; \ + export DeePMD_DIR="${DeePMD_DIR}"; \ + export TensorFlow_DIR="${TensorFlow_DIR}"; \ + export PEXSI_DIR="${PEXSI_DIR}"; \ + export ENABLE_MPI="no"; \ + if [ "$(MPI)" = "ON" ]; then export ENABLE_MPI="ON"; fi; \ + export USE_CUDA="no"; \ + if [ "$(GPU)" = "CUDA" ]; then export USE_CUDA="ON"; fi; \ + $(ABACUS_ROOT)../generate_build_info.sh $@ + @echo "Build information header generated." + + # Specific rule for parse_args.o to enforce dependency on build_info.h. + # This overrides the generic %.o:%.cpp rule for this specific file. +${OBJ_DIR}/parse_args.o: $(ABACUS_ROOT)source_io/parse_args.cpp $(BUILD_INFO_DIR)/build_info.h + @mkdir -p $(dir $@) + ${CXX} ${OPTS} ${OPTS_MPI} -c ${HONG} $< -o $@ + +###### END of ABACUS INFO PART ###### + #========================== # MAKING OPTIONS #========================== @@ -218,25 +264,26 @@ abacus: test: @ $(MAKE) abacus - @ cd ../tests/integrate/;sh Autotest.sh -a ../../../bin/ABACUS.mpi -n $(TESTNP) + @ cd $(ABACUS_ROOT)../tests/integrate/;sh Autotest.sh -a $(realpath $(BIN_DIR))/ABACUS.mpi -n $(TESTNP) pw $(BIN_DIR)/${VERSION}-PW.x: @ if [ ! -d $(BIN_DIR) ]; then mkdir $(BIN_DIR); fi - @ cd source_pw/module_pwdft; $(MAKE) CXX=${CXX} GPU=${GPU} DEBUG=$(DEBUG) FFTW_DIR=$(FFTW_DIR) OPENBLAS_LIB_DIR=$(OPENBLAS_LIB_DIR) ${PWTAG} - @ cp source_pw/module_pwdft/${VERSION}-PW.x $(BIN_DIR)/${VERSION}-PW.x + @ cd $(ABACUS_ROOT)source_pw/module_pwdft; $(MAKE) CXX=${CXX} GPU=${GPU} DEBUG=$(DEBUG) FFTW_DIR=$(FFTW_DIR) OPENBLAS_LIB_DIR=$(OPENBLAS_LIB_DIR) ${PWTAG} + @ cp $(ABACUS_ROOT)source_pw/module_pwdft/${VERSION}-PW.x $(realpath $(BIN_DIR))/${VERSION}-PW.x $(BIN_DIR)/${VERSION}.$(suffix) : ${FP_OBJS} ${PDIAG_OBJS} ${HEADERS} + @mkdir -p $(dir $@) ${CXX} ${OPTS} ${OPTS_MPI} $(FP_OBJS) ${PDIAG_OBJS} ${LIBS} -o $(BIN_DIR)/${VERSION}.$(suffix) - #========================== # rules #========================== -${OBJ_DIR}/%.o:%.cpp +# Note: The specific rule for parse_args.o above is more precise. +# This generic rule will apply to all other .cpp files. +${OBJ_DIR}/%.o:$(realpath $(BIN_DIR))%.cpp ${CXX} ${OPTS} ${OPTS_MPI} -c ${HONG} $< -o $@ .PHONY:clean test clean: - @ if [ -d $(OBJ_DIR) ]; then rm -rf $(OBJ_DIR); fi - @ if [ -d $(BIN_DIR) ]; then rm -rf $(BIN_DIR); fi - @ cd source_pw/module_pwdft; make clean + @ echo "Cleaning build directory: $(BUILD_DIR)" + @ rm -rf $(BUILD_DIR) diff --git a/source/Makefile.Objects b/source/Makefile.Objects index 8353a0f754..5ddb14485a 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -50,7 +50,6 @@ VPATH=./src_global:\ ./source_pw/module_pwdft:\ ./source_pw/module_ofdft:\ ./source_pw/module_stodft:\ -./source_pw/module_pwdft/operator_pw:\ ./source_pw/module_pwdft/kernels:\ ./source_pw/module_pwdft/module_exx_helper:\ ./source_pw/module_stodft/kernels:\ @@ -168,8 +167,8 @@ OBJS_BASE=abfs-vector3_order.o\ ylm.o\ opt_CG.o\ opt_DCsrch.o\ - cubic_spline.o\ - spherical_bessel_transformer.o\ + cubic_spline.o\ + spherical_bessel_transformer.o\ mixing_data.o\ mixing.o\ plain_mixing.o\ @@ -177,6 +176,7 @@ OBJS_BASE=abfs-vector3_order.o\ broyden_mixing.o\ memory_op.o\ device.o\ + device_helpers.o\ output_device.o\ parallel_2d.o\ @@ -191,6 +191,7 @@ OBJS_CELL=atom_pseudo.o\ read_pp_vwr.o\ unitcell.o\ read_atoms.o\ + read_atoms_helper.o\ print_cell.o\ setup_nonlocal.o\ klist.o\ @@ -228,18 +229,17 @@ OBJS_ELECSTAT=elecstate.o\ elecstate_energy.o\ elecstate_exx.o\ elecstate_print.o\ + elecstate_tools.o\ elecstate_pw.o\ elecstate_pw_sdft.o\ elecstate_pw_cal_tau.o\ elecstate_op.o\ - elecstate_tools.o\ efield.o\ gatefield.o\ potential_new.o\ potential_types.o\ pot_sep.o\ pot_local.o\ - pot_local_paw.o\ H_Hartree_pw.o\ H_TDDFT_pw.o\ pot_xc.o\ @@ -252,8 +252,7 @@ OBJS_ELECSTAT=elecstate.o\ update_pot.o\ OBJS_ELECSTAT_LCAO=elecstate_lcao.o\ - elecstate_lcao_cal_tau.o\ - setup_dm.o\ + init_dm.o\ density_matrix.o\ density_matrix_io.o\ cal_dm_psi.o\ @@ -309,20 +308,21 @@ OBJS_GINT=batch_biggrid.o\ OBJS_HAMILT=hamilt_pw.o\ hamilt_sdft_pw.o\ operator.o\ - operator_pw.o\ - op_exx_pw.o\ - ekinetic_pw.o\ + op_pw.o\ + op_pw_exx.o\ + op_pw_ekin.o\ ekinetic_op.o\ - exx_pw_ace.o\ - exx_pw_pot.o\ + op_pw_exx_ace.o\ + op_pw_exx_pot.o\ hpsi_norm_op.o\ - veff_pw.o\ + op_pw_veff.o\ veff_op.o\ - nonlocal_pw.o\ + op_pw_nl.o\ nonlocal_op.o\ - meta_pw.o\ + op_pw_meta.o\ meta_op.o\ - velocity_pw.o\ + op_pw_vel.o\ + op_pw_proj.o\ radial_proj.o\ exx_helper.o\ vec_mul_vec_complex_op.o\ @@ -340,9 +340,9 @@ OBJS_HAMILT_OF=kedf_tf.o\ OBJS_HAMILT_LCAO=hamilt_lcao.o\ operator_lcao.o\ - ekinetic_new.o\ - nonlocal_new.o\ - overlap_new.o\ + ekinetic.o\ + nonlocal.o\ + overlap.o\ td_ekinetic_lcao.o\ td_nonlocal_lcao.o\ td_pot_hybrid.o\ @@ -358,6 +358,7 @@ OBJS_HCONTAINER=base_matrix.o\ atom_pair.o\ hcontainer.o\ output_hcontainer.o\ + read_hcontainer.o\ func_folding.o\ func_transfer.o\ transfer.o\ @@ -417,29 +418,29 @@ OBJS_ORBITAL=ORB_atomic.o\ ORB_nonlocal_lm.o\ ORB_read.o\ parallel_orbitals.o\ - atomic_radials.o\ + atomic_radials.o\ hydrogen_radials.o\ pswfc_radials.o\ - beta_radials.o\ - sphbes_radials.o\ - numerical_radial.o\ - radial_collection.o\ - radial_set.o\ - real_gaunt_table.o\ - two_center_bundle.o\ - two_center_integrator.o\ - two_center_table.o\ + beta_radials.o\ + sphbes_radials.o\ + numerical_radial.o\ + radial_collection.o\ + radial_set.o\ + real_gaunt_table.o\ + two_center_bundle.o\ + two_center_integrator.o\ + two_center_table.o\ projgen.o\ OBJS_PSI=psi.o\ OBJS_PSI_INITIALIZER=psi_initializer.o\ - psi_initializer_random.o\ - psi_initializer_file.o\ - psi_initializer_atomic.o\ - psi_initializer_atomic_random.o\ - psi_initializer_nao.o\ - psi_initializer_nao_random.o\ + psi_init_random.o\ + psi_init_file.o\ + psi_init_atomic.o\ + psi_init_atomic_random.o\ + psi_init_nao.o\ + psi_init_nao_random.o\ OBJS_PW=fft_bundle.o\ fft_cpu.o\ @@ -511,22 +512,23 @@ OBJS_XC=xc_functional.o\ xc_funct_exch_gga.o\ xc_funct_corr_gga.o\ xc_funct_hcth.o\ + exx_info.o\ -OBJS_IO=input_conv.o\ - berryphase.o\ - bessel_basis.o\ +OBJS_IO=module_parameter/input_conv.o\ + module_unk/berryphase.o\ + module_bessel/bessel_basis.o\ cal_test.o\ - write_dos_pw.o\ + module_dos/write_dos_pw.o\ nscf_fermi_surf.o\ write_bands.o\ - cal_dos.o\ - cal_pdos_gamma.o\ - cal_pdos_multik.o\ - cal_ldos.o\ + module_dos/cal_dos.o\ + module_dos/cal_pdos_gamma.o\ + module_dos/cal_pdos_multik.o\ + module_dos/cal_ldos.o\ cif_io.o\ - numerical_descriptor.o\ - numerical_basis.o\ - numerical_basis_jyjy.o\ + module_bessel/numerical_descriptor.o\ + module_bessel/numerical_basis.o\ + module_bessel/numerical_basis_jyjy.o\ output.o\ print_info.o\ read_cube.o\ @@ -536,15 +538,15 @@ OBJS_IO=input_conv.o\ read_wf2rho_pw.o\ restart.o\ binstream.o\ - to_wannier90.o\ - to_qo_kernel.o\ - to_qo_mpi.o\ - to_qo_structures.o\ - to_wannier90_pw.o\ - to_wannier90_lcao_in_pw.o\ - to_wannier90_lcao.o\ + module_wannier/to_wannier90.o\ + module_qo/to_qo_kernel.o\ + module_qo/to_qo_mpi.o\ + module_qo/to_qo_structures.o\ + module_wannier/to_wannier90_pw.o\ + module_wannier/to_wannier90_lcao_in_pw.o\ + module_wannier/to_wannier90_lcao.o\ fR_overlap.o\ - unk_overlap_pw.o\ + module_unk/unk_overlap_pw.o\ write_pao.o\ write_wfc_pw.o\ write_cube.o\ @@ -553,14 +555,16 @@ OBJS_IO=input_conv.o\ write_dipole.o\ write_init.o\ td_current_io.o\ + td_current_io_comm.o\ write_libxc_r.o\ output_log.o\ output_mat_sparse.o\ - ctrl_scf_lcao.o\ - ctrl_runner_lcao.o\ - ctrl_iter_lcao.o\ - ctrl_output_fp.o\ - ctrl_output_pw.o\ + module_ctrl/ctrl_scf_lcao.o\ + module_ctrl/ctrl_runner_lcao.o\ + module_ctrl/ctrl_iter_lcao.o\ + module_ctrl/ctrl_output_fp.o\ + module_ctrl/ctrl_output_pw.o\ + module_ctrl/ctrl_output_td.o\ para_json.o\ abacusjson.o\ general_info.o\ @@ -568,21 +572,21 @@ OBJS_IO=input_conv.o\ readin_info.o\ output_info.o\ parse_args.o\ - read_input.o\ - read_input_item_system.o\ - read_input_item_elec_stru.o\ - read_input_item_relax.o\ - read_input_item_md.o\ - read_input_item_ofdft.o\ - read_input_item_sdft.o\ - read_input_item_tddft.o\ - read_input_item_deepks.o\ - read_input_item_model.o\ - read_input_item_postprocess.o\ - read_input_item_exx_dftu.o\ - read_input_item_other.o\ - read_input_item_output.o\ - read_set_globalv.o\ + module_parameter/read_input.o\ + module_parameter/read_input_item_system.o\ + module_parameter/read_input_item_elec_stru.o\ + module_parameter/read_input_item_relax.o\ + module_parameter/read_input_item_md.o\ + module_parameter/read_input_item_ofdft.o\ + module_parameter/read_input_item_sdft.o\ + module_parameter/read_input_item_tddft.o\ + module_parameter/read_input_item_deepks.o\ + module_parameter/read_input_item_model.o\ + module_parameter/read_input_item_postprocess.o\ + module_parameter/read_input_item_exx_dftu.o\ + module_parameter/read_input_item_other.o\ + module_parameter/read_input_item_output.o\ + module_parameter/read_set_globalv.o\ orb_io.o\ cal_pLpR.o\ filename.o\ @@ -594,19 +598,19 @@ OBJS_IO_LCAO=cal_r_overlap_R.o\ write_eig_occ.o\ get_pchg_lcao.o\ get_wf_lcao.o\ - write_dmk.o\ - unk_overlap_lcao.o\ + module_dm/write_dmk.o\ + module_unk/unk_overlap_lcao.o\ read_wfc_nao.o\ write_wfc_nao.o\ - write_HS_sparse.o\ + module_hs/write_HS_sparse.o\ single_R_io.o\ - write_HS_R.o\ - write_dmr.o\ + module_hs/write_HS_R.o\ + module_dm/write_dmr.o\ sparse_matrix.o\ - output_mulliken.o\ - output_sk.o\ - output_dmk.o\ - io_npz.o\ + module_mulliken/output_mulliken.o\ + module_mulliken/output_sk.o\ + module_mulliken/output_dmk.o\ + module_ml/io_npz.o\ OBJS_LCAO=evolve_elec.o\ evolve_psi.o\ @@ -622,10 +626,11 @@ OBJS_LCAO=evolve_elec.o\ velocity_op.o\ snap_psibeta_half_tddft.o\ solve_propagation.o\ + boundary_fix.o\ upsi.o\ FORCE_STRESS.o\ - FORCE_gamma.o\ - FORCE_k.o\ + FORCE_gamma.o\ + FORCE_k.o\ stress_tools.o\ edm.o\ pulay_fs_center2.o\ @@ -634,6 +639,7 @@ OBJS_LCAO=evolve_elec.o\ spar_hsr.o\ spar_st.o\ spar_u.o\ + LCAO_set.o\ LCAO_set_fs.o\ LCAO_set_st.o\ LCAO_nl_mu.o\ @@ -643,6 +649,8 @@ OBJS_LCAO=evolve_elec.o\ LCAO_init_basis.o\ setup_exx.o\ setup_deepks.o\ + setup_dm.o\ + rho_tau_lcao.o\ center2_orb.o\ center2_orb-orb11.o\ center2_orb-orb21.o\ @@ -678,9 +686,9 @@ OBJS_PARALLEL=parallel_common.o\ OBJS_SRCPW=H_Ewald_pw.o\ dnrm2.o\ - VL_in_pw.o\ - VNL_in_pw.o\ - VNL_grad_pw.o\ + vl_pw.o\ + vnl_pw.o\ + vnl_pw_grad.o\ chgmixing.o\ charge.o\ charge_init.o\ @@ -710,7 +718,6 @@ OBJS_SRCPW=H_Ewald_pw.o\ onsite_op.o\ wf_op.o\ vnl_op.o\ - global.o\ magnetism.o\ occupy.o\ structure_factor.o\ @@ -722,31 +729,32 @@ OBJS_SRCPW=H_Ewald_pw.o\ sto_func.o\ sto_forces.o\ sto_stress_pw.o\ - stress_func_cc.o\ - stress_func_ewa.o\ - stress_func_exx.o\ - stress_func_gga.o\ - stress_func_mgga.o\ - stress_func_har.o\ - stress_func_kin.o\ - stress_func_loc.o\ - stress_func_nl.o\ - stress_func_us.o\ - stress_func_onsite.o\ + stress_cc.o\ + stress_ewa.o\ + stress_exx.o\ + stress_gga.o\ + stress_mgga.o\ + stress_har.o\ + stress_kin.o\ + stress_loc.o\ + stress_nl.o\ + stress_us.o\ + stress_onsite.o\ stress_pw.o\ of_stress_pw.o\ + of_print_info.o\ symmetry_rho.o\ symmetry_rhog.o\ setup_psi_pw.o\ setup_psi.o\ - psi_init.o\ + psi_prepare.o\ elecond.o\ sto_tool.o\ sto_elecond.o\ sto_dos.o\ onsite_projector.o\ onsite_proj_tools.o\ - VSep_in_pw.o + vsep_pw.o OBJS_VDW=vdw.o\ vdwd2_parameters.o\ diff --git a/source/source_base/gather_math_lib_info.cpp b/source/source_base/gather_math_lib_info.cpp index 825aaa3163..3cd89a94eb 100644 --- a/source/source_base/gather_math_lib_info.cpp +++ b/source/source_base/gather_math_lib_info.cpp @@ -60,7 +60,7 @@ void zhegvx_i(const int *itype, const int *il, const int *iu, const double *abstol, - const int *m, + int *m, double *w, std::complex *z, const int *ldz, diff --git a/source/source_base/global_file.cpp b/source/source_base/global_file.cpp index cd6c424fc7..ce3ce613c2 100644 --- a/source/source_base/global_file.cpp +++ b/source/source_base/global_file.cpp @@ -9,6 +9,9 @@ #include #endif #include +#include +#include +#include #include #include "global_function.h" #include "source_io/module_parameter/parameter.h" @@ -40,14 +43,15 @@ void ModuleBase::Global_File::make_dir_out( #endif int make_dir = 0; // mohan update 2011-05-03 - std::string command0 = "test -d " + PARAM.globalv.global_out_dir + " || mkdir " + PARAM.globalv.global_out_dir; + //std::string command0 = "test -d " + PARAM.globalv.global_out_dir + " || mkdir " + PARAM.globalv.global_out_dir; int times = 0; while(times 0) { int make_dir_deepks_elec = 0; - std::string command1 = "test -d " + PARAM.globalv.global_deepks_label_elec_dir + " || mkdir " + PARAM.globalv.global_deepks_label_elec_dir; + //std::string command1 = "test -d " + PARAM.globalv.global_deepks_label_elec_dir + " || mkdir " + PARAM.globalv.global_deepks_label_elec_dir; times = 0; while(times #include #include +#include +#include +#include +#include + namespace ModuleBase { namespace GlobalFunc @@ -61,20 +66,14 @@ void OUT(std::ofstream &ofs, const std::string &name) void MAKE_DIR(const std::string &fn) { // ModuleBase::TITLE("global_function","MAKE_DIR"); - #ifndef __SW if (GlobalV::MY_RANK == 0) { - std::stringstream ss; - ss << " test -d " << fn << " || mkdir " << fn; - //---------------------------------------------------------- - // EXPLAIN : 'system' function return '0' if success - //---------------------------------------------------------- - if (system(ss.str().c_str())) + int ret = mkdir(fn.c_str(), 0755); + if (ret != 0 && errno != EEXIST) { ModuleBase::WARNING_QUIT("MAKE_DIR", fn); } } - #endif return; } diff --git a/source/source_base/global_function.h b/source/source_base/global_function.h index 7981fb79bd..3d6f1e35be 100644 --- a/source/source_base/global_function.h +++ b/source/source_base/global_function.h @@ -182,17 +182,17 @@ inline void DCOPY(const T* a, T* b, const int& dim) { } template -inline void COPYARRAY(const T* a, T* b, const long dim); +inline void COPYARRAY(const T* a, T* b, const int dim); template <> -inline void COPYARRAY(const std::complex* a, std::complex* b, const long dim) +inline void COPYARRAY(const std::complex* a, std::complex* b, const int dim) { const int one = 1; zcopy_(&dim, a, &one, b, &one); } template <> -inline void COPYARRAY(const double* a, double* b, const long dim) +inline void COPYARRAY(const double* a, double* b, const int dim) { const int one = 1; dcopy_(&dim, a, &one, b, &one); diff --git a/source/source_base/kernels/cuda/math_kernel_op.cu b/source/source_base/kernels/cuda/math_kernel_op.cu index 562760ca7a..c5b0648c49 100644 --- a/source/source_base/kernels/cuda/math_kernel_op.cu +++ b/source/source_base/kernels/cuda/math_kernel_op.cu @@ -2,6 +2,7 @@ #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" #include "source_base/tool_quit.h" +#include "source_base/module_container/base/third_party/cublas.h" #include #include @@ -27,22 +28,22 @@ struct GetTypeThrust> { static cublasHandle_t cublas_handle = nullptr; void xdot_wrapper(const int &n, const float * x, const int &incx, const float * y, const int &incy, float &result) { - cublasErrcheck(cublasSdot(cublas_handle, n, x, incx, y, incy, &result)); + CHECK_CUBLAS(cublasSdot(cublas_handle, n, x, incx, y, incy, &result)); } void xdot_wrapper(const int &n, const double * x, const int &incx, const double * y, const int &incy, double &result) { - cublasErrcheck(cublasDdot(cublas_handle, n, x, incx, y, incy, &result)); + CHECK_CUBLAS(cublasDdot(cublas_handle, n, x, incx, y, incy, &result)); } void createGpuBlasHandle(){ if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); + CHECK_CUBLAS(cublasCreate(&cublas_handle)); } } void destoryBLAShandle(){ if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); + CHECK_CUBLAS(cublasDestroy(cublas_handle)); cublas_handle = nullptr; } } @@ -58,7 +59,7 @@ void scal_op::operator()(const int& N, std::complex* X, const int& incx) { - cublasErrcheck(cublasCscal(cublas_handle, N, (float2*)alpha, (float2*)X, incx)); + CHECK_CUBLAS(cublasCscal(cublas_handle, N, (float2*)alpha, (float2*)X, incx)); } template <> @@ -67,7 +68,7 @@ void scal_op::operator()(const int& N, std::complex* X, const int& incx) { - cublasErrcheck(cublasZscal(cublas_handle, N, (double2*)alpha, (double2*)X, incx)); + CHECK_CUBLAS(cublasZscal(cublas_handle, N, (double2*)alpha, (double2*)X, incx)); } template <> @@ -78,7 +79,7 @@ void axpy_op::operator()(const int& N, double* Y, const int& incY) { - cublasErrcheck(cublasDaxpy(cublas_handle, N, alpha, X, incX, Y, incY)); + CHECK_CUBLAS(cublasDaxpy(cublas_handle, N, alpha, X, incX, Y, incY)); } template <> @@ -89,7 +90,7 @@ void axpy_op, base_device::DEVICE_GPU>::operator()(const int std::complex* Y, const int& incY) { - cublasErrcheck(cublasCaxpy(cublas_handle, N, (float2*)alpha, (float2*)X, incX, (float2*)Y, incY)); + CHECK_CUBLAS(cublasCaxpy(cublas_handle, N, (float2*)alpha, (float2*)X, incX, (float2*)Y, incY)); } template <> @@ -100,7 +101,7 @@ void axpy_op, base_device::DEVICE_GPU>::operator()(const in std::complex* Y, const int& incY) { - cublasErrcheck(cublasZaxpy(cublas_handle, N, (double2*)alpha, (double2*)X, incX, (double2*)Y, incY)); + CHECK_CUBLAS(cublasZaxpy(cublas_handle, N, (double2*)alpha, (double2*)X, incX, (double2*)Y, incY)); } @@ -175,9 +176,28 @@ void gemv_op::operator()(const char& trans, const int& incy) { cublasOperation_t cutrans = judge_trans_op(false, trans, "gemv_op"); - cublasErrcheck(cublasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incx)); + CHECK_CUBLAS(cublasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incy)); } +template <> +void gemv_op::operator()(const char& trans, + const int& m, + const int& n, + const float* alpha, + const float* A, + const int& lda, + const float* X, + const int& incx, + const float* beta, + float* Y, + const int& incy) +{ + cublasOperation_t cutrans = judge_trans_op(false, trans, "gemv_op"); + CHECK_CUBLAS(cublasSgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incy)); +} + + + template <> void gemv_op, base_device::DEVICE_GPU>::operator()(const char& trans, const int& m, @@ -194,7 +214,7 @@ void gemv_op, base_device::DEVICE_GPU>::operator()(const cha cublasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); cuFloatComplex alpha = make_cuFloatComplex(alpha_in->real(), alpha_in->imag()); cuFloatComplex beta = make_cuFloatComplex(beta_in->real(), beta_in->imag()); - cublasErrcheck(cublasCgemv(cublas_handle, cutrans, m, n, &alpha, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta, (cuFloatComplex*)Y, incx)); + CHECK_CUBLAS(cublasCgemv(cublas_handle, cutrans, m, n, &alpha, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta, (cuFloatComplex*)Y, incy)); } template <> @@ -215,7 +235,7 @@ void gemv_op, base_device::DEVICE_GPU>::operator()(const ch cuDoubleComplex beta = make_cuDoubleComplex(beta_in->real(), beta_in->imag()); // icpc and nvcc have some compatible problems // We must use cuDoubleComplex instead of converting std::complex* to cuDoubleComplex* - cublasErrcheck(cublasZgemv(cublas_handle, cutrans, m, n, &alpha, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta, (cuDoubleComplex*)Y, incx)); + CHECK_CUBLAS(cublasZgemv(cublas_handle, cutrans, m, n, &alpha, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta, (cuDoubleComplex*)Y, incy)); } template <> @@ -235,7 +255,7 @@ void gemm_op::operator()(const char& transa, { cublasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); cublasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); + CHECK_CUBLAS(cublasSgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); } template <> @@ -255,7 +275,7 @@ void gemm_op::operator()(const char& transa, { cublasOperation_t cutransA = judge_trans_op(false, transa, "gemm_op"); cublasOperation_t cutransB = judge_trans_op(false, transb, "gemm_op"); - cublasErrcheck(cublasDgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); + CHECK_CUBLAS(cublasDgemm(cublas_handle, cutransA, cutransB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)); } template <> void gemm_op, base_device::DEVICE_GPU>::operator()(const char& transa, @@ -274,7 +294,7 @@ void gemm_op, base_device::DEVICE_GPU>::operator()(const cha { cublasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); cublasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(cublas_handle, cutransA, cutransB, m, n ,k, (float2*)alpha, (float2*)a , lda, (float2*)b, ldb, (float2*)beta, (float2*)c, ldc)); + CHECK_CUBLAS(cublasCgemm(cublas_handle, cutransA, cutransB, m, n ,k, (float2*)alpha, (float2*)a , lda, (float2*)b, ldb, (float2*)beta, (float2*)c, ldc)); } template <> @@ -294,7 +314,7 @@ void gemm_op, base_device::DEVICE_GPU>::operator()(const ch { cublasOperation_t cutransA = judge_trans_op(true, transa, "gemm_op"); cublasOperation_t cutransB = judge_trans_op(true, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(cublas_handle, cutransA, cutransB, m, n ,k, (double2*)alpha, (double2*)a , lda, (double2*)b, ldb, (double2*)beta, (double2*)c, ldc)); + CHECK_CUBLAS(cublasZgemm(cublas_handle, cutransA, cutransB, m, n ,k, (double2*)alpha, (double2*)a , lda, (double2*)b, ldb, (double2*)beta, (double2*)c, ldc)); } template <> @@ -311,7 +331,7 @@ void matrixTranspose_op::operator()(const int& double ONE = 1.0, ZERO = 0.0; // use 'geam' API todo transpose. - cublasErrcheck(cublasDgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, input_matrix, col, &ZERO, input_matrix, col, device_temp, col)); + CHECK_CUBLAS(cublasDgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, input_matrix, col, &ZERO, input_matrix, col, device_temp, col)); } else { @@ -319,7 +339,7 @@ void matrixTranspose_op::operator()(const int& int block = (row + col + thread - 1) / thread; matrix_transpose_kernel <<>> (row, col, input_matrix, device_temp); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } base_device::memory::synchronize_memory_op()( @@ -348,7 +368,7 @@ void matrixTranspose_op, base_device::DEVICE_GPU>::operator( ZERO.x = ZERO.y = 0.0; // use 'geam' API todo transpose. - cublasErrcheck(cublasCgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, + CHECK_CUBLAS(cublasCgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, reinterpret_cast(&ONE), (float2*)input_matrix, col, reinterpret_cast(&ZERO), (float2*)input_matrix, col, (float2*)device_temp, col)); } else @@ -357,7 +377,7 @@ void matrixTranspose_op, base_device::DEVICE_GPU>::operator( int block = (row + col + thread - 1) / thread; matrix_transpose_kernel> <<>> (row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } base_device::memory::synchronize_memory_op, base_device::DEVICE_GPU, base_device::DEVICE_GPU>()( @@ -367,7 +387,7 @@ void matrixTranspose_op, base_device::DEVICE_GPU>::operator( base_device::memory::delete_memory_op, base_device::DEVICE_GPU>()(device_temp); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } @@ -389,13 +409,13 @@ void matrixTranspose_op, base_device::DEVICE_GPU>::operator ZERO.x = ZERO.y = 0.0; // use 'geam' API todo transpose. - cublasErrcheck(cublasZgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, (double2*)input_matrix, col, &ZERO, (double2*)input_matrix, col, (double2*)device_temp, col)); + CHECK_CUBLAS(cublasZgeam(cublas_handle, CUBLAS_OP_T, CUBLAS_OP_N, col, row, &ONE, (double2*)input_matrix, col, &ZERO, (double2*)input_matrix, col, (double2*)device_temp, col)); } else { int thread = 1024; int block = (row + col + thread - 1) / thread; matrix_transpose_kernel> <<>> (row, col, (thrust::complex*)input_matrix, (thrust::complex*)device_temp); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } base_device::memory::synchronize_memory_op, @@ -416,7 +436,7 @@ void matrixCopy::operator()(const int& n1, const dim3 blockSize(16, 16); const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); matrix_copy_kernel <<>> (n1, n2, A, LDA, B, LDB); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> void matrixCopy, base_device::DEVICE_GPU>::operator()(const int& n1, @@ -429,7 +449,7 @@ void matrixCopy, base_device::DEVICE_GPU>::operator()(const const dim3 blockSize(16, 16); const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); matrix_copy_kernel> <<>> (n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -443,7 +463,7 @@ void matrixCopy, base_device::DEVICE_GPU>::operator()(const const dim3 blockSize(16, 16); const dim3 gridSize((n1 + blockSize.x - 1) / blockSize.x, (n2 + blockSize.y - 1) / blockSize.y); matrix_copy_kernel> <<>> (n1, n2, reinterpret_cast*>(A), LDA, reinterpret_cast*>(B), LDB); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -453,7 +473,7 @@ void matrix_mul_vector_op::operator()(const int dim3 block((m + thread.x - 1) / thread.x, (n + thread.y - 1) / thread.y, 1); matrix_multiply_vector_kernel <<>>(m, n, a, lda, b, alpha, c, ldc); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -463,7 +483,7 @@ void matrix_mul_vector_op, base_device::DEVICE_GPU>::operato dim3 block((m + thread.x - 1) / thread.x, (n + thread.y - 1) / thread.y, 1); matrix_multiply_vector_kernel, float> <<>>(m, n, reinterpret_cast*>(a), lda, b, alpha, reinterpret_cast*>(c), ldc); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -474,7 +494,7 @@ void matrix_mul_vector_op, base_device::DEVICE_GPU>::operat dim3 block((m + thread.x - 1) / thread.x, (n + thread.y - 1) / thread.y, 1); matrix_multiply_vector_kernel, double> <<>>(m, n, reinterpret_cast*>(a), lda, b, alpha, reinterpret_cast*>(c), ldc); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } // Explicitly instantiate functors for the types of functor registered. diff --git a/source/source_base/kernels/cuda/math_kernel_op_vec.cu b/source/source_base/kernels/cuda/math_kernel_op_vec.cu index 577f503d8e..4cf756c579 100644 --- a/source/source_base/kernels/cuda/math_kernel_op_vec.cu +++ b/source/source_base/kernels/cuda/math_kernel_op_vec.cu @@ -105,7 +105,7 @@ void vector_mul_real_op::operator()(const int d int block = (dim + thread - 1) / thread; vector_mul_real_kernel<<>>(dim, result, vector, constant); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -121,7 +121,7 @@ inline void vector_mul_real_wrapper(const int dim, int block = (dim + thread - 1) / thread; vector_mul_real_kernel><<>>(dim, result_tmp, vector_tmp, constant); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> void vector_mul_real_op, base_device::DEVICE_GPU>::operator()(const int dim, @@ -152,7 +152,7 @@ void vector_div_constant_op::operator()(const i int block = (dim + thread - 1) / thread; vector_div_constant_kernel<<>>(dim, result, vector, constant); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -168,7 +168,7 @@ inline void vector_div_constant_wrapper(const int& dim, int block = (dim + thread - 1) / thread; vector_div_constant_kernel><<>>(dim, result_tmp, vector_tmp, constant); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -201,7 +201,7 @@ void vector_mul_vector_op::operator()(const int int block = (dim + thread - 1) / thread; vector_mul_vector_kernel<<>>(dim, result, vector1, vector2, add); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } // vector operator: result[i] = vector1[i](complex) * vector2[i](not complex) template @@ -217,7 +217,7 @@ inline void vector_mul_vector_complex_wrapper(const int& dim, int block = (dim + thread - 1) / thread; vector_mul_vector_kernel><<>>(dim, result_tmp, vector1_tmp, vector2, add); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> void vector_mul_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, @@ -250,7 +250,7 @@ void vector_div_vector_op::operator()(const int int block = (dim + thread - 1) / thread; vector_div_vector_kernel<<>>(dim, result, vector1, vector2); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } // vector operator: result[i] = vector1[i](complex) / vector2[i](not complex) template @@ -265,7 +265,7 @@ inline void vector_div_vector_complex_wrapper(const int& dim, int block = (dim + thread - 1) / thread; vector_div_vector_kernel><<>>(dim, result_tmp, vector1_tmp, vector2); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> void vector_div_vector_op, base_device::DEVICE_GPU>::operator()(const int& dim, @@ -306,7 +306,7 @@ void vector_add_vector_op::operator()(const int& dim constantvector_addORsub_constantVector_kernel <<>>(dim, result_tmp, vector1_tmp, constant1, vector2_tmp, constant2); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> diff --git a/source/source_base/kernels/cuda/math_ylm_op.cu b/source/source_base/kernels/cuda/math_ylm_op.cu index 559d8bfc2d..01b3676ff7 100644 --- a/source/source_base/kernels/cuda/math_ylm_op.cu +++ b/source/source_base/kernels/cuda/math_ylm_op.cu @@ -148,7 +148,7 @@ void cal_ylm_real_op::operator()(const base_dev p, ylm); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct cal_ylm_real_op; diff --git a/source/source_base/kernels/cuda/sph_harm_gpu.cuh b/source/source_base/kernels/cuda/sph_harm_gpu.cuh new file mode 100644 index 0000000000..d4fa5f5666 --- /dev/null +++ b/source/source_base/kernels/cuda/sph_harm_gpu.cuh @@ -0,0 +1,385 @@ +#pragma once + +#include "source_base/ylmcoef.h" + +namespace ModuleBase { + +/// Spherical harmonics computation (table lookup method) +/// Directly uses constexpr ylmcoef, compiler auto-inlines +/// @param nwl Maximum angular momentum L (0 <= nwl <= 5) +/// @param x,y,z Direction vector (need not be normalized, normalization is done internally) +/// @param ylma Output array, size (nwl+1)^2 +__device__ static void sph_harm( + const int nwl, + const double x_in, + const double y_in, + const double z_in, + double* __restrict__ ylma) +{ + // Normalize the input direction vector + double r = sqrt(x_in * x_in + y_in * y_in + z_in * z_in); + double x, y, z; + if (r < 1e-10) + { + // At origin, default to z-axis direction + x = 0.0; + y = 0.0; + z = 1.0; + } + else + { + const double inv_r = 1.0 / r; + x = x_in * inv_r; + y = y_in * inv_r; + z = z_in * inv_r; + } + + /*************************** + L = 0 + ***************************/ + ylma[0] = ylmcoef[0]; // l=0, m=0 + double tmp0; + if (nwl == 0) + return; + + /*************************** + L = 1 + ***************************/ + ylma[1] = ylmcoef[1] * z; // l=1, m=0 + ylma[2] = -ylmcoef[1] * x; // l=1, m=1 + ylma[3] = -ylmcoef[1] * y; // l=1, m=-1 + if (nwl == 1) + return; + + /*************************** + L = 2 + ***************************/ + tmp0=ylmcoef[3] * ylma[0]; + ylma[4] = ylmcoef[2] * z * ylma[1] - tmp0 ; // l=2, m=0 + tmp0 = ylmcoef[4] * z; + ylma[5] = tmp0 * ylma[2]; // l=2,m=1 + ylma[6] = tmp0 * ylma[3]; // l=2,m=-1 + + tmp0 = ylmcoef[4] * x; + ylma[7] = ylmcoef[5] * ylma[4] - ylmcoef[6] * ylma[0] + - tmp0 * ylma[2]; // l=2,m=2 + ylma[8] = -tmp0 * ylma[3]; + if (nwl == 2) + return; + + /*************************** + L = 3 + ***************************/ + tmp0=ylmcoef[8] * ylma[1]; + ylma[9] = ylmcoef[7] * z * ylma[4] - tmp0; // l=3, m=0 + + tmp0 = ylmcoef[9] * z; + ylma[10] = tmp0 * ylma[5] - ylmcoef[10] * ylma[2]; // l=3,m=1 + ylma[11] = tmp0 * ylma[6] - ylmcoef[10] * ylma[3]; // l=3,m=-1 + + tmp0 = ylmcoef[11] * z; + ylma[12] = tmp0 * ylma[7]; // l=3,m=2 + ylma[13] = tmp0 * ylma[8]; // l=3,m=-2 + + tmp0 = ylmcoef[14] * x; + ylma[14] = ylmcoef[12] * ylma[10] - ylmcoef[13] * ylma[2] + - tmp0 * ylma[7]; // l=3,m=3 + ylma[15] = ylmcoef[12] * ylma[11] - ylmcoef[13] * ylma[3] + - tmp0 * ylma[8]; // l=3,m=-3 + if (nwl == 3) + return; + + /*************************** + L = 4 + ***************************/ + tmp0=ylmcoef[16] * ylma[4]; + ylma[16] = ylmcoef[15] * z * ylma[9] - tmp0; // l=4,m=0 + + tmp0 = ylmcoef[17] * z; + ylma[17] = tmp0 * ylma[10] - ylmcoef[18] * ylma[5]; // l=4,m=1 + ylma[18] = tmp0 * ylma[11] - ylmcoef[18] * ylma[6]; // l=4,m=-1 + + tmp0 = ylmcoef[19] * z; + ylma[19] = tmp0 * ylma[12] - ylmcoef[20] * ylma[7]; // l=4,m=2 + ylma[20] = tmp0 * ylma[13] - ylmcoef[20] * ylma[8]; // l=4,m=-2 + + tmp0 = 3.0 * z; + ylma[21] = tmp0 * ylma[14]; // l=4,m=3 + ylma[22] = tmp0 * ylma[15]; // l=4,m=-3 + + tmp0 = ylmcoef[23] * x; + ylma[23] = ylmcoef[21] * ylma[19] - ylmcoef[22] * ylma[7] + - tmp0 * ylma[14]; // l=4,m=4 + ylma[24] = ylmcoef[21] * ylma[20] - ylmcoef[22] * ylma[8] + - tmp0 * ylma[15]; // l=4,m=-4 + if (nwl == 4) + return; + + /*************************** + L = 5 + ***************************/ + tmp0=ylmcoef[25] * ylma[9]; + ylma[25] + = ylmcoef[24] * z * ylma[16] - tmp0; // l=5,m=0 + + tmp0 = ylmcoef[26] * z; + ylma[26] = tmp0 * ylma[17] - ylmcoef[27] * ylma[10]; // l=5,m=1 + ylma[27] = tmp0 * ylma[18] - ylmcoef[27] * ylma[11]; // l=5,m=-1 + + tmp0 = ylmcoef[28] * z; + ylma[28] = tmp0 * ylma[19] - ylmcoef[29] * ylma[12]; // l=5,m=2 + ylma[29] = tmp0 * ylma[20] - ylmcoef[29] * ylma[13]; // l=5,m=-2 + + tmp0 = ylmcoef[30] * z; + ylma[30] = tmp0 * ylma[21] - ylmcoef[31] * ylma[14]; // l=5,m=3 + ylma[31] = tmp0 * ylma[22] - ylmcoef[31] * ylma[15]; // l=5,m=-3 + + tmp0 = ylmcoef[32] * z; + ylma[32] = tmp0 * ylma[23]; // l=5,m=4 + ylma[33] = tmp0 * ylma[24]; // l=5,m=-4 + + tmp0 = ylmcoef[35] * x; + ylma[34] = ylmcoef[33] * ylma[30] - ylmcoef[34] * ylma[14] + - tmp0 * ylma[23]; // l=5,m=5 + ylma[35] = ylmcoef[33] * ylma[31] - ylmcoef[34] * ylma[15] + - tmp0 * ylma[24]; // l=5,m=-5 + if (nwl == 5) + return; +} + +/// Spherical harmonics and gradient computation +__device__ static void grad_rl_sph_harm( + const int nwl, + const double x, + const double y, + const double z, + double* __restrict__ rly, + double* __restrict__ grly) +{ + double r2 = x * x + y * y + z * z; + double tx = x * 2; + double ty = y * 2; + double tz = z * 2; + + //begin calculation + /*************************** + L = 0 + ***************************/ + rly[0] = ylmcoef[0]; //l=0, m=0 + grly[0] = grly[1] = grly[2] = 0.0; + if (nwl == 0) return; + + /*************************** + L = 1 + ***************************/ + rly[1] = ylmcoef[1]*z; //l=1, m=0 + grly[3] = grly[4] = 0.0; + grly[5] = ylmcoef[1]; + + rly[2] = -ylmcoef[1]*x; //l=1, m=1 + grly[7] = grly[8] = 0.0; + grly[6] = -ylmcoef[1]; + + rly[3] = -ylmcoef[1]*y; //l=1, m=-1 + grly[9] = grly[11] = 0.0; + grly[10] = -ylmcoef[1]; + + if (nwl == 1) return; + + /*************************** + L = 2 + ***************************/ + rly[4] = ylmcoef[2]*z*rly[1]-ylmcoef[3]*rly[0]*r2;//l=2, m=0 + grly[12] = ylmcoef[2]*z*grly[3]-ylmcoef[3]*(grly[0]*r2+rly[0]*tx);//l=2, m=0 + grly[13] = ylmcoef[2]*z*grly[4]-ylmcoef[3]*(grly[1]*r2+rly[0]*ty);//l=2, m=0 + grly[14] = ylmcoef[2]*(z*grly[5]+rly[1])-ylmcoef[3]*(grly[2]*r2+rly[0]*tz);//l=2, m=0 + + + double tmp0 = ylmcoef[4]*z; + rly[5] = tmp0*rly[2];//l=2,m=1 + grly[15] = tmp0*grly[6]; + grly[16] = tmp0*grly[7]; + grly[17] = ylmcoef[4]*(rly[2]+z*grly[8]); + + rly[6] = tmp0*rly[3];//l=2,m=-1 + grly[18] = tmp0*grly[9]; + grly[19] = tmp0*grly[10]; + grly[20] = ylmcoef[4]*(rly[3]+z*grly[11]); + + double tmp2 = ylmcoef[4]*x; + rly[7]= ylmcoef[5]*rly[4]-ylmcoef[6]*rly[0]*r2 - tmp2*rly[2];//l=2,m=2 + grly[21] = ylmcoef[5]*grly[12]-ylmcoef[6]*(rly[0]*tx+grly[0]*r2)-ylmcoef[4]*(x*grly[6]+rly[2]); + + grly[22] = ylmcoef[5]*grly[13]-ylmcoef[6]*(rly[0]*ty+grly[1]*r2)-tmp2*grly[7]; + grly[23] = ylmcoef[5]*grly[14]-ylmcoef[6]*(rly[0]*tz+grly[2]*r2)-tmp2*grly[8]; + + rly[8] = -tmp2*rly[3]; + grly[24] = -ylmcoef[4]*(rly[3]+x*grly[9]); + grly[25] = -tmp2*grly[10]; + grly[26] = -tmp2*grly[11]; + if (nwl == 2) return; + + /*************************** + L = 3 + ***************************/ + rly[9] = ylmcoef[7]*z*rly[4]-ylmcoef[8]*rly[1]*r2; //l=3, m=0 + grly[27] = ylmcoef[7]*z*grly[12]-ylmcoef[8]*(rly[1]*tx+grly[3]*r2); + grly[28] = ylmcoef[7]*z*grly[13]-ylmcoef[8]*(rly[1]*ty+grly[4]*r2); + grly[29] = ylmcoef[7]*(rly[4]+z*grly[14])-ylmcoef[8]*(rly[1]*tz+grly[5]*r2); + + double tmp3 = ylmcoef[9]*z; + rly[10] = tmp3*rly[5]-ylmcoef[10]*rly[2]*r2;//l=3,m=1 + grly[30] = tmp3*grly[15]-ylmcoef[10]*(grly[6]*r2+rly[2]*tx); + grly[31] = tmp3*grly[16]-ylmcoef[10]*(grly[7]*r2+rly[2]*ty); + grly[32] = ylmcoef[9]*(z*grly[17]+rly[5])-ylmcoef[10]*(grly[8]*r2+rly[2]*tz); + + rly[11] = tmp3*rly[6]-ylmcoef[10]*rly[3]*r2;//l=3,m=-1 + grly[33] = tmp3*grly[18]-ylmcoef[10]*(grly[9]*r2+rly[3]*tx); + grly[34] = tmp3*grly[19]-ylmcoef[10]*(grly[10]*r2+rly[3]*ty); + grly[35] = ylmcoef[9]*(z*grly[20]+rly[6])-ylmcoef[10]*(grly[11]*r2+rly[3]*tz); + + double tmp4 = ylmcoef[11]*z; + rly[12] = tmp4*rly[7];//l=3,m=2 + grly[36] = tmp4*grly[21]; + grly[37] = tmp4*grly[22]; + grly[38] = ylmcoef[11]*(z*grly[23]+rly[7]); + + rly[13] = tmp4*rly[8];//l=3,m=-2 + grly[39] = tmp4*grly[24]; + grly[40] = tmp4*grly[25]; + grly[41] = ylmcoef[11]*(z*grly[26]+rly[8]); + + double tmp5 = ylmcoef[14]*x; + rly[14] = ylmcoef[12]*rly[10]-ylmcoef[13]*rly[2]*r2-tmp5*rly[7];//l=3,m=3 + grly[42] = ylmcoef[12]*grly[30]-ylmcoef[13]*(rly[2]*tx+grly[6]*r2)-ylmcoef[14]*(rly[7]+x*grly[21]); + grly[43] = ylmcoef[12]*grly[31]-ylmcoef[13]*(rly[2]*ty+grly[7]*r2)-tmp5*grly[22]; + grly[44] = ylmcoef[12]*grly[32]-ylmcoef[13]*(rly[2]*tz+grly[8]*r2)-tmp5*grly[23]; + + rly[15] = ylmcoef[12]*rly[11]-ylmcoef[13]*rly[3]*r2-tmp5*rly[8];//l=3,m=-3 + grly[45] = ylmcoef[12]*grly[33]-ylmcoef[13]*(rly[3]*tx+grly[9]*r2)-ylmcoef[14]*(rly[8]+x*grly[24]); + grly[46] = ylmcoef[12]*grly[34]-ylmcoef[13]*(rly[3]*ty+grly[10]*r2)-tmp5*grly[25]; + grly[47] = ylmcoef[12]*grly[35]-ylmcoef[13]*(rly[3]*tz+grly[11]*r2)-tmp5*grly[26]; + if (nwl == 3) return; + + /*************************** + L = 4 + ***************************/ + rly[16] = ylmcoef[15]*z*rly[9]-ylmcoef[16]*rly[4]*r2;//l=4,m=0 + grly[48] = ylmcoef[15]*z*grly[27]-ylmcoef[16]*(rly[4]*tx+grly[12]*r2); + grly[49] = ylmcoef[15]*z*grly[28]-ylmcoef[16]*(rly[4]*ty+grly[13]*r2); + grly[50] = ylmcoef[15]*(z*grly[29]+rly[9])-ylmcoef[16]*(rly[4]*tz+grly[14]*r2); + + double tmp6 = ylmcoef[17]*z; + rly[17] = tmp6*rly[10]-ylmcoef[18]*rly[5]*r2;//l=4,m=1 + grly[51] = tmp6*grly[30]-ylmcoef[18]*(rly[5]*tx+grly[15]*r2); + grly[52] = tmp6*grly[31]-ylmcoef[18]*(rly[5]*ty+grly[16]*r2); + grly[53] = ylmcoef[17]*(z*grly[32]+rly[10])-ylmcoef[18]*(rly[5]*tz+grly[17]*r2); + + rly[18] = tmp6*rly[11]-ylmcoef[18]*rly[6]*r2;//l=4,m=-1 + grly[54] = tmp6*grly[33]-ylmcoef[18]*(rly[6]*tx+grly[18]*r2); + grly[55] = tmp6*grly[34]-ylmcoef[18]*(rly[6]*ty+grly[19]*r2); + grly[56] = ylmcoef[17]*(z*grly[35]+rly[11])-ylmcoef[18]*(rly[6]*tz+grly[20]*r2); + + double tmp7 = ylmcoef[19]*z; + rly[19] = tmp7*rly[12]-ylmcoef[20]*rly[7]*r2;//l=4,m=2 + grly[57] = tmp7*grly[36]-ylmcoef[20]*(rly[7]*tx+grly[21]*r2); + grly[58] = tmp7*grly[37]-ylmcoef[20]*(rly[7]*ty+grly[22]*r2); + grly[59] = ylmcoef[19]*(z*grly[38]+rly[12])-ylmcoef[20]*(rly[7]*tz+grly[23]*r2); + + rly[20] = tmp7*rly[13]-ylmcoef[20]*rly[8]*r2;//l=4,m=-2 + grly[60] = tmp7*grly[39]-ylmcoef[20]*(rly[8]*tx+grly[24]*r2); + grly[61] = tmp7*grly[40]-ylmcoef[20]*(rly[8]*ty+grly[25]*r2); + grly[62] = ylmcoef[19]*(z*grly[41]+rly[13])-ylmcoef[20]*(rly[8]*tz+grly[26]*r2); + + double tmp8 = 3.0*z; + rly[21] = tmp8*rly[14];//l=4,m=3 + grly[63] = tmp8*grly[42]; + grly[64] = tmp8*grly[43]; + grly[65] = 3.0*(z*grly[44]+rly[14]); + + + rly[22] = tmp8*rly[15];//l=4,m=-3 + grly[66] = tmp8*grly[45]; + grly[67] = tmp8*grly[46]; + grly[68] = 3.0*(z*grly[47]+rly[15]); + + double tmp9 = ylmcoef[23]*x; + rly[23] = ylmcoef[21]*rly[19]-ylmcoef[22]*rly[7]*r2-tmp9*rly[14];//l=4,m=4 + grly[69] = ylmcoef[21]*grly[57]-ylmcoef[22]*(rly[7]*tx+grly[21]*r2)-ylmcoef[23]*(x*grly[42]+rly[14]); + grly[70] = ylmcoef[21]*grly[58]-ylmcoef[22]*(rly[7]*ty+grly[22]*r2)-tmp9*grly[43]; + grly[71] = ylmcoef[21]*grly[59]-ylmcoef[22]*(rly[7]*tz+grly[23]*r2)-tmp9*grly[44]; + + rly[24] = ylmcoef[21]*rly[20]-ylmcoef[22]*rly[8]*r2-tmp9*rly[15];//l=4,m=-4 + grly[72] = ylmcoef[21]*grly[60]-ylmcoef[22]*(rly[8]*tx+grly[24]*r2)-ylmcoef[23]*(x*grly[45]+rly[15]); + grly[73] = ylmcoef[21]*grly[61]-ylmcoef[22]*(rly[8]*ty+grly[25]*r2)-tmp9*grly[46]; + grly[74] = ylmcoef[21]*grly[62]-ylmcoef[22]*(rly[8]*tz+grly[26]*r2)-tmp9*grly[47]; + + if (nwl == 4) return; + + /*************************** + L = 5 + ***************************/ + rly[25] = ylmcoef[24]*z*rly[16]-ylmcoef[25]*rly[9]*r2;//l=5,m=0 + grly[75] = ylmcoef[24]*z*grly[48]-ylmcoef[25]*(rly[9]*tx+grly[27]*r2); + grly[76] = ylmcoef[24]*z*grly[49]-ylmcoef[25]*(rly[9]*ty+grly[28]*r2); + grly[77] = ylmcoef[24]*(z*grly[50]+rly[16])-ylmcoef[25]*(rly[9]*tz+grly[29]*r2); + + double tmp10 = ylmcoef[26]*z; + rly[26] = tmp10*rly[17]-ylmcoef[27]*rly[10]*r2;//l=5,m=1 + grly[78] = tmp10*grly[51]-ylmcoef[27]*(rly[10]*tx+grly[30]*r2); + grly[79] = tmp10*grly[52]-ylmcoef[27]*(rly[10]*ty+grly[31]*r2); + grly[80] = ylmcoef[26]*(z*grly[53]+rly[17])-ylmcoef[27]*(rly[10]*tz+grly[32]*r2); + + rly[27] = tmp10*rly[18]-ylmcoef[27]*rly[11]*r2;//l=5,m=-1 + grly[81] = tmp10*grly[54]-ylmcoef[27]*(rly[11]*tx+grly[33]*r2); + grly[82] = tmp10*grly[55]-ylmcoef[27]*(rly[11]*ty+grly[34]*r2); + grly[83] = ylmcoef[26]*(z*grly[56]+rly[18])-ylmcoef[27]*(rly[11]*tz+grly[35]*r2); + + double tmp11 = ylmcoef[28]*z; + rly[28] = tmp11*rly[19]-ylmcoef[29]*rly[12]*r2;//l=5,m=2 + grly[84] = tmp11*grly[57]-ylmcoef[29]*(rly[12]*tx+grly[36]*r2); + grly[85] = tmp11*grly[58]-ylmcoef[29]*(rly[12]*ty+grly[37]*r2); + grly[86] = ylmcoef[28]*(z*grly[59]+rly[19])-ylmcoef[29]*(rly[12]*tz+grly[38]*r2); + + rly[29] = tmp11*rly[20]-ylmcoef[29]*rly[13]*r2;//l=5,m=-2 + grly[87] = tmp11*grly[60]-ylmcoef[29]*(rly[13]*tx+grly[39]*r2); + grly[88] = tmp11*grly[61]-ylmcoef[29]*(rly[13]*ty+grly[40]*r2); + grly[89] = ylmcoef[28]*(z*grly[62]+rly[20])-ylmcoef[29]*(rly[13]*tz+grly[41]*r2); + + double tmp12 = ylmcoef[30]*z; + rly[30] = tmp12*rly[21]-ylmcoef[31]*rly[14]*r2;//l=5,m=3 + grly[90] = tmp12*grly[63]-ylmcoef[31]*(grly[42]*r2+rly[14]*tx); + grly[91] = tmp12*grly[64]-ylmcoef[31]*(grly[43]*r2+rly[14]*ty); + grly[92] = ylmcoef[30]*(z*grly[65]+rly[21])-ylmcoef[31]*(grly[44]*r2+rly[14]*tz); + + rly[31] = tmp12*rly[22]-ylmcoef[31]*rly[15]*r2;//l=5,m=-3 + grly[93] = tmp12*grly[66]-ylmcoef[31]*(grly[45]*r2+rly[15]*tx); + grly[94] = tmp12*grly[67]-ylmcoef[31]*(grly[46]*r2+rly[15]*ty); + grly[95] = ylmcoef[30]*(z*grly[68]+rly[22])-ylmcoef[31]*(grly[47]*r2+rly[15]*tz); + + double tmp13 = ylmcoef[32]*z; + rly[32] = tmp13*rly[23];//l=5,m=4 + grly[96] = tmp13*grly[69]; + grly[97] = tmp13*grly[70]; + grly[98] = ylmcoef[32]*(rly[23]+z*grly[71]); + + rly[33] = tmp13*rly[24];//l=5,m=-4 + grly[99] = tmp13*grly[72]; + grly[100] = tmp13*grly[73]; + grly[101] = ylmcoef[32]*(rly[24]+z*grly[74]); + + double tmp14 = ylmcoef[35]*x; + rly[34] = ylmcoef[33]*rly[30]-ylmcoef[34]*rly[14]*r2-tmp14*rly[23];//l=5,m=5 + grly[102] = ylmcoef[33]*grly[90]-ylmcoef[34]*(rly[14]*tx+grly[42]*r2)-ylmcoef[35]*(x*grly[69]+rly[23]); + grly[103] = ylmcoef[33]*grly[91]-ylmcoef[34]*(rly[14]*ty+grly[43]*r2)-tmp14*grly[70]; + grly[104] = ylmcoef[33]*grly[92]-ylmcoef[34]*(rly[14]*tz+grly[44]*r2)-tmp14*grly[71]; + + rly[35] = ylmcoef[33]*rly[31]-ylmcoef[34]*rly[15]*r2-tmp14*rly[24];//l=5,m=-5 + grly[105] = ylmcoef[33]*grly[93]-ylmcoef[34]*(rly[15]*tx+grly[45]*r2)-ylmcoef[35]*(x*grly[72]+rly[24]); + grly[106] = ylmcoef[33]*grly[94]-ylmcoef[34]*(rly[15]*ty+grly[46]*r2)-tmp14*grly[73]; + grly[107] = ylmcoef[33]*grly[95]-ylmcoef[34]*(rly[15]*tz+grly[47]*r2)-tmp14*grly[74]; + + if (nwl == 5) return; +} + +} // namespace ModuleBase diff --git a/source/source_base/kernels/math_kernel_op.cpp b/source/source_base/kernels/math_kernel_op.cpp index 343d342e00..aa5d365319 100644 --- a/source/source_base/kernels/math_kernel_op.cpp +++ b/source/source_base/kernels/math_kernel_op.cpp @@ -81,7 +81,7 @@ struct matrixTranspose_op T* temp = nullptr; base_device::memory::resize_memory_op()(temp, row * col, "MTransOp"); #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int j = 0; j < col; j++) { @@ -91,7 +91,7 @@ struct matrixTranspose_op } } #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < row * col; i++) { @@ -107,7 +107,7 @@ struct matrixCopy void operator()(const int& n1, const int& n2, const T* A, const int& LDA, T* B, const int& LDB) { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int i = 0; i < n1; i++) { @@ -130,7 +130,7 @@ struct matrix_mul_vector_op { T *c, const int &ldc){ #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int j = 0; j < n; j++){ for (int i = 0; i < m; i++){ diff --git a/source/source_base/kernels/math_kernel_op_vec.cpp b/source/source_base/kernels/math_kernel_op_vec.cpp index 8353b82660..da3fdb8f06 100644 --- a/source/source_base/kernels/math_kernel_op_vec.cpp +++ b/source/source_base/kernels/math_kernel_op_vec.cpp @@ -24,7 +24,7 @@ struct vector_mul_real_op void operator()(const int dim, T* result, const T* vector, const Real constant) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -42,7 +42,7 @@ struct vector_mul_vector_op if (add) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -52,7 +52,7 @@ struct vector_mul_vector_op else { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -69,7 +69,7 @@ struct vector_div_constant_op void operator()(const int& dim, T* result, const T* vector, const Real constant) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -85,7 +85,7 @@ struct vector_div_vector_op void operator()(const int& dim, T* result, const T* vector1, const Real* vector2) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -121,7 +121,7 @@ struct vector_add_vector_op const Real constant2) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { diff --git a/source/source_base/kernels/rocm/math_kernel_op.hip.cu b/source/source_base/kernels/rocm/math_kernel_op.hip.cu index f60cdfc3b1..1b4f30d6b2 100644 --- a/source/source_base/kernels/rocm/math_kernel_op.hip.cu +++ b/source/source_base/kernels/rocm/math_kernel_op.hip.cu @@ -188,7 +188,7 @@ void gemv_op::operator()(const char& trans, const int& incy) { hipblasOperation_t cutrans = judge_trans_op(false, trans, "gemv_op"); - hipblasErrcheck(hipblasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incx)); + hipblasErrcheck(hipblasDgemv(cublas_handle, cutrans, m, n, alpha, A, lda, X, incx, beta, Y, incy)); } template <> @@ -205,7 +205,7 @@ void gemv_op, base_device::DEVICE_GPU>::operator()(const cha const int& incy) { hipblasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - hipblasErrcheck(hipblasCgemv(cublas_handle, cutrans, m, n, (hipblasComplex*)alpha, (hipblasComplex*)A, lda, (hipblasComplex*)X, incx, (hipblasComplex*)beta, (hipblasComplex*)Y, incx)); + hipblasErrcheck(hipblasCgemv(cublas_handle, cutrans, m, n, (hipblasComplex*)alpha, (hipblasComplex*)A, lda, (hipblasComplex*)X, incx, (hipblasComplex*)beta, (hipblasComplex*)Y, incy)); } template <> @@ -222,7 +222,7 @@ void gemv_op, base_device::DEVICE_GPU>::operator()(const ch const int& incy) { hipblasOperation_t cutrans = judge_trans_op(true, trans, "gemv_op"); - hipblasErrcheck(hipblasZgemv(cublas_handle, cutrans, m, n, (hipblasDoubleComplex*)alpha, (hipblasDoubleComplex*)A, lda, (hipblasDoubleComplex*)X, incx, (hipblasDoubleComplex*)beta, (hipblasDoubleComplex*)Y, incx)); + hipblasErrcheck(hipblasZgemv(cublas_handle, cutrans, m, n, (hipblasDoubleComplex*)alpha, (hipblasDoubleComplex*)A, lda, (hipblasDoubleComplex*)X, incx, (hipblasDoubleComplex*)beta, (hipblasDoubleComplex*)Y, incy)); } template <> diff --git a/source/source_base/math_chebyshev.cpp b/source/source_base/math_chebyshev.cpp index aaa0e82b74..8a84686ea5 100644 --- a/source/source_base/math_chebyshev.cpp +++ b/source/source_base/math_chebyshev.cpp @@ -417,7 +417,7 @@ void Chebyshev::calfinalvec_real( std::complex* arrayn = nullptr; std::complex* arrayn_1 = nullptr; assert(N >= 0 && LDA >= N); - int ndmxt; + int ndmxt = 0; if (m == 1) { ndmxt = N * m; @@ -486,7 +486,7 @@ void Chebyshev::calfinalvec_complex( std::complex* arrayn = nullptr; std::complex* arrayn_1 = nullptr; assert(N >= 0 && LDA >= N); - int ndmxt; + int ndmxt = 0; if (m == 1) { ndmxt = N * m; @@ -585,7 +585,7 @@ void Chebyshev::tracepolyA( std::complex* arrayn = nullptr; std::complex* arrayn_1 = nullptr; assert(N >= 0 && LDA >= N); - int ndmxt; + int ndmxt = 0; if (m == 1) { ndmxt = N * m; diff --git a/source/source_base/math_erf_complex.cpp b/source/source_base/math_erf_complex.cpp index 18709c4866..4c7385245a 100644 --- a/source/source_base/math_erf_complex.cpp +++ b/source/source_base/math_erf_complex.cpp @@ -106,7 +106,7 @@ std::complex ErrorFunc::scaled_w(std::complex z, double relerr) else if (x < 10) { double prod2ax = 1, prodm2ax = 1; - double expx2; + double expx2 = 0.0; if (std::isnan(y)) return std::complex(y, y); @@ -235,7 +235,7 @@ std::complex ErrorFunc::scaled_w(std::complex z, double relerr) sum3 = std::exp(-dx * dx) / (a2 * (n0 * n0) + y * y); sum5 = a * n0 * sum3; double exp1 = std::exp(4 * a * dx), exp1dn = 1; - int dn; + int dn = 0; for (dn = 1; n0 - dn > 0; ++dn) { // loop over n0-dn and n0+dn terms double np = n0 + dn, nm = n0 - dn; diff --git a/source/source_base/math_ylmreal.cpp b/source/source_base/math_ylmreal.cpp index 3a11f95438..e94b027bb3 100644 --- a/source/source_base/math_ylmreal.cpp +++ b/source/source_base/math_ylmreal.cpp @@ -179,7 +179,7 @@ void YlmReal::rlylm { int twok = 2 * ik; - double gamma; + double gamma = 0.0; double aux0, aux1, aux2, aux3; aux0 = pow(-1.0, ik) * pow(2.0, -il); diff --git a/source/source_base/memory.cpp b/source/source_base/memory.cpp index 4505bcdb71..7d7bd6bcc5 100644 --- a/source/source_base/memory.cpp +++ b/source/source_base/memory.cpp @@ -159,7 +159,7 @@ double Memory::record void Memory::record ( const std::string &name_in, - const size_t &n_in, + const long &n_in, const bool accumulate ) { diff --git a/source/source_base/memory.h b/source/source_base/memory.h index 551e7de780..38b2957c4e 100644 --- a/source/source_base/memory.h +++ b/source/source_base/memory.h @@ -45,7 +45,7 @@ class Memory */ static void record( const std::string &name_in, - const size_t &n_in, + const long &n_in, const bool accumulate = false ); diff --git a/source/source_base/module_container/ATen/kernels/blas.cpp b/source/source_base/module_container/ATen/kernels/blas.cpp index eb192a7c9e..5935ed7c28 100644 --- a/source/source_base/module_container/ATen/kernels/blas.cpp +++ b/source/source_base/module_container/ATen/kernels/blas.cpp @@ -3,6 +3,32 @@ namespace container { namespace kernels { + +template +struct blas_copy { + void operator()( + const int n, + const T *x, + const int incx, + T *y, + const int incy) + { + BlasConnector::copy(n, x, incx, y, incy); + } +}; + +template +struct blas_nrm2 { + using Real = typename GetTypeReal::type; + Real operator()( + const int n, + const T *x, + const int incx) + { + return BlasConnector::nrm2(n, x, incx); + } +}; + template struct blas_dot { void operator()( @@ -175,6 +201,17 @@ struct blas_gemm_batched_strided { }; // Explicitly instantiate functors for the types of functor registered. + +template struct blas_copy; +template struct blas_copy; +template struct blas_copy, DEVICE_CPU>; +template struct blas_copy, DEVICE_CPU>; + +template struct blas_nrm2; +template struct blas_nrm2; +template struct blas_nrm2, DEVICE_CPU>; +template struct blas_nrm2, DEVICE_CPU>; + template struct blas_dot; template struct blas_dot; template struct blas_dot, DEVICE_CPU>; @@ -221,4 +258,4 @@ template struct blas_gemm_batched_strided, DEVICE_CPU>; template struct blas_gemm_batched_strided, DEVICE_CPU>; } // namespace kernels -} // namespace container \ No newline at end of file +} // namespace container diff --git a/source/source_base/module_container/ATen/kernels/blas.h b/source/source_base/module_container/ATen/kernels/blas.h index 201021199c..550caa2f79 100644 --- a/source/source_base/module_container/ATen/kernels/blas.h +++ b/source/source_base/module_container/ATen/kernels/blas.h @@ -9,6 +9,26 @@ namespace container { namespace kernels { +template +struct blas_copy { + // DCOPY copies a vector, x, to a vector, y. + void operator()( + const int n, + const T *x, + const int incx, + T *y, + const int incy); +}; + +template +struct blas_nrm2 { + using Real = typename GetTypeReal::type; + Real operator()( + const int n, + const T *x, + const int incx); +}; + template struct blas_dot { void operator()( @@ -168,4 +188,4 @@ void destroyGpuBlasHandle(); // destory blas handle } // namespace kernels } // namespace container -#endif // ATEN_KERNELS_BLAS_H_ \ No newline at end of file +#endif // ATEN_KERNELS_BLAS_H_ diff --git a/source/source_base/module_container/ATen/kernels/cuda/blas.cu b/source/source_base/module_container/ATen/kernels/cuda/blas.cu index 8d4b5ea227..7f794768ad 100644 --- a/source/source_base/module_container/ATen/kernels/cuda/blas.cu +++ b/source/source_base/module_container/ATen/kernels/cuda/blas.cu @@ -11,17 +11,43 @@ static cublasHandle_t cublas_handle = nullptr; void createGpuBlasHandle() { if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); + CHECK_CUBLAS(cublasCreate(&cublas_handle)); } } void destroyGpuBlasHandle() { if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); + CHECK_CUBLAS(cublasDestroy(cublas_handle)); cublas_handle = nullptr; } } +template +struct blas_nrm2 { + using Real = typename GetTypeReal::type; + Real operator()( + const int n, + const T *x, + const int incx) + { + Real result; + cuBlasConnector::nrm2(cublas_handle, n, x, incx, &result); + return result; + } +}; + +template +struct blas_copy { + void operator()( + const int n, + const T * x, + const int incx, + T *y, + const int incy) + { + cuBlasConnector::copy(cublas_handle, n, x, incx, y, incy); + } +}; template struct blas_dot { @@ -76,7 +102,7 @@ struct blas_gemv { const int& incx, const T* beta, T* y, - const int& incy) + const int& incy) { cuBlasConnector::gemv(cublas_handle, trans, m, n, *alpha, A, lda, x, incx, *beta, y, incy); } @@ -196,6 +222,19 @@ struct blas_gemm_batched_strided { }; // Explicitly instantiate functors for the types of functor registered. + + + +template struct blas_copy; +template struct blas_copy; +template struct blas_copy , DEVICE_GPU>; +template struct blas_copy, DEVICE_GPU>; + +template struct blas_nrm2; +template struct blas_nrm2; +template struct blas_nrm2 , DEVICE_GPU>; +template struct blas_nrm2, DEVICE_GPU>; + template struct blas_dot; template struct blas_dot; template struct blas_dot , DEVICE_GPU>; @@ -242,4 +281,4 @@ template struct blas_gemm_batched_strided, DEVICE_GPU>; template struct blas_gemm_batched_strided, DEVICE_GPU>; } // namespace kernels -} // namespace container \ No newline at end of file +} // namespace container diff --git a/source/source_base/module_container/ATen/kernels/cuda/lapack.cu b/source/source_base/module_container/ATen/kernels/cuda/lapack.cu index 96b24f243a..4c69973b6b 100644 --- a/source/source_base/module_container/ATen/kernels/cuda/lapack.cu +++ b/source/source_base/module_container/ATen/kernels/cuda/lapack.cu @@ -8,6 +8,8 @@ #include +#include "source_base/module_device/device_check.h" + namespace container { namespace kernels { @@ -17,13 +19,13 @@ static cusolverDnHandle_t cusolver_handle = nullptr; void createGpuSolverHandle() { if (cusolver_handle == nullptr) { - cusolverErrcheck(cusolverDnCreate(&cusolver_handle)); + CHECK_CUSOLVER(cusolverDnCreate(&cusolver_handle)); } } void destroyGpuSolverHandle() { if (cusolver_handle != nullptr) { - cusolverErrcheck(cusolverDnDestroy(cusolver_handle)); + CHECK_CUSOLVER(cusolverDnDestroy(cusolver_handle)); cusolver_handle = nullptr; } } @@ -58,10 +60,13 @@ struct set_matrix { set_matrix_kernel<<>>( uplo, reinterpret_cast(A), dim); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } }; + + +// --- 1. Matrix Decomposition --- template struct lapack_trtri { void operator()( @@ -90,17 +95,152 @@ struct lapack_potrf { } }; +template +struct lapack_getrf { + void operator()( + const int& m, + const int& n, + T* Mat, + const int& lda, + int* ipiv) + { + cuSolverConnector::getrf(cusolver_handle, m, n, Mat, lda, ipiv); + } +}; + +template +struct lapack_getri { + void operator()( + const int& n, + T* Mat, + const int& lda, + const int* ipiv, + T* work, + const int& lwork) + { + throw std::runtime_error("cuSOLVER does not provide LU-based matrix inversion interface (getri). To compute the inverse on GPU, use getrs instead."); + } +}; + + +template +struct lapack_geqrf_inplace { + void operator()( + const int m, + const int n, + T *d_A, + const int lda) + { + const int k = std::min(m, n); + + // Allocate tau on device + T *d_tau; + CHECK_CUDA(cudaMalloc(&d_tau, sizeof(T) * k)); + + cuSolverConnector::geqrf(cusolver_handle, m, n, d_A, lda, d_tau); + + cuSolverConnector::orgqr(cusolver_handle, m, n, k, d_A, lda, d_tau); + + CHECK_CUDA(cudaFree(d_tau)); + + // // geqrf: workspace query + + // // In practice, we use helper function to get lwork + // // Or use magma for better interface + // // Let's assume we have a way to get lwork + // // For now, do a dummy call to get it + // size_t workspaceInBytes = 0; + // CHECK_CUSOLVER(cusolverDnXgeqrf_bufferSize( + // cusolverH, m, n, + // getCudaDataType::type, d_A, lda, + // getCudaDataType::type, // for tau + // CUDA_R_32F, // numerical precision + // CUSOLVER_WORKSPACE_QUERY_USE_MAX, &workspaceInBytes)); + + // lwork = static_cast(workspaceInBytes / sizeof(T)); + + // // Allocate workspace + // T *d_work; + // CHECK_CUDA(cudaMalloc(&d_work, sizeof(T) * lwork)); + + // // 3. Perform geqrf + // CHECK_CUSOLVER(cusolverDnXgeqrf( + // cusolverH, m, n, + // getCudaDataType::type, d_A, lda, + // d_tau, + // getCudaDataType::type, + // d_work, lwork * sizeof(T), + // d_info)); + + // int info; + // CHECK_CUDA(cudaMemcpy(&info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + // if (info != 0) { + // throw std::runtime_error("cuSOLVER geqrf failed with info = " + std::to_string(info)); + // } + + // // 4. Generate Q using orgqr + // // Query workspace for orgqr + // CHECK_CUSOLVER(cusolverDnXorgqr_bufferSize( + // cusolverH, m, n, k, + // getCudaDataType::type, d_A, lda, + // getCudaDataType::type, d_tau, + // CUDA_R_32F, + // CUSOLVER_WORKSPACE_QUERY_USE_MAX, &workspaceInBytes)); + + // lwork = static_cast(workspaceInBytes / sizeof(T)); + // CHECK_CUDA(cudaRealloc(&d_work, sizeof(T) * lwork)); // or realloc + + // // orgqr: generate Q + // CHECK_CUSOLVER(cusolverDnXorgqr( + // cusolverH, m, n, k, + // getCudaDataType::type, d_A, lda, + // getCudaDataType::type, d_tau, + // d_work, lwork * sizeof(T), + // d_info)); + + // CHECK_CUDA(cudaMemcpy(&info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + // if (info != 0) { + // throw std::runtime_error("cuSOLVER orgqr failed with info = " + std::to_string(info)); + // } + + // // Clean up + // CHECK_CUDA(cudaFree(d_tau)); + // CHECK_CUDA(cudaFree(d_work)); + // CHECK_CUDA(cudaFree(d_info)); + } +}; + +// --- 2. Linear System Solvers --- +template +struct lapack_getrs { + void operator()( + const char& trans, + const int& n, + const int& nrhs, + T* A, + const int& lda, + const int* ipiv, + T* B, + const int& ldb) + { + cuSolverConnector::getrs(cusolver_handle, trans, n, nrhs, A, lda, ipiv, B, ldb); + } +}; + + +// --- 3. Standard & Generalized Eigenvalue --- template struct lapack_heevd { using Real = typename GetTypeReal::type; void operator()( - const char& jobz, - const char& uplo, + const int dim, T* Mat, - const int& dim, + const int lda, Real* eigen_val) { - cuSolverConnector::heevd(cusolver_handle, jobz, uplo, dim, Mat, dim, eigen_val); + char jobz = 'V'; // Compute eigenvalues and eigenvectors + char uplo = 'U'; + cuSolverConnector::heevd(cusolver_handle, jobz, uplo, dim, Mat, lda, eigen_val); } }; @@ -118,7 +258,7 @@ struct lapack_heevx { assert(n <= lda); // copy d_Mat to d_eigen_vec, and results will be overwritten into d_eigen_vec // by cuSolver - cudaErrcheck(cudaMemcpy(d_eigen_vec, d_Mat, sizeof(T) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_eigen_vec, d_Mat, sizeof(T) * n * lda, cudaMemcpyDeviceToDevice)); int meig = 0; @@ -151,19 +291,19 @@ struct lapack_hegvd { { const int itype = 1; const char jobz = 'V'; - const char uplo = 'L'; - cudaErrcheck(cudaMemcpy(eigen_vec, Mat_A, sizeof(T) * dim * lda, cudaMemcpyDeviceToDevice)); + const char uplo = 'U'; + CHECK_CUDA(cudaMemcpy(eigen_vec, Mat_A, sizeof(T) * dim * lda, cudaMemcpyDeviceToDevice)); // prevent B from being overwritten by Cholesky T *d_B_backup = nullptr; - cudaErrcheck(cudaMalloc(&d_B_backup, sizeof(T) * dim * lda)); - cudaErrcheck(cudaMemcpy(d_B_backup, Mat_B, sizeof(T) * dim * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMalloc(&d_B_backup, sizeof(T) * dim * lda)); + CHECK_CUDA(cudaMemcpy(d_B_backup, Mat_B, sizeof(T) * dim * lda, cudaMemcpyDeviceToDevice)); cuSolverConnector::hegvd(cusolver_handle, itype, jobz, uplo, dim, eigen_vec, lda, d_B_backup, lda, eigen_val); - cudaErrcheck(cudaFree(d_B_backup)); + CHECK_CUDA(cudaFree(d_B_backup)); } }; @@ -198,49 +338,6 @@ struct lapack_hegvx { -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv) - { - cuSolverConnector::getrf(cusolver_handle, m, n, Mat, lda, ipiv); - } -}; - -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork) - { - throw std::runtime_error("cuSOLVER does not provide LU-based matrix inversion interface (getri). To compute the inverse on GPU, use getrs instead."); - } -}; - -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb) - { - cuSolverConnector::getrs(cusolver_handle, trans, n, nrhs, A, lda, ipiv, B, ldb); - } -}; - template struct set_matrix; template struct set_matrix; template struct set_matrix, DEVICE_GPU>; @@ -256,6 +353,13 @@ template struct lapack_potrf; template struct lapack_potrf, DEVICE_GPU>; template struct lapack_potrf, DEVICE_GPU>; + +template struct lapack_getrs; +template struct lapack_getrs; +template struct lapack_getrs, DEVICE_GPU>; +template struct lapack_getrs, DEVICE_GPU>; + + template struct lapack_heevd; template struct lapack_heevd; template struct lapack_heevd, DEVICE_GPU>; @@ -286,10 +390,10 @@ template struct lapack_getri; template struct lapack_getri, DEVICE_GPU>; template struct lapack_getri, DEVICE_GPU>; -template struct lapack_getrs; -template struct lapack_getrs; -template struct lapack_getrs, DEVICE_GPU>; -template struct lapack_getrs, DEVICE_GPU>; +template struct lapack_geqrf_inplace; +template struct lapack_geqrf_inplace; +template struct lapack_geqrf_inplace, DEVICE_GPU>; +template struct lapack_geqrf_inplace, DEVICE_GPU>; } // namespace kernels } // namespace container diff --git a/source/source_base/module_container/ATen/kernels/cuda/linalg.cu b/source/source_base/module_container/ATen/kernels/cuda/linalg.cu index 04c465cfdc..9fc1f15c51 100644 --- a/source/source_base/module_container/ATen/kernels/cuda/linalg.cu +++ b/source/source_base/module_container/ATen/kernels/cuda/linalg.cu @@ -233,7 +233,7 @@ void add::operator()(const int& num_element, const T& alpha, const T* num_element, alpha_, reinterpret_cast(x), beta_, reinterpret_cast(y), reinterpret_cast(z)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -245,7 +245,7 @@ void mul::operator()(const int& num_element, const T& alpha, const T* num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -257,7 +257,7 @@ void mul::operator()(const int& num_element, const T& alpha, const T* num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -268,7 +268,7 @@ void div::operator()(const int& num_element, const T& alpha, const T* do_div_kernel<<>> ( num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), reinterpret_cast(z)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -281,7 +281,7 @@ void fma::operator()(const int& num_element, const T& alpha, const T* num_element, alpha_, reinterpret_cast(x), reinterpret_cast(y), beta_, reinterpret_cast(z), reinterpret_cast(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -325,7 +325,7 @@ void transpose::operator()( ndim, num_elements, p_, t_perm.data(), t_in_strides.data(), t_out_strides.data(), q_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -368,7 +368,7 @@ void stride::operator()( do_stride_kernel<<>> ( ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } @@ -412,7 +412,7 @@ void inflate::operator()( do_inflate_kernel<<>> ( ndim, num_elements, p_, t_stride.data(), t_in_strides.data(), t_out_strides.data(), q_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } @@ -432,7 +432,7 @@ void reduce::operator()( do_reduce_kernel<<>> ( num_element, inner_most_dim, p_, q_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct add; diff --git a/source/source_base/module_container/ATen/kernels/cuda/memory.cu b/source/source_base/module_container/ATen/kernels/cuda/memory.cu index c858984be4..1012b351ea 100644 --- a/source/source_base/module_container/ATen/kernels/cuda/memory.cu +++ b/source/source_base/module_container/ATen/kernels/cuda/memory.cu @@ -51,7 +51,7 @@ void resize_memory::operator()( if (arr != nullptr) { delete_memory()(arr); } - cudaErrcheck(cudaMalloc((void **)&arr, sizeof(T) * size)); + CHECK_CUDA(cudaMalloc((void **)&arr, sizeof(T) * size)); } template @@ -62,7 +62,7 @@ void set_memory::operator()( { const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); do_set_memory<<>>(arr, var, size); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -72,7 +72,7 @@ struct synchronize_memory { const T *arr_in, const size_t& size) { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyDeviceToHost)); } }; @@ -83,7 +83,7 @@ struct synchronize_memory { const T *arr_in, const size_t& size) { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); } }; @@ -94,7 +94,7 @@ struct synchronize_memory { const T *arr_in, const size_t& size) { - cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemcpy(arr_out, arr_in, sizeof(T) * size, cudaMemcpyHostToDevice)); } }; @@ -108,7 +108,7 @@ struct cast_memory { { const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); do_cast_memory<<>>(arr_out, arr_in, size); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } }; @@ -121,12 +121,12 @@ struct cast_memory { const size_t& size) { T_in * arr = nullptr; - cudaErrcheck(cudaMalloc((void **)&arr, sizeof(T_in) * size)); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void **)&arr, sizeof(T_in) * size)); + CHECK_CUDA(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyHostToDevice)); const int block = static_cast((size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK); do_cast_memory<<>>(arr_out, arr, size); - cudaCheckOnDebug(); - cudaErrcheck(cudaFree(arr)); + CHECK_CUDA_SYNC(); + CHECK_CUDA(cudaFree(arr)); } }; @@ -139,7 +139,7 @@ struct cast_memory { const size_t& size) { auto * arr = (T_in*) malloc(sizeof(T_in) * size); - cudaErrcheck(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(arr, arr_in, sizeof(T_in) * size, cudaMemcpyDeviceToHost)); for (int ii = 0; ii < size; ii++) { arr_out[ii] = static_cast(arr[ii]); } @@ -151,7 +151,7 @@ template void delete_memory::operator() ( T* arr) { - cudaErrcheck(cudaFree(arr)); + CHECK_CUDA(cudaFree(arr)); } template struct resize_memory; diff --git a/source/source_base/module_container/ATen/kernels/lapack.cpp b/source/source_base/module_container/ATen/kernels/lapack.cpp index 0c3e72d76c..2ab02f35c8 100644 --- a/source/source_base/module_container/ATen/kernels/lapack.cpp +++ b/source/source_base/module_container/ATen/kernels/lapack.cpp @@ -40,6 +40,7 @@ struct set_matrix { } }; +// --- 1. Matrix Decomposition --- template struct lapack_trtri { void operator()( @@ -73,16 +74,135 @@ struct lapack_potrf { } }; + +template +struct lapack_getrf { + void operator()( + const int& m, + const int& n, + T* Mat, + const int& lda, + int* ipiv) + { + int info = 0; + lapackConnector::getrf(m, n, Mat, lda, ipiv, info); + if (info != 0) { + throw std::runtime_error("getrf failed with info = " + std::to_string(info)); + } + } +}; + +template +struct lapack_getri { + void operator()( + const int& n, + T* Mat, + const int& lda, + const int* ipiv, + T* work, + const int& lwork) + { + int info = 0; + lapackConnector::getri(n, Mat, lda, ipiv, work, lwork, info); + if (info != 0) { + throw std::runtime_error("getri failed with info = " + std::to_string(info)); + } + } +}; + +template +struct lapack_geqrf_inplace { + void operator()( + const int m, + const int n, + T *A, + const int lda) + { + // Tensor or vector? + // 1. tau for storing the Householder reflectors + // tau should be dimension min(m, n) + int k = std::min(m, n); + Tensor tau(DataTypeToEnum::value, DeviceType::CpuDevice, {k}); + tau.zero(); + + int info = 0; + + // 2. query for workspace size + int lwork = -1; + T work_query; + lapackConnector::geqrf(m, n, A, lda, tau.data(), &work_query, lwork, info); + if (info != 0) { + throw std::runtime_error("geqrf workspace query failed with info = " + std::to_string(info)); + } + // allocate workspace + lwork = static_cast(get_real(work_query)); + Tensor work(DataTypeToEnum::value, DeviceType::CpuDevice, {lwork}); + work.zero(); + + // 3. perform QR decomposition + // and A is overwritten with upper R. + // Lower A + tau => Q + lapackConnector::geqrf(m, n, A, lda, tau.data(), work.data(), lwork, info); + if (info != 0) { + throw std::runtime_error("geqrf failed with info = " + std::to_string(info)); + } + + // 4. use orgqr to compute Q + // workspace query + lwork = -1; + lapackConnector::orgqr(m, n, k, A, lda, tau.data(), &work_query, lwork, info); + if (info != 0) { + throw std::runtime_error("orgqr workspace query failed with info = " + std::to_string(info)); + } + // allocate workspace + lwork = static_cast(get_real(work_query)); + work.resize({lwork}); + + // compute Q + lapackConnector::orgqr(m, n, k, A, lda, tau.data(), work.data(), lwork, info); + if (info != 0) { + throw std::runtime_error("orgqr failed with info = " + std::to_string(info)); + } + + // now, A should be overwritten with Q, columns orthogonal + + } +}; + +// --- 2. Linear System Solvers --- +template +struct lapack_getrs { + void operator()( + const char& trans, + const int& n, + const int& nrhs, + T* A, + const int& lda, + const int* ipiv, + T* B, + const int& ldb) + { + int info = 0; + lapackConnector::getrs(trans, n, nrhs, A, lda, ipiv, B, ldb, info); + if (info != 0) { + throw std::runtime_error("getrs failed with info = " + std::to_string(info)); + } + } +}; + + +// --- 3. Standard & Generalized Eigenvalue --- template struct lapack_heevd { using Real = typename GetTypeReal::type; void operator()( - const char& jobz, - const char& uplo, + const int dim, T* Mat, - const int& dim, + const int lda, Real* eigen_val) { + char jobz = 'V'; // Compute eigenvalues and eigenvectors + char uplo = 'U'; int info = 0; int lwork = std::max(2 * dim + dim * dim, 1 + 6 * dim + 2 * dim * dim); Tensor work(DataTypeToEnum::value, DeviceType::CpuDevice, {lwork}); @@ -96,7 +216,7 @@ struct lapack_heevd { Tensor iwork(DataTypeToEnum::value, DeviceType::CpuDevice, {liwork}); iwork.zero(); - lapackConnector::heevd(jobz, uplo, dim, Mat, dim, eigen_val, work.data(), lwork, rwork.data(), lrwork, iwork.data(), liwork, info); + lapackConnector::heevd(jobz, uplo, dim, Mat, lda, eigen_val, work.data(), lwork, rwork.data(), lrwork, iwork.data(), liwork, info); if (info != 0) { throw std::runtime_error("heevd failed with info = " + std::to_string(info)); } @@ -114,6 +234,8 @@ struct lapack_heevx { Real *eigen_val, T *eigen_vec) { + // copy Mat to aux, solve heevx(aux, eigen_val, eigen_vec) + // input Mat is not referenced in actual heevx LAPACK routines, and aux is destroyed. Tensor aux(DataTypeToEnum::value, DeviceType::CpuDevice, {n * lda}); // Copy Mat to aux since heevx will destroy it // aux = Mat @@ -338,60 +460,9 @@ struct lapack_hegvx { } }; -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv) - { - int info = 0; - lapackConnector::getrf(m, n, Mat, lda, ipiv, info); - if (info != 0) { - throw std::runtime_error("getrf failed with info = " + std::to_string(info)); - } - } -}; -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork) - { - int info = 0; - lapackConnector::getri(n, Mat, lda, ipiv, work, lwork, info); - if (info != 0) { - throw std::runtime_error("getri failed with info = " + std::to_string(info)); - } - } -}; -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb) - { - int info = 0; - lapackConnector::getrs(trans, n, nrhs, A, lda, ipiv, B, ldb, info); - if (info != 0) { - throw std::runtime_error("getrs failed with info = " + std::to_string(info)); - } - } -}; + template struct set_matrix; template struct set_matrix; @@ -408,6 +479,28 @@ template struct lapack_trtri; template struct lapack_trtri, DEVICE_CPU>; template struct lapack_trtri, DEVICE_CPU>; + +template struct lapack_getrf; +template struct lapack_getrf; +template struct lapack_getrf, DEVICE_CPU>; +template struct lapack_getrf, DEVICE_CPU>; + +template struct lapack_getri; +template struct lapack_getri; +template struct lapack_getri, DEVICE_CPU>; +template struct lapack_getri, DEVICE_CPU>; + + +template struct lapack_getrs; +template struct lapack_getrs; +template struct lapack_getrs, DEVICE_CPU>; +template struct lapack_getrs, DEVICE_CPU>; + +template struct lapack_geqrf_inplace; +template struct lapack_geqrf_inplace; +template struct lapack_geqrf_inplace, DEVICE_CPU>; +template struct lapack_geqrf_inplace, DEVICE_CPU>; + template struct lapack_heevd; template struct lapack_heevd; template struct lapack_heevd, DEVICE_CPU>; @@ -428,20 +521,5 @@ template struct lapack_hegvx; template struct lapack_hegvx, DEVICE_CPU>; template struct lapack_hegvx, DEVICE_CPU>; -template struct lapack_getrf; -template struct lapack_getrf; -template struct lapack_getrf, DEVICE_CPU>; -template struct lapack_getrf, DEVICE_CPU>; - -template struct lapack_getri; -template struct lapack_getri; -template struct lapack_getri, DEVICE_CPU>; -template struct lapack_getri, DEVICE_CPU>; - -template struct lapack_getrs; -template struct lapack_getrs; -template struct lapack_getrs, DEVICE_CPU>; -template struct lapack_getrs, DEVICE_CPU>; - } // namespace kernels } // namespace container diff --git a/source/source_base/module_container/ATen/kernels/lapack.h b/source/source_base/module_container/ATen/kernels/lapack.h index b3a4a40c4e..117f8ef24b 100644 --- a/source/source_base/module_container/ATen/kernels/lapack.h +++ b/source/source_base/module_container/ATen/kernels/lapack.h @@ -20,6 +20,7 @@ struct set_matrix { }; +// --- 1. Matrix Decomposition --- template struct lapack_trtri { void operator()( @@ -40,6 +41,96 @@ struct lapack_potrf { const int& lda); }; +template +struct lapack_getrf { + void operator()( + const int& m, + const int& n, + T* Mat, + const int& lda, + int* ipiv); +}; + + +template +struct lapack_getri { + void operator()( + const int& n, + T* Mat, + const int& lda, + const int* ipiv, + T* work, + const int& lwork); +}; + +// This is QR factorization in-place +// that will change input Mat A to orthogonal/unitary matrix Q +template +struct lapack_geqrf_inplace { + /** + * @brief Perform in-place QR factorization of a matrix using LAPACK's geqrf function. + * + * This function computes the QR factorization of an m-by-n matrix A as A = Q * R, + * where Q is an orthogonal/unitary matrix and R is an upper triangular matrix. + * The factorization is performed in-place, meaning the input matrix A will be modified. + * + * On exit: A is overwritten with the QR factorization Q orthogonal/unitary matrix + * + * @param m The number of rows in the matrix A. m >= 0 + * @param n The number of columns in the matrix A. n >= 0 + * @param A Pointer to the matrix A to be factorized. On exit, contains the QR factorization + * @param lda The leading dimension of the matrix A. lda >= max(1, m) + */ + void operator()( + const int m, + const int n, + T *A, + const int lda); +}; + +// This is QR factorization +// where [in]Mat will be kept and the results are stored in separate matrix Q +// template +// struct lapack_geqrf{ +// /** +// * Perform QR factorization of a matrix using LAPACK's geqrf function. +// * +// * @param m The number of rows in the matrix. +// * @param n The number of columns in the matrix. +// * @param Mat The matrix to be factorized. +// * On exit, the upper triangle contains the upper triangular matrix R, +// * and the elements below the diagonal, with the array TAU, represent +// * the unitary matrix Q as a product of min(m,n) elementary reflectors. +// * @param lda The leading dimension of the matrix. +// * @param tau Array of size min(m,n) containing the Householder reflectors. +// */ +// void operator()( +// const int m, +// const int n, +// T *Mat, +// const int lda, +// T *tau); +// }; + + +// --- 2. Linear System Solvers --- +template +struct lapack_getrs { + void operator()( + const char& trans, + const int& n, + const int& nrhs, + T* A, + const int& lda, + const int* ipiv, + T* B, + const int& ldb); +}; + + + +// --- 3. Standard & Generalized Eigenvalue --- + // ============================================================================ // Standard Hermitian Eigenvalue Problem Solvers // ============================================================================ @@ -54,12 +145,37 @@ struct lapack_potrf { // ============================================================================ template struct lapack_heevd { + // !> ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a + // !> complex Hermitian matrix A. If eigenvectors are desired, it uses a + // !> divide and conquer algorithm. + // !> On exit, if JOBZ = 'V', then if INFO = 0, A contains the + // !> orthonormal eigenvectors of the matrix A. + /** + * @brief Computes all eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix. + * + * This function solves the standard Hermitian eigenvalue problem A*x = lambda*x, + * where A is a Hermitian matrix. It computes all eigenvalues and optionally + * the corresponding eigenvectors using a divide and conquer algorithm. + * + * @param[in] dim The order of the matrix A. dim >= 0. + * @param[in,out] Mat On entry, the Hermitian matrix A. + * On exit, if eigenvectors are computed, A contains the + * orthonormal eigenvectors of the matrix A. + * @param[in] lda The leading dimension of the array Mat. lda >= max(1, dim). + * @param[out] eigen_val Array of size at least dim. On normal exit, contains the + * eigenvalues in ascending order. + * + * @note + * See LAPACK ZHEEVD or CHEEVD documentation for more details. + * The matrix is assumed to be stored in upper or lower triangular form + * according to the uplo parameter (not shown here but typically passed + * to the actual implementation). + */ using Real = typename GetTypeReal::type; void operator()( - const char& jobz, - const char& uplo, + const int dim, T* Mat, - const int& dim, + const int lda, Real* eigen_val); }; @@ -74,7 +190,8 @@ struct lapack_heevx { * * @param dim The order of the matrix A. dim >= 0. * @param lda The leading dimension of the array Mat. lda >= max(1, dim). - * @param Mat On entry, the Hermitian matrix A. On exit, A is kept. + * @param[in] Mat On entry, the Hermitian matrix A. On exit, A is kept. + * Only used to provide values of matrix. * @param neig The number of eigenvalues to be found. 0 <= neig <= dim. * @param eigen_val On normal exit, the first \p neig elements contain the selected * eigenvalues in ascending order. @@ -174,41 +291,6 @@ struct lapack_hegvx { }; -template -struct lapack_getrf { - void operator()( - const int& m, - const int& n, - T* Mat, - const int& lda, - int* ipiv); -}; - - -template -struct lapack_getri { - void operator()( - const int& n, - T* Mat, - const int& lda, - const int* ipiv, - T* work, - const int& lwork); -}; - -template -struct lapack_getrs { - void operator()( - const char& trans, - const int& n, - const int& nrhs, - T* A, - const int& lda, - const int* ipiv, - T* B, - const int& ldb); -}; - #if defined(__CUDA) || defined(__ROCM) // TODO: Use C++ singleton to manage the GPU handles void createGpuSolverHandle(); // create cusolver handle diff --git a/source/source_base/module_container/ATen/kernels/rocm/blas.hip.cu b/source/source_base/module_container/ATen/kernels/rocm/blas.hip.cu index 5ad275460c..9fa7f63f08 100644 --- a/source/source_base/module_container/ATen/kernels/rocm/blas.hip.cu +++ b/source/source_base/module_container/ATen/kernels/rocm/blas.hip.cu @@ -23,6 +23,19 @@ void destroyGpuBlasHandle() { } +template +struct blas_nrm2 { + T operator()( + const int n, + const T *x, + const int incx) + { + T result; + hipBlasConnector::nrm2(hipblas_handle, n, x, incx, &result); + return result; + } +}; + template struct blas_dot { void operator()( @@ -196,6 +209,11 @@ struct blas_gemm_batched_strided { }; // Explicitly instantiate functors for the types of functor registered. +template struct blas_nrm2; +template struct blas_nrm2; +template struct blas_nrm2 , DEVICE_GPU>; +template struct blas_nrm2, DEVICE_GPU>; + template struct blas_dot; template struct blas_dot; template struct blas_dot , DEVICE_GPU>; diff --git a/source/source_base/module_container/ATen/kernels/test/blas_test.cpp b/source/source_base/module_container/ATen/kernels/test/blas_test.cpp index a01ef8beb9..d0c53422d4 100644 --- a/source/source_base/module_container/ATen/kernels/test/blas_test.cpp +++ b/source/source_base/module_container/ATen/kernels/test/blas_test.cpp @@ -20,6 +20,39 @@ class BlasTest : public testing::Test { TYPED_TEST_SUITE(BlasTest, base::utils::Types); +TYPED_TEST(BlasTest, Copy) { + using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; + using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; + + blas_copy copyCalculator; + + const int n = 3; + const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); + Tensor y = std::move(Tensor({static_cast(0.0), static_cast(0.0), static_cast(0.0)}).to_device()); + + copyCalculator(n, x.data(), 1, y.data(), 1); + const Tensor expected = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); + + EXPECT_EQ(y, expected); +} + +TYPED_TEST(BlasTest, Nrm2) { + using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; + using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; + + blas_nrm2 nrm2Calculator; + + const int n = 3; + const Tensor x = std::move(Tensor({static_cast(3.0), static_cast(4.0), static_cast(0.0)}).to_device()); + + using Real = typename GetTypeReal::type; + Real result = {}; + result = nrm2Calculator(n, x.data(), 1); + const Real expected = static_cast(5.0); + + EXPECT_NEAR(result, expected, static_cast(1e-6)); +} + TYPED_TEST(BlasTest, Dot) { using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; @@ -29,7 +62,7 @@ TYPED_TEST(BlasTest, Dot) { const int n = 3; const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); const Tensor y = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - + Type result = {}; dotCalculator(n, x.data(), 1, y.data(), 1, &result); const Type expected = static_cast(32.0); @@ -46,7 +79,7 @@ TYPED_TEST(BlasTest, Scal) { const int n = 3; const Type alpha = static_cast(2.0); Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - + scalCalculator(n, &alpha, x.data(), 1); const Tensor expected = std::move(Tensor({static_cast(2.0), static_cast(4.0), static_cast(6.0)}).to_device()); @@ -64,7 +97,7 @@ TYPED_TEST(BlasTest, Axpy) { const Type alpha = static_cast(2.0); const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); Tensor y = std::move(Tensor({static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); - + axpyCalculator(n, &alpha, x.data(), 1, y.data(), 1); const Tensor expected = std::move(Tensor({static_cast(6.0), static_cast(9.0), static_cast(12.0)}).to_device()); @@ -83,11 +116,11 @@ TYPED_TEST(BlasTest, Gemv) { const int n = 2; const Type alpha = static_cast(2.0); const Type beta = static_cast(3.0); - const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), + const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); Tensor y = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - + gemvCalculator(trans, m, n, &alpha, A.data(), m, x.data(), 1, &beta, y.data(), 1); const Tensor expected = std::move(Tensor({static_cast(21.0), static_cast(30.0), static_cast(39.0)}).to_device()); @@ -114,14 +147,14 @@ TYPED_TEST(BlasTest, GemvBatched) { std::vector y = {}; const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), + static_cast(1.0), static_cast(2.0), + static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0), - + static_cast(7.0), static_cast(8.0), static_cast(9.0), static_cast(10.0), static_cast(11.0),static_cast(12.0)}).to_device()); - + A.push_back(_A.data()); A.push_back(_A.data() + m * n); @@ -164,14 +197,14 @@ TYPED_TEST(BlasTest, GemvBatchedStrided) { std::vector y = {}; const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), + static_cast(1.0), static_cast(2.0), + static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0), - + static_cast(7.0), static_cast(8.0), static_cast(9.0), static_cast(10.0), static_cast(11.0),static_cast(12.0)}).to_device()); - + A.push_back(_A.data()); A.push_back(_A.data() + m * n); @@ -205,11 +238,11 @@ TYPED_TEST(BlasTest, Gemm) { const int n = 2; const Type alpha = static_cast(2.0); const Type beta = static_cast(3.0); - const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), + const Tensor A = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0)}).to_device()); const Tensor x = std::move(Tensor({static_cast(1.0), static_cast(2.0)}).to_device()); Tensor y = std::move(Tensor({static_cast(1.0), static_cast(2.0), static_cast(3.0)}).to_device()); - + gemmCalculator(trans, trans, m, 1, n, &alpha, A.data(), m, x.data(), n, &beta, y.data(), m); const Tensor expected = std::move(Tensor({static_cast(21.0), static_cast(30.0), static_cast(39.0)}).to_device()); @@ -237,14 +270,14 @@ TYPED_TEST(BlasTest, GemmBatched) { std::vector y2 = {}; const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), + static_cast(1.0), static_cast(2.0), + static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0), - + static_cast(7.0), static_cast(8.0), static_cast(9.0), static_cast(10.0), static_cast(11.0),static_cast(12.0)}).to_device()); - + A.push_back(_A.data()); A.push_back(_A.data() + m * n); @@ -287,14 +320,14 @@ TYPED_TEST(BlasTest, GemmBatchedStrided) { std::vector y2 = {}; const Tensor _A = std::move(Tensor({ - static_cast(1.0), static_cast(2.0), - static_cast(3.0), static_cast(4.0), + static_cast(1.0), static_cast(2.0), + static_cast(3.0), static_cast(4.0), static_cast(5.0), static_cast(6.0), - + static_cast(7.0), static_cast(8.0), static_cast(9.0), static_cast(10.0), static_cast(11.0),static_cast(12.0)}).to_device()); - + A.push_back(_A.data()); A.push_back(_A.data() + m * n); diff --git a/source/source_base/module_container/ATen/kernels/test/lapack_test.cpp b/source/source_base/module_container/ATen/kernels/test/lapack_test.cpp index acd903bb60..5524ca6c50 100644 --- a/source/source_base/module_container/ATen/kernels/test/lapack_test.cpp +++ b/source/source_base/module_container/ATen/kernels/test/lapack_test.cpp @@ -92,6 +92,83 @@ TYPED_TEST(LapackTest, Potrf) { EXPECT_EQ(A, C); } +// lapack_geqrf_inplace, +// check that QtQ = I +TYPED_TEST(LapackTest, GeqrfInPlace) { + using Type = typename std::tuple_element<0, decltype(TypeParam())>::type; + using Device = typename std::tuple_element<1, decltype(TypeParam())>::type; + + lapack_geqrf_inplace geqrfCalculator; + + const int m = 4; + const int n = 3; // m >= n,Q is m x n column-orthogonal matrix + const int lda = m; + + Tensor A_input = std::move(Tensor({ + static_cast(1.0), static_cast(2.0), static_cast(3.0), static_cast(4.0), + static_cast(5.0), static_cast(6.0), static_cast(7.0), static_cast(8.0), + static_cast(9.0), static_cast(10.0), static_cast(11.0), static_cast(12.0) + }).to_device()); + + Tensor A = A_input; // will be overwritten as Q + + // do geqrf -> get orthogonal Q + geqrfCalculator(m, n, A.data(), lda); + + // check on CPU + Tensor Q = A.to_device(); + const Type* Q_data = Q.data(); + + // compute QtQ = Q^T * Q (n x n) + Tensor QtQ = Q; // std::move(Tensor(std::vector(n * n, static_cast(0.0))).to_device()); + const Type alpha = static_cast(1.0); + const Type beta = static_cast(0.0); + + blas_gemm gemm; + gemm('C', 'N', // Q^T * Q + n, n, m, // n x n + &alpha, + Q_data, lda, // Q^T + Q_data, lda, // Q + &beta, + QtQ.data(), n); + + // To print value: first to_device CPU, then print + // // Test code: print A + // std::cout << "A = " << std::endl; + // for (int i = 0; i < m; ++i) { + // for (int j = 0; j < n; ++j) { + // std::cout << A_input.to_device().data()[i + j * m] << " "; + // } + // std::cout << std::endl; + // } + // // Test code: print Q + // std::cout << "Q = " << std::endl; + // for (int i = 0; i < m; ++i) { + // for (int j = 0; j < n; ++j) { + // std::cout << Q.data()[i + j * m] << " "; + // } + // std::cout << std::endl; + // } + // // Test code: print QtQ + // std::cout << "QtQ = " << std::endl; + // for (int i = 0; i < n; ++i) { + // for (int j = 0; j < n; ++j) { + // std::cout << QtQ.data()[i + j * n] << " "; + // } + // std::cout << std::endl; + // } + + // check QtQ + for (int i = 0; i < n; ++i) { + for (int j = 0; j < n; ++j) { + Type expected = (i == j) ? static_cast(1.0) : static_cast(0.0); + EXPECT_NEAR(std::abs(QtQ.data()[i + j * n]), std::abs(expected), 1e-5) + << "Q^T * Q not identity at (" << i << "," << j << ")"; + } + } +} + // Test for lapack_heevd and lapack_heevx: // Solve a standard eigenvalue problem // and check that A*V = V*E @@ -124,7 +201,8 @@ TYPED_TEST(LapackTest, heevd) { const Type beta = static_cast(0.0); // Note all blas and lapack operators within container are column major! // For this reason, we should employ 'L' instead of 'U' in the subsequent line. - heevdCalculator('V', 'U', B.data(), dim, E.data()); + // heevdCalculator('V', 'U', B.data(), dim, E.data()); + heevdCalculator(dim, B.data(), dim, E.data()); E = E.to_device(); const Tensor Alpha = std::move(Tensor({ diff --git a/source/source_base/module_container/base/macros/cuda.h b/source/source_base/module_container/base/macros/cuda.h index e9fb2866e7..572eecdffd 100644 --- a/source/source_base/module_container/base/macros/cuda.h +++ b/source/source_base/module_container/base/macros/cuda.h @@ -6,6 +6,8 @@ #include #include +#include "source_base/module_device/device_check.h" + #define THREADS_PER_BLOCK 256 template @@ -23,7 +25,7 @@ struct GetTypeThrust> template <> struct GetTypeThrust> { - using type = thrust::complex; /**< The return type specialization for std::complex. */ + using type = thrust::complex; /**< The return type specialization for std::complex. */ }; static inline cublasOperation_t GetCublasOperation(const char& trans) @@ -144,109 +146,4 @@ static inline cusolverEigRange_t cublas_eig_range(const char& range) throw std::runtime_error("cublas_eig_range: unknown range '" + std::string(1, range) + "'"); } -// cuSOLVER API errors -static const char* cusolverGetErrorEnum(cusolverStatus_t error) -{ - switch (error) - { - case CUSOLVER_STATUS_SUCCESS: - return "CUSOLVER_STATUS_SUCCESS"; - case CUSOLVER_STATUS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_ALLOC_FAILED: - return "CUSOLVER_STATUS_ALLOC_FAILED"; - case CUSOLVER_STATUS_INVALID_VALUE: - return "CUSOLVER_STATUS_INVALID_VALUE"; - case CUSOLVER_STATUS_ARCH_MISMATCH: - return "CUSOLVER_STATUS_ARCH_MISMATCH"; - case CUSOLVER_STATUS_MAPPING_ERROR: - return "CUSOLVER_STATUS_MAPPING_ERROR"; - case CUSOLVER_STATUS_EXECUTION_FAILED: - return "CUSOLVER_STATUS_EXECUTION_FAILED"; - case CUSOLVER_STATUS_INTERNAL_ERROR: - return "CUSOLVER_STATUS_INTERNAL_ERROR"; - case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; - case CUSOLVER_STATUS_NOT_SUPPORTED: - return "CUSOLVER_STATUS_NOT_SUPPORTED "; - case CUSOLVER_STATUS_ZERO_PIVOT: - return "CUSOLVER_STATUS_ZERO_PIVOT"; - case CUSOLVER_STATUS_INVALID_LICENSE: - return "CUSOLVER_STATUS_INVALID_LICENSE"; - default: - return "Unknown cusolverStatus_t message"; - } -} - -inline void cusolverAssert(cusolverStatus_t code, const char* file, int line) -{ - if (code != CUSOLVER_STATUS_SUCCESS) - { - fprintf(stderr, " Unexpected cuSOLVER Error: %s %s %d\n", cusolverGetErrorEnum(code), file, line); - exit(code); - } -} - -// cuSOLVER API errors -static const char* cublasGetErrorEnum(cublasStatus_t error) -{ - switch (error) - { - case CUBLAS_STATUS_SUCCESS: - return "CUBLAS_STATUS_SUCCESS"; - case CUBLAS_STATUS_NOT_INITIALIZED: - return "CUBLAS_STATUS_NOT_INITIALIZED"; - case CUBLAS_STATUS_ALLOC_FAILED: - return "CUBLAS_STATUS_ALLOC_FAILED"; - case CUBLAS_STATUS_INVALID_VALUE: - return "CUBLAS_STATUS_INVALID_VALUE"; - case CUBLAS_STATUS_ARCH_MISMATCH: - return "CUBLAS_STATUS_ARCH_MISMATCH"; - case CUBLAS_STATUS_MAPPING_ERROR: - return "CUBLAS_STATUS_MAPPING_ERROR"; - case CUBLAS_STATUS_EXECUTION_FAILED: - return "CUBLAS_STATUS_EXECUTION_FAILED"; - case CUBLAS_STATUS_INTERNAL_ERROR: - return "CUBLAS_STATUS_INTERNAL_ERROR"; - default: - return "Unknown"; - } -} - -inline void cublasAssert(cublasStatus_t res, const char* file, int line) -{ - if (res != CUBLAS_STATUS_SUCCESS) - { - fprintf(stderr, " Unexpected cuBLAS Error: %s %s %d\n", cublasGetErrorEnum(res), file, line); - exit(res); - } -} - -#define cusolverErrcheck(res) \ - { \ - cusolverAssert((res), __FILE__, __LINE__); \ - } - -#define cublasErrcheck(res) \ - { \ - cublasAssert((res), __FILE__, __LINE__); \ - } - -// CUDA API errors -#define cudaErrcheck(res) \ - { \ - if (res != cudaSuccess) \ - { \ - fprintf(stderr, " Unexpected Device Error %s:%d: %s, %s\n", __FILE__, __LINE__, cudaGetErrorName(res), \ - cudaGetErrorString(res)); \ - exit(res); \ - } \ - } - -#ifdef __DEBUG -#define cudaCheckOnDebug() cudaErrcheck(cudaDeviceSynchronize()) -#else -#define cudaCheckOnDebug() -#endif - #endif // BASE_MACROS_CUDA_H_ diff --git a/source/source_base/module_container/base/third_party/blas.h b/source/source_base/module_container/base/third_party/blas.h index 5c73032e05..1fdbac67b2 100644 --- a/source/source_base/module_container/base/third_party/blas.h +++ b/source/source_base/module_container/base/third_party/blas.h @@ -25,14 +25,17 @@ void daxpy_(const int *N, const double *alpha, const double *x, const int *incx, void caxpy_(const int *N, const std::complex *alpha, const std::complex *x, const int *incx, std::complex *y, const int *incy); void zaxpy_(const int *N, const std::complex *alpha, const std::complex *x, const int *incx, std::complex *y, const int *incy); -void dcopy_(long const *n, const double *a, int const *incx, double *b, int const *incy); -void zcopy_(long const *n, const std::complex *a, int const *incx, std::complex *b, int const *incy); +void scopy_(const int *n, const float *a, const int *incx, float *b, int const *incy); +void dcopy_(const int *n, const double *a, const int *incx, double *b, int const *incy); +void ccopy_(const int *n, const std::complex *a, const int *incx, std::complex *b, int const *incy); +void zcopy_(const int *n, const std::complex *a, const int *incx, std::complex *b, int const *incy); + //reason for passing results as argument instead of returning it: //see https://www.numbercrunch.de/blog/2014/07/lost-in-translation/ -void cdotc_(const int *n, const std::complex *zx, const int *incx, +void cdotc_(const int *n, const std::complex *zx, const int *incx, const std::complex *zy, const int *incy, std::complex *result); -void zdotc_(const int *n, const std::complex *zx, const int *incx, +void zdotc_(const int *n, const std::complex *zx, const int *incx, const std::complex *zy, const int *incy, std::complex *result); // Peize Lin add ?dot 2017-10-27, to compute d=x*y float sdot_(const int *N, const float *x, const int *incx, const float *y, const int *incy); @@ -41,6 +44,7 @@ double ddot_(const int *N, const double *x, const int *incx, const double *y, co // Peize Lin add ?nrm2 2018-06-12, to compute out = ||x||_2 = \sqrt{ \sum_i x_i**2 } float snrm2_( const int *n, const float *x, const int *incx ); double dnrm2_( const int *n, const double *x, const int *incx ); +float scnrm2_( const int *n, const std::complex *x, const int *incx ); double dznrm2_( const int *n, const std::complex *x, const int *incx ); // level 2: matrix-std::vector operations, O(n^2) data and O(n^2) work. @@ -107,14 +111,26 @@ void dsymm_(const char *side, const char *uplo, const int *m, const int *n, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc); //a is hermitian -void zhemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); +void zhemm_(const char *side, const char *uplo, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); //solving triangular matrix with multiple right hand sides -void dtrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - double* alpha, double* a, int *lda, double*b, int *ldb); -void ztrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - std::complex* alpha, std::complex* a, int *lda, std::complex*b, int *ldb); +void dtrsm_(const char *side, const char *uplo, const char *transa, const char *diag, + const int *m, const int *n, + const double *alpha, + const double *a, const int *lda, + double *b, const int *ldb); + +void ztrsm_(const char *side, const char *uplo, const char *transa, const char *diag, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + std::complex *b, const int *ldb); } @@ -332,6 +348,11 @@ double nrm2( const int n, const double *x, const int incx ) return dnrm2_( &n, x, &incx ); } static inline +double nrm2( const int n, const std::complex *x, const int incx ) +{ + return scnrm2_( &n, x, &incx ); +} +static inline double nrm2( const int n, const std::complex *x, const int incx ) { return dznrm2_( &n, x, &incx ); @@ -339,12 +360,23 @@ double nrm2( const int n, const std::complex *x, const int incx ) // copies a into b static inline -void copy(const long n, const double *a, const int incx, double *b, const int incy) +void copy(const int n, const float *a, const int incx, float *b, const int incy) +{ + scopy_(&n, a, &incx, b, &incy); +} +static inline +void copy(const int n, const double *a, const int incx, double *b, const int incy) + { dcopy_(&n, a, &incx, b, &incy); } static inline -void copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy) +void copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy) +{ + ccopy_(&n, a, &incx, b, &incy); +} +static inline +void copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy) { zcopy_(&n, a, &incx, b, &incy); } diff --git a/source/source_base/module_container/base/third_party/cublas.h b/source/source_base/module_container/base/third_party/cublas.h index 34cd7484d1..fabc32e983 100644 --- a/source/source_base/module_container/base/third_party/cublas.h +++ b/source/source_base/module_container/base/third_party/cublas.h @@ -8,67 +8,109 @@ namespace container { namespace cuBlasConnector { +static inline +void copy(cublasHandle_t& handle, const int& n, const float *x, const int& incx, float *y, const int& incy) +{ + CHECK_CUBLAS(cublasScopy(handle, n, x, incx, y, incy)); +} +static inline +void copy(cublasHandle_t& handle, const int& n, const double *x, const int& incx, double *y, const int& incy) +{ + CHECK_CUBLAS(cublasDcopy(handle, n, x, incx, y, incy)); +} +static inline +void copy(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, std::complex *y, const int& incy) +{ + CHECK_CUBLAS(cublasCcopy(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy)); +} +static inline +void copy(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, std::complex *y, const int& incy) +{ + CHECK_CUBLAS(cublasZcopy(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy)); +} + +static inline +void nrm2(cublasHandle_t& handle, const int& n, const float *x, const int& incx, float* result) +{ + CHECK_CUBLAS(cublasSnrm2(handle, n, x, incx, result)); +} +static inline +void nrm2(cublasHandle_t& handle, const int& n, const double *x, const int& incx, double* result) +{ + CHECK_CUBLAS(cublasDnrm2(handle, n, x, incx, result)); +} +static inline +void nrm2(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, float* result) +{ + CHECK_CUBLAS(cublasScnrm2(handle, n, reinterpret_cast(x), incx, result)); +} +static inline +void nrm2(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, double* result) +{ + CHECK_CUBLAS(cublasDznrm2(handle, n, reinterpret_cast(x), incx, result)); +} + static inline void dot(cublasHandle_t& handle, const int& n, const float *x, const int& incx, const float *y, const int& incy, float* result) { - cublasErrcheck(cublasSdot(handle, n, x, incx, y, incy, result)); + CHECK_CUBLAS(cublasSdot(handle, n, x, incx, y, incy, result)); } static inline void dot(cublasHandle_t& handle, const int& n, const double *x, const int& incx, const double *y, const int& incy, double* result) { - cublasErrcheck(cublasDdot(handle, n, x, incx, y, incy, result)); + CHECK_CUBLAS(cublasDdot(handle, n, x, incx, y, incy, result)); } static inline void dot(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) { - cublasErrcheck(cublasCdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); + CHECK_CUBLAS(cublasCdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); } static inline void dot(cublasHandle_t& handle, const int& n, const std::complex *x, const int& incx, const std::complex *y, const int& incy, std::complex* result) { - cublasErrcheck(cublasZdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); + CHECK_CUBLAS(cublasZdotc(handle, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, reinterpret_cast(result))); } static inline void axpy(cublasHandle_t& handle, const int& n, const float& alpha, const float *x, const int& incx, float *y, const int& incy) { - cublasErrcheck(cublasSaxpy(handle, n, &alpha, x, incx, y, incy)); + CHECK_CUBLAS(cublasSaxpy(handle, n, &alpha, x, incx, y, incy)); } static inline void axpy(cublasHandle_t& handle, const int& n, const double& alpha, const double *x, const int& incx, double *y, const int& incy) { - cublasErrcheck(cublasDaxpy(handle, n, &alpha, x, incx, y, incy)); + CHECK_CUBLAS(cublasDaxpy(handle, n, &alpha, x, incx, y, incy)); } static inline void axpy(cublasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) { - cublasErrcheck(cublasCaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); + CHECK_CUBLAS(cublasCaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); } static inline void axpy(cublasHandle_t& handle, const int& n, const std::complex& alpha, const std::complex *x, const int& incx, std::complex *y, const int& incy) { - cublasErrcheck(cublasZaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); + CHECK_CUBLAS(cublasZaxpy(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy)); } static inline void scal(cublasHandle_t& handle, const int& n, const float& alpha, float *x, const int& incx) { - cublasErrcheck(cublasSscal(handle, n, &alpha, x, incx)); + CHECK_CUBLAS(cublasSscal(handle, n, &alpha, x, incx)); } static inline void scal(cublasHandle_t& handle, const int& n, const double& alpha, double *x, const int& incx) { - cublasErrcheck(cublasDscal(handle, n, &alpha, x, incx)); + CHECK_CUBLAS(cublasDscal(handle, n, &alpha, x, incx)); } static inline void scal(cublasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) { - cublasErrcheck(cublasCscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); + CHECK_CUBLAS(cublasCscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); } static inline void scal(cublasHandle_t& handle, const int& n, const std::complex& alpha, std::complex *x, const int& incx) { - cublasErrcheck(cublasZscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); + CHECK_CUBLAS(cublasZscal(handle, n, reinterpret_cast(&alpha), reinterpret_cast(x), incx)); } static inline @@ -76,21 +118,21 @@ void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, const float& alpha, const float *A, const int& lda, const float *x, const int& incx, const float& beta, float *y, const int& incy) { - cublasErrcheck(cublasSgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); + CHECK_CUBLAS(cublasSgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); } static inline void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, const double& alpha, const double *A, const int& lda, const double *x, const int& incx, const double& beta, double *y, const int& incy) { - cublasErrcheck(cublasDgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); + CHECK_CUBLAS(cublasDgemv(handle, GetCublasOperation(trans), m, n, &alpha, A, lda, x, incx, &beta, y, incy)); } static inline void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, const std::complex& beta, std::complex *y, const int& incy) { - cublasErrcheck(cublasCgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), + CHECK_CUBLAS(cublasCgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); } static inline @@ -98,7 +140,7 @@ void gemv(cublasHandle_t& handle, const char& trans, const int& m, const int& n, const std::complex& alpha, const std::complex *A, const int& lda, const std::complex *x, const int& incx, const std::complex& beta, std::complex *y, const int& incy) { - cublasErrcheck(cublasZgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), + CHECK_CUBLAS(cublasZgemv(handle, GetCublasOperation(trans), m, n, reinterpret_cast(&alpha), reinterpret_cast(A), lda, reinterpret_cast(x), incx, reinterpret_cast(&beta), reinterpret_cast(y), incy)); } @@ -110,7 +152,7 @@ void gemv_batched(cublasHandle_t& handle, const char& trans, const int& m, const { for (int ii = 0; ii < batch_size; ++ii) { // Call the single GEMV for each pair of matrix A[ii] and vector x[ii] - cuBlasConnector::gemv(handle, trans, m, n, alpha, A[ii], lda, x[ii], incy, beta, y[ii], incy); + cuBlasConnector::gemv(handle, trans, m, n, alpha, A[ii], lda, x[ii], incx, beta, y[ii], incy); } } @@ -131,7 +173,7 @@ void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const const float& alpha, const float* A, const int& lda, const float* B, const int& ldb, const float& beta, float* C, const int& ldc) { - cublasErrcheck(cublasSgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), + CHECK_CUBLAS(cublasSgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); } static inline @@ -139,7 +181,7 @@ void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, const double& beta, double* C, const int& ldc) { - cublasErrcheck(cublasDgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), + CHECK_CUBLAS(cublasDgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc)); } static inline @@ -147,12 +189,12 @@ void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, const std::complex& beta, std::complex* C, const int& ldc) { - cublasErrcheck(cublasCgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), + CHECK_CUBLAS(cublasCgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), + m, n, k, + reinterpret_cast(&alpha), + reinterpret_cast(A), lda, + reinterpret_cast(B), ldb, + reinterpret_cast(&beta), reinterpret_cast(C), ldc)); } static inline @@ -160,22 +202,22 @@ void gemm(cublasHandle_t& handle, const char& transa, const char& transb, const const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, const std::complex& beta, std::complex* C, const int& ldc) { - cublasErrcheck(cublasZgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), + CHECK_CUBLAS(cublasZgemm(handle, GetCublasOperation(transa), GetCublasOperation(transb), m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, - reinterpret_cast(B), ldb, - reinterpret_cast(&beta), + reinterpret_cast(&alpha), + reinterpret_cast(A), lda, + reinterpret_cast(B), ldb, + reinterpret_cast(&beta), reinterpret_cast(C), ldc)); } template -static inline +static inline T** allocate_(T** in, const int& batch_size) { T** out = nullptr; - cudaErrcheck(cudaMalloc(reinterpret_cast(&out), sizeof(T*) * batch_size)); - cudaErrcheck(cudaMemcpy(out, in, sizeof(T*) * batch_size, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc(reinterpret_cast(&out), sizeof(T*) * batch_size)); + CHECK_CUDA(cudaMemcpy(out, in, sizeof(T*) * batch_size, cudaMemcpyHostToDevice)); return out; } @@ -187,11 +229,11 @@ void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb float** d_A = allocate_(A, batch_size); float** d_B = allocate_(B, batch_size); float** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasSgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), + CHECK_CUBLAS(cublasSgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); + CHECK_CUDA(cudaFree(d_A)); + CHECK_CUDA(cudaFree(d_B)); + CHECK_CUDA(cudaFree(d_C)); } static inline void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, @@ -201,11 +243,11 @@ void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb double** d_A = allocate_(A, batch_size); double** d_B = allocate_(B, batch_size); double** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasDgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), + CHECK_CUBLAS(cublasDgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), m, n, k, &alpha, d_A, lda, d_B, ldb, &beta, d_C, ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); + CHECK_CUDA(cudaFree(d_A)); + CHECK_CUDA(cudaFree(d_B)); + CHECK_CUDA(cudaFree(d_C)); } static inline void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, @@ -215,16 +257,16 @@ void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb std::complex** d_A = allocate_(A, batch_size); std::complex** d_B = allocate_(B, batch_size); std::complex** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasCgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), + CHECK_CUBLAS(cublasCgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), + m, n, k, + reinterpret_cast(&alpha), + reinterpret_cast(d_A), lda, + reinterpret_cast(d_B), ldb, + reinterpret_cast(&beta), reinterpret_cast(d_C), ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); + CHECK_CUDA(cudaFree(d_A)); + CHECK_CUDA(cudaFree(d_B)); + CHECK_CUDA(cudaFree(d_C)); } static inline void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb, const int& m, const int& n, const int& k, @@ -234,16 +276,16 @@ void gemm_batched(cublasHandle_t& handle, const char& transa, const char& transb std::complex** d_A = allocate_(A, batch_size); std::complex** d_B = allocate_(B, batch_size); std::complex** d_C = allocate_(C, batch_size); - cublasErrcheck(cublasZgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(d_A), lda, - reinterpret_cast(d_B), ldb, - reinterpret_cast(&beta), + CHECK_CUBLAS(cublasZgemmBatched(handle, GetCublasOperation(transa), GetCublasOperation(transb), + m, n, k, + reinterpret_cast(&alpha), + reinterpret_cast(d_A), lda, + reinterpret_cast(d_B), ldb, + reinterpret_cast(&beta), reinterpret_cast(d_C), ldc, batch_size)); - cudaErrcheck(cudaFree(d_A)); - cudaErrcheck(cudaFree(d_B)); - cudaErrcheck(cudaFree(d_C)); + CHECK_CUDA(cudaFree(d_A)); + CHECK_CUDA(cudaFree(d_B)); + CHECK_CUDA(cudaFree(d_C)); } static inline @@ -251,15 +293,15 @@ void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char const float& alpha, const float* A, const int& lda, const int& stride_a, const float* B, const int& ldb, const int& stride_b, const float& beta, float* C, const int& ldc, const int& stride_c, const int& batch_size) { - cublasErrcheck(cublasSgemmStridedBatched( - handle, - GetCublasOperation(transa), + CHECK_CUBLAS(cublasSgemmStridedBatched( + handle, + GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, + m, n, k, + &alpha, + A, lda, stride_a, + B, ldb, stride_b, + &beta, C, ldc, stride_c, batch_size)); } @@ -268,15 +310,15 @@ void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char const double& alpha, const double* A, const int& lda, const int& stride_a, const double* B, const int& ldb, const int& stride_b, const double& beta, double* C, const int& ldc, const int& stride_c, const int& batch_size) { - cublasErrcheck(cublasDgemmStridedBatched( - handle, - GetCublasOperation(transa), + CHECK_CUBLAS(cublasDgemmStridedBatched( + handle, + GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - &alpha, - A, lda, stride_a, - B, ldb, stride_b, - &beta, + m, n, k, + &alpha, + A, lda, stride_a, + B, ldb, stride_b, + &beta, C, ldc, stride_c, batch_size)); } @@ -285,15 +327,15 @@ void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) { - cublasErrcheck(cublasCgemmStridedBatched( - handle, - GetCublasOperation(transa), + CHECK_CUBLAS(cublasCgemmStridedBatched( + handle, + GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), + m, n, k, + reinterpret_cast(&alpha), + reinterpret_cast(A), lda, stride_a, + reinterpret_cast(B), ldb, stride_b, + reinterpret_cast(&beta), reinterpret_cast(C), ldc, stride_c, batch_size)); } @@ -302,15 +344,15 @@ void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char const std::complex& alpha, const std::complex* A, const int& lda, const int& stride_a, const std::complex* B, const int& ldb, const int& stride_b, const std::complex& beta, std::complex* C, const int& ldc, const int& stride_c, const int& batch_size) { - cublasErrcheck(cublasZgemmStridedBatched( - handle, - GetCublasOperation(transa), + CHECK_CUBLAS(cublasZgemmStridedBatched( + handle, + GetCublasOperation(transa), GetCublasOperation(transb), - m, n, k, - reinterpret_cast(&alpha), - reinterpret_cast(A), lda, stride_a, - reinterpret_cast(B), ldb, stride_b, - reinterpret_cast(&beta), + m, n, k, + reinterpret_cast(&alpha), + reinterpret_cast(A), lda, stride_a, + reinterpret_cast(B), ldb, stride_b, + reinterpret_cast(&beta), reinterpret_cast(C), ldc, stride_c, batch_size)); } @@ -318,4 +360,4 @@ void gemm_batched_strided(cublasHandle_t& handle, const char& transa, const char } // namespace cuBlasConnector } // namespace container -#endif // BASE_THIRD_PARTY_CUBLAS_H_ \ No newline at end of file +#endif // BASE_THIRD_PARTY_CUBLAS_H_ diff --git a/source/source_base/module_container/base/third_party/cusolver.h b/source/source_base/module_container/base/third_party/cusolver.h index affdc4ca48..9c5d223e11 100644 --- a/source/source_base/module_container/base/third_party/cusolver.h +++ b/source/source_base/module_container/base/third_party/cusolver.h @@ -3,6 +3,17 @@ #include #include +#include + +// #include // traits, needed if generic API is used. +// header provided by cusolver, including some data types and macros. +// see https://github.com/NVIDIA/CUDALibrarySamples/blob/master/cuSOLVER/utils/cusolver_utils.h +// The cuSolverDN library provides two different APIs; legacy and generic. +// https://docs.nvidia.com/cuda/cusolver/index.html#naming-conventions +// now only legacy APIs are used, while the general APIs have the potential to simplify code implementation. +// for example, cucusolverDnXpotrf/getrf/geqrf/sytrf +// More tests are needed to confirm that the generic APIs are operating normally, as they are not yet fully supported. + #include namespace container { @@ -14,9 +25,9 @@ void trtri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& d { size_t d_lwork = 0, h_lwork = 0; using Type = typename GetTypeThrust::type; - cusolverErrcheck(cusolverDnXtrtri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), lda, &d_lwork, &h_lwork)); + CHECK_CUSOLVER(cusolverDnXtrtri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), lda, &d_lwork, &h_lwork)); void* d_work = nullptr, *h_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_work, d_lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, d_lwork)); if (h_lwork) { h_work = malloc(h_lwork); if (h_work == nullptr) { @@ -25,61 +36,61 @@ void trtri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& d } int h_info = 0; int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnXtrtri(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), n, d_work, d_lwork, h_work, h_lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUSOLVER(cusolverDnXtrtri(cusolver_handle, cublas_fill_mode(uplo), cublas_diag_type(diag), n, GetTypeCuda::cuda_data_type, reinterpret_cast(A), n, d_work, d_lwork, h_work, h_lwork, d_info)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("trtri: failed to invert matrix"); } free(h_work); - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } static inline void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, float * A, const int& lda) { int lwork; - cusolverErrcheck(cusolverDnSpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); + CHECK_CUSOLVER(cusolverDnSpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); float* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(float))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(float))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnSpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); + CHECK_CUSOLVER(cusolverDnSpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); + CHECK_CUDA(cudaFree(work)); } static inline void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, double * A, const int& lda) { int lwork; - cusolverErrcheck(cusolverDnDpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); + CHECK_CUSOLVER(cusolverDnDpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); double* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(double))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(double))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnDpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); + CHECK_CUSOLVER(cusolverDnDpotri(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, nullptr)); + CHECK_CUDA(cudaFree(work)); } static inline void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) { int lwork; - cusolverErrcheck(cusolverDnCpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); + CHECK_CUSOLVER(cusolverDnCpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); cuComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnCpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); + CHECK_CUSOLVER(cusolverDnCpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); + CHECK_CUDA(cudaFree(work)); } static inline void potri (cusolverDnHandle_t& cusolver_handle, const char& uplo, const char& diag, const int& n, std::complex * A, const int& lda) { int lwork; - cusolverErrcheck(cusolverDnZpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); + CHECK_CUSOLVER(cusolverDnZpotri_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, &lwork)); cuDoubleComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnZpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); - cudaErrcheck(cudaFree(work)); + CHECK_CUSOLVER(cusolverDnZpotri(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), n, work, lwork, nullptr)); + CHECK_CUDA(cudaFree(work)); } @@ -88,56 +99,56 @@ void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, { int lwork; int *info = nullptr; - cudaErrcheck(cudaMalloc((void**)&info, 1 * sizeof(int))); - cusolverErrcheck(cusolverDnSpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); + CHECK_CUDA(cudaMalloc((void**)&info, 1 * sizeof(int))); + CHECK_CUSOLVER(cusolverDnSpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); float* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(float))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(float))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnSpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, info)); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(info)); + CHECK_CUSOLVER(cusolverDnSpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, info)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(info)); } static inline void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, double * A, const int& lda) { int lwork; int *info = nullptr; - cudaErrcheck(cudaMalloc((void**)&info, 1 * sizeof(int))); - cusolverErrcheck(cusolverDnDpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); + CHECK_CUDA(cudaMalloc((void**)&info, 1 * sizeof(int))); + CHECK_CUSOLVER(cusolverDnDpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, A, n, &lwork)); double* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(double))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(double))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnDpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, info)); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(info)); + CHECK_CUSOLVER(cusolverDnDpotrf(cusolver_handle, cublas_fill_mode(uplo), n, A, n, work, lwork, info)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(info)); } static inline void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) { int lwork; int *info = nullptr; - cudaErrcheck(cudaMalloc((void**)&info, 1 * sizeof(int))); - cusolverErrcheck(cusolverDnCpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, &lwork)); + CHECK_CUDA(cudaMalloc((void**)&info, 1 * sizeof(int))); + CHECK_CUSOLVER(cusolverDnCpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, &lwork)); cuComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(cuComplex))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnCpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, work, lwork, info)); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(info)); + CHECK_CUSOLVER(cusolverDnCpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, work, lwork, info)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(info)); } static inline void potrf (cusolverDnHandle_t& cusolver_handle, const char& uplo, const int& n, std::complex * A, const int& lda) { int lwork; int *info = nullptr; - cudaErrcheck(cudaMalloc((void**)&info, 1 * sizeof(int))); - cusolverErrcheck(cusolverDnZpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, &lwork)); + CHECK_CUDA(cudaMalloc((void**)&info, 1 * sizeof(int))); + CHECK_CUSOLVER(cusolverDnZpotrf_bufferSize(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, &lwork)); cuDoubleComplex* work; - cudaErrcheck(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); + CHECK_CUDA(cudaMalloc((void**)&work, lwork * sizeof(cuDoubleComplex))); // Perform Cholesky decomposition - cusolverErrcheck(cusolverDnZpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, work, lwork, info)); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(info)); + CHECK_CUSOLVER(cusolverDnZpotrf(cusolver_handle, cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, work, lwork, info)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(info)); } @@ -149,23 +160,23 @@ void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& u int h_info = 0; int* d_info = nullptr; float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnSsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnSsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnSsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double * W) @@ -175,23 +186,23 @@ void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& u int h_info = 0; int* d_info = nullptr; double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnDsyevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnDsyevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, float * W) @@ -201,23 +212,23 @@ void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& u int h_info = 0; int* d_info = nullptr; cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnCheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnCheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnCheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnCheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, double* W) @@ -227,23 +238,23 @@ void heevd (cusolverDnHandle_t& cusolver_handle, const char& jobz, const char& u int h_info = 0; int* d_info = nullptr; cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnZheevd_bufferSize(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnZheevd(cusolver_handle, cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } // ===================================================================================================== @@ -267,13 +278,13 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, int* d_info = nullptr; float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); cusolverEigRange_t range_t = cublas_eig_range(range); - cusolverErrcheck(cusolverDnSsyevdx_bufferSize( + CHECK_CUSOLVER(cusolverDnSsyevdx_bufferSize( cusolver_handle, jobz_t, range_t, uplo_t, n, d_A, lda, @@ -283,10 +294,10 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, &lwork // ← int* lwork (output) )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); // Main call - cusolverErrcheck(cusolverDnSsyevdx( + CHECK_CUSOLVER(cusolverDnSsyevdx( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -299,7 +310,7 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { cudaFree(d_info); cudaFree(d_work); throw std::runtime_error("heevdx (float) failed with info = " + std::to_string(h_info)); @@ -327,13 +338,13 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, int* d_info = nullptr; double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); cusolverEigRange_t range_t = cublas_eig_range(range); - cusolverErrcheck(cusolverDnDsyevdx_bufferSize( + CHECK_CUSOLVER(cusolverDnDsyevdx_bufferSize( cusolver_handle, jobz_t, range_t, uplo_t, n, d_A, lda, @@ -343,9 +354,9 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); - cusolverErrcheck(cusolverDnDsyevdx( + CHECK_CUSOLVER(cusolverDnDsyevdx( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -358,7 +369,7 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { cudaFree(d_info); cudaFree(d_work); throw std::runtime_error("heevdx (double) failed with info = " + std::to_string(h_info)); @@ -386,13 +397,13 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, int* d_info = nullptr; cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); cusolverEigRange_t range_t = cublas_eig_range(range); - cusolverErrcheck(cusolverDnCheevdx_bufferSize( + CHECK_CUSOLVER(cusolverDnCheevdx_bufferSize( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -403,9 +414,9 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); - cusolverErrcheck(cusolverDnCheevdx( + CHECK_CUSOLVER(cusolverDnCheevdx( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -418,7 +429,7 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { cudaFree(d_info); cudaFree(d_work); throw std::runtime_error("heevdx (complex) failed with info = " + std::to_string(h_info)); @@ -446,13 +457,13 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, int* d_info = nullptr; cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); cusolverEigRange_t range_t = cublas_eig_range(range); - cusolverErrcheck(cusolverDnZheevdx_bufferSize( + CHECK_CUSOLVER(cusolverDnZheevdx_bufferSize( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -463,9 +474,9 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); - cusolverErrcheck(cusolverDnZheevdx( + CHECK_CUSOLVER(cusolverDnZheevdx( cusolver_handle, jobz_t, range_t, uplo_t, n, @@ -478,7 +489,7 @@ void heevdx(cusolverDnHandle_t& cusolver_handle, )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { cudaFree(d_info); cudaFree(d_work); throw std::runtime_error("heevdx (complex) failed with info = " + std::to_string(h_info)); @@ -496,23 +507,23 @@ void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& j int h_info = 0; int* d_info = nullptr; float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnSsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, B, ldb, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnSsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnSsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, B, ldb, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, double* A, const int& lda, double* B, const int& ldb, double * W) @@ -522,23 +533,23 @@ void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& j int h_info = 0; int* d_info = nullptr; double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnDsygvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, B, ldb, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnDsygvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, A, lda, B, ldb, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, float* W) @@ -548,23 +559,23 @@ void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& j int h_info = 0; int* d_info = nullptr; cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnChegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnChegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnChegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnChegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } static inline void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& jobz, const char& uplo, const int& n, std::complex* A, const int& lda, std::complex* B, const int& ldb, double* W) @@ -574,23 +585,23 @@ void hegvd (cusolverDnHandle_t& cusolver_handle, const int& itype, const char& j int h_info = 0; int* d_info = nullptr; cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZhegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnZhegvd_bufferSize(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZhegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), + CHECK_CUSOLVER(cusolverDnZhegvd(cusolver_handle, cublas_eig_type(itype), cublas_eig_mode(jobz), cublas_fill_mode(uplo), n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, d_work, lwork, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("heevd: failed to invert matrix"); } - cudaErrcheck(cudaFree(d_info)); - cudaErrcheck(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); } // ===================================================================================================== @@ -623,14 +634,14 @@ void hegvdx( float *d_work = nullptr; // Allocate device info - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // Copy A and B to temporary buffers since sygvdx may modify them float *d_A_copy = nullptr, *d_B_copy = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_A_copy, sizeof(float) * n * lda)); - cudaErrcheck(cudaMalloc((void**)&d_B_copy, sizeof(float) * n * lda)); - cudaErrcheck(cudaMemcpy(d_A_copy, d_A, sizeof(float) * n * lda, cudaMemcpyDeviceToDevice)); - cudaErrcheck(cudaMemcpy(d_B_copy, d_B, sizeof(float) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMalloc((void**)&d_A_copy, sizeof(float) * n * lda)); + CHECK_CUDA(cudaMalloc((void**)&d_B_copy, sizeof(float) * n * lda)); + CHECK_CUDA(cudaMemcpy(d_A_copy, d_A, sizeof(float) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_B_copy, d_B, sizeof(float) * n * lda, cudaMemcpyDeviceToDevice)); // Set parameters cusolverEigType_t itype_t = cublas_eig_type(itype); @@ -639,7 +650,7 @@ void hegvdx( cublasFillMode_t uplo_t = cublas_fill_mode(uplo); // Query workspace size - cusolverErrcheck(cusolverDnSsygvdx_bufferSize( + CHECK_CUSOLVER(cusolverDnSsygvdx_bufferSize( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -652,10 +663,10 @@ void hegvdx( )); // Allocate workspace - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); // Main call - cusolverErrcheck(cusolverDnSsygvdx( + CHECK_CUSOLVER(cusolverDnSsygvdx( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -670,7 +681,7 @@ void hegvdx( // Check result int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info < 0) { throw std::runtime_error("hegvdx (float): illegal argument #" + std::to_string(-h_info)); } else if (h_info > 0) { @@ -686,7 +697,7 @@ void hegvdx( // If jobz == 'V', copy eigenvectors from A (which now contains Z) to output if (jobz == 'V') { const int m = (*h_meig); // number of eigenvectors computed - cudaErrcheck(cudaMemcpy(d_eigen_vec, d_A_copy, sizeof(float) * n * m, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_eigen_vec, d_A_copy, sizeof(float) * n * m, cudaMemcpyDeviceToDevice)); } // Cleanup @@ -721,20 +732,20 @@ void hegvdx( int *d_info = nullptr; double *d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); double *d_A_copy = nullptr, *d_B_copy = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_A_copy, sizeof(double) * n * lda)); - cudaErrcheck(cudaMalloc((void**)&d_B_copy, sizeof(double) * n * lda)); - cudaErrcheck(cudaMemcpy(d_A_copy, d_A, sizeof(double) * n * lda, cudaMemcpyDeviceToDevice)); - cudaErrcheck(cudaMemcpy(d_B_copy, d_B, sizeof(double) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMalloc((void**)&d_A_copy, sizeof(double) * n * lda)); + CHECK_CUDA(cudaMalloc((void**)&d_B_copy, sizeof(double) * n * lda)); + CHECK_CUDA(cudaMemcpy(d_A_copy, d_A, sizeof(double) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_B_copy, d_B, sizeof(double) * n * lda, cudaMemcpyDeviceToDevice)); cusolverEigType_t itype_t = cublas_eig_type(itype); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cusolverEigRange_t range_t = cublas_eig_range(range); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); - cusolverErrcheck(cusolverDnDsygvdx_bufferSize( + CHECK_CUSOLVER(cusolverDnDsygvdx_bufferSize( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -746,9 +757,9 @@ void hegvdx( &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); - cusolverErrcheck(cusolverDnDsygvdx( + CHECK_CUSOLVER(cusolverDnDsygvdx( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -762,7 +773,7 @@ void hegvdx( )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info < 0) { throw std::runtime_error("hegvdx (double): illegal argument #" + std::to_string(-h_info)); } else if (h_info > 0) { @@ -775,7 +786,7 @@ void hegvdx( if (jobz == 'V') { const int m = (*h_meig); - cudaErrcheck(cudaMemcpy(d_eigen_vec, d_A_copy, sizeof(double) * n * m, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_eigen_vec, d_A_copy, sizeof(double) * n * m, cudaMemcpyDeviceToDevice)); } cudaFree(d_info); @@ -809,20 +820,20 @@ void hegvdx( int *d_info = nullptr; cuComplex *d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cuComplex *d_A_copy = nullptr, *d_B_copy = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_A_copy, sizeof(cuComplex) * n * lda)); - cudaErrcheck(cudaMalloc((void**)&d_B_copy, sizeof(cuComplex) * n * lda)); - cudaErrcheck(cudaMemcpy(d_A_copy, reinterpret_cast(d_A), sizeof(cuComplex) * n * lda, cudaMemcpyDeviceToDevice)); - cudaErrcheck(cudaMemcpy(d_B_copy, reinterpret_cast(d_B), sizeof(cuComplex) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMalloc((void**)&d_A_copy, sizeof(cuComplex) * n * lda)); + CHECK_CUDA(cudaMalloc((void**)&d_B_copy, sizeof(cuComplex) * n * lda)); + CHECK_CUDA(cudaMemcpy(d_A_copy, reinterpret_cast(d_A), sizeof(cuComplex) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_B_copy, reinterpret_cast(d_B), sizeof(cuComplex) * n * lda, cudaMemcpyDeviceToDevice)); cusolverEigType_t itype_t = cublas_eig_type(itype); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cusolverEigRange_t range_t = cublas_eig_range(range); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); - cusolverErrcheck(cusolverDnChegvdx_bufferSize( + CHECK_CUSOLVER(cusolverDnChegvdx_bufferSize( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -834,9 +845,9 @@ void hegvdx( &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); - cusolverErrcheck(cusolverDnChegvdx( + CHECK_CUSOLVER(cusolverDnChegvdx( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -850,7 +861,7 @@ void hegvdx( )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info < 0) { throw std::runtime_error("hegvdx (complex): illegal argument #" + std::to_string(-h_info)); } else if (h_info > 0) { @@ -863,7 +874,7 @@ void hegvdx( if (jobz == 'V') { const int m = (*h_meig); - cudaErrcheck(cudaMemcpy(reinterpret_cast(d_eigen_vec), d_A_copy, sizeof(cuComplex) * n * m, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(reinterpret_cast(d_eigen_vec), d_A_copy, sizeof(cuComplex) * n * m, cudaMemcpyDeviceToDevice)); } cudaFree(d_info); @@ -897,20 +908,20 @@ void hegvdx( int *d_info = nullptr; cuDoubleComplex *d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); cuDoubleComplex *d_A_copy = nullptr, *d_B_copy = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_A_copy, sizeof(cuDoubleComplex) * n * lda)); - cudaErrcheck(cudaMalloc((void**)&d_B_copy, sizeof(cuDoubleComplex) * n * lda)); - cudaErrcheck(cudaMemcpy(d_A_copy, reinterpret_cast(d_A), sizeof(cuDoubleComplex) * n * lda, cudaMemcpyDeviceToDevice)); - cudaErrcheck(cudaMemcpy(d_B_copy, reinterpret_cast(d_B), sizeof(cuDoubleComplex) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMalloc((void**)&d_A_copy, sizeof(cuDoubleComplex) * n * lda)); + CHECK_CUDA(cudaMalloc((void**)&d_B_copy, sizeof(cuDoubleComplex) * n * lda)); + CHECK_CUDA(cudaMemcpy(d_A_copy, reinterpret_cast(d_A), sizeof(cuDoubleComplex) * n * lda, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(d_B_copy, reinterpret_cast(d_B), sizeof(cuDoubleComplex) * n * lda, cudaMemcpyDeviceToDevice)); cusolverEigType_t itype_t = cublas_eig_type(itype); cusolverEigMode_t jobz_t = cublas_eig_mode(jobz); cusolverEigRange_t range_t = cublas_eig_range(range); cublasFillMode_t uplo_t = cublas_fill_mode(uplo); - cusolverErrcheck(cusolverDnZhegvdx_bufferSize( + CHECK_CUSOLVER(cusolverDnZhegvdx_bufferSize( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -922,9 +933,9 @@ void hegvdx( &lwork )); - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); - cusolverErrcheck(cusolverDnZhegvdx( + CHECK_CUSOLVER(cusolverDnZhegvdx( cusolver_handle, itype_t, jobz_t, range_t, uplo_t, n, @@ -938,7 +949,7 @@ void hegvdx( )); int h_info = 0; - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info < 0) { throw std::runtime_error("hegvdx (complex): illegal argument #" + std::to_string(-h_info)); } else if (h_info > 0) { @@ -951,7 +962,7 @@ void hegvdx( if (jobz == 'V') { const int m = (*h_meig); - cudaErrcheck(cudaMemcpy(reinterpret_cast(d_eigen_vec), d_A_copy, sizeof(cuDoubleComplex) * n * m, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(reinterpret_cast(d_eigen_vec), d_A_copy, sizeof(cuDoubleComplex) * n * m, cudaMemcpyDeviceToDevice)); } cudaFree(d_info); @@ -970,24 +981,24 @@ void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, floa int h_info = 0; int* d_info = nullptr; float* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnSgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); + CHECK_CUSOLVER(cusolverDnSgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(float) * lwork)); // Perform LU decomposition - cusolverErrcheck(cusolverDnSgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); + CHECK_CUSOLVER(cusolverDnSgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrf: failed to compute LU factorization"); } - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, double* A, const int& lda, int* ipiv) @@ -997,24 +1008,24 @@ void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, doub int h_info = 0; int* d_info = nullptr; double* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); + CHECK_CUSOLVER(cusolverDnDgetrf_bufferSize(cusolver_handle, m, n, A, lda, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(double) * lwork)); // Perform LU decomposition - cusolverErrcheck(cusolverDnDgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); + CHECK_CUSOLVER(cusolverDnDgetrf(cusolver_handle, m, n, A, lda, d_work, ipiv, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrf: failed to compute LU factorization"); } - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std::complex* A, const int& lda, int* ipiv) @@ -1024,24 +1035,24 @@ void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std: int h_info = 0; int* d_info = nullptr; cuComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnCgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); + CHECK_CUSOLVER(cusolverDnCgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuComplex) * lwork)); // Perform LU decomposition - cusolverErrcheck(cusolverDnCgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); + CHECK_CUSOLVER(cusolverDnCgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrf: failed to compute LU factorization"); } - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std::complex* A, const int& lda, int* ipiv) @@ -1051,24 +1062,24 @@ void getrf(cusolverDnHandle_t& cusolver_handle, const int& m, const int& n, std: int h_info = 0; int* d_info = nullptr; cuDoubleComplex* d_work = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); + CHECK_CUSOLVER(cusolverDnZgetrf_bufferSize(cusolver_handle, m, n, reinterpret_cast(A), lda, &lwork)); // allocate memory - cudaErrcheck(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&d_work, sizeof(cuDoubleComplex) * lwork)); // Perform LU decomposition - cusolverErrcheck(cusolverDnZgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); + CHECK_CUSOLVER(cusolverDnZgetrf(cusolver_handle, m, n, reinterpret_cast(A), lda, d_work, ipiv, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrf: failed to compute LU factorization"); } - cudaErrcheck(cudaFree(d_work)); - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } static inline @@ -1076,66 +1087,493 @@ void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, { int h_info = 0; int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); - cusolverErrcheck(cusolverDnSgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); + CHECK_CUSOLVER(cusolverDnSgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrs: failed to solve the linear system"); } - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, double* A, const int& lda, const int* ipiv, double* B, const int& ldb) { int h_info = 0; int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); - cusolverErrcheck(cusolverDnDgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); + CHECK_CUSOLVER(cusolverDnDgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, A, lda, ipiv, B, ldb, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrs: failed to solve the linear system"); } - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, std::complex* A, const int& lda, const int* ipiv, std::complex* B, const int& ldb) { int h_info = 0; int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); - cusolverErrcheck(cusolverDnCgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); + CHECK_CUSOLVER(cusolverDnCgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrs: failed to solve the linear system"); } - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_info)); } static inline void getrs(cusolverDnHandle_t& cusolver_handle, const char& trans, const int& n, const int& nrhs, std::complex* A, const int& lda, const int* ipiv, std::complex* B, const int& ldb) { int h_info = 0; int* d_info = nullptr; - cudaErrcheck(cudaMalloc((void**)&d_info, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_info, sizeof(int))); - cusolverErrcheck(cusolverDnZgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); + CHECK_CUSOLVER(cusolverDnZgetrs(cusolver_handle, GetCublasOperation(trans), n, nrhs, reinterpret_cast(A), lda, ipiv, reinterpret_cast(B), ldb, d_info)); - cudaErrcheck(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); if (h_info != 0) { throw std::runtime_error("getrs: failed to solve the linear system"); } - cudaErrcheck(cudaFree(d_info)); + CHECK_CUDA(cudaFree(d_info)); +} + +// QR decomposition +// geqrf, orgqr +// Note: +// there are two cusolver geqrf +// one is cusolverDngeqrf +// one is cusolverDnXgeqrf +// which one is better? +// +// template +// static inline void geqrf( +// cusolverDnHandle_t& cusolver_handle, +// const int64_t m, +// const int64_t n, +// T* d_A, // device matrix A (m x n, column-major) +// const int64_t lda, +// T* d_tau // output: scalar factors of elementary reflectors +// ) { +// // query workspace size +// int *d_info = nullptr; /* error info */ +// +// size_t workspaceInBytesOnDevice = 0; /* size of workspace */ +// void *d_work = nullptr; /* device workspace */ +// size_t workspaceInBytesOnHost = 0; /* size of workspace */ +// void *h_work = nullptr; /* host workspace */ +// +// CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); +// +// cusolverDnParams_t params = NULL; +// CHECK_CUSOLVER(cusolverDnCreateParams(¶ms)); +// +// CHECK_CUSOLVER(cusolverDnXgeqrf_bufferSize( +// cusolver_handle, +// params, +// m, n, +// traits::cuda_data_type, +// d_A, +// lda, +// traits::cuda_data_type, +// d_tau, +// traits::cuda_data_type, +// &workspaceInBytesOnDevice, +// &workspaceInBytesOnHost +// )); +// +// // allocate device workspace +// CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), workspaceInBytesOnDevice)); +// +// // allocate host workspace +// if (workspaceInBytesOnHost > 0) { +// h_work = reinterpret_cast(malloc(workspaceInBytesOnHost)); +// if (h_work == nullptr) { +// throw std::runtime_error("Error: h_work not allocated."); +// } +// } +// +// // QR factorization +// CHECK_CUSOLVER(cusolverDnXgeqrf( +// cusolver_handle, +// params, +// m, n, +// traits::cuda_data_type, +// d_A, +// lda, +// traits::cuda_data_type, +// d_tau, +// traits::cuda_data_type, +// d_work, +// workspaceInBytesOnDevice, +// h_work, +// workspaceInBytesOnHost, +// d_info +// )); +// +// // check info +// int h_info = 0; +// CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); +// if (h_info != 0) { +// // std::printf("%d-th parameter is wrong \n", -info); +// // print error message +// std::cout << -h_info << "th parameter is wrong" << std::endl; +// throw std::runtime_error("geqrf: failed to compute QR decomposition"); +// } +// +// // clean workspace +// CHECK_CUDA(cudaFree(d_info)); +// CHECK_CUDA(cudaFree(d_work)); +// if (h_work) free(h_work); +// CHECK_CUSOLVER(cusolverDnDestroyParams(params)); +// } + +// geqrf + +// --- float --- +static inline void geqrf( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + float* d_A, + const int lda, + float* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnSgeqrf_bufferSize( + cusolver_handle, m, n, d_A, lda, &lwork)); + + float* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(float) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnSgeqrf( + cusolver_handle, m, n, d_A, lda, d_tau, d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "geqrf (S): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("geqrf (S): QR factorization failed"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- double --- +static inline void geqrf( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + double* d_A, + const int lda, + double* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnDgeqrf_bufferSize( + cusolver_handle, m, n, d_A, lda, &lwork)); + + double* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(double) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnDgeqrf( + cusolver_handle, m, n, d_A, lda, d_tau, d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "geqrf (D): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("geqrf (D): QR factorization failed"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- std::complex --- +static inline void geqrf( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + std::complex* d_A, + const int lda, + std::complex* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnCgeqrf_bufferSize( + cusolver_handle, m, n, + reinterpret_cast(d_A), + lda, + &lwork // ← 这里才是 lwork 的地址! + )); + + cuComplex* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(cuComplex) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnCgeqrf( + cusolver_handle, m, n, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), // ← 这里才是 d_tau + d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "geqrf (C): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("geqrf (C): QR factorization failed"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- std::complex --- +static inline void geqrf( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + std::complex* d_A, + const int lda, + std::complex* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnZgeqrf_bufferSize( + cusolver_handle, m, n, + reinterpret_cast(d_A), + lda, + &lwork + )); + + cuDoubleComplex* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(cuDoubleComplex) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnZgeqrf( + cusolver_handle, m, n, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), + d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "geqrf (Z): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("geqrf (Z): QR factorization failed"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + + +// --- float --- +static inline void orgqr( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + const int k, + float* d_A, + const int lda, + float* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnSorgqr_bufferSize( + cusolver_handle, m, n, k, d_A, lda, d_tau, &lwork)); + + float* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(float) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnSorgqr( + cusolver_handle, m, n, k, d_A, lda, d_tau, d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "orgqr (S): info = " << h_info << " (failure at parameter " << -h_info << ")" << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("orgqr (S): failed to generate Q matrix"); + } + + // clean workspace + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- double --- +static inline void orgqr( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + const int k, + double* d_A, + const int lda, + double* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnDorgqr_bufferSize( + cusolver_handle, m, n, k, d_A, lda, d_tau, &lwork)); + + double* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(double) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnDorgqr( + cusolver_handle, m, n, k, d_A, lda, d_tau, d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "orgqr (D): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("orgqr (D): failed to generate Q matrix"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- std::complex --- +static inline void orgqr( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + const int k, + std::complex* d_A, + const int lda, + std::complex* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnCungqr_bufferSize( + cusolver_handle, m, n, k, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), + &lwork)); + + cuComplex* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(cuComplex) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnCungqr( + cusolver_handle, m, n, k, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), + d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "orgqr (C): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("orgqr (C): failed to generate Q matrix"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); +} + +// --- std::complex --- +static inline void orgqr( + cusolverDnHandle_t& cusolver_handle, + const int m, + const int n, + const int k, + std::complex* d_A, + const int lda, + std::complex* d_tau +) { + int lwork = 0; + CHECK_CUSOLVER(cusolverDnZungqr_bufferSize( + cusolver_handle, m, n, k, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), + &lwork)); + + cuDoubleComplex* d_work = nullptr; + int* d_info = nullptr; + + if (lwork > 0) { + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_work), sizeof(cuDoubleComplex) * lwork)); + } + CHECK_CUDA(cudaMalloc(reinterpret_cast(&d_info), sizeof(int))); + + CHECK_CUSOLVER(cusolverDnZungqr( + cusolver_handle, m, n, k, + reinterpret_cast(d_A), + lda, + reinterpret_cast(d_tau), + d_work, lwork, d_info)); + + int h_info = 0; + CHECK_CUDA(cudaMemcpy(&h_info, d_info, sizeof(int), cudaMemcpyDeviceToHost)); + if (h_info != 0) { + std::cout << "orgqr (Z): info = " << h_info << std::endl; + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); + throw std::runtime_error("orgqr (Z): failed to generate Q matrix"); + } + + if (d_work) CHECK_CUDA(cudaFree(d_work)); + CHECK_CUDA(cudaFree(d_info)); } + } // namespace cuSolverConnector } // namespace container diff --git a/source/source_base/module_container/base/third_party/lapack.h b/source/source_base/module_container/base/third_party/lapack.h index 6e272d2b29..34881055fd 100644 --- a/source/source_base/module_container/base/third_party/lapack.h +++ b/source/source_base/module_container/base/third_party/lapack.h @@ -41,124 +41,172 @@ extern "C" { -int ilaenv_(int* ispec,const char* name,const char* opts, - const int* n1,const int* n2,const int* n3,const int* n4); +// ILAENV - environment inquiry +int ilaenv_(const int* ispec, const char* name, const char* opts, + const int* n1, const int* n2, const int* n3, const int* n4); - -// solve the generalized eigenproblem Ax=eBx, where A is Hermitian and complex couble -// zhegv_ & zhegvd_ returns all eigenvalues while zhegvx_ returns selected ones +// Generalized symmetric-definite eigenproblems (divide-and-conquer) void ssygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, float* a, const int* lda, - const float* b, const int* ldb, float* w, - float* work, int* lwork, - int* iwork, int* liwork, int* info); + float* b, const int* ldb, + float* w, + float* work, const int* lwork, + int* iwork, const int* liwork, + int* info); void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, double* a, const int* lda, - const double* b, const int* ldb, double* w, - double* work, int* lwork, - int* iwork, int* liwork, int* info); + double* b, const int* ldb, + double* w, + double* work, const int* lwork, + int* iwork, const int* liwork, + int* info); void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, std::complex* a, const int* lda, - const std::complex* b, const int* ldb, float* w, - std::complex* work, int* lwork, float* rwork, int* lrwork, - int* iwork, int* liwork, int* info); + std::complex* b, const int* ldb, + float* w, + std::complex* work, const int* lwork, + float* rwork, const int* lrwork, + int* iwork, const int* liwork, + int* info); +void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + double* w, + std::complex* work, const int* lwork, + double* rwork, const int* lrwork, + int* iwork, const int* liwork, + int* info); + +// Generalized symmetric-definite eigenproblems (selected eigenvalues/vectors) void ssygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, const int* n, float* A, const int* lda, float* B, const int* ldb, const float* vl, const float* vu, const int* il, const int* iu, - const float* abstol, const int* m, float* w, float* Z, const int* ldz, + const float* abstol, int* m, float* w, float* Z, const int* ldz, float* work, const int* lwork, int* iwork, int* ifail, int* info); + void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, const int* n, double* A, const int* lda, double* B, const int* ldb, const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, const int* m, double* w, double* Z, const int* ldz, + const double* abstol, int* m, double* w, double* Z, const int* ldz, double* work, const int* lwork, int* iwork, int* ifail, int* info); + void chegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, const int* n, std::complex* A, const int* lda, std::complex* B, const int* ldb, const float* vl, const float* vu, const int* il, const int* iu, - const float* abstol, const int* m, float* w, std::complex* Z, const int* ldz, + const float* abstol, int* m, float* w, std::complex* Z, const int* ldz, std::complex* work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); + void zhegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, const int* n, std::complex* A, const int* lda, std::complex* B, const int* ldb, const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, const int* m, double* w, std::complex* Z, const int* ldz, + const double* abstol, int* m, double* w, std::complex* Z, const int* ldz, std::complex* work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); -void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, double* w, - std::complex* work, int* lwork, double* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - +// Standard symmetric eigenproblems (selected) void ssyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - float *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, float *z, const int *ldz, - float *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); + float* a, const int* lda, + const float* vl, const float* vu, const int* il, const int* iu, + const float* abstol, int* m, float* w, float* z, const int* ldz, + float* work, const int* lwork, int* iwork, int* ifail, int* info); + void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - double *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, double *z, const int *ldz, - double *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); + double* a, const int* lda, + const double* vl, const double* vu, const int* il, const int* iu, + const double* abstol, int* m, double* w, double* z, const int* ldz, + double* work, const int* lwork, int* iwork, int* ifail, int* info); + void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); + std::complex* a, const int* lda, + const float* vl, const float* vu, const int* il, const int* iu, + const float* abstol, int* m, float* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); + void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - -void ssyevd_(const char *jobz, const char *uplo, const int *n, - float *a, const int *lda, float *w, - float *work, int *lwork, - int *iwork, int *liwork, int *info); -void dsyevd_(const char *jobz, const char *uplo, const int *n, - double *a, const int *lda, double *w, - double *work, int *lwork, - int *iwork, int *liwork, int *info); -void cheevd_(const char *jobz, const char *uplo, const int *n, - std::complex *a, const int *lda, float *w, - std::complex *work, int *lwork, float *rwork, int *lrwork, - int *iwork, int *liwork, int *info); -void zheevd_(const char *jobz, const char *uplo, const int *n, - std::complex *a, const int *lda, double *w, - std::complex *work, int *lwork, double *rwork, int *lrwork, - int *iwork, int *liwork, int *info); - -void spotrf_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); -void dpotrf_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); -void cpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); -void zpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - -void spotri_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); -void dpotri_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); -void cpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); -void zpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); + std::complex* a, const int* lda, + const double* vl, const double* vu, const int* il, const int* iu, + const double* abstol, int* m, double* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); +// Standard symmetric eigenproblems (divide-and-conquer) +void ssyevd_(const char* jobz, const char* uplo, const int* n, + float* a, const int* lda, float* w, + float* work, const int* lwork, + int* iwork, const int* liwork, int* info); + +void dsyevd_(const char* jobz, const char* uplo, const int* n, + double* a, const int* lda, double* w, + double* work, const int* lwork, + int* iwork, const int* liwork, int* info); + +void cheevd_(const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, float* w, + std::complex* work, const int* lwork, float* rwork, const int* lrwork, + int* iwork, const int* liwork, int* info); + +void zheevd_(const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, double* w, + std::complex* work, const int* lwork, double* rwork, const int* lrwork, + int* iwork, const int* liwork, int* info); + +// Cholesky factorization +void spotrf_(const char* uplo, const int* n, float* A, const int* lda, int* info); +void dpotrf_(const char* uplo, const int* n, double* A, const int* lda, int* info); +void cpotrf_(const char* uplo, const int* n, std::complex* A, const int* lda, int* info); +void zpotrf_(const char* uplo, const int* n, std::complex* A, const int* lda, int* info); + +// Inverse using Cholesky factorization +void spotri_(const char* uplo, const int* n, float* A, const int* lda, int* info); +void dpotri_(const char* uplo, const int* n, double* A, const int* lda, int* info); +void cpotri_(const char* uplo, const int* n, std::complex* A, const int* lda, int* info); +void zpotri_(const char* uplo, const int* n, std::complex* A, const int* lda, int* info); + +// Inverse of triangular matrix void strtri_(const char* uplo, const char* diag, const int* n, float* a, const int* lda, int* info); void dtrtri_(const char* uplo, const char* diag, const int* n, double* a, const int* lda, int* info); void ctrtri_(const char* uplo, const char* diag, const int* n, std::complex* a, const int* lda, int* info); void ztrtri_(const char* uplo, const char* diag, const int* n, std::complex* a, const int* lda, int* info); +// LU factorization void sgetrf_(const int* m, const int* n, float* a, const int* lda, int* ipiv, int* info); void dgetrf_(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); void cgetrf_(const int* m, const int* n, std::complex* a, const int* lda, int* ipiv, int* info); void zgetrf_(const int* m, const int* n, std::complex* a, const int* lda, int* ipiv, int* info); +// Inverse using LU factorization void sgetri_(const int* n, float* A, const int* lda, const int* ipiv, float* work, const int* lwork, int* info); void dgetri_(const int* n, double* A, const int* lda, const int* ipiv, double* work, const int* lwork, int* info); void cgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); void zgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); -void sgetrs_(const char* trans, const int* n, const int* nrhs, const float* A, const int* lda, const int* ipiv, float* B, const int* ldb, int* info); -void dgetrs_(const char* trans, const int* n, const int* nrhs, const double* A, const int* lda, const int* ipiv, double* B, const int* ldb, int* info); -void cgetrs_(const char* trans, const int* n, const int* nrhs, const std::complex* A, const int* lda, const int* ipiv, std::complex* B, const int* ldb, int* info); -void zgetrs_(const char* trans, const int* n, const int* nrhs, const std::complex* A, const int* lda, const int* ipiv, std::complex* B, const int* ldb, int* info); +// Solve linear system using LU factorization +void sgetrs_(const char* trans, const int* n, const int* nrhs, + const float* A, const int* lda, const int* ipiv, + float* B, const int* ldb, int* info); +void dgetrs_(const char* trans, const int* n, const int* nrhs, + const double* A, const int* lda, const int* ipiv, + double* B, const int* ldb, int* info); +void cgetrs_(const char* trans, const int* n, const int* nrhs, + const std::complex* A, const int* lda, const int* ipiv, + std::complex* B, const int* ldb, int* info); +void zgetrs_(const char* trans, const int* n, const int* nrhs, + const std::complex* A, const int* lda, const int* ipiv, + std::complex* B, const int* ldb, int* info); + +// QR factorization +// build R and Householder +void sgeqrf_(const int* m, const int* n, float* A, const int* lda, float* tau, float *work, const int* lwork, int* info); +void dgeqrf_(const int* m, const int* n, double* A, const int* lda, double* tau, double *work, const int* lwork, int* info); +void cgeqrf_(const int* m, const int* n, std::complex* A, const int* lda, std::complex* tau, std::complex *work, const int* lwork, int* info); +void zgeqrf_(const int* m, const int* n, std::complex* A, const int* lda, std::complex* tau, std::complex *work, const int* lwork, int* info); +// make explicit Q +void sorgqr_(const int* m, const int* n, const int* k, float* A, const int* lda, const float* tau, float* work, const int* lwork, int* info); +void dorgqr_(const int* m, const int* n, const int* k, double* A, const int* lda, const double* tau, double* work, const int* lwork, int* info); +void cungqr_(const int* m, const int* n, const int* k, std::complex* A, const int* lda, const std::complex* tau, std::complex *work, const int* lwork, int* info); +void zungqr_(const int* m, const int* n, const int* k, std::complex* A, const int* lda, const std::complex* tau, std::complex *work, const int* lwork, int* info); + } // Class LapackConnector provide the connector to fortran lapack routine. @@ -178,7 +226,7 @@ int ilaenv( int ispec, const char *name,const char *opts,const int n1,const int static inline void hegvd(const int itype, const char jobz, const char uplo, const int n, float* a, const int lda, - const float* b, const int ldb, float* w, + float* b, const int ldb, float* w, float* work, int lwork, float* rwork, int lrwork, int* iwork, int liwork, int info) { @@ -192,7 +240,7 @@ void hegvd(const int itype, const char jobz, const char uplo, const int n, static inline void hegvd(const int itype, const char jobz, const char uplo, const int n, double* a, const int lda, - const double* b, const int ldb, double* w, + double* b, const int ldb, double* w, double* work, int lwork, double* rwork, int lrwork, int* iwork, int liwork, int info) { @@ -205,7 +253,7 @@ void hegvd(const int itype, const char jobz, const char uplo, const int n, static inline void hegvd(const int itype, const char jobz, const char uplo, const int n, std::complex* a, const int lda, - const std::complex* b, const int ldb, float* w, + std::complex* b, const int ldb, float* w, std::complex* work, int lwork, float* rwork, int lrwork, int* iwork, int liwork, int info) { @@ -219,7 +267,7 @@ void hegvd(const int itype, const char jobz, const char uplo, const int n, static inline void hegvd(const int itype, const char jobz, const char uplo, const int n, std::complex* a, const int lda, - const std::complex* b, const int ldb, double* w, + std::complex* b, const int ldb, double* w, std::complex* work, int lwork, double* rwork, int lrwork, int* iwork, int liwork, int info) { @@ -239,7 +287,7 @@ static inline void hegvx(const int itype, const char jobz, const char range, const char uplo, const int n, float* a, const int lda, float* b, const int ldb, const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, float* z, const int ldz, + int m, float* w, float* z, const int ldz, float* work, const int lwork, float* rwork, int* iwork, int* ifail, int& info) { ssygvx_(&itype, &jobz, &range, &uplo, &n, @@ -253,7 +301,7 @@ static inline void hegvx(const int itype, const char jobz, const char range, const char uplo, const int n, double* a, const int lda, double* b, const int ldb, const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, double* z, const int ldz, + int m, double* w, double* z, const int ldz, double* work, const int lwork, double* rwork, int* iwork, int* ifail, int& info) { dsygvx_(&itype, &jobz, &range, &uplo, &n, @@ -267,7 +315,7 @@ static inline void hegvx(const int itype, const char jobz, const char range, const char uplo, const int n, std::complex* a, const int lda, std::complex* b, const int ldb, const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, std::complex* z, const int ldz, + int m, float* w, std::complex* z, const int ldz, std::complex* work, const int lwork, float* rwork, int* iwork, int* ifail, int& info) { chegvx_(&itype, &jobz, &range, &uplo, &n, @@ -281,7 +329,7 @@ static inline void hegvx(const int itype, const char jobz, const char range, const char uplo, const int n, std::complex* a, const int lda, std::complex* b, const int ldb, const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, std::complex* z, const int ldz, + int m, double* w, std::complex* z, const int ldz, std::complex* work, const int lwork, double* rwork, int* iwork, int* ifail, int& info) { zhegvx_(&itype, &jobz, &range, &uplo, &n, @@ -297,32 +345,32 @@ static inline void heevx(const char jobz, const char range, const char uplo, const int n, float* a, const int lda, const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, float* z, const int ldz, + int m, float* w, float* z, const int ldz, float* work, const int lwork, float* rwork, int* iwork, int* ifail, int info) { ssyevx_(&jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); + work, &lwork, iwork, ifail, &info); } // wrap function of fortran lapack routine zheevx. static inline void heevx(const char jobz, const char range, const char uplo, const int n, double* a, const int lda, const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, double* z, const int ldz, + int m, double* w, double* z, const int ldz, double* work, const int lwork, double* rwork, int* iwork, int* ifail, int info) { dsyevx_(&jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu, &abstol, &m, w, z, &ldz, - work, &lwork, rwork, iwork, ifail, &info); + work, &lwork, iwork, ifail, &info); } static inline void heevx(const char jobz, const char range, const char uplo, const int n, std::complex* a, const int lda, const float vl, const float vu, const int il, const int iu, const float abstol, - const int m, float* w, std::complex* z, const int ldz, + int m, float* w, std::complex* z, const int ldz, std::complex* work, const int lwork, float* rwork, int* iwork, int* ifail, int info) { cheevx_(&jobz, &range, &uplo, &n, @@ -335,7 +383,7 @@ static inline void heevx(const char jobz, const char range, const char uplo, const int n, std::complex* a, const int lda, const double vl, const double vu, const int il, const int iu, const double abstol, - const int m, double* w, std::complex* z, const int ldz, + int m, double* w, std::complex* z, const int ldz, std::complex* work, const int lwork, double* rwork, int* iwork, int* ifail, int info) { zheevx_(&jobz, &range, &uplo, &n, @@ -500,6 +548,49 @@ void getrs(const char& trans, const int n, const int nrhs, std::complex* zgetrs_(&trans, &n, &nrhs, A, &lda, ipiv, B, &ldb, &info); } +// LAPACK routines for QR decomposition +static inline +void geqrf(const int m, const int n, float* A, const int lda, float* tau, float* work, const int lwork, int& info) +{ + sgeqrf_(&m, &n, A, &lda, tau, work, &lwork, &info); +} +static inline +void geqrf(const int m, const int n, double* A, const int lda, double* tau, double* work, const int lwork, int& info) +{ + dgeqrf_(&m, &n, A, &lda, tau, work, &lwork, &info); +} +static inline +void geqrf(const int m, const int n, std::complex* A, const int lda, std::complex* tau, std::complex* work, const int lwork, int& info) +{ + cgeqrf_(&m, &n, A, &lda, tau, work, &lwork, &info); +} +static inline +void geqrf(const int m, const int n, std::complex* A, const int lda, std::complex* tau, std::complex* work, const int lwork, int& info) +{ + zgeqrf_(&m, &n, A, &lda, tau, work, &lwork, &info); +} +// these routines generate the orthogonal matrix Q from the QR decomposition +static inline +void orgqr(const int m, const int n, const int k, float* A, const int lda, const float* tau, float* work, const int lwork, int& info) +{ + sorgqr_(&m, &n, &k, A, &lda, tau, work, &lwork, &info); +} +static inline +void orgqr(const int m, const int n, const int k, double* A, const int lda, const double* tau, double* work, const int lwork, int& info) +{ + dorgqr_(&m, &n, &k, A, &lda, tau, work, &lwork, &info); +} +static inline +void orgqr(const int m, const int n, const int k, std::complex* A, const int lda, const std::complex* tau, std::complex* work, const int lwork, int& info) +{ + cungqr_(&m, &n, &k, A, &lda, tau, work, &lwork, &info); +} +static inline +void orgqr(const int m, const int n, const int k, std::complex* A, const int lda, const std::complex* tau, std::complex* work, const int lwork, int& info) +{ + zungqr_(&m, &n, &k, A, &lda, tau, work, &lwork, &info); +} + } // namespace lapackConnector } // namespace container diff --git a/source/source_base/module_device/cuda/memory_op.cu b/source/source_base/module_device/cuda/memory_op.cu index ecc972c3ba..ccb52ae719 100644 --- a/source/source_base/module_device/cuda/memory_op.cu +++ b/source/source_base/module_device/cuda/memory_op.cu @@ -60,7 +60,7 @@ void resize_memory_op::operator()(FPTYPE*& arr, { delete_memory_op()(arr); } - cudaErrcheck(cudaMalloc((void**)&arr, sizeof(FPTYPE) * size)); + CHECK_CUDA(cudaMalloc((void**)&arr, sizeof(FPTYPE) * size)); std::string record_string; if (record_in != nullptr) { @@ -82,7 +82,7 @@ void set_memory_op::operator()(FPTYPE* arr, const int var, const size_t size) { - cudaErrcheck(cudaMemset(arr, var, sizeof(FPTYPE) * size)); + CHECK_CUDA(cudaMemset(arr, var, sizeof(FPTYPE) * size)); } template @@ -92,7 +92,7 @@ void set_memory_2d_op::operator()(FPTYPE* arr, const size_t width, const size_t height) { - cudaErrcheck(cudaMemset2D(arr, sizeof(FPTYPE) * pitch , var, sizeof(FPTYPE) * width, height)); + CHECK_CUDA(cudaMemset2D(arr, sizeof(FPTYPE) * pitch , var, sizeof(FPTYPE) * width, height)); } template @@ -101,7 +101,7 @@ void synchronize_memory_op @@ -110,7 +110,7 @@ void synchronize_memory_op @@ -119,7 +119,7 @@ void synchronize_memory_op @@ -131,7 +131,7 @@ void synchronize_memory_2d_op @@ -143,7 +143,7 @@ void synchronize_memory_2d_op @@ -155,7 +155,7 @@ void synchronize_memory_2d_op @@ -172,7 +172,7 @@ struct cast_memory_op>>(arr_out, arr_in, size); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } }; @@ -192,12 +192,12 @@ struct cast_memory_op>>(arr_out, arr, size); - cudaCheckOnDebug(); - cudaErrcheck(cudaFree(arr)); + CHECK_CUDA_SYNC(); + CHECK_CUDA(cudaFree(arr)); } }; @@ -216,7 +216,7 @@ struct cast_memory_op(arr[ii]); } @@ -227,7 +227,7 @@ struct cast_memory_op void delete_memory_op::operator()(FPTYPE* arr) { - cudaErrcheck(cudaFree(arr)); + CHECK_CUDA(cudaFree(arr)); } template struct resize_memory_op; diff --git a/source/source_base/module_device/cuda_compat.cpp b/source/source_base/module_device/cuda_compat.cpp new file mode 100644 index 0000000000..a4a6844797 --- /dev/null +++ b/source/source_base/module_device/cuda_compat.cpp @@ -0,0 +1,66 @@ +#include "cuda_compat.h" + +namespace ModuleBase { +namespace cuda_compat { + +//--------------------------------------------------------------------------- +// Implementation of printDeprecatedDeviceInfo and printComputeModeInfo +//--------------------------------------------------------------------------- +void printDeprecatedDeviceInfo(std::ostream& ofs_device, const cudaDeviceProp& deviceProp) +{ +#if defined(CUDA_VERSION) && CUDA_VERSION < 13000 + char msg[1024]; + sprintf(msg, + " GPU Max Clock rate: %.0f MHz (%0.2f " + "GHz)\n", + deviceProp.clockRate * 1e-3f, deviceProp.clockRate * 1e-6f); + ofs_device << msg << std::endl; + // This is supported in CUDA 5.0 (runtime API device properties) + sprintf(msg, " Memory Clock rate: %.0f Mhz\n", + deviceProp.memoryClockRate * 1e-3f); + ofs_device << msg << std::endl; + + sprintf(msg, " Memory Bus Width: %d-bit\n", + deviceProp.memoryBusWidth); + ofs_device << msg << std::endl; + + sprintf(msg, + " Concurrent copy and kernel execution: %s with %d copy " + "engine(s)\n", + (deviceProp.deviceOverlap ? "Yes" : "No"), + deviceProp.asyncEngineCount); + ofs_device << msg << std::endl; + sprintf(msg, " Run time limit on kernels: %s\n", + deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No"); + ofs_device << msg << std::endl; +#endif +} + +void printComputeModeInfo(std::ostream& ofs_device, const cudaDeviceProp& deviceProp) +{ +#if defined(CUDA_VERSION) && CUDA_VERSION < 13000 + char msg[1024]; + sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n", + deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No"); + ofs_device << msg << std::endl; + + const char *sComputeMode[] = { + "Default (multiple host threads can use ::cudaSetDevice() with device " + "simultaneously)", + "Exclusive (only one host thread in one process is able to use " + "::cudaSetDevice() with this device)", + "Prohibited (no host thread can use ::cudaSetDevice() with this " + "device)", + "Exclusive Process (many threads in one process is able to use " + "::cudaSetDevice() with this device)", + "Unknown", + NULL}; + sprintf(msg, " Compute Mode:\n"); + ofs_device << msg << std::endl; + ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl + << std::endl; +#endif +} + +} // namespace cuda_compat +} // namespace ModuleBase diff --git a/source/source_base/module_device/cuda_compat.h b/source/source_base/module_device/cuda_compat.h new file mode 100644 index 0000000000..acb2fca394 --- /dev/null +++ b/source/source_base/module_device/cuda_compat.h @@ -0,0 +1,70 @@ +/** + * @file cuda_compat.h + * @brief Compatibility layer for CUDA and NVTX headers across different CUDA Toolkit versions. + * + * This header abstracts the differences in NVTX (NVIDIA Tools Extension) header locations + * between CUDA Toolkit versions. + * + * @note Depends on the CUDA_VERSION macro defined in . + * + */ + +#ifndef CUDA_COMPAT_H_ +#define CUDA_COMPAT_H_ + +#include // For std::ostream +#include // For std::invalid_argument +#include // defines CUDA_VERSION +#include +#include + + +// NVTX header for CUDA versions prior to 12.9 vs. 12.9+ +// This block ensures the correct NVTX header path is used based on CUDA_VERSION. +// - For CUDA Toolkit < 12.9, the legacy header "nvToolsExt.h" is included. +// - For CUDA Toolkit >= 12.9, the modern header "nvtx3/nvToolsExt.h" is included, +// and NVTX v2 is removed from 12.9. +// This allows NVTX profiling APIs (e.g. nvtxRangePush) to be used consistently +// across different CUDA versions. +// See: +// https://docs.nvidia.com/cuda/archive/12.9.0/cuda-toolkit-release-notes/index.html#id4 +#if defined(__CUDA) && defined(__USE_NVTX) +#if CUDA_VERSION < 12090 + #include "nvToolsExt.h" +#else + #include "nvtx3/nvToolsExt.h" +#endif +#endif + +//------------------------------------------------------------------------------------------------- +// Compatibility Layer Declarations +//------------------------------------------------------------------------------------------------- +namespace ModuleBase { +namespace cuda_compat { + +/** + * @brief Prints device information that was deprecated or removed in CUDA 13.0. + * + * This function handles properties like clockRate, memoryClockRate, memoryBusWidth, + * and concurrency flags, which are not available in newer CUDA toolkits. + * + * @param os The output stream (e.g., std::cout, std::ofstream). + * @param prop The cudaDeviceProp structure containing device properties. + */ +void printDeprecatedDeviceInfo(std::ostream& os, const cudaDeviceProp& prop); + +/** + * @brief Prints the device's compute mode using a legacy string mapping. + * + * The compute mode display logic is encapsulated here as it relies on aspects + * of the driver model that have changed. + * + * @param os The output stream (e.g., std::cout, std::ofstream). + * @param prop The cudaDeviceProp structure containing device properties. + */ +void printComputeModeInfo(std::ostream& os, const cudaDeviceProp& prop); + +} // namespace cuda_compat +} // namespace ModuleBase + +#endif // CUDA_COMPAT_H_ diff --git a/source/source_base/module_device/device.cpp b/source/source_base/module_device/device.cpp index 96deae8baf..fb95e94f49 100644 --- a/source/source_base/module_device/device.cpp +++ b/source/source_base/module_device/device.cpp @@ -1,4 +1,3 @@ - #include "device.h" #include "source_base/tool_quit.h" @@ -6,6 +5,7 @@ #include #include #include +#include #ifdef __MPI #include "mpi.h" #endif @@ -20,97 +20,9 @@ namespace base_device { -// for device -template <> -base_device::AbacusDevice_t -get_device_type(const base_device::DEVICE_CPU *dev) { - return base_device::CpuDevice; -} -template <> -base_device::AbacusDevice_t -get_device_type(const base_device::DEVICE_GPU *dev) { - return base_device::GpuDevice; -} - -// for precision -template <> std::string get_current_precision(const float *var) { - return "single"; -} -template <> std::string get_current_precision(const double *var) { - return "double"; -} -template <> std::string get_current_precision(const std::complex *var) { - return "single"; -} -template <> std::string get_current_precision(const std::complex *var) { - return "double"; -} - namespace information { #if __MPI -int stringCmp(const void *a, const void *b) { - char *m = (char *)a; - char *n = (char *)b; - int i, sum = 0; - - for (i = 0; i < MPI_MAX_PROCESSOR_NAME; i++) { - if (m[i] == n[i]) { - continue; - } else { - sum = m[i] - n[i]; - break; - } - } - return sum; -} -int get_node_rank() { - char host_name[MPI_MAX_PROCESSOR_NAME]; - memset(host_name, '\0', sizeof(char) * MPI_MAX_PROCESSOR_NAME); - char(*host_names)[MPI_MAX_PROCESSOR_NAME]; - int n, namelen, color, rank, nprocs, myrank; - size_t bytes; - MPI_Comm nodeComm; - - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Get_processor_name(host_name, &namelen); - - bytes = nprocs * sizeof(char[MPI_MAX_PROCESSOR_NAME]); - host_names = (char(*)[MPI_MAX_PROCESSOR_NAME])malloc(bytes); - for (int ii = 0; ii < nprocs; ii++) { - memset(host_names[ii], '\0', sizeof(char) * MPI_MAX_PROCESSOR_NAME); - } - - strcpy(host_names[rank], host_name); - - for (n = 0; n < nprocs; n++) { - MPI_Bcast(&(host_names[n]), MPI_MAX_PROCESSOR_NAME, MPI_CHAR, n, - MPI_COMM_WORLD); - } - qsort(host_names, nprocs, sizeof(char[MPI_MAX_PROCESSOR_NAME]), stringCmp); - - color = 0; - for (n = 0; n < nprocs - 1; n++) { - if (strcmp(host_name, host_names[n]) == 0) { - break; - } - if (strcmp(host_names[n], host_names[n + 1])) { - color++; - } - } - - MPI_Comm_split(MPI_COMM_WORLD, color, 0, &nodeComm); - MPI_Comm_rank(nodeComm, &myrank); - - MPI_Barrier(MPI_COMM_WORLD); - int looprank = myrank; - // printf (" Assigning device %d to process on node %s rank %d, - // OK\n",looprank, host_name, rank ); - free(host_names); - return looprank; -} - int get_node_rank_with_mpi_shared(const MPI_Comm mpi_comm) { // 20240530 zhanghaochong // The main difference between this function and the above is that it does not @@ -124,105 +36,152 @@ int get_node_rank_with_mpi_shared(const MPI_Comm mpi_comm) { MPI_Comm_free(&localComm); return localMpiRank; } -#if defined(__CUDA) - -int set_device_by_rank(const MPI_Comm mpi_comm) { - int localMpiRank = get_node_rank_with_mpi_shared(mpi_comm); - int device_num = -1; - - cudaGetDeviceCount(&device_num); - if (device_num <= 0) { - ModuleBase::WARNING_QUIT("device", "can not find gpu device!"); - } - // warning: this is not a good way to assign devices, user should assign One - // process per GPU - int local_device_id = localMpiRank % device_num; - int ret = cudaSetDevice(local_device_id); - if (ret != cudaSuccess) { - ModuleBase::WARNING_QUIT("device", "cudaSetDevice failed!"); - } - return local_device_id; -} #endif +bool probe_gpu_availability() { +#if defined(__CUDA) + int device_count = 0; + // Directly call cudaGetDeviceCount without CHECK_CUDA to prevent program exit + cudaError_t error_id = cudaGetDeviceCount(&device_count); + if (error_id == cudaSuccess && device_count > 0) { + return true; + } + return false; +#elif defined(__ROCM) + int device_count = 0; + hipError_t error_id = hipGetDeviceCount(&device_count); + if (error_id == hipSuccess && device_count > 0) { + return true; + } + return false; +#else + // If not compiled with GPU support, GPU is not available + return false; #endif +} std::string get_device_flag(const std::string &device, const std::string &basis_type) { -if (device == "cpu") { - return "cpu"; // no extra checks required -} -std::string error_message; -if (device != "auto" and device != "gpu") -{ - error_message += "Parameter \"device\" can only be set to \"cpu\" or \"gpu\"!"; - ModuleBase::WARNING_QUIT("device", error_message); -} + // 1. Validate input string + if (device != "cpu" && device != "gpu" && device != "auto") { + ModuleBase::WARNING_QUIT("device", "Parameter \"device\" can only be set to \"cpu\", \"gpu\", or \"auto\"!"); + } + + // NOTE: This function is called only on rank 0 during input parsing. + // The result will be broadcast to other ranks via the standard bcast mechanism. + // DO NOT use MPI_Bcast here as other ranks are not in this code path. + + std::string result = "cpu"; + + if (device == "gpu") { + if (probe_gpu_availability()) { + result = "gpu"; + // std::cout << " INFO: 'device=gpu' specified. GPU will be used." << std::endl; + } else { + ModuleBase::WARNING_QUIT("device", "Device is set to 'gpu', but no available GPU was found. Please check your hardware/drivers or set 'device=cpu'."); + } + } else if (device == "auto") { + if (probe_gpu_availability()) { + result = "gpu"; + // std::cout << " INFO: 'device=auto' specified. GPU detected and will be used." << std::endl; + } else { + result = "cpu"; + // std::cout << " WARNING: 'device=auto' specified, but no GPU was found. Falling back to CPU." << std::endl; + // std::cout << " To suppress this warning, please explicitly set 'device=cpu' in your input." << std::endl; + } + } else { // device == "cpu" + result = "cpu"; + // std::cout << " INFO: 'device=cpu' specified. CPU will be used." << std::endl; + } -// Get available GPU count -int device_count = -1; -#if ((defined __CUDA) || (defined __ROCM)) -#if defined(__CUDA) -cudaGetDeviceCount(&device_count); -#elif defined(__ROCM) -hipGetDeviceCount(&device_count); -/***auto start_time = std::chrono::high_resolution_clock::now(); -std::cout << "Starting hipGetDeviceCount.." << std::endl; -auto end_time = std::chrono::high_resolution_clock::now(); -auto duration = std::chrono::duration_cast>(end_time - start_time); -std::cout << "hipGetDeviceCount took " << duration.count() << "seconds" << std::endl;***/ -#endif -if (device_count <= 0) -{ - error_message += "Cannot find GPU on this computer!\n"; -} -#else // CPU only -error_message += "ABACUS is built with CPU support only. Please rebuild with GPU support.\n"; -#endif + // 2. Final check for incompatible basis type + if (result == "gpu" && basis_type == "lcao_in_pw") { + ModuleBase::WARNING_QUIT("device", "The GPU currently does not support the basis type \"lcao_in_pw\"!"); + } -if (basis_type == "lcao_in_pw") { - error_message += - "The GPU currently does not support the basis type \"lcao_in_pw\"!"; -} -if(error_message.empty()) -{ - return "gpu"; // possibly automatically set to GPU -} -else if (device == "gpu") -{ - ModuleBase::WARNING_QUIT("device", error_message); -} -else { return "cpu"; + // 3. Return the final decision + return result; } + +} // end of namespace information + +// ============================================================================ +// DeviceContext singleton implementation +// ============================================================================ + +DeviceContext& DeviceContext::instance() { + static DeviceContext instance; + return instance; } -int get_device_kpar(const int& kpar, const int& bndpar) -{ -#if __MPI && (__CUDA || __ROCM) - int temp_nproc = 0; - int new_kpar = kpar; - MPI_Comm_size(MPI_COMM_WORLD, &temp_nproc); - if (temp_nproc != kpar * bndpar) - { - new_kpar = temp_nproc / bndpar; - ModuleBase::WARNING("Input_conv", "kpar is not compatible with the number of processors, auto set kpar value."); +void DeviceContext::init() { + // Thread-safe initialization using mutex + std::lock_guard lock(init_mutex_); + + // If already initialized, do nothing (idempotent) + if (initialized_) { + return; } - - // get the CPU rank of current node - int node_rank = base_device::information::get_node_rank(); - int device_num = -1; +#if defined(__CUDA) || defined(__ROCM) + +#ifdef __MPI + // Get local rank within the node using MPI_COMM_TYPE_SHARED + // This is the modern and recommended way to get node-local rank + // Use MPI_COMM_WORLD as the default communicator + MPI_Comm local_comm; + MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &local_comm); + MPI_Comm_rank(local_comm, &local_rank_); + MPI_Comm_free(&local_comm); +#else + local_rank_ = 0; +#endif + + // Get the number of available GPU devices #if defined(__CUDA) - cudaGetDeviceCount(&device_num); // get the number of GPU devices of current node - cudaSetDevice(node_rank % device_num); // band the CPU processor to the devices + cudaError_t err = cudaGetDeviceCount(&device_count_); + if (err != cudaSuccess || device_count_ <= 0) { + ModuleBase::WARNING_QUIT("DeviceContext::init", + "No CUDA-capable GPU device found! Please check your hardware/drivers."); + return; + } + + // Bind to GPU device based on local rank + device_id_ = local_rank_ % device_count_; + err = cudaSetDevice(device_id_); + if (err != cudaSuccess) { + ModuleBase::WARNING_QUIT("DeviceContext::init", + "cudaSetDevice failed! Device ID: " + std::to_string(device_id_)); + return; + } #elif defined(__ROCM) - hipGetDeviceCount(&device_num); - hipSetDevice(node_rank % device_num); + hipError_t err = hipGetDeviceCount(&device_count_); + if (err != hipSuccess || device_count_ <= 0) { + ModuleBase::WARNING_QUIT("DeviceContext::init", + "No ROCm-capable GPU device found! Please check your hardware/drivers."); + return; + } + + // Bind to GPU device based on local rank + device_id_ = local_rank_ % device_count_; + err = hipSetDevice(device_id_); + if (err != hipSuccess) { + ModuleBase::WARNING_QUIT("DeviceContext::init", + "hipSetDevice failed! Device ID: " + std::to_string(device_id_)); + return; + } #endif - return new_kpar; + + gpu_enabled_ = true; + initialized_ = true; + +#else + // No GPU support compiled in + initialized_ = true; + gpu_enabled_ = false; + device_id_ = -1; + device_count_ = 0; #endif - return kpar; } -} // end of namespace information } // end of namespace base_device diff --git a/source/source_base/module_device/device.h b/source/source_base/module_device/device.h index 7b8dd0c6ae..afa55d5d6e 100644 --- a/source/source_base/module_device/device.h +++ b/source/source_base/module_device/device.h @@ -2,7 +2,9 @@ #define MODULE_DEVICE_H_ #include "types.h" +#include "device_helpers.h" #include +#include #ifdef __MPI #include "mpi.h" @@ -11,12 +13,6 @@ namespace base_device { -template -base_device::AbacusDevice_t get_device_type(const Device* dev); - -template -std::string get_current_precision(const T* var); - namespace information { @@ -39,10 +35,10 @@ int get_device_num(std::string device_flag); void output_device_info(std::ostream& output); /** - * @brief Get the device kpar object - * for source_io GlobalV::KPAR + * @brief Safely probes for GPU availability without exiting on error. + * @return True if at least one GPU is found and usable, false otherwise. */ -int get_device_kpar(const int& kpar, const int& bndpar); +bool probe_gpu_availability(); /** * @brief Get the device flag object @@ -53,19 +49,11 @@ std::string get_device_flag(const std::string& device, #if __MPI /** - * @brief Get the rank of current node - * Note that GPU can only be binded with CPU in the same node - * - * @return int + * @brief Get the local rank within the node using MPI_COMM_TYPE_SHARED + * @param mpi_comm MPI communicator (default: MPI_COMM_WORLD) + * @return Local rank within the node */ -int get_node_rank(); int get_node_rank_with_mpi_shared(const MPI_Comm mpi_comm = MPI_COMM_WORLD); -int stringCmp(const void* a, const void* b); - -#ifdef __CUDA -int set_device_by_rank(const MPI_Comm mpi_comm = MPI_COMM_WORLD); -#endif - #endif template @@ -89,26 +77,91 @@ void record_device_memory(const base_device::DEVICE_GPU #endif } // end of namespace information -} // end of namespace base_device /** - * @brief for compatibility with __CUDA_ARCH__ 600 and earlier + * @brief Singleton class to manage GPU device context and initialization. * + * This class provides a centralized way to: + * 1. Initialize GPU device binding (only once) + * 2. Query GPU device state (device_id, device_count, etc.) + * 3. Ensure thread-safe initialization + * + * Usage: + * // Initialize (call once after MPI init and after determining device=gpu) + * DeviceContext::instance().init(MPI_COMM_WORLD); + * + * // Query device info + * int dev_id = DeviceContext::instance().get_device_id(); */ -#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 && !defined(__CUDA_ON_DCU) -static __inline__ __device__ double atomicAdd(double* address, double val) -{ - unsigned long long int* address_as_ull = (unsigned long long int*)address; - unsigned long long int old = *address_as_ull, assumed; - do - { - assumed = old; - old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val + __longlong_as_double(assumed))); - // Note: uses integer comparison to avoid hang in case of NaN (since NaN != - // NaN) } while (assumed != old); - } while (assumed != old); - return __longlong_as_double(old); -} -#endif +class DeviceContext { +public: + /** + * @brief Get the singleton instance of DeviceContext + * @return Reference to the singleton instance + */ + static DeviceContext& instance(); + + /** + * @brief Initialize GPU device binding. + * + * This function: + * 1. Gets the local rank within the node using MPI_COMM_TYPE_SHARED (MPI_COMM_WORLD) + * 2. Queries the number of available GPU devices + * 3. Binds the current process to a GPU device (local_rank % device_count) + * + * @note This function should only be called once. Subsequent calls are no-ops. + * @note This function should only be called when device=gpu is confirmed. + * @note In MPI builds, uses MPI_COMM_WORLD internally. + */ + void init(); + + /** + * @brief Check if the DeviceContext has been initialized + * @return true if init() has been called successfully + */ + bool is_initialized() const { return initialized_; } + + /** + * @brief Check if GPU is enabled and available + * @return true if GPU device is bound and usable + */ + bool is_gpu_enabled() const { return gpu_enabled_; } + + /** + * @brief Get the bound GPU device ID + * @return Device ID (0-based), or -1 if not initialized + */ + int get_device_id() const { return device_id_; } + + /** + * @brief Get the total number of GPU devices on this node + * @return Number of GPU devices, or 0 if not initialized + */ + int get_device_count() const { return device_count_; } + + /** + * @brief Get the local MPI rank within the node + * @return Local rank, or 0 if not initialized + */ + int get_local_rank() const { return local_rank_; } + + // Disable copy and assignment + DeviceContext(const DeviceContext&) = delete; + DeviceContext& operator=(const DeviceContext&) = delete; + +private: + DeviceContext() = default; + ~DeviceContext() = default; + + bool initialized_ = false; + bool gpu_enabled_ = false; + int device_id_ = -1; + int device_count_ = 0; + int local_rank_ = 0; + + std::mutex init_mutex_; +}; + +} // end of namespace base_device #endif // MODULE_DEVICE_H_ diff --git a/source/source_base/module_device/device_check.h b/source/source_base/module_device/device_check.h new file mode 100644 index 0000000000..f649676001 --- /dev/null +++ b/source/source_base/module_device/device_check.h @@ -0,0 +1,472 @@ +#ifndef DEVICE_CHECK_H +#define DEVICE_CHECK_H + +#include +#include + +#ifdef __CUDA +#include "cublas_v2.h" +#include "cufft.h" +#include "cusolverDn.h" +#include + +static const char* _cublasGetErrorString(cublasStatus_t error) +{ + switch (error) + { + case CUBLAS_STATUS_SUCCESS: + return "CUBLAS_STATUS_SUCCESS"; + case CUBLAS_STATUS_NOT_INITIALIZED: + return "CUBLAS_STATUS_NOT_INITIALIZED"; + case CUBLAS_STATUS_ALLOC_FAILED: + return "CUBLAS_STATUS_ALLOC_FAILED"; + case CUBLAS_STATUS_INVALID_VALUE: + return "CUBLAS_STATUS_INVALID_VALUE"; + case CUBLAS_STATUS_ARCH_MISMATCH: + return "CUBLAS_STATUS_ARCH_MISMATCH"; + case CUBLAS_STATUS_MAPPING_ERROR: + return "CUBLAS_STATUS_MAPPING_ERROR"; + case CUBLAS_STATUS_EXECUTION_FAILED: + return "CUBLAS_STATUS_EXECUTION_FAILED"; + case CUBLAS_STATUS_INTERNAL_ERROR: + return "CUBLAS_STATUS_INTERNAL_ERROR"; + case CUBLAS_STATUS_NOT_SUPPORTED: + return "CUBLAS_STATUS_NOT_SUPPORTED"; + case CUBLAS_STATUS_LICENSE_ERROR: + return "CUBLAS_STATUS_LICENSE_ERROR"; + default: + return ""; + } +} + +static const char* _cusolverGetErrorString(cusolverStatus_t error) +{ + switch (error) + { + case CUSOLVER_STATUS_SUCCESS: + return "CUSOLVER_STATUS_SUCCESS"; + case CUSOLVER_STATUS_NOT_INITIALIZED: + return "CUSOLVER_STATUS_NOT_INITIALIZED"; + case CUSOLVER_STATUS_ALLOC_FAILED: + return "CUSOLVER_STATUS_ALLOC_FAILED"; + case CUSOLVER_STATUS_INVALID_VALUE: + return "CUSOLVER_STATUS_INVALID_VALUE"; + case CUSOLVER_STATUS_ARCH_MISMATCH: + return "CUSOLVER_STATUS_ARCH_MISMATCH"; + case CUSOLVER_STATUS_MAPPING_ERROR: + return "CUSOLVER_STATUS_MAPPING_ERROR"; + case CUSOLVER_STATUS_EXECUTION_FAILED: + return "CUSOLVER_STATUS_EXECUTION_FAILED"; + case CUSOLVER_STATUS_INTERNAL_ERROR: + return "CUSOLVER_STATUS_INTERNAL_ERROR"; + case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: + return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; + case CUSOLVER_STATUS_NOT_SUPPORTED: + return "CUSOLVER_STATUS_NOT_SUPPORTED"; + case CUSOLVER_STATUS_ZERO_PIVOT: + return "CUSOLVER_STATUS_ZERO_PIVOT"; + case CUSOLVER_STATUS_INVALID_LICENSE: + return "CUSOLVER_STATUS_INVALID_LICENSE"; + case CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED: + return "CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED"; + case CUSOLVER_STATUS_IRS_PARAMS_INVALID: + return "CUSOLVER_STATUS_IRS_PARAMS_INVALID"; + case CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC: + return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC"; + case CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE: + return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE"; + case CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER: + return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER"; + case CUSOLVER_STATUS_IRS_INTERNAL_ERROR: + return "CUSOLVER_STATUS_IRS_INTERNAL_ERROR"; + case CUSOLVER_STATUS_IRS_NOT_SUPPORTED: + return "CUSOLVER_STATUS_IRS_NOT_SUPPORTED"; + case CUSOLVER_STATUS_IRS_OUT_OF_RANGE: + return "CUSOLVER_STATUS_IRS_OUT_OF_RANGE"; + case CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES: + return "CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES"; + case CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED: + return "CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED"; + case CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED: + return "CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED"; + case CUSOLVER_STATUS_IRS_MATRIX_SINGULAR: + return "CUSOLVER_STATUS_IRS_MATRIX_SINGULAR"; + case CUSOLVER_STATUS_INVALID_WORKSPACE: + return "CUSOLVER_STATUS_INVALID_WORKSPACE"; + default: + return ""; + } +} + +static const char* _cufftGetErrorString(cufftResult_t error) +{ + switch (error) + { + case CUFFT_SUCCESS: + return "CUFFT_SUCCESS"; + case CUFFT_INVALID_PLAN: + return "CUFFT_INVALID_PLAN"; + case CUFFT_ALLOC_FAILED: + return "CUFFT_ALLOC_FAILED"; + case CUFFT_INVALID_TYPE: + return "CUFFT_INVALID_TYPE"; + case CUFFT_INVALID_VALUE: + return "CUFFT_INVALID_VALUE"; + case CUFFT_INTERNAL_ERROR: + return "CUFFT_INTERNAL_ERROR"; + case CUFFT_EXEC_FAILED: + return "CUFFT_EXEC_FAILED"; + case CUFFT_SETUP_FAILED: + return "CUFFT_SETUP_FAILED"; + case CUFFT_INVALID_SIZE: + return "CUFFT_INVALID_SIZE"; + case CUFFT_UNALIGNED_DATA: + return "CUFFT_UNALIGNED_DATA"; + case CUFFT_INVALID_DEVICE: + return "CUFFT_INVALID_DEVICE"; + case CUFFT_NO_WORKSPACE: + return "CUFFT_NO_WORKSPACE"; + case CUFFT_NOT_IMPLEMENTED: + return "CUFFT_NOT_IMPLEMENTED"; + case CUFFT_NOT_SUPPORTED: + return "CUFFT_NOT_SUPPORTED"; +#if defined(CUDA_VERSION) && CUDA_VERSION < 13000 + case CUFFT_INCOMPLETE_PARAMETER_LIST: + return "CUFFT_INCOMPLETE_PARAMETER_LIST"; + case CUFFT_PARSE_ERROR: + return "CUFFT_PARSE_ERROR"; + case CUFFT_LICENSE_ERROR: + return "CUFFT_LICENSE_ERROR"; +#endif + default: + return ""; + } +} + +#define CHECK_CUDA(func) \ + do \ + { \ + cudaError_t status = (func); \ + if (status != cudaSuccess) \ + { \ + fprintf(stderr, "In File %s : CUDA API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + cudaGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUBLAS(func) \ + do \ + { \ + cublasStatus_t status = (func); \ + if (status != CUBLAS_STATUS_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : CUBLAS API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _cublasGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUSOLVER(func) \ + do \ + { \ + cusolverStatus_t status = (func); \ + if (status != CUSOLVER_STATUS_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : CUSOLVER API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _cusolverGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUFFT(func) \ + do \ + { \ + cufftResult_t status = (func); \ + if (status != CUFFT_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : CUFFT API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _cufftGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_LAST_CUDA_ERROR(msg) \ + do \ + { \ + cudaError_t status = cudaGetLastError(); \ + if (status != cudaSuccess) \ + { \ + fprintf(stderr, "%s(%d) : CUDA error : %s : (%d) %s.\n", __FILE__, __LINE__, msg, \ + static_cast(status), cudaGetErrorString(status)); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#ifdef __DEBUG +#define CHECK_CUDA_SYNC() \ + do \ + { \ + cudaError_t status = cudaDeviceSynchronize(); \ + if (status != cudaSuccess) \ + { \ + fprintf(stderr, "In File %s : CUDA sync failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + cudaGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) +#else +#define CHECK_CUDA_SYNC() do {} while (0) +#endif + +// cuSOLVER MP support +#ifdef __CUSOLVERMP +#include + +#ifdef __USE_CAL +#include + +static const char* _calGetErrorString(calError_t error) +{ + switch (error) + { + case CAL_OK: + return "CAL_OK"; + case CAL_ERROR: + return "CAL_ERROR"; + case CAL_ERROR_INVALID_PARAMETER: + return "CAL_ERROR_INVALID_PARAMETER"; + case CAL_ERROR_INTERNAL: + return "CAL_ERROR_INTERNAL"; + case CAL_ERROR_CUDA: + return "CAL_ERROR_CUDA"; + case CAL_ERROR_UCC: + return "CAL_ERROR_UCC"; + case CAL_ERROR_NOT_SUPPORTED: + return "CAL_ERROR_NOT_SUPPORTED"; + case CAL_ERROR_INPROGRESS: + return "CAL_ERROR_INPROGRESS"; + default: + return ""; + } +} + +#define CHECK_CAL(func) \ + do \ + { \ + calError_t status = (func); \ + if (status != CAL_OK) \ + { \ + fprintf(stderr, "In File %s : CAL API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _calGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) +#else // !__USE_CAL (use NCCL) +#include + +#define CHECK_NCCL(func) \ + do \ + { \ + ncclResult_t status = (func); \ + if (status != ncclSuccess) \ + { \ + fprintf(stderr, "In File %s : NCCL API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + ncclGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) +#endif // __USE_CAL + +#endif // __CUSOLVERMP + +#endif // __CUDA + +#ifdef __ROCM +#include +#include +#include +#include + +static const char* _hipblasGetErrorString(hipblasStatus_t error) +{ + switch (error) + { + case HIPBLAS_STATUS_SUCCESS: + return "HIPBLAS_STATUS_SUCCESS"; + case HIPBLAS_STATUS_NOT_INITIALIZED: + return "HIPBLAS_STATUS_NOT_INITIALIZED"; + case HIPBLAS_STATUS_ALLOC_FAILED: + return "HIPBLAS_STATUS_ALLOC_FAILED"; + case HIPBLAS_STATUS_INVALID_VALUE: + return "HIPBLAS_STATUS_INVALID_VALUE"; + case HIPBLAS_STATUS_ARCH_MISMATCH: + return "HIPBLAS_STATUS_ARCH_MISMATCH"; + case HIPBLAS_STATUS_MAPPING_ERROR: + return "HIPBLAS_STATUS_MAPPING_ERROR"; + case HIPBLAS_STATUS_EXECUTION_FAILED: + return "HIPBLAS_STATUS_EXECUTION_FAILED"; + case HIPBLAS_STATUS_INTERNAL_ERROR: + return "HIPBLAS_STATUS_INTERNAL_ERROR"; + case HIPBLAS_STATUS_NOT_SUPPORTED: + return "HIPBLAS_STATUS_NOT_SUPPORTED"; + case HIPBLAS_STATUS_HANDLE_IS_NULLPTR: + return "HIPBLAS_STATUS_HANDLE_IS_NULLPTR"; + default: + return ""; + } +} + +static const char* _hipfftGetErrorString(hipfftResult_t error) +{ + switch (error) + { + case HIPFFT_SUCCESS: + return "HIPFFT_SUCCESS"; + case HIPFFT_INVALID_PLAN: + return "HIPFFT_INVALID_PLAN"; + case HIPFFT_ALLOC_FAILED: + return "HIPFFT_ALLOC_FAILED"; + case HIPFFT_INVALID_TYPE: + return "HIPFFT_INVALID_TYPE"; + case HIPFFT_INVALID_VALUE: + return "HIPFFT_INVALID_VALUE"; + case HIPFFT_INTERNAL_ERROR: + return "HIPFFT_INTERNAL_ERROR"; + case HIPFFT_EXEC_FAILED: + return "HIPFFT_EXEC_FAILED"; + case HIPFFT_SETUP_FAILED: + return "HIPFFT_SETUP_FAILED"; + case HIPFFT_INVALID_SIZE: + return "HIPFFT_INVALID_SIZE"; + case HIPFFT_UNALIGNED_DATA: + return "HIPFFT_UNALIGNED_DATA"; + case HIPFFT_INCOMPLETE_PARAMETER_LIST: + return "HIPFFT_INCOMPLETE_PARAMETER_LIST"; + case HIPFFT_INVALID_DEVICE: + return "HIPFFT_INVALID_DEVICE"; + case HIPFFT_PARSE_ERROR: + return "HIPFFT_PARSE_ERROR"; + case HIPFFT_NO_WORKSPACE: + return "HIPFFT_NO_WORKSPACE"; + case HIPFFT_NOT_IMPLEMENTED: + return "HIPFFT_NOT_IMPLEMENTED"; + case HIPFFT_NOT_SUPPORTED: + return "HIPFFT_NOT_SUPPORTED"; + default: + return ""; + } +} + +static const char* _hipsolverGetErrorString(hipsolverStatus_t error) +{ + switch (error) + { + case HIPSOLVER_STATUS_SUCCESS: + return "HIPSOLVER_STATUS_SUCCESS"; + case HIPSOLVER_STATUS_NOT_INITIALIZED: + return "HIPSOLVER_STATUS_NOT_INITIALIZED"; + case HIPSOLVER_STATUS_ALLOC_FAILED: + return "HIPSOLVER_STATUS_ALLOC_FAILED"; + case HIPSOLVER_STATUS_INVALID_VALUE: + return "HIPSOLVER_STATUS_INVALID_VALUE"; + case HIPSOLVER_STATUS_MAPPING_ERROR: + return "HIPSOLVER_STATUS_MAPPING_ERROR"; + case HIPSOLVER_STATUS_EXECUTION_FAILED: + return "HIPSOLVER_STATUS_EXECUTION_FAILED"; + case HIPSOLVER_STATUS_INTERNAL_ERROR: + return "HIPSOLVER_STATUS_INTERNAL_ERROR"; + case HIPSOLVER_STATUS_NOT_SUPPORTED: + return "HIPSOLVER_STATUS_NOT_SUPPORTED"; + case HIPSOLVER_STATUS_ARCH_MISMATCH: + return "HIPSOLVER_STATUS_ARCH_MISMATCH"; + case HIPSOLVER_STATUS_HANDLE_IS_NULLPTR: + return "HIPSOLVER_STATUS_HANDLE_IS_NULLPTR"; + case HIPSOLVER_STATUS_INVALID_ENUM: + return "HIPSOLVER_STATUS_INVALID_ENUM"; + case HIPSOLVER_STATUS_UNKNOWN: + return "HIPSOLVER_STATUS_UNKNOWN"; + default: + return ""; + } +} + +#define CHECK_CUDA(func) \ + do \ + { \ + hipError_t status = (func); \ + if (status != hipSuccess) \ + { \ + fprintf(stderr, "In File %s : HIP API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + hipGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUBLAS(func) \ + do \ + { \ + hipblasStatus_t status = (func); \ + if (status != HIPBLAS_STATUS_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : HIPBLAS API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _hipblasGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUSOLVER(func) \ + do \ + { \ + hipsolverStatus_t status = (func); \ + if (status != HIPSOLVER_STATUS_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : HIPSOLVER API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _hipsolverGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_CUFFT(func) \ + do \ + { \ + hipfftResult_t status = (func); \ + if (status != HIPFFT_SUCCESS) \ + { \ + fprintf(stderr, "In File %s : HIPFFT API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + _hipfftGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#define CHECK_LAST_CUDA_ERROR(msg) \ + do \ + { \ + hipError_t status = hipGetLastError(); \ + if (status != hipSuccess) \ + { \ + fprintf(stderr, "%s(%d) : HIP error : %s : (%d) %s.\n", __FILE__, __LINE__, msg, \ + static_cast(status), hipGetErrorString(status)); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) + +#ifdef __DEBUG +#define CHECK_CUDA_SYNC() \ + do \ + { \ + hipError_t status = hipDeviceSynchronize(); \ + if (status != hipSuccess) \ + { \ + fprintf(stderr, "In File %s : HIP sync failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ + hipGetErrorString(status), status); \ + exit(EXIT_FAILURE); \ + } \ + } while (0) +#else +#define CHECK_CUDA_SYNC() do {} while (0) +#endif + +#endif // __ROCM + +#endif // DEVICE_CHECK_H diff --git a/source/source_base/module_device/device_helpers.cpp b/source/source_base/module_device/device_helpers.cpp new file mode 100644 index 0000000000..1c53020718 --- /dev/null +++ b/source/source_base/module_device/device_helpers.cpp @@ -0,0 +1,44 @@ +#include "device_helpers.h" + +namespace base_device +{ + +// Device type specializations +template <> +AbacusDevice_t get_device_type(const DEVICE_CPU* dev) +{ + return CpuDevice; +} + +template <> +AbacusDevice_t get_device_type(const DEVICE_GPU* dev) +{ + return GpuDevice; +} + +// Precision specializations +template <> +std::string get_current_precision(const float* var) +{ + return "single"; +} + +template <> +std::string get_current_precision(const double* var) +{ + return "double"; +} + +template <> +std::string get_current_precision>(const std::complex* var) +{ + return "single"; +} + +template <> +std::string get_current_precision>(const std::complex* var) +{ + return "double"; +} + +} // end of namespace base_device diff --git a/source/source_base/module_device/device_helpers.h b/source/source_base/module_device/device_helpers.h new file mode 100644 index 0000000000..60eddd888d --- /dev/null +++ b/source/source_base/module_device/device_helpers.h @@ -0,0 +1,60 @@ +#ifndef DEVICE_HELPERS_H_ +#define DEVICE_HELPERS_H_ + +/** + * @file device_helpers.h + * @brief Type trait templates for device and precision detection. + * + * This header provides template declarations for: + * - get_device_type() - returns device type enum + * - get_current_precision() - returns "single" or "double" + */ + +#include "types.h" +#include +#include + +namespace base_device +{ + +/** + * @brief Get the device type enum for a given device type. + * @tparam Device The device type (DEVICE_CPU or DEVICE_GPU) + * @param dev Pointer to device (used for template deduction) + * @return AbacusDevice_t enum value + */ +template +AbacusDevice_t get_device_type(const Device* dev); + +// Template specialization declarations +template <> +AbacusDevice_t get_device_type(const DEVICE_CPU* dev); + +template <> +AbacusDevice_t get_device_type(const DEVICE_GPU* dev); + +/** + * @brief Get the precision string for a given numeric type. + * @tparam T The numeric type (float, double, std::complex, std::complex) + * @param var Pointer to variable (used for template deduction) + * @return "single" or "double" + */ +template +std::string get_current_precision(const T* var); + +// Template specialization declarations +template <> +std::string get_current_precision(const float* var); + +template <> +std::string get_current_precision(const double* var); + +template <> +std::string get_current_precision>(const std::complex* var); + +template <> +std::string get_current_precision>(const std::complex* var); + +} // end of namespace base_device + +#endif // DEVICE_HELPERS_H_ diff --git a/source/source_base/module_device/gpu_runtime.h b/source/source_base/module_device/gpu_runtime.h new file mode 100644 index 0000000000..ce759c0d98 --- /dev/null +++ b/source/source_base/module_device/gpu_runtime.h @@ -0,0 +1,71 @@ +#ifndef GPU_RUNTIME_H_ +#define GPU_RUNTIME_H_ + +/** + * @file gpu_runtime.h + * @brief Unified CUDA/ROCm API macros for portable GPU code. + * + * This header provides macro abstraction for CUDA/ROCm APIs, allowing + * a single implementation to work with both CUDA and ROCm backends. + * + * Usage: + * #include "gpu_runtime.h" + * gpuError_t err = gpuGetDeviceCount(&count); + * if (err != gpuSuccess) { ... } + */ + +#if defined(__CUDA) + +#include + +// Error handling +#define gpuError_t cudaError_t +#define gpuSuccess cudaSuccess +#define gpuGetErrorString cudaGetErrorString + +// Device management +#define gpuGetDeviceCount cudaGetDeviceCount +#define gpuGetDevice cudaGetDevice +#define gpuSetDevice cudaSetDevice +#define gpuGetDeviceProperties cudaGetDeviceProperties +#define gpuDeviceProp_t cudaDeviceProp + +// Version info +#define gpuDriverGetVersion cudaDriverGetVersion +#define gpuRuntimeGetVersion cudaRuntimeGetVersion + +// Peer access +#define gpuDeviceCanAccessPeer cudaDeviceCanAccessPeer + +// Error check macro +#define gpuErrcheck CHECK_CUDA + +#elif defined(__ROCM) + +#include + +// Error handling +#define gpuError_t hipError_t +#define gpuSuccess hipSuccess +#define gpuGetErrorString hipGetErrorString + +// Device management +#define gpuGetDeviceCount hipGetDeviceCount +#define gpuGetDevice hipGetDevice +#define gpuSetDevice hipSetDevice +#define gpuGetDeviceProperties hipGetDeviceProperties +#define gpuDeviceProp_t hipDeviceProp_t + +// Version info +#define gpuDriverGetVersion hipDriverGetVersion +#define gpuRuntimeGetVersion hipRuntimeGetVersion + +// Peer access +#define gpuDeviceCanAccessPeer hipDeviceCanAccessPeer + +// Error check macro +#define gpuErrcheck CHECK_CUDA + +#endif // __CUDA / __ROCM + +#endif // GPU_RUNTIME_H_ diff --git a/source/source_base/module_device/kernel_compat.h b/source/source_base/module_device/kernel_compat.h new file mode 100644 index 0000000000..13c0f11c61 --- /dev/null +++ b/source/source_base/module_device/kernel_compat.h @@ -0,0 +1,33 @@ +#ifndef KERNEL_COMPAT_H_ +#define KERNEL_COMPAT_H_ + +/** + * @file kernel_compat.h + * @brief Device-side kernel compatibility polyfills for older GPU architectures. + * + * This is a lightweight header (no heavy includes) for GPU kernel device-side + * compatibility code. Include this header in .cu/.hip.cu files that need + * legacy GPU support. + * + * Note: The existing cuda_compat.h is for host-side CUDA compatibility + * (NVTX, deprecated APIs, cuFFT) and includes heavy headers, so we keep + * this separate. + */ + +// atomicAdd for double precision - required for CUDA architectures < 600 (pre-Pascal) +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 && !defined(__CUDA_ON_DCU) +static __inline__ __device__ double atomicAdd(double* address, double val) +{ + unsigned long long int* address_as_ull = (unsigned long long int*)address; + unsigned long long int old = *address_as_ull, assumed; + do + { + assumed = old; + old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val + __longlong_as_double(assumed))); + // Note: uses integer comparison to avoid hang in case of NaN (since NaN != NaN) + } while (assumed != old); + return __longlong_as_double(old); +} +#endif + +#endif // KERNEL_COMPAT_H_ diff --git a/source/source_base/module_device/memory_op.cpp b/source/source_base/module_device/memory_op.cpp index da22bc2ce6..2ef4be588a 100644 --- a/source/source_base/module_device/memory_op.cpp +++ b/source/source_base/module_device/memory_op.cpp @@ -5,6 +5,7 @@ #ifdef __DSP #include "source_base/kernels/dsp/dsp_connector.h" #include "source_base/global_variable.h" +#include "source_io/module_parameter/parameter.h" #endif #include @@ -107,7 +108,7 @@ struct cast_memory_op { mtfunc::free_ht(arr); } - arr = (FPTYPE*)mtfunc::malloc_ht(sizeof(FPTYPE) * size, GlobalV::MY_RANK); + arr = (FPTYPE*)mtfunc::malloc_ht(sizeof(FPTYPE) * size, GlobalV::MY_RANK % PARAM.inp.dsp_count); std::string record_string; if (record_in != nullptr) { diff --git a/source/source_base/module_device/output_device.cpp b/source/source_base/module_device/output_device.cpp index 1d0f018814..b46688b1bc 100644 --- a/source/source_base/module_device/output_device.cpp +++ b/source/source_base/module_device/output_device.cpp @@ -1,5 +1,6 @@ #include "device.h" +#include "gpu_runtime.h" #include "source_base/tool_quit.h" #include "source_io/module_parameter/parameter.h" @@ -13,11 +14,7 @@ #endif #if defined(__CUDA) -#include -#endif - -#if defined(__ROCM) -#include +#include "source_base/module_device/cuda_compat.h" #endif namespace base_device @@ -27,18 +24,11 @@ namespace information std::string get_device_name(std::string device_flag) { std::string device_info = "Unknown"; -#if defined(__CUDA) +#if defined(__CUDA) || defined(__ROCM) if (device_flag == "gpu") { int dev = 0; - cudaDeviceProp deviceProp; - cudaErrcheck(cudaGetDeviceProperties(&deviceProp, dev)); - device_info = deviceProp.name; - } -#elif defined(__ROCM) - if (device_flag == "gpu") { - int dev = 0; - hipDeviceProp_t deviceProp; - hipErrcheck(hipGetDeviceProperties(&deviceProp, dev)); + gpuDeviceProp_t deviceProp; + gpuErrcheck(gpuGetDeviceProperties(&deviceProp, dev)); device_info = deviceProp.name; } #endif @@ -68,10 +58,8 @@ int get_device_num(std::string device_flag) { if (device_flag == "gpu") { int count = 0; - #if defined(__CUDA) - cudaErrcheck(cudaGetDeviceCount(&count)); - #elif defined(__ROCM) - hipErrcheck(hipGetDeviceCount(&count)); + #if defined(__CUDA) || defined(__ROCM) + gpuErrcheck(gpuGetDeviceCount(&count)); #endif return count; } @@ -115,7 +103,13 @@ void output_device_info(std::ostream &output) int local_rank = get_node_rank_with_mpi_shared(MPI_COMM_WORLD); // Get local hardware info - int local_gpu_count = local_rank == 0 ? get_device_num("gpu") : 0; + int local_gpu_count = 0; + #if defined(__CUDA) || defined(__ROCM) + if(PARAM.inp.device == "gpu" && local_rank == 0) + { + local_gpu_count = get_device_num("gpu"); + } + #endif int local_cpu_sockets = local_rank == 0 ? get_device_num("cpu") : 0; // Prepare vectors to gather data from all ranks @@ -133,7 +127,13 @@ void output_device_info(std::ostream &output) // Get device model names (from rank 0 node) std::string cpu_name = get_device_name("cpu"); - std::string gpu_name = get_device_name("gpu"); + std::string gpu_name; + #if defined(__CUDA) || defined(__ROCM) + if(PARAM.inp.device == "gpu" && total_gpus > 0) + { + gpu_name = get_device_name("gpu"); + } + #endif // Output all collected information output << " RUNNING WITH DEVICE : " << "CPU" << " / " @@ -166,7 +166,7 @@ void output_device_info(std::ostream &output) #endif } -#if defined(__CUDA) +#if defined(__CUDA) || defined(__ROCM) static bool is_init = false; @@ -177,48 +177,52 @@ void print_device_info( return; } int deviceCount = 0; - cudaError_t error_id = cudaGetDeviceCount(&deviceCount); - if (error_id != cudaSuccess) { - ofs_device << "cudaGetDeviceCount returned " << static_cast(error_id) - << "\n-> " << cudaGetErrorString(error_id) << std::endl; - ModuleBase::WARNING_QUIT("device", "GPU returned is without cudaSuccess"); + gpuError_t error_id = gpuGetDeviceCount(&deviceCount); + if (error_id != gpuSuccess) { + ofs_device << "gpuGetDeviceCount returned " << static_cast(error_id) + << "\n-> " << gpuGetErrorString(error_id) << std::endl; + ModuleBase::WARNING_QUIT("device", "GPU returned is without gpuSuccess"); } - // This function call returns 0 if there are no CUDA capable devices. + // This function call returns 0 if there are no GPU capable devices. if (deviceCount == 0) { - ofs_device << "There are no available device(s) that support CUDA\n"; + ofs_device << "There are no available device(s) that support GPU\n"; } else { - ofs_device << "Detected " << deviceCount << " CUDA Capable device(s)\n"; + ofs_device << "Detected " << deviceCount << " GPU Capable device(s)\n"; } int dev = 0, driverVersion = 0, runtimeVersion = 0; - cudaErrcheck(cudaGetDevice(&dev)); - cudaDeviceProp deviceProp; - cudaErrcheck(cudaGetDeviceProperties(&deviceProp, dev)); + gpuErrcheck(gpuGetDevice(&dev)); + gpuDeviceProp_t deviceProp; + gpuErrcheck(gpuGetDeviceProperties(&deviceProp, dev)); ofs_device << "\nDevice " << dev << ":\t " << deviceProp.name << std::endl; // Console log - cudaErrcheck(cudaDriverGetVersion(&driverVersion)); - cudaErrcheck(cudaRuntimeGetVersion(&runtimeVersion)); + gpuErrcheck(gpuDriverGetVersion(&driverVersion)); + gpuErrcheck(gpuRuntimeGetVersion(&runtimeVersion)); char msg[1024]; sprintf(msg, - " CUDA Driver Version / Runtime Version %d.%d / %d.%d\n", + " GPU Driver Version / Runtime Version %d.%d / %d.%d\n", driverVersion / 1000, (driverVersion % 100) / 10, runtimeVersion / 1000, (runtimeVersion % 100) / 10); ofs_device << msg << std::endl; - sprintf(msg, " CUDA Capability Major/Minor version number: %d.%d\n", + sprintf(msg, " GPU Capability Major/Minor version number: %d.%d\n", deviceProp.major, deviceProp.minor); ofs_device << msg << std::endl; + +#if defined(__ROCM) + // ROCm-specific: clock rates sprintf(msg, " GPU Max Clock rate: %.0f MHz (%0.2f " "GHz)\n", deviceProp.clockRate * 1e-3f, deviceProp.clockRate * 1e-6f); ofs_device << msg << std::endl; - // This is supported in CUDA 5.0 (runtime API device properties) sprintf(msg, " Memory Clock rate: %.0f Mhz\n", deviceProp.memoryClockRate * 1e-3f); ofs_device << msg << std::endl; - sprintf(msg, " Memory Bus Width: %d-bit\n", deviceProp.memoryBusWidth); ofs_device << msg << std::endl; +#endif + + // Common properties sprintf(msg, " Maximum Texture Dimension Size (x,y,z) 1D=(%d), 2D=(%d, " "%d), 3D=(%d, %d, %d)\n", @@ -227,6 +231,8 @@ void print_device_info( deviceProp.maxTexture3D[1], deviceProp.maxTexture3D[2]); ofs_device << msg << std::endl; +#if defined(__CUDA) + // CUDA-specific: layered textures sprintf( msg, " Maximum Layered 1D Texture Size, (num) layers 1D=(%d), %d layers\n", @@ -238,15 +244,21 @@ void print_device_info( deviceProp.maxTexture2DLayered[0], deviceProp.maxTexture2DLayered[1], deviceProp.maxTexture2DLayered[2]); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Total amount of constant memory: %zu bytes\n", deviceProp.totalConstMem); ofs_device << msg << std::endl; sprintf(msg, " Total amount of shared memory per block: %zu bytes\n", deviceProp.sharedMemPerBlock); ofs_device << msg << std::endl; + +#if defined(__CUDA) sprintf(msg, " Total shared memory per multiprocessor: %zu bytes\n", deviceProp.sharedMemPerMultiprocessor); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Total number of registers available per block: %d\n", deviceProp.regsPerBlock); ofs_device << msg << std::endl; @@ -273,280 +285,90 @@ void print_device_info( sprintf(msg, " Texture alignment: %zu bytes\n", deviceProp.textureAlignment); ofs_device << msg << std::endl; - sprintf(msg, - " Concurrent copy and kernel execution: %s with %d copy " - "engine(s)\n", - (deviceProp.deviceOverlap ? "Yes" : "No"), - deviceProp.asyncEngineCount); - ofs_device << msg << std::endl; + +#if defined(__ROCM) sprintf(msg, " Run time limit on kernels: %s\n", deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No"); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Integrated GPU sharing Host Memory: %s\n", deviceProp.integrated ? "Yes" : "No"); ofs_device << msg << std::endl; sprintf(msg, " Support host page-locked memory mapping: %s\n", deviceProp.canMapHostMemory ? "Yes" : "No"); ofs_device << msg << std::endl; + +#if defined(__CUDA) sprintf(msg, " Alignment requirement for Surfaces: %s\n", deviceProp.surfaceAlignment ? "Yes" : "No"); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Device has ECC support: %s\n", deviceProp.ECCEnabled ? "Enabled" : "Disabled"); ofs_device << msg << std::endl; + +#if defined(__CUDA) sprintf(msg, " Device supports Unified Addressing (UVA): %s\n", deviceProp.unifiedAddressing ? "Yes" : "No"); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Device supports Managed Memory: %s\n", deviceProp.managedMemory ? "Yes" : "No"); ofs_device << msg << std::endl; + +#if defined(__CUDA) sprintf(msg, " Device supports Compute Preemption: %s\n", deviceProp.computePreemptionSupported ? "Yes" : "No"); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Supports Cooperative Kernel Launch: %s\n", deviceProp.cooperativeLaunch ? "Yes" : "No"); ofs_device << msg << std::endl; + +#if defined(__ROCM) sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n", deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No"); ofs_device << msg << std::endl; +#endif + sprintf(msg, " Device PCI Domain ID / Bus ID / location ID: %d / %d / %d\n", deviceProp.pciDomainID, deviceProp.pciBusID, deviceProp.pciDeviceID); ofs_device << msg << std::endl; - const char *sComputeMode[] = { - "Default (multiple host threads can use ::cudaSetDevice() with device " - "simultaneously)", - "Exclusive (only one host thread in one process is able to use " - "::cudaSetDevice() with this device)", - "Prohibited (no host thread can use ::cudaSetDevice() with this " - "device)", - "Exclusive Process (many threads in one process is able to use " - "::cudaSetDevice() with this device)", - "Unknown", - NULL}; - sprintf(msg, " Compute Mode:\n"); - ofs_device << msg << std::endl; - ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl - << std::endl; - - // If there are 2 or more GPUs, query to determine whether RDMA is supported - if (deviceCount >= 2) { - cudaDeviceProp prop[64]; - int gpuid[64]; // we want to find the first two GPUs that can support P2P - int gpu_p2p_count = 0; - - for (int i = 0; i < deviceCount; i++) { - cudaErrcheck(cudaGetDeviceProperties(&prop[i], i)); - - // Only boards based on Fermi or later can support P2P - if (prop[i].major >= 2) { - // This is an array of P2P capable GPUs - gpuid[gpu_p2p_count++] = i; - } - } - - // Show all the combinations of support P2P GPUs - int can_access_peer; - - if (gpu_p2p_count >= 2) { - for (int i = 0; i < gpu_p2p_count; i++) { - for (int j = 0; j < gpu_p2p_count; j++) { - if (gpuid[i] == gpuid[j]) { - continue; - } - cudaErrcheck( - cudaDeviceCanAccessPeer(&can_access_peer, gpuid[i], gpuid[j])); - sprintf(msg, "> Peer access from %s (GPU%d) -> %s (GPU%d) : %s\n", - prop[gpuid[i]].name, gpuid[i], prop[gpuid[j]].name, gpuid[j], - can_access_peer ? "Yes" : "No"); - ofs_device << msg << std::endl; - } - } - } - } - - // csv masterlog info - // ***************************** - // exe and CUDA driver name - std::string sProfileString = "deviceQuery, CUDA Driver = CUDART"; - char cTemp[16]; - - // driver version - sProfileString += ", CUDA Driver Version = "; - - snprintf(cTemp, sizeof(cTemp), "%d.%d", driverVersion / 1000, - (driverVersion % 100) / 10); - sProfileString += cTemp; - - // Runtime version - sProfileString += ", CUDA Runtime Version = "; - snprintf(cTemp, sizeof(cTemp), "%d.%d", runtimeVersion / 1000, - (runtimeVersion % 100) / 10); - sProfileString += cTemp; - - // Device count - sProfileString += ", NumDevs = "; - snprintf(cTemp, sizeof(cTemp), "%d", deviceCount); - sProfileString += cTemp; - sProfileString += "\n"; - - ofs_device << sProfileString.c_str() << std::endl; - is_init = true; - ofs_device << "End of device informations." << std::endl << std::endl; -} - -template <> -void record_device_memory( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device, - std::string str, size_t size) { - ofs_device << "Allocate " << static_cast(size) / 8 / 1024 / 1024 - << " \tMB device memory\t" - << "from " << str << std::endl - << std::endl; -} +#if defined(__CUDA) + ModuleBase::cuda_compat::printDeprecatedDeviceInfo(ofs_device, deviceProp); + ModuleBase::cuda_compat::printComputeModeInfo(ofs_device, deviceProp); #elif defined(__ROCM) - -static bool is_init = false; - -template <> -void print_device_info( - const base_device::DEVICE_GPU *ctx, std::ofstream &ofs_device) { - if (is_init) { - return; - } - int deviceCount = 0; - hipError_t error_id = hipGetDeviceCount(&deviceCount); - if (error_id != hipSuccess) { - ofs_device << "hipGetDeviceCount returned " << static_cast(error_id) - << "\n-> " << hipGetErrorString(error_id) << std::endl; - ModuleBase::WARNING_QUIT("device", "GPU returned is without hipSuccess"); - } - // This function call returns 0 if there are no CUDA capable devices. - if (deviceCount == 0) { - ofs_device << "There are no available device(s) that support CUDA\n"; - } else { - ofs_device << "Detected " << deviceCount << " CUDA Capable device(s)\n"; - } - int dev = 0, driverVersion = 0, runtimeVersion = 0; - hipErrcheck(hipGetDevice(&dev)); - hipDeviceProp_t deviceProp; - hipErrcheck(hipGetDeviceProperties(&deviceProp, dev)); - ofs_device << "\nDevice " << dev << ":\t " << deviceProp.name << std::endl; - // Console log - hipErrcheck(hipDriverGetVersion(&driverVersion)); - hipErrcheck(hipRuntimeGetVersion(&runtimeVersion)); - char msg[1024]; - sprintf(msg, - " CUDA Driver Version / Runtime Version %d.%d / %d.%d\n", - driverVersion / 1000, (driverVersion % 100) / 10, - runtimeVersion / 1000, (runtimeVersion % 100) / 10); - ofs_device << msg << std::endl; - sprintf(msg, " CUDA Capability Major/Minor version number: %d.%d\n", - deviceProp.major, deviceProp.minor); - ofs_device << msg << std::endl; - sprintf(msg, - " GPU Max Clock rate: %.0f MHz (%0.2f " - "GHz)\n", - deviceProp.clockRate * 1e-3f, deviceProp.clockRate * 1e-6f); - ofs_device << msg << std::endl; - // This is supported in CUDA 5.0 (runtime API device properties) - sprintf(msg, " Memory Clock rate: %.0f Mhz\n", - deviceProp.memoryClockRate * 1e-3f); - ofs_device << msg << std::endl; - - sprintf(msg, " Memory Bus Width: %d-bit\n", - deviceProp.memoryBusWidth); - ofs_device << msg << std::endl; - sprintf(msg, - " Maximum Texture Dimension Size (x,y,z) 1D=(%d), 2D=(%d, " - "%d), 3D=(%d, %d, %d)\n", - deviceProp.maxTexture1D, deviceProp.maxTexture2D[0], - deviceProp.maxTexture2D[1], deviceProp.maxTexture3D[0], - deviceProp.maxTexture3D[1], deviceProp.maxTexture3D[2]); - ofs_device << msg << std::endl; - - sprintf(msg, " Total amount of constant memory: %zu bytes\n", - deviceProp.totalConstMem); - ofs_device << msg << std::endl; - sprintf(msg, " Total amount of shared memory per block: %zu bytes\n", - deviceProp.sharedMemPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Total number of registers available per block: %d\n", - deviceProp.regsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Warp size: %d\n", - deviceProp.warpSize); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per multiprocessor: %d\n", - deviceProp.maxThreadsPerMultiProcessor); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum number of threads per block: %d\n", - deviceProp.maxThreadsPerBlock); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a thread block (x,y,z): (%d, %d, %d)\n", - deviceProp.maxThreadsDim[0], deviceProp.maxThreadsDim[1], - deviceProp.maxThreadsDim[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Max dimension size of a grid size (x,y,z): (%d, %d, %d)\n", - deviceProp.maxGridSize[0], deviceProp.maxGridSize[1], - deviceProp.maxGridSize[2]); - ofs_device << msg << std::endl; - sprintf(msg, " Maximum memory pitch: %zu bytes\n", - deviceProp.memPitch); - ofs_device << msg << std::endl; - sprintf(msg, " Texture alignment: %zu bytes\n", - deviceProp.textureAlignment); - ofs_device << msg << std::endl; - sprintf(msg, " Run time limit on kernels: %s\n", - deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Integrated GPU sharing Host Memory: %s\n", - deviceProp.integrated ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Support host page-locked memory mapping: %s\n", - deviceProp.canMapHostMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Device has ECC support: %s\n", - deviceProp.ECCEnabled ? "Enabled" : "Disabled"); - ofs_device << msg << std::endl; - sprintf(msg, " Device supports Managed Memory: %s\n", - deviceProp.managedMemory ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports Cooperative Kernel Launch: %s\n", - deviceProp.cooperativeLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n", - deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No"); - ofs_device << msg << std::endl; - sprintf(msg, - " Device PCI Domain ID / Bus ID / location ID: %d / %d / %d\n", - deviceProp.pciDomainID, deviceProp.pciBusID, deviceProp.pciDeviceID); - ofs_device << msg << std::endl; const char *sComputeMode[] = { - "Default (multiple host threads can use ::hipSetDevice() with device " + "Default (multiple host threads can use ::gpuSetDevice() with device " "simultaneously)", "Exclusive (only one host thread in one process is able to use " - "::hipSetDevice() with this device)", - "Prohibited (no host thread can use ::hipSetDevice() with this " + "::gpuSetDevice() with this device)", + "Prohibited (no host thread can use ::gpuSetDevice() with this " "device)", "Exclusive Process (many threads in one process is able to use " - "::hipSetDevice() with this device)", + "::gpuSetDevice() with this device)", "Unknown", NULL}; sprintf(msg, " Compute Mode:\n"); ofs_device << msg << std::endl; ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl << std::endl; +#endif // If there are 2 or more GPUs, query to determine whether RDMA is supported if (deviceCount >= 2) { - hipDeviceProp_t prop[64]; + gpuDeviceProp_t prop[64]; int gpuid[64]; // we want to find the first two GPUs that can support P2P int gpu_p2p_count = 0; for (int i = 0; i < deviceCount; i++) { - hipErrcheck(hipGetDeviceProperties(&prop[i], i)); + gpuErrcheck(gpuGetDeviceProperties(&prop[i], i)); // Only boards based on Fermi or later can support P2P if (prop[i].major >= 2) { @@ -564,8 +386,8 @@ void print_device_info( if (gpuid[i] == gpuid[j]) { continue; } - hipErrcheck( - hipDeviceCanAccessPeer(&can_access_peer, gpuid[i], gpuid[j])); + gpuErrcheck( + gpuDeviceCanAccessPeer(&can_access_peer, gpuid[i], gpuid[j])); sprintf(msg, "> Peer access from %s (GPU%d) -> %s (GPU%d) : %s\n", prop[gpuid[i]].name, gpuid[i], prop[gpuid[j]].name, gpuid[j], can_access_peer ? "Yes" : "No"); @@ -577,19 +399,19 @@ void print_device_info( // csv masterlog info // ***************************** - // exe and CUDA driver name - std::string sProfileString = "deviceQuery, CUDA Driver = CUDART"; + // exe and GPU driver name + std::string sProfileString = "deviceQuery, GPU Driver = GPURT"; char cTemp[16]; // driver version - sProfileString += ", CUDA Driver Version = "; + sProfileString += ", GPU Driver Version = "; snprintf(cTemp, sizeof(cTemp), "%d.%d", driverVersion / 1000, (driverVersion % 100) / 10); sProfileString += cTemp; // Runtime version - sProfileString += ", CUDA Runtime Version = "; + sProfileString += ", GPU Runtime Version = "; snprintf(cTemp, sizeof(cTemp), "%d.%d", runtimeVersion / 1000, (runtimeVersion % 100) / 10); sProfileString += cTemp; @@ -615,6 +437,7 @@ void record_device_memory( << std::endl; } -#endif +#endif // defined(__CUDA) || defined(__ROCM) + +} } -} \ No newline at end of file diff --git a/source/source_base/module_external/blas_connector.h b/source/source_base/module_external/blas_connector.h index ea6834ce2d..920731b3f6 100644 --- a/source/source_base/module_external/blas_connector.h +++ b/source/source_base/module_external/blas_connector.h @@ -8,138 +8,192 @@ // These still need to be linked in the header file // Because quite a lot of code will directly use the original cblas kernels. +// The following declarations cover only a subset of BLAS routines. +// If you need a BLAS function that is not included here, feel free to add its declaration as needed. extern "C" { - // level 1: std::vector-std::vector operations, O(n) data and O(n) work. - - // Peize Lin add ?scal 2016-08-04, to compute x=a*x - void sscal_(const int *N, const float *alpha, float *X, const int *incX); - void dscal_(const int *N, const double *alpha, double *X, const int *incX); - void cscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); - void zscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); - - // Peize Lin add ?axpy 2016-08-04, to compute y=a*x+y - void saxpy_(const int *N, const float *alpha, const float *X, const int *incX, float *Y, const int *incY); - void daxpy_(const int *N, const double *alpha, const double *X, const int *incX, double *Y, const int *incY); - void caxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); - void zaxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); - - void scopy_(long const *n, const float *a, int const *incx, float *b, int const *incy); - void dcopy_(long const *n, const double *a, int const *incx, double *b, int const *incy); - void ccopy_(long const *n, const std::complex *a, int const *incx, std::complex *b, int const *incy); - void zcopy_(long const *n, const std::complex *a, int const *incx, std::complex *b, int const *incy); - - //reason for passing results as argument instead of returning it: - //see https://www.numbercrunch.de/blog/2014/07/lost-in-translation/ - // void zdotc_(std::complex *result, const int *n, const std::complex *zx, - // const int *incx, const std::complex *zy, const int *incy); - // Peize Lin add ?dot 2017-10-27, to compute d=x*y - float sdot_(const int *N, const float *X, const int *incX, const float *Y, const int *incY); - double ddot_(const int *N, const double *X, const int *incX, const double *Y, const int *incY); - - // Peize Lin add ?nrm2 2018-06-12, to compute out = ||x||_2 = \sqrt{ \sum_i x_i**2 } - float snrm2_( const int *n, const float *X, const int *incX ); - double dnrm2_( const int *n, const double *X, const int *incX ); - double dznrm2_( const int *n, const std::complex *X, const int *incX ); - - // symmetric rank-k update - void dsyrk_( - const char* uplo, - const char* trans, - const int* n, - const int* k, - const double* alpha, - const double* a, - const int* lda, - const double* beta, - double* c, - const int* ldc - ); - - // level 2: matrix-std::vector operations, O(n^2) data and O(n^2) work. - void sgemv_(const char*const transa, const int*const m, const int*const n, - const float*const alpha, const float*const a, const int*const lda, const float*const x, const int*const incx, - const float*const beta, float*const y, const int*const incy); - void dgemv_(const char*const transa, const int*const m, const int*const n, - const double*const alpha, const double*const a, const int*const lda, const double*const x, const int*const incx, - const double*const beta, double*const y, const int*const incy); - - void cgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - - void zgemv_(const char *trans, const int *m, const int *n, const std::complex *alpha, - const std::complex *a, const int *lda, const std::complex *x, const int *incx, - const std::complex *beta, std::complex *y, const int *incy); - - void dsymv_(const char *uplo, const int *n, - const double *alpha, const double *a, const int *lda, - const double *x, const int *incx, - const double *beta, double *y, const int *incy); - - // A := alpha x * y.T + A - void dger_(const int* m, - const int* n, - const double* alpha, - const double* x, - const int* incx, - const double* y, - const int* incy, - double* a, - const int* lda); - void zgerc_(const int* m, - const int* n, - const std::complex* alpha, - const std::complex* x, - const int* incx, - const std::complex* y, - const int* incy, - std::complex* a, - const int* lda); - - // level 3: matrix-matrix operations, O(n^2) data and O(n^3) work. - - // Peize Lin add ?gemm 2017-10-27, to compute C = a * A.? * B.? + b * C - // A is general - void sgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, - const float *beta, float *c, const int *ldc); - void dgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); - void cgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - void zgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - - // A is symmetric. C = a * A.? * B.? + b * C - void ssymm_(const char *side, const char *uplo, const int *m, const int *n, - const float *alpha, const float *a, const int *lda, const float *b, const int *ldb, - const float *beta, float *c, const int *ldc); - void dsymm_(const char *side, const char *uplo, const int *m, const int *n, - const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, - const double *beta, double *c, const int *ldc); - void csymm_(const char *side, const char *uplo, const int *m, const int *n, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - void zsymm_(const char *side, const char *uplo, const int *m, const int *n, - const std::complex *alpha, const std::complex *a, const int *lda, const std::complex *b, const int *ldb, - const std::complex *beta, std::complex *c, const int *ldc); - - // A is hermitian. C = a * A.? * B.? + b * C - void chemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); - void zhemm_(char *side, char *uplo, int *m, int *n,std::complex *alpha, - std::complex *a, int *lda, std::complex *b, int *ldb, std::complex *beta, std::complex *c, int *ldc); - - //solving triangular matrix with multiple right hand sides - void dtrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - double* alpha, double* a, int *lda, double*b, int *ldb); - void ztrsm_(char *side, char* uplo, char *transa, char *diag, int *m, int *n, - std::complex* alpha, std::complex* a, int *lda, std::complex*b, int *ldb); - +// Level 1 BLAS +void sscal_(const int *N, const float *alpha, float *X, const int *incX); +void dscal_(const int *N, const double *alpha, double *X, const int *incX); +void cscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); +void zscal_(const int *N, const std::complex *alpha, std::complex *X, const int *incX); + +void saxpy_(const int *N, const float *alpha, const float *X, const int *incX, float *Y, const int *incY); +void daxpy_(const int *N, const double *alpha, const double *X, const int *incX, double *Y, const int *incY); +void caxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); +void zaxpy_(const int *N, const std::complex *alpha, const std::complex *X, const int *incX, std::complex *Y, const int *incY); + +void scopy_(const int *n, const float *a, const int *incx, float *b, const int *incy); +void dcopy_(const int *n, const double *a, const int *incx, double *b, const int *incy); +void ccopy_(const int *n, const std::complex *a, const int *incx, std::complex *b, const int *incy); +void zcopy_(const int *n, const std::complex *a, const int *incx, std::complex *b, const int *incy); + +// Note: sdot_/ddot_ return by value +float sdot_(const int *N, const float *X, const int *incX, const float *Y, const int *incY); +double ddot_(const int *N, const double *X, const int *incX, const double *Y, const int *incY); + +float snrm2_(const int *n, const float *X, const int *incX); +double dnrm2_(const int *n, const double *X, const int *incX); +float scnrm2_(const int *n, const std::complex *X, const int *incX); +double dznrm2_(const int *n, const std::complex *X, const int *incX); + +// Level 2 BLAS + +void sgemv_(const char *transa, const int *m, const int *n, + const float *alpha, const float *a, const int *lda, + const float *x, const int *incx, + const float *beta, float *y, const int *incy); + +void dgemv_(const char *transa, const int *m, const int *n, + const double *alpha, const double *a, const int *lda, + const double *x, const int *incx, + const double *beta, double *y, const int *incy); + +void cgemv_(const char *trans, const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *x, const int *incx, + const std::complex *beta, + std::complex *y, const int *incy); + +void zgemv_(const char *trans, const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *x, const int *incx, + const std::complex *beta, + std::complex *y, const int *incy); + +void dsymv_(const char *uplo, const int *n, + const double *alpha, const double *a, const int *lda, + const double *x, const int *incx, + const double *beta, double *y, const int *incy); + +void dger_(const int *m, const int *n, + const double *alpha, + const double *x, const int *incx, + const double *y, const int *incy, + double *a, const int *lda); + +void zgerc_(const int *m, const int *n, + const std::complex *alpha, + const std::complex *x, const int *incx, + const std::complex *y, const int *incy, + std::complex *a, const int *lda); + +// Level 3 BLAS + +void sgemm_(const char *transa, const char *transb, + const int *m, const int *n, const int *k, + const float *alpha, + const float *a, const int *lda, + const float *b, const int *ldb, + const float *beta, + float *c, const int *ldc); + +void dgemm_(const char *transa, const char *transb, + const int *m, const int *n, const int *k, + const double *alpha, + const double *a, const int *lda, + const double *b, const int *ldb, + const double *beta, + double *c, const int *ldc); + +void cgemm_(const char *transa, const char *transb, + const int *m, const int *n, const int *k, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void zgemm_(const char *transa, const char *transb, + const int *m, const int *n, const int *k, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void ssymm_(const char *side, const char *uplo, + const int *m, const int *n, + const float *alpha, + const float *a, const int *lda, + const float *b, const int *ldb, + const float *beta, + float *c, const int *ldc); + +void dsymm_(const char *side, const char *uplo, + const int *m, const int *n, + const double *alpha, + const double *a, const int *lda, + const double *b, const int *ldb, + const double *beta, + double *c, const int *ldc); + +void csymm_(const char *side, const char *uplo, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void zsymm_(const char *side, const char *uplo, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void chemm_(const char *side, const char *uplo, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void zhemm_(const char *side, const char *uplo, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + const std::complex *b, const int *ldb, + const std::complex *beta, + std::complex *c, const int *ldc); + +void dtrsm_(const char *side, const char *uplo, const char *transa, const char *diag, + const int *m, const int *n, + const double *alpha, + const double *a, const int *lda, + double *b, const int *ldb); + +void ztrsm_(const char *side, const char *uplo, const char *transa, const char *diag, + const int *m, const int *n, + const std::complex *alpha, + const std::complex *a, const int *lda, + std::complex *b, const int *ldb); + +// === Hermitian rank-k update === +void cherk_(const char* uplo, const char* trans, const int* n, const int* k, + const float* alpha, + const std::complex* a, const int* lda, + const float* beta, + std::complex* c, const int* ldc); + +void zherk_(const char* uplo, const char* trans, const int* n, const int* k, + const double* alpha, + const std::complex* a, const int* lda, + const double* beta, + std::complex* c, const int* ldc); + +// === Symmetric rank-k update === +void dsyrk_(const char* uplo, const char* trans, const int* n, const int* k, + const double* alpha, + const double* a, const int* lda, + const double* beta, + double* c, + const int* ldc); } // Class BlasConnector provide the connector to fortran lapack routine. @@ -340,16 +394,16 @@ class BlasConnector // copies a into b static - void copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); + void copy(const int n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); static - void copy(const long n, const float *a, const int incx, float *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); + void copy(const int n, const float *a, const int incx, float *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); static - void copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); + void copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); static - void copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); + void copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice); // There is some other operators needed, so implemented manually here template diff --git a/source/source_base/module_external/blas_connector_base.cpp b/source/source_base/module_external/blas_connector_base.cpp index 4591f22095..b07f8a3a78 100644 --- a/source/source_base/module_external/blas_connector_base.cpp +++ b/source/source_base/module_external/blas_connector_base.cpp @@ -13,13 +13,13 @@ namespace BlasUtils{ void createGpuBlasHandle(){ if (cublas_handle == nullptr) { - cublasErrcheck(cublasCreate(&cublas_handle)); + CHECK_CUBLAS(cublasCreate(&cublas_handle)); } } void destoryBLAShandle(){ if (cublas_handle != nullptr) { - cublasErrcheck(cublasDestroy(cublas_handle)); + CHECK_CUBLAS(cublasDestroy(cublas_handle)); cublas_handle = nullptr; } } diff --git a/source/source_base/module_external/blas_connector_matrix.cpp b/source/source_base/module_external/blas_connector_matrix.cpp index de1e839ad0..674a7c61d9 100644 --- a/source/source_base/module_external/blas_connector_matrix.cpp +++ b/source/source_base/module_external/blas_connector_matrix.cpp @@ -4,6 +4,7 @@ #ifdef __DSP #include "source_base/kernels/dsp/dsp_connector.h" #include "source_base/global_variable.h" +#include "source_io/module_parameter/parameter.h" #endif #ifdef __CUDA @@ -30,14 +31,14 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons else if (device_type == base_device::AbacusDevice_t::DspDevice){ mtfunc::sgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, - &beta, c, &ldc, GlobalV::MY_RANK); + &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, m, k, &alpha, b, ldb, a, lda, &beta, c, ldc)); + CHECK_CUBLAS(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, m, k, &alpha, b, ldb, a, lda, &beta, c, ldc)); } #endif else { @@ -67,7 +68,7 @@ void BlasConnector::gemm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::dgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::dgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif else if (device_type == base_device::AbacusDevice_t::GpuDevice) @@ -75,7 +76,7 @@ void BlasConnector::gemm(const char transa, #ifdef __CUDA cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck( + CHECK_CUBLAS( cublasDgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, m, k, &alpha, b, ldb, a, lda, &beta, c, ldc)); #endif } @@ -106,7 +107,7 @@ void BlasConnector::gemm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::cgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::cgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif else if (device_type == base_device::AbacusDevice_t::GpuDevice) @@ -114,7 +115,7 @@ void BlasConnector::gemm(const char transa, #ifdef __CUDA cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(BlasUtils::cublas_handle, + CHECK_CUBLAS(cublasCgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, @@ -157,7 +158,7 @@ void BlasConnector::gemm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::zgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::zgemm_mth_(&transb, &transa, &n, &m, &k, &alpha, b, &ldb, a, &lda, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif else if (device_type == base_device::AbacusDevice_t::GpuDevice) @@ -165,7 +166,7 @@ void BlasConnector::gemm(const char transa, #ifdef __CUDA cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(BlasUtils::cublas_handle, + CHECK_CUBLAS(cublasZgemm(BlasUtils::cublas_handle, cutransA, cutransB, n, @@ -200,14 +201,14 @@ void BlasConnector::gemm_cm(const char transa, const char transb, const int m, c else if (device_type == base_device::AbacusDevice_t::DspDevice){ mtfunc::sgemm_mth_(&transb, &transa, &m, &n, &k, &alpha, a, &lda, b, &ldb, - &beta, c, &ldc, GlobalV::MY_RANK); + &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)); + CHECK_CUBLAS(cublasSgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)); } #endif else { @@ -237,7 +238,7 @@ void BlasConnector::gemm_cm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::dgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::dgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif #ifdef __CUDA @@ -245,7 +246,7 @@ void BlasConnector::gemm_cm(const char transa, { cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck( + CHECK_CUBLAS( cublasDgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)); } #endif @@ -276,7 +277,7 @@ void BlasConnector::gemm_cm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::cgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::cgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif #ifdef __CUDA @@ -284,7 +285,7 @@ void BlasConnector::gemm_cm(const char transa, { cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasCgemm(BlasUtils::cublas_handle, + CHECK_CUBLAS(cublasCgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, @@ -327,7 +328,7 @@ void BlasConnector::gemm_cm(const char transa, #ifdef __DSP else if (device_type == base_device::AbacusDevice_t::DspDevice) { - mtfunc::zgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK); + mtfunc::zgemm_mth_(&transa, &transb, &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc, GlobalV::MY_RANK % PARAM.inp.dsp_count); } #endif #ifdef __CUDA @@ -335,7 +336,7 @@ void BlasConnector::gemm_cm(const char transa, { cublasOperation_t cutransA = BlasUtils::judge_trans(false, transa, "gemm_op"); cublasOperation_t cutransB = BlasUtils::judge_trans(false, transb, "gemm_op"); - cublasErrcheck(cublasZgemm(BlasUtils::cublas_handle, + CHECK_CUBLAS(cublasZgemm(BlasUtils::cublas_handle, cutransA, cutransB, m, @@ -371,7 +372,7 @@ void BlasConnector::symm_cm(const char side, const char uplo, const int m, const else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasSsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); + CHECK_CUBLAS(cublasSsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); } #endif else { @@ -392,7 +393,7 @@ void BlasConnector::symm_cm(const char side, const char uplo, const int m, const else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasDsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); + CHECK_CUBLAS(cublasDsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, &alpha, a, lda, b, ldb, &beta, c, ldc)); } #endif else { @@ -413,7 +414,7 @@ void BlasConnector::symm_cm(const char side, const char uplo, const int m, const else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasCsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); + CHECK_CUBLAS(cublasCsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); } #endif else { @@ -434,7 +435,7 @@ void BlasConnector::symm_cm(const char side, const char uplo, const int m, const else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasZsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); + CHECK_CUBLAS(cublasZsymm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); } #endif else { @@ -469,7 +470,7 @@ void BlasConnector::hemm_cm(char side, char uplo, int m, int n, else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasChemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); + CHECK_CUBLAS(cublasChemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (float2*)&alpha, (float2*)a, lda, (float2*)b, ldb, (float2*)&beta, (float2*)c, ldc)); } #endif else { @@ -490,7 +491,7 @@ void BlasConnector::hemm_cm(char side, char uplo, int m, int n, else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasSideMode_t sideMode = BlasUtils::judge_side(side); cublasFillMode_t fillMode = BlasUtils::judge_fill(uplo); - cublasErrcheck(cublasZhemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); + CHECK_CUBLAS(cublasZhemm(BlasUtils::cublas_handle, sideMode, fillMode, m, n, (double2*)&alpha, (double2*)a, lda, (double2*)b, ldb, (double2*)&beta, (double2*)c, ldc)); } #endif else { @@ -508,7 +509,7 @@ void BlasConnector::gemv(const char trans, const int m, const int n, #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasOperation_t cutransA = BlasUtils::judge_trans(false, trans, "gemv_op"); - cublasErrcheck(cublasSgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); + CHECK_CUBLAS(cublasSgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); } #endif else { @@ -526,7 +527,7 @@ void BlasConnector::gemv(const char trans, const int m, const int n, #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { cublasOperation_t cutransA = BlasUtils::judge_trans(false, trans, "gemv_op"); - cublasErrcheck(cublasDgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); + CHECK_CUBLAS(cublasDgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha, A, lda, X, incx, &beta, Y, incy)); } #endif else { @@ -546,7 +547,7 @@ void BlasConnector::gemv(const char trans, const int m, const int n, cuFloatComplex alpha_cu = make_cuFloatComplex(alpha.real(), alpha.imag()); cuFloatComplex beta_cu = make_cuFloatComplex(beta.real(), beta.imag()); cublasOperation_t cutransA = BlasUtils::judge_trans(true, trans, "gemv_op"); - cublasErrcheck(cublasCgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta_cu, (cuFloatComplex*)Y, incy)); + CHECK_CUBLAS(cublasCgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuFloatComplex*)A, lda, (cuFloatComplex*)X, incx, &beta_cu, (cuFloatComplex*)Y, incy)); } #endif else { @@ -566,7 +567,7 @@ void BlasConnector::gemv(const char trans, const int m, const int n, cuDoubleComplex alpha_cu = make_cuDoubleComplex(alpha.real(), alpha.imag()); cuDoubleComplex beta_cu = make_cuDoubleComplex(beta.real(), beta.imag()); cublasOperation_t cutransA = BlasUtils::judge_trans(true, trans, "gemv_op"); - cublasErrcheck(cublasZgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta_cu, (cuDoubleComplex*)Y, incy)); + CHECK_CUBLAS(cublasZgemv(BlasUtils::cublas_handle, cutransA, m, n, &alpha_cu, (cuDoubleComplex*)A, lda, (cuDoubleComplex*)X, incx, &beta_cu, (cuDoubleComplex*)Y, incy)); } #endif else { diff --git a/source/source_base/module_external/blas_connector_vector.cpp b/source/source_base/module_external/blas_connector_vector.cpp index 8f8091ba7d..db89fc07fb 100644 --- a/source/source_base/module_external/blas_connector_vector.cpp +++ b/source/source_base/module_external/blas_connector_vector.cpp @@ -22,7 +22,7 @@ void BlasConnector::axpy( const int n, const float alpha, const float *X, const } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasSaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); + CHECK_CUBLAS(cublasSaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); } #endif else { @@ -37,7 +37,7 @@ void BlasConnector::axpy( const int n, const double alpha, const double *X, cons } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasDaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); + CHECK_CUBLAS(cublasDaxpy(BlasUtils::cublas_handle, n, &alpha, X, incX, Y, incY)); } #endif else { @@ -52,7 +52,7 @@ void BlasConnector::axpy( const int n, const std::complex alpha, const st } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasCaxpy(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX, (float2*)Y, incY)); + CHECK_CUBLAS(cublasCaxpy(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX, (float2*)Y, incY)); } #endif else { @@ -67,7 +67,7 @@ void BlasConnector::axpy( const int n, const std::complex alpha, const s } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasZaxpy(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX, (double2*)Y, incY)); + CHECK_CUBLAS(cublasZaxpy(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX, (double2*)Y, incY)); } #endif else { @@ -84,7 +84,7 @@ void BlasConnector::scal( const int n, const float alpha, float *X, const int i } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasSscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); + CHECK_CUBLAS(cublasSscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); } #endif else { @@ -99,7 +99,7 @@ void BlasConnector::scal( const int n, const double alpha, double *X, const int } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasDscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); + CHECK_CUBLAS(cublasDscal(BlasUtils::cublas_handle, n, &alpha, X, incX)); } #endif else { @@ -114,7 +114,7 @@ void BlasConnector::scal( const int n, const std::complex alpha, std::com } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasCscal(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX)); + CHECK_CUBLAS(cublasCscal(BlasUtils::cublas_handle, n, (float2*)&alpha, (float2*)X, incX)); } #endif else { @@ -129,7 +129,7 @@ void BlasConnector::scal( const int n, const std::complex alpha, std::co } #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice) { - cublasErrcheck(cublasZscal(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX)); + CHECK_CUBLAS(cublasZscal(BlasUtils::cublas_handle, n, (double2*)&alpha, (double2*)X, incX)); } #endif else { @@ -147,7 +147,7 @@ float BlasConnector::dot( const int n, const float*const X, const int incX, cons #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice){ float result = 0.0; - cublasErrcheck(cublasSdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); + CHECK_CUBLAS(cublasSdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); return result; } #endif @@ -164,7 +164,7 @@ double BlasConnector::dot( const int n, const double*const X, const int incX, co #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice){ double result = 0.0; - cublasErrcheck(cublasDdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); + CHECK_CUBLAS(cublasDdot(BlasUtils::cublas_handle, n, X, incX, Y, incY, &result)); return result; } #endif @@ -276,7 +276,7 @@ float BlasConnector::nrm2( const int n, const float *X, const int incX, base_dev #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice){ float result = 0.0; - cublasErrcheck(cublasSnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); + CHECK_CUBLAS(cublasSnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); return result; } #endif @@ -294,7 +294,7 @@ double BlasConnector::nrm2( const int n, const double *X, const int incX, base_d #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice){ double result = 0.0; - cublasErrcheck(cublasDnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); + CHECK_CUBLAS(cublasDnrm2(BlasUtils::cublas_handle, n, X, incX, &result)); return result; } #endif @@ -312,7 +312,7 @@ double BlasConnector::nrm2( const int n, const std::complex *X, const in #ifdef __CUDA else if (device_type == base_device::AbacusDevice_t::GpuDevice){ double result = 0.0; - cublasErrcheck(cublasDznrm2(BlasUtils::cublas_handle, n, (double2*)X, incX, &result)); + CHECK_CUBLAS(cublasDznrm2(BlasUtils::cublas_handle, n, (double2*)X, incX, &result)); return result; } #endif @@ -322,7 +322,7 @@ double BlasConnector::nrm2( const int n, const std::complex *X, const in } // copies a into b -void BlasConnector::copy(const long n, const float *a, const int incx, float *b, const int incy, base_device::AbacusDevice_t device_type) +void BlasConnector::copy(const int n, const float *a, const int incx, float *b, const int incy, base_device::AbacusDevice_t device_type) { if (device_type == base_device::AbacusDevice_t::CpuDevice) { scopy_(&n, a, &incx, b, &incy); @@ -332,7 +332,7 @@ void BlasConnector::copy(const long n, const float *a, const int incx, float *b, } } -void BlasConnector::copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type) +void BlasConnector::copy(const int n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type) { if (device_type == base_device::AbacusDevice_t::CpuDevice) { dcopy_(&n, a, &incx, b, &incy); @@ -342,7 +342,7 @@ void BlasConnector::copy(const long n, const double *a, const int incx, double * } } -void BlasConnector::copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type) +void BlasConnector::copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type) { if (device_type == base_device::AbacusDevice_t::CpuDevice) { ccopy_(&n, a, &incx, b, &incy); @@ -352,7 +352,7 @@ void BlasConnector::copy(const long n, const std::complex *a, const int i } } -void BlasConnector::copy(const long n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type) +void BlasConnector::copy(const int n, const std::complex *a, const int incx, std::complex *b, const int incy, base_device::AbacusDevice_t device_type) { if (device_type == base_device::AbacusDevice_t::CpuDevice) { zcopy_(&n, a, &incx, b, &incy); @@ -368,7 +368,7 @@ void vector_mul_vector(const int& dim, T* result, const T* vector1, const T* vec using Real = typename GetTypeReal::type; if (device_type == base_device::AbacusDevice_t::CpuDevice) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -391,7 +391,7 @@ void vector_div_vector(const int& dim, T* result, const T* vector1, const T* vec using Real = typename GetTypeReal::type; if (device_type == base_device::AbacusDevice_t::CpuDevice) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(Real)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -412,7 +412,7 @@ void vector_add_vector(const int& dim, float *result, const float *vector1, cons { if (device_type == base_device::CpuDevice){ #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(float)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -433,7 +433,7 @@ void vector_add_vector(const int& dim, double *result, const double *vector1, co { if (device_type == base_device::CpuDevice){ #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(double)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -454,7 +454,7 @@ void vector_add_vector(const int& dim, std::complex *result, const std::c { if (device_type == base_device::CpuDevice){ #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(std::complex)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { @@ -475,7 +475,7 @@ void vector_add_vector(const int& dim, std::complex *result, const std:: { if (device_type == base_device::CpuDevice){ #ifdef _OPENMP -#pragma omp parallel for schedule(static, 8192 / sizeof(std::complex)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < dim; i++) { diff --git a/source/source_base/module_external/lapack_connector.h b/source/source_base/module_external/lapack_connector.h index ebc558e409..5007aedabf 100644 --- a/source/source_base/module_external/lapack_connector.h +++ b/source/source_base/module_external/lapack_connector.h @@ -42,173 +42,266 @@ //"xxx" specifies the type of problem, for example: // - gv stands for generalized eigenvalue +// The following declarations cover only a subset of LAPACK routines. +// If you need a LAPACK function that is not included here, feel free to add its declaration as needed. extern "C" { -// solve the generalized eigenproblem Ax=eBx, where A is Hermitian and complex couble - // zhegv_ & zhegvd_ returns all eigenvalues while zhegvx_ returns selected ones - void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - double* a, const int* lda, - const double* b, const int* ldb, double* w, - double* work, int* lwork, - int* iwork, int* liwork, int* info); - - void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, +// === Generalized Hermitian-definite eigenproblems === +void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n, + double* a, const int* lda, + double* b, const int* ldb, + double* w, + double* work, const int* lwork, + int* iwork, const int* liwork, + int* info); + +void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, std::complex* a, const int* lda, - const std::complex* b, const int* ldb, float* w, - std::complex* work, int* lwork, float* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - - void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, - std::complex* a, const int* lda, - const std::complex* b, const int* ldb, double* w, - std::complex* work, int* lwork, double* rwork, int* lrwork, - int* iwork, int* liwork, int* info); - - void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, - double* a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, double* z, const int* ldz, - double* work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - - void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const float* vl, const float* vu, const int* il, const int* iu, const float* abstol, - const int* m, float* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, float* rwork, int* iwork, int* ifail, int* info); - - void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, - std::complex *a, const int* lda, - const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, - const int* m, double* w, std::complex *z, const int *ldz, - std::complex *work, const int* lwork, double* rwork, int* iwork, int* ifail, int* info); - - - void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, - const int* n, double* A, const int* lda, double* B, const int* ldb, - const double* vl, const double* vu, const int* il, const int* iu, - const double* abstol, const int* m, double* w, double* Z, const int* ldz, - double* work, const int* lwork, int* iwork, int* ifail, int* info); - - void chegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const float* vl,const float* vu,const int* il, - const int* iu,const float* abstol,const int* m,float* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - float* rwork,int* iwork,int* ifail,int* info); - - void zhegvx_(const int* itype,const char* jobz,const char* range,const char* uplo, - const int* n,std::complex *a,const int* lda,std::complex *b, - const int* ldb,const double* vl,const double* vu,const int* il, - const int* iu,const double* abstol,const int* m,double* w, - std::complex *z,const int *ldz,std::complex *work,const int* lwork, - double* rwork,int* iwork,int* ifail,int* info); - - void zhegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - double* w,std::complex* work,int* lwork,double* rwork,int* info); - void chegv_(const int* itype,const char* jobz,const char* uplo,const int* n, - std::complex* a,const int* lda,std::complex* b,const int* ldb, - float* w,std::complex* work,int* lwork,float* rwork,int* info); - void dsygv_(const int* itype, const char* jobz,const char* uplo, const int* n, - double* a,const int* lda,double* b,const int* ldb, - double* w,double* work,int* lwork,int* info); - - // solve the eigenproblem Ax=ex, where A is Hermitian and complex couble - // zheev_ returns all eigenvalues while zheevx_ returns selected ones - void zheev_(const char* jobz,const char* uplo,const int* n,std::complex *a, - const int* lda,double* w,std::complex* work,const int* lwork, - double* rwork,int* info); - void cheev_(const char* jobz,const char* uplo,const int* n,std::complex *a, - const int* lda,float* w,std::complex* work,const int* lwork, - float* rwork,int* info); - void dsyev_(const char* jobz,const char* uplo,const int* n,double *a, - const int* lda,double* w,double* work,const int* lwork, int* info); - - // solve the eigenproblem Ax=ex, where A is a general matrix - void dgeev_(const char* jobvl, const char* jobvr, const int* n, double* a, const int* lda, - double* wr, double* wi, double* vl, const int* ldvl, double* vr, const int* ldvr, - double* work, const int* lwork, int* info); - void zgeev_(const char* jobvl, const char* jobvr, const int* n, std::complex* a, const int* lda, - std::complex* w, std::complex* vl, const int* ldvl, std::complex* vr, const int* ldvr, - std::complex* work, const int* lwork, double* rwork, int* info); - // liuyu add 2023-10-03 - // dgetri and dgetrf computes the inverse of a n*n real matrix - void dgetri_(const int* n, double* a, const int* lda, const int* ipiv, double* work, const int* lwork, int* info); - void dgetrf_(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); - - // dsytrf_ computes the Bunch-Kaufman factorization of a double precision - // symmetric matrix, while dsytri takes its output to perform martrix inversion - void dsytrf_(const char* uplo, const int* n, double * a, const int* lda, - int *ipiv,double *work, const int* lwork ,int *info); - void dsytri_(const char* uplo,const int* n,double *a, const int *lda, - int *ipiv, double * work,int *info); - // Peize Lin add dsptrf and dsptri 2016-06-21, to compute inverse real symmetry indefinit matrix. - // dpotrf computes the Cholesky factorization of a real symmetric positive definite matrix - // while dpotri taks its output to perform matrix inversion - void spotrf_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); - void dpotrf_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); - void cpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void zpotrf_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void spotri_(const char*const uplo, const int*const n, float*const A, const int*const lda, int*const info); - void dpotri_(const char*const uplo, const int*const n, double*const A, const int*const lda, int*const info); - void cpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - void zpotri_(const char*const uplo, const int*const n, std::complex*const A, const int*const lda, int*const info); - - // zgetrf computes the LU factorization of a general matrix - // while zgetri takes its output to perform matrix inversion - void zgetrf_(const int* m, const int *n, std::complex *A, const int *lda, int *ipiv, int* info); - void zgetri_(const int* n, std::complex* A, const int* lda, const int* ipiv, std::complex* work, const int* lwork, int* info); - - // if trans=='N': C = alpha * A * A.H + beta * C - // if trans=='C': C = alpha * A.H * A + beta * C - void zherk_(const char *uplo, const char *trans, const int *n, const int *k, - const double *alpha, const std::complex *A, const int *lda, - const double *beta, std::complex *C, const int *ldc); - void cherk_(const char* uplo, const char* trans, const int* n, const int* k, - const float* alpha, const std::complex* A, const int* lda, - const float* beta, std::complex* C, const int* ldc); - - // computes all eigenvalues of a symmetric tridiagonal matrix - // using the Pal-Walker-Kahan variant of the QL or QR algorithm. - void dsterf_(int *n, double *d, double *e, int *info); - // computes the eigenvectors of a real symmetric tridiagonal - // matrix T corresponding to specified eigenvalues - void dstein_(int *n, double* d, double *e, int *m, double *w, - int* block, int* isplit, double* z, int *lda, double *work, - int* iwork, int* ifail, int *info); - // computes the eigenvectors of a complex symmetric tridiagonal - // matrix T corresponding to specified eigenvalues - void zstein_(int *n, double* d, double *e, int *m, double *w, - int* block, int* isplit, std::complex* z, int *lda, double *work, - int* iwork, int* ifail, int *info); - - // computes the Cholesky factorization of a symmetric - // positive definite matrix A. - void dpotf2_(char *uplo, int *n, double *a, int *lda, int *info); - void zpotf2_(char *uplo,int *n,std::complex *a, int *lda, int *info); - - // reduces a symmetric definite generalized eigenproblem to standard form - // using the factorization results obtained from spotrf - void dsygs2_(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info); - void zhegs2_(int *itype, char *uplo, int *n, std::complex *a, int *lda, std::complex *b, int *ldb, int *info); - - // copies a into b - void dlacpy_(char *uplo, int *m, int *n, double* a, int *lda, double *b, int *ldb); - void zlacpy_(char *uplo, int *m, int *n, std::complex* a, int *lda, std::complex *b, int *ldb); - - // generates a real elementary reflector H of order n, such that - // H * ( alpha ) = ( beta ), H is unitary. - // ( x ) ( 0 ) - void dlarfg_(int *n, double *alpha, double *x, int *incx, double *tau); - void zlarfg_(int *n, std::complex *alpha, std::complex *x, int *incx, std::complex *tau); - - // solve a tridiagonal linear system - void dgtsv_(int* N, int* NRHS, double* DL, double* D, double* DU, double* B, int* LDB, int* INFO); - - // solve Ax = b - void dsysv_(const char* uplo, const int* n, const int* m, double * a, const int* lda, - int *ipiv, double * b, const int* ldb, double *work, const int* lwork ,int *info); -} + std::complex* b, const int* ldb, + float* w, + std::complex* work, const int* lwork, + float* rwork, const int* lrwork, + int* iwork, const int* liwork, + int* info); + +void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + double* w, + std::complex* work, const int* lwork, + double* rwork, const int* lrwork, + int* iwork, const int* liwork, + int* info); + +// === Selected eigenvalues/vectors: standard Hermitian === + +void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n, + double* a, const int* lda, + const double* vl, const double* vu, + const int* il, const int* iu, + const double* abstol, + int* m, double* w, double* z, const int* ldz, + double* work, const int* lwork, + int* iwork, int* ifail, + int* info); + +void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n, + std::complex* a, const int* lda, + const float* vl, const float* vu, + const int* il, const int* iu, + const float* abstol, + int* m, float* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, + float* rwork, int* iwork, int* ifail, + int* info); + +void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n, + std::complex* a, const int* lda, + const double* vl, const double* vu, + const int* il, const int* iu, + const double* abstol, + int* m, double* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, + double* rwork, int* iwork, int* ifail, + int* info); + +// === Selected eigenvalues/vectors: generalized Hermitian === + +void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo, + const int* n, + double* a, const int* lda, + double* b, const int* ldb, + const double* vl, const double* vu, + const int* il, const int* iu, + const double* abstol, + int* m, double* w, double* z, const int* ldz, + double* work, const int* lwork, + int* iwork, int* ifail, + int* info); + +void chegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, + const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + const float* vl, const float* vu, + const int* il, const int* iu, + const float* abstol, + int* m, float* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, + float* rwork, int* iwork, int* ifail, + int* info); + +void zhegvx_(const int* itype, const char* jobz, const char* range, const char* uplo, + const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + const double* vl, const double* vu, + const int* il, const int* iu, + const double* abstol, + int* m, double* w, std::complex* z, const int* ldz, + std::complex* work, const int* lwork, + double* rwork, int* iwork, int* ifail, + int* info); + +// === Generalized Hermitian: all eigenvalues (simple driver) === + +void dsygv_(const int* itype, const char* jobz, const char* uplo, const int* n, + double* a, const int* lda, + double* b, const int* ldb, + double* w, + double* work, const int* lwork, + int* info); + +void chegv_(const int* itype, const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + float* w, + std::complex* work, const int* lwork, + float* rwork, + int* info); + +void zhegv_(const int* itype, const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + std::complex* b, const int* ldb, + double* w, + std::complex* work, const int* lwork, + double* rwork, + int* info); + +// === Standard Hermitian eigenproblem === + + void ssyev_(const char* jobz, + const char* uplo, + const int* n, + float* a, + const int* lda, + float* w, + float* work, + const int* lwork, + int* info); + void dsyev_(const char* jobz, + const char* uplo, + const int* n, + double* a, + const int* lda, + double* w, + double* work, + const int* lwork, + int* info); + +void cheev_(const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + float* w, + std::complex* work, const int* lwork, + float* rwork, + int* info); + +void zheev_(const char* jobz, const char* uplo, const int* n, + std::complex* a, const int* lda, + double* w, + std::complex* work, const int* lwork, + double* rwork, + int* info); + +// === General (non-Hermitian) eigenproblem === + +void dgeev_(const char* jobvl, const char* jobvr, const int* n, + double* a, const int* lda, + double* wr, double* wi, + double* vl, const int* ldvl, + double* vr, const int* ldvr, + double* work, const int* lwork, + int* info); + +void zgeev_(const char* jobvl, const char* jobvr, const int* n, + std::complex* a, const int* lda, + std::complex* w, + std::complex* vl, const int* ldvl, + std::complex* vr, const int* ldvr, + std::complex* work, const int* lwork, + double* rwork, + int* info); + +// === Matrix inversion (LU) === + +void dgetrf_(const int* m, const int* n, double* a, const int* lda, + int* ipiv, int* info); + +void dgetri_(const int* n, double* a, const int* lda, + const int* ipiv, + double* work, const int* lwork, + int* info); + +// === Symmetric indefinite inversion (Bunch-Kaufman) === + +void dsytrf_(const char* uplo, const int* n, double* a, const int* lda, + int* ipiv, double* work, const int* lwork, int* info); + +void dsytri_(const char* uplo, const int* n, double* a, const int* lda, + const int* ipiv, double* work, int* info); + +// === Cholesky factorization & inversion === + +void spotrf_(const char* uplo, const int* n, float* a, const int* lda, int* info); +void dpotrf_(const char* uplo, const int* n, double* a, const int* lda, int* info); +void cpotrf_(const char* uplo, const int* n, std::complex* a, const int* lda, int* info); +void zpotrf_(const char* uplo, const int* n, std::complex* a, const int* lda, int* info); + +void spotri_(const char* uplo, const int* n, float* a, const int* lda, int* info); +void dpotri_(const char* uplo, const int* n, double* a, const int* lda, int* info); +void cpotri_(const char* uplo, const int* n, std::complex* a, const int* lda, int* info); +void zpotri_(const char* uplo, const int* n, std::complex* a, const int* lda, int* info); + +// === Complex LU inversion === + +void zgetrf_(const int* m, const int* n, std::complex* a, const int* lda, + int* ipiv, int* info); + +void zgetri_(const int* n, std::complex* a, const int* lda, + const int* ipiv, + std::complex* work, const int* lwork, + int* info); + + +// === Tridiagonal eigen solvers === + +void dsterf_(const int* n, double* d, double* e, int* info); + +void dstein_(const int* n, const double* d, const double* e, + const int* m, const double* w, + const int* iblock, const int* isplit, + double* z, const int* ldz, + double* work, int* iwork, int* ifail, + int* info); + +void zstein_(const int* n, const double* d, const double* e, + const int* m, const double* w, + const int* iblock, const int* isplit, + std::complex* z, const int* ldz, + double* work, int* iwork, int* ifail, + int* info); + +// === Unblocked Cholesky (level 2 BLAS) === + +void dpotf2_(const char* uplo, const int* n, double* a, const int* lda, int* info); +void zpotf2_(const char* uplo, const int* n, std::complex* a, const int* lda, int* info); + +// === Tridiagonal solver === + +void dgtsv_(const int* n, const int* nrhs, + double* dl, double* d, double* du, + double* b, const int* ldb, + int* info); + +// === Symmetric indefinite linear solver === + +void dsysv_(const char* uplo, const int* n, const int* nrhs, + double* a, const int* lda, + int* ipiv, + double* b, const int* ldb, + double* work, const int* lwork, + int* info); +} // extern "C" #ifdef GATHER_INFO #define zhegvx_ zhegvx_i @@ -226,7 +319,7 @@ void zhegvx_i(const int* itype, const int* il, const int* iu, const double* abstol, - const int* m, + int* m, double* w, std::complex* z, const int* ldz, diff --git a/source/source_base/module_fft/fft_cuda.cpp b/source/source_base/module_fft/fft_cuda.cpp index bd5669f822..e33fd20311 100644 --- a/source/source_base/module_fft/fft_cuda.cpp +++ b/source/source_base/module_fft/fft_cuda.cpp @@ -1,7 +1,6 @@ #include "fft_cuda.h" - #include "source_base/module_device/memory_op.h" -#include "source_pw/module_pwdft/global.h" +#include "source_base/module_device/device_check.h" namespace ModuleBase { @@ -111,4 +110,4 @@ template FFT_CUDA::FFT_CUDA(); template FFT_CUDA::~FFT_CUDA(); template FFT_CUDA::FFT_CUDA(); template FFT_CUDA::~FFT_CUDA(); -} // namespace ModuleBase \ No newline at end of file +} // namespace ModuleBase diff --git a/source/source_base/module_fft/fft_dsp.cpp b/source/source_base/module_fft/fft_dsp.cpp index 0350556be9..ca4a0cd1e4 100644 --- a/source/source_base/module_fft/fft_dsp.cpp +++ b/source/source_base/module_fft/fft_dsp.cpp @@ -2,6 +2,7 @@ #include "source_base/global_variable.h" #include "source_base/global_function.h" +#include "source_io/module_parameter/parameter.h" #include #include @@ -14,7 +15,7 @@ void FFT_DSP::initfft(int nx_in, int ny_in, int nz_in) this->nx = nx_in; this->ny = ny_in; this->nz = nz_in; - cluster_id = GlobalV::MY_RANK; + cluster_id = GlobalV::MY_RANK % PARAM.inp.dsp_count; nxyz = this->nx * this->ny * this->nz; } template <> diff --git a/source/source_base/module_fft/fft_rocm.cpp b/source/source_base/module_fft/fft_rocm.cpp index 89413e2d64..1730a0cdda 100644 --- a/source/source_base/module_fft/fft_rocm.cpp +++ b/source/source_base/module_fft/fft_rocm.cpp @@ -1,6 +1,7 @@ #include "fft_rocm.h" #include "source_base/module_device/memory_op.h" -#include "source_pw/module_pwdft/global.h" +#include "source_base/module_device/device_check.h" + namespace ModuleBase { template @@ -107,4 +108,4 @@ template FFT_ROCM::FFT_ROCM(); template FFT_ROCM::~FFT_ROCM(); template FFT_ROCM::FFT_ROCM(); template FFT_ROCM::~FFT_ROCM(); -}// namespace ModuleBase \ No newline at end of file +}// namespace ModuleBase diff --git a/source/source_base/module_mixing/broyden_mixing.cpp b/source/source_base/module_mixing/broyden_mixing.cpp index c5f8e5e025..eabc0297a7 100644 --- a/source/source_base/module_mixing/broyden_mixing.cpp +++ b/source/source_base/module_mixing/broyden_mixing.cpp @@ -32,7 +32,7 @@ void Broyden_Mixing::tem_push_data(Mixing_Data& mdata, const size_t length = mdata.length; std::vector F_tmp(length); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { @@ -72,7 +72,7 @@ void Broyden_Mixing::tem_push_data(Mixing_Data& mdata, dF = malloc(sizeof(FPTYPE) * length * mixing_ndim); FP_dF = static_cast(dF); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { @@ -84,7 +84,7 @@ void Broyden_Mixing::tem_push_data(Mixing_Data& mdata, this->ndim_cal_dF = std::min(this->ndim_cal_dF + 1, this->mixing_ndim); start_dF = (this->start_dF + 1) % this->mixing_ndim; #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { @@ -192,7 +192,7 @@ void Broyden_Mixing::tem_cal_coef(const Mixing_Data& mdata, std::functionndim_history; FPTYPE* FP_startdata = static_cast(this->data) + this->start * this->length; #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096/sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (std::size_t i = 0; i < length; ++i) { diff --git a/source/source_base/module_mixing/plain_mixing.cpp b/source/source_base/module_mixing/plain_mixing.cpp index 81bdd659ef..591519e79f 100644 --- a/source/source_base/module_mixing/plain_mixing.cpp +++ b/source/source_base/module_mixing/plain_mixing.cpp @@ -30,7 +30,7 @@ void Plain_Mixing::tem_push_data(Mixing_Data& mdata, const size_t length = mdata.length; std::vector F_tmp(length); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { @@ -68,7 +68,7 @@ void Plain_Mixing::simple_mix(FPTYPE* data_new, if (screen == nullptr) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < length; ig++) { @@ -79,7 +79,7 @@ void Plain_Mixing::simple_mix(FPTYPE* data_new, { std::vector F_tmp(length); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { @@ -87,7 +87,7 @@ void Plain_Mixing::simple_mix(FPTYPE* data_new, } screen(F_tmp.data()); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < length; ++i) { diff --git a/source/source_base/module_mixing/pulay_mixing.cpp b/source/source_base/module_mixing/pulay_mixing.cpp index c283a5c2e7..db25d2171d 100644 --- a/source/source_base/module_mixing/pulay_mixing.cpp +++ b/source/source_base/module_mixing/pulay_mixing.cpp @@ -32,7 +32,7 @@ void Pulay_Mixing::tem_push_data(Mixing_Data& mdata, std::vector F_tmp(length); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (std::size_t i = 0; i < length; ++i) { @@ -67,7 +67,7 @@ void Pulay_Mixing::tem_push_data(Mixing_Data& mdata, F = malloc(sizeof(FPTYPE) * length * mixing_ndim); FP_F = static_cast(F); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (std::size_t i = 0; i < length; ++i) { @@ -79,7 +79,7 @@ void Pulay_Mixing::tem_push_data(Mixing_Data& mdata, start_F = (this->start_F + 1) % this->mixing_ndim; FPTYPE* FP_startF = FP_F + start_F * length; #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (std::size_t i = 0; i < length; ++i) { diff --git a/source/source_base/parallel_global.cpp b/source/source_base/parallel_global.cpp index 6e5d1b2185..f227e6518f 100644 --- a/source/source_base/parallel_global.cpp +++ b/source/source_base/parallel_global.cpp @@ -15,7 +15,7 @@ #include "source_base/parallel_common.h" #include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" -// #include "source_base/tool_quit.h" +#include "source_base/tool_quit.h" #include "source_main/version.h" #include @@ -88,10 +88,10 @@ void Parallel_Global::split_grid_world(const int diag_np, const int& nproc, cons } // changed from read_mpi_parameters in 2024-1018 -void Parallel_Global::read_pal_param(int argc, - char** argv, - int& NPROC, - int& NTHREAD_PER_PROC, +void Parallel_Global::read_pal_param(int argc, + char** argv, + int& NPROC, + int& NTHREAD_PER_PROC, int& MY_RANK) { #ifdef __MPI @@ -328,9 +328,10 @@ void Parallel_Global::divide_pools(const int& NPROC, // and MY_BNDGROUP will be the same as well. if(BNDPAR > 1 && NPROC %(BNDPAR * KPAR) != 0) { - std::cout << "Error: When BNDPAR = " << BNDPAR << " > 1, number of processes (" << NPROC << ") must be divisible by the number of groups (" - << BNDPAR * KPAR << ")." << std::endl; - exit(1); + std::cout << "Error: When BNDPAR = " << BNDPAR << " > 1, number of processes (" << NPROC + << ") must be divisible by the number of groups (" << BNDPAR * KPAR << ")." << std::endl; + ModuleBase::WARNING_QUIT("ParallelGlobal::divide_pools", + "When BNDPAR > 1, number of processes NPROC must be divisible by the number of groups BNDPAR * KPAR."); } // k-point parallelization MPICommGroup kpar_group(MPI_COMM_WORLD); @@ -339,7 +340,7 @@ void Parallel_Global::divide_pools(const int& NPROC, // band parallelization MPICommGroup bndpar_group(kpar_group.group_comm); bndpar_group.divide_group_comm(BNDPAR, true); - + // Set parallel index. // In previous versions, the order of k-point parallelization and band parallelization is reversed. // So we need to keep some variables for compatibility. @@ -355,7 +356,7 @@ void Parallel_Global::divide_pools(const int& NPROC, { KP_WORLD = MPI_COMM_NULL; } - + if(BNDPAR > 1) { NPROC_IN_BNDGROUP = kpar_group.ngroups * bndpar_group.nprocs_in_group; @@ -385,14 +386,19 @@ void Parallel_Global::divide_mpi_groups(const int& procs, { if (num_groups == 0) { - std::cout << "Error: Number of groups must be greater than 0." << std::endl; - exit(1); + ModuleBase::WARNING_QUIT( + "Parallel_Global::divide_mpi_groups", + "Number of groups must be greater than 0." + ); } if (procs < num_groups) { std::cout << "Error: Number of processes (" << procs << ") must be greater than the number of groups (" << num_groups << ")." << std::endl; - exit(1); + ModuleBase::WARNING_QUIT( + "Parallel_Global::divide_mpi_groups", + "Number of processes must be greater than the number of groups." + ); } // Calculate the distribution of processes among pools. procs_in_group = procs / num_groups; diff --git a/source/source_base/parallel_reduce.cpp b/source/source_base/parallel_reduce.cpp index c44bd8fb66..36095f6d03 100644 --- a/source/source_base/parallel_reduce.cpp +++ b/source/source_base/parallel_reduce.cpp @@ -13,6 +13,15 @@ void Parallel_Reduce::reduce_all(int& object) return; } +template <> +void Parallel_Reduce::reduce_all(long long& object) +{ +#ifdef __MPI + MPI_Allreduce(MPI_IN_PLACE, &object, 1, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD); +#endif + return; +} + void Parallel_Reduce::reduce_int_diag(int& object) { #ifdef __MPI @@ -48,6 +57,15 @@ void Parallel_Reduce::reduce_all(int* object, const int n) return; } +template <> +void Parallel_Reduce::reduce_all(long long* object, const int n) +{ +#ifdef __MPI + MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD); +#endif + return; +} + void Parallel_Reduce::reduce_int_grid(int* object, const int n) { #ifdef __MPI @@ -99,6 +117,14 @@ void Parallel_Reduce::reduce_pool(double& object) return; } +template <> +void Parallel_Reduce::reduce_pool(int* object, const int n) +{ +#ifdef __MPI + MPI_Allreduce(MPI_IN_PLACE, object, n, MPI_INT, MPI_SUM, POOL_WORLD); +#endif +} + template <> void Parallel_Reduce::reduce_pool(double* object, const int n) { @@ -215,85 +241,65 @@ void Parallel_Reduce::gather_int_all(int& v, int* all) return; } -void Parallel_Reduce::gather_min_int_all(const int& nproc, int& v) +template <> +void Parallel_Reduce::reduce_min(int& v) { #ifdef __MPI - std::vector all(nproc, 0); - MPI_Allgather(&v, 1, MPI_INT, all.data(), 1, MPI_INT, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) - { - if (v > all[i]) - { - v = all[i]; - } - } + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD); #endif } -void Parallel_Reduce::gather_max_double_all(const int& nproc, double& v) +template <> +void Parallel_Reduce::reduce_min(float& v) { #ifdef __MPI - std::vector value(nproc, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) - { - if (v < value[i]) - { - v = value[i]; - } - } + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_FLOAT, MPI_MIN, MPI_COMM_WORLD); #endif } -void Parallel_Reduce::gather_max_double_pool(const int& nproc_in_pool, double& v) +template <> +void Parallel_Reduce::reduce_min(double& v) { #ifdef __MPI - if (nproc_in_pool == 1) - { - return; - } - std::vector value(nproc_in_pool, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, POOL_WORLD); - for (int i = 0; i < nproc_in_pool; i++) - { - if (v < value[i]) - { - v = value[i]; - } - } + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD); +#endif +} + +template <> +void Parallel_Reduce::reduce_max(float& v) +{ +#ifdef __MPI + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_FLOAT, MPI_MAX, MPI_COMM_WORLD); #endif } -void Parallel_Reduce::gather_min_double_pool(const int& nproc_in_pool, double& v) +template <> +void Parallel_Reduce::reduce_max(double& v) +{ +#ifdef __MPI + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); +#endif +} + +template <> +void Parallel_Reduce::reduce_max_pool(const int& nproc_in_pool, double& v) { #ifdef __MPI if (nproc_in_pool == 1) { return; } - std::vector value(nproc_in_pool, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, POOL_WORLD); - for (int i = 0; i < nproc_in_pool; i++) - { - if (v > value[i]) - { - v = value[i]; - } - } + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_DOUBLE, MPI_MAX, POOL_WORLD); #endif } - -void Parallel_Reduce::gather_min_double_all(const int& nproc, double& v) +template <> +void Parallel_Reduce::reduce_min_pool(const int& nproc_in_pool, double& v) { #ifdef __MPI - std::vector value(nproc, 0.0); - MPI_Allgather(&v, 1, MPI_DOUBLE, value.data(), 1, MPI_DOUBLE, MPI_COMM_WORLD); - for (int i = 0; i < nproc; i++) + if (nproc_in_pool == 1) { - if (v > value[i]) - { - v = value[i]; - } + return; } + MPI_Allreduce(MPI_IN_PLACE, &v, 1, MPI_DOUBLE, MPI_MIN, POOL_WORLD); #endif } \ No newline at end of file diff --git a/source/source_base/parallel_reduce.h b/source/source_base/parallel_reduce.h index 7ab85be1cb..a781989951 100644 --- a/source/source_base/parallel_reduce.h +++ b/source/source_base/parallel_reduce.h @@ -21,6 +21,14 @@ template void reduce_pool(T& object); template void reduce_pool(T* object, const int n); +template +void reduce_min(T& v); +template +void reduce_max(T& v); +template +void reduce_min_pool(const int& nproc_in_pool, T& v); +template +void reduce_max_pool(const int& nproc_in_pool, T& v); void reduce_int_diag(int& object); // mohan add 2012-01-12 @@ -34,13 +42,6 @@ void reduce_double_diag(double* object, const int n); void reduce_double_allpool(const int& npool, const int& nproc_in_pool, double& object); void reduce_double_allpool(const int& npool, const int& nproc_in_pool, double* object, const int n); -void gather_min_int_all(const int& nproc, int& v); -void gather_max_double_all(const int& nproc, double& v); -void gather_min_double_all(const int& nproc, double& v); -void gather_max_double_pool(const int& nproc_in_pool, double& v); -void gather_min_double_pool(const int& nproc_in_pool, double& v); - -// mohan add 2011-04-21 void gather_int_all(int& v, int* all); bool check_if_equal(double& v); // mohan add 2009-11-11 diff --git a/source/source_base/sph_bessel_recursive-d2.cpp b/source/source_base/sph_bessel_recursive-d2.cpp index 4418905d97..f23074e9c3 100644 --- a/source/source_base/sph_bessel_recursive-d2.cpp +++ b/source/source_base/sph_bessel_recursive-d2.cpp @@ -4,12 +4,12 @@ //========================================================== #include "sph_bessel_recursive.h" +#include "constants.h" +#include "source_base/memory.h" #include #include -#include "constants.h" - namespace ModuleBase { @@ -33,6 +33,7 @@ const std::vector>> & Sph_Bessel_Recursive::D2:: cal_jlx_0( lmax+1, ix1_size, ix2_size ); cal_jlx_smallx( lmax+1, ix1_size, ix2_size ); cal_jlx_recursive( lmax+1, ix1_size, ix2_size ); + ModuleBase::Memory::record("ORB::Jl(x)", sizeof(double) * (lmax+1) * ix1_size * ix2_size); return jlx; } @@ -41,7 +42,7 @@ void Sph_Bessel_Recursive::D2::cal_jlx_0( const int l_size, const size_t ix1_siz if(jlx.size() < static_cast(l_size)) jlx.resize(l_size); - for( int l=0; l!=l_size; ++l ) + for( int l=0; l x_const, result, answer; @@ -241,7 +241,7 @@ TEST(blas_connector, dcopy_) { TEST(blas_connector, zcopy_) { typedef std::complex T; - long const size = 8; + int const size = 8; int const incx = 1; int const incy = 1; std::array x_const, result, answer; @@ -259,7 +259,7 @@ TEST(blas_connector, zcopy_) { } TEST(blas_connector, copy) { - long const size = 8; + int const size = 8; int const incx = 1; int const incy = 1; std::complex result[8], answer[8]; diff --git a/source/source_base/test/global_file_test.cpp b/source/source_base/test/global_file_test.cpp index 55b006fac4..338070ecfa 100644 --- a/source/source_base/test/global_file_test.cpp +++ b/source/source_base/test/global_file_test.cpp @@ -26,13 +26,24 @@ class GlobalFile : public testing::Test { - + protected: + void SetUp() override + { + const std::string suffix = "Si"; + PARAM.sys.global_out_dir = "OUT." + suffix + "/"; + PARAM.sys.global_stru_dir = PARAM.sys.global_out_dir + "STRU/"; + PARAM.sys.global_matrix_dir = PARAM.sys.global_out_dir + "matrix/"; + PARAM.sys.global_wfc_dir = PARAM.sys.global_out_dir + "WFC/"; + PARAM.sys.global_mlkedf_descriptor_dir = PARAM.sys.global_out_dir + "MLKEDF_Descriptors/"; + PARAM.sys.global_deepks_label_elec_dir = PARAM.sys.global_out_dir + "DeePKS_Labels_Elec/"; + } }; TEST_F(GlobalFile,mkdirout) { std::string output; testing::internal::CaptureStdout(); + PARAM.sys.log_file = "running_m_1.log"; ModuleBase::Global_File::make_dir_out("Si","m",false,false,0,true,true); output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output,testing::HasSubstr("MAKE THE DIR")); @@ -43,6 +54,7 @@ TEST_F(GlobalFile,mkdirout) remove(dd.c_str()); testing::internal::CaptureStdout(); + PARAM.sys.log_file = "running_md.log"; ModuleBase::Global_File::make_dir_out("Si","md",false,false,0,true,false); output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output,testing::HasSubstr("MAKE THE STRU DIR")); @@ -53,6 +65,7 @@ TEST_F(GlobalFile,mkdirout) remove(bb.c_str()); testing::internal::CaptureStdout(); + PARAM.sys.log_file = "running_md_1.log"; ModuleBase::Global_File::make_dir_out("Si","md",true,false,0,true,true); output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output,testing::HasSubstr("MAKE THE MATRIX DIR")); @@ -79,6 +92,7 @@ TEST_F(GlobalFile,mkdiratom) TEST_F(GlobalFile,openlog) { + PARAM.sys.global_out_dir = "./"; std::ofstream ofs; ModuleBase::Global_File::open_log(ofs,"Si.log","md",true); EXPECT_TRUE(ofs.is_open()); diff --git a/source/source_base/test/global_function_test.cpp b/source/source_base/test/global_function_test.cpp index 3a5458c234..97e53c58a6 100644 --- a/source/source_base/test/global_function_test.cpp +++ b/source/source_base/test/global_function_test.cpp @@ -13,6 +13,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include +#include +#include +#include +#include /************************************************ * unit test of functions in global_function @@ -420,9 +424,13 @@ TEST_F(GlobalFunctionTest, MakeDir) { GlobalV::MY_RANK = 0; ModuleBase::GlobalFunc::MAKE_DIR("scf"); - auto error1 = std::system("test -d "); + + struct stat st; + int error1 = stat("scf", &st); EXPECT_EQ(error1, 0); - auto error2 = std::system("rm -r scf "); + EXPECT_TRUE(S_ISDIR(st.st_mode)); + + int error2 = rmdir("scf"); EXPECT_EQ(error2, 0); SUCCEED(); } diff --git a/source/source_base/test/ylm_test.cpp b/source/source_base/test/ylm_test.cpp index ee85ac80ec..ed5fcbcc1b 100644 --- a/source/source_base/test/ylm_test.cpp +++ b/source/source_base/test/ylm_test.cpp @@ -1,5 +1,6 @@ #include "../ylm.h" #include "gtest/gtest.h" +#include /************************************************ * unit test of class ylm ***********************************************/ @@ -8,6 +9,13 @@ * - Tested Functions: * - ZEROS * - set all elements of a double float array to zero + * - hes_rl_sph_harm + * - test Hessian symmetry for l=5, l=6 + * - test finite difference validation for l=5, l=6 + * - test all Hessian components (H_xx, H_xy, H_xz, H_yy, H_yz, H_zz) for l=2 + * - test m=0 values across different l (l=0,1,2,3,4) + * - test special points (on coordinate axes) for l=4 + * - verify l>6 is not implemented * */ class ylmTest : public testing::Test @@ -17,9 +25,436 @@ class ylmTest : public testing::Test TEST_F(ylmTest,Zeros) { double aaaa[100]; - ModuleBase::Ylm::ZEROS(aaaa,100); + ModuleBase::Ylm::ZEROS(aaaa,100); for(int i = 0; i < 100; i++) { EXPECT_EQ(aaaa[i],0.0); } } + +// Test Hessian symmetry for l=5 +TEST_F(ylmTest, HessianSymmetryL5) +{ + const int l = 5; + const double x = 1.5, y = 2.0, z = 1.0; + std::vector> hrly; + + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Check that Hessian is symmetric for all m values + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + // hrly format: [H_xx, H_xy, H_xz, H_yy, H_yz, H_zz] + // Symmetry is built into the storage format + // Just verify the array is properly sized + EXPECT_EQ(hrly[idx].size(), 6); + } +} + +// Test Hessian symmetry for l=6 +TEST_F(ylmTest, HessianSymmetryL6) +{ + const int l = 6; + const double x = 1.5, y = 2.0, z = 1.0; + std::vector> hrly; + + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Check that Hessian is symmetric for all m values + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + EXPECT_EQ(hrly[idx].size(), 6); + } +} + +// Test Hessian finite difference for l=5 using central difference +TEST_F(ylmTest, HessianFiniteDifferenceL5) +{ + const int l = 5; + const double x = 1.5, y = 2.0, z = 1.0; + const double h = 1e-5; + const double tol = 1e-3; // Relaxed tolerance for numerical differentiation + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Allocate gradient arrays for central difference + std::vector rly_xp((l+1)*(l+1)); + std::vector> grly_xp((l+1)*(l+1), std::vector(3)); + double** grly_xp_ptr = new double*[(l+1)*(l+1)]; + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xp_ptr[i] = grly_xp[i].data(); + } + + std::vector rly_xm((l+1)*(l+1)); + std::vector> grly_xm((l+1)*(l+1), std::vector(3)); + double** grly_xm_ptr = new double*[(l+1)*(l+1)]; + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xm_ptr[i] = grly_xm[i].data(); + } + + // Compute gradient at (x+h, y, z) and (x-h, y, z) + ModuleBase::Ylm::grad_rl_sph_harm(l, x+h, y, z, rly_xp.data(), grly_xp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x-h, y, z, rly_xm.data(), grly_xm_ptr); + + // Test H_xx for m=0 (index 25) using central difference + int idx = 25; + double H_xx_fd = (grly_xp[idx][0] - grly_xm[idx][0]) / (2.0 * h); + double H_xx_analytic = hrly[idx][0]; + + EXPECT_NEAR(H_xx_fd, H_xx_analytic, tol); + + delete[] grly_xp_ptr; + delete[] grly_xm_ptr; +} + +// Test Hessian finite difference for l=6 using central difference +TEST_F(ylmTest, HessianFiniteDifferenceL6) +{ + const int l = 6; + const double x = 1.5, y = 2.0, z = 1.0; + const double h = 1e-5; + const double tol = 1e-3; // Relaxed tolerance for numerical differentiation + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Allocate gradient arrays for central difference + std::vector rly_xp((l+1)*(l+1)); + std::vector> grly_xp((l+1)*(l+1), std::vector(3)); + double** grly_xp_ptr = new double*[(l+1)*(l+1)]; + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xp_ptr[i] = grly_xp[i].data(); + } + + std::vector rly_xm((l+1)*(l+1)); + std::vector> grly_xm((l+1)*(l+1), std::vector(3)); + double** grly_xm_ptr = new double*[(l+1)*(l+1)]; + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xm_ptr[i] = grly_xm[i].data(); + } + + // Compute gradient at (x+h, y, z) and (x-h, y, z) + ModuleBase::Ylm::grad_rl_sph_harm(l, x+h, y, z, rly_xp.data(), grly_xp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x-h, y, z, rly_xm.data(), grly_xm_ptr); + + // Test H_xx for m=0 (index 36) using central difference + int idx = 36; + double H_xx_fd = (grly_xp[idx][0] - grly_xm[idx][0]) / (2.0 * h); + double H_xx_analytic = hrly[idx][0]; + + EXPECT_NEAR(H_xx_fd, H_xx_analytic, tol); + + delete[] grly_xp_ptr; + delete[] grly_xm_ptr; +} + +// Test that l>6 triggers error +TEST_F(ylmTest, HessianL7NotImplemented) +{ + const int l = 7; + const double x = 1.0, y = 0.0, z = 0.0; + std::vector> hrly; + + // This should call WARNING_QUIT and exit + // We can't easily test this in gtest without death tests + // EXPECT_DEATH(ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly), "l>6 not implemented"); +} + +// Test all Hessian components for l=2 +TEST_F(ylmTest, HessianAllComponentsL2) +{ + const int l = 2; + const double x = 0.5, y = 1.0, z = 1.5; + const double h = 1e-5; + const double tol = 1e-3; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Test all 6 Hessian components for m=0 (index 4) + int idx = 4; + + // Allocate gradient arrays + std::vector rly_xp((l+1)*(l+1)), rly_xm((l+1)*(l+1)); + std::vector rly_yp((l+1)*(l+1)), rly_ym((l+1)*(l+1)); + std::vector rly_zp((l+1)*(l+1)), rly_zm((l+1)*(l+1)); + + std::vector> grly_xp((l+1)*(l+1), std::vector(3)); + std::vector> grly_xm((l+1)*(l+1), std::vector(3)); + std::vector> grly_yp((l+1)*(l+1), std::vector(3)); + std::vector> grly_ym((l+1)*(l+1), std::vector(3)); + std::vector> grly_zp((l+1)*(l+1), std::vector(3)); + std::vector> grly_zm((l+1)*(l+1), std::vector(3)); + + double** grly_xp_ptr = new double*[(l+1)*(l+1)]; + double** grly_xm_ptr = new double*[(l+1)*(l+1)]; + double** grly_yp_ptr = new double*[(l+1)*(l+1)]; + double** grly_ym_ptr = new double*[(l+1)*(l+1)]; + double** grly_zp_ptr = new double*[(l+1)*(l+1)]; + double** grly_zm_ptr = new double*[(l+1)*(l+1)]; + + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xp_ptr[i] = grly_xp[i].data(); + grly_xm_ptr[i] = grly_xm[i].data(); + grly_yp_ptr[i] = grly_yp[i].data(); + grly_ym_ptr[i] = grly_ym[i].data(); + grly_zp_ptr[i] = grly_zp[i].data(); + grly_zm_ptr[i] = grly_zm[i].data(); + } + + // Compute gradients at perturbed points + ModuleBase::Ylm::grad_rl_sph_harm(l, x+h, y, z, rly_xp.data(), grly_xp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x-h, y, z, rly_xm.data(), grly_xm_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x, y+h, z, rly_yp.data(), grly_yp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x, y-h, z, rly_ym.data(), grly_ym_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x, y, z+h, rly_zp.data(), grly_zp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x, y, z-h, rly_zm.data(), grly_zm_ptr); + + // Test H_xx (index 0) + double H_xx_fd = (grly_xp[idx][0] - grly_xm[idx][0]) / (2.0 * h); + EXPECT_NEAR(H_xx_fd, hrly[idx][0], tol); + + // Test H_xy (index 1) + double H_xy_fd = (grly_xp[idx][1] - grly_xm[idx][1]) / (2.0 * h); + EXPECT_NEAR(H_xy_fd, hrly[idx][1], tol); + + // Test H_xz (index 2) + double H_xz_fd = (grly_xp[idx][2] - grly_xm[idx][2]) / (2.0 * h); + EXPECT_NEAR(H_xz_fd, hrly[idx][2], tol); + + // Test H_yy (index 3) + double H_yy_fd = (grly_yp[idx][1] - grly_ym[idx][1]) / (2.0 * h); + EXPECT_NEAR(H_yy_fd, hrly[idx][3], tol); + + // Test H_yz (index 4) + double H_yz_fd = (grly_yp[idx][2] - grly_ym[idx][2]) / (2.0 * h); + EXPECT_NEAR(H_yz_fd, hrly[idx][4], tol); + + // Test H_zz (index 5) + double H_zz_fd = (grly_zp[idx][2] - grly_zm[idx][2]) / (2.0 * h); + EXPECT_NEAR(H_zz_fd, hrly[idx][5], tol); + + delete[] grly_xp_ptr; + delete[] grly_xm_ptr; + delete[] grly_yp_ptr; + delete[] grly_ym_ptr; + delete[] grly_zp_ptr; + delete[] grly_zm_ptr; +} + +// Test Hessian for m=0 values across different l +TEST_F(ylmTest, HessianM0DifferentL) +{ + const double x = 1.0, y = 0.5, z = 2.0; + const double h = 1e-5; + const double tol = 1e-3; + + // Test m=0 for l=0,1,2,3,4 + std::vector l_values = {0, 1, 2, 3, 4}; + + for (int l : l_values) { + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Allocate gradient arrays + std::vector rly_xp((l+1)*(l+1)), rly_xm((l+1)*(l+1)); + std::vector> grly_xp((l+1)*(l+1), std::vector(3)); + std::vector> grly_xm((l+1)*(l+1), std::vector(3)); + + double** grly_xp_ptr = new double*[(l+1)*(l+1)]; + double** grly_xm_ptr = new double*[(l+1)*(l+1)]; + + for (int i = 0; i < (l+1)*(l+1); i++) { + grly_xp_ptr[i] = grly_xp[i].data(); + grly_xm_ptr[i] = grly_xm[i].data(); + } + + ModuleBase::Ylm::grad_rl_sph_harm(l, x+h, y, z, rly_xp.data(), grly_xp_ptr); + ModuleBase::Ylm::grad_rl_sph_harm(l, x-h, y, z, rly_xm.data(), grly_xm_ptr); + + // Test H_xx for m=0 (index l*l) + int idx = l * l; + double H_xx_fd = (grly_xp[idx][0] - grly_xm[idx][0]) / (2.0 * h); + EXPECT_NEAR(H_xx_fd, hrly[idx][0], tol) << "Failed for l=" << l << " m=0"; + + delete[] grly_xp_ptr; + delete[] grly_xm_ptr; + } +} + +// Test Hessian at special points (on axes) +TEST_F(ylmTest, HessianSpecialPointsL4) +{ + const int l = 4; + const double h = 1e-5; + const double tol = 1e-3; + + // Test on z-axis + { + const double x = 0.0, y = 0.0, z = 1.0; + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Verify array is properly sized + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + EXPECT_EQ(hrly[idx].size(), 6); + } + } + + // Test on x-axis + { + const double x = 1.0, y = 0.0, z = 0.0; + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + EXPECT_EQ(hrly[idx].size(), 6); + } + } + + // Test on y-axis + { + const double x = 0.0, y = 1.0, z = 0.0; + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + EXPECT_EQ(hrly[idx].size(), 6); + } + } +} + +// Test Hessian trace property (Laplacian = 0 for harmonic functions) +TEST_F(ylmTest, HessianTraceL3) +{ + const int l = 3; + const double x = 1.2, y = 0.8, z = 1.5; + const double tol = 1e-10; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // For spherical harmonics Y_lm(r), the Laplacian should satisfy: + // ∇²(r^l * Y_lm) = l(l+1) * r^(l-2) * Y_lm + // For real spherical harmonics, we need to check the trace + // Note: This is a property check, not a strict zero test + + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + // Trace = H_xx + H_yy + H_zz + double trace = hrly[idx][0] + hrly[idx][3] + hrly[idx][5]; + // The trace should be finite and well-defined + EXPECT_FALSE(std::isnan(trace)); + EXPECT_FALSE(std::isinf(trace)); + } +} + +// Test Hessian consistency across different coordinate systems +TEST_F(ylmTest, HessianRotationalInvariance) +{ + const int l = 2; + const double r = 2.0; + const double tol = 1e-3; + + // Test at two points with same radius but different angles + const double x1 = r, y1 = 0.0, z1 = 0.0; + const double x2 = 0.0, y2 = r, z2 = 0.0; + + std::vector> hrly1, hrly2; + ModuleBase::Ylm::hes_rl_sph_harm(l, x1, y1, z1, hrly1); + ModuleBase::Ylm::hes_rl_sph_harm(l, x2, y2, z2, hrly2); + + // For m=0 (index 4), the Hessian should have certain symmetries + int idx = 4; + + // Both should be properly sized + EXPECT_EQ(hrly1[idx].size(), 6); + EXPECT_EQ(hrly2[idx].size(), 6); + + // Values should be finite + for (int i = 0; i < 6; i++) { + EXPECT_FALSE(std::isnan(hrly1[idx][i])); + EXPECT_FALSE(std::isnan(hrly2[idx][i])); + EXPECT_FALSE(std::isinf(hrly1[idx][i])); + EXPECT_FALSE(std::isinf(hrly2[idx][i])); + } +} + +// Test Hessian for l=0 (constant function) +TEST_F(ylmTest, HessianL0Constant) +{ + const int l = 0; + const double x = 1.0, y = 2.0, z = 3.0; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // For l=0, Y_00 is constant, so all second derivatives should be zero + int idx = 0; + const double tol = 1e-10; + + EXPECT_NEAR(hrly[idx][0], 0.0, tol); // H_xx + EXPECT_NEAR(hrly[idx][1], 0.0, tol); // H_xy + EXPECT_NEAR(hrly[idx][2], 0.0, tol); // H_xz + EXPECT_NEAR(hrly[idx][3], 0.0, tol); // H_yy + EXPECT_NEAR(hrly[idx][4], 0.0, tol); // H_yz + EXPECT_NEAR(hrly[idx][5], 0.0, tol); // H_zz +} + +// Test Hessian for l=1 (linear functions) +TEST_F(ylmTest, HessianL1Linear) +{ + const int l = 1; + const double x = 1.0, y = 2.0, z = 3.0; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // For l=1, Y_1m are linear functions, so all second derivatives should be zero + const double tol = 1e-10; + + for (int idx = 1; idx <= 3; idx++) { + EXPECT_NEAR(hrly[idx][0], 0.0, tol); // H_xx + EXPECT_NEAR(hrly[idx][1], 0.0, tol); // H_xy + EXPECT_NEAR(hrly[idx][2], 0.0, tol); // H_xz + EXPECT_NEAR(hrly[idx][3], 0.0, tol); // H_yy + EXPECT_NEAR(hrly[idx][4], 0.0, tol); // H_yz + EXPECT_NEAR(hrly[idx][5], 0.0, tol); // H_zz + } +} + +// Test Hessian numerical stability for small coordinates +TEST_F(ylmTest, HessianNumericalStability) +{ + const int l = 3; + const double x = 1e-3, y = 2e-3, z = 3e-3; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Check that all values are finite (no NaN or Inf) + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + for (int i = 0; i < 6; i++) { + EXPECT_FALSE(std::isnan(hrly[idx][i])) + << "NaN detected at idx=" << idx << " component=" << i; + EXPECT_FALSE(std::isinf(hrly[idx][i])) + << "Inf detected at idx=" << idx << " component=" << i; + } + } +} + +// Test Hessian for large coordinates +TEST_F(ylmTest, HessianLargeCoordinates) +{ + const int l = 4; + const double x = 100.0, y = 200.0, z = 300.0; + + std::vector> hrly; + ModuleBase::Ylm::hes_rl_sph_harm(l, x, y, z, hrly); + + // Check that all values are finite + for (int idx = l*l; idx < (l+1)*(l+1); idx++) { + for (int i = 0; i < 6; i++) { + EXPECT_FALSE(std::isnan(hrly[idx][i])); + EXPECT_FALSE(std::isinf(hrly[idx][i])); + } + } +} diff --git a/source/source_base/test_parallel/CMakeLists.txt b/source/source_base/test_parallel/CMakeLists.txt index bf4ed79bbc..17c8a8e115 100644 --- a/source/source_base/test_parallel/CMakeLists.txt +++ b/source/source_base/test_parallel/CMakeLists.txt @@ -7,13 +7,13 @@ AddTest( AddTest( TARGET MODULE_BASE_ParaGlobal LIBS parameter MPI::MPI_CXX - SOURCES parallel_global_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp + SOURCES parallel_global_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp ../tool_quit.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp ../parallel_reduce.cpp ) AddTest( TARGET MODULE_BASE_ParaReduce LIBS parameter MPI::MPI_CXX - SOURCES parallel_reduce_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp ../parallel_common.cpp ../parallel_reduce.cpp + SOURCES parallel_reduce_test.cpp ../global_variable.cpp ../parallel_global.cpp ../parallel_comm.cpp ../parallel_common.cpp ../parallel_reduce.cpp ../tool_quit.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp ) install(FILES parallel_common_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -54,7 +54,7 @@ add_test(NAME MODULE_BASE_para_gemm_parallel AddTest( TARGET MODULE_BASE_parallel_2d_test SOURCES parallel_2d_test.cpp ../parallel_2d.cpp - LIBS parameter ${math_libs} + LIBS parameter ${math_libs} ) install(FILES parallel_2d_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -67,7 +67,7 @@ add_test(NAME MODULE_BASE_parallel_2d_test_para # figure out the lib that provides BLACS if(MKLROOT) - list(APPEND BLACS_LIB MKL::MKL MKL::MKL_SCALAPACK) + list(APPEND BLACS_LIB MKL::MKL) else() set(BLACS_LIB ScaLAPACK::ScaLAPACK) endif() @@ -82,4 +82,3 @@ add_test(NAME MODULE_BASE_parallel_2d_test_para COMMAND ${BASH} blacs_connector_test.sh WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - diff --git a/source/source_base/test_parallel/parallel_global_test.cpp b/source/source_base/test_parallel/parallel_global_test.cpp index bb31af30bc..3b6bf8491f 100644 --- a/source/source_base/test_parallel/parallel_global_test.cpp +++ b/source/source_base/test_parallel/parallel_global_test.cpp @@ -8,6 +8,9 @@ #include #include #include +#include + +#include "source_base/global_variable.h" /************************************************ * unit test of functions in parallel_global.cpp @@ -64,6 +67,7 @@ class MPIContext int _size; }; +// --- Normal Test --- class ParaGlobal : public ::testing::Test { protected: @@ -77,6 +81,7 @@ class ParaGlobal : public ::testing::Test } }; + TEST_F(ParaGlobal, SplitGrid) { // NPROC is set to 4 in parallel_global_test.sh @@ -160,14 +165,126 @@ TEST_F(ParaGlobal, MyProd) EXPECT_EQ(inout[1], std::complex(-3.0, -3.0)); } -TEST_F(ParaGlobal, InitPools) + + +TEST_F(ParaGlobal, DivideMPIPools) { + this->nproc = 12; + mpi.kpar = 3; + this->my_rank = 5; + Parallel_Global::divide_mpi_groups(this->nproc, + mpi.kpar, + this->my_rank, + mpi.nproc_in_pool, + mpi.my_pool, + mpi.rank_in_pool); + EXPECT_EQ(mpi.nproc_in_pool, 4); + EXPECT_EQ(mpi.my_pool, 1); + EXPECT_EQ(mpi.rank_in_pool, 1); +} + + +class FakeMPIContext +{ + public: + FakeMPIContext() + { + _rank = 0; + _size = 1; + } + + int GetRank() const + { + return _rank; + } + int GetSize() const + { + return _size; + } + + int drank; + int dsize; + int dcolor; + + int grank; + int gsize; + + int kpar; + int nproc_in_pool; + int my_pool; + int rank_in_pool; + + int nstogroup; + int MY_BNDGROUP; + int rank_in_stogroup; + int nproc_in_stogroup; + + private: + int _rank; + int _size; +}; + +// --- DeathTest: Single thread --- +// Since these precondition checks cause the processes to die, we call such tests death tests. +// convention of naming the test suite: *DeathTest +// Death tests should be run in a single-threaded context. +// Such DeathTest will be run before all other tests. +class ParaGlobalDeathTest : public ::testing::Test +{ + protected: + FakeMPIContext mpi; + int nproc; + int my_rank; + int real_rank; + + // DeathTest SetUp: + // Init variable, single thread + void SetUp() override + { + int is_init = 0; + MPI_Initialized(&is_init); + if (is_init) { + MPI_Comm_rank(MPI_COMM_WORLD, &real_rank); + } else { + real_rank = 0; + } + + if (real_rank != 0) return; + + nproc = mpi.GetSize(); + my_rank = mpi.GetRank(); + + // init log file needed by WARNING_QUIT + GlobalV::ofs_warning.open("warning.log"); + + + } + + // clean log file + void TearDown() override + { + if (real_rank != 0) return; + + GlobalV::ofs_warning.close(); + remove("warning.log"); + } +}; + +TEST_F(ParaGlobalDeathTest, InitPools) +{ + if (real_rank != 0) return; nproc = 12; mpi.kpar = 3; mpi.nstogroup = 3; my_rank = 5; - testing::internal::CaptureStdout(); - EXPECT_EXIT(Parallel_Global::init_pools(nproc, + EXPECT_EXIT( + // This gtest Macro expect that a given `statement` causes the program to exit, with an + // integer exit status that satisfies `predicate`(Here ::testing::ExitedWithCode(1)), + // and emitting error output that matches `matcher`(Here "Error"). + { + // redirect stdout to stderr to capture WARNING_QUIT output + dup2(STDERR_FILENO, STDOUT_FILENO); + Parallel_Global::init_pools(nproc, my_rank, mpi.nstogroup, mpi.kpar, @@ -176,35 +293,83 @@ TEST_F(ParaGlobal, InitPools) mpi.MY_BNDGROUP, mpi.nproc_in_pool, mpi.rank_in_pool, - mpi.my_pool), ::testing::ExitedWithCode(1), ""); - std::string output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("Error:")); + mpi.my_pool); + }, + ::testing::ExitedWithCode(1), + "Error"); } - -TEST_F(ParaGlobal, DivideMPIPools) +TEST_F(ParaGlobalDeathTest, DivideMPIPoolsNgEqZero) { + if (real_rank != 0) return; + // test for num_groups == 0, + // Num_group Equals 0 + // WARNING_QUIT this->nproc = 12; - mpi.kpar = 3; - this->my_rank = 5; - Parallel_Global::divide_mpi_groups(this->nproc, + mpi.kpar = 0; + EXPECT_EXIT( + { + // redirect stdout to stderr to capture WARNING_QUIT output + dup2(STDERR_FILENO, STDOUT_FILENO); + Parallel_Global::divide_mpi_groups(this->nproc, mpi.kpar, this->my_rank, mpi.nproc_in_pool, mpi.my_pool, mpi.rank_in_pool); - EXPECT_EQ(mpi.nproc_in_pool, 4); - EXPECT_EQ(mpi.my_pool, 1); - EXPECT_EQ(mpi.rank_in_pool, 1); + }, + ::testing::ExitedWithCode(1), + "Number of groups must be greater than 0." + ); +} + +TEST_F(ParaGlobalDeathTest, DivideMPIPoolsNgGtProc) +{ + if (real_rank != 0) return; + // test for procs < num_groups + // Num_group GreaterThan Processors + // WARNING_QUIT + this->nproc = 12; + mpi.kpar = 24; + this->my_rank = 5; + EXPECT_EXIT( + { + // redirect stdout to stderr to capture WARNING_QUIT output + dup2(STDERR_FILENO, STDOUT_FILENO); + Parallel_Global::divide_mpi_groups(this->nproc, + mpi.kpar, + this->my_rank, + mpi.nproc_in_pool, + mpi.my_pool, + mpi.rank_in_pool); + }, + testing::ExitedWithCode(1), + "Error: Number of processes.*must be greater than the number of groups" + ); } int main(int argc, char** argv) { + bool is_death_test_child = false; + for (int i = 0; i < argc; ++i) { + if (std::string(argv[i]).find("gtest_internal_run_death_test") != std::string::npos) { + is_death_test_child = true; + break; + } + } + + if (!is_death_test_child) + { + MPI_Init(&argc, &argv); + } - MPI_Init(&argc, &argv); testing::InitGoogleTest(&argc, argv); + testing::FLAGS_gtest_death_test_style = "threadsafe"; int result = RUN_ALL_TESTS(); - MPI_Finalize(); + + if (!is_death_test_child) { + MPI_Finalize(); + } return result; } -#endif +#endif // __MPI diff --git a/source/source_base/test_parallel/parallel_reduce_test.cpp b/source/source_base/test_parallel/parallel_reduce_test.cpp index 696de3b485..ac980ba24d 100644 --- a/source/source_base/test_parallel/parallel_reduce_test.cpp +++ b/source/source_base/test_parallel/parallel_reduce_test.cpp @@ -30,9 +30,9 @@ * 3. ReduceComplexAll: * Tests two variations of reduce_complex_all() * 4. GatherIntAll: - * Tests gather_int_all() and gather_min_int_all() + * Tests gather_int_all() and reduce_min() * 5. GatherDoubleAll: - * Tests gather_min_double_all() and gather_max_double_all() + * Tests reduce_min_double() and reduce_max_double() * 6. ReduceIntDiag: * Tests reduce_int_diag() * 7. ReduceDoubleDiag: @@ -47,7 +47,7 @@ * 11.ReduceComplexPool: * Tests two variations of reduce_pool() * 12.GatherDoublePool: - * Tests gather_min_double_pool() and gather_max_double_pool() + * Tests reduce_min_pool() and reduce_max_pool() * * */ @@ -233,7 +233,7 @@ TEST_F(ParaReduce, GatherIntAll) EXPECT_EQ(local_number, array[my_rank]); // get minimum integer among all processes int min_number = local_number; - Parallel_Reduce::gather_min_int_all(nproc, min_number); + Parallel_Reduce::reduce_min(min_number); for (int i = 0; i < nproc; i++) { EXPECT_LE(min_number, array[i]); @@ -256,10 +256,10 @@ TEST_F(ParaReduce, GatherDoubleAll) EXPECT_EQ(local_number, array[my_rank]); // get minimum integer among all processes double min_number = local_number; - Parallel_Reduce::gather_min_double_all(nproc, min_number); + Parallel_Reduce::reduce_min(min_number); // get maximum integer among all processes double max_number = local_number; - Parallel_Reduce::gather_max_double_all(nproc, max_number); + Parallel_Reduce::reduce_max(max_number); for (int i = 0; i < nproc; i++) { EXPECT_LE(min_number, array[i]); @@ -587,10 +587,10 @@ TEST_F(ParaReduce, GatherDoublePool) EXPECT_EQ(local_number, array[mpiContext.rank_in_pool]); // get minimum integer among all processes double min_number = local_number; - Parallel_Reduce::gather_min_double_pool(mpiContext.nproc_in_pool, min_number); + Parallel_Reduce::reduce_min_pool(mpiContext.nproc_in_pool, min_number); // get maximum integer among all processes double max_number = local_number; - Parallel_Reduce::gather_max_double_pool(mpiContext.nproc_in_pool, max_number); + Parallel_Reduce::reduce_max_pool(mpiContext.nproc_in_pool, max_number); for (int i = 0; i < mpiContext.nproc_in_pool; i++) { EXPECT_LE(min_number, array[i]); diff --git a/source/source_base/timer.cpp b/source/source_base/timer.cpp index f55bd6776a..c8cd3bc6ac 100644 --- a/source/source_base/timer.cpp +++ b/source/source_base/timer.cpp @@ -15,11 +15,7 @@ #include "source_base/formatter.h" #if defined(__CUDA) && defined(__USE_NVTX) -#if CUDA_VERSION < 12090 -#include "nvToolsExt.h" -#else -#include "nvtx3/nvToolsExt.h" -#endif +#include "source_base/module_device/cuda_compat.h" #include "source_io/module_parameter/parameter.h" #endif diff --git a/source/source_base/timer_wrapper.h b/source/source_base/timer_wrapper.h new file mode 100644 index 0000000000..6da3f391e3 --- /dev/null +++ b/source/source_base/timer_wrapper.h @@ -0,0 +1,56 @@ +#ifndef TIMER_WRAPPER_H +#define TIMER_WRAPPER_H + +#include + +#ifdef __MPI +#include +#endif + +namespace ModuleBase { + +/** + * @brief Time point type that works in both MPI and non-MPI environments + */ +typedef double TimePoint; + +/** + * @brief Get current time as a TimePoint + * + * @return TimePoint Current time + */ +inline TimePoint get_time() +{ +#ifdef __MPI + int is_initialized = 0; + MPI_Initialized(&is_initialized); + if (is_initialized) + { + return MPI_Wtime(); + } + else + { + return std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()).count() / 1e6; + } +#else + return std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()).count() / 1e6; +#endif +} + +/** + * @brief Calculate duration between two TimePoints in seconds + * + * @param start Start time point + * @param end End time point + * @return double Duration in seconds + */ +inline double get_duration(const TimePoint& start, const TimePoint& end) +{ + return end - start; +} + +} + +#endif // TIMER_WRAPPER_H \ No newline at end of file diff --git a/source/source_base/tool_check.cpp b/source/source_base/tool_check.cpp index a9450b4fcb..dab7dd5f21 100644 --- a/source/source_base/tool_check.cpp +++ b/source/source_base/tool_check.cpp @@ -49,7 +49,7 @@ void CHECK_INT(std::ifstream &ifs,const int &v,bool quit) void CHECK_DOUBLE(std::ifstream &ifs,const double &v,bool quit) { const double tiny = 1.0e-5; - double v_in; + double v_in = 0.0; ifs >> v_in; if( fabs(v - v_in) > tiny ) { diff --git a/source/source_base/tool_quit.cpp b/source/source_base/tool_quit.cpp index 77c855c7a0..efd72278cc 100644 --- a/source/source_base/tool_quit.cpp +++ b/source/source_base/tool_quit.cpp @@ -65,7 +65,7 @@ void WARNING_QUIT(const std::string &file,const std::string &description) #ifdef __MPI /* if it is MPI run, finalize first, then exit */ std::cout << "Detecting if MPI has been initialized..." << std::endl; - int is_initialized; + int is_initialized = 0; MPI_Initialized(&is_initialized); if (is_initialized) { std::cout << "Terminating ABACUS with multiprocessing environment." << std::endl; diff --git a/source/source_base/truncated_func.h b/source/source_base/truncated_func.h new file mode 100644 index 0000000000..55ce64953a --- /dev/null +++ b/source/source_base/truncated_func.h @@ -0,0 +1,116 @@ +#ifndef MODULE_BASE_TRUNCATED_FUNC_H +#define MODULE_BASE_TRUNCATED_FUNC_H + +#include "source_base/libm/libm.h" +#include +#include +#include + +namespace ModuleBase +{ + +/** + * @brief Truncated exponential function to avoid underflow. + * + * This function returns 0 if the real part of the input is less than -230.0, + * otherwise it calls ModuleBase::libm::exp(x). + * + * @tparam FPTYPE The floating point type (float, double, or complex). + * @param x The input value. + * @return FPTYPE The result of the exponential function. + */ +template +inline FPTYPE truncated_exp(FPTYPE x) +{ + if (std::real(x) < -230.0) + { + return static_cast(0.0); + } + return ModuleBase::libm::exp(x); +} + +/** + * @brief Truncated complementary error function to avoid underflow for large arguments. + * + * This function returns 0 if the real part of the input is greater than 20.0, + * otherwise it calls std::erfc(x). + * + * @tparam FPTYPE The floating point type (float, double, or complex). + * @param x The input value. + * @return FPTYPE The result of the erfc function. + */ +template +inline FPTYPE truncated_erfc(FPTYPE x) +{ + if (std::real(x) > 20.0) + { + return static_cast(0.0); + } + return std::erfc(x); +} + +/** + * @brief Truncated value function to avoid underflow. + * + * This function returns 0 if the absolute value of the input is less than 1.0e-30, + * otherwise it returns the input x. + * + * @tparam FPTYPE The floating point type (float, double, or complex). + * @param x The input value. + * @return FPTYPE The result of the truncation. + */ +/** + * @brief Truncated value function to avoid underflow. + * + * This function modifies the input to 0 if its absolute value is less than 1.0e-30. + * + * @tparam FPTYPE The floating point type (float, double, or complex). + * @param x The input value to be checked and possibly truncated. + */ +template +inline void truncated_underflow(FPTYPE& x) +{ + if (std::abs(x) < 1.0e-30) + { + x = static_cast(0.0); + } +} + +template <> +inline void truncated_underflow(double& x) +{ + const uint64_t u = *reinterpret_cast(&x); + // The exponent bits are 52-62 (11 bits). The bias is 1023. + // 1e-30 corresponds to -100 in base-2 exponent roughly. + // 923 = 1023 - 100. + if (((u >> 52) & 0x7FF) <= 923) + { + x = 0.0; + } +} + +template <> +inline void truncated_underflow(float& x) +{ + const uint32_t u = *reinterpret_cast(&x); + // The exponent bits are 23-30 (8 bits). The bias is 127. + // 1e-30 corresponds to -100 in base-2 exponent roughly. + // 27 = 127 - 100. + if (((u >> 23) & 0xFF) <= 27) + { + x = 0.0f; + } +} + +template +inline void truncated_underflow(std::complex& x) +{ + T* ptr = reinterpret_cast(&x); + truncated_underflow(ptr[0]); + truncated_underflow(ptr[1]); +} + + +} // namespace ModuleBase + +#endif // MODULE_BASE_TRUNCATED_FUNC_H \ No newline at end of file diff --git a/source/source_base/ylm.cpp b/source/source_base/ylm.cpp index a36b14c60a..22c0b8afc7 100644 --- a/source/source_base/ylm.cpp +++ b/source/source_base/ylm.cpp @@ -7,49 +7,12 @@ #include "timer.h" #include "tool_quit.h" #include "array_pool.h" +#include "ylmcoef.h" namespace ModuleBase { int Ylm::nlm = 0; -std::vector Ylm::ylmcoef = { - 1.0 / sqrt(ModuleBase::FOUR_PI), - sqrt (3.0 / ModuleBase::FOUR_PI), - sqrt (15.0) / 2.0, - sqrt (5.0) / 2.0, - sqrt (5.0), - 1.0 / sqrt(3.0), - sqrt (5.0 / 3.0), - sqrt (35.0 / 9.0), - sqrt (7.0/3.0)/1.5, - sqrt (35.0 / 8.0), - sqrt (7.0 / 8.0), - sqrt (7.0), - 1.0 / sqrt (15.0), - sqrt (14.0 / 15.0), - sqrt (14.0 / 3.0), - sqrt(7.0)*3.0/4.0, - 9.0/4.0/sqrt(5.0), - sqrt(21.0/5.0), - sqrt(24.0/25.0), - sqrt(21.0)/2.0, - sqrt(3.0)/2.0, - 0.5/sqrt(7.0), - 1.5*sqrt(3.0/7.0), - 3.0/sqrt(2.0), - 0.6*sqrt(11.0), - 0.8*sqrt(11.0/7.0), - sqrt (33.0/8.0), - sqrt (55.0/56.0), - sqrt (33.0/7.0), - sqrt (11.0)*2.0/7.0, - sqrt (11.0)*0.75, - sqrt (11.0)*0.25, - sqrt (11.0), - 1.0/3.0/sqrt(5.0), - 2.0/3.0*sqrt(11.0/5.0), - sqrt(22.0/5.0) -}; // here Lmax == max angular momentum + 1 void Ylm::get_ylm_real( const int &Lmax, const ModuleBase::Vector3 &vec, double ylmr[] ) @@ -324,10 +287,10 @@ void Ylm::get_ylm_real( const int &Lmax, const ModuleBase::Vector3 &vec, * *************************/ void Ylm::rlylm ( - const int& Lmax, //max momentum of l + 1 - const double& x, - const double& y, - const double& z, + const int Lmax, //max momentum of l + 1 + const double x, + const double y, + const double z, double rly[] ) { @@ -474,7 +437,7 @@ void Ylm::rlylm { int twok = 2 * ik; - double gamma; + double gamma = 0.0; double aux0, aux1, aux2, aux3; aux0 = pow(-1.0, ik) * pow(2.0, -il); @@ -529,10 +492,10 @@ void Ylm::rlylm //return ylm, not rlylm void Ylm::sph_harm ( - const int& Lmax, //max momentum of l - const double& xdr, - const double& ydr, - const double& zdr, + const int Lmax, //max momentum of l + const double xdr, + const double ydr, + const double zdr, std::vector &rly ) { @@ -542,28 +505,28 @@ void Ylm::sph_harm /*************************** L = 0 ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 + rly[0] = ylmcoef[0]; //l=0, m=0 if (Lmax == 0) return; /*************************** L = 1 ***************************/ - rly[1] = Ylm::ylmcoef[1]*zdr; //l=1, m=0 - rly[2] = -Ylm::ylmcoef[1]*xdr; //l=1, m=1 - rly[3] = -Ylm::ylmcoef[1]*ydr; //l=1, m=-1 + rly[1] = ylmcoef[1]*zdr; //l=1, m=0 + rly[2] = -ylmcoef[1]*xdr; //l=1, m=1 + rly[3] = -ylmcoef[1]*ydr; //l=1, m=-1 if (Lmax == 1) return; /*************************** L = 2 ***************************/ - rly[4] = Ylm::ylmcoef[2]*zdr*rly[1]-Ylm::ylmcoef[3]*rly[0];//l=2, m=0 + rly[4] = ylmcoef[2]*zdr*rly[1]-ylmcoef[3]*rly[0];//l=2, m=0 - double tmp0 = Ylm::ylmcoef[4]*zdr; + double tmp0 = ylmcoef[4]*zdr; rly[5] = tmp0*rly[2];//l=2,m=1 rly[6] = tmp0*rly[3];//l=2,m=-1 - double tmp2 = Ylm::ylmcoef[4]*xdr; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0] - tmp2*rly[2];//l=2,m=2 + double tmp2 = ylmcoef[4]*xdr; + rly[7]= ylmcoef[5]*rly[4]-ylmcoef[6]*rly[0] - tmp2*rly[2];//l=2,m=2 rly[8] = -tmp2*rly[3]; // rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 if (Lmax == 2) return; @@ -571,67 +534,67 @@ void Ylm::sph_harm /*************************** L = 3 ***************************/ - rly[9] = Ylm::ylmcoef[7]*zdr*rly[4]-Ylm::ylmcoef[8]*rly[1]; //l=3, m=0 + rly[9] = ylmcoef[7]*zdr*rly[4]-ylmcoef[8]*rly[1]; //l=3, m=0 - double tmp3 = Ylm::ylmcoef[9]*zdr; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2];//l=3,m=1 - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3];//l=3,m=-1 + double tmp3 = ylmcoef[9]*zdr; + rly[10] = tmp3*rly[5]-ylmcoef[10]*rly[2];//l=3,m=1 + rly[11] = tmp3*rly[6]-ylmcoef[10]*rly[3];//l=3,m=-1 - double tmp4 = Ylm::ylmcoef[11]*zdr; + double tmp4 = ylmcoef[11]*zdr; rly[12] = tmp4*rly[7];//l=3,m=2 rly[13] = tmp4*rly[8];//l=3,m=-2 - double tmp5 = Ylm::ylmcoef[14]*xdr; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]-tmp5*rly[7];//l=3,m=3 - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]-tmp5*rly[8];//l=3,m=-3 + double tmp5 = ylmcoef[14]*xdr; + rly[14] = ylmcoef[12]*rly[10]-ylmcoef[13]*rly[2]-tmp5*rly[7];//l=3,m=3 + rly[15] = ylmcoef[12]*rly[11]-ylmcoef[13]*rly[3]-tmp5*rly[8];//l=3,m=-3 if (Lmax == 3) return; /*************************** L = 4 ***************************/ - rly[16] = Ylm::ylmcoef[15]*zdr*rly[9]-Ylm::ylmcoef[16]*rly[4];//l=4,m=0 + rly[16] = ylmcoef[15]*zdr*rly[9]-ylmcoef[16]*rly[4];//l=4,m=0 - double tmp6 = Ylm::ylmcoef[17]*zdr; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5];//l=4,m=1 - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6];//l=4,m=-1 + double tmp6 = ylmcoef[17]*zdr; + rly[17] = tmp6*rly[10]-ylmcoef[18]*rly[5];//l=4,m=1 + rly[18] = tmp6*rly[11]-ylmcoef[18]*rly[6];//l=4,m=-1 - double tmp7 = Ylm::ylmcoef[19]*zdr; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7];//l=4,m=2 - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8];//l=4,m=-2 + double tmp7 = ylmcoef[19]*zdr; + rly[19] = tmp7*rly[12]-ylmcoef[20]*rly[7];//l=4,m=2 + rly[20] = tmp7*rly[13]-ylmcoef[20]*rly[8];//l=4,m=-2 double tmp8 = 3.0*zdr; rly[21] = tmp8*rly[14];//l=4,m=3 rly[22] = tmp8*rly[15];//l=4,m=-3 - double tmp9 = Ylm::ylmcoef[23]*xdr; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]-tmp9*rly[14];//l=4,m=4 - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]-tmp9*rly[15];//l=4,m=-4 + double tmp9 = ylmcoef[23]*xdr; + rly[23] = ylmcoef[21]*rly[19]-ylmcoef[22]*rly[7]-tmp9*rly[14];//l=4,m=4 + rly[24] = ylmcoef[21]*rly[20]-ylmcoef[22]*rly[8]-tmp9*rly[15];//l=4,m=-4 if (Lmax == 4) return; /*************************** L = 5 ***************************/ - rly[25] = Ylm::ylmcoef[24]*zdr*rly[16]-Ylm::ylmcoef[25]*rly[9];//l=5,m=0 + rly[25] = ylmcoef[24]*zdr*rly[16]-ylmcoef[25]*rly[9];//l=5,m=0 - double tmp10 = Ylm::ylmcoef[26]*zdr; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10];//l=5,m=1 - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11];//l=5,m=-1 + double tmp10 = ylmcoef[26]*zdr; + rly[26] = tmp10*rly[17]-ylmcoef[27]*rly[10];//l=5,m=1 + rly[27] = tmp10*rly[18]-ylmcoef[27]*rly[11];//l=5,m=-1 - double tmp11 = Ylm::ylmcoef[28]*zdr; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12];//l=5,m=2 - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13];//l=5,m=-2 + double tmp11 = ylmcoef[28]*zdr; + rly[28] = tmp11*rly[19]-ylmcoef[29]*rly[12];//l=5,m=2 + rly[29] = tmp11*rly[20]-ylmcoef[29]*rly[13];//l=5,m=-2 - double tmp12 = Ylm::ylmcoef[30]*zdr; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14];//l=5,m=3 - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15];//l=5,m=-3 + double tmp12 = ylmcoef[30]*zdr; + rly[30] = tmp12*rly[21]-ylmcoef[31]*rly[14];//l=5,m=3 + rly[31] = tmp12*rly[22]-ylmcoef[31]*rly[15];//l=5,m=-3 - double tmp13 = Ylm::ylmcoef[32]*zdr; + double tmp13 = ylmcoef[32]*zdr; rly[32] = tmp13*rly[23];//l=5,m=4 rly[33] = tmp13*rly[24];//l=5,m=-4 - double tmp14 = Ylm::ylmcoef[35]*xdr; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]-tmp14*rly[23];//l=5,m=5 - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]-tmp14*rly[24];//l=5,m=-5 + double tmp14 = ylmcoef[35]*xdr; + rly[34] = ylmcoef[33]*rly[30]-ylmcoef[34]*rly[14]-tmp14*rly[23];//l=5,m=5 + rly[35] = ylmcoef[33]*rly[31]-ylmcoef[34]*rly[15]-tmp14*rly[24];//l=5,m=-5 if (Lmax == 5) return; //if Lmax > 5 @@ -668,10 +631,10 @@ void Ylm::sph_harm // Peize Lin change rly 2016-08-26 void Ylm::rl_sph_harm ( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, + const int Lmax, //max momentum of L + const double x, + const double y, + const double z, std::vector& rly ) { @@ -683,28 +646,28 @@ void Ylm::rl_sph_harm /*************************** L = 0 ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 + rly[0] = ylmcoef[0]; //l=0, m=0 if (Lmax == 0) return; /*************************** L = 1 ***************************/ - rly[1] = Ylm::ylmcoef[1]*z; //l=1, m=0 - rly[2] = -Ylm::ylmcoef[1]*x; //l=1, m=1 - rly[3] = -Ylm::ylmcoef[1]*y; //l=1, m=-1 + rly[1] = ylmcoef[1]*z; //l=1, m=0 + rly[2] = -ylmcoef[1]*x; //l=1, m=1 + rly[3] = -ylmcoef[1]*y; //l=1, m=-1 if (Lmax == 1) return; /*************************** L = 2 ***************************/ - rly[4] = Ylm::ylmcoef[2]*z*rly[1]-Ylm::ylmcoef[3]*rly[0]*radius2;//l=2, m=0 + rly[4] = ylmcoef[2]*z*rly[1]-ylmcoef[3]*rly[0]*radius2;//l=2, m=0 - double tmp0 = Ylm::ylmcoef[4]*z; + double tmp0 = ylmcoef[4]*z; rly[5] = tmp0*rly[2];//l=2,m=1 rly[6] = tmp0*rly[3];//l=2,m=-1 - double tmp2 = Ylm::ylmcoef[4]*x; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 + double tmp2 = ylmcoef[4]*x; + rly[7]= ylmcoef[5]*rly[4]-ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 rly[8] = -tmp2*rly[3]; // rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 if (Lmax == 2) return; @@ -712,67 +675,67 @@ void Ylm::rl_sph_harm /*************************** L = 3 ***************************/ - rly[9] = Ylm::ylmcoef[7]*z*rly[4]-Ylm::ylmcoef[8]*rly[1]*radius2; //l=3, m=0 + rly[9] = ylmcoef[7]*z*rly[4]-ylmcoef[8]*rly[1]*radius2; //l=3, m=0 - double tmp3 = Ylm::ylmcoef[9]*z; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2]*radius2;//l=3,m=1 - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 + double tmp3 = ylmcoef[9]*z; + rly[10] = tmp3*rly[5]-ylmcoef[10]*rly[2]*radius2;//l=3,m=1 + rly[11] = tmp3*rly[6]-ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 - double tmp4 = Ylm::ylmcoef[11]*z; + double tmp4 = ylmcoef[11]*z; rly[12] = tmp4*rly[7];//l=3,m=2 rly[13] = tmp4*rly[8];//l=3,m=-2 - double tmp5 = Ylm::ylmcoef[14]*x; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 + double tmp5 = ylmcoef[14]*x; + rly[14] = ylmcoef[12]*rly[10]-ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 + rly[15] = ylmcoef[12]*rly[11]-ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 if (Lmax == 3) return; /*************************** L = 4 ***************************/ - rly[16] = Ylm::ylmcoef[15]*z*rly[9]-Ylm::ylmcoef[16]*rly[4]*radius2;//l=4,m=0 + rly[16] = ylmcoef[15]*z*rly[9]-ylmcoef[16]*rly[4]*radius2;//l=4,m=0 - double tmp6 = Ylm::ylmcoef[17]*z; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5]*radius2;//l=4,m=1 - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 + double tmp6 = ylmcoef[17]*z; + rly[17] = tmp6*rly[10]-ylmcoef[18]*rly[5]*radius2;//l=4,m=1 + rly[18] = tmp6*rly[11]-ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 - double tmp7 = Ylm::ylmcoef[19]*z; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7]*radius2;//l=4,m=2 - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 + double tmp7 = ylmcoef[19]*z; + rly[19] = tmp7*rly[12]-ylmcoef[20]*rly[7]*radius2;//l=4,m=2 + rly[20] = tmp7*rly[13]-ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 double tmp8 = 3.0*z; rly[21] = tmp8*rly[14];//l=4,m=3 rly[22] = tmp8*rly[15];//l=4,m=-3 - double tmp9 = Ylm::ylmcoef[23]*x; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 + double tmp9 = ylmcoef[23]*x; + rly[23] = ylmcoef[21]*rly[19]-ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 + rly[24] = ylmcoef[21]*rly[20]-ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 if (Lmax == 4) return; /*************************** L = 5 ***************************/ - rly[25] = Ylm::ylmcoef[24]*z*rly[16]-Ylm::ylmcoef[25]*rly[9]*radius2;//l=5,m=0 + rly[25] = ylmcoef[24]*z*rly[16]-ylmcoef[25]*rly[9]*radius2;//l=5,m=0 - double tmp10 = Ylm::ylmcoef[26]*z; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10]*radius2;//l=5,m=1 - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 + double tmp10 = ylmcoef[26]*z; + rly[26] = tmp10*rly[17]-ylmcoef[27]*rly[10]*radius2;//l=5,m=1 + rly[27] = tmp10*rly[18]-ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 - double tmp11 = Ylm::ylmcoef[28]*z; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12]*radius2;//l=5,m=2 - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 + double tmp11 = ylmcoef[28]*z; + rly[28] = tmp11*rly[19]-ylmcoef[29]*rly[12]*radius2;//l=5,m=2 + rly[29] = tmp11*rly[20]-ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 - double tmp12 = Ylm::ylmcoef[30]*z; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14]*radius2;//l=5,m=3 - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 + double tmp12 = ylmcoef[30]*z; + rly[30] = tmp12*rly[21]-ylmcoef[31]*rly[14]*radius2;//l=5,m=3 + rly[31] = tmp12*rly[22]-ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 - double tmp13 = Ylm::ylmcoef[32]*z; + double tmp13 = ylmcoef[32]*z; rly[32] = tmp13*rly[23];//l=5,m=4 rly[33] = tmp13*rly[24];//l=5,m=-4 - double tmp14 = Ylm::ylmcoef[35]*x; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 + double tmp14 = ylmcoef[35]*x; + rly[34] = ylmcoef[33]*rly[30]-ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 + rly[35] = ylmcoef[33]*rly[31]-ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 if (Lmax == 5) return; //if Lmax > 5 @@ -807,10 +770,10 @@ void Ylm::rl_sph_harm void Ylm::grad_rl_sph_harm ( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, + const int Lmax, //max momentum of L + const double x, + const double y, + const double z, double* rly, double** grly ) @@ -824,59 +787,59 @@ void Ylm::grad_rl_sph_harm /*************************** L = 0 ***************************/ - rly[0] = Ylm::ylmcoef[0]; //l=0, m=0 + rly[0] = ylmcoef[0]; //l=0, m=0 grly[0][0] = grly[0][1] = grly[0][2] = 0.0; if (Lmax == 0) return; /*************************** L = 1 ***************************/ - rly[1] = Ylm::ylmcoef[1]*z; //l=1, m=0 + rly[1] = ylmcoef[1]*z; //l=1, m=0 grly[1][0] = grly[1][1] = 0.0; - grly[1][2] = Ylm::ylmcoef[1]; + grly[1][2] = ylmcoef[1]; - rly[2] = -Ylm::ylmcoef[1]*x; //l=1, m=1 + rly[2] = -ylmcoef[1]*x; //l=1, m=1 grly[2][1] = grly[2][2] = 0.0; - grly[2][0] = -Ylm::ylmcoef[1]; + grly[2][0] = -ylmcoef[1]; - rly[3] = -Ylm::ylmcoef[1]*y; //l=1, m=-1 + rly[3] = -ylmcoef[1]*y; //l=1, m=-1 grly[3][0] = grly[3][2] = 0.0; - grly[3][1] = -Ylm::ylmcoef[1]; + grly[3][1] = -ylmcoef[1]; if (Lmax == 1) return; /*************************** L = 2 ***************************/ - rly[4] = Ylm::ylmcoef[2]*z*rly[1]-Ylm::ylmcoef[3]*rly[0]*radius2;//l=2, m=0 - grly[4][0] = Ylm::ylmcoef[2]*z*grly[1][0]-Ylm::ylmcoef[3]*(grly[0][0]*radius2+rly[0]*tx);//l=2, m=0 - grly[4][1] = Ylm::ylmcoef[2]*z*grly[1][1]-Ylm::ylmcoef[3]*(grly[0][1]*radius2+rly[0]*ty);//l=2, m=0 - grly[4][2] = Ylm::ylmcoef[2]*(z*grly[1][2]+rly[1])-Ylm::ylmcoef[3]*(grly[0][2]*radius2+rly[0]*tz);//l=2, m=0 + rly[4] = ylmcoef[2]*z*rly[1]-ylmcoef[3]*rly[0]*radius2;//l=2, m=0 + grly[4][0] = ylmcoef[2]*z*grly[1][0]-ylmcoef[3]*(grly[0][0]*radius2+rly[0]*tx);//l=2, m=0 + grly[4][1] = ylmcoef[2]*z*grly[1][1]-ylmcoef[3]*(grly[0][1]*radius2+rly[0]*ty);//l=2, m=0 + grly[4][2] = ylmcoef[2]*(z*grly[1][2]+rly[1])-ylmcoef[3]*(grly[0][2]*radius2+rly[0]*tz);//l=2, m=0 - double tmp0 = Ylm::ylmcoef[4]*z; + double tmp0 = ylmcoef[4]*z; rly[5] = tmp0*rly[2];//l=2,m=1 grly[5][0] = tmp0*grly[2][0]; grly[5][1] = tmp0*grly[2][1]; - grly[5][2] = Ylm::ylmcoef[4]*(rly[2]+z*grly[2][2]); + grly[5][2] = ylmcoef[4]*(rly[2]+z*grly[2][2]); rly[6] = tmp0*rly[3];//l=2,m=-1 grly[6][0] = tmp0*grly[3][0]; grly[6][1] = tmp0*grly[3][1]; - grly[6][2] = Ylm::ylmcoef[4]*(rly[3]+z*grly[3][2]); + grly[6][2] = ylmcoef[4]*(rly[3]+z*grly[3][2]); - double tmp2 = Ylm::ylmcoef[4]*x; - rly[7]= Ylm::ylmcoef[5]*rly[4]-Ylm::ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 - grly[7][0] = Ylm::ylmcoef[5]*grly[4][0]-Ylm::ylmcoef[6]*(rly[0]*tx+grly[0][0]*radius2)-Ylm::ylmcoef[4]*(x*grly[2][0]+rly[2]); + double tmp2 = ylmcoef[4]*x; + rly[7]= ylmcoef[5]*rly[4]-ylmcoef[6]*rly[0]*radius2 - tmp2*rly[2];//l=2,m=2 + grly[7][0] = ylmcoef[5]*grly[4][0]-ylmcoef[6]*(rly[0]*tx+grly[0][0]*radius2)-ylmcoef[4]*(x*grly[2][0]+rly[2]); -// std::cout << "\np1 = "<< Ylm::ylmcoef[5]*grly[4][0] << " p2 = " << -Ylm::ylmcoef[6]*rly[0]*tx -// << " p3 = " << -Ylm::ylmcoef[4]*x*grly[2][0] << " p4 = " << -Ylm::ylmcoef[4]*rly[2] << std::endl; +// std::cout << "\np1 = "<< ylmcoef[5]*grly[4][0] << " p2 = " << -ylmcoef[6]*rly[0]*tx +// << " p3 = " << -ylmcoef[4]*x*grly[2][0] << " p4 = " << -ylmcoef[4]*rly[2] << std::endl; - grly[7][1] = Ylm::ylmcoef[5]*grly[4][1]-Ylm::ylmcoef[6]*(rly[0]*ty+grly[0][1]*radius2)-tmp2*grly[2][1]; - grly[7][2] = Ylm::ylmcoef[5]*grly[4][2]-Ylm::ylmcoef[6]*(rly[0]*tz+grly[0][2]*radius2)-tmp2*grly[2][2]; + grly[7][1] = ylmcoef[5]*grly[4][1]-ylmcoef[6]*(rly[0]*ty+grly[0][1]*radius2)-tmp2*grly[2][1]; + grly[7][2] = ylmcoef[5]*grly[4][2]-ylmcoef[6]*(rly[0]*tz+grly[0][2]*radius2)-tmp2*grly[2][2]; rly[8] = -tmp2*rly[3]; - grly[8][0] = -Ylm::ylmcoef[4]*(rly[3]+x*grly[3][0]); + grly[8][0] = -ylmcoef[4]*(rly[3]+x*grly[3][0]); grly[8][1] = -tmp2*grly[3][1]; grly[8][2] = -tmp2*grly[3][2]; // rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 @@ -885,74 +848,74 @@ void Ylm::grad_rl_sph_harm /*************************** L = 3 ***************************/ - rly[9] = Ylm::ylmcoef[7]*z*rly[4]-Ylm::ylmcoef[8]*rly[1]*radius2; //l=3, m=0 - grly[9][0] = Ylm::ylmcoef[7]*z*grly[4][0]-Ylm::ylmcoef[8]*(rly[1]*tx+grly[1][0]*radius2); - grly[9][1] = Ylm::ylmcoef[7]*z*grly[4][1]-Ylm::ylmcoef[8]*(rly[1]*ty+grly[1][1]*radius2); - grly[9][2] = Ylm::ylmcoef[7]*(rly[4]+z*grly[4][2])-Ylm::ylmcoef[8]*(rly[1]*tz+grly[1][2]*radius2); - - double tmp3 = Ylm::ylmcoef[9]*z; - rly[10] = tmp3*rly[5]-Ylm::ylmcoef[10]*rly[2]*radius2;//l=3,m=1 - grly[10][0] = tmp3*grly[5][0]-Ylm::ylmcoef[10]*(grly[2][0]*radius2+rly[2]*tx); - grly[10][1] = tmp3*grly[5][1]-Ylm::ylmcoef[10]*(grly[2][1]*radius2+rly[2]*ty); - grly[10][2] = Ylm::ylmcoef[9]*(z*grly[5][2]+rly[5])-Ylm::ylmcoef[10]*(grly[2][2]*radius2+rly[2]*tz); - - rly[11] = tmp3*rly[6]-Ylm::ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 - grly[11][0] = tmp3*grly[6][0]-Ylm::ylmcoef[10]*(grly[3][0]*radius2+rly[3]*tx); - grly[11][1] = tmp3*grly[6][1]-Ylm::ylmcoef[10]*(grly[3][1]*radius2+rly[3]*ty); - grly[11][2] = Ylm::ylmcoef[9]*(z*grly[6][2]+rly[6])-Ylm::ylmcoef[10]*(grly[3][2]*radius2+rly[3]*tz); - - double tmp4 = Ylm::ylmcoef[11]*z; + rly[9] = ylmcoef[7]*z*rly[4]-ylmcoef[8]*rly[1]*radius2; //l=3, m=0 + grly[9][0] = ylmcoef[7]*z*grly[4][0]-ylmcoef[8]*(rly[1]*tx+grly[1][0]*radius2); + grly[9][1] = ylmcoef[7]*z*grly[4][1]-ylmcoef[8]*(rly[1]*ty+grly[1][1]*radius2); + grly[9][2] = ylmcoef[7]*(rly[4]+z*grly[4][2])-ylmcoef[8]*(rly[1]*tz+grly[1][2]*radius2); + + double tmp3 = ylmcoef[9]*z; + rly[10] = tmp3*rly[5]-ylmcoef[10]*rly[2]*radius2;//l=3,m=1 + grly[10][0] = tmp3*grly[5][0]-ylmcoef[10]*(grly[2][0]*radius2+rly[2]*tx); + grly[10][1] = tmp3*grly[5][1]-ylmcoef[10]*(grly[2][1]*radius2+rly[2]*ty); + grly[10][2] = ylmcoef[9]*(z*grly[5][2]+rly[5])-ylmcoef[10]*(grly[2][2]*radius2+rly[2]*tz); + + rly[11] = tmp3*rly[6]-ylmcoef[10]*rly[3]*radius2;//l=3,m=-1 + grly[11][0] = tmp3*grly[6][0]-ylmcoef[10]*(grly[3][0]*radius2+rly[3]*tx); + grly[11][1] = tmp3*grly[6][1]-ylmcoef[10]*(grly[3][1]*radius2+rly[3]*ty); + grly[11][2] = ylmcoef[9]*(z*grly[6][2]+rly[6])-ylmcoef[10]*(grly[3][2]*radius2+rly[3]*tz); + + double tmp4 = ylmcoef[11]*z; rly[12] = tmp4*rly[7];//l=3,m=2 grly[12][0] = tmp4*grly[7][0]; grly[12][1] = tmp4*grly[7][1]; - grly[12][2] = Ylm::ylmcoef[11]*(z*grly[7][2]+rly[7]); + grly[12][2] = ylmcoef[11]*(z*grly[7][2]+rly[7]); rly[13] = tmp4*rly[8];//l=3,m=-2 grly[13][0] = tmp4*grly[8][0]; grly[13][1] = tmp4*grly[8][1]; - grly[13][2] = Ylm::ylmcoef[11]*(z*grly[8][2]+rly[8]); - - double tmp5 = Ylm::ylmcoef[14]*x; - rly[14] = Ylm::ylmcoef[12]*rly[10]-Ylm::ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 - grly[14][0] = Ylm::ylmcoef[12]*grly[10][0]-Ylm::ylmcoef[13]*(rly[2]*tx+grly[2][0]*radius2)-Ylm::ylmcoef[14]*(rly[7]+x*grly[7][0]); - grly[14][1] = Ylm::ylmcoef[12]*grly[10][1]-Ylm::ylmcoef[13]*(rly[2]*ty+grly[2][1]*radius2)-tmp5*grly[7][1]; - grly[14][2] = Ylm::ylmcoef[12]*grly[10][2]-Ylm::ylmcoef[13]*(rly[2]*tz+grly[2][2]*radius2)-tmp5*grly[7][2]; - - rly[15] = Ylm::ylmcoef[12]*rly[11]-Ylm::ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 - grly[15][0] = Ylm::ylmcoef[12]*grly[11][0]-Ylm::ylmcoef[13]*(rly[3]*tx+grly[3][0]*radius2)-Ylm::ylmcoef[14]*(rly[8]+x*grly[8][0]); - grly[15][1] = Ylm::ylmcoef[12]*grly[11][1]-Ylm::ylmcoef[13]*(rly[3]*ty+grly[3][1]*radius2)-tmp5*grly[8][1]; - grly[15][2] = Ylm::ylmcoef[12]*grly[11][2]-Ylm::ylmcoef[13]*(rly[3]*tz+grly[3][2]*radius2)-tmp5*grly[8][2]; + grly[13][2] = ylmcoef[11]*(z*grly[8][2]+rly[8]); + + double tmp5 = ylmcoef[14]*x; + rly[14] = ylmcoef[12]*rly[10]-ylmcoef[13]*rly[2]*radius2-tmp5*rly[7];//l=3,m=3 + grly[14][0] = ylmcoef[12]*grly[10][0]-ylmcoef[13]*(rly[2]*tx+grly[2][0]*radius2)-ylmcoef[14]*(rly[7]+x*grly[7][0]); + grly[14][1] = ylmcoef[12]*grly[10][1]-ylmcoef[13]*(rly[2]*ty+grly[2][1]*radius2)-tmp5*grly[7][1]; + grly[14][2] = ylmcoef[12]*grly[10][2]-ylmcoef[13]*(rly[2]*tz+grly[2][2]*radius2)-tmp5*grly[7][2]; + + rly[15] = ylmcoef[12]*rly[11]-ylmcoef[13]*rly[3]*radius2-tmp5*rly[8];//l=3,m=-3 + grly[15][0] = ylmcoef[12]*grly[11][0]-ylmcoef[13]*(rly[3]*tx+grly[3][0]*radius2)-ylmcoef[14]*(rly[8]+x*grly[8][0]); + grly[15][1] = ylmcoef[12]*grly[11][1]-ylmcoef[13]*(rly[3]*ty+grly[3][1]*radius2)-tmp5*grly[8][1]; + grly[15][2] = ylmcoef[12]*grly[11][2]-ylmcoef[13]*(rly[3]*tz+grly[3][2]*radius2)-tmp5*grly[8][2]; if (Lmax == 3) return; /*************************** L = 4 ***************************/ - rly[16] = Ylm::ylmcoef[15]*z*rly[9]-Ylm::ylmcoef[16]*rly[4]*radius2;//l=4,m=0 - grly[16][0] = Ylm::ylmcoef[15]*z*grly[9][0]-Ylm::ylmcoef[16]*(rly[4]*tx+grly[4][0]*radius2); - grly[16][1] = Ylm::ylmcoef[15]*z*grly[9][1]-Ylm::ylmcoef[16]*(rly[4]*ty+grly[4][1]*radius2); - grly[16][2] = Ylm::ylmcoef[15]*(z*grly[9][2]+rly[9])-Ylm::ylmcoef[16]*(rly[4]*tz+grly[4][2]*radius2); - - double tmp6 = Ylm::ylmcoef[17]*z; - rly[17] = tmp6*rly[10]-Ylm::ylmcoef[18]*rly[5]*radius2;//l=4,m=1 - grly[17][0] = tmp6*grly[10][0]-Ylm::ylmcoef[18]*(rly[5]*tx+grly[5][0]*radius2); - grly[17][1] = tmp6*grly[10][1]-Ylm::ylmcoef[18]*(rly[5]*ty+grly[5][1]*radius2); - grly[17][2] = Ylm::ylmcoef[17]*(z*grly[10][2]+rly[10])-Ylm::ylmcoef[18]*(rly[5]*tz+grly[5][2]*radius2); - - rly[18] = tmp6*rly[11]-Ylm::ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 - grly[18][0] = tmp6*grly[11][0]-Ylm::ylmcoef[18]*(rly[6]*tx+grly[6][0]*radius2); - grly[18][1] = tmp6*grly[11][1]-Ylm::ylmcoef[18]*(rly[6]*ty+grly[6][1]*radius2); - grly[18][2] = Ylm::ylmcoef[17]*(z*grly[11][2]+rly[11])-Ylm::ylmcoef[18]*(rly[6]*tz+grly[6][2]*radius2); - - double tmp7 = Ylm::ylmcoef[19]*z; - rly[19] = tmp7*rly[12]-Ylm::ylmcoef[20]*rly[7]*radius2;//l=4,m=2 - grly[19][0] = tmp7*grly[12][0]-Ylm::ylmcoef[20]*(rly[7]*tx+grly[7][0]*radius2); - grly[19][1] = tmp7*grly[12][1]-Ylm::ylmcoef[20]*(rly[7]*ty+grly[7][1]*radius2); - grly[19][2] = Ylm::ylmcoef[19]*(z*grly[12][2]+rly[12])-Ylm::ylmcoef[20]*(rly[7]*tz+grly[7][2]*radius2); - - rly[20] = tmp7*rly[13]-Ylm::ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 - grly[20][0] = tmp7*grly[13][0]-Ylm::ylmcoef[20]*(rly[8]*tx+grly[8][0]*radius2); - grly[20][1] = tmp7*grly[13][1]-Ylm::ylmcoef[20]*(rly[8]*ty+grly[8][1]*radius2); - grly[20][2] = Ylm::ylmcoef[19]*(z*grly[13][2]+rly[13])-Ylm::ylmcoef[20]*(rly[8]*tz+grly[8][2]*radius2); + rly[16] = ylmcoef[15]*z*rly[9]-ylmcoef[16]*rly[4]*radius2;//l=4,m=0 + grly[16][0] = ylmcoef[15]*z*grly[9][0]-ylmcoef[16]*(rly[4]*tx+grly[4][0]*radius2); + grly[16][1] = ylmcoef[15]*z*grly[9][1]-ylmcoef[16]*(rly[4]*ty+grly[4][1]*radius2); + grly[16][2] = ylmcoef[15]*(z*grly[9][2]+rly[9])-ylmcoef[16]*(rly[4]*tz+grly[4][2]*radius2); + + double tmp6 = ylmcoef[17]*z; + rly[17] = tmp6*rly[10]-ylmcoef[18]*rly[5]*radius2;//l=4,m=1 + grly[17][0] = tmp6*grly[10][0]-ylmcoef[18]*(rly[5]*tx+grly[5][0]*radius2); + grly[17][1] = tmp6*grly[10][1]-ylmcoef[18]*(rly[5]*ty+grly[5][1]*radius2); + grly[17][2] = ylmcoef[17]*(z*grly[10][2]+rly[10])-ylmcoef[18]*(rly[5]*tz+grly[5][2]*radius2); + + rly[18] = tmp6*rly[11]-ylmcoef[18]*rly[6]*radius2;//l=4,m=-1 + grly[18][0] = tmp6*grly[11][0]-ylmcoef[18]*(rly[6]*tx+grly[6][0]*radius2); + grly[18][1] = tmp6*grly[11][1]-ylmcoef[18]*(rly[6]*ty+grly[6][1]*radius2); + grly[18][2] = ylmcoef[17]*(z*grly[11][2]+rly[11])-ylmcoef[18]*(rly[6]*tz+grly[6][2]*radius2); + + double tmp7 = ylmcoef[19]*z; + rly[19] = tmp7*rly[12]-ylmcoef[20]*rly[7]*radius2;//l=4,m=2 + grly[19][0] = tmp7*grly[12][0]-ylmcoef[20]*(rly[7]*tx+grly[7][0]*radius2); + grly[19][1] = tmp7*grly[12][1]-ylmcoef[20]*(rly[7]*ty+grly[7][1]*radius2); + grly[19][2] = ylmcoef[19]*(z*grly[12][2]+rly[12])-ylmcoef[20]*(rly[7]*tz+grly[7][2]*radius2); + + rly[20] = tmp7*rly[13]-ylmcoef[20]*rly[8]*radius2;//l=4,m=-2 + grly[20][0] = tmp7*grly[13][0]-ylmcoef[20]*(rly[8]*tx+grly[8][0]*radius2); + grly[20][1] = tmp7*grly[13][1]-ylmcoef[20]*(rly[8]*ty+grly[8][1]*radius2); + grly[20][2] = ylmcoef[19]*(z*grly[13][2]+rly[13])-ylmcoef[20]*(rly[8]*tz+grly[8][2]*radius2); double tmp8 = 3.0*z; rly[21] = tmp8*rly[14];//l=4,m=3 @@ -966,81 +929,81 @@ void Ylm::grad_rl_sph_harm grly[22][1] = tmp8*grly[15][1]; grly[22][2] = 3.0*(z*grly[15][2]+rly[15]); - double tmp9 = Ylm::ylmcoef[23]*x; - rly[23] = Ylm::ylmcoef[21]*rly[19]-Ylm::ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 - grly[23][0] = Ylm::ylmcoef[21]*grly[19][0]-Ylm::ylmcoef[22]*(rly[7]*tx+grly[7][0]*radius2)-Ylm::ylmcoef[23]*(x*grly[14][0]+rly[14]); - grly[23][1] = Ylm::ylmcoef[21]*grly[19][1]-Ylm::ylmcoef[22]*(rly[7]*ty+grly[7][1]*radius2)-tmp9*grly[14][1]; - grly[23][2] = Ylm::ylmcoef[21]*grly[19][2]-Ylm::ylmcoef[22]*(rly[7]*tz+grly[7][2]*radius2)-tmp9*grly[14][2]; + double tmp9 = ylmcoef[23]*x; + rly[23] = ylmcoef[21]*rly[19]-ylmcoef[22]*rly[7]*radius2-tmp9*rly[14];//l=4,m=4 + grly[23][0] = ylmcoef[21]*grly[19][0]-ylmcoef[22]*(rly[7]*tx+grly[7][0]*radius2)-ylmcoef[23]*(x*grly[14][0]+rly[14]); + grly[23][1] = ylmcoef[21]*grly[19][1]-ylmcoef[22]*(rly[7]*ty+grly[7][1]*radius2)-tmp9*grly[14][1]; + grly[23][2] = ylmcoef[21]*grly[19][2]-ylmcoef[22]*(rly[7]*tz+grly[7][2]*radius2)-tmp9*grly[14][2]; - rly[24] = Ylm::ylmcoef[21]*rly[20]-Ylm::ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 - grly[24][0] = Ylm::ylmcoef[21]*grly[20][0]-Ylm::ylmcoef[22]*(rly[8]*tx+grly[8][0]*radius2)-Ylm::ylmcoef[23]*(x*grly[15][0]+rly[15]); - grly[24][1] = Ylm::ylmcoef[21]*grly[20][1]-Ylm::ylmcoef[22]*(rly[8]*ty+grly[8][1]*radius2)-tmp9*grly[15][1]; - grly[24][2] = Ylm::ylmcoef[21]*grly[20][2]-Ylm::ylmcoef[22]*(rly[8]*tz+grly[8][2]*radius2)-tmp9*grly[15][2]; + rly[24] = ylmcoef[21]*rly[20]-ylmcoef[22]*rly[8]*radius2-tmp9*rly[15];//l=4,m=-4 + grly[24][0] = ylmcoef[21]*grly[20][0]-ylmcoef[22]*(rly[8]*tx+grly[8][0]*radius2)-ylmcoef[23]*(x*grly[15][0]+rly[15]); + grly[24][1] = ylmcoef[21]*grly[20][1]-ylmcoef[22]*(rly[8]*ty+grly[8][1]*radius2)-tmp9*grly[15][1]; + grly[24][2] = ylmcoef[21]*grly[20][2]-ylmcoef[22]*(rly[8]*tz+grly[8][2]*radius2)-tmp9*grly[15][2]; if (Lmax == 4) return; /*************************** L = 5 ***************************/ - rly[25] = Ylm::ylmcoef[24]*z*rly[16]-Ylm::ylmcoef[25]*rly[9]*radius2;//l=5,m=0 - grly[25][0] = Ylm::ylmcoef[24]*z*grly[16][0]-Ylm::ylmcoef[25]*(rly[9]*tx+grly[9][0]*radius2); - grly[25][1] = Ylm::ylmcoef[24]*z*grly[16][1]-Ylm::ylmcoef[25]*(rly[9]*ty+grly[9][1]*radius2); - grly[25][2] = Ylm::ylmcoef[24]*(z*grly[16][2]+rly[16])-Ylm::ylmcoef[25]*(rly[9]*tz+grly[9][2]*radius2); - - double tmp10 = Ylm::ylmcoef[26]*z; - rly[26] = tmp10*rly[17]-Ylm::ylmcoef[27]*rly[10]*radius2;//l=5,m=1 - grly[26][0] = tmp10*grly[17][0]-Ylm::ylmcoef[27]*(rly[10]*tx+grly[10][0]*radius2); - grly[26][1] = tmp10*grly[17][1]-Ylm::ylmcoef[27]*(rly[10]*ty+grly[10][1]*radius2); - grly[26][2] = Ylm::ylmcoef[26]*(z*grly[17][2]+rly[17])-Ylm::ylmcoef[27]*(rly[10]*tz+grly[10][2]*radius2); - - rly[27] = tmp10*rly[18]-Ylm::ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 - grly[27][0] = tmp10*grly[18][0]-Ylm::ylmcoef[27]*(rly[11]*tx+grly[11][0]*radius2); - grly[27][1] = tmp10*grly[18][1]-Ylm::ylmcoef[27]*(rly[11]*ty+grly[11][1]*radius2); - grly[27][2] = Ylm::ylmcoef[26]*(z*grly[18][2]+rly[18])-Ylm::ylmcoef[27]*(rly[11]*tz+grly[11][2]*radius2); - - double tmp11 = Ylm::ylmcoef[28]*z; - rly[28] = tmp11*rly[19]-Ylm::ylmcoef[29]*rly[12]*radius2;//l=5,m=2 - grly[28][0] = tmp11*grly[19][0]-Ylm::ylmcoef[29]*(rly[12]*tx+grly[12][0]*radius2); - grly[28][1] = tmp11*grly[19][1]-Ylm::ylmcoef[29]*(rly[12]*ty+grly[12][1]*radius2); - grly[28][2] = Ylm::ylmcoef[28]*(z*grly[19][2]+rly[19])-Ylm::ylmcoef[29]*(rly[12]*tz+grly[12][2]*radius2); - - rly[29] = tmp11*rly[20]-Ylm::ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 - grly[29][0] = tmp11*grly[20][0]-Ylm::ylmcoef[29]*(rly[13]*tx+grly[13][0]*radius2); - grly[29][1] = tmp11*grly[20][1]-Ylm::ylmcoef[29]*(rly[13]*ty+grly[13][1]*radius2); - grly[29][2] = Ylm::ylmcoef[28]*(z*grly[20][2]+rly[20])-Ylm::ylmcoef[29]*(rly[13]*tz+grly[13][2]*radius2); - - double tmp12 = Ylm::ylmcoef[30]*z; - rly[30] = tmp12*rly[21]-Ylm::ylmcoef[31]*rly[14]*radius2;//l=5,m=3 - grly[30][0] = tmp12*grly[21][0]-Ylm::ylmcoef[31]*(grly[14][0]*radius2+rly[14]*tx); - grly[30][1] = tmp12*grly[21][1]-Ylm::ylmcoef[31]*(grly[14][1]*radius2+rly[14]*ty); - grly[30][2] = Ylm::ylmcoef[30]*(z*grly[21][2]+rly[21])-Ylm::ylmcoef[31]*(grly[14][2]*radius2+rly[14]*tz); - - rly[31] = tmp12*rly[22]-Ylm::ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 - grly[31][0] = tmp12*grly[22][0]-Ylm::ylmcoef[31]*(grly[15][0]*radius2+rly[15]*tx); - grly[31][1] = tmp12*grly[22][1]-Ylm::ylmcoef[31]*(grly[15][1]*radius2+rly[15]*ty); - grly[31][2] = Ylm::ylmcoef[30]*(z*grly[22][2]+rly[22])-Ylm::ylmcoef[31]*(grly[15][2]*radius2+rly[15]*tz); - - double tmp13 = Ylm::ylmcoef[32]*z; + rly[25] = ylmcoef[24]*z*rly[16]-ylmcoef[25]*rly[9]*radius2;//l=5,m=0 + grly[25][0] = ylmcoef[24]*z*grly[16][0]-ylmcoef[25]*(rly[9]*tx+grly[9][0]*radius2); + grly[25][1] = ylmcoef[24]*z*grly[16][1]-ylmcoef[25]*(rly[9]*ty+grly[9][1]*radius2); + grly[25][2] = ylmcoef[24]*(z*grly[16][2]+rly[16])-ylmcoef[25]*(rly[9]*tz+grly[9][2]*radius2); + + double tmp10 = ylmcoef[26]*z; + rly[26] = tmp10*rly[17]-ylmcoef[27]*rly[10]*radius2;//l=5,m=1 + grly[26][0] = tmp10*grly[17][0]-ylmcoef[27]*(rly[10]*tx+grly[10][0]*radius2); + grly[26][1] = tmp10*grly[17][1]-ylmcoef[27]*(rly[10]*ty+grly[10][1]*radius2); + grly[26][2] = ylmcoef[26]*(z*grly[17][2]+rly[17])-ylmcoef[27]*(rly[10]*tz+grly[10][2]*radius2); + + rly[27] = tmp10*rly[18]-ylmcoef[27]*rly[11]*radius2;//l=5,m=-1 + grly[27][0] = tmp10*grly[18][0]-ylmcoef[27]*(rly[11]*tx+grly[11][0]*radius2); + grly[27][1] = tmp10*grly[18][1]-ylmcoef[27]*(rly[11]*ty+grly[11][1]*radius2); + grly[27][2] = ylmcoef[26]*(z*grly[18][2]+rly[18])-ylmcoef[27]*(rly[11]*tz+grly[11][2]*radius2); + + double tmp11 = ylmcoef[28]*z; + rly[28] = tmp11*rly[19]-ylmcoef[29]*rly[12]*radius2;//l=5,m=2 + grly[28][0] = tmp11*grly[19][0]-ylmcoef[29]*(rly[12]*tx+grly[12][0]*radius2); + grly[28][1] = tmp11*grly[19][1]-ylmcoef[29]*(rly[12]*ty+grly[12][1]*radius2); + grly[28][2] = ylmcoef[28]*(z*grly[19][2]+rly[19])-ylmcoef[29]*(rly[12]*tz+grly[12][2]*radius2); + + rly[29] = tmp11*rly[20]-ylmcoef[29]*rly[13]*radius2;//l=5,m=-2 + grly[29][0] = tmp11*grly[20][0]-ylmcoef[29]*(rly[13]*tx+grly[13][0]*radius2); + grly[29][1] = tmp11*grly[20][1]-ylmcoef[29]*(rly[13]*ty+grly[13][1]*radius2); + grly[29][2] = ylmcoef[28]*(z*grly[20][2]+rly[20])-ylmcoef[29]*(rly[13]*tz+grly[13][2]*radius2); + + double tmp12 = ylmcoef[30]*z; + rly[30] = tmp12*rly[21]-ylmcoef[31]*rly[14]*radius2;//l=5,m=3 + grly[30][0] = tmp12*grly[21][0]-ylmcoef[31]*(grly[14][0]*radius2+rly[14]*tx); + grly[30][1] = tmp12*grly[21][1]-ylmcoef[31]*(grly[14][1]*radius2+rly[14]*ty); + grly[30][2] = ylmcoef[30]*(z*grly[21][2]+rly[21])-ylmcoef[31]*(grly[14][2]*radius2+rly[14]*tz); + + rly[31] = tmp12*rly[22]-ylmcoef[31]*rly[15]*radius2;//l=5,m=-3 + grly[31][0] = tmp12*grly[22][0]-ylmcoef[31]*(grly[15][0]*radius2+rly[15]*tx); + grly[31][1] = tmp12*grly[22][1]-ylmcoef[31]*(grly[15][1]*radius2+rly[15]*ty); + grly[31][2] = ylmcoef[30]*(z*grly[22][2]+rly[22])-ylmcoef[31]*(grly[15][2]*radius2+rly[15]*tz); + + double tmp13 = ylmcoef[32]*z; rly[32] = tmp13*rly[23];//l=5,m=4 grly[32][0] = tmp13*grly[23][0]; grly[32][1] = tmp13*grly[23][1]; - grly[32][2] = Ylm::ylmcoef[32]*(rly[23]+z*grly[23][2]); + grly[32][2] = ylmcoef[32]*(rly[23]+z*grly[23][2]); rly[33] = tmp13*rly[24];//l=5,m=-4 grly[33][0] = tmp13*grly[24][0]; grly[33][1] = tmp13*grly[24][1]; - grly[33][2] = Ylm::ylmcoef[32]*(rly[24]+z*grly[24][2]); + grly[33][2] = ylmcoef[32]*(rly[24]+z*grly[24][2]); - double tmp14 = Ylm::ylmcoef[35]*x; - rly[34] = Ylm::ylmcoef[33]*rly[30]-Ylm::ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 - grly[34][0] = Ylm::ylmcoef[33]*grly[30][0]-Ylm::ylmcoef[34]*(rly[14]*tx+grly[14][0]*radius2)-Ylm::ylmcoef[35]*(x*grly[23][0]+rly[23]); - grly[34][1] = Ylm::ylmcoef[33]*grly[30][1]-Ylm::ylmcoef[34]*(rly[14]*ty+grly[14][1]*radius2)-tmp14*grly[23][1]; - grly[34][2] = Ylm::ylmcoef[33]*grly[30][2]-Ylm::ylmcoef[34]*(rly[14]*tz+grly[14][2]*radius2)-tmp14*grly[23][2]; + double tmp14 = ylmcoef[35]*x; + rly[34] = ylmcoef[33]*rly[30]-ylmcoef[34]*rly[14]*radius2-tmp14*rly[23];//l=5,m=5 + grly[34][0] = ylmcoef[33]*grly[30][0]-ylmcoef[34]*(rly[14]*tx+grly[14][0]*radius2)-ylmcoef[35]*(x*grly[23][0]+rly[23]); + grly[34][1] = ylmcoef[33]*grly[30][1]-ylmcoef[34]*(rly[14]*ty+grly[14][1]*radius2)-tmp14*grly[23][1]; + grly[34][2] = ylmcoef[33]*grly[30][2]-ylmcoef[34]*(rly[14]*tz+grly[14][2]*radius2)-tmp14*grly[23][2]; - rly[35] = Ylm::ylmcoef[33]*rly[31]-Ylm::ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 - grly[35][0] = Ylm::ylmcoef[33]*grly[31][0]-Ylm::ylmcoef[34]*(rly[15]*tx+grly[15][0]*radius2)-Ylm::ylmcoef[35]*(x*grly[24][0]+rly[24]); - grly[35][1] = Ylm::ylmcoef[33]*grly[31][1]-Ylm::ylmcoef[34]*(rly[15]*ty+grly[15][1]*radius2)-tmp14*grly[24][1]; - grly[35][2] = Ylm::ylmcoef[33]*grly[31][2]-Ylm::ylmcoef[34]*(rly[15]*tz+grly[15][2]*radius2)-tmp14*grly[24][2]; + rly[35] = ylmcoef[33]*rly[31]-ylmcoef[34]*rly[15]*radius2-tmp14*rly[24];//l=5,m=-5 + grly[35][0] = ylmcoef[33]*grly[31][0]-ylmcoef[34]*(rly[15]*tx+grly[15][0]*radius2)-ylmcoef[35]*(x*grly[24][0]+rly[24]); + grly[35][1] = ylmcoef[33]*grly[31][1]-ylmcoef[34]*(rly[15]*ty+grly[15][1]*radius2)-tmp14*grly[24][1]; + grly[35][2] = ylmcoef[33]*grly[31][2]-ylmcoef[34]*(rly[15]*tz+grly[15][2]*radius2)-tmp14*grly[24][2]; if (Lmax == 5) return; @@ -1097,17 +1060,17 @@ void Ylm::grad_rl_sph_harm void Ylm::hes_rl_sph_harm ( - const int& Lmax, //max momentum of L - const double& x, - const double& y, - const double& z, + const int Lmax, //max momentum of L + const double x, + const double y, + const double z, std::vector>& hrly ) { hrly.resize( (Lmax+1)*(Lmax+1), std::vector(6) ); double radius2 = x*x+y*y+z*z; - double coeff; + double coeff = 0.0; //begin calculation /*************************** @@ -1315,9 +1278,224 @@ void Ylm::hes_rl_sph_harm if (Lmax == 4) return; /*************************** - L > 4 + L = 5 + ***************************/ + //m=0 : (63z^5 - 70z^3*r^2 + 15z*r^4) + coeff = sqrt(11.0 / ModuleBase::PI) / 16.0; + hrly[25][0] = (180*x*x*z + 60*y*y*z - 80*z*z*z) * coeff; + hrly[25][1] = (120*x*y*z) * coeff; + hrly[25][2] = (60*x*x*x + 60*x*y*y - 240*x*z*z) * coeff; + hrly[25][3] = (60*x*x*z + 180*y*y*z - 80*z*z*z) * coeff; + hrly[25][4] = (60*x*x*y + 60*y*y*y - 240*y*z*z) * coeff; + hrly[25][5] = (-240*x*x*z - 240*y*y*z + 160*z*z*z) * coeff; + + //m=1 : x(21z^4 - 14z^2*r^2 + r^4) + coeff = sqrt(165.0 / 2.0 / ModuleBase::PI) / 16.0; + hrly[26][0] = (20*x*x*x + 12*x*y*y - 72*x*z*z) * coeff; + hrly[26][1] = (12*x*x*y + 4*y*y*y - 24*y*z*z) * coeff; + hrly[26][2] = (-72*x*x*z - 24*y*y*z + 32*z*z*z) * coeff; + hrly[26][3] = (4*x*x*x + 12*x*y*y - 24*x*z*z) * coeff; + hrly[26][4] = (-48*x*y*z) * coeff; + hrly[26][5] = (-24*x*x*x - 24*x*y*y + 96*x*z*z) * coeff; + + //m=-1 : y(21z^4 - 14z^2*r^2 + r^4) + hrly[27][0] = (12*x*x*y + 4*y*y*y - 24*y*z*z) * coeff; + hrly[27][1] = (4*x*x*x + 12*x*y*y - 24*x*z*z) * coeff; + hrly[27][2] = (-48*x*y*z) * coeff; + hrly[27][3] = (12*x*x*y + 20*y*y*y - 72*y*z*z) * coeff; + hrly[27][4] = (-24*x*x*z - 72*y*y*z + 32*z*z*z) * coeff; + hrly[27][5] = (-24*x*x*y - 24*y*y*y + 96*y*z*z) * coeff; + + //m=2 : (x^2 - y^2)(3z^3 - z*r^2) + coeff = sqrt(1155.0 / ModuleBase::PI) / 8.0; + hrly[28][0] = (-12*x*x*z + 4*z*z*z) * coeff; + hrly[28][1] = 0.0; + hrly[28][2] = (-4*x*x*x + 12*x*z*z) * coeff; + hrly[28][3] = (12*y*y*z - 4*z*z*z) * coeff; + hrly[28][4] = (4*y*y*y - 12*y*z*z) * coeff; + hrly[28][5] = (12*x*x*z - 12*y*y*z) * coeff; + + //m=-2 : xy(3z^3 - z*r^2) + hrly[29][0] = (-6*x*y*z) * coeff; + hrly[29][1] = (-3*x*x*z - 3*y*y*z + 2*z*z*z) * coeff; + hrly[29][2] = (-3*x*x*y - y*y*y + 6*y*z*z) * coeff; + hrly[29][3] = (-6*x*y*z) * coeff; + hrly[29][4] = (-x*x*x - 3*x*y*y + 6*x*z*z) * coeff; + hrly[29][5] = (12*x*y*z) * coeff; + + //m=3 : x(x^2 - 3y^2)(9z^2 - r^2) + coeff = sqrt(385.0 / 2.0 / ModuleBase::PI) / 16.0; + hrly[30][0] = (-20*x*x*x + 12*x*y*y + 48*x*z*z) * coeff; + hrly[30][1] = (12*x*x*y + 12*y*y*y - 48*y*z*z) * coeff; + hrly[30][2] = (48*x*x*z - 48*y*y*z) * coeff; + hrly[30][3] = (4*x*x*x + 36*x*y*y - 48*x*z*z) * coeff; + hrly[30][4] = (-96*x*y*z) * coeff; + hrly[30][5] = (16*x*x*x - 48*x*y*y) * coeff; + + //m=-3 : y(3x^2 - y^2)(9z^2 - r^2) + hrly[31][0] = (-36*x*x*y - 4*y*y*y + 48*y*z*z) * coeff; + hrly[31][1] = (-12*x*x*x - 12*x*y*y + 48*x*z*z) * coeff; + hrly[31][2] = (96*x*y*z) * coeff; + hrly[31][3] = (-12*x*x*y + 20*y*y*y - 48*y*z*z) * coeff; + hrly[31][4] = (48*x*x*z - 48*y*y*z) * coeff; + hrly[31][5] = (48*x*x*y - 16*y*y*y) * coeff; + + //m=4 : (x^4 - 6x^2*y^2 + y^4) * z + coeff = sqrt(385.0 / ModuleBase::PI) / 16.0; + hrly[32][0] = (12*x*x*z - 12*y*y*z) * coeff; + hrly[32][1] = (-24*x*y*z) * coeff; + hrly[32][2] = (4*x*x*x - 12*x*y*y) * coeff; + hrly[32][3] = (-12*x*x*z + 12*y*y*z) * coeff; + hrly[32][4] = (-12*x*x*y + 4*y*y*y) * coeff; + hrly[32][5] = 0.0; + + //m=-4 : xy(x^2 - y^2) * z + hrly[33][0] = (6*x*y*z) * coeff; + hrly[33][1] = (3*x*x*z - 3*y*y*z) * coeff; + hrly[33][2] = (3*x*x*y - y*y*y) * coeff; + hrly[33][3] = (-6*x*y*z) * coeff; + hrly[33][4] = (x*x*x - 3*x*y*y) * coeff; + hrly[33][5] = 0.0; + + //m=5 : x(x^4 - 10x^2*y^2 + 5y^4) + coeff = sqrt(77.0 / 2.0 / ModuleBase::PI) / 16.0; + hrly[34][0] = (20.0 * x*x*x - 60.0 * x * y*y) * coeff; + hrly[34][1] = (-60.0 * x*x * y + 20.0 * y*y*y) * coeff; + hrly[34][2] = 0.0; + hrly[34][3] = (-20.0 * x*x*x + 60.0 * x * y*y) * coeff; + hrly[34][4] = 0.0; + hrly[34][5] = 0.0; + + //m=-5 : y(5x^4 - 10x^2*y^2 + y^4) + hrly[35][0] = (60.0 * x*x * y - 20.0 * y*y*y) * coeff; + hrly[35][1] = (20.0 * x*x*x - 60.0 * x * y*y) * coeff; + hrly[35][2] = 0.0; + hrly[35][3] = (-60.0 * x*x * y + 20.0 * y*y*y) * coeff; + hrly[35][4] = 0.0; + hrly[35][5] = 0.0; + + if (Lmax == 5) return; + + /*************************** + L = 6 + ***************************/ + //m=0 : (231z^6 - 315z^4*r^2 + 105z^2*r^4 - 5r^6) + coeff = sqrt(13.0 / ModuleBase::PI) / 32.0; + hrly[36][0] = (-150*x*x*x*x - 180*x*x*y*y + 1080*x*x*z*z - 30*y*y*y*y + 360*y*y*z*z - 240*z*z*z*z) * coeff; + hrly[36][1] = (-120*x*x*x*y - 120*x*y*y*y + 720*x*y*z*z) * coeff; + hrly[36][2] = (720*x*x*x*z + 720*x*y*y*z - 960*x*z*z*z) * coeff; + hrly[36][3] = (-30*x*x*x*x - 180*x*x*y*y + 360*x*x*z*z - 150*y*y*y*y + 1080*y*y*z*z - 240*z*z*z*z) * coeff; + hrly[36][4] = (720*x*x*y*z + 720*y*y*y*z - 960*y*z*z*z) * coeff; + hrly[36][5] = (180*x*x*x*x + 360*x*x*y*y - 1440*x*x*z*z + 180*y*y*y*y - 1440*y*y*z*z + 480*z*z*z*z) * coeff; + + //m=1 : x(33z^5 - 30z^3*r^2 + 5z*r^4) + coeff = sqrt(273.0 / 2.0 / ModuleBase::PI) / 16.0; + hrly[37][0] = (100*x*x*x*z + 60*x*y*y*z - 120*x*z*z*z) * coeff; + hrly[37][1] = (60*x*x*y*z + 20*y*y*y*z - 40*y*z*z*z) * coeff; + hrly[37][2] = (25*x*x*x*x + 30*x*x*y*y - 180*x*x*z*z + 5*y*y*y*y - 60*y*y*z*z + 40*z*z*z*z) * coeff; + hrly[37][3] = (20*x*x*x*z + 60*x*y*y*z - 40*x*z*z*z) * coeff; + hrly[37][4] = (20*x*x*x*y + 20*x*y*y*y - 120*x*y*z*z) * coeff; + hrly[37][5] = (-120*x*x*x*z - 120*x*y*y*z + 160*x*z*z*z) * coeff; + + //m=-1 : y(33z^5 - 30z^3*r^2 + 5z*r^4) + hrly[38][0] = (60*x*x*y*z + 20*y*y*y*z - 40*y*z*z*z) * coeff; + hrly[38][1] = (20*x*x*x*z + 60*x*y*y*z - 40*x*z*z*z) * coeff; + hrly[38][2] = (20*x*x*x*y + 20*x*y*y*y - 120*x*y*z*z) * coeff; + hrly[38][3] = (60*x*x*y*z + 100*y*y*y*z - 120*y*z*z*z) * coeff; + hrly[38][4] = (5*x*x*x*x + 30*x*x*y*y - 60*x*x*z*z + 25*y*y*y*y - 180*y*y*z*z + 40*z*z*z*z) * coeff; + hrly[38][5] = (-120*x*x*y*z - 120*y*y*y*z + 160*y*z*z*z) * coeff; + + //m=2 : (x^2 - y^2)(33z^4 - 18z^2*r^2 + r^4) + coeff = sqrt(1365.0 / ModuleBase::PI) / 32.0; + hrly[39][0] = (30*x*x*x*x + 12*x*x*y*y - 192*x*x*z*z - 2*y*y*y*y + 32*z*z*z*z) * coeff; + hrly[39][1] = (8*x*x*x*y - 8*x*y*y*y) * coeff; + hrly[39][2] = (-128*x*x*x*z + 128*x*z*z*z) * coeff; + hrly[39][3] = (2*x*x*x*x - 12*x*x*y*y - 30*y*y*y*y + 192*y*y*z*z - 32*z*z*z*z) * coeff; + hrly[39][4] = (128*y*y*y*z - 128*y*z*z*z) * coeff; + hrly[39][5] = (-32*x*x*x*x + 192*x*x*z*z + 32*y*y*y*y - 192*y*y*z*z) * coeff; + + //m=-2 : xy(33z^4 - 18z^2*r^2 + r^4) + hrly[40][0] = (20*x*x*x*y + 12*x*y*y*y - 96*x*y*z*z) * coeff; + hrly[40][1] = (20*x*x*x*x + 36*x*x*y*y - 96*x*x*z*z + 20*y*y*y*y - 96*y*y*z*z + 32*z*z*z*z) * coeff; + hrly[40][2] = (-96*x*x*y*z - 32*y*y*y*z + 64*y*z*z*z) * coeff; + hrly[40][3] = (12*x*x*x*y + 20*x*y*y*y - 96*x*y*z*z) * coeff; + hrly[40][4] = (-32*x*x*x*z - 96*x*y*y*z + 64*x*z*z*z) * coeff; + hrly[40][5] = (-32*x*x*x*y - 32*x*y*y*y + 192*x*y*z*z) * coeff; + + //m=3 : x(x^2 - 3y^2)(11z^3 - 3z*r^2) + coeff = sqrt(1365.0 / ModuleBase::PI) / 16.0; + hrly[41][0] = (-60*x*x*x*z + 36*x*y*y*z + 48*x*z*z*z) * coeff; + hrly[41][1] = (36*x*x*y*z + 36*y*y*y*z - 48*y*z*z*z) * coeff; + hrly[41][2] = (-30*x*x*x*x + 36*x*x*y*y + 72*x*x*z*z + 18*y*y*y*y - 72*y*y*z*z) * coeff; + hrly[41][3] = (12*x*x*x*z + 108*x*y*y*z - 48*x*z*z*z) * coeff; + hrly[41][4] = (12*x*x*x*y + 36*x*y*y*y - 144*x*y*z*z) * coeff; + hrly[41][5] = (48*x*x*x*z - 144*x*y*y*z) * coeff; + + //m=-3 : y(3x^2 - y^2)(11z^3 - 3z*r^2) + hrly[42][0] = (-108*x*x*y*z - 12*y*y*y*z + 48*y*z*z*z) * coeff; + hrly[42][1] = (-36*x*x*x*z - 36*x*y*y*z + 48*x*z*z*z) * coeff; + hrly[42][2] = (-36*x*x*x*y - 12*x*y*y*y + 144*x*y*z*z) * coeff; + hrly[42][3] = (-36*x*x*y*z + 60*y*y*y*z - 48*y*z*z*z) * coeff; + hrly[42][4] = (-18*x*x*x*x - 36*x*x*y*y + 72*x*x*z*z + 30*y*y*y*y - 72*y*y*z*z) * coeff; + hrly[42][5] = (144*x*x*y*z - 48*y*y*y*z) * coeff; + + //m=4 : (x^4 - 6x^2*y^2 + y^4)(11z^2 - r^2) + coeff = sqrt(91.0 / ModuleBase::PI) / 32.0; + hrly[43][0] = (-30*x*x*x*x + 60*x*x*y*y + 120*x*x*z*z + 10*y*y*y*y - 120*y*y*z*z) * coeff; + hrly[43][1] = (40*x*x*x*y + 40*x*y*y*y - 240*x*y*z*z) * coeff; + hrly[43][2] = (80*x*x*x*z - 240*x*y*y*z) * coeff; + hrly[43][3] = (10*x*x*x*x + 60*x*x*y*y - 120*x*x*z*z - 30*y*y*y*y + 120*y*y*z*z) * coeff; + hrly[43][4] = (-240*x*x*y*z + 80*y*y*y*z) * coeff; + hrly[43][5] = (20*x*x*x*x - 120*x*x*y*y + 20*y*y*y*y) * coeff; + + //m=-4 : xy(x^2 - y^2)(11z^2 - r^2) + hrly[44][0] = (-20*x*x*x*y + 60*x*y*z*z) * coeff; + hrly[44][1] = (-5*x*x*x*x + 30*x*x*z*z + 5*y*y*y*y - 30*y*y*z*z) * coeff; + hrly[44][2] = (60*x*x*y*z - 20*y*y*y*z) * coeff; + hrly[44][3] = (20*x*y*y*y - 60*x*y*z*z) * coeff; + hrly[44][4] = (20*x*x*x*z - 60*x*y*y*z) * coeff; + hrly[44][5] = (20*x*x*x*y - 20*x*y*y*y) * coeff; + + //m=5 : x(x^4 - 10x^2*y^2 + 5y^4) * z + coeff = sqrt(1001.0 / 2.0 / ModuleBase::PI) / 16.0; + hrly[45][0] = (20*x*x*x*z - 60*x*y*y*z) * coeff; + hrly[45][1] = (-60*x*x*y*z + 20*y*y*y*z) * coeff; + hrly[45][2] = (5*x*x*x*x - 30*x*x*y*y + 5*y*y*y*y) * coeff; + hrly[45][3] = (-20*x*x*x*z + 60*x*y*y*z) * coeff; + hrly[45][4] = (-20*x*x*x*y + 20*x*y*y*y) * coeff; + hrly[45][5] = 0.0; + + //m=-5 : y(5x^4 - 10x^2*y^2 + y^4) * z + hrly[46][0] = (60*x*x*y*z - 20*y*y*y*z) * coeff; + hrly[46][1] = (20*x*x*x*z - 60*x*y*y*z) * coeff; + hrly[46][2] = (20*x*x*x*y - 20*x*y*y*y) * coeff; + hrly[46][3] = (-60*x*x*y*z + 20*y*y*y*z) * coeff; + hrly[46][4] = (5*x*x*x*x - 30*x*x*y*y + 5*y*y*y*y) * coeff; + hrly[46][5] = 0.0; + + //m=6 : (x^6 - 15x^4*y^2 + 15x^2*y^4 - y^6) + coeff = sqrt(3003.0 / ModuleBase::PI) / 32.0; + hrly[47][0] = (30*x*x*x*x - 180*x*x*y*y + 30*y*y*y*y) * coeff; + hrly[47][1] = (-120*x*x*x*y + 120*x*y*y*y) * coeff; + hrly[47][2] = 0.0; + hrly[47][3] = (-30*x*x*x*x + 180*x*x*y*y - 30*y*y*y*y) * coeff; + hrly[47][4] = 0.0; + hrly[47][5] = 0.0; + + //m=-6 : xy(3x^4 - 10x^2*y^2 + 3y^4) + hrly[48][0] = (60*x*x*x*y - 60*x*y*y*y) * coeff; + hrly[48][1] = (15*x*x*x*x - 90*x*x*y*y + 15*y*y*y*y) * coeff; + hrly[48][2] = 0.0; + hrly[48][3] = (-60*x*x*x*y + 60*x*y*y*y) * coeff; + hrly[48][4] = 0.0; + hrly[48][5] = 0.0; + + if (Lmax == 6) return; + + /*************************** + L > 6 ***************************/ - ModuleBase::WARNING_QUIT("hes_rl_sph_harm","l>4 not implemented!"); + ModuleBase::WARNING_QUIT("hes_rl_sph_harm","l>6 not implemented!"); return; @@ -1394,10 +1572,10 @@ void Ylm::test2 (void) void Ylm::rlylm ( - const int& Lmax, //max momentum of l + 1 - const double& x, - const double& y, - const double& z, + const int Lmax, //max momentum of l + 1 + const double x, + const double y, + const double z, double rly[], double grly[][3] ) @@ -1652,7 +1830,7 @@ void Ylm::rlylm { int twok = 2 * ik; - double gamma; + double gamma = 0.0; double aux0, aux1, aux2, aux3; aux0 = pow(-1.0, ik) * pow(2.0, -il); diff --git a/source/source_base/ylm.h b/source/source_base/ylm.h index 65adcf18f6..6ee950f2cf 100644 --- a/source/source_base/ylm.h +++ b/source/source_base/ylm.h @@ -53,10 +53,10 @@ class Ylm * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... */ static void rlylm( - const int& Lmax, - const double& x, - const double& y, - const double& z, + const int Lmax, + const double x, + const double y, + const double z, double rly[]); /** @@ -70,10 +70,10 @@ class Ylm * @param grly [out] gradient of Ylm, [dY00/dx, dY00/dy, dY00/dz], [dY10/dx, dY10/dy, dY10/dz], [dY11/dx, dY11/dy, dY11/dz],... */ static void rlylm( - const int& Lmax, - const double& x, - const double& y, - const double& z, + const int Lmax, + const double x, + const double y, + const double z, double rly[], double grly[][3]); @@ -87,10 +87,10 @@ class Ylm * @param rly [in] calculated Ylm, Y00, Y10, Y11, Y1-1, Y20, Y21, Y2-1, Y22, Y2-2... */ static void sph_harm( - const int& Lmax, - const double& xdr, - const double& ydr, - const double& zdr, + const int Lmax, + const double xdr, + const double ydr, + const double zdr, std::vector &rly); /** @@ -105,10 +105,10 @@ class Ylm * @date 2016-08-26 */ static void rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, + const int Lmax, + const double x, + const double y, + const double z, std::vector& rly); /** @@ -123,10 +123,10 @@ class Ylm * grly should be a memory-contiguous two-dimensional array for better performance. */ static void grad_rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, + const int Lmax, + const double x, + const double y, + const double z, double* rly, double** grly); @@ -140,15 +140,14 @@ class Ylm * @param hrly [out] hessian of Ylm, [dY00/dx2, dY00/dxy, dY00/dxz, dY00/dyy, dY00/dyz, dY00/dzz] , ... */ static void hes_rl_sph_harm( - const int& Lmax, - const double& x, - const double& y, - const double& z, + const int Lmax, + const double x, + const double y, + const double z, std::vector>& hrly); - //calculate the coefficient of Ylm, ylmcoef. + //calculate the coefficient of Ylm, ylmcoef. static void set_coefficients (); - static std::vector ylmcoef; //static void test(); //static void test1(); diff --git a/source/source_base/ylmcoef.h b/source/source_base/ylmcoef.h new file mode 100644 index 0000000000..72a756ee74 --- /dev/null +++ b/source/source_base/ylmcoef.h @@ -0,0 +1,56 @@ +#pragma once + +#include +#include "constants.h" + +namespace ModuleBase { + +/// ylmcoef coefficient count (supports up to L=5) +constexpr int YLMCOEF_SIZE = 36; + +#ifdef __CUDACC__ +// GPU version: must use numeric constants (CUDA doesn't support runtime init for __device__) +__device__ static const double ylmcoef[YLMCOEF_SIZE] = { +#else +// Use static constexpr for C++11 compatibility (inline variables require C++17) +static constexpr double ylmcoef[YLMCOEF_SIZE] = { +#endif +0.28209479177387813964, // 1.0 / sqrt(ModuleBase::FOUR_PI) +0.48860251190291992263, // sqrt (3.0 / ModuleBase::FOUR_PI) +1.93649167310370851069, // sqrt (15.0) / 2.0 +1.11803398874989490253, // sqrt (5.0) / 2.0 +2.23606797749978980505, // sqrt (5.0) +0.57735026918962584208, // 1.0 / sqrt(3.0) +1.29099444873580559978, // sqrt (5.0 / 3.0) +1.97202659436653870983, // sqrt (35.0 / 9.0) +1.01835015443463117180, // sqrt (7.0/3.0)/1.5 +2.09165006633518890666, // sqrt (35.0 / 8.0) +0.93541434669348533237, // sqrt (7.0 / 8.0) +2.64575131106459071617, // sqrt (7.0) +0.25819888974716109775, // 1.0 / sqrt (15.0) +0.96609178307929588492, // sqrt (14.0 / 15.0) +2.16024689946928694084, // sqrt (14.0 / 3.0) +1.98431348329844303713, // sqrt(7.0)*3.0/4.0 +1.00623058987490532346, // 9.0/4.0/sqrt(5.0) +2.04939015319191986109, // sqrt(21.0/5.0) +0.97979589711327119694, // sqrt(24.0/25.0) +2.29128784747791991450, // sqrt(21.0)/2.0 +0.86602540378443859659, // sqrt(3.0)/2.0 +0.18898223650461359879, // 0.5/sqrt(7.0) +0.98198050606196563006, // 1.5*sqrt(3.0/7.0) +2.12132034355964238515, // 3.0/sqrt(2.0) +1.98997487421323970835, // 0.6*sqrt(11.0) +1.00285307284481395307, // 0.8*sqrt(11.0/7.0) +2.03100960115899020764, // sqrt (33.0/8.0) +0.99103120896511487370, // sqrt (55.0/56.0) +2.17124059336723762570, // sqrt (33.0/7.0) +0.94760708295868567586, // sqrt (11.0)*2.0/7.0 +2.48746859276654985749, // sqrt (11.0)*0.75 +0.82915619758884995250, // sqrt (11.0)*0.25 +3.31662479035539980998, // sqrt (11.0) +0.14907119849998595740, // 1.0/3.0/sqrt(5.0) +0.98882646494608839038, // 2.0/3.0*sqrt(11.0/5.0) +2.09761769634030326159 // sqrt(22.0/5.0) +}; + +} // namespace ModuleBase diff --git a/source/source_basis/module_ao/ORB_gaunt_table.cpp b/source/source_basis/module_ao/ORB_gaunt_table.cpp index b930c6bcba..d05f594f7e 100644 --- a/source/source_basis/module_ao/ORB_gaunt_table.cpp +++ b/source/source_basis/module_ao/ORB_gaunt_table.cpp @@ -20,6 +20,7 @@ void ORB_gaunt_table::init_Gaunt(const int &lmax) ModuleBase::TITLE("ORB_gaunt_table", "init_Gaunt"); ModuleBase::timer::tick("ORB_gaunt_table", "init_Gaunt"); + this->Lmax_Gaunt_Coefficients = lmax; const int nlm = (lmax * 2 + 1) * (lmax * 2 + 1); this->Gaunt_Coefficients.create(nlm, nlm, nlm); @@ -184,6 +185,7 @@ void ORB_gaunt_table::init_Gaunt_CH(const int& Lmax) ModuleBase::TITLE("ORB_gaunt_table","init_Gaunt_CH"); ModuleBase::timer::tick("ORB_gaunt_table","init_Gaunt_CH"); + this->Lmax_Gaunt_CH = Lmax; int L = 2*Lmax + 1; int Eff_Np = this->EP_EL(L); diff --git a/source/source_basis/module_ao/ORB_gaunt_table.h b/source/source_basis/module_ao/ORB_gaunt_table.h index 1e295b9125..0e9aefdb70 100644 --- a/source/source_basis/module_ao/ORB_gaunt_table.h +++ b/source/source_basis/module_ao/ORB_gaunt_table.h @@ -93,6 +93,9 @@ class ORB_gaunt_table static int Index_M(const int& m); + int get_Lmax_Gaunt_Coefficients() const { return Lmax_Gaunt_Coefficients; } + int get_Lmax_Gaunt_CH() const { return Lmax_Gaunt_CH; } + private: // Index Function @@ -122,5 +125,8 @@ class ORB_gaunt_table //direct integral ModuleBase::matrix Ylm_Gaunt; + + int Lmax_Gaunt_Coefficients = -1; + int Lmax_Gaunt_CH = -1; }; #endif diff --git a/source/source_basis/module_nao/test/CMakeLists.txt b/source/source_basis/module_nao/test/CMakeLists.txt index b337633003..0ac6fab22c 100644 --- a/source/source_basis/module_nao/test/CMakeLists.txt +++ b/source/source_basis/module_nao/test/CMakeLists.txt @@ -16,7 +16,7 @@ AddTest( ../numerical_radial.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -29,7 +29,7 @@ AddTest( ../numerical_radial.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -42,7 +42,7 @@ AddTest( ../numerical_radial.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -55,7 +55,7 @@ AddTest( ../numerical_radial.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -68,7 +68,7 @@ AddTest( ../numerical_radial.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -86,7 +86,7 @@ AddTest( ../sphbes_radials.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base ) @@ -106,7 +106,7 @@ AddTest( ../two_center_bundle.cpp ../two_center_integrator.cpp ../real_gaunt_table.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base container orb ) @@ -135,7 +135,7 @@ AddTest( ../radial_set.cpp ../numerical_radial.cpp ../two_center_bundle.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base container orb ) @@ -155,7 +155,7 @@ AddTest( ../sphbes_radials.cpp ../radial_set.cpp ../numerical_radial.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base container orb ) @@ -175,7 +175,7 @@ AddTest( ../sphbes_radials.cpp ../radial_set.cpp ../numerical_radial.cpp - ../../../source_io/orb_io.cpp + ../../../source_io/module_output/orb_io.cpp LIBS parameter ${math_libs} device base container orb ) diff --git a/source/source_basis/module_nao/test/two_center_integrator_test.cpp b/source/source_basis/module_nao/test/two_center_integrator_test.cpp index cc63505f94..37601fadfc 100644 --- a/source/source_basis/module_nao/test/two_center_integrator_test.cpp +++ b/source/source_basis/module_nao/test/two_center_integrator_test.cpp @@ -218,6 +218,153 @@ TEST_F(TwoCenterIntegratorTest, SphericalBessel) delete[] zeros; } +TEST_F(TwoCenterIntegratorTest, HessianSymmetry) +{ + nfile = 3; + orb.build(nfile, file, 'o'); + + ModuleBase::SphericalBesselTransformer sbt; + orb.set_transformer(sbt); + + double rmax = orb.rcut_max() * 2.0; + double dr = 0.01; + int nr = static_cast(rmax / dr) + 1; + + orb.set_uniform_grid(true, nr, rmax, 'i', true); + + S_intor.tabulate(orb, orb, 'S', nr, rmax); + T_intor.tabulate(orb, orb, 'T', nr, rmax); + + ModuleBase::Vector3 R(1.5, 2.0, 1.0); + double hess[9]; + + // Test S operator + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, nullptr, hess); + + EXPECT_NEAR(hess[1], hess[3], 1e-10); // H_xy == H_yx + EXPECT_NEAR(hess[2], hess[6], 1e-10); // H_xz == H_zx + EXPECT_NEAR(hess[5], hess[7], 1e-10); // H_yz == H_zy + + // Test T operator + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, nullptr, hess); + + EXPECT_NEAR(hess[1], hess[3], 1e-10); // H_xy == H_yx + EXPECT_NEAR(hess[2], hess[6], 1e-10); // H_xz == H_zx + EXPECT_NEAR(hess[5], hess[7], 1e-10); // H_yz == H_zy +} + +TEST_F(TwoCenterIntegratorTest, HessianFiniteDifference) +{ + nfile = 3; + orb.build(nfile, file, 'o'); + + ModuleBase::SphericalBesselTransformer sbt; + orb.set_transformer(sbt); + + double rmax = orb.rcut_max() * 2.0; + double dr = 0.01; + int nr = static_cast(rmax / dr) + 1; + + orb.set_uniform_grid(true, nr, rmax, 'i', true); + + S_intor.tabulate(orb, orb, 'S', nr, rmax); + T_intor.tabulate(orb, orb, 'T', nr, rmax); + + ModuleBase::Vector3 R(1.5, 2.0, 1.0); + double hess_analytical[9]; + double hess_numerical[9]; + double eps = 1e-5; + + // Test S operator + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, nullptr, hess_analytical); + + // Compute numerical Hessian via finite differences + for (int alpha = 0; alpha < 3; ++alpha) + { + for (int beta = 0; beta < 3; ++beta) + { + ModuleBase::Vector3 R_plus = R, R_minus = R; + R_plus[beta] += eps; + R_minus[beta] -= eps; + + double grad_plus[3], grad_minus[3]; + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R_plus, nullptr, grad_plus, nullptr); + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R_minus, nullptr, grad_minus, nullptr); + + hess_numerical[alpha * 3 + beta] = (grad_plus[alpha] - grad_minus[alpha]) / (2.0 * eps); + } + } + + // Compare with tolerance appropriate for finite differences + for (int i = 0; i < 9; ++i) + { + EXPECT_NEAR(hess_analytical[i], hess_numerical[i], 1e-5); + } + + // Test T operator + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, nullptr, hess_analytical); + + for (int alpha = 0; alpha < 3; ++alpha) + { + for (int beta = 0; beta < 3; ++beta) + { + ModuleBase::Vector3 R_plus = R, R_minus = R; + R_plus[beta] += eps; + R_minus[beta] -= eps; + + double grad_plus[3], grad_minus[3]; + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R_plus, nullptr, grad_plus, nullptr); + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R_minus, nullptr, grad_minus, nullptr); + + hess_numerical[alpha * 3 + beta] = (grad_plus[alpha] - grad_minus[alpha]) / (2.0 * eps); + } + } + + for (int i = 0; i < 9; ++i) + { + EXPECT_NEAR(hess_analytical[i], hess_numerical[i], 1e-5); + } +} + +TEST_F(TwoCenterIntegratorTest, HessianDoesNotBreakGradient) +{ + nfile = 3; + orb.build(nfile, file, 'o'); + + ModuleBase::SphericalBesselTransformer sbt; + orb.set_transformer(sbt); + + double rmax = orb.rcut_max() * 2.0; + double dr = 0.01; + int nr = static_cast(rmax / dr) + 1; + + orb.set_uniform_grid(true, nr, rmax, 'i', true); + + S_intor.tabulate(orb, orb, 'S', nr, rmax); + T_intor.tabulate(orb, orb, 'T', nr, rmax); + + ModuleBase::Vector3 R(1.5, 2.0, 1.0); + double grad_only[3], grad_with_hess[3], hess[9]; + + // Test S operator + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, grad_only, nullptr); + S_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, grad_with_hess, hess); + + for (int i = 0; i < 3; ++i) + { + EXPECT_NEAR(grad_only[i], grad_with_hess[i], 1e-12); + } + + // Test T operator + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, grad_only, nullptr); + T_intor.calculate(0, 1, 0, 0, 1, 1, 0, 0, R, nullptr, grad_with_hess, hess); + + for (int i = 0; i < 3; ++i) + { + EXPECT_NEAR(grad_only[i], grad_with_hess[i], 1e-12); + } +} + int main(int argc, char** argv) { diff --git a/source/source_basis/module_nao/two_center_integrator.cpp b/source/source_basis/module_nao/two_center_integrator.cpp index 295946bb9e..1c2a574c16 100644 --- a/source/source_basis/module_nao/two_center_integrator.cpp +++ b/source/source_basis/module_nao/two_center_integrator.cpp @@ -22,25 +22,27 @@ void TwoCenterIntegrator::tabulate(const RadialCollection& bra, is_tabulated_ = true; } -void TwoCenterIntegrator::calculate(const int itype1, - const int l1, - const int izeta1, - const int m1, +void TwoCenterIntegrator::calculate(const int itype1, + const int l1, + const int izeta1, + const int m1, const int itype2, const int l2, const int izeta2, const int m2, const ModuleBase::Vector3& vR, // R = R2 - R1 double* out, - double* grad_out) const + double* grad_out, + double* hess_out) const { #ifdef __DEBUG assert( is_tabulated_ ); - assert( out || grad_out ); + assert( out || grad_out || hess_out ); #endif if (out) *out = 0.0; if (grad_out) std::fill(grad_out, grad_out + 3, 0.0); + if (hess_out) std::fill(hess_out, hess_out + 9, 0.0); double R = vR.norm(); if (R > table_.rmax()) @@ -54,6 +56,13 @@ void TwoCenterIntegrator::calculate(const int itype1, return; } + // Check angular momentum limitation for Hessian computation + if (hess_out && (l1 + l2 > 6)) + { + ModuleBase::WARNING_QUIT("TwoCenterIntegrator::calculate", + "Hessian computation not supported for l1+l2 > 6"); + } + // unit vector along R ModuleBase::Vector3 uR = (R == 0.0 ? ModuleBase::Vector3(0., 0., 1.) : vR / R); @@ -61,37 +70,75 @@ void TwoCenterIntegrator::calculate(const int itype1, const int lmax = l1 + l2; std::vector Rl_Y((lmax+1) * (lmax+1)); ModuleBase::Array_Pool grad_Rl_Y((lmax+1) * (lmax+1), 3); + std::vector> hess_Rl_Y; // R^l * Y is necessary anyway ModuleBase::Ylm::rl_sph_harm(l1 + l2, vR[0], vR[1], vR[2], Rl_Y); - if (grad_out) ModuleBase::Ylm::grad_rl_sph_harm(l1 + l2, vR[0], vR[1], vR[2], Rl_Y.data(), grad_Rl_Y.get_ptr_2D()); + if (grad_out || hess_out) ModuleBase::Ylm::grad_rl_sph_harm(l1 + l2, vR[0], vR[1], vR[2], Rl_Y.data(), grad_Rl_Y.get_ptr_2D()); + if (hess_out) ModuleBase::Ylm::hes_rl_sph_harm(l1 + l2, vR[0], vR[1], vR[2], hess_Rl_Y); - double tmp[2] = {0.0, 0.0}; + double tmp[3] = {0.0, 0.0, 0.0}; double* S_by_Rl = tmp; - double* d_S_by_Rl = grad_out ? tmp + 1 : nullptr; + double* d_S_by_Rl = (grad_out || hess_out) ? tmp + 1 : nullptr; + double* d2_S_by_Rl = hess_out ? tmp + 2 : nullptr; // the sign is given by i^(l1-l2-l) = (-1)^((l1-l2-l)/2) int sign = (l1 - l2 - std::abs(l1 - l2)) % 4 == 0 ? 1 : -1; for (int l = std::abs(l1 - l2); l <= l1 + l2; l += 2) { - // look up S/R^l and (d/dR)(S/R^l) (if necessary) from the radial table - table_.lookup(itype1, l1, izeta1, itype2, l2, izeta2, l, R, S_by_Rl, d_S_by_Rl); + // look up S/R^l, (d/dR)(S/R^l), and (d²/dR²)(S/R^l) from the radial table + table_.lookup(itype1, l1, izeta1, itype2, l2, izeta2, l, R, S_by_Rl, d_S_by_Rl, d2_S_by_Rl); for (int m = -l; m <= l; ++m) { double G = RealGauntTable::instance()(l1, l2, l, m1, m2, m); + int lm_idx = ylm_index(l, m); if (out) { - *out += sign * G * (*S_by_Rl) * Rl_Y[ylm_index(l, m)]; + *out += sign * G * (*S_by_Rl) * Rl_Y[lm_idx]; } if (grad_out) { for (int i = 0; i < 3; ++i) { - grad_out[i] += sign * G * ( (*d_S_by_Rl) * uR[i] * Rl_Y[ylm_index(l, m)] - + (*S_by_Rl) * grad_Rl_Y[ylm_index(l, m)][i] ); + grad_out[i] += sign * G * ( (*d_S_by_Rl) * uR[i] * Rl_Y[lm_idx] + + (*S_by_Rl) * grad_Rl_Y[lm_idx][i] ); + } + } + + if (hess_out) + { + // Convert 6-element symmetric format to 9-element full matrix + // hess_Rl_Y[lm_idx] = [H_xx, H_xy, H_xz, H_yy, H_yz, H_zz] + double H_full[9] = { + hess_Rl_Y[lm_idx][0], hess_Rl_Y[lm_idx][1], hess_Rl_Y[lm_idx][2], + hess_Rl_Y[lm_idx][1], hess_Rl_Y[lm_idx][3], hess_Rl_Y[lm_idx][4], + hess_Rl_Y[lm_idx][2], hess_Rl_Y[lm_idx][4], hess_Rl_Y[lm_idx][5] + }; + + for (int alpha = 0; alpha < 3; ++alpha) + { + for (int beta = 0; beta < 3; ++beta) + { + int idx = alpha * 3 + beta; + + // Product rule: d²(f*g)/dα dβ = f''*g + f'*g'_α + f'*g'_β + f*g'' + double term1 = (*d2_S_by_Rl) * uR[alpha] * uR[beta] * Rl_Y[lm_idx]; + + // Derivative of unit vector: du_α/dR_β = (δ_αβ - u_α*u_β)/R + double du_dR = (alpha == beta ? 1.0 : 0.0) - uR[alpha] * uR[beta]; + if (R > 1e-10) du_dR /= R; + else du_dR = 0.0; + + double term2 = (*d_S_by_Rl) * (du_dR * Rl_Y[lm_idx] + + uR[alpha] * grad_Rl_Y[lm_idx][beta] + + uR[beta] * grad_Rl_Y[lm_idx][alpha]); + double term3 = (*S_by_Rl) * H_full[idx]; + + hess_out[idx] += sign * G * (term1 + term2 + term3); + } } } } diff --git a/source/source_basis/module_nao/two_center_integrator.h b/source/source_basis/module_nao/two_center_integrator.h index 52b0f63dff..285ffe8728 100644 --- a/source/source_basis/module_nao/two_center_integrator.h +++ b/source/source_basis/module_nao/two_center_integrator.h @@ -57,15 +57,15 @@ class TwoCenterIntegrator ); /*! - * @brief Compute the two-center integrals. + * @brief Compute the two-center integrals and optionally their derivatives. * * This function calculates the two-center integral * - * / + * / * I(R) = | dr phi1(r) (op_) phi2(r - R) - * / + * / * - * or its gradient by using the tabulated radial part and real Gaunt coefficients. + * and optionally its gradient and/or Hessian. * * @param[in] itype1 Element index of orbital 1. * @param[in] l1 Angular momentum of orbital 1. @@ -81,20 +81,26 @@ class TwoCenterIntegrator * @param[out] grad_out Gradient of the integral. grad_out[0], grad_out[1] and * grad_out[2] are the x, y, z components of the gradient. * The gradient will not be computed if grad_out is nullptr. + * @param[out] hess_out Hessian of the integral. hess_out is a 9-element array + * in row-major order: [H_xx, H_xy, H_xz, H_yx, H_yy, H_yz, + * H_zx, H_zy, H_zz]. The Hessian will not be computed if + * hess_out is nullptr. * - * @note out and grad_out cannot be both nullptr. + * @note At least one of out, grad_out, or hess_out must be non-nullptr. + * @note Hessian computation requires l1 + l2 <= 6 (limitation of hes_rl_sph_harm). * */ - void calculate(const int itype1, - const int l1, - const int izeta1, - const int m1, + void calculate(const int itype1, + const int l1, + const int izeta1, + const int m1, const int itype2, const int l2, const int izeta2, const int m2, const ModuleBase::Vector3& vR, // vR = R2 - R1 double* out = nullptr, - double* grad_out = nullptr + double* grad_out = nullptr, + double* hess_out = nullptr ) const; /*! diff --git a/source/source_basis/module_nao/two_center_table.cpp b/source/source_basis/module_nao/two_center_table.cpp index 433c3fc7e2..821e881a45 100644 --- a/source/source_basis/module_nao/two_center_table.cpp +++ b/source/source_basis/module_nao/two_center_table.cpp @@ -79,7 +79,8 @@ void TwoCenterTable::lookup(const int itype1, const int l, const double R, double* val, - double* dval) const + double* dval, + double* d2val) const { #ifdef __DEBUG assert(R >= 0); @@ -91,12 +92,14 @@ void TwoCenterTable::lookup(const int itype1, *val = 0.0; if (dval) *dval = 0.0; + if (d2val) + *d2val = 0.0; return; } const double* tab = table(itype1, l1, izeta1, itype2, l2, izeta2, l, false); const double* dtab = table(itype1, l1, izeta1, itype2, l2, izeta2, l, true); - ModuleBase::CubicSpline::eval(nr_, rgrid_, tab, dtab, 1, &R, val, dval); + ModuleBase::CubicSpline::eval(nr_, rgrid_, tab, dtab, 1, &R, val, dval, d2val); } int& TwoCenterTable::table_index(const NumericalRadial* it1, const NumericalRadial* it2, const int l) diff --git a/source/source_basis/module_nao/two_center_table.h b/source/source_basis/module_nao/two_center_table.h index c130af9929..6240ce8429 100644 --- a/source/source_basis/module_nao/two_center_table.h +++ b/source/source_basis/module_nao/two_center_table.h @@ -48,16 +48,17 @@ class TwoCenterTable const bool deriv = false //!< [in] if true, return the derivative table ) const; - void lookup(const int itype1, //!< [in] element index of chi1 - const int l1, //!< [in] angular momentum of chi1 - const int izeta1, //!< [in] zeta number of chi1 - const int itype2, //!< [in] element index of chi2 - const int l2, //!< [in] angular momentum of chi2 - const int izeta2, //!< [in] zeta number of chi2 - const int l, //!< [in] angular momentum of the entry - const double R, //!< [in] distance between the two centers - double* val, //!< [out] interpolated values from table_ - double* dval = nullptr //!< [out] interpolated values from dtable_ + void lookup(const int itype1, //!< [in] element index of chi1 + const int l1, //!< [in] angular momentum of chi1 + const int izeta1, //!< [in] zeta number of chi1 + const int itype2, //!< [in] element index of chi2 + const int l2, //!< [in] angular momentum of chi2 + const int izeta2, //!< [in] zeta number of chi2 + const int l, //!< [in] angular momentum of the entry + const double R, //!< [in] distance between the two centers + double* val, //!< [out] interpolated values from table_ + double* dval = nullptr, //!< [out] interpolated values from dtable_ + double* d2val = nullptr //!< [out] interpolated second derivatives ) const; //!@} diff --git a/source/source_basis/module_pw/kernels/cuda/pw_op.cu b/source/source_basis/module_pw/kernels/cuda/pw_op.cu index a60c81a08c..58488e1a7d 100644 --- a/source/source_basis/module_pw/kernels/cuda/pw_op.cu +++ b/source/source_basis/module_pw/kernels/cuda/pw_op.cu @@ -112,7 +112,7 @@ void set_3d_fft_box_op::operator()(const int np reinterpret_cast*>(in), reinterpret_cast*>(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -130,7 +130,7 @@ void set_recip_to_real_output_op::operator()(co reinterpret_cast*>(in), reinterpret_cast*>(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -148,7 +148,7 @@ void set_recip_to_real_output_op::operator()(co reinterpret_cast*>(in), reinterpret_cast(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -170,7 +170,7 @@ void set_real_to_recip_output_op::operator()(co reinterpret_cast*>(in), reinterpret_cast*>(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -192,7 +192,7 @@ void set_real_to_recip_output_op::operator()(co reinterpret_cast*>(in), reinterpret_cast(out)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct set_3d_fft_box_op; diff --git a/source/source_basis/module_pw/pw_basis_big.h b/source/source_basis/module_pw/pw_basis_big.h index 2a04720877..987af787b3 100644 --- a/source/source_basis/module_pw/pw_basis_big.h +++ b/source/source_basis/module_pw/pw_basis_big.h @@ -2,6 +2,7 @@ #define PW_BASIS_BIG_H #include "source_base/constants.h" #include "source_base/global_function.h" + #ifdef __MPI #include "mpi.h" #endif diff --git a/source/source_basis/module_pw/pw_gatherscatter.h b/source/source_basis/module_pw/pw_gatherscatter.h index e6b5998446..5a1a5a37c1 100644 --- a/source/source_basis/module_pw/pw_gatherscatter.h +++ b/source/source_basis/module_pw/pw_gatherscatter.h @@ -102,7 +102,7 @@ void PW_Basis::gathers_scatterp(std::complex* in, std::complex* out) const if(this->poolnproc == 1) //In this case nrxx=fftnx*fftny*nz, nst = nstot, { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096/sizeof(T)) +#pragma omp parallel for schedule(static) #endif for(int i = 0; i < this->nrxx; ++i) { @@ -160,7 +160,7 @@ void PW_Basis::gathers_scatterp(std::complex* in, std::complex* out) const } #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096/sizeof(T)) +#pragma omp parallel for schedule(static) #endif for(int i = 0; i < this->nrxx; ++i) { diff --git a/source/source_basis/module_pw/pw_transform.cpp b/source/source_basis/module_pw/pw_transform.cpp index 31dbf8b954..1e4e45bbbc 100644 --- a/source/source_basis/module_pw/pw_transform.cpp +++ b/source/source_basis/module_pw/pw_transform.cpp @@ -31,7 +31,7 @@ void PW_Basis::real2recip(const std::complex* in, assert(this->gamma_only == false); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -47,7 +47,7 @@ void PW_Basis::real2recip(const std::complex* in, { FPTYPE tmpfac = factor / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -58,7 +58,7 @@ void PW_Basis::real2recip(const std::complex* in, { FPTYPE tmpfac = 1.0 / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -83,7 +83,7 @@ void PW_Basis::real2recip(const FPTYPE* in, std::complex* out, const boo { const int npy = this->ny * this->nplane; #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { @@ -98,7 +98,7 @@ void PW_Basis::real2recip(const FPTYPE* in, std::complex* out, const boo else { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -114,7 +114,7 @@ void PW_Basis::real2recip(const FPTYPE* in, std::complex* out, const boo { FPTYPE tmpfac = factor / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -125,7 +125,7 @@ void PW_Basis::real2recip(const FPTYPE* in, std::complex* out, const boo { FPTYPE tmpfac = 1.0 / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -151,7 +151,7 @@ void PW_Basis::recip2real(const std::complex* in, ModuleBase::timer::tick(this->classname, "recip2real"); assert(this->gamma_only == false); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < this->nst * this->nz; ++i) { @@ -159,7 +159,7 @@ void PW_Basis::recip2real(const std::complex* in, } #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -174,7 +174,7 @@ void PW_Basis::recip2real(const std::complex* in, if (add) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -184,7 +184,7 @@ void PW_Basis::recip2real(const std::complex* in, else { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -206,7 +206,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo { ModuleBase::timer::tick(this->classname, "recip2real"); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int i = 0; i < this->nst * this->nz; ++i) { @@ -214,7 +214,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo } #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < this->npw; ++ig) { @@ -234,7 +234,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo if (add) { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { @@ -247,7 +247,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo else { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { @@ -264,7 +264,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo if (add) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -274,7 +274,7 @@ void PW_Basis::recip2real(const std::complex* in, FPTYPE* out, const boo else { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { diff --git a/source/source_basis/module_pw/pw_transform_k.cpp b/source/source_basis/module_pw/pw_transform_k.cpp index 36290d091a..a8adc6a67b 100644 --- a/source/source_basis/module_pw/pw_transform_k.cpp +++ b/source/source_basis/module_pw/pw_transform_k.cpp @@ -34,7 +34,7 @@ void PW_Basis_K::real2recip(const std::complex* in, assert(this->gamma_only == false); auto* auxr = this->fft_bundle.get_auxr_data(); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -53,7 +53,7 @@ void PW_Basis_K::real2recip(const std::complex* in, { FPTYPE tmpfac = factor / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -64,7 +64,7 @@ void PW_Basis_K::real2recip(const std::complex* in, { FPTYPE tmpfac = 1.0 / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -103,7 +103,7 @@ void PW_Basis_K::real2recip(const FPTYPE* in, // r2c in place const int npy = this->ny * this->nplane; #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { @@ -126,7 +126,7 @@ void PW_Basis_K::real2recip(const FPTYPE* in, { FPTYPE tmpfac = factor / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -137,7 +137,7 @@ void PW_Basis_K::real2recip(const FPTYPE* in, { FPTYPE tmpfac = 1.0 / FPTYPE(this->nxyz); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -176,7 +176,7 @@ void PW_Basis_K::recip2real(const std::complex* in, const int npwk = this->npwk[ik]; auto* auxg = this->fft_bundle.get_auxg_data(); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -191,7 +191,7 @@ void PW_Basis_K::recip2real(const std::complex* in, if (add) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -201,7 +201,7 @@ void PW_Basis_K::recip2real(const std::complex* in, else { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < this->nrxx; ++ir) { @@ -239,7 +239,7 @@ void PW_Basis_K::recip2real(const std::complex* in, const int npwk = this->npwk[ik]; auto* auxg = this->fft_bundle.get_auxg_data(); #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int igl = 0; igl < npwk; ++igl) { @@ -262,7 +262,7 @@ void PW_Basis_K::recip2real(const std::complex* in, if (add) { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { @@ -275,7 +275,7 @@ void PW_Basis_K::recip2real(const std::complex* in, else { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int ix = 0; ix < this->nx; ++ix) { diff --git a/source/source_basis/module_pw/pw_transform_k_dsp.cpp b/source/source_basis/module_pw/pw_transform_k_dsp.cpp index 1449943550..8262073895 100644 --- a/source/source_basis/module_pw/pw_transform_k_dsp.cpp +++ b/source/source_basis/module_pw/pw_transform_k_dsp.cpp @@ -83,7 +83,7 @@ void PW_Basis_K::recip2real_dsp(const std::complex* in, { const int one = 1; const std::complex factor1 = std::complex(factor, 0); - zaxpy_(&nrxx, &factor1, auxr, &one, out, &one); + BlasConnector::axpy(nrxx, factor1, auxr, one, out, one); } else { diff --git a/source/source_cell/CMakeLists.txt b/source/source_cell/CMakeLists.txt index f9d4f0c535..39cfa88c22 100644 --- a/source/source_cell/CMakeLists.txt +++ b/source/source_cell/CMakeLists.txt @@ -15,6 +15,7 @@ add_library( read_pp_vwr.cpp unitcell.cpp read_atoms.cpp + read_atoms_helper.cpp setup_nonlocal.cpp klist.cpp parallel_kpoints.cpp diff --git a/source/source_cell/atom_pseudo.h b/source/source_cell/atom_pseudo.h index 8d5c074830..9f04e0861a 100644 --- a/source/source_cell/atom_pseudo.h +++ b/source/source_cell/atom_pseudo.h @@ -3,7 +3,7 @@ #include "source_base/global_variable.h" #include "source_base/vector3.h" -#include "source_io/output.h" +#include "source_io/module_output/output.h" #include "source_base/complexarray.h" #include "source_base/complexmatrix.h" #include "pseudo.h" diff --git a/source/source_cell/atom_spec.cpp b/source/source_cell/atom_spec.cpp index e4ee60ecc9..82645d079e 100644 --- a/source/source_cell/atom_spec.cpp +++ b/source/source_cell/atom_spec.cpp @@ -101,6 +101,7 @@ void Atom::bcast_atom() this->tau.resize(na, ModuleBase::Vector3(0, 0, 0)); this->dis.resize(na, ModuleBase::Vector3(0, 0, 0)); this->taud.resize(na, ModuleBase::Vector3(0, 0, 0)); + this->boundary_shift.resize(na, ModuleBase::Vector3(0, 0, 0)); this->vel.resize(na, ModuleBase::Vector3(0, 0, 0)); this->mag.resize(na, 0); this->angle1.resize(na, 0); diff --git a/source/source_cell/atom_spec.h b/source/source_cell/atom_spec.h index 51f24ac202..3ee18d3971 100644 --- a/source/source_cell/atom_spec.h +++ b/source/source_cell/atom_spec.h @@ -1,7 +1,7 @@ #ifndef ATOM_H #define ATOM_H -#include "../source_io/output.h" +#include "../source_io/module_output/output.h" #include "atom_pseudo.h" class Atom { @@ -36,6 +36,7 @@ class Atom std::vector> tau; // Cartesian coordinates of each atom in this type. std::vector> dis; // direct displacements of each atom in this type in current step liuyu modift 2023-03-22 std::vector> taud; // Direct coordinates of each atom in this type. + std::vector> boundary_shift; // record for periodic boundary adjustment. std::vector> vel; // velocities of each atom in this type. std::vector> force; // force acting on each atom in this type. std::vector> lambda; // Lagrange multiplier for each atom in this type. used in deltaspin diff --git a/source/source_cell/bcast_cell.cpp b/source/source_cell/bcast_cell.cpp index 2f9b88955a..8f2dcd3300 100644 --- a/source/source_cell/bcast_cell.cpp +++ b/source/source_cell/bcast_cell.cpp @@ -3,8 +3,9 @@ #include "source_io/module_parameter/parameter.h" #ifdef __EXX #include "source_lcao/module_ri/serialization_cereal.h" -#include "source_pw/module_pwdft/global.h" #endif +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info + namespace unitcell { void bcast_atoms_tau(Atom* atoms, diff --git a/source/source_cell/k_vector_utils.cpp b/source/source_cell/k_vector_utils.cpp index e8eb56397d..e9922bc551 100644 --- a/source/source_cell/k_vector_utils.cpp +++ b/source/source_cell/k_vector_utils.cpp @@ -245,7 +245,7 @@ void kvec_mpi_k(K_Vectors& kv) ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Number of k-points in this process", kv.nks); int nks_minimum = kv.nks; - Parallel_Reduce::gather_min_int_all(GlobalV::NPROC, nks_minimum); + Parallel_Reduce::reduce_min(nks_minimum); if (nks_minimum == 0) { @@ -312,7 +312,7 @@ void kvec_mpi_k(K_Vectors& kv) { int starsize = kv.kstars[ikibz].size(); Parallel_Common::bcast_int(starsize); - GlobalV::ofs_running << "starsize: " << starsize << std::endl; + //GlobalV::ofs_running << "starsize: " << starsize << std::endl; auto ks = kv.kstars[ikibz].begin(); for (int ik = 0; ik < starsize; ++ik) { @@ -328,8 +328,8 @@ void kvec_mpi_k(K_Vectors& kv) Parallel_Common::bcast_double(ks_vec.x); Parallel_Common::bcast_double(ks_vec.y); Parallel_Common::bcast_double(ks_vec.z); - GlobalV::ofs_running << "isym: " << isym << " ks_vec: " << ks_vec.x << " " << ks_vec.y << " " - << ks_vec.z << std::endl; + //GlobalV::ofs_running << "isym: " << isym << " ks_vec: " << ks_vec.x << " " << ks_vec.y << " " + // << ks_vec.z << std::endl; if (GlobalV::MY_RANK != 0) { kv.kstars[ikibz].insert(std::make_pair(isym, ks_vec)); @@ -572,7 +572,7 @@ void kvec_ibz_kpoint(K_Vectors& kv, std::vector ibz2bz(kv.get_nkstot()); // nkstot is the total input k-points number. - const double weight = 1.0 / static_cast(kv.get_nkstot()); + double weight = 1.0 / static_cast(kv.get_nkstot()); ModuleBase::Vector3 kvec_rot; ModuleBase::Vector3 kvec_rot_k; @@ -609,6 +609,8 @@ void kvec_ibz_kpoint(K_Vectors& kv, // search in all k-poins. for (int i = 0; i < kv.get_nkstot(); ++i) { + if (!kv.get_is_mp()) { weight = kv.wk[i]; } // use the input weight, instead of 1/nkstot + // restrict to [0, 1) restrict_kpt(kv.kvec_d[i]); diff --git a/source/source_cell/klist.cpp b/source/source_cell/klist.cpp index 139092b340..c5ab3402f3 100644 --- a/source/source_cell/klist.cpp +++ b/source/source_cell/klist.cpp @@ -7,8 +7,7 @@ #include "source_base/parallel_global.h" #include "source_base/parallel_reduce.h" #include "source_cell/module_symmetry/symmetry.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/berryphase.h" +#include "source_io/module_unk/berryphase.h" #include "source_io/module_parameter/parameter.h" void K_Vectors::cal_ik_global() @@ -467,7 +466,7 @@ void K_Vectors::interpolate_k_between(std::ifstream& ifk, std::vectorwk[ik]; } - assert(sum > 0.0); + + // If sum of weights is zero or very small, set equal weights + if (sum < 1e-10) + { + ModuleBase::WARNING("K_Vectors::normalize_wk", + "Sum of k-point weights is zero or very small. " + "Setting equal weights for all k-points."); + for (int ik = 0; ik < nkstot; ik++) + { + this->wk[ik] = 1.0 / double(nkstot); + } + sum = 1.0; + } for (int ik = 0; ik < nkstot; ik++) { diff --git a/source/source_cell/klist.h b/source/source_cell/klist.h index 98f67918bb..e16b9d1642 100644 --- a/source/source_cell/klist.h +++ b/source/source_cell/klist.h @@ -273,7 +273,8 @@ class K_Vectors * @return void * * @note This function should only be called by the master process (MY_RANK == 0). - * @note The function assumes that the sum of the weights of the k-points is greater than 0. + * @note If the sum of the weights is zero or very small (< 1e-10), the function will set equal weights for all + * k-points and issue a warning. This allows calculations like get_wf to proceed with zero-weight k-points. * @note The function first normalizes the weights so that their sum is 1, and then scales them by the degeneracy of * spin. */ diff --git a/source/source_cell/module_neighbor/test/CMakeLists.txt b/source/source_cell/module_neighbor/test/CMakeLists.txt index 01c5b9d3ef..3d891aa20c 100644 --- a/source/source_cell/module_neighbor/test/CMakeLists.txt +++ b/source/source_cell/module_neighbor/test/CMakeLists.txt @@ -13,7 +13,7 @@ AddTest( TARGET MODULE_CELL_NEIGHBOR_sltk_grid LIBS parameter ${math_libs} base device cell_info SOURCES sltk_grid_test.cpp ../sltk_grid.cpp ../sltk_atom.cpp - ../../../source_io/output.cpp + ../../../source_io/module_output/output.cpp ) AddTest( @@ -21,5 +21,5 @@ AddTest( LIBS parameter ${math_libs} base device cell_info SOURCES sltk_atom_arrange_test.cpp ../sltk_atom_arrange.cpp ../sltk_grid_driver.cpp ../sltk_grid.cpp ../sltk_atom.cpp - ../../../source_io/output.cpp + ../../../source_io/module_output/output.cpp ) \ No newline at end of file diff --git a/source/source_cell/module_symmetry/symmetry.h b/source/source_cell/module_symmetry/symmetry.h index c87493d0c3..7fe03cb539 100644 --- a/source/source_cell/module_symmetry/symmetry.h +++ b/source/source_cell/module_symmetry/symmetry.h @@ -6,7 +6,7 @@ #include "source_base/timer.h" #include "source_base/mathzone.h" #include "source_base/constants.h" -#include "source_io/output.h" +#include "source_io/module_output/output.h" #include "symmetry_basic.h" namespace ModuleSymmetry diff --git a/source/source_cell/pseudo.cpp b/source/source_cell/pseudo.cpp index c6dc9de2f7..8b7ba21ca4 100644 --- a/source/source_cell/pseudo.cpp +++ b/source/source_cell/pseudo.cpp @@ -34,7 +34,7 @@ void pseudo::check_betar() } if (min_flag) { - std::cout << "WARNING: some of potential function is set to zero cause of less than 1e-30.\n"; + std::cout << " WARNING: some of potential function is set to zero cause of less than 1e-30.\n"; } } diff --git a/source/source_cell/pseudo.h b/source/source_cell/pseudo.h index 67322f78c7..17519ddeba 100644 --- a/source/source_cell/pseudo.h +++ b/source/source_cell/pseudo.h @@ -3,7 +3,7 @@ #include #include "source_base/global_function.h" -#include "source_io/output.h" +#include "source_io/module_output/output.h" //----------------------------------------- // read in pseudopotentials diff --git a/source/source_cell/read_atom_species.cpp b/source/source_cell/read_atom_species.cpp index b8cf4c5744..cd3bdfa124 100644 --- a/source/source_cell/read_atom_species.cpp +++ b/source/source_cell/read_atom_species.cpp @@ -3,9 +3,10 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/tool_title.h" #ifdef __EXX -#include "source_pw/module_pwdft/global.h" #include "source_lcao/module_ri/serialization_cereal.h" #endif +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info + namespace unitcell { bool read_atom_species(std::ifstream& ifa, diff --git a/source/source_cell/read_atoms.cpp b/source/source_cell/read_atoms.cpp index 1c1816c392..748be95c01 100644 --- a/source/source_cell/read_atoms.cpp +++ b/source/source_cell/read_atoms.cpp @@ -4,13 +4,13 @@ #include #include "unitcell.h" +#include "read_atoms_helper.h" #include "source_io/module_parameter/parameter.h" -#include "source_cell/print_cell.h" -#include "source_cell/read_stru.h" +#include "print_cell.h" +#include "read_stru.h" #include "source_estate/read_orb.h" #include "source_base/timer.h" #include "source_base/constants.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/formatter.h" #include "source_base/mathzone.h" @@ -19,44 +19,26 @@ #endif bool unitcell::read_atom_positions(UnitCell& ucell, - std::ifstream &ifpos, - std::ofstream &ofs_running, + std::ifstream &ifpos, + std::ofstream &ofs_running, std::ofstream &ofs_warning) { ModuleBase::TITLE("UnitCell","read_atom_positions"); std::string& Coordinate = ucell.Coordinate; - const int ntype = ucell.ntype; + const int ntype = ucell.ntype; + const int nspin = PARAM.inp.nspin; + assert (nspin==1 || nspin==2 || nspin==4); if( ModuleBase::GlobalFunc::SCAN_LINE_BEGIN(ifpos, "ATOMIC_POSITIONS")) { ModuleBase::GlobalFunc::READ_VALUE(ifpos, Coordinate); - if(Coordinate != "Cartesian" - && Coordinate != "Direct" - && Coordinate != "Cartesian_angstrom" - && Coordinate != "Cartesian_au" - && Coordinate != "Cartesian_angstrom_center_xy" - && Coordinate != "Cartesian_angstrom_center_xz" - && Coordinate != "Cartesian_angstrom_center_yz" - && Coordinate != "Cartesian_angstrom_center_xyz" - ) + if (!unitcell::validate_coordinate_system(Coordinate, ofs_warning)) { - ModuleBase::WARNING("read_atom_position","Cartesian or Direct?"); - ofs_warning << " There are several options for you:" << std::endl; - ofs_warning << " Direct" << std::endl; - ofs_warning << " Cartesian_angstrom" << std::endl; - ofs_warning << " Cartesian_au" << std::endl; - ofs_warning << " Cartesian_angstrom_center_xy" << std::endl; - ofs_warning << " Cartesian_angstrom_center_xz" << std::endl; - ofs_warning << " Cartesian_angstrom_center_yz" << std::endl; - ofs_warning << " Cartesian_angstrom_center_xyz" << std::endl; - return false; // means something wrong + return false; } - ModuleBase::Vector3 v; - ModuleBase::Vector3 mv; - int na = 0; ucell.nat = 0; //====================================== @@ -66,115 +48,25 @@ bool unitcell::read_atom_positions(UnitCell& ucell, for (int it = 0;it < ntype; it++) { ofs_running << "\n READING ATOM TYPE " << it+1 << std::endl; - - //======================================= - // (1) read in atom label - // start magnetization - //======================================= - ModuleBase::GlobalFunc::READ_VALUE(ifpos, ucell.atoms[it].label); - if(ucell.atoms[it].label != ucell.atom_label[it]) + bool set_element_mag_zero = false; + if (!unitcell::read_atom_type_header(it, ucell, ifpos, ofs_running, + ofs_warning, set_element_mag_zero)) { - ofs_warning << " Label orders in ATOMIC_POSITIONS and ATOMIC_SPECIES sections do not match!" << std::endl; - ofs_warning << " Label read from ATOMIC_POSITIONS is " << ucell.atoms[it].label << std::endl; - ofs_warning << " Label from ATOMIC_SPECIES is " << ucell.atom_label[it] << std::endl; return false; } - ModuleBase::GlobalFunc::OUT(ofs_running, "Atom label", ucell.atoms[it].label); - - bool set_element_mag_zero = false; - ModuleBase::GlobalFunc::READ_VALUE(ifpos, ucell.magnet.start_mag[it]); - -#ifndef __SYMMETRY - //=========================================== - // (2) read in numerical orbital information - // int ucell.atoms[it].nwl - // int* ucell.atoms[it].l_nchi; - //=========================================== - - if ((PARAM.inp.basis_type == "lcao")||(PARAM.inp.basis_type == "lcao_in_pw")) - { - std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it]; - elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it])); - } - else if(PARAM.inp.basis_type == "pw") - { - if ((PARAM.inp.init_wfc.substr(0, 3) == "nao") || PARAM.inp.onsite_radius > 0.0) - { - std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it]; - elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it])); - } - else - { - ucell.atoms[it].nw = 0; - ucell.atoms[it].nwl = 2; - if ( ucell.lmaxmax != 2 ) - { - ucell.atoms[it].nwl = ucell.lmaxmax; - } - ucell.atoms[it].l_nchi.resize(ucell.atoms[it].nwl+1, 0); - for(int L=0; L 0) { - ModuleBase::WARNING("read_atom_positions", " atom number < 0."); - return false; - } - else if (na == 0) - { - std::cout << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; - std::cout << " Warning: atom number is 0 for atom type: " << ucell.atoms[it].label << std::endl; - std::cout << " If you are confident that this is not a mistake, please ignore this warning." << std::endl; - std::cout << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; - ofs_running << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; - ofs_running << " Warning: atom number is 0 for atom type: " << ucell.atoms[it].label << std::endl; - ofs_running << " If you are confident that this is not a mistake, please ignore this warning." << std::endl; - ofs_running << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; - } - else if (na > 0) - { - ucell.atoms[it].tau.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].dis.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].taud.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].vel.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].mbl.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].mag.resize(na, 0); - ucell.atoms[it].angle1.resize(na, 0); - ucell.atoms[it].angle2.resize(na, 0); - ucell.atoms[it].m_loc_.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].lambda.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].constrain.resize(na, ModuleBase::Vector3(0,0,0)); - ucell.atoms[it].mass = ucell.atom_mass[it]; //mohan add 2011-11-07 + unitcell::allocate_atom_properties(ucell.atoms[it], na, ucell.atom_mass[it]); for (int ia = 0;ia < na; ia++) { // modify the reading of frozen ions and velocities -- Yuanbo Li 2021/8/20 + ModuleBase::Vector3 v; + ModuleBase::Vector3 mv; ifpos >> v.x >> v.y >> v.z; mv.x = true ; mv.y = true ; @@ -188,305 +80,27 @@ bool unitcell::read_atom_positions(UnitCell& ucell, ucell.atoms[it].lambda[ia].set(0,0,0); ucell.atoms[it].constrain[ia].set(0,0,0); - std::string tmpid; - tmpid = ifpos.get(); - - if( (int)tmpid[0] < 0 ) - { - std::cout << "read_atom_positions, mismatch in atom number for atom type: " - << ucell.atoms[it].label << std::endl; - exit(1); - } - bool input_vec_mag=false; bool input_angle_mag=false; - // read if catch goodbit before "\n" and "#" - while ( (tmpid != "\n") && (ifpos.good()) && (tmpid !="#") ) - { - tmpid = ifpos.get() ; - // old method of reading frozen ions - char tmp = (char)tmpid[0]; - if ( tmp >= 48 && tmp <= 57 ) - { - mv.x = std::stoi(tmpid); - ifpos >> mv.y >> mv.z ; - } - // new method of reading frozen ions and velocities - if ( tmp >= 'a' && tmp <='z') - { - ifpos.putback(tmp); - ifpos >> tmpid; - } - if ( tmpid == "m" ) - { - ifpos >> mv.x >> mv.y >> mv.z ; - } - else if ( tmpid == "v" ||tmpid == "vel" || tmpid == "velocity" ) - { - ifpos >> ucell.atoms[it].vel[ia].x >> ucell.atoms[it].vel[ia].y >> ucell.atoms[it].vel[ia].z; - } - else if ( tmpid == "mag" || tmpid == "magmom") - { - set_element_mag_zero = true; - double tmpamg=0; - ifpos >> tmpamg; - tmp=ifpos.get(); - while (tmp==' ') - { - tmp=ifpos.get(); - } - - if((tmp >= 48 && tmp <= 57) or tmp=='-') - { - ifpos.putback(tmp); - ifpos >> ucell.atoms[it].m_loc_[ia].y>>ucell.atoms[it].m_loc_[ia].z; - ucell.atoms[it].m_loc_[ia].x=tmpamg; - ucell.atoms[it].mag[ia]=sqrt(pow(ucell.atoms[it].m_loc_[ia].x,2) - +pow(ucell.atoms[it].m_loc_[ia].y,2) - +pow(ucell.atoms[it].m_loc_[ia].z,2)); - input_vec_mag=true; - - } - else - { - ifpos.putback(tmp); - ucell.atoms[it].mag[ia]=tmpamg; - } - } - else if ( tmpid == "angle1") - { - ifpos >> ucell.atoms[it].angle1[ia]; - ucell.atoms[it].angle1[ia]=ucell.atoms[it].angle1[ia]/180 *ModuleBase::PI; - input_angle_mag=true; - set_element_mag_zero = true; - } - else if ( tmpid == "angle2") - { - ifpos >> ucell.atoms[it].angle2[ia]; - ucell.atoms[it].angle2[ia]=ucell.atoms[it].angle2[ia]/180 *ModuleBase::PI; - input_angle_mag=true; - set_element_mag_zero = true; - } - else if ( tmpid == "lambda") - { - double tmplam=0; - ifpos >> tmplam; - tmp=ifpos.get(); - while (tmp==' ') - { - tmp=ifpos.get(); - } - if((tmp >= 48 && tmp <= 57) or tmp=='-') - { - ifpos.putback(tmp); - ifpos >> ucell.atoms[it].lambda[ia].y>>ucell.atoms[it].lambda[ia].z; - ucell.atoms[it].lambda[ia].x=tmplam; - } - else - { - ifpos.putback(tmp); - ucell.atoms[it].lambda[ia].z=tmplam; - } - ucell.atoms[it].lambda[ia].x /= ModuleBase::Ry_to_eV; - ucell.atoms[it].lambda[ia].y /= ModuleBase::Ry_to_eV; - ucell.atoms[it].lambda[ia].z /= ModuleBase::Ry_to_eV; - } - else if ( tmpid == "sc") - { - double tmplam=0; - ifpos >> tmplam; - tmp=ifpos.get(); - while (tmp==' ') - { - tmp=ifpos.get(); - } - if((tmp >= 48 && tmp <= 57) or tmp=='-') - { - ifpos.putback(tmp); - ifpos >> ucell.atoms[it].constrain[ia].y>>ucell.atoms[it].constrain[ia].z; - ucell.atoms[it].constrain[ia].x=tmplam; - } - else - { - ifpos.putback(tmp); - ucell.atoms[it].constrain[ia].z=tmplam; - } - } - } - // move to next line - while ( (tmpid != "\n") && (ifpos.good()) ) - { - tmpid = ifpos.get(); - } - std::string mags; - - // ---------------------------------------------------------------------------- - // recalcualte mag and m_loc_ from read in angle1, angle2 and mag or mx, my, mz - if(input_angle_mag) - {// angle1 or angle2 are given, calculate mx, my, mz from angle1 and angle2 and mag - ucell.atoms[it].m_loc_[ia].z = ucell.atoms[it].mag[ia] * - cos(ucell.atoms[it].angle1[ia]); - if(std::abs(sin(ucell.atoms[it].angle1[ia])) > 1e-10 ) - { - ucell.atoms[it].m_loc_[ia].x = ucell.atoms[it].mag[ia] * - sin(ucell.atoms[it].angle1[ia]) * cos(ucell.atoms[it].angle2[ia]); - ucell.atoms[it].m_loc_[ia].y = ucell.atoms[it].mag[ia] * - sin(ucell.atoms[it].angle1[ia]) * sin(ucell.atoms[it].angle2[ia]); - } - } - else if (input_vec_mag) - {// mx, my, mz are given, calculate angle1 and angle2 from mx, my, mz - double mxy=sqrt(pow(ucell.atoms[it].m_loc_[ia].x,2)+pow(ucell.atoms[it].m_loc_[ia].y,2)); - ucell.atoms[it].angle1[ia]=atan2(mxy,ucell.atoms[it].m_loc_[ia].z); - if(mxy>1e-8) - { - ucell.atoms[it].angle2[ia]=atan2(ucell.atoms[it].m_loc_[ia].y,ucell.atoms[it].m_loc_[ia].x); - } - } - else// only one mag is given, assume it is z + // Parse optional properties + if (!unitcell::parse_atom_properties(ifpos, ucell.atoms[it], ia, mv, + input_vec_mag, input_angle_mag, + set_element_mag_zero)) { - ucell.atoms[it].m_loc_[ia].x = 0; - ucell.atoms[it].m_loc_[ia].y = 0; - ucell.atoms[it].m_loc_[ia].z = ucell.atoms[it].mag[ia]; + return false; } - if(PARAM.inp.nspin==4) - { - if(!PARAM.inp.noncolin) - { - //collinear case with nspin = 4, only z component is used - ucell.atoms[it].m_loc_[ia].x = 0; - ucell.atoms[it].m_loc_[ia].y = 0; - } - //print only ia==0 && mag>0 to avoid too much output - //print when ia!=0 && mag[ia] != mag[0] to avoid too much output - // 'A || (!A && B)' is equivalent to 'A || B',so the following - // code is equivalent to 'ia==0 || (...)' - if(ia==0 || (ucell.atoms[it].m_loc_[ia].x != ucell.atoms[it].m_loc_[0].x - || ucell.atoms[it].m_loc_[ia].y != ucell.atoms[it].m_loc_[0].y - || ucell.atoms[it].m_loc_[ia].z != ucell.atoms[it].m_loc_[0].z)) - { - //use a stringstream to generate string: "concollinear magnetization of element it is:" - std::stringstream ss; - ss << "Magnetization for this type"; - if(ia!=0) - { - ss<<" (atom"<0 to avoid too much output - //print when ia!=0 && mag[ia] != mag[0] to avoid too much output - if(ia==0 || (ucell.atoms[it].mag[ia] != ucell.atoms[it].mag[0])) - { - //use a stringstream to generate string: "cocollinear magnetization of element it is:" - std::stringstream ss; - ss << "magnetization of element " << it+1; - if(ia!=0) - { - ss<<" (atom"< 1e-5) - { - autoset_mag = 0; - break; - } - } - } - if (autoset_mag) - { - if(PARAM.inp.nspin==4) - { - for (int it = 0;it < ntype; it++) - { - for (int ia = 0;ia < ucell.atoms[it].na; ia++) - { - ucell.atoms[it].m_loc_[ia].x = 1.0; - ucell.atoms[it].m_loc_[ia].y = 1.0; - ucell.atoms[it].m_loc_[ia].z = 1.0; - ucell.atoms[it].mag[ia] = sqrt(pow(ucell.atoms[it].m_loc_[ia].x,2) - +pow(ucell.atoms[it].m_loc_[ia].y,2) - +pow(ucell.atoms[it].m_loc_[ia].z,2)); - ModuleBase::GlobalFunc::OUT(ofs_running,"Autoset magnetism for this atom", 1.0, 1.0, 1.0); - } - } - } - else if(PARAM.inp.nspin==2) - { - for (int it = 0;it < ntype; it++) - { - for (int ia = 0;ia < ucell.atoms[it].na; ia++) - { - ucell.atoms[it].mag[ia] = 1.0; - ucell.atoms[it].m_loc_[ia].x = ucell.atoms[it].mag[ia]; - ModuleBase::GlobalFunc::OUT(ofs_running,"Autoset magnetism for this atom", 1.0); - } - } - } - } - // End Autoset magnetization + // Auto-set magnetization if needed + unitcell::autoset_magnetization(ucell, nspin, ofs_running); } // end scan_begin - //check if any atom can move in MD - if(!ucell.if_atoms_can_move() && PARAM.inp.calculation=="md" && PARAM.inp.esolver_type!="tddft") - { - ModuleBase::WARNING("read_atoms", "no atoms can move in MD simulations!"); - return false; - } - - ofs_running << std::endl; - ModuleBase::GlobalFunc::OUT(ofs_running,"TOTAL ATOM NUMBER",ucell.nat); - ofs_running << std::endl; - - if (ucell.nat == 0) - { - ModuleBase::WARNING("read_atom_positions","no atoms found in the system!"); - return false; - } - - // mohan add 2010-06-30 - unitcell::check_dtau(ucell.atoms,ucell.ntype, ucell.lat0, ucell.latvec); - - if (unitcell::check_tau(ucell.atoms, ucell.ntype, ucell.lat0)) - { - unitcell::print_tau(ucell.atoms,ucell.Coordinate,ucell.ntype,ucell.lat0,ofs_running); - return true; - } - return false; + // Final validation and output + return unitcell::finalize_atom_positions(ucell, ofs_running, ofs_warning); }//end read_atom_positions diff --git a/source/source_cell/read_atoms_helper.cpp b/source/source_cell/read_atoms_helper.cpp new file mode 100644 index 0000000000..4fc3dfe6cb --- /dev/null +++ b/source/source_cell/read_atoms_helper.cpp @@ -0,0 +1,596 @@ +#include "read_atoms_helper.h" +#include "source_io/module_parameter/parameter.h" +#include "source_base/global_function.h" +#include "source_base/constants.h" +#include "source_base/mathzone.h" +#include "read_stru.h" +#include "print_cell.h" +#include "source_estate/read_orb.h" +#include +#include +#include + +namespace { + // Magic number constants for character code checks + constexpr char DIGIT_START = '0'; // ASCII 48 + constexpr char DIGIT_END = '9'; // ASCII 57 + constexpr char LOWER_A = 'a'; + constexpr char LOWER_Z = 'z'; + constexpr char MINUS_SIGN = '-'; +} + +namespace unitcell { + +bool validate_coordinate_system(const std::string& Coordinate, + std::ofstream& ofs_warning) +{ + if(Coordinate != "Cartesian" + && Coordinate != "Direct" + && Coordinate != "Cartesian_angstrom" + && Coordinate != "Cartesian_au" + && Coordinate != "Cartesian_angstrom_center_xy" + && Coordinate != "Cartesian_angstrom_center_xz" + && Coordinate != "Cartesian_angstrom_center_yz" + && Coordinate != "Cartesian_angstrom_center_xyz" + ) + { + ModuleBase::WARNING("read_atom_position","Cartesian or Direct?"); + ofs_warning << " There are several options for you:" << std::endl; + ofs_warning << " Direct" << std::endl; + ofs_warning << " Cartesian_angstrom" << std::endl; + ofs_warning << " Cartesian_au" << std::endl; + ofs_warning << " Cartesian_angstrom_center_xy" << std::endl; + ofs_warning << " Cartesian_angstrom_center_xz" << std::endl; + ofs_warning << " Cartesian_angstrom_center_yz" << std::endl; + ofs_warning << " Cartesian_angstrom_center_xyz" << std::endl; + return false; + } + return true; +} + +void allocate_atom_properties(Atom& atom, int na, double mass) +{ + atom.tau.resize(na, ModuleBase::Vector3(0,0,0)); + atom.dis.resize(na, ModuleBase::Vector3(0,0,0)); + atom.taud.resize(na, ModuleBase::Vector3(0,0,0)); + atom.boundary_shift.resize(na, ModuleBase::Vector3(0,0,0)); + atom.vel.resize(na, ModuleBase::Vector3(0,0,0)); + atom.mbl.resize(na, ModuleBase::Vector3(0,0,0)); + atom.mag.resize(na, 0); + atom.angle1.resize(na, 0); + atom.angle2.resize(na, 0); + atom.m_loc_.resize(na, ModuleBase::Vector3(0,0,0)); + atom.lambda.resize(na, ModuleBase::Vector3(0,0,0)); + atom.constrain.resize(na, ModuleBase::Vector3(0,0,0)); + atom.mass = mass; +} + +void set_atom_movement_flags(Atom& atom, int ia, + const ModuleBase::Vector3& mv) +{ + if(!PARAM.inp.fixed_atoms) + { + atom.mbl[ia] = mv; + } + else + { + atom.mbl[ia] = 0.0; + atom.mbl[ia].print(); + } +} + +void autoset_magnetization(UnitCell& ucell, int nspin, + std::ofstream& ofs_running) +{ + const int ntype = ucell.ntype; + + // Check if any atom has non-zero magnetization + int autoset_mag = 1; + for (int it = 0; it < ntype; it++) + { + for (int ia = 0; ia < ucell.atoms[it].na; ia++) + { + if(std::abs(ucell.atoms[it].mag[ia]) > 1e-5) + { + autoset_mag = 0; + break; + } + } + } + + if (autoset_mag) + { + if(nspin==4) + { + for (int it = 0; it < ntype; it++) + { + for (int ia = 0; ia < ucell.atoms[it].na; ia++) + { + ucell.atoms[it].m_loc_[ia].x = 1.0; + ucell.atoms[it].m_loc_[ia].y = 1.0; + ucell.atoms[it].m_loc_[ia].z = 1.0; + ucell.atoms[it].mag[ia] = sqrt(pow(ucell.atoms[it].m_loc_[ia].x,2) + +pow(ucell.atoms[it].m_loc_[ia].y,2) + +pow(ucell.atoms[it].m_loc_[ia].z,2)); + ModuleBase::GlobalFunc::OUT(ofs_running,"Autoset magnetism for this atom", 1.0, 1.0, 1.0); + } + } + } + else if(nspin==2) + { + for (int it = 0; it < ntype; it++) + { + for (int ia = 0; ia < ucell.atoms[it].na; ia++) + { + ucell.atoms[it].mag[ia] = 1.0; + ucell.atoms[it].m_loc_[ia].x = ucell.atoms[it].mag[ia]; + ModuleBase::GlobalFunc::OUT(ofs_running,"Autoset magnetism for this atom", 1.0); + } + } + } + } +} + +bool finalize_atom_positions(UnitCell& ucell, + std::ofstream& ofs_running, + std::ofstream& ofs_warning) +{ + // Check if any atom can move in MD + if(!ucell.if_atoms_can_move() && PARAM.inp.calculation=="md" && PARAM.inp.esolver_type!="tddft") + { + ModuleBase::WARNING("read_atoms", "no atoms can move in MD simulations!"); + return false; + } + + ofs_running << std::endl; + ModuleBase::GlobalFunc::OUT(ofs_running,"TOTAL ATOM NUMBER",ucell.nat); + ofs_running << std::endl; + + if (ucell.nat == 0) + { + ModuleBase::WARNING("read_atom_positions","no atoms found in the system!"); + return false; + } + + // Check atom positions + unitcell::check_dtau(ucell.atoms, ucell.ntype, ucell.lat0, ucell.latvec); + + if (unitcell::check_tau(ucell.atoms, ucell.ntype, ucell.lat0)) + { + print_tau(ucell.atoms, ucell.Coordinate, ucell.ntype, ucell.lat0, ofs_running); + return true; + } + return false; +} + +ModuleBase::Vector3 calculate_lattice_center( + const ModuleBase::Matrix3& latvec, + const std::string& center_mode) +{ + ModuleBase::Vector3 latcenter(0.0, 0.0, 0.0); + + if (center_mode == "xy" || center_mode == "xyz") + { + latcenter.x = (latvec.e11 + latvec.e21 + latvec.e31) / 2.0; + latcenter.y = (latvec.e12 + latvec.e22 + latvec.e32) / 2.0; + } + + if (center_mode == "xz" || center_mode == "xyz") + { + latcenter.x = (latvec.e11 + latvec.e21 + latvec.e31) / 2.0; + latcenter.z = (latvec.e13 + latvec.e23 + latvec.e33) / 2.0; + } + + if (center_mode == "yz" || center_mode == "xyz") + { + latcenter.y = (latvec.e12 + latvec.e22 + latvec.e32) / 2.0; + latcenter.z = (latvec.e13 + latvec.e23 + latvec.e33) / 2.0; + } + + return latcenter; +} + +void transform_atom_coordinates(Atom& atom, int ia, + const std::string& Coordinate, + const ModuleBase::Vector3& v, + const ModuleBase::Matrix3& latvec, + double lat0, + ModuleBase::Vector3& latcenter) +{ + if(Coordinate=="Direct") + { + // change v from direct to cartesian, + // the unit is GlobalC::sf.ucell.lat0 + atom.taud[ia] = v; + atom.tau[ia] = v * latvec; + } + else if(Coordinate=="Cartesian") + { + atom.tau[ia] = v; // in unit ucell.lat0 + } + else if(Coordinate=="Cartesian_angstrom") + { + atom.tau[ia] = v / ModuleBase::BOHR_TO_A / lat0; + } + else if(Coordinate=="Cartesian_angstrom_center_xy") + { + latcenter = calculate_lattice_center(latvec, "xy"); + atom.tau[ia] = v / ModuleBase::BOHR_TO_A / lat0 + latcenter; + } + else if(Coordinate=="Cartesian_angstrom_center_xz") + { + latcenter = calculate_lattice_center(latvec, "xz"); + atom.tau[ia] = v / ModuleBase::BOHR_TO_A / lat0 + latcenter; + } + else if(Coordinate=="Cartesian_angstrom_center_yz") + { + latcenter = calculate_lattice_center(latvec, "yz"); + atom.tau[ia] = v / ModuleBase::BOHR_TO_A / lat0 + latcenter; + } + else if(Coordinate=="Cartesian_angstrom_center_xyz") + { + latcenter = calculate_lattice_center(latvec, "xyz"); + atom.tau[ia] = v / ModuleBase::BOHR_TO_A / lat0 + latcenter; + } + else if(Coordinate=="Cartesian_au") + { + atom.tau[ia] = v / lat0; + } + + // Convert to direct coordinates if using Cartesian + if(Coordinate=="Cartesian" || + Coordinate=="Cartesian_angstrom" || + Coordinate=="Cartesian_angstrom_center_xy" || + Coordinate=="Cartesian_angstrom_center_xz" || + Coordinate=="Cartesian_angstrom_center_yz" || + Coordinate=="Cartesian_angstrom_center_xyz" || + Coordinate=="Cartesian_au") + { + double dx=0.0; + double dy=0.0; + double dz=0.0; + ModuleBase::Mathzone::Cartesian_to_Direct(atom.tau[ia].x, + atom.tau[ia].y, + atom.tau[ia].z, + latvec.e11, latvec.e12, latvec.e13, + latvec.e21, latvec.e22, latvec.e23, + latvec.e31, latvec.e32, latvec.e33, + dx,dy,dz); + + atom.taud[ia].x = dx; + atom.taud[ia].y = dy; + atom.taud[ia].z = dz; + } +} + +void process_magnetization(Atom& atom, int it, int ia, + int nspin, bool input_vec_mag, + bool input_angle_mag, + std::ofstream& ofs_running) +{ + // Recalculate mag and m_loc_ from read in angle1, angle2 and mag or mx, my, mz + if(input_angle_mag) + { + // angle1 or angle2 are given, calculate mx, my, mz from angle1 and angle2 and mag + atom.m_loc_[ia].z = atom.mag[ia] * cos(atom.angle1[ia]); + if(std::abs(sin(atom.angle1[ia])) > 1e-10) + { + atom.m_loc_[ia].x = atom.mag[ia] * + sin(atom.angle1[ia]) * cos(atom.angle2[ia]); + atom.m_loc_[ia].y = atom.mag[ia] * + sin(atom.angle1[ia]) * sin(atom.angle2[ia]); + } + } + else if (input_vec_mag) + { + // mx, my, mz are given, calculate angle1 and angle2 from mx, my, mz + double mxy=sqrt(pow(atom.m_loc_[ia].x,2)+pow(atom.m_loc_[ia].y,2)); + atom.angle1[ia]=atan2(mxy,atom.m_loc_[ia].z); + if(mxy>1e-8) + { + atom.angle2[ia]=atan2(atom.m_loc_[ia].y,atom.m_loc_[ia].x); + } + } + else + { + // only one mag is given, assume it is z + atom.m_loc_[ia].x = 0; + atom.m_loc_[ia].y = 0; + atom.m_loc_[ia].z = atom.mag[ia]; + } + + if(nspin==4) + { + if(!PARAM.inp.noncolin) + { + // collinear case with nspin = 4, only z component is used + atom.m_loc_[ia].x = 0; + atom.m_loc_[ia].y = 0; + } + // print only ia==0 && mag>0 to avoid too much output + // print when ia!=0 && mag[ia] != mag[0] to avoid too much output + if(ia==0 || (atom.m_loc_[ia].x != atom.m_loc_[0].x + || atom.m_loc_[ia].y != atom.m_loc_[0].y + || atom.m_loc_[ia].z != atom.m_loc_[0].z)) + { + std::stringstream ss; + ss << "Magnetization for this type"; + if(ia!=0) + { + ss<<" (atom"<0 to avoid too much output + // print when ia!=0 && mag[ia] != mag[0] to avoid too much output + if(ia==0 || (atom.mag[ia] != atom.mag[0])) + { + std::stringstream ss; + ss << "magnetization of element " << it+1; + if(ia!=0) + { + ss<<" (atom"<& mv, + bool& input_vec_mag, + bool& input_angle_mag, + bool& set_element_mag_zero) +{ + std::string tmpid; + tmpid = ifpos.get(); + + if( (int)tmpid[0] < 0 ) + { + std::cout << "read_atom_positions, mismatch in atom number for atom type: " + << atom.label << std::endl; + exit(1); + } + + // read if catch goodbit before "\n" and "#" + while ( (tmpid != "\n") && (ifpos.good()) && (tmpid !="#") ) + { + tmpid = ifpos.get(); + // old method of reading frozen ions + char tmp = (char)tmpid[0]; + if ( tmp >= DIGIT_START && tmp <= DIGIT_END ) + { + mv.x = std::stoi(tmpid); + ifpos >> mv.y >> mv.z; + } + // new method of reading frozen ions and velocities + if ( tmp >= LOWER_A && tmp <= LOWER_Z) + { + ifpos.putback(tmp); + ifpos >> tmpid; + } + if ( tmpid == "m" ) + { + ifpos >> mv.x >> mv.y >> mv.z; + } + else if ( tmpid == "v" ||tmpid == "vel" || tmpid == "velocity" ) + { + ifpos >> atom.vel[ia].x >> atom.vel[ia].y >> atom.vel[ia].z; + } + else if ( tmpid == "mag" || tmpid == "magmom") + { + set_element_mag_zero = true; + double tmpamg=0; + ifpos >> tmpamg; + tmp=ifpos.get(); + while (tmp==' ') + { + tmp=ifpos.get(); + } + + if((tmp >= DIGIT_START && tmp <= DIGIT_END) or tmp==MINUS_SIGN) + { + ifpos.putback(tmp); + ifpos >> atom.m_loc_[ia].y>>atom.m_loc_[ia].z; + atom.m_loc_[ia].x=tmpamg; + atom.mag[ia]=sqrt(pow(atom.m_loc_[ia].x,2) + +pow(atom.m_loc_[ia].y,2) + +pow(atom.m_loc_[ia].z,2)); + input_vec_mag=true; + + } + else + { + ifpos.putback(tmp); + atom.mag[ia]=tmpamg; + } + } + else if ( tmpid == "angle1") + { + ifpos >> atom.angle1[ia]; + atom.angle1[ia]=atom.angle1[ia]/180 *ModuleBase::PI; + input_angle_mag=true; + set_element_mag_zero = true; + } + else if ( tmpid == "angle2") + { + ifpos >> atom.angle2[ia]; + atom.angle2[ia]=atom.angle2[ia]/180 *ModuleBase::PI; + input_angle_mag=true; + set_element_mag_zero = true; + } + else if ( tmpid == "lambda") + { + double tmplam=0; + ifpos >> tmplam; + tmp=ifpos.get(); + while (tmp==' ') + { + tmp=ifpos.get(); + } + if((tmp >= DIGIT_START && tmp <= DIGIT_END) or tmp==MINUS_SIGN) + { + ifpos.putback(tmp); + ifpos >> atom.lambda[ia].y>>atom.lambda[ia].z; + atom.lambda[ia].x=tmplam; + } + else + { + ifpos.putback(tmp); + atom.lambda[ia].z=tmplam; + } + atom.lambda[ia].x /= ModuleBase::Ry_to_eV; + atom.lambda[ia].y /= ModuleBase::Ry_to_eV; + atom.lambda[ia].z /= ModuleBase::Ry_to_eV; + } + else if ( tmpid == "sc") + { + double tmplam=0; + ifpos >> tmplam; + tmp=ifpos.get(); + while (tmp==' ') + { + tmp=ifpos.get(); + } + if((tmp >= DIGIT_START && tmp <= DIGIT_END) or tmp==MINUS_SIGN) + { + ifpos.putback(tmp); + ifpos >> atom.constrain[ia].y>>atom.constrain[ia].z; + atom.constrain[ia].x=tmplam; + } + else + { + ifpos.putback(tmp); + atom.constrain[ia].z=tmplam; + } + } + } + // move to next line + while ( (tmpid != "\n") && (ifpos.good()) ) + { + tmpid = ifpos.get(); + } + + return true; +} + +bool read_atom_type_header(int it, UnitCell& ucell, + std::ifstream& ifpos, + std::ofstream& ofs_running, + std::ofstream& ofs_warning, + bool& set_element_mag_zero) +{ + //======================================= + // (1) read in atom label + // start magnetization + //======================================= + ModuleBase::GlobalFunc::READ_VALUE(ifpos, ucell.atoms[it].label); + + if(ucell.atoms[it].label != ucell.atom_label[it]) + { + ofs_warning << " Label orders in ATOMIC_POSITIONS and ATOMIC_SPECIES sections do not match!" << std::endl; + ofs_warning << " Label read from ATOMIC_POSITIONS is " << ucell.atoms[it].label << std::endl; + ofs_warning << " Label from ATOMIC_SPECIES is " << ucell.atom_label[it] << std::endl; + return false; + } + ModuleBase::GlobalFunc::OUT(ofs_running, "Atom label", ucell.atoms[it].label); + + set_element_mag_zero = false; + ModuleBase::GlobalFunc::READ_VALUE(ifpos, ucell.magnet.start_mag[it]); + +#ifndef __SYMMETRY + //=========================================== + // (2) read in numerical orbital information + // int ucell.atoms[it].nwl + // int* ucell.atoms[it].l_nchi; + //=========================================== + + if ((PARAM.inp.basis_type == "lcao")||(PARAM.inp.basis_type == "lcao_in_pw")) + { + std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it]; + bool normal = elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it])); + if(!normal) + { + return false; + } + } + else if(PARAM.inp.basis_type == "pw") + { + if ((PARAM.inp.init_wfc.substr(0, 3) == "nao") || PARAM.inp.onsite_radius > 0.0) + { + std::string orbital_file = PARAM.inp.orbital_dir + ucell.orbital_fn[it]; + bool normal = elecstate::read_orb_file(it, orbital_file, ofs_running, &(ucell.atoms[it])); + if(!normal) + { + return false; + } + } + else + { + ucell.atoms[it].nw = 0; + ucell.atoms[it].nwl = 2; + if ( ucell.lmaxmax != 2 ) + { + ucell.atoms[it].nwl = ucell.lmaxmax; + } + ucell.atoms[it].l_nchi.resize(ucell.atoms[it].nwl+1, 0); + for(int L=0; L +#include +#include "unitcell.h" +#include "source_base/vector3.h" +#include "source_base/matrix3.h" + +namespace unitcell { + +/** + * @brief Validate coordinate system type + * @param Coordinate The coordinate system string to validate + * @param ofs_warning Output stream for warnings + * @return true if valid, false otherwise + */ +bool validate_coordinate_system(const std::string& Coordinate, + std::ofstream& ofs_warning); + +/** + * @brief Allocate and initialize atom property vectors + * @param atom The atom object to allocate properties for + * @param na Number of atoms + * @param mass Atomic mass + */ +void allocate_atom_properties(Atom& atom, int na, double mass); + +/** + * @brief Set atom movement constraints based on fixed_atoms parameter + * @param atom The atom object + * @param ia Atom index + * @param mv Movement vector (1=movable, 0=fixed) + */ +void set_atom_movement_flags(Atom& atom, int ia, + const ModuleBase::Vector3& mv); + +/** + * @brief Set default magnetization if not explicitly specified + * @param ucell Unit cell object + * @param nspin Number of spin components + * @param ofs_running Output stream for running information + */ +void autoset_magnetization(UnitCell& ucell, int nspin, + std::ofstream& ofs_running); + +/** + * @brief Perform final validation and output + * @param ucell Unit cell object + * @param ofs_running Output stream for running information + * @param ofs_warning Output stream for warnings + * @return true if validation passes, false otherwise + */ +bool finalize_atom_positions(UnitCell& ucell, + std::ofstream& ofs_running, + std::ofstream& ofs_warning); + +/** + * @brief Calculate lattice center for different centering modes + * @param latvec Lattice vectors + * @param center_mode Centering mode: "xy", "xz", "yz", or "xyz" + * @return Lattice center coordinates + */ +ModuleBase::Vector3 calculate_lattice_center( + const ModuleBase::Matrix3& latvec, + const std::string& center_mode); + +/** + * @brief Convert between different coordinate systems + * @param atom The atom object + * @param ia Atom index + * @param Coordinate Coordinate system type + * @param v Input position vector + * @param latvec Lattice vectors + * @param lat0 Lattice constant + * @param latcenter Lattice center (output parameter) + */ +void transform_atom_coordinates(Atom& atom, int ia, + const std::string& Coordinate, + const ModuleBase::Vector3& v, + const ModuleBase::Matrix3& latvec, + double lat0, + ModuleBase::Vector3& latcenter); + +/** + * @brief Convert between magnetization representations and output + * @param atom The atom object + * @param it Atom type index + * @param ia Atom index + * @param nspin Number of spin components + * @param input_vec_mag Whether vector magnetization was input + * @param input_angle_mag Whether angle magnetization was input + * @param ofs_running Output stream for running information + */ +void process_magnetization(Atom& atom, int it, int ia, + int nspin, bool input_vec_mag, + bool input_angle_mag, + std::ofstream& ofs_running); + +/** + * @brief Parse optional atom properties (mag, angle1, angle2, lambda, sc, m, v) + * @param ifpos Input file stream + * @param atom The atom object + * @param ia Atom index + * @param mv Movement vector (output parameter) + * @param input_vec_mag Whether vector magnetization was input (output parameter) + * @param input_angle_mag Whether angle magnetization was input (output parameter) + * @param set_element_mag_zero Whether to reset element magnetization (output parameter) + * @return true if parsing succeeds, false otherwise + */ +bool parse_atom_properties(std::ifstream& ifpos, + Atom& atom, int ia, + ModuleBase::Vector3& mv, + bool& input_vec_mag, + bool& input_angle_mag, + bool& set_element_mag_zero); + +/** + * @brief Read atom type metadata (label, magnetization, orbital info, atom count) + * @param it Atom type index + * @param ucell Unit cell object + * @param ifpos Input file stream + * @param ofs_running Output stream for running information + * @param ofs_warning Output stream for warnings + * @param set_element_mag_zero Whether to reset element magnetization (output parameter) + * @return true if reading succeeds, false otherwise + */ +bool read_atom_type_header(int it, UnitCell& ucell, + std::ifstream& ifpos, + std::ofstream& ofs_running, + std::ofstream& ofs_warning, + bool& set_element_mag_zero); + +} // namespace unitcell + +#endif // READ_ATOMS_HELPER_H diff --git a/source/source_cell/read_pp_blps.cpp b/source/source_cell/read_pp_blps.cpp index 682f39dfdc..5370dbc41b 100644 --- a/source/source_cell/read_pp_blps.cpp +++ b/source/source_cell/read_pp_blps.cpp @@ -24,8 +24,8 @@ int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs, Atom_pseudo& pp) // if(!SCAN_BEGIN(ifs,"BLPS")) WARNING_QUIT("read_pp_blps","Find no PP_HEADER"); ifs.ignore(300, '\n'); - double zatom; - double zion; + double zatom = 0.0; + double zion = 0.0; ifs >> zatom >> zion; pp.zv = zion; ifs.ignore(300, '\n'); diff --git a/source/source_cell/read_pp_upf100.cpp b/source/source_cell/read_pp_upf100.cpp index 0e91dffccc..9327ebe712 100644 --- a/source/source_cell/read_pp_upf100.cpp +++ b/source/source_cell/read_pp_upf100.cpp @@ -326,7 +326,7 @@ void Pseudopot_upf::read_pseudo_nl(std::ifstream& ifs, Atom_pseudo& pp) ModuleBase::GlobalFunc::READ_VALUE(ifs, this->nd); // nl_4 for (int i = 0; i < this->nd; i++) { - double swap; + double swap = 0.0; ifs >> nb >> mb >> swap; nb--; mb--; diff --git a/source/source_cell/read_pp_upf201.cpp b/source/source_cell/read_pp_upf201.cpp index e0941664bf..d02bb8e6d5 100644 --- a/source/source_cell/read_pp_upf201.cpp +++ b/source/source_cell/read_pp_upf201.cpp @@ -807,7 +807,7 @@ void Pseudopot_upf::read_pseudo_upf201_fullwfc(std::ifstream& ifs) std::string word; std::string name[50]; std::string val[50]; - int nparameter; + int nparameter = 0; this->aewfc.create(this->nbeta, this->mesh); this->pswfc.create(this->nbeta, this->mesh); ModuleBase::GlobalFunc::SCAN_BEGIN(ifs, " #include diff --git a/source/source_cell/setup_nonlocal.cpp b/source/source_cell/setup_nonlocal.cpp index ba3f915315..96bf898864 100644 --- a/source/source_cell/setup_nonlocal.cpp +++ b/source/source_cell/setup_nonlocal.cpp @@ -4,7 +4,6 @@ #include "source_io/module_parameter/parameter.h" #ifdef __LCAO -//#include "../source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/soc.h" // mohan add 2013-08-02 // In order to get rid of the read in file .NONLOCAL. @@ -313,7 +312,7 @@ void InfoNonlocal::Read_NonLocal(const int& it, { if (ModuleBase::GlobalFunc::SCAN_BEGIN(ifs, "", false)) { - int iproj; + int iproj = 0; ModuleBase::GlobalFunc::READ_VALUE(ifs, iproj); if (iproj != p1) { diff --git a/source/source_cell/test/CMakeLists.txt b/source/source_cell/test/CMakeLists.txt index 6217e90be4..c6eab25d01 100644 --- a/source/source_cell/test/CMakeLists.txt +++ b/source/source_cell/test/CMakeLists.txt @@ -21,6 +21,7 @@ list(APPEND cell_simple_srcs ../read_stru.cpp ../read_atom_species.cpp ../read_atoms.cpp + ../read_atoms_helper.cpp ../atom_spec.cpp ../atom_pseudo.cpp ../pseudo.cpp @@ -45,40 +46,40 @@ AddTest( TARGET MODULE_CELL_read_pp LIBS parameter ${math_libs} base device SOURCES read_pp_test.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp ../read_pp_vwr.cpp ../read_pp_blps.cpp - ../../source_io/output.cpp + ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_pseudo_nc LIBS parameter ${math_libs} base device SOURCES pseudo_nc_test.cpp ../pseudo.cpp ../atom_pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp ../read_pp_vwr.cpp - ../read_pp_blps.cpp ../../source_io/output.cpp + ../read_pp_blps.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_atom_pseudo LIBS parameter ${math_libs} base device SOURCES atom_pseudo_test.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp - ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/output.cpp + ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_atom_spec LIBS parameter ${math_libs} base device SOURCES atom_spec_test.cpp ../atom_spec.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp - ../read_pp_upf100.cpp ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/output.cpp + ../read_pp_upf100.cpp ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_klist_test LIBS parameter ${math_libs} base device symmetry - SOURCES klist_test.cpp ../klist.cpp ../parallel_kpoints.cpp ../../source_io/output.cpp ../k_vector_utils.cpp + SOURCES klist_test.cpp ../klist.cpp ../parallel_kpoints.cpp ../../source_io/module_output/output.cpp ../k_vector_utils.cpp ) AddTest( TARGET MODULE_CELL_klist_test_para1 LIBS parameter ${math_libs} base device symmetry - SOURCES klist_test_para.cpp ../klist.cpp ../parallel_kpoints.cpp ../../source_io/output.cpp ../k_vector_utils.cpp + SOURCES klist_test_para.cpp ../klist.cpp ../parallel_kpoints.cpp ../../source_io/module_output/output.cpp ../k_vector_utils.cpp ) add_test(NAME MODULE_CELL_klist_test_para4 @@ -90,7 +91,32 @@ AddTest( TARGET MODULE_CELL_ParaKpoints LIBS parameter MPI::MPI_CXX SOURCES parallel_kpoints_test.cpp ../../source_base/global_variable.cpp ../../source_base/parallel_global.cpp - ../../source_base/parallel_common.cpp ../../source_base/parallel_comm.cpp ../parallel_kpoints.cpp + ../../source_base/parallel_common.cpp ../../source_base/parallel_comm.cpp ../parallel_kpoints.cpp ../../source_base/tool_quit.cpp ../../source_base/global_variable.cpp ../../source_base/global_file.cpp ../../source_base/global_function.cpp ../../source_base/memory.cpp ../../source_base/timer.cpp ../../source_base/parallel_reduce.cpp +) + +# Add unit test for read_atoms_helper +AddTest( + TARGET MODULE_CELL_read_atoms_helper_test + LIBS parameter ${math_libs} base device + SOURCES read_atoms_helper_test.cpp + ../read_atoms_helper.cpp + ../read_stru.cpp + ../print_cell.cpp + ../atom_spec.cpp + ../unitcell.cpp + ../update_cell.cpp + ../bcast_cell.cpp + ../atom_pseudo.cpp + ../pseudo.cpp + ../read_pp.cpp + ../read_pp_complete.cpp + ../read_pp_upf201.cpp + ../read_pp_upf100.cpp + ../read_pp_vwr.cpp + ../read_pp_blps.cpp + ../read_atom_species.cpp + ../sep.cpp + ../sep_cell.cpp ) find_program(BASH bash) @@ -113,26 +139,26 @@ add_test(NAME MODULE_CELL_parallel_kpoints_test AddTest( TARGET MODULE_CELL_unitcell_test LIBS parameter ${math_libs} base device cell_info symmetry - SOURCES unitcell_test.cpp ../../source_io/output.cpp ../../source_estate/cal_ux.cpp + SOURCES unitcell_test.cpp ../../source_io/module_output/output.cpp ../../source_estate/cal_ux.cpp ) AddTest( TARGET MODULE_CELL_unitcell_test_readpp LIBS parameter ${math_libs} base device cell_info - SOURCES unitcell_test_readpp.cpp ../../source_io/output.cpp + SOURCES unitcell_test_readpp.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_unitcell_test_para LIBS parameter ${math_libs} base device cell_info - SOURCES unitcell_test_para.cpp ../../source_io/output.cpp + SOURCES unitcell_test_para.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET MODULE_CELL_unitcell_test_setupcell LIBS parameter ${math_libs} base device cell_info - SOURCES unitcell_test_setupcell.cpp ../../source_io/output.cpp + SOURCES unitcell_test_setupcell.cpp ../../source_io/module_output/output.cpp ) add_test(NAME MODULE_CELL_unitcell_test_parallel diff --git a/source/source_cell/test/klist_test.cpp b/source/source_cell/test/klist_test.cpp index 5d9c75ff18..f6169b6229 100644 --- a/source/source_cell/test/klist_test.cpp +++ b/source/source_cell/test/klist_test.cpp @@ -12,10 +12,10 @@ #include "source_cell/setup_nonlocal.h" #include "source_cell/unitcell.h" #include "source_estate/magnetism.h" -#include "source_pw/module_pwdft/VL_in_pw.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/berryphase.h" +#include "source_io/module_unk/berryphase.h" #include "source_io/module_parameter/parameter.h" #undef private #include "source_base/mathzone.h" @@ -727,6 +727,32 @@ TEST_F(KlistTest, NormalizeWk) EXPECT_DOUBLE_EQ(kv->wk[1], 1.0); } +TEST_F(KlistTest, NormalizeWkZeroWeights) +{ + // Test that zero weights are handled correctly + kv->nspin = 1; + kv->set_nkstot(3); + kv->set_nks(3); + kv->renew(kv->get_nkstot()); + kv->wk[0] = 0.0; + kv->wk[1] = 0.0; + kv->wk[2] = 0.0; + int deg = 2; + + // Should not crash and should set equal weights + kv->normalize_wk(deg); + + // Each k-point should have weight = deg / nkstot = 2 / 3 + EXPECT_NEAR(kv->wk[0], 2.0 / 3.0, 1e-10); + EXPECT_NEAR(kv->wk[1], 2.0 / 3.0, 1e-10); + EXPECT_NEAR(kv->wk[2], 2.0 / 3.0, 1e-10); + + // Sum should equal deg + double sum = kv->wk[0] + kv->wk[1] + kv->wk[2]; + EXPECT_NEAR(sum, 2.0, 1e-10); +} + + TEST_F(KlistTest, UpdateUseIBZ) { kv->nspin = 1; @@ -788,3 +814,158 @@ TEST_F(KlistTest, IbzKpointIsMP) ClearUcell(); remove("tmp_klist_4"); } + +TEST_F(KlistTest, IbzKpointCustomWeights) +{ + // This test verifies the fix for issue #6552: k-point weights should not be overwritten + // during IBZ reduction for non-Monkhorst-Pack k-point lists. + + ModuleSymmetry::Symmetry symm; + construct_ucell(stru_lib[0]); + GlobalV::ofs_running.open("tmp_klist_custom_weights"); + symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); + + // Test 1: Non-MP k-points with uniform weights (KPT4) + { + K_Vectors kv_test1; + std::string k_file = "./support/KPT4"; + kv_test1.nspin = 1; + kv_test1.read_kpoints(ucell, k_file); + EXPECT_EQ(kv_test1.get_nkstot(), 5); + EXPECT_FALSE(kv_test1.is_mp); // Should be non-MP + + // Store original weights before IBZ reduction + std::vector original_weights = kv_test1.wk; + + // Apply IBZ reduction + std::string skpt; + ModuleSymmetry::Symmetry::symm_flag = 1; + bool match = true; + KVectorUtils::kvec_ibz_kpoint(kv_test1, symm, ModuleSymmetry::Symmetry::symm_flag, skpt, ucell, match); + + // Verify that weights are preserved (not overwritten with 1/nkstot) + // After IBZ reduction, weights should still reflect the input weights + double total_weight = 0.0; + for (int i = 0; i < kv_test1.get_nkstot(); ++i) + { + total_weight += kv_test1.wk[i]; + } + // Weights should sum to approximately the number of original k-points (before normalization) + EXPECT_GT(total_weight, 0.0); + } + + // Test 2: Non-MP k-points with non-uniform custom weights + { + K_Vectors kv_test2; + std::string k_file = "./support/KPT_custom_weights"; + kv_test2.nspin = 1; + kv_test2.read_kpoints(ucell, k_file); + EXPECT_EQ(kv_test2.get_nkstot(), 5); + EXPECT_FALSE(kv_test2.is_mp); // Should be non-MP + + // Verify custom weights were read correctly + EXPECT_DOUBLE_EQ(kv_test2.wk[0], 0.1); + EXPECT_DOUBLE_EQ(kv_test2.wk[1], 0.2); + EXPECT_DOUBLE_EQ(kv_test2.wk[2], 0.3); + EXPECT_DOUBLE_EQ(kv_test2.wk[3], 0.2); + EXPECT_DOUBLE_EQ(kv_test2.wk[4], 0.2); + + // Store original weights + std::vector original_weights = kv_test2.wk; + double original_sum = 0.0; + for (double w : original_weights) + { + original_sum += w; + } + + // Apply IBZ reduction + std::string skpt; + ModuleSymmetry::Symmetry::symm_flag = 1; + bool match = true; + KVectorUtils::kvec_ibz_kpoint(kv_test2, symm, ModuleSymmetry::Symmetry::symm_flag, skpt, ucell, match); + + // After IBZ reduction, the weights should be based on the custom input weights, + // not uniform 1/nkstot weights. The total weight should be preserved. + double total_weight_after = 0.0; + for (int i = 0; i < kv_test2.get_nkstot(); ++i) + { + total_weight_after += kv_test2.wk[i]; + } + + // The sum of weights after IBZ reduction should equal the sum before + // (accounting for symmetry operations that may combine k-points) + EXPECT_NEAR(total_weight_after, original_sum, 1e-10); + + // Verify that at least one weight is NOT equal to 1/5 (which would indicate + // the bug where custom weights are overwritten with uniform weights) + bool has_custom_weight = false; + double uniform_weight = 1.0 / 5.0; + for (int i = 0; i < kv_test2.get_nkstot(); ++i) + { + if (std::abs(kv_test2.wk[i] - uniform_weight) > 1e-10) + { + has_custom_weight = true; + break; + } + } + EXPECT_TRUE(has_custom_weight) << "Custom weights were overwritten with uniform weights!"; + } + + // Test 3: MP grid (regression test - should still work correctly) + { + K_Vectors kv_test3; + std::string k_file = "./support/KPT1"; + kv_test3.nspin = 1; + kv_test3.read_kpoints(ucell, k_file); + EXPECT_EQ(kv_test3.get_nkstot(), 512); + EXPECT_TRUE(kv_test3.is_mp); // Should be MP + + // Apply IBZ reduction + std::string skpt; + ModuleSymmetry::Symmetry::symm_flag = 1; + bool match = true; + KVectorUtils::kvec_ibz_kpoint(kv_test3, symm, ModuleSymmetry::Symmetry::symm_flag, skpt, ucell, match); + + // For MP grids, all weights should be uniform after IBZ reduction + EXPECT_EQ(kv_test3.get_nkstot(), 35); // Known result from existing test + + // Verify weights sum correctly + double total_weight = 0.0; + for (int i = 0; i < kv_test3.get_nkstot(); ++i) + { + total_weight += kv_test3.wk[i]; + } + EXPECT_GT(total_weight, 0.0); + } + + // Test 4: Weight normalization verification + { + K_Vectors kv_test4; + std::string k_file = "./support/KPT_custom_weights"; + kv_test4.nspin = 1; + kv_test4.read_kpoints(ucell, k_file); + + // Apply IBZ reduction + std::string skpt; + ModuleSymmetry::Symmetry::symm_flag = 1; + bool match = true; + KVectorUtils::kvec_ibz_kpoint(kv_test4, symm, ModuleSymmetry::Symmetry::symm_flag, skpt, ucell, match); + + // Normalize weights + int degspin = (kv_test4.nspin == 2) ? 1 : 2; + kv_test4.normalize_wk(degspin); + + // After normalization, weights should sum to degspin + double total_weight = 0.0; + for (int i = 0; i < kv_test4.get_nkstot(); ++i) + { + total_weight += kv_test4.wk[i]; + } + EXPECT_NEAR(total_weight, degspin, 1e-10); + } + + GlobalV::ofs_running.close(); + ClearUcell(); + remove("tmp_klist_custom_weights"); +} + diff --git a/source/source_cell/test/klist_test_para.cpp b/source/source_cell/test/klist_test_para.cpp index 789e58e8e5..00b317ce8e 100644 --- a/source/source_cell/test/klist_test_para.cpp +++ b/source/source_cell/test/klist_test_para.cpp @@ -19,10 +19,10 @@ #include "source_cell/setup_nonlocal.h" #include "source_cell/unitcell.h" #include "source_estate/magnetism.h" -#include "source_pw/module_pwdft/VL_in_pw.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/berryphase.h" +#include "source_io/module_unk/berryphase.h" #undef private bool berryphase::berry_phase_flag = false; diff --git a/source/source_cell/test/read_atoms_helper_test.cpp b/source/source_cell/test/read_atoms_helper_test.cpp new file mode 100644 index 0000000000..1cd8084784 --- /dev/null +++ b/source/source_cell/test/read_atoms_helper_test.cpp @@ -0,0 +1,483 @@ +#include "gtest/gtest.h" +#include "gmock/gmock.h" +#include "../read_atoms_helper.h" +#include "source_base/vector3.h" +#include "source_base/matrix3.h" +#include +#include + +// Mock implementations for missing functions that are not in the linked sources +namespace elecstate { + bool read_orb_file(int it, std::string& orbital_file, std::ofstream& ofs_running, Atom* atom) { + // Mock implementation - just return true + return true; + } +} + +// Mock output class methods +void output::printM3(std::ofstream& ofs, const std::string& description, const ModuleBase::Matrix3& m) { + // Mock implementation +} + +void output::printrm(std::ofstream& ofs, const std::string& description, const ModuleBase::matrix& m, const double& limit) { + // Mock implementation +} + +// Mock InfoNonlocal class +InfoNonlocal::InfoNonlocal() {} +InfoNonlocal::~InfoNonlocal() {} + +// Mock Magnetism class +Magnetism::Magnetism() {} +Magnetism::~Magnetism() {} + +// Mock read_atom_positions function (we're testing the helpers, not the main function) +namespace unitcell { + bool read_atom_positions(UnitCell& ucell, std::ifstream& ifpos, + std::ofstream& ofs_running, std::ofstream& ofs_warning) { + // Mock implementation + return true; + } +} + +// Test fixture for read_atoms_helper tests +class ReadAtomsHelperTest : public ::testing::Test +{ +protected: + void SetUp() override + { + // Create temporary output streams + ofs_warning.open("test_warning.log"); + ofs_running.open("test_running.log"); + } + + void TearDown() override + { + ofs_warning.close(); + ofs_running.close(); + // Clean up temporary files + std::remove("test_warning.log"); + std::remove("test_running.log"); + } + + std::ofstream ofs_warning; + std::ofstream ofs_running; +}; + +// Test validate_coordinate_system function +TEST_F(ReadAtomsHelperTest, ValidateCoordinateSystem_ValidInputs) +{ + EXPECT_TRUE(unitcell::validate_coordinate_system("Direct", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_angstrom", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_au", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_angstrom_center_xy", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_angstrom_center_xz", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_angstrom_center_yz", ofs_warning)); + EXPECT_TRUE(unitcell::validate_coordinate_system("Cartesian_angstrom_center_xyz", ofs_warning)); +} + +TEST_F(ReadAtomsHelperTest, ValidateCoordinateSystem_InvalidInputs) +{ + EXPECT_FALSE(unitcell::validate_coordinate_system("Invalid", ofs_warning)); + EXPECT_FALSE(unitcell::validate_coordinate_system("direct", ofs_warning)); // case sensitive + EXPECT_FALSE(unitcell::validate_coordinate_system("", ofs_warning)); + EXPECT_FALSE(unitcell::validate_coordinate_system("Cartesian_angstrom_center", ofs_warning)); +} + +// Test calculate_lattice_center function +TEST_F(ReadAtomsHelperTest, CalculateLatticeCenterXY) +{ + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + auto center = unitcell::calculate_lattice_center(latvec, "xy"); + + EXPECT_DOUBLE_EQ(center.x, 5.0); + EXPECT_DOUBLE_EQ(center.y, 5.0); + EXPECT_DOUBLE_EQ(center.z, 0.0); +} + +TEST_F(ReadAtomsHelperTest, CalculateLatticeCenterXZ) +{ + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + auto center = unitcell::calculate_lattice_center(latvec, "xz"); + + EXPECT_DOUBLE_EQ(center.x, 5.0); + EXPECT_DOUBLE_EQ(center.y, 0.0); + EXPECT_DOUBLE_EQ(center.z, 5.0); +} + +TEST_F(ReadAtomsHelperTest, CalculateLatticeCenterYZ) +{ + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + auto center = unitcell::calculate_lattice_center(latvec, "yz"); + + EXPECT_DOUBLE_EQ(center.x, 0.0); + EXPECT_DOUBLE_EQ(center.y, 5.0); + EXPECT_DOUBLE_EQ(center.z, 5.0); +} + +TEST_F(ReadAtomsHelperTest, CalculateLatticeCenterXYZ) +{ + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + auto center = unitcell::calculate_lattice_center(latvec, "xyz"); + + EXPECT_DOUBLE_EQ(center.x, 5.0); + EXPECT_DOUBLE_EQ(center.y, 5.0); + EXPECT_DOUBLE_EQ(center.z, 5.0); +} + +TEST_F(ReadAtomsHelperTest, CalculateLatticeCenterNonCubic) +{ + ModuleBase::Matrix3 latvec; + latvec.e11 = 8.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 2.0; latvec.e22 = 6.0; latvec.e23 = 0.0; + latvec.e31 = 1.0; latvec.e32 = 1.0; latvec.e33 = 10.0; + + auto center = unitcell::calculate_lattice_center(latvec, "xyz"); + + EXPECT_DOUBLE_EQ(center.x, (8.0 + 2.0 + 1.0) / 2.0); + EXPECT_DOUBLE_EQ(center.y, (0.0 + 6.0 + 1.0) / 2.0); + EXPECT_DOUBLE_EQ(center.z, (0.0 + 0.0 + 10.0) / 2.0); +} + +// Test allocate_atom_properties function +TEST_F(ReadAtomsHelperTest, AllocateAtomProperties) +{ + Atom atom; + int na = 5; + double mass = 12.0; + + unitcell::allocate_atom_properties(atom, na, mass); + + EXPECT_EQ(atom.tau.size(), na); + EXPECT_EQ(atom.dis.size(), na); + EXPECT_EQ(atom.taud.size(), na); + EXPECT_EQ(atom.boundary_shift.size(), na); + EXPECT_EQ(atom.vel.size(), na); + EXPECT_EQ(atom.mbl.size(), na); + EXPECT_EQ(atom.mag.size(), na); + EXPECT_EQ(atom.angle1.size(), na); + EXPECT_EQ(atom.angle2.size(), na); + EXPECT_EQ(atom.m_loc_.size(), na); + EXPECT_EQ(atom.lambda.size(), na); + EXPECT_EQ(atom.constrain.size(), na); + EXPECT_DOUBLE_EQ(atom.mass, mass); +} + +// Test transform_atom_coordinates for Direct coordinates +TEST_F(ReadAtomsHelperTest, TransformAtomCoordinatesDirect) +{ + Atom atom; + atom.tau.resize(1); + atom.taud.resize(1); + + ModuleBase::Vector3 v(0.5, 0.5, 0.5); + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + double lat0 = 1.0; + ModuleBase::Vector3 latcenter; + + unitcell::transform_atom_coordinates(atom, 0, "Direct", v, latvec, lat0, latcenter); + + EXPECT_DOUBLE_EQ(atom.taud[0].x, 0.5); + EXPECT_DOUBLE_EQ(atom.taud[0].y, 0.5); + EXPECT_DOUBLE_EQ(atom.taud[0].z, 0.5); + EXPECT_DOUBLE_EQ(atom.tau[0].x, 5.0); + EXPECT_DOUBLE_EQ(atom.tau[0].y, 5.0); + EXPECT_DOUBLE_EQ(atom.tau[0].z, 5.0); +} + +// Test transform_atom_coordinates for Cartesian coordinates +TEST_F(ReadAtomsHelperTest, TransformAtomCoordinatesCartesian) +{ + Atom atom; + atom.tau.resize(1); + atom.taud.resize(1); + + ModuleBase::Vector3 v(5.0, 5.0, 5.0); + ModuleBase::Matrix3 latvec; + latvec.e11 = 10.0; latvec.e12 = 0.0; latvec.e13 = 0.0; + latvec.e21 = 0.0; latvec.e22 = 10.0; latvec.e23 = 0.0; + latvec.e31 = 0.0; latvec.e32 = 0.0; latvec.e33 = 10.0; + + double lat0 = 1.0; + ModuleBase::Vector3 latcenter; + + unitcell::transform_atom_coordinates(atom, 0, "Cartesian", v, latvec, lat0, latcenter); + + EXPECT_DOUBLE_EQ(atom.tau[0].x, 5.0); + EXPECT_DOUBLE_EQ(atom.tau[0].y, 5.0); + EXPECT_DOUBLE_EQ(atom.tau[0].z, 5.0); + EXPECT_DOUBLE_EQ(atom.taud[0].x, 0.5); + EXPECT_DOUBLE_EQ(atom.taud[0].y, 0.5); + EXPECT_DOUBLE_EQ(atom.taud[0].z, 0.5); +} + +// Test process_magnetization for nspin=2 +TEST_F(ReadAtomsHelperTest, ProcessMagnetizationNspin2) +{ + Atom atom; + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + + atom.mag[0] = 2.0; + atom.m_loc_[0].set(0, 0, 0); + + unitcell::process_magnetization(atom, 0, 0, 2, false, false, ofs_running); + + // For nspin=2, only z component should be set + EXPECT_DOUBLE_EQ(atom.m_loc_[0].x, 0.0); + EXPECT_DOUBLE_EQ(atom.m_loc_[0].y, 0.0); + EXPECT_DOUBLE_EQ(atom.m_loc_[0].z, 2.0); + EXPECT_DOUBLE_EQ(atom.mag[0], 2.0); +} + +// Test process_magnetization for nspin=4 with vector input +TEST_F(ReadAtomsHelperTest, ProcessMagnetizationNspin4VectorInput) +{ + Atom atom; + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + + atom.m_loc_[0].set(1.0, 1.0, 1.0); + atom.mag[0] = sqrt(3.0); + + // Set noncolin to true to allow non-collinear magnetization + // Note: This requires PARAM to be properly initialized + + unitcell::process_magnetization(atom, 0, 0, 4, true, false, ofs_running); + + // Angles should be calculated from vector components + EXPECT_GT(atom.angle1[0], 0.0); + EXPECT_GT(atom.angle2[0], 0.0); +} + +// Test process_magnetization with angle input +TEST_F(ReadAtomsHelperTest, ProcessMagnetizationAngleInput) +{ + Atom atom; + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + + atom.mag[0] = 2.0; + atom.angle1[0] = M_PI / 2.0; // 90 degrees + atom.angle2[0] = 0.0; + atom.m_loc_[0].set(0, 0, 0); + + // Note: For nspin=4, if noncolin is false (default), x and y components are zeroed + // So we test with nspin=2 instead to verify the angle calculation works + unitcell::process_magnetization(atom, 0, 0, 2, false, true, ofs_running); + + // For nspin=2, only z component is used, which should be mag[0] * cos(angle1) + // With angle1 = PI/2, cos(PI/2) = 0 + EXPECT_NEAR(atom.m_loc_[0].z, 0.0, 1e-10); + EXPECT_DOUBLE_EQ(atom.mag[0], atom.m_loc_[0].z); +} + +// Test parse_atom_properties with movement flags +TEST_F(ReadAtomsHelperTest, ParseAtomPropertiesMovementFlags) +{ + std::string input_str = "1.0 2.0 3.0 m 1 0 1\n"; + std::istringstream iss(input_str); + + // Create a temporary file for testing + std::ofstream temp_file("test_input.tmp"); + temp_file << input_str; + temp_file.close(); + + std::ifstream ifpos("test_input.tmp"); + + Atom atom; + atom.label = "C"; + atom.vel.resize(1); + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + atom.lambda.resize(1); + atom.constrain.resize(1); + + ModuleBase::Vector3 mv(1, 1, 1); + bool input_vec_mag = false; + bool input_angle_mag = false; + bool set_element_mag_zero = false; + + // Skip the position coordinates + double x, y, z; + ifpos >> x >> y >> z; + + bool result = unitcell::parse_atom_properties(ifpos, atom, 0, mv, + input_vec_mag, input_angle_mag, + set_element_mag_zero); + + EXPECT_TRUE(result); + EXPECT_EQ(mv.x, 1); + EXPECT_EQ(mv.y, 0); + EXPECT_EQ(mv.z, 1); + + ifpos.close(); + std::remove("test_input.tmp"); +} + +// Test parse_atom_properties with velocity +TEST_F(ReadAtomsHelperTest, ParseAtomPropertiesVelocity) +{ + std::string input_str = "1.0 2.0 3.0 v 0.1 0.2 0.3\n"; + + std::ofstream temp_file("test_input.tmp"); + temp_file << input_str; + temp_file.close(); + + std::ifstream ifpos("test_input.tmp"); + + Atom atom; + atom.label = "C"; + atom.vel.resize(1); + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + atom.lambda.resize(1); + atom.constrain.resize(1); + + ModuleBase::Vector3 mv(1, 1, 1); + bool input_vec_mag = false; + bool input_angle_mag = false; + bool set_element_mag_zero = false; + + // Skip the position coordinates + double x, y, z; + ifpos >> x >> y >> z; + + bool result = unitcell::parse_atom_properties(ifpos, atom, 0, mv, + input_vec_mag, input_angle_mag, + set_element_mag_zero); + + EXPECT_TRUE(result); + EXPECT_DOUBLE_EQ(atom.vel[0].x, 0.1); + EXPECT_DOUBLE_EQ(atom.vel[0].y, 0.2); + EXPECT_DOUBLE_EQ(atom.vel[0].z, 0.3); + + ifpos.close(); + std::remove("test_input.tmp"); +} + +// Test parse_atom_properties with scalar magnetization +TEST_F(ReadAtomsHelperTest, ParseAtomPropertiesScalarMag) +{ + std::string input_str = "1.0 2.0 3.0 mag 2.5\n"; + + std::ofstream temp_file("test_input.tmp"); + temp_file << input_str; + temp_file.close(); + + std::ifstream ifpos("test_input.tmp"); + + Atom atom; + atom.label = "C"; + atom.vel.resize(1); + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + atom.lambda.resize(1); + atom.constrain.resize(1); + + ModuleBase::Vector3 mv(1, 1, 1); + bool input_vec_mag = false; + bool input_angle_mag = false; + bool set_element_mag_zero = false; + + // Skip the position coordinates + double x, y, z; + ifpos >> x >> y >> z; + + bool result = unitcell::parse_atom_properties(ifpos, atom, 0, mv, + input_vec_mag, input_angle_mag, + set_element_mag_zero); + + EXPECT_TRUE(result); + EXPECT_DOUBLE_EQ(atom.mag[0], 2.5); + EXPECT_TRUE(set_element_mag_zero); + EXPECT_FALSE(input_vec_mag); + + ifpos.close(); + std::remove("test_input.tmp"); +} + +// Test parse_atom_properties with vector magnetization +TEST_F(ReadAtomsHelperTest, ParseAtomPropertiesVectorMag) +{ + std::string input_str = "1.0 2.0 3.0 mag 1.0 2.0 3.0\n"; + + std::ofstream temp_file("test_input.tmp"); + temp_file << input_str; + temp_file.close(); + + std::ifstream ifpos("test_input.tmp"); + + Atom atom; + atom.label = "C"; + atom.vel.resize(1); + atom.mag.resize(1); + atom.m_loc_.resize(1); + atom.angle1.resize(1); + atom.angle2.resize(1); + atom.lambda.resize(1); + atom.constrain.resize(1); + + ModuleBase::Vector3 mv(1, 1, 1); + bool input_vec_mag = false; + bool input_angle_mag = false; + bool set_element_mag_zero = false; + + // Skip the position coordinates + double x, y, z; + ifpos >> x >> y >> z; + + bool result = unitcell::parse_atom_properties(ifpos, atom, 0, mv, + input_vec_mag, input_angle_mag, + set_element_mag_zero); + + EXPECT_TRUE(result); + EXPECT_DOUBLE_EQ(atom.m_loc_[0].x, 1.0); + EXPECT_DOUBLE_EQ(atom.m_loc_[0].y, 2.0); + EXPECT_DOUBLE_EQ(atom.m_loc_[0].z, 3.0); + EXPECT_NEAR(atom.mag[0], sqrt(1.0 + 4.0 + 9.0), 1e-10); + EXPECT_TRUE(input_vec_mag); + EXPECT_TRUE(set_element_mag_zero); + + ifpos.close(); + std::remove("test_input.tmp"); +} + +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/source/source_cell/test/support/KPT_custom_weights b/source/source_cell/test/support/KPT_custom_weights new file mode 100644 index 0000000000..e441560a1b --- /dev/null +++ b/source/source_cell/test/support/KPT_custom_weights @@ -0,0 +1,8 @@ +K_POINTS +5 +Direct +0.0 0.0 0.0 0.1 +0.5 0.0 0.0 0.2 +0.0 0.5 0.0 0.3 +0.5 0.5 0.0 0.2 +0.0 0.0 0.5 0.2 diff --git a/source/source_cell/test/unitcell_test.cpp b/source/source_cell/test/unitcell_test.cpp index d0f55c76e1..fd93346137 100644 --- a/source/source_cell/test/unitcell_test.cpp +++ b/source/source_cell/test/unitcell_test.cpp @@ -263,39 +263,9 @@ TEST_F(UcellTest, Setup) } } -TEST_F(UcellDeathTest, SetupWarningQuit1) -{ - std::string latname_in = "bcc"; - int ntype_in = 1; - int lmaxmax_in = 2; - bool init_vel_in = false; - PARAM.input.relax_new = false; - std::string fixed_axes_in = "volume"; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ucell->setup(latname_in, ntype_in, lmaxmax_in, init_vel_in, fixed_axes_in), - ::testing::ExitedWithCode(1), - ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, - testing::HasSubstr( - "there are bugs in the old implementation; set relax_new to be 1 for fixed_volume relaxation")); -} - -TEST_F(UcellDeathTest, SetupWarningQuit2) -{ - std::string latname_in = "bcc"; - int ntype_in = 1; - int lmaxmax_in = 2; - bool init_vel_in = false; - PARAM.input.relax_new = false; - std::string fixed_axes_in = "shape"; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ucell->setup(latname_in, ntype_in, lmaxmax_in, init_vel_in, fixed_axes_in), - ::testing::ExitedWithCode(1), - ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("set relax_new to be 1 for fixed_shape relaxation")); -} +// These tests are removed because fixed_axes="volume" and fixed_axes="shape" +// are now supported with relax_new=false (see commit cdc3457f5a8546cda869655c3faabd8b29687aff) +// The old implementation now properly handles these constraints via post-update enforcement TEST_F(UcellDeathTest, CompareAatomLabel) { @@ -1120,27 +1090,14 @@ TEST_F(UcellTest, ReadOrbFile) std::string orb_file = "./support/C.orb"; std::ofstream ofs_running; ofs_running.open("tmp_readorbfile"); - elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0])); + bool result = elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0])); + ofs_running << " result=" << result << std::endl; + EXPECT_TRUE(result); ofs_running.close(); EXPECT_EQ(ucell->atoms[0].nw, 25); remove("tmp_readorbfile"); } -TEST_F(UcellDeathTest, ReadOrbFileWarning) -{ - UcellTestPrepare utp = UcellTestLib["C1H2-Read"]; - PARAM.input.relax_new = utp.relax_new; - ucell = utp.SetUcellInfo(); - std::string orb_file = "./support/CC.orb"; - std::ofstream ofs_running; - ofs_running.open("tmp_readorbfile"); - testing::internal::CaptureStdout(); - EXPECT_EXIT(elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0])), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("ABACUS Cannot find the ORBITAL file")); - ofs_running.close(); - remove("tmp_readorbfile"); -} class UcellTestReadStru : public ::testing::Test { protected: @@ -1917,3 +1874,21 @@ TEST_F(UcellTestReadStru, ReadAtomPositionsWarning5) remove("read_atom_positions.warn"); } #endif +TEST_F(UcellTest, ReadOrbFileWarning) +{ + UcellTestPrepare utp = UcellTestLib["C1H2-Read"]; + PARAM.input.relax_new = utp.relax_new; + ucell = utp.SetUcellInfo(); + std::string orb_file = "./support/CC.orb"; + std::ofstream ofs_running; + ofs_running.open("tmp_readorbfilewarning"); + testing::internal::CaptureStdout(); + bool result = elecstate::read_orb_file(0, orb_file, ofs_running, &(ucell->atoms[0])); + output = testing::internal::GetCapturedStdout(); + ofs_running << output << std::endl; + EXPECT_FALSE(result); + EXPECT_THAT(output, testing::HasSubstr("Element index 1")); + EXPECT_THAT(output, testing::HasSubstr("orbital file: ./support/CC.orb")); + ofs_running.close(); + remove("tmp_readorbfilewarning"); +} diff --git a/source/source_cell/test/unitcell_test_para.cpp b/source/source_cell/test/unitcell_test_para.cpp index 81f0a65055..ca6b3bad1f 100644 --- a/source/source_cell/test/unitcell_test_para.cpp +++ b/source/source_cell/test/unitcell_test_para.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include "gmock/gmock.h" #include "gtest/gtest.h" #define private public @@ -249,12 +252,17 @@ TEST_F(UcellTest, ReadPseudo) ifs.open("./H/H.NONLOCAL"); EXPECT_TRUE(ifs.good()); ifs.close(); - std::string command1 = "test -d C && rm -rf C"; - std::string command2 = "test -d H && rm -rf H"; - auto error1 = std::system(command1.c_str()); - EXPECT_EQ(error1, 0); - auto error2 = std::system(command2.c_str()); - EXPECT_EQ(error2, 0); + + struct stat st; + int ret1 = stat("C", &st); + EXPECT_EQ(ret1, 0); + EXPECT_TRUE(S_ISDIR(st.st_mode)); + rmdir("C"); + + int ret2 = stat("H", &st); + EXPECT_EQ(ret2, 0); + EXPECT_TRUE(S_ISDIR(st.st_mode)); + rmdir("H"); } // read_cell_pseudopots EXPECT_FALSE(ucell->atoms[0].ncpp.has_so); diff --git a/source/source_cell/test_pw/CMakeLists.txt b/source/source_cell/test_pw/CMakeLists.txt index 68818a25ca..9bcfd02210 100644 --- a/source/source_cell/test_pw/CMakeLists.txt +++ b/source/source_cell/test_pw/CMakeLists.txt @@ -10,12 +10,12 @@ install(FILES unitcell_test_pw_para.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) AddTest( TARGET MODULE_CELL_unitcell_test_pw LIBS parameter ${math_libs} base device - SOURCES unitcell_test_pw.cpp ../unitcell.cpp ../read_atoms.cpp ../atom_spec.cpp ../update_cell.cpp ../bcast_cell.cpp + SOURCES unitcell_test_pw.cpp ../unitcell.cpp ../read_atoms.cpp ../read_atoms_helper.cpp ../atom_spec.cpp ../update_cell.cpp ../bcast_cell.cpp ../atom_pseudo.cpp ../pseudo.cpp ../read_pp.cpp ../read_pp_complete.cpp ../read_pp_upf201.cpp ../read_pp_upf100.cpp ../read_stru.cpp ../read_atom_species.cpp - ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/output.cpp + ../read_pp_vwr.cpp ../read_pp_blps.cpp ../../source_io/module_output/output.cpp ../../source_estate/read_pseudo.cpp ../../source_estate/cal_nelec_nband.cpp - ../../source_estate/read_orb.cpp ../../source_cell/print_cell.cpp + ../../source_estate/read_orb.cpp ../print_cell.cpp ../../source_estate/cal_wfc.cpp ../sep.cpp ../sep_cell.cpp ) diff --git a/source/source_cell/unitcell.cpp b/source/source_cell/unitcell.cpp index e79a4206e8..bae4b1b2dd 100644 --- a/source/source_cell/unitcell.cpp +++ b/source/source_cell/unitcell.cpp @@ -428,18 +428,7 @@ void UnitCell::setup(const std::string& latname_in, this->lc[0] = 1; this->lc[1] = 1; this->lc[2] = 1; - if (!PARAM.inp.relax_new) { - ModuleBase::WARNING_QUIT( - "Input", - "there are bugs in the old implementation; set relax_new to be " - "1 for fixed_volume relaxation"); - } } else if (fixed_axes_in == "shape") { - if (!PARAM.inp.relax_new) { - ModuleBase::WARNING_QUIT( - "Input", - "set relax_new to be 1 for fixed_shape relaxation"); - } this->lc[0] = 1; this->lc[1] = 1; this->lc[2] = 1; diff --git a/source/source_cell/unitcell.h b/source/source_cell/unitcell.h index fb58adf6f2..4b0e702a67 100644 --- a/source/source_cell/unitcell.h +++ b/source/source_cell/unitcell.h @@ -5,7 +5,7 @@ #include "source_base/global_variable.h" #include "source_cell/sep_cell.h" #include "source_estate/magnetism.h" -#include "source_io/output.h" +#include "source_io/module_output/output.h" #include "module_symmetry/symmetry.h" #ifdef __LCAO diff --git a/source/source_cell/update_cell.cpp b/source/source_cell/update_cell.cpp index 6a5c487581..9af676139d 100644 --- a/source/source_cell/update_cell.cpp +++ b/source/source_cell/update_cell.cpp @@ -482,6 +482,7 @@ void periodic_boundary_adjustment(Atom* atoms, for (int it = 0; it < ntype; it++) { Atom* atom = &atoms[it]; + atom->boundary_shift.assign(atom->na, {0,0,0}); for (int ia = 0; ia < atom->na; ia++) { // mohan update 2011-03-21 @@ -489,10 +490,12 @@ void periodic_boundary_adjustment(Atom* atoms, { if (atom->taud[ia][ik] < 0) { + atom->boundary_shift[ia][ik] += 1; atom->taud[ia][ik] += 1.0; } if (atom->taud[ia][ik] >= 1.0) { + atom->boundary_shift[ia][ik] -= 1; atom->taud[ia][ik] -= 1.0; } } diff --git a/source/source_esolver/CMakeLists.txt b/source/source_esolver/CMakeLists.txt index 787982d555..4a83a9e9a1 100644 --- a/source/source_esolver/CMakeLists.txt +++ b/source/source_esolver/CMakeLists.txt @@ -29,8 +29,8 @@ add_library( esolver OBJECT ${objects} - ../source_pw/module_pwdft/module_exx_helper/exx_helper.cpp - ../source_pw/module_pwdft/module_exx_helper/exx_helper.h + ../source_pw/module_pwdft/exx_helper.cpp + ../source_pw/module_pwdft/exx_helper.h ) if(ENABLE_COVERAGE) diff --git a/source/source_esolver/esolver.cpp b/source/source_esolver/esolver.cpp index 50fdb97be7..4809c6df77 100644 --- a/source/source_esolver/esolver.cpp +++ b/source/source_esolver/esolver.cpp @@ -206,41 +206,45 @@ ESolver* init_esolver(const Input_para& inp, UnitCell& ucell) return new ESolver_GetS(); } } - if (PARAM.globalv.gamma_only_local) + else if (PARAM.inp.deepks_out_base != "none") { - if (PARAM.inp.deepks_out_base != "none") + if (PARAM.globalv.gamma_only_local) { return new ESolver_DoubleXC(); } + else if (PARAM.inp.nspin < 4) + { + return new ESolver_DoubleXC, double>(); + } else { - return new ESolver_KS_LCAO(); + return new ESolver_DoubleXC, std::complex>(); } } - else if (PARAM.inp.nspin < 4) + else if (PARAM.inp.dm_to_rho) { - if (PARAM.inp.dm_to_rho) + if (PARAM.globalv.gamma_only_local) { - return new ESolver_DM2rho, double>(); + ModuleBase::WARNING_QUIT("ESolver", "dm_to_rho is not implemented for gamma_only"); } - else if (PARAM.inp.deepks_out_base != "none") + else if (PARAM.inp.nspin < 4) { - return new ESolver_DoubleXC, double>(); + return new ESolver_DM2rho, double>(); } else { - return new ESolver_KS_LCAO, double>(); + return new ESolver_DM2rho, std::complex>(); } } else { - if (PARAM.inp.dm_to_rho) + if (PARAM.globalv.gamma_only_local) { - return new ESolver_DM2rho, std::complex>(); + return new ESolver_KS_LCAO(); } - else if (PARAM.inp.deepks_out_base != "none") + else if (PARAM.inp.nspin < 4) { - return new ESolver_DoubleXC, std::complex>(); + return new ESolver_KS_LCAO, double>(); } else { @@ -307,23 +311,23 @@ ESolver* init_esolver(const Input_para& inp, UnitCell& ucell) // of LR-TDDFT is implemented. std::cout << " PREPARING FOR EXCITED STATES." << std::endl; // initialize the 2nd ESolver_LR at the temporary pointer - ModuleESolver::ESolver* p_esolver_lr = nullptr; - if (PARAM.globalv.gamma_only_local) - { - p_esolver_lr = new LR::ESolver_LR( - std::move(*dynamic_cast*>(p_esolver)), - inp, - ucell); - } - else - { - p_esolver_lr = new LR::ESolver_LR, double>( - std::move(*dynamic_cast, double>*>(p_esolver)), - inp, - ucell); - } - // clean the 1st ESolver_KS and swap the pointer - ModuleESolver::clean_esolver(p_esolver, false); // do not call Cblacs_exit, remain it for the 2nd ESolver + ModuleESolver::ESolver* p_esolver_lr = nullptr; + if (PARAM.globalv.gamma_only_local) + { + p_esolver_lr = new LR::ESolver_LR( + std::move(*dynamic_cast*>(p_esolver)), + inp, + ucell); + } + else + { + p_esolver_lr = new LR::ESolver_LR, double>( + std::move(*dynamic_cast, double>*>(p_esolver)), + inp, + ucell); + } + // clean the 1st ESolver_KS and swap the pointer + delete p_esolver; return p_esolver_lr; } #endif @@ -351,20 +355,5 @@ ESolver* init_esolver(const Input_para& inp, UnitCell& ucell) + " line " + std::to_string(__LINE__)); } -void clean_esolver(ESolver*& pesolver, const bool lcao_cblacs_exit) -{ -// Zhang Xiaoyang modified in 2024/7/6: -// Note: because of the init method of serial lcao hsolver -// it needs no release step for it, or this [delete] will cause Segmentation Fault -// Probably it will be modified later. -#ifdef __MPI - delete pesolver; -#ifdef __LCAO - if (lcao_cblacs_exit) - { - Cblacs_exit(1); - } -#endif -#endif -} + } // namespace ModuleESolver diff --git a/source/source_esolver/esolver.h b/source/source_esolver/esolver.h index 6716ea0c96..dd621cfe15 100644 --- a/source/source_esolver/esolver.h +++ b/source/source_esolver/esolver.h @@ -69,7 +69,7 @@ std::string determine_type(); */ ESolver* init_esolver(const Input_para& inp, UnitCell& ucell); -void clean_esolver(ESolver*& pesolver, const bool lcao_cblacs_exit = false); + } // namespace ModuleESolver diff --git a/source/source_esolver/esolver_dm2rho.cpp b/source/source_esolver/esolver_dm2rho.cpp index 07b458206e..1ddac414f0 100644 --- a/source/source_esolver/esolver_dm2rho.cpp +++ b/source/source_esolver/esolver_dm2rho.cpp @@ -7,9 +7,10 @@ #include "source_lcao/LCAO_domain.h" #include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" -#include "source_io/cube_io.h" -#include "source_io/io_npz.h" -#include "source_io/print_info.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_ml/io_npz.h" +#include "source_io/module_output/print_info.h" +#include "source_lcao/rho_tau_lcao.h" // mohan add 2025-10-24 namespace ModuleESolver { @@ -47,19 +48,20 @@ void ESolver_DM2rho::runner(UnitCell& ucell, const int istep) // file name of DM std::string zipname = "output_DM0.npz"; - elecstate::DensityMatrix* dm = dynamic_cast*>(this->pelec)->get_DM(); // read DM from file - ModuleIO::read_mat_npz(&(this->pv), ucell, zipname, *(dm->get_DMR_pointer(1))); + ModuleIO::read_mat_npz(&(this->pv), ucell, zipname, *(this->dmat.dm->get_DMR_pointer(1))); // if nspin=2, need extra reading if (PARAM.inp.nspin == 2) { zipname = "output_DM1.npz"; - ModuleIO::read_mat_npz(&(this->pv), ucell, zipname, *(dm->get_DMR_pointer(2))); + ModuleIO::read_mat_npz(&(this->pv), ucell, zipname, *(this->dmat.dm->get_DMR_pointer(2))); } - this->pelec->psiToRho(*this->psi); + // it's dangerous to design psiToRho function like this, mohan note 20251024 + // this->pelec->psiToRho(*this->psi); + LCAO_domain::dm2rho(this->dmat.dm->get_DMR_vector(), PARAM.inp.nspin, &this->chr); int nspin0 = PARAM.inp.nspin == 2 ? 2 : 1; diff --git a/source/source_esolver/esolver_double_xc.cpp b/source/source_esolver/esolver_double_xc.cpp index 0174331a04..db65655e0b 100644 --- a/source/source_esolver/esolver_double_xc.cpp +++ b/source/source_esolver/esolver_double_xc.cpp @@ -14,7 +14,7 @@ #include "source_lcao/hamilt_lcao.h" #include "source_hsolver/hsolver_lcao.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/write_HS.h" // use ModuleIO::write_hsk() +#include "source_io/module_hs/write_HS.h" // use ModuleIO::write_hsk() #include "source_lcao/setup_deepks.h" // use deepks, mohan add 2025-10-10 namespace ModuleESolver @@ -51,7 +51,6 @@ void ESolver_DoubleXC::before_all_runners(UnitCell& ucell, const Input_p this->pelec_base = new elecstate::ElecStateLCAO(&(this->chr_base), // use which parameter? &(this->kv), this->kv.get_nks(), - this->pw_rho, this->pw_big); } @@ -84,11 +83,14 @@ void ESolver_DoubleXC::before_all_runners(UnitCell& ucell, const Input_p } // 6) initialize the density matrix - dynamic_cast*>(this->pelec_base)->init_DM(&this->kv, &(this->pv), PARAM.inp.nspin); + this->dmat_base.allocate_dm(&this->kv, &this->pv, PARAM.inp.nspin); // 10) inititlize the charge density - this->chr_base.allocate(PARAM.inp.nspin); - this->pelec_base->omega = ucell.omega; + this->chr_base.set_rhopw(this->pw_rhod); // mohan add 20251130 + const bool kin_den = this->chr_base.kin_density(); // mohan add 20251202 + this->chr_base.allocate(PARAM.inp.nspin, kin_den); + this->chr_base.init_rho(ucell, this->Pgrid, this->sf.strucFac, ucell.symm, &this->kv); + this->chr_base.check_rho(); // 11) initialize the potential if (this->pelec_base->pot == nullptr) @@ -114,7 +116,6 @@ void ESolver_DoubleXC::before_scf(UnitCell& ucell, const int istep) ESolver_KS_LCAO::before_scf(ucell, istep); - this->pelec_base->omega = ucell.omega; //---------------------------------------------------------- //! calculate D2 or D3 vdW //---------------------------------------------------------- @@ -140,8 +141,6 @@ void ESolver_DoubleXC::before_scf(UnitCell& ucell, const int istep) } if (this->p_hamilt_base == nullptr) { - elecstate::DensityMatrix* DM = dynamic_cast*>(this->pelec_base)->get_DM(); - this->p_hamilt_base = new hamilt::HamiltLCAO( ucell, this->gd, @@ -150,30 +149,23 @@ void ESolver_DoubleXC::before_scf(UnitCell& ucell, const int istep) this->kv, this->two_center_bundle_, this->orb_, - DM, - this->deepks -#ifdef __EXX - , - istep, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->two_level_step : &this->exx_nao.exc->two_level_step, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->get_Hexxs() : nullptr, - GlobalC::exx_info.info_ri.real_number ? nullptr : &this->exx_nao.exc->get_Hexxs() -#endif - ); - } + this->dmat_base.dm, + &this->dftu, + this->deepks, + istep, + this->exx_nao); + } XC_Functional::set_xc_type(PARAM.inp.deepks_out_base); - this->pelec_base->init_scf(istep, ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); + this->pelec_base->init_scf(ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); // DMR should be same size with Hamiltonian(R) - dynamic_cast*>(this->pelec_base) - ->get_DM() - ->init_DMR(*(dynamic_cast*>(this->p_hamilt_base)->getHR())); + this->dmat_base.dm->init_DMR(*(dynamic_cast*>(this->p_hamilt_base)->getHR())); if (istep > 0) { - dynamic_cast*>(this->pelec_base)->get_DM()->cal_DMR(); + this->dmat_base.dm->cal_DMR(); } ModuleBase::timer::tick("ESolver_DoubleXC", "before_scf"); @@ -234,23 +226,23 @@ void ESolver_DoubleXC::iter_finish(UnitCell& ucell, const int istep, int std::shared_ptr> ld_shared_ptr(&this->deepks.ld, [](LCAO_Deepks*) {}); LCAO_Deepks_Interface deepks_interface(ld_shared_ptr); - deepks_interface.out_deepks_labels(this->pelec->f_en.etot, - this->kv.get_nks(), - ucell.nat, - PARAM.globalv.nlocal, - this->pelec->ekb, - this->kv.kvec_d, - ucell, - this->orb_, - this->gd, - &(this->pv), - *(this->psi), - dynamic_cast*>(this->pelec)->get_DM(), - p_ham_deepks, - iter, - conv_esolver, - GlobalV::MY_RANK, - GlobalV::ofs_running); + deepks_interface.out_deepks_labels(this->pelec->f_en.etot, + this->kv.get_nks(), + ucell.nat, + PARAM.globalv.nlocal, + this->pelec->ekb, + this->kv.kvec_d, + ucell, + this->orb_, + this->gd, + &(this->pv), + *(this->psi), + this->dmat.dm, + p_ham_deepks, + iter, + conv_esolver, + GlobalV::MY_RANK, + GlobalV::ofs_running); #endif // restore to density after charge mixing @@ -360,9 +352,12 @@ void ESolver_DoubleXC::iter_finish(UnitCell& ucell, const int istep, int auto _pes_lcao = dynamic_cast*>(this->pelec); for (int ik = 0; ik < nks; ik++) { - _pes_lcao_base->get_DM()->set_DMK_pointer(ik, _pes_lcao->get_DM()->get_DMK_pointer(ik)); +// mohan update 2025-11-03 + this->dmat_base.dm->set_DMK_pointer(ik, this->dmat.dm->get_DMK_pointer(ik)); +// _pes_lcao_base->get_DM()->set_DMK_pointer(ik, _pes_lcao->get_DM()->get_DMK_pointer(ik)); } - _pes_lcao_base->get_DM()->cal_DMR(); + this->dmat_base.dm->cal_DMR(); +// _pes_lcao_base->get_DM()->cal_DMR(); _pes_lcao_base->ekb = _pes_lcao->ekb; _pes_lcao_base->wg = _pes_lcao->wg; } @@ -394,6 +389,7 @@ void ESolver_DoubleXC::cal_force(UnitCell& ucell, ModuleBase::matrix& fo this->gd, this->pv, this->pelec_base, + this->dmat_base, // mohan add 2025-11-03 this->psi, this->two_center_bundle_, this->orb_, @@ -404,6 +400,7 @@ void ESolver_DoubleXC::cal_force(UnitCell& ucell, ModuleBase::matrix& fo this->kv, this->pw_rho, this->solvent, + this->dftu, this->deepks, this->exx_nao, &ucell.symm); diff --git a/source/source_esolver/esolver_double_xc.h b/source/source_esolver/esolver_double_xc.h index 591411c82d..bff9e28bc7 100644 --- a/source/source_esolver/esolver_double_xc.h +++ b/source/source_esolver/esolver_double_xc.h @@ -32,6 +32,9 @@ class ESolver_DoubleXC : public ESolver_KS_LCAO //! Electronic states elecstate::ElecState* pelec_base = nullptr; + //! Density Matrix, mohan add 2025-11-03 + LCAO_domain::Setup_DM dmat_base; + //! Electorn charge density Charge chr_base; }; diff --git a/source/source_esolver/esolver_dp.cpp b/source/source_esolver/esolver_dp.cpp index 50ab8b0e78..2cabd668b6 100644 --- a/source/source_esolver/esolver_dp.cpp +++ b/source/source_esolver/esolver_dp.cpp @@ -21,8 +21,8 @@ #include "source_base/parallel_common.h" #include "source_base/timer.h" -#include "source_io/output_log.h" -#include "source_io/cif_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_output/cif_io.h" #include #include diff --git a/source/source_esolver/esolver_fp.cpp b/source/source_esolver/esolver_fp.cpp index b098068e14..238c093580 100644 --- a/source/source_esolver/esolver_fp.cpp +++ b/source/source_esolver/esolver_fp.cpp @@ -5,19 +5,19 @@ #include "source_estate/read_pseudo.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" #include "source_hamilt/module_vdw/vdw.h" -#include "source_io/cif_io.h" -#include "source_io/cube_io.h" // use write_vdata_palgrid -#include "source_io/json_output/init_info.h" -#include "source_io/json_output/output_info.h" -#include "source_io/output_log.h" -#include "source_io/print_info.h" -#include "source_io/rhog_io.h" +#include "source_io/module_output/cif_io.h" +#include "source_io/module_output/cube_io.h" // use write_vdata_palgrid +#include "source_io/module_json/init_info.h" +#include "source_io/module_json/output_info.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_output/print_info.h" +#include "source_io/module_chgpot/rhog_io.h" #include "source_io/module_parameter/parameter.h" #include "source_pw/module_pwdft/setup_pwrho.h" // mohan 20251005 #include "source_hamilt/module_xc/xc_functional.h" // mohan 20251005 -#include "source_io/ctrl_output_fp.h" -#include "source_io/write_init.h" // write_chg_init, write_pot_init +#include "source_io/module_ctrl/ctrl_output_fp.h" +#include "source_io/module_chgpot/write_init.h" // write_chg_init, write_pot_init namespace ModuleESolver { @@ -41,26 +41,57 @@ void ESolver_FP::before_all_runners(UnitCell& ucell, const Input_para& inp) { ModuleBase::TITLE("ESolver_FP", "before_all_runners"); - //! read pseudopotentials + //! 1) read pseudopotentials elecstate::read_pseudo(GlobalV::ofs_running, ucell); - // setup pw_rho, pw_rhod, pw_big, sf, and read_pseudopotentials + //! 2) setup pw_rho, pw_rhod, pw_big, sf, and read_pseudopotentials pw::setup_pwrho(ucell, PARAM.globalv.double_grid, this->pw_rho_flag, - this->pw_rho, this->pw_rhod, this->pw_big, - this->classname, inp); + this->pw_rho, this->pw_rhod, this->pw_big, this->classname, inp); - // setup structure factors + //! 3) setup structure factors this->sf.set(this->pw_rhod, inp.nbspline); - // write geometry file + //! 4) write geometry file ModuleIO::CifParser::write(PARAM.globalv.global_out_dir + "STRU.cif", - ucell, - "# Generated by ABACUS ModuleIO::CifParser", - "data_?"); + ucell, "# Generated by ABACUS ModuleIO::CifParser", "data_?"); - // init charge extrapolation + //! 5) init charge extrapolation this->CE.Init_CE(inp.nspin, ucell.nat, this->pw_rhod->nrxx, inp.chg_extrap); + //! 6) symmetry analysis should be performed every time the cell is changed + if (ModuleSymmetry::Symmetry::symm_flag == 1) + { + ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); + } + + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SETUP UNITCELL"); + + //! 7) setup k points in the Brillouin zone according to symmetry. + this->kv.set(ucell,ucell.symm, inp.kpoint_file, inp.nspin, ucell.G, ucell.latvec, GlobalV::ofs_running); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); + + //! 8) print information + ModuleIO::print_parameters(ucell, this->kv, inp); + + //! 9) parallel of FFT grid + this->Pgrid.init(this->pw_rhod->nx, this->pw_rhod->ny, this->pw_rhod->nz, + this->pw_rhod->nplane, this->pw_rhod->nrxx, pw_big->nbz, pw_big->bz); + + //! 10) calculate the structure factor + this->sf.setup(&ucell, Pgrid, this->pw_rhod); + + //! 11) setup the xc functional + XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); + GlobalV::ofs_running<chr.set_rhopw(this->pw_rhod); // mohan add 20251130 + const bool kin_den = this->chr.kin_density(); // mohan add 20251202 + this->chr.allocate(inp.nspin, kin_den); // mohan move this from setup_estate_pw, 20251128 + + return; } @@ -108,8 +139,6 @@ void ESolver_FP::before_scf(UnitCell& ucell, const int istep) this->locpp.init_vloc(ucell, this->pw_rhod); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "LOCAL POTENTIAL"); - this->pelec->omega = ucell.omega; - // perform symmetry analysis if (ModuleSymmetry::Symmetry::symm_flag == 1) { @@ -165,7 +194,7 @@ void ESolver_FP::iter_finish(UnitCell& ucell, const int istep, int& iter, bool& this->pw_rhod->real2recip(this->chr.rho_save[is], this->chr.rhog_save[is]); } ModuleIO::write_rhog(PARAM.globalv.global_out_dir + PARAM.inp.suffix + "-CHARGE-DENSITY.restart", - PARAM.globalv.gamma_only_pw || PARAM.globalv.gamma_only_local, + PARAM.globalv.gamma_only_pw, this->pw_rhod, PARAM.inp.nspin, ucell.GT, @@ -184,7 +213,7 @@ void ESolver_FP::iter_finish(UnitCell& ucell, const int istep, int& iter, bool& this->pw_rhod->real2recip(this->chr.kin_r_save[is], kin_g[is]); } ModuleIO::write_rhog(PARAM.globalv.global_out_dir + PARAM.inp.suffix + "-TAU-DENSITY.restart", - PARAM.globalv.gamma_only_pw || PARAM.globalv.gamma_only_local, + PARAM.globalv.gamma_only_pw, this->pw_rhod, PARAM.inp.nspin, ucell.GT, diff --git a/source/source_esolver/esolver_fp.h b/source/source_esolver/esolver_fp.h index b2bb8f065e..9edf4f3367 100644 --- a/source/source_esolver/esolver_fp.h +++ b/source/source_esolver/esolver_fp.h @@ -3,16 +3,14 @@ #include "esolver.h" -#ifndef __MPI -#include -#endif +#include "source_base/timer_wrapper.h" #include "source_basis/module_pw/pw_basis.h" // plane wave basis #include "source_cell/module_symmetry/symmetry.h" // symmetry analysis #include "source_estate/elecstate.h" // electronic states #include "source_estate/module_charge/charge_extra.h" // charge extrapolation #include "source_hamilt/module_surchem/surchem.h" // solvation model -#include "source_pw/module_pwdft/VL_in_pw.h" // local pseudopotential +#include "source_pw/module_pwdft/vl_pw.h" // local pseudopotential #include "source_pw/module_pwdft/structure_factor.h" // structure factor #include @@ -83,11 +81,7 @@ class ESolver_FP: public ESolver bool pw_rho_flag = false; ///< flag for pw_rho, 0: not initialized, 1: initialized //! the start time of scf iteration - #ifdef __MPI - double iter_time; - #else - std::chrono::system_clock::time_point iter_time; - #endif + ModuleBase::TimePoint iter_time; }; } // namespace ModuleESolver diff --git a/source/source_esolver/esolver_gets.cpp b/source/source_esolver/esolver_gets.cpp index 4e79849367..7eff0f537a 100644 --- a/source/source_esolver/esolver_gets.cpp +++ b/source/source_esolver/esolver_gets.cpp @@ -7,9 +7,9 @@ #include "source_lcao/LCAO_domain.h" #include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" -#include "source_io/cal_r_overlap_R.h" -#include "source_io/print_info.h" -#include "source_io/write_HS_R.h" +#include "source_io/module_hs/cal_r_overlap_R.h" +#include "source_io/module_output/print_info.h" +#include "source_io/module_hs/write_HS_R.h" namespace ModuleESolver { @@ -53,7 +53,6 @@ void ESolver_GetS::before_all_runners(UnitCell& ucell, const Input_para& inp) this->pelec = new elecstate::ElecStateLCAO>(&(this->chr), // use which parameter? &(this->kv), this->kv.get_nks(), - this->pw_rho, this->pw_big); } diff --git a/source/source_esolver/esolver_gets.h b/source/source_esolver/esolver_gets.h index a0d163ef4d..564fd55035 100644 --- a/source/source_esolver/esolver_gets.h +++ b/source/source_esolver/esolver_gets.h @@ -37,7 +37,7 @@ class ESolver_GetS : public ESolver_KS> TwoCenterBundle two_center_bundle_; - // temporary introduced during removing GlobalC::ORB + // temporary introduced LCAO_Orbitals orb_; }; } // namespace ModuleESolver diff --git a/source/source_esolver/esolver_ks.cpp b/source/source_esolver/esolver_ks.cpp index a326b23802..fc99b8a572 100644 --- a/source/source_esolver/esolver_ks.cpp +++ b/source/source_esolver/esolver_ks.cpp @@ -1,20 +1,22 @@ #include "esolver_ks.h" +#include "source_base/timer_wrapper.h" // for jason output information -#include "source_io/json_output/init_info.h" -#include "source_io/json_output/output_info.h" +#include "source_io/module_json/init_info.h" +#include "source_io/module_json/output_info.h" #include "source_estate/update_pot.h" // mohan add 20251016 #include "source_estate/module_charge/chgmixing.h" // mohan add 20251018 #include "source_pw/module_pwdft/setup_pwwfc.h" // mohan add 20251018 #include "source_hsolver/hsolver.h" -#include "source_io/write_eig_occ.h" -#include "source_io/write_bands.h" +#include "source_io/module_energy/write_eig_occ.h" +#include "source_io/module_energy/write_bands.h" #include "source_hamilt/module_xc/xc_functional.h" -#include "source_io/output_log.h" // use write_head +#include "source_io/module_output/output_log.h" // use write_head #include "source_estate/elecstate_print.h" // print_etot -#include "source_io/print_info.h" // print_parameters +#include "source_io/module_output/print_info.h" // print_parameters #include "source_psi/setup_psi.h" // mohan add 20251009 +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-07 namespace ModuleESolver { @@ -45,7 +47,7 @@ void ESolver_KS::before_all_runners(UnitCell& ucell, const Input_para { ModuleBase::TITLE("ESolver_KS", "before_all_runners"); - //! 1) init "before_all_runniers" in ESolver_FP + //! 1) setup "before_all_runniers" in ESolver_FP ESolver_FP::before_all_runners(ucell, inp); //! 2) setup some parameters @@ -64,54 +66,24 @@ void ESolver_KS::before_all_runners(UnitCell& ucell, const Input_para //! 3) setup charge mixing p_chgmix = new Charge_Mixing(); p_chgmix->set_rhopw(this->pw_rho, this->pw_rhod); - - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SETUP UNITCELL"); - - //! 4) setup Exc for the first element '0', because all elements have same exc - XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); - - //! 5) setup the charge mixing parameters p_chgmix->set_mixing(inp.mixing_mode, inp.mixing_beta, inp.mixing_ndim, inp.mixing_gg0, inp.mixing_tau, inp.mixing_beta_mag, inp.mixing_gg0_mag, inp.mixing_gg0_min, inp.mixing_angle, inp.mixing_dmr, ucell.omega, ucell.tpiba); - p_chgmix->init_mixing(); - //! 6) symmetry analysis should be performed every time the cell is changed - if (ModuleSymmetry::Symmetry::symm_flag == 1) - { - ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); - } - - //! 7) Setup the k points according to symmetry. - this->kv.set(ucell,ucell.symm, inp.kpoint_file, inp.nspin, ucell.G, ucell.latvec, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); - - //! 8) print information - ModuleIO::print_parameters(ucell, this->kv, inp); - - //! 9) setup plane wave for electronic wave functions + //! 4) setup plane wave for electronic wave functions pw::setup_pwwfc(inp, ucell, *this->pw_rho, this->kv, this->pw_wfc); - //! 10) parallel of FFT grid - Pgrid.init(this->pw_rhod->nx, this->pw_rhod->ny, this->pw_rhod->nz, - this->pw_rhod->nplane, this->pw_rhod->nrxx, pw_big->nbz, pw_big->bz); - - //! 11) calculate the structure factor - this->sf.setup_structure_factor(&ucell, Pgrid, this->pw_rhod); + //! 5) read in charge density, mohan add 2025-11-28 + //! Inititlize the charge density. + this->chr.init_rho(ucell, this->Pgrid, this->sf.strucFac, ucell.symm, &this->kv, this->pw_wfc); + this->chr.check_rho(); // check the rho + } template void ESolver_KS::hamilt2rho_single(UnitCell& ucell, const int istep, const int iter, const double ethr) -{ - ModuleBase::timer::tick(this->classname, "hamilt2rho_single"); - // Temporarily, before HSolver is constructed, it should be overrided by - // LCAO, PW, SDFT and TDDFT. - // After HSolver is constructed, LCAO, PW, SDFT should delete their own - // hamilt2rho_single() and use: - ModuleBase::timer::tick(this->classname, "hamilt2rho_single"); -} +{} template void ESolver_KS::hamilt2rho(UnitCell& ucell, const int istep, const int iter, const double ethr) @@ -120,20 +92,14 @@ void ESolver_KS::hamilt2rho(UnitCell& ucell, const int istep, const i this->hamilt2rho_single(ucell, istep, iter, diag_ethr); // 2) for MPI: STOGROUP? need to rewrite - // It may be changed when more clever parallel algorithm is - // put forward. - // When parallel algorithm for bands are adopted. Density will only be - // treated in the first group. - //(Different ranks should have abtained the same, but small differences - // always exist in practice.) + // It may be changed when more clever parallel algorithm is put forward. + // When parallel algorithm for bands are adopted. Density will only be treated in the first group. + //(Different ranks should have abtained the same, but small differences always exist in practice.) // Maybe in the future, density and wavefunctions should use different // parallel algorithms, in which they do not occupy all processors, for // example wavefunctions uses 20 processors while density uses 10. if (PARAM.globalv.ks_run) { - // double drho = this->estate.caldr2(); - // EState should be used after it is constructed. - drho = p_chgmix->get_drho(&this->chr, PARAM.inp.nelec); hsolver_error = 0.0; if (iter == 1 && PARAM.inp.calculation != "nscf") @@ -145,23 +111,16 @@ void ESolver_KS::hamilt2rho(UnitCell& ucell, const int istep, const i // so a more precise HSolver should be executed. if (hsolver_error > drho) { - diag_ethr = hsolver::reset_diag_ethr(GlobalV::ofs_running, - PARAM.inp.basis_type, - PARAM.inp.esolver_type, - PARAM.inp.precision, - hsolver_error, - drho, - diag_ethr, - PARAM.inp.nelec); + diag_ethr = hsolver::reset_diag_ethr(GlobalV::ofs_running, PARAM.inp.basis_type, + PARAM.inp.esolver_type, PARAM.inp.precision, hsolver_error, + drho, diag_ethr, PARAM.inp.nelec); this->hamilt2rho_single(ucell, istep, iter, diag_ethr); drho = p_chgmix->get_drho(&this->chr, PARAM.inp.nelec); hsolver_error = hsolver::cal_hsolve_error(PARAM.inp.basis_type, - PARAM.inp.esolver_type, - diag_ethr, - PARAM.inp.nelec); + PARAM.inp.esolver_type, diag_ethr, PARAM.inp.nelec); } } } @@ -173,22 +132,17 @@ void ESolver_KS::runner(UnitCell& ucell, const int istep) ModuleBase::TITLE("ESolver_KS", "runner"); ModuleBase::timer::tick(this->classname, "runner"); - //---------------------------------------------------------------- // 1) before_scf (electronic iteration loops) - //---------------------------------------------------------------- this->before_scf(ucell, istep); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT SCF"); - //---------------------------------------------------------------- // 2) SCF iterations - //---------------------------------------------------------------- bool conv_esolver = false; this->niter = this->maxniter; this->diag_ethr = PARAM.inp.pw_diag_thr; this->scf_nmax_flag = false; // mohan add 2025-09-21 for (int iter = 1; iter <= this->maxniter; ++iter) { - // mohan add 2025-09-21 if(iter == this->maxniter) { this->scf_nmax_flag=true; @@ -237,11 +191,7 @@ void ESolver_KS::iter_init(UnitCell& ucell, const int istep, const in ModuleIO::write_head(GlobalV::ofs_running, istep, iter, this->basisname); } -#ifdef __MPI - iter_time = MPI_Wtime(); -#else - iter_time = std::chrono::system_clock::now(); -#endif + iter_time = ModuleBase::get_time(); if (PARAM.inp.esolver_type == "ksdft") { @@ -288,9 +238,19 @@ void ESolver_KS::iter_finish(UnitCell& ucell, const int istep, int& i this->pelec->nelec_spin.data()); // 2.2) charge mixing + // SCF will continue if U is not converged for uramping calculation + bool converged_u = true; + // to avoid unnecessary dependence on dft+u, refactor is needed +#ifdef __LCAO + if (PARAM.inp.dft_plus_u) + { + converged_u = this->dftu.u_converged(); + } +#endif + module_charge::chgmixing_ks(iter, ucell, this->pelec, this->chr, this->p_chgmix, this->pw_rhod->nrxx, this->drho, this->oscillate_esolver, conv_esolver, hsolver_error, - this->scf_thr, this->scf_ene_thr, PARAM.inp); + this->scf_thr, this->scf_ene_thr, converged_u, PARAM.inp); // 2.3) Update potentials (should be done every SF iter) elecstate::update_pot(ucell, this->pelec, this->chr, conv_esolver); @@ -318,13 +278,7 @@ void ESolver_KS::iter_finish(UnitCell& ucell, const int istep, int& i // the end, print time -#ifdef __MPI - double duration = (double)(MPI_Wtime() - iter_time); -#else - double duration - = (std::chrono::duration_cast(std::chrono::system_clock::now() - iter_time)).count() - / static_cast(1e6); -#endif + double duration = ModuleBase::get_duration(iter_time, ModuleBase::get_time()); // print energies elecstate::print_etot(ucell.magnet, *pelec, conv_esolver, iter, drho, @@ -347,12 +301,14 @@ void ESolver_KS::after_scf(UnitCell& ucell, const int istep, const bo { ModuleBase::TITLE("ESolver_KS", "after_scf"); +/* // 1) calculate the kinetic energy density tau if (PARAM.inp.out_elf[0] > 0) { assert(this->psi != nullptr); this->pelec->cal_tau(*(this->psi)); } +*/ // 2) call after_scf() of ESolver_FP ESolver_FP::after_scf(ucell, istep, conv_esolver); diff --git a/source/source_esolver/esolver_ks.h b/source/source_esolver/esolver_ks.h index bd47446a68..787b58ba74 100644 --- a/source/source_esolver/esolver_ks.h +++ b/source/source_esolver/esolver_ks.h @@ -7,6 +7,7 @@ #include "source_estate/module_charge/charge_mixing.h" // use charge mixing #include "source_psi/psi.h" // use electronic wave functions #include "source_hamilt/hamilt.h" // use Hamiltonian +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 namespace ModuleESolver { @@ -61,6 +62,9 @@ class ESolver_KS : public ESolver_FP //! Electronic wavefunctions psi::Psi* psi = nullptr; + //! DFT+U method, mohan add 2025-11-07 + Plus_U dftu; + std::string basisname; //! esolver_ks_lcao.cpp double esolver_KS_ne = 0.0; //! number of electrons double diag_ethr; //! the threshold for diagonalization diff --git a/source/source_esolver/esolver_ks_lcao.cpp b/source/source_esolver/esolver_ks_lcao.cpp index 29388b04c1..fa7f57dc60 100644 --- a/source/source_esolver/esolver_ks_lcao.cpp +++ b/source/source_esolver/esolver_ks_lcao.cpp @@ -1,12 +1,9 @@ #include "esolver_ks_lcao.h" #include "source_estate/elecstate_tools.h" #include "source_lcao/module_deltaspin/spin_constrain.h" -#include "source_io/read_wfc_nao.h" #include "source_lcao/hs_matrix_k.hpp" // there may be multiple definitions if using hpp -#include "source_estate/cal_ux.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_lcao/LCAO_domain.h" // need DeePKS_init -#include "source_lcao/module_dftu/dftu.h" #include "source_lcao/FORCE_STRESS.h" #include "source_estate/elecstate_lcao.h" #include "source_lcao/hamilt_lcao.h" @@ -15,14 +12,14 @@ #include "../source_lcao/module_ri/exx_opt_orb.h" #endif #include "source_lcao/module_rdmft/rdmft.h" -#include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006 -#include "source_estate/module_dm/setup_dm.h" // setup dm from electronic wave functions -#include "source_io/ctrl_runner_lcao.h" // use ctrl_runner_lcao() -#include "source_io/ctrl_iter_lcao.h" // use ctrl_iter_lcao() -#include "source_io/ctrl_scf_lcao.h" // use ctrl_scf_lcao() -#include "source_psi/setup_psi.h" // mohan add 20251019 -#include "source_io/read_wfc_nao.h" -#include "source_io/print_info.h" +#include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006 +#include "source_estate/module_dm/init_dm.h" // init dm from electronic wave functions +#include "source_io/module_ctrl/ctrl_runner_lcao.h" // use ctrl_runner_lcao() +#include "source_io/module_ctrl/ctrl_iter_lcao.h" // use ctrl_iter_lcao() +#include "source_io/module_ctrl/ctrl_scf_lcao.h" // use ctrl_scf_lcao() +#include "source_io/module_output/print_info.h" +#include "source_lcao/rho_tau_lcao.h" // mohan add 20251024 +#include "source_lcao/LCAO_set.h" // mohan add 20251111 namespace ModuleESolver { @@ -57,7 +54,7 @@ void ESolver_KS_LCAO::before_all_runners(UnitCell& ucell, const Input_pa { // TK stands for double and std::complex? this->pelec = new elecstate::ElecStateLCAO(&(this->chr), &(this->kv), - this->kv.get_nks(), this->pw_rho, this->pw_big); + this->kv.get_nks(), this->pw_big); } // 3) read LCAO orbitals/projectors and construct the interpolation tables. @@ -76,64 +73,17 @@ void ESolver_KS_LCAO::before_all_runners(UnitCell& ucell, const Input_pa return; } - // 5) init electronic wave function psi - Setup_Psi::allocate_psi(this->psi, this->kv, this->pv, inp); + LCAO_domain::set_psi_occ_dm_chg(this->kv, this->psi, this->pv, this->pelec, + this->dmat, this->chr, inp); - //! read psi from file - if (inp.init_wfc == "file" && inp.esolver_type != "tddft") - { - if (!ModuleIO::read_wfc_nao(PARAM.globalv.global_readin_dir, - this->pv, *this->psi, this->pelec->ekb, this->pelec->wg, this->kv.ik2iktot, - this->kv.get_nkstot(), inp.nspin)) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO", "read electronic wave functions failed"); - } - } - - - // 7) init DMK, but DMR is constructed in before_scf() - dynamic_cast*>(this->pelec)->init_DM(&this->kv, &(this->pv), inp.nspin); - - // 8) init exact exchange calculations - this->exx_nao.before_runner(ucell, this->kv, this->orb_, this->pv, inp); - - // 9) initialize DFT+U - if (inp.dft_plus_u) - { - auto* dftu = ModuleDFTU::DFTU::get_instance(); - dftu->init(ucell, &this->pv, this->kv.get_nks(), &orb_); - } - - // 10) init local pseudopotentials - this->locpp.init_vloc(ucell, this->pw_rho); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "LOCAL POTENTIAL"); - - // 11) init charge density - this->chr.allocate(inp.nspin); - this->pelec->omega = ucell.omega; + LCAO_domain::set_pot(ucell, this->kv, this->sf, *this->pw_rho, *this->pw_rhod, + this->pelec, this->orb_, this->pv, this->locpp, this->dftu, + this->solvent, this->exx_nao, this->deepks, inp); - // 12) init potentials - if (this->pelec->pot == nullptr) - { - this->pelec->pot = new elecstate::Potential(this->pw_rhod, this->pw_rho, - &ucell, &(this->locpp.vloc), &(this->sf), &(this->solvent), - &(this->pelec->f_en.etxc), &(this->pelec->f_en.vtxc)); - } - - // 13) init deepks - this->deepks.before_runner(ucell, this->kv.get_nks(), this->orb_, this->pv, inp); - - // 14) set occupations, tddft does not need to set occupations in the first scf - if (inp.ocp && inp.esolver_type != "tddft") - { - elecstate::fixed_weights(inp.ocp_kb, inp.nbands, inp.nelec, - this->pelec->klist, this->pelec->wg, this->pelec->skip_weights); - } - - // 15) if kpar is not divisible by nks, print a warning + //! if kpar is not divisible by nks, print a warning ModuleIO::print_kpar(this->kv.get_nks(), PARAM.globalv.kpar_lcao); - // 16) init rdmft, added by jghan + //! init rdmft, added by jghan if (inp.rdmft == true) { rdmft_solver.init(this->pv, ucell, @@ -155,12 +105,6 @@ void ESolver_KS_LCAO::before_scf(UnitCell& ucell, const int istep) //! 1) call before_scf() of ESolver_KS. ESolver_KS::before_scf(ucell, istep); - auto* estate = dynamic_cast*>(this->pelec); - if(!estate) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::before_scf","pelec does not exist"); - } - //! 2) find search radius double search_radius = atom_arrange::set_sr_NL(GlobalV::ofs_running, PARAM.inp.out_level, orb_.get_rcutmax_Phi(), ucell.infoNL.get_rcutmax_Beta(), @@ -195,19 +139,9 @@ void ESolver_KS_LCAO::before_scf(UnitCell& ucell, const int istep) } if (this->p_hamilt == nullptr) { - elecstate::DensityMatrix* DM = estate->get_DM(); - this->p_hamilt = new hamilt::HamiltLCAO( ucell, this->gd, &this->pv, this->pelec->pot, this->kv, - two_center_bundle_, orb_, DM, this->deepks -#ifdef __EXX - , - istep, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->two_level_step : &this->exx_nao.exc->two_level_step, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->get_Hexxs() : nullptr, - GlobalC::exx_info.info_ri.real_number ? nullptr : &this->exx_nao.exc->get_Hexxs() -#endif - ); + two_center_bundle_, orb_, this->dmat.dm, &this->dftu, this->deepks, istep, exx_nao); } // 9) for each ionic step, the overlap must be rebuilt @@ -220,49 +154,67 @@ void ESolver_KS_LCAO::before_scf(UnitCell& ucell, const int istep) spinconstrain::SpinConstrain& sc = spinconstrain::SpinConstrain::getScInstance(); sc.init_sc(PARAM.inp.sc_thr, PARAM.inp.nsc, PARAM.inp.nsc_min, PARAM.inp.alpha_trial, PARAM.inp.sccut, PARAM.inp.sc_drop_thr, ucell, &(this->pv), - PARAM.inp.nspin, this->kv, this->p_hamilt, this->psi, this->pelec); + PARAM.inp.nspin, this->kv, this->p_hamilt, this->psi, this->dmat.dm, this->pelec); } // 11) set xc type before the first cal of xc in pelec->init_scf, Peize Lin add 2016-12-03 -#ifdef __EXX - if (PARAM.inp.calculation != "nscf") + this->exx_nao.before_scf(ucell, this->kv, orb_, this->p_chgmix, istep, PARAM.inp); + + // 12) initalize DM(R), which has the same size with Hamiltonian(R) + auto* hamilt_lcao = dynamic_cast*>(this->p_hamilt); + + if(!hamilt_lcao) { - if (GlobalC::exx_info.info_ri.real_number) + ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::before_scf","p_hamilt does not exist"); + } + this->dmat.dm->init_DMR(*hamilt_lcao->getHR()); + + // 13.1) decide the strategy for initializing DMR and HR + if(istep == 0)//if the first scf step, readin DMR from file, + { + //calculate or readin the density matrix DMR + if(PARAM.inp.init_chg == "dm") { - this->exx_nao.exd->exx_beforescf(istep, this->kv, *this->p_chgmix, ucell, orb_); + //! 13.1.1) init density matrix from file + std::string dmfile = PARAM.globalv.global_readin_dir + "/dmrs1_nao.csr"; + LCAO_domain::init_dm_from_file(dmfile, this->dmat, ucell, &(this->pv)); } - else + if(PARAM.inp.init_chg == "hr") { - this->exx_nao.exc->exx_beforescf(istep, this->kv, *this->p_chgmix, ucell, orb_); + //! 13.1.2) init HR from file + std::string hrfile = PARAM.globalv.global_readin_dir + "/hrs1_nao.csr"; + LCAO_domain::init_hr_from_file( + hrfile, + dynamic_cast*>(this->p_hamilt)->getHR(), + ucell, + &(this->pv) + ); + this->p_hamilt->refresh(false); + hsolver::HSolverLCAO hsolver_lcao_obj(&(this->pv), PARAM.inp.ks_solver); + hsolver_lcao_obj.solve(this->p_hamilt, this->psi[0], this->pelec, *this->dmat.dm, + this->chr, PARAM.inp.nspin, 0); } } -#endif - - // 12) init_scf, should be before_scf? mohan add 2025-03-10 - this->pelec->init_scf(istep, ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); - - // 13) initalize DMR - // DMR should be same size with Hamiltonian(R) - auto* hamilt_lcao = dynamic_cast*>(this->p_hamilt); - if(!hamilt_lcao) + else //if not, use the DMR calculated from last step { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::before_scf","p_hamilt does not exist"); + // 13.1.2) two cases are considered: + // 1. DMK in DensityMatrix is not empty (istep > 0), then DMR is initialized by DMK + // 2. DMK in DensityMatrix is empty (istep == 0), then DMR is initialized by zeros + this->dmat.dm->cal_DMR(); + } + // 13.2 if init_chg = "dm", then calculate rho from readin DMR before init_scf + if(PARAM.inp.init_chg == "dm") + { + LCAO_domain::dm2rho(this->dmat.dm->get_DMR_vector(), PARAM.inp.nspin, this->pelec->charge, true); } - estate->get_DM()->init_DMR(*hamilt_lcao->getHR()); + // 13.2) init_scf, should be before_scf? mohan add 2025-03-10 + this->pelec->init_scf(ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); #ifdef __MLALGO - // 14) initialize DMR of DeePKS + // 14) initialize DM2(R) of DeePKS, the DM2(R) is different from DM(R) this->deepks.ld.init_DMR(ucell, orb_, this->pv, this->gd); #endif - // 15) two cases are considered: - // 1. DMK in DensityMatrix is not empty (istep > 0), then DMR is initialized by DMK - // 2. DMK in DensityMatrix is empty (istep == 0), then DMR is initialized by zeros - if (istep > 0) - { - estate->get_DM()->cal_DMR(); - } - // 16) the electron charge density should be symmetrized, Symmetry_rho srho; for (int is = 0; is < PARAM.inp.nspin; is++) @@ -270,10 +222,7 @@ void ESolver_KS_LCAO::before_scf(UnitCell& ucell, const int istep) srho.begin(is, this->chr, this->pw_rho, ucell.symm); } - // 17) why we need to set this sentence? mohan add 2025-03-10 - this->p_hamilt->non_first_scf = istep; - - // 18) update of RDMFT, added by jghan + // 17) update of RDMFT, added by jghan if (PARAM.inp.rdmft == true) { rdmft_solver.update_ion(ucell, *(this->pw_rho), this->locpp.vloc, this->sf.strucFac); @@ -287,8 +236,6 @@ void ESolver_KS_LCAO::before_scf(UnitCell& ucell, const int istep) template double ESolver_KS_LCAO::cal_energy() { - ModuleBase::TITLE("ESolver_KS_LCAO", "cal_energy"); - return this->pelec->f_en.etot; } @@ -304,10 +251,10 @@ void ESolver_KS_LCAO::cal_force(UnitCell& ucell, ModuleBase::matrix& for fsl.getForceStress(ucell, PARAM.inp.cal_force, PARAM.inp.cal_stress, PARAM.inp.test_force, PARAM.inp.test_stress, - this->gd, this->pv, this->pelec, this->psi, + this->gd, this->pv, this->pelec, this->dmat, this->psi, two_center_bundle_, orb_, force, this->scs, this->locpp, this->sf, this->kv, - this->pw_rho, this->solvent, this->deepks, + this->pw_rho, this->solvent, this->dftu, this->deepks, this->exx_nao, &ucell.symm); // delete RA after cal_force @@ -318,25 +265,19 @@ void ESolver_KS_LCAO::cal_force(UnitCell& ucell, ModuleBase::matrix& for ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_force"); } -//------------------------------------------------------------------------------ -//! the 7th function of ESolver_KS_LCAO: cal_stress -//! mohan add 2024-05-11 -//------------------------------------------------------------------------------ template void ESolver_KS_LCAO::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) { ModuleBase::TITLE("ESolver_KS_LCAO", "cal_stress"); ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_stress"); - // if the users do not want to calculate forces but want stress, - // we call cal_force if (!this->have_force) { ModuleBase::matrix fcs; this->cal_force(ucell, fcs); } - // the 'scs' stress has already been calculated in 'cal_force' + // the stress has been calculated in 'cal_force' stress = this->scs; this->have_force = false; @@ -351,27 +292,26 @@ void ESolver_KS_LCAO::after_all_runners(UnitCell& ucell) ESolver_KS::after_all_runners(ucell); - const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1; - - auto* estate = dynamic_cast*>(this->pelec); auto* hamilt_lcao = dynamic_cast*>(this->p_hamilt); + if(!hamilt_lcao) + { + ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::after_all_runners","p_hamilt does not exist"); + } - if(!estate) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::after_all_runners","pelec does not exist"); - } + ModuleIO::ctrl_runner_lcao(ucell, + PARAM.inp, this->kv, this->pelec, this->dmat, this->pv, this->Pgrid, + this->gd, this->psi, this->chr, hamilt_lcao, + this->two_center_bundle_, + this->orb_, this->pw_rho, this->pw_rhod, + this->sf, this->locpp.vloc, this->exx_nao, this->solvent); - if(!hamilt_lcao) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::after_all_runners","p_hamilt does not exist"); - } - ModuleIO::ctrl_runner_lcao(ucell, - PARAM.inp, this->kv, estate, this->pv, this->Pgrid, - this->gd, this->psi, this->chr, hamilt_lcao, - this->two_center_bundle_, - this->orb_, this->pw_rho, this->pw_rhod, - this->sf, this->locpp.vloc, this->exx_nao, this->solvent); +#ifdef __MPI +#ifdef __LCAO + // Exit BLACS environment for LCAO calculations + Cblacs_exit(1); +#endif +#endif ModuleBase::timer::tick("ESolver_KS_LCAO", "after_all_runners"); } @@ -384,19 +324,11 @@ void ESolver_KS_LCAO::iter_init(UnitCell& ucell, const int istep, const // call iter_init() of ESolver_KS ESolver_KS::iter_init(ucell, istep, iter); - // cast pointers - auto* estate = dynamic_cast*>(this->pelec); - if(!estate) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::iter_init","pelec does not exist"); - } - - elecstate::DensityMatrix* dm = estate->get_DM(); - - module_charge::chgmixing_ks_lcao(iter, this->p_chgmix, dm->get_DMR_pointer(1)->get_nnr(), PARAM.inp); + module_charge::chgmixing_ks_lcao(iter, this->p_chgmix, this->dftu, + this->dmat.dm->get_DMR_pointer(1)->get_nnr(), PARAM.inp); // mohan update 2012-06-05 - estate->f_en.deband_harris = estate->cal_delta_eband(ucell); + this->pelec->f_en.deband_harris = this->pelec->cal_delta_eband(ucell); if (istep == 0 && PARAM.inp.init_wfc == "file") { @@ -406,10 +338,11 @@ void ESolver_KS_LCAO::iter_init(UnitCell& ucell, const int istep, const { // the following steps are only needed in the first outer exx loop exx_two_level_step - = GlobalC::exx_info.info_ri.real_number ? this->exx_nao.exd->two_level_step : this->exx_nao.exc->two_level_step; + = GlobalC::exx_info.info_ri.real_number ? + this->exx_nao.exd->two_level_step : this->exx_nao.exc->two_level_step; } #endif - elecstate::setup_dm(ucell, estate, this->psi, this->chr, iter, exx_two_level_step); + elecstate::init_dm(ucell, this->pelec, this->dmat, this->psi, this->chr, iter, exx_two_level_step); } #ifdef __EXX @@ -418,11 +351,11 @@ void ESolver_KS_LCAO::iter_init(UnitCell& ucell, const int istep, const { if (GlobalC::exx_info.info_ri.real_number) { - this->exx_nao.exd->exx_eachiterinit(istep, ucell, *dm, this->kv, iter); + this->exx_nao.exd->exx_eachiterinit(istep, ucell, *this->dmat.dm, this->kv, iter); } else { - this->exx_nao.exc->exx_eachiterinit(istep, ucell, *dm, this->kv, iter); + this->exx_nao.exc->exx_eachiterinit(istep, ucell, *this->dmat.dm, this->kv, iter); } } #endif @@ -431,10 +364,10 @@ void ESolver_KS_LCAO::iter_init(UnitCell& ucell, const int istep, const { if (istep != 0 || iter != 1) { - GlobalC::dftu.set_dmr(dm); + this->dftu.set_dmr(this->dmat.dm); } // Calculate U and J if Yukawa potential is used - GlobalC::dftu.cal_slater_UJ(ucell, this->chr.rho, this->pw_rho->nrxx); + this->dftu.cal_slater_UJ(ucell, this->chr.rho, this->pw_rho->nrxx); } #ifdef __MLALGO @@ -457,7 +390,7 @@ void ESolver_KS_LCAO::iter_init(UnitCell& ucell, const int istep, const // save density matrix DMR for mixing if (PARAM.inp.mixing_restart > 0 && PARAM.inp.mixing_dmr && this->p_chgmix->mixing_restart_count > 0) { - dm->save_DMR(); + this->dmat.dm->save_DMR(); } } @@ -495,7 +428,8 @@ void ESolver_KS_LCAO::hamilt2rho_single(UnitCell& ucell, int istep, int if (!skip_solve) { hsolver::HSolverLCAO hsolver_lcao_obj(&(this->pv), PARAM.inp.ks_solver); - hsolver_lcao_obj.solve(this->p_hamilt, this->psi[0], this->pelec, skip_charge); + hsolver_lcao_obj.solve(this->p_hamilt, this->psi[0], this->pelec, *this->dmat.dm, + this->chr, PARAM.inp.nspin, skip_charge); } // 4) EXX @@ -530,48 +464,39 @@ void ESolver_KS_LCAO::iter_finish(UnitCell& ucell, const int istep, int& { ModuleBase::TITLE("ESolver_KS_LCAO", "iter_finish"); - auto* estate = dynamic_cast*>(this->pelec); auto* hamilt_lcao = dynamic_cast*>(this->p_hamilt); - if(!estate) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::iter_finish","pelec does not exist"); - } - if(!hamilt_lcao) { ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::iter_finish","p_hamilt does not exist"); } - const std::vector>& dm_vec = estate->get_DM()->get_DMK_vector(); + const std::vector>& dm_vec = this->dmat.dm->get_DMK_vector(); // 1) calculate the local occupation number matrix and energy correction in DFT+U if (PARAM.inp.dft_plus_u) { - // only old DFT+U method should calculated energy correction in esolver, - // new DFT+U method will calculate energy in calculating Hamiltonian + // old DFT+U method calculates energy correction in esolver, + // new DFT+U method calculates energy in Hamiltonian if (PARAM.inp.dft_plus_u == 2) { - if (GlobalC::dftu.omc != 2) + if (this->dftu.omc != 2) { - ModuleDFTU::dftu_cal_occup_m(iter, ucell, dm_vec, this->kv, - this->p_chgmix->get_mixing_beta(), hamilt_lcao); + dftu_cal_occup_m(iter, ucell, dm_vec, this->kv, + this->p_chgmix->get_mixing_beta(), hamilt_lcao, this->dftu); } - GlobalC::dftu.cal_energy_correction(ucell, istep); + this->dftu.cal_energy_correction(ucell, istep); } - GlobalC::dftu.output(ucell); - } + this->dftu.output(ucell); + // use the converged occupation matrix for next MD/Relax SCF calculation + if (conv_esolver) + { + this->dftu.initialed_locale = true; + } + } // 2) for deepks, calculate delta_e, output labels during electronic steps -#ifdef __MLALGO - if (PARAM.inp.deepks_scf) - { - this->deepks.ld.dpks_cal_e_delta_band(dm_vec, this->kv.get_nks()); - DeePKS_domain::update_dmr(this->kv.kvec_d, dm_vec, ucell, orb_, this->pv, this->gd, this->deepks.ld.dm_r); - estate->f_en.edeepks_scf = this->deepks.ld.E_delta - this->deepks.ld.e_delta_band; - estate->f_en.edeepks_delta = this->deepks.ld.E_delta; - } -#endif + this->deepks.delta_e(ucell, this->kv, this->orb_, this->pv, this->gd, dm_vec, this->pelec->f_en, PARAM.inp); // 3) for delta spin if (PARAM.inp.sc_mag_switch) @@ -592,23 +517,15 @@ void ESolver_KS_LCAO::iter_finish(UnitCell& ucell, const int istep, int& { if (PARAM.inp.mixing_restart > 0 && this->p_chgmix->mixing_restart_count > 0 && PARAM.inp.mixing_dmr) { - elecstate::DensityMatrix* dm = estate->get_DM(); - this->p_chgmix->mix_dmr(dm); + this->p_chgmix->mix_dmr(this->dmat.dm); } } - // use the converged occupation matrix for next MD/Relax SCF calculation - if (PARAM.inp.dft_plus_u && conv_esolver) - { - GlobalC::dftu.initialed_locale = true; - } - // control the output related to the finished iteration - ModuleIO::ctrl_iter_lcao(ucell, PARAM.inp, this->kv, estate, + ModuleIO::ctrl_iter_lcao(ucell, PARAM.inp, this->kv, this->pelec, *this->dmat.dm, this->pv, this->gd, this->psi, this->chr, this->p_chgmix, hamilt_lcao, this->orb_, this->deepks, this->exx_nao, iter, istep, conv_esolver, this->scf_ene_thr); - } template @@ -617,33 +534,28 @@ void ESolver_KS_LCAO::after_scf(UnitCell& ucell, const int istep, const ModuleBase::TITLE("ESolver_KS_LCAO", "after_scf"); ModuleBase::timer::tick("ESolver_KS_LCAO", "after_scf"); - //! 1) call after_scf() of ESolver_KS - ESolver_KS::after_scf(ucell, istep, conv_esolver); - - auto* estate = dynamic_cast*>(this->pelec); auto* hamilt_lcao = dynamic_cast*>(this->p_hamilt); - if(!estate) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::after_scf","pelec does not exist"); - } - if(!hamilt_lcao) { ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::after_scf","p_hamilt does not exist"); } + if (PARAM.inp.out_elf[0] > 0) + { + LCAO_domain::dm2tau(this->dmat.dm->get_DMR_vector(), PARAM.inp.nspin, this->pelec->charge); + } + + //! 1) call after_scf() of ESolver_KS + ESolver_KS::after_scf(ucell, istep, conv_esolver); + //! 2) output of lcao every few ionic steps ModuleIO::ctrl_scf_lcao(ucell, - PARAM.inp, this->kv, estate, this->pv, - this->gd, this->psi, hamilt_lcao, - this->two_center_bundle_, - this->orb_, this->pw_wfc, this->pw_rho, - this->pw_big, this->sf, - this->rdmft_solver, this->deepks, this->exx_nao, - this->conv_esolver, this->scf_nmax_flag, - istep); - + PARAM.inp, this->kv, this->pelec, this->dmat.dm, this->pv, + this->gd, this->psi, hamilt_lcao, this->dftu, this->two_center_bundle_, + this->orb_, this->pw_wfc, this->pw_rho, this->pw_big, this->sf, + this->rdmft_solver, this->deepks, this->exx_nao, + this->conv_esolver, this->scf_nmax_flag, istep); //! 3) Clean up RA, which is used to serach for adjacent atoms if (!PARAM.inp.cal_force && !PARAM.inp.cal_stress) @@ -654,7 +566,6 @@ void ESolver_KS_LCAO::after_scf(UnitCell& ucell, const int istep, const ModuleBase::timer::tick("ESolver_KS_LCAO", "after_scf"); } - template class ESolver_KS_LCAO; template class ESolver_KS_LCAO, double>; template class ESolver_KS_LCAO, std::complex>; diff --git a/source/source_esolver/esolver_ks_lcao.h b/source/source_esolver/esolver_ks_lcao.h index 16fb6aa8df..4191306788 100644 --- a/source/source_esolver/esolver_ks_lcao.h +++ b/source/source_esolver/esolver_ks_lcao.h @@ -9,6 +9,7 @@ #include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008 #include "source_lcao/setup_exx.h" // for exx, mohan add 20251008 #include "source_lcao/module_rdmft/rdmft.h" // rdmft +#include "source_lcao/setup_dm.h" // mohan add 2025-10-30 #include @@ -68,29 +69,34 @@ class ESolver_KS_LCAO : public ESolver_KS //! GintInfo: used to store some basic infomation about module_gint std::unique_ptr gint_info_; + //! NAO: store related information + LCAO_Orbitals orb_; + //! NAO orbitals: two-center integrations TwoCenterBundle two_center_bundle_; - //! For RDMFT calculations, added by jghan, 2024-03-16 - rdmft::RDMFT rdmft_solver; - - //! NAO: store related information - LCAO_Orbitals orb_; + //! Add density matrix class, mohan add 2025-10-30 + LCAO_domain::Setup_DM dmat; - // Temporarily store the stress to unify the interface with PW, - // because it's hard to seperate force and stress calculation in LCAO. - ModuleBase::matrix scs; - bool have_force = false; - // deepks method, mohan add 2025-10-08 + // For deepks method, mohan add 2025-10-08 Setup_DeePKS deepks; - // exact-exchange energy, mohan add 2025-10-08 + // For exact-exchange energy, mohan add 2025-10-08 Exx_NAO exx_nao; + //! For RDMFT calculations, added by jghan, 2024-03-16 + rdmft::RDMFT rdmft_solver; + + //! For linear-response TDDFT friend class LR::ESolver_LR; friend class LR::ESolver_LR, double>; + // Temporarily store the stress to unify the interface with PW, + // because it's hard to seperate force and stress calculation in LCAO. + ModuleBase::matrix scs; + bool have_force = false; + public: const Record_adj & get_RA() const { return RA; } diff --git a/source/source_esolver/esolver_ks_lcao_tddft.cpp b/source/source_esolver/esolver_ks_lcao_tddft.cpp index 7c047774b4..b273304ffe 100644 --- a/source/source_esolver/esolver_ks_lcao_tddft.cpp +++ b/source/source_esolver/esolver_ks_lcao_tddft.cpp @@ -1,40 +1,20 @@ #include "esolver_ks_lcao_tddft.h" +//----------------IO----------------- +#include "source_io/module_dipole/dipole_io.h" +#include "source_io/module_ctrl/ctrl_output_td.h" +#include "source_io/module_current/td_current_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_wf/read_wfc_nao.h" +//------LCAO HSolver ElecState------- #include "source_estate/elecstate_tools.h" -#include "source_io/cal_r_overlap_R.h" -#include "source_io/dipole_io.h" -#include "source_io/td_current_io.h" -#include "source_io/read_wfc_nao.h" -#include "source_io/write_HS.h" -#include "source_io/write_HS_R.h" -#include "source_io/output_log.h" - -//--------------temporary---------------------------- -#include "source_base/module_external/blas_connector.h" -#include "source_base/global_function.h" -#include "source_base/module_external/scalapack_connector.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_estate/module_dm/cal_edm_tddft.h" -#include "source_estate/module_dm/density_matrix.h" -#include "source_estate/occupy.h" -#include "source_io/print_info.h" -#include "source_lcao/module_rt/evolve_elec.h" -#include "source_pw/module_pwdft/global.h" #include "source_estate/module_pot/H_TDDFT_pw.h" - -//-----HSolver ElecState Hamilt-------- -#include "source_io/module_parameter/parameter.h" -#include "source_estate/cal_ux.h" -#include "source_estate/elecstate_lcao.h" #include "source_hsolver/hsolver_lcao.h" -#include "source_lcao/hamilt_lcao.h" -#include "source_psi/psi.h" - -//-----force& stress------------------- -#include "source_lcao/FORCE_STRESS.h" - -//--------------------------------------------------- +#include "source_lcao/module_rt/evolve_elec.h" +#include "source_lcao/rho_tau_lcao.h" namespace ModuleESolver { @@ -57,26 +37,11 @@ ESolver_KS_LCAO_TDDFT::ESolver_KS_LCAO_TDDFT() template ESolver_KS_LCAO_TDDFT::~ESolver_KS_LCAO_TDDFT() { - //**************************************************** - // do not add any codes in this deconstructor funcion - //**************************************************** - delete psi_laststep; - if (Hk_laststep != nullptr) - { - for (int ik = 0; ik < this->kv.get_nks(); ++ik) - { - delete[] Hk_laststep[ik]; - } - delete[] Hk_laststep; - } - if (Sk_laststep != nullptr) - { - for (int ik = 0; ik < this->kv.get_nks(); ++ik) - { - delete[] Sk_laststep[ik]; - } - delete[] Sk_laststep; - } + //************************************************* + // Do not add any code in this destructor function + //************************************************* + delete psi_laststep; + if (td_p != nullptr) { delete td_p; @@ -87,33 +52,31 @@ ESolver_KS_LCAO_TDDFT::~ESolver_KS_LCAO_TDDFT() template void ESolver_KS_LCAO_TDDFT::before_all_runners(UnitCell& ucell, const Input_para& inp) { - // 1) run before_all_runners in ESolver_KS_LCAO + // Run before_all_runners in ESolver_KS_LCAO ESolver_KS_LCAO, TR>::before_all_runners(ucell, inp); - // this line should be optimized - // this->pelec = dynamic_cast(this->pelec); - - td_p = new TD_info(&ucell); + td_p = new TD_info(&ucell, this->pv, this->orb_); TD_info::td_vel_op = td_p; totstep += TD_info::estep_shift; if (PARAM.inp.init_wfc == "file") - { - if (!ModuleIO::read_wfc_nao(PARAM.globalv.global_readin_dir, - this->pv, - *(this->psi), - this->pelec->ekb, - this->pelec->wg, - this->kv.ik2iktot, - this->kv.get_nkstot(), - PARAM.inp.nspin, - 0, - TD_info::estep_shift)) + { + if (!ModuleIO::read_wfc_nao(PARAM.globalv.global_readin_dir, + this->pv, + *(this->psi), + this->pelec->ekb, + this->pelec->wg, + this->kv.ik2iktot, + this->kv.get_nkstot(), + PARAM.inp.nspin, + 0, + TD_info::estep_shift)) { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO", "read electronic wave functions failed"); + ModuleBase::WARNING_QUIT("ESolver_KS_LCAO_TDDFT", "Read electronic wavefunction from file failed!"); } } } + template void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) { @@ -123,28 +86,47 @@ void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) //---------------------------------------------------------------- // 1) before_scf (electronic iteration loops) //---------------------------------------------------------------- - this->before_scf(ucell, istep); + this->before_scf(ucell, istep); // From ESolver_KS_LCAO ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT SCF"); // Initialize velocity operator for current calculation - if(PARAM.inp.td_stype!=1 && TD_info::out_current) + if (PARAM.inp.td_stype != 1 && TD_info::out_current == 1) { // initialize the velocity operator - velocity_mat = new Velocity_op(&ucell, &(this->gd), &this->pv, this->orb_, this->two_center_bundle_.overlap_orb.get()); - //calculate velocity operator + velocity_mat = new Velocity_op(&ucell, + &(this->gd), + &this->pv, + this->orb_, + this->two_center_bundle_.overlap_orb.get()); + // calculate velocity operator velocity_mat->calculate_grad_term(); velocity_mat->calculate_vcomm_r(); } int estep_max = (istep == 0 && !PARAM.inp.mdp.md_restart) ? 1 : PARAM.inp.estep_per_md; - if(PARAM.inp.mdp.md_nstep==0)estep_max = PARAM.inp.estep_per_md + 1; - //int estep_max = PARAM.inp.estep_per_md; - for(int estep =0; estep < estep_max; estep++) + // mohan change md_nstep from 0 to 1, 2026-01-04 + if (PARAM.inp.mdp.md_nstep == 1) + { + estep_max = PARAM.inp.estep_per_md + 1; + } + + // Reset laststep matrix and wfc, if any atom cross the boundary + // Apply a phase correction to H, S, and psi to keep consistency when atoms cross periodic boundaries + const size_t len_hs_ik = use_tensor && use_lapack ? PARAM.globalv.nlocal * PARAM.globalv.nlocal : this->pv.nloc; + module_rt::reset_matrix_boundary(ucell, + this->kv, + &(this->pv), + this->Hk_laststep, + this->Sk_laststep, + this->psi_laststep, + len_hs_ik); + + for (int estep = 0; estep < estep_max; estep++) { // calculate total time step this->totstep++; this->print_step(); - //update At - if(PARAM.inp.td_stype > 0) + // update At + if (PARAM.inp.td_stype > 0) { elecstate::H_TDDFT_pw::update_At(); td_p->cal_cart_At(elecstate::H_TDDFT_pw::At); @@ -153,7 +135,7 @@ void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Cartesian vector potential Az(t)", TD_info::cart_At[2]); } - if(estep!=0) + if (estep != 0) { this->CE.update_all_dis(ucell); this->CE.extrapolate_charge(&this->Pgrid, @@ -162,10 +144,10 @@ void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) &this->sf, GlobalV::ofs_running, GlobalV::ofs_warning); - //need to test if correct when estep>0 - this->pelec->init_scf(totstep, ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); - - if(totstep <= PARAM.inp.td_tend + 1) + // need to test if correct when estep>0 + this->pelec->init_scf(ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); + + if (totstep <= PARAM.inp.td_tend + 1) { TD_info::evolve_once = true; } @@ -179,24 +161,17 @@ void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) for (int iter = 1; iter <= this->maxniter; ++iter) { ModuleIO::write_head_td(GlobalV::ofs_running, istep, totstep, iter, this->basisname); - //---------------------------------------------------------------- - // 3) initialization of SCF iterations - //---------------------------------------------------------------- - this->iter_init(ucell, totstep, iter); - - //---------------------------------------------------------------- - // 4) use Hamiltonian to obtain charge density - //---------------------------------------------------------------- - this->hamilt2rho(ucell, totstep, iter, this->diag_ethr); - - //---------------------------------------------------------------- - // 5) finish scf iterations - //---------------------------------------------------------------- - this->iter_finish(ucell, totstep, iter, conv_esolver); - - //---------------------------------------------------------------- - // 6) check convergence - //---------------------------------------------------------------- + + // 3) Initialization of SCF iterations + this->iter_init(ucell, totstep, iter); // From ESolver_KS_LCAO + + // 4) Use Hamiltonian to obtain charge density + this->hamilt2rho(ucell, totstep, iter, this->diag_ethr); // From ESolver_KS + + // 5) Finish SCF iterations + this->iter_finish(ucell, totstep, estep, estep_max, iter, conv_esolver); + + // 6) Check convergence if (conv_esolver || this->oscillate_esolver) { this->niter = iter; @@ -206,28 +181,38 @@ void ESolver_KS_LCAO_TDDFT::runner(UnitCell& ucell, const int istep) } break; } - } // end scf iterations + } // end SCF iterations //---------------------------------------------------------------- - // 7) after scf + // 7) after_scf //---------------------------------------------------------------- this->after_scf(ucell, totstep, conv_esolver); - if(!restart_done && PARAM.inp.mdp.md_restart) + if (!restart_done && PARAM.inp.mdp.md_restart) { restart_done = true; - estep += TD_info::estep_shift%PARAM.inp.estep_per_md; - if(estep==0)break; - if(PARAM.inp.mdp.md_nstep!=0)estep -= 1; + estep += TD_info::estep_shift % PARAM.inp.estep_per_md; + if (estep == 0) + { + break; + } + // mohan add 2026-01-04, change md_nstep!=0 to md_nstep!=1 + if (PARAM.inp.mdp.md_nstep != 1) + { + estep -= 1; + } } } - if(PARAM.inp.td_stype!=1 && TD_info::out_current) + + if (PARAM.inp.td_stype != 1 && TD_info::out_current == 1) { delete velocity_mat; } + ModuleBase::timer::tick(this->classname, "runner"); return; } -//output electronic step infos + +// Output electronic step information template void ESolver_KS_LCAO_TDDFT::print_step() { @@ -235,6 +220,7 @@ void ESolver_KS_LCAO_TDDFT::print_step() std::cout << " STEP OF ELECTRON EVOLVE : " << unsigned(totstep) << std::endl; std::cout << " -------------------------------------------" << std::endl; } + template void ESolver_KS_LCAO_TDDFT::hamilt2rho_single(UnitCell& ucell, const int istep, @@ -246,58 +232,62 @@ void ESolver_KS_LCAO_TDDFT::hamilt2rho_single(UnitCell& ucell, if (istep >= TD_info::estep_shift + 1) { module_rt::Evolve_elec::solve_psi(istep, - PARAM.inp.nbands, - PARAM.globalv.nlocal, - this->kv.get_nks(), - this->p_hamilt, - this->pv, - this->psi, - this->psi_laststep, - this->Hk_laststep, - this->Sk_laststep, - this->pelec->ekb, - GlobalV::ofs_running, - td_htype, - PARAM.inp.propagator, - use_tensor, - use_lapack); + PARAM.inp.nbands, + PARAM.globalv.nlocal, + this->kv.get_nks(), + this->p_hamilt, + this->pv, + this->psi, + this->psi_laststep, + this->Hk_laststep, + this->Sk_laststep, + this->pelec->ekb, + GlobalV::ofs_running, + PARAM.inp.propagator, + use_tensor, + use_lapack); } this->weight_dm_rho(ucell); } else if (istep >= 1) { module_rt::Evolve_elec::solve_psi(istep, - PARAM.inp.nbands, - PARAM.globalv.nlocal, - this->kv.get_nks(), - this->p_hamilt, - this->pv, - this->psi, - this->psi_laststep, - this->Hk_laststep, - this->Sk_laststep, - this->pelec->ekb, - GlobalV::ofs_running, - td_htype, - PARAM.inp.propagator, - use_tensor, - use_lapack); + PARAM.inp.nbands, + PARAM.globalv.nlocal, + this->kv.get_nks(), + this->p_hamilt, + this->pv, + this->psi, + this->psi_laststep, + this->Hk_laststep, + this->Sk_laststep, + this->pelec->ekb, + GlobalV::ofs_running, + PARAM.inp.propagator, + use_tensor, + use_lapack); this->weight_dm_rho(ucell); } else { - // reset energy + // For the first step, do normal SCF calculation to get initial state this->pelec->f_en.eband = 0.0; this->pelec->f_en.demet = 0.0; if (this->psi != nullptr) { bool skip_charge = PARAM.inp.calculation == "nscf" ? true : false; hsolver::HSolverLCAO> hsolver_lcao_obj(&this->pv, PARAM.inp.ks_solver); - hsolver_lcao_obj.solve(this->p_hamilt, this->psi[0], this->pelec, skip_charge); + hsolver_lcao_obj.solve(this->p_hamilt, + this->psi[0], + this->pelec, + *this->dmat.dm, + this->chr, + PARAM.inp.nspin, + skip_charge); } } - // symmetrize the charge density only for ground state + // Symmetrize the charge density only for ground state if (istep <= 1) { Symmetry_rho srho; @@ -306,19 +296,26 @@ void ESolver_KS_LCAO_TDDFT::hamilt2rho_single(UnitCell& ucell, srho.begin(is, this->chr, this->pw_rho, ucell.symm); } } +#ifdef __EXX + if (GlobalC::exx_info.info_ri.real_number) + this->exx_nao.exd->exx_hamilt2rho(*this->pelec, this->pv, iter); + else + this->exx_nao.exc->exx_hamilt2rho(*this->pelec, this->pv, iter); +#endif - // (7) calculate delta energy + // Calculate delta energy this->pelec->f_en.deband = this->pelec->cal_delta_eband(ucell); } template -void ESolver_KS_LCAO_TDDFT::iter_finish( - UnitCell& ucell, - const int istep, - int& iter, - bool& conv_esolver) +void ESolver_KS_LCAO_TDDFT::iter_finish(UnitCell& ucell, + const int istep, + const int estep, + const int estep_max, + int& iter, + bool& conv_esolver) { - // print occupation of each band + // Print occupation of each band if (iter == 1 && istep <= 2) { GlobalV::ofs_running << " k-point State Occupations" << std::endl; @@ -329,9 +326,8 @@ void ESolver_KS_LCAO_TDDFT::iter_finish( { for (int ib = 0; ib < PARAM.inp.nbands; ib++) { - GlobalV::ofs_running << " " << std::setw(9) - << ik+1 << std::setw(8) << ib + 1 - << std::setw(12) << this->pelec->wg(ik, ib) << std::endl; + GlobalV::ofs_running << " " << std::setw(9) << ik + 1 << std::setw(8) << ib + 1 << std::setw(12) + << this->pelec->wg(ik, ib) << std::endl; } } GlobalV::ofs_running << std::endl; @@ -339,209 +335,172 @@ void ESolver_KS_LCAO_TDDFT::iter_finish( ESolver_KS_LCAO, TR>::iter_finish(ucell, istep, iter, conv_esolver); - this->save2(ucell, istep, iter, conv_esolver); + // Store wave function, Hamiltonian and Overlap matrix, to be used in next time step + // Store when converged or reach max iteration + bool force_save = conv_esolver || (iter == this->maxniter); + this->store_h_s_psi(ucell, istep, iter, force_save); + // Calculate energy-density matrix for RT-TDDFT + if (conv_esolver && estep == estep_max - 1 && istep >= (PARAM.inp.init_wfc == "file" ? 0 : 1) + && PARAM.inp.td_edm == 0) + { + if (use_tensor && use_lapack) + { + elecstate::cal_edm_tddft_tensor_lapack(this->pv, this->dmat, this->kv, this->p_hamilt); + } + else + { + elecstate::cal_edm_tddft(this->pv, this->dmat, this->kv, this->p_hamilt); + } + } } template -void ESolver_KS_LCAO_TDDFT::save2(UnitCell& ucell, - const int istep, - const int iter, - const bool conv_esolver) +void ESolver_KS_LCAO_TDDFT::store_h_s_psi(UnitCell& ucell, + const int istep, + const int iter, + const bool conv_esolver) { - // Calculate new potential according to new Charge Density -/* - if (!conv_esolver) - { - elecstate::cal_ux(ucell); - this->pelec->pot->update_from_charge(&this->chr, &ucell); - this->pelec->f_en.descf = this->pelec->cal_delta_escf(); - } - else - { - this->pelec->cal_converged(); - } -*/ - - const int nloc = this->pv.nloc; - const int ncol_nbands = this->pv.ncol_bands; - const int nrow = this->pv.nrow; const int nbands = PARAM.inp.nbands; const int nlocal = PARAM.globalv.nlocal; - // store wfc and Hk laststep + // Store wave function, Hamiltonian and Overlap matrix if (conv_esolver) { if (this->psi_laststep == nullptr) { - int ncol_tmp = 0; - int nrow_tmp = 0; + this->psi_laststep = new psi::Psi>(this->kv.get_nks(), #ifdef __MPI - ncol_tmp = ncol_nbands; - nrow_tmp = nrow; + this->pv.ncol_bands, + this->pv.nrow, #else - ncol_tmp = nbands; - nrow_tmp = nlocal; + nbands, + nlocal, #endif - this->psi_laststep = new psi::Psi>(this->kv.get_nks(), ncol_tmp, nrow_tmp, this->kv.ngk, true); - + this->kv.ngk, + true); } - // allocate memory for Hk_laststep and Sk_laststep - if (td_htype == 1) + // Length of Hk_laststep and Sk_laststep, nlocal * nlocal for global, nloc for local + const int len_HS_ik = use_tensor && use_lapack ? nlocal * nlocal : this->pv.nloc; + const int len_HS_all = this->kv.get_nks() * len_HS_ik; + + // Allocate memory for Hk_laststep, if (use_tensor && use_lapack), should be global + if (this->Hk_laststep.NumElements() != len_HS_all) { - // Length of Hk_laststep and Sk_laststep, nlocal * nlocal for global, nloc for local - const int len_HS = use_tensor && use_lapack ? nlocal * nlocal : nloc; + this->Hk_laststep = ct::Tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type_hs, + ct::TensorShape({this->kv.get_nks(), len_HS_ik})); + this->Hk_laststep.zero(); + } - if (this->Hk_laststep == nullptr) - { - this->Hk_laststep = new std::complex*[this->kv.get_nks()]; - for (int ik = 0; ik < this->kv.get_nks(); ++ik) - { - // Allocate memory for Hk_laststep, if (use_tensor && use_lapack), should be global - this->Hk_laststep[ik] = new std::complex[len_HS]; - ModuleBase::GlobalFunc::ZEROS(Hk_laststep[ik], len_HS); - } - } - if (this->Sk_laststep == nullptr) - { - this->Sk_laststep = new std::complex*[this->kv.get_nks()]; - for (int ik = 0; ik < this->kv.get_nks(); ++ik) - { - // Allocate memory for Sk_laststep, if (use_tensor && use_lapack), should be global - this->Sk_laststep[ik] = new std::complex[len_HS]; - ModuleBase::GlobalFunc::ZEROS(Sk_laststep[ik], len_HS); - } - } + // Allocate memory for Sk_laststep, if (use_tensor && use_lapack), should be global + if (this->Sk_laststep.NumElements() != len_HS_all) + { + this->Sk_laststep = ct::Tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type_hs, + ct::TensorShape({this->kv.get_nks(), len_HS_ik})); + this->Sk_laststep.zero(); } - // put information to Hk_laststep and Sk_laststep + // Put information into psi_laststep, Hk_laststep and Sk_laststep for (int ik = 0; ik < this->kv.get_nks(); ++ik) { this->psi->fix_k(ik); this->psi_laststep->fix_k(ik); - // copy the data from psi to psi_laststep - const int size0 = this->psi->get_nbands() * this->psi->get_nbasis(); - for (int index = 0; index < size0; ++index) + // Copy data from psi to psi_laststep at k-point ik + const int len_psi_ik = this->psi->get_nbands() * this->psi->get_nbasis(); + for (int index = 0; index < len_psi_ik; ++index) { psi_laststep[0].get_pointer()[index] = this->psi[0].get_pointer()[index]; } - // store Hamiltonian - if (td_htype == 1) - { - this->p_hamilt->updateHk(ik); - hamilt::MatrixBlock> h_mat; - hamilt::MatrixBlock> s_mat; - this->p_hamilt->matrix(h_mat, s_mat); + // Get H and S matrices at k-point ik + this->p_hamilt->updateHk(ik); + hamilt::MatrixBlock> h_mat; + hamilt::MatrixBlock> s_mat; + this->p_hamilt->matrix(h_mat, s_mat); - if (use_tensor && use_lapack) - { - // Gather H and S matrices to root process + // Store H and S matrices to Hk_laststep and Sk_laststep + if (use_tensor && use_lapack) + { + // Gather H and S matrices to root process #ifdef __MPI - int myid = 0; - int num_procs = 1; - MPI_Comm_rank(MPI_COMM_WORLD, &myid); - MPI_Comm_size(MPI_COMM_WORLD, &num_procs); - - Matrix_g> h_mat_g; // Global matrix structure - Matrix_g> s_mat_g; // Global matrix structure - - // Collect H matrix - gatherMatrix(myid, 0, h_mat, h_mat_g); - BlasConnector::copy(nlocal * nlocal, h_mat_g.p.get(), 1, Hk_laststep[ik], 1); - - // Collect S matrix - gatherMatrix(myid, 0, s_mat, s_mat_g); - BlasConnector::copy(nlocal * nlocal, s_mat_g.p.get(), 1, Sk_laststep[ik], 1); + int myid = 0; + int num_procs = 1; + MPI_Comm_rank(MPI_COMM_WORLD, &myid); + MPI_Comm_size(MPI_COMM_WORLD, &num_procs); + + // Global matrix structure + module_rt::Matrix_g> h_mat_g; + module_rt::Matrix_g> s_mat_g; + + // Collect H matrix + module_rt::gatherMatrix(myid, 0, h_mat, h_mat_g); + BlasConnector::copy(len_HS_ik, + h_mat_g.p.get(), + 1, + this->Hk_laststep.template data>() + ik * len_HS_ik, + 1); + + // Collect S matrix + module_rt::gatherMatrix(myid, 0, s_mat, s_mat_g); + BlasConnector::copy(len_HS_ik, + s_mat_g.p.get(), + 1, + this->Sk_laststep.template data>() + ik * len_HS_ik, + 1); #endif - } - else - { - BlasConnector::copy(nloc, h_mat.p, 1, Hk_laststep[ik], 1); - BlasConnector::copy(nloc, s_mat.p, 1, Sk_laststep[ik], 1); - } } - } - - // calculate energy density matrix for tddft - if (istep >= (PARAM.inp.init_wfc == "file" ? 0 : 1) && PARAM.inp.td_edm == 0) - { - elecstate::cal_edm_tddft(this->pv, this->pelec, this->kv, this->p_hamilt); - } - } - + else + { + BlasConnector::copy(len_HS_ik, + h_mat.p, + 1, + this->Hk_laststep.template data>() + ik * len_HS_ik, + 1); + BlasConnector::copy(len_HS_ik, + s_mat.p, + 1, + this->Sk_laststep.template data>() + ik * len_HS_ik, + 1); + } // end use_tensor + } // end ik + } // conv_esolver } template void ESolver_KS_LCAO_TDDFT::after_scf(UnitCell& ucell, const int istep, const bool conv_esolver) { ModuleBase::TITLE("ESolver_LCAO_TDDFT", "after_scf"); - ModuleBase::timer::tick("ESolver_LCAO_TDDFT", "after_scf"); + ModuleBase::timer::tick(this->classname, "after_scf"); ESolver_KS_LCAO, TR>::after_scf(ucell, istep, conv_esolver); - // (1) write dipole information - for (int is = 0; is < PARAM.inp.nspin; is++) - { - if (PARAM.inp.out_dipole == 1) - { - std::stringstream ss_dipole; - ss_dipole << PARAM.globalv.global_out_dir << "SPIN" << is + 1 << "_DIPOLE"; - ModuleIO::write_dipole(ucell, - this->chr.rho_save[is], - this->chr.rhopw, - is, - istep, - ss_dipole.str()); - } - } - elecstate::DensityMatrix, double>* tmp_DM - = dynamic_cast>*>(this->pelec)->get_DM(); - // (2) write current information - if(TD_info::out_current) - { - if(TD_info::out_current_k) - { - ModuleIO::write_current_eachk(ucell, - istep, - this->psi, - this->pelec, - this->kv, - this->two_center_bundle_.overlap_orb.get(), - tmp_DM->get_paraV_pointer(), - this->orb_, - this->velocity_mat, - this->RA); - } - else - { - ModuleIO::write_current(ucell, - istep, - this->psi, - this->pelec, - this->kv, - this->two_center_bundle_.overlap_orb.get(), - tmp_DM->get_paraV_pointer(), - this->orb_, - this->velocity_mat, - this->RA); - } - } - // (3) output energy for sub loop - std::cout << " Potential (Ry): " << std::setprecision(15) << this->pelec->f_en.etot <0) // default value of out_freq_ion is 0 - { - if(istep % PARAM.inp.out_freq_ion == 0) - { - td_p->out_restart_info(istep, elecstate::H_TDDFT_pw::At, elecstate::H_TDDFT_pw::At_laststep); - } - } - - ModuleBase::timer::tick("ESolver_LCAO_TDDFT", "after_scf"); + // Output energy for sub-loop (electronic step) + std::cout << " Potential (Ry): " << std::setprecision(15) << this->pelec->f_en.etot << std::endl; + + // Output dipole, current, etc. + auto* hamilt_lcao = dynamic_cast, TR>*>(this->p_hamilt); + ModuleIO::ctrl_output_td(ucell, + this->chr.rho_save, + this->chr.rhopw, + istep, + this->psi, + this->pelec, + this->kv, + this->two_center_bundle_.overlap_orb.get(), + &this->pv, + this->orb_, + this->velocity_mat, + this->gd, + hamilt_lcao, + this->RA, + this->td_p, + this->exx_nao); + + ModuleBase::timer::tick(this->classname, "after_scf"); } template @@ -557,25 +516,21 @@ void ESolver_KS_LCAO_TDDFT::weight_dm_rho(const UnitCell& ucell) this->pelec->skip_weights); } - // calculate Eband energy - elecstate::calEBand(this->pelec->ekb,this->pelec->wg,this->pelec->f_en); - - // calculate the density matrix - ModuleBase::GlobalFunc::NOTE("Calculate the density matrix."); + // Calculate Eband energy + elecstate::calEBand(this->pelec->ekb, this->pelec->wg, this->pelec->f_en); - auto _pes = dynamic_cast>*>(this->pelec); - elecstate::cal_dm_psi(_pes->DM->get_paraV_pointer(), _pes->wg, this->psi[0], *(_pes->DM)); - if(PARAM.inp.td_stype == 2) + elecstate::cal_dm_psi(this->dmat.dm->get_paraV_pointer(), this->pelec->wg, this->psi[0], *this->dmat.dm); + if (PARAM.inp.td_stype == 2) { - _pes->DM->cal_DMR_td(ucell, TD_info::cart_At); + this->dmat.dm->cal_DMR_td(ucell, TD_info::cart_At); } else { - _pes->DM->cal_DMR(); + this->dmat.dm->cal_DMR(); } - // get the real-space charge density - this->pelec->psiToRho(this->psi[0]); + // get the real-space charge density, mohan add 2025-10-24 + LCAO_domain::dm2rho(this->dmat.dm->get_DMR_vector(), PARAM.inp.nspin, &this->chr); } template class ESolver_KS_LCAO_TDDFT; diff --git a/source/source_esolver/esolver_ks_lcao_tddft.h b/source/source_esolver/esolver_ks_lcao_tddft.h index 75bd287591..53e6ac77f5 100644 --- a/source/source_esolver/esolver_ks_lcao_tddft.h +++ b/source/source_esolver/esolver_ks_lcao_tddft.h @@ -2,52 +2,14 @@ #define ESOLVER_KS_LCAO_TDDFT_H #include "esolver_ks.h" #include "esolver_ks_lcao.h" -#include "source_base/module_external/scalapack_connector.h" // Cpxgemr2d -#include "source_lcao/record_adj.h" -#include "source_psi/psi.h" -#include "source_lcao/module_rt/velocity_op.h" +#include "source_base/module_container/ATen/core/tensor.h" // ct::Tensor +#include "source_lcao/module_rt/gather_mat.h" // MPI gathering and distributing functions #include "source_lcao/module_rt/td_info.h" +#include "source_lcao/module_rt/velocity_op.h" +#include "source_lcao/module_rt/boundary_fix.h" namespace ModuleESolver { -//------------------------ MPI gathering and distributing functions ------------------------// -// This struct is used for collecting matrices from all processes to root process -template -struct Matrix_g -{ - std::shared_ptr p; - size_t row; - size_t col; - std::shared_ptr desc; -}; - -// Collect matrices from all processes to root process -template -void gatherMatrix(const int myid, const int root_proc, const hamilt::MatrixBlock& mat_l, Matrix_g& mat_g) -{ - const int* desca = mat_l.desc; // Obtain the descriptor of the local matrix - int ctxt = desca[1]; // BLACS context - int nrows = desca[2]; // Global matrix row number - int ncols = desca[3]; // Global matrix column number - - if (myid == root_proc) - { - mat_g.p.reset(new T[nrows * ncols]); // No need to delete[] since it is a shared_ptr - } - else - { - mat_g.p.reset(new T[nrows * ncols]); // Placeholder for non-root processes - } - - // Set the descriptor of the global matrix - mat_g.desc.reset(new int[9]{1, ctxt, nrows, ncols, nrows, ncols, 0, 0, nrows}); - mat_g.row = nrows; - mat_g.col = ncols; - - // Call the Cpxgemr2d function in ScaLAPACK to collect the matrix data - Cpxgemr2d(nrows, ncols, mat_l.p, 1, 1, const_cast(desca), mat_g.p.get(), 1, 1, mat_g.desc.get(), ctxt); -} -//------------------------ MPI gathering and distributing functions ------------------------// template class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, TR> @@ -64,29 +26,36 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, TR> virtual void hamilt2rho_single(UnitCell& ucell, const int istep, const int iter, const double ethr) override; - // mohan change update_pot to save2, 2025-10-17 - void save2(UnitCell& ucell, const int istep, const int iter, const bool conv_esolver); + void store_h_s_psi(UnitCell& ucell, const int istep, const int iter, const bool conv_esolver); - virtual void iter_finish(UnitCell& ucell, const int istep, int& iter, bool& conv_esolver) override; + void iter_finish(UnitCell& ucell, + const int istep, + const int estep, + const int estep_max, + int& iter, + bool& conv_esolver); virtual void after_scf(UnitCell& ucell, const int istep, const bool conv_esolver) override; void print_step(); - //! wave functions of last time step - psi::Psi>* psi_laststep = nullptr; - //! Hamiltonian of last time step - std::complex** Hk_laststep = nullptr; + //! Wave function for all k-points of last time step + psi::Psi>* psi_laststep = nullptr; - //! Overlap matrix of last time step - std::complex** Sk_laststep = nullptr; + //! Hamiltonian for all k-points of last time step + ct::Tensor Hk_laststep = ct::Tensor(ct::DataType::DT_COMPLEX_DOUBLE); - const int td_htype = 1; + //! Overlap matrix for all k-points of last time step + ct::Tensor Sk_laststep = ct::Tensor(ct::DataType::DT_COMPLEX_DOUBLE); //! Control heterogeneous computing of the TDDFT solver bool use_tensor = false; bool use_lapack = false; + // Control the device type for Hk_laststep and Sk_laststep + // Set to CPU temporarily, should wait for further GPU development + static constexpr ct::DeviceType ct_device_type_hs = ct::DeviceType::CpuDevice; + //! Total steps for evolving the wave function int totstep = -1; @@ -95,7 +64,7 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, TR> TD_info* td_p = nullptr; - //! doubt + //! Restart flag bool restart_done = false; private: @@ -103,5 +72,4 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, TR> }; } // namespace ModuleESolver -#endif - +#endif // ESOLVER_KS_LCAO_TDDFT_H diff --git a/source/source_esolver/esolver_ks_lcaopw.cpp b/source/source_esolver/esolver_ks_lcaopw.cpp index 7a6d78e339..dd37188af3 100644 --- a/source/source_esolver/esolver_ks_lcaopw.cpp +++ b/source/source_esolver/esolver_ks_lcaopw.cpp @@ -1,8 +1,8 @@ #include "esolver_ks_lcaopw.h" #include "source_pw/module_pwdft/elecond.h" -#include "source_io/input_conv.h" -#include "source_io/output_log.h" +#include "source_io/module_parameter/input_conv.h" +#include "source_io/module_output/output_log.h" #include @@ -10,8 +10,7 @@ #include "source_estate/module_charge/symmetry_rho.h" #include "source_estate/occupy.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/print_info.h" +#include "source_io/module_output/print_info.h" //-----force------------------- #include "source_pw/module_pwdft/forces.h" //-----stress------------------ @@ -25,18 +24,19 @@ #include "source_hsolver/hsolver_lcaopw.h" #include "source_hsolver/kernels/hegvd_op.h" #include "source_base/kernels/math_kernel_op.h" -#include "source_io/berryphase.h" -#include "source_io/numerical_basis.h" -#include "source_io/numerical_descriptor.h" -#include "source_io/to_wannier90_pw.h" -#include "source_io/write_elecstat_pot.h" +#include "source_io/module_unk/berryphase.h" +#include "source_io/module_bessel/numerical_basis.h" +#include "source_io/module_bessel/numerical_descriptor.h" +#include "source_io/module_wannier/to_wannier90_pw.h" +#include "source_io/module_chgpot/write_elecstat_pot.h" #include "source_io/module_parameter/parameter.h" +#include "source_hamilt/module_xc/xc_functional.h" #include #include #include #ifdef __LCAO -#include "source_io/write_vxc_lip.hpp" +#include "source_io/module_hs/write_vxc_lip.hpp" #endif namespace ModuleESolver diff --git a/source/source_esolver/esolver_ks_pw.cpp b/source/source_esolver/esolver_ks_pw.cpp index 840e8968c0..b3dc5744a0 100644 --- a/source/source_esolver/esolver_ks_pw.cpp +++ b/source/source_esolver/esolver_ks_pw.cpp @@ -12,11 +12,12 @@ #include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_pw/module_pwdft/onsite_projector.h" #include "source_lcao/module_dftu/dftu.h" -#include "source_pw/module_pwdft/VSep_in_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" #include "source_pw/module_pwdft/hamilt_pw.h" #include "source_pw/module_pwdft/forces.h" #include "source_pw/module_pwdft/stress_pw.h" +#include "source_hamilt/module_xc/xc_functional.h" // use XC_Functional #ifdef __DSP #include "source_base/kernels/dsp/dsp_connector.h" @@ -24,10 +25,12 @@ #include "source_pw/module_pwdft/setup_pot.h" // mohan add 20250929 #include "source_estate/setup_estate_pw.h" // mohan add 20251005 -#include "source_io/ctrl_output_pw.h" // mohan add 20250927 +#include "source_io/module_ctrl/ctrl_output_pw.h" // mohan add 20250927 #include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006 #include "source_estate/update_pot.h" // mohan add 20251016 +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info + namespace ModuleESolver { @@ -55,7 +58,13 @@ ESolver_KS_PW::~ESolver_KS_PW() template void ESolver_KS_PW::allocate_hamilt(const UnitCell& ucell) { - this->p_hamilt = new hamilt::HamiltPW(this->pelec->pot, this->pw_wfc, &this->kv, &this->ppcell, &ucell); + this->p_hamilt = new hamilt::HamiltPW( + this->pelec->pot, + this->pw_wfc, + &this->kv, + &this->ppcell, + &this->dftu, + &ucell); } template @@ -74,7 +83,7 @@ void ESolver_KS_PW::before_all_runners(UnitCell& ucell, const Input_p //! Call before_all_runners() of ESolver_KS ESolver_KS::before_all_runners(ucell, inp); - //! setup and allocation for pelec, charge density, potentials, etc. + //! setup and allocation for pelec, potentials, etc. elecstate::setup_estate_pw(ucell, this->kv, this->sf, this->pelec, this->chr, this->locpp, this->ppcell, this->vsep_cell, this->pw_wfc, this->pw_rho, this->pw_rhod, this->pw_big, this->solvent, inp); @@ -133,8 +142,10 @@ void ESolver_KS_PW::before_scf(UnitCell& ucell, const int istep) this->allocate_hamilt(ucell); //! Setup potentials (local, non-local, sc, +U, DFT-1/2) + // note: init DFT+U is done here for pw basis for every scf iteration, however, + // init DFT+U is done in "before_all_runners" in LCAO basis. This should be refactored, mohan note 2025-11-06 pw::setup_pot(istep, ucell, this->kv, this->sf, this->pelec, this->Pgrid, - this->chr, this->locpp, this->ppcell, this->vsep_cell, + this->chr, this->locpp, this->ppcell, this->dftu, this->vsep_cell, this->stp.psi_t, this->p_hamilt, this->pw_wfc, this->pw_rhod, PARAM.inp); // setup psi (electronic wave functions) @@ -162,7 +173,7 @@ void ESolver_KS_PW::iter_init(UnitCell& ucell, const int istep, const ESolver_KS::iter_init(ucell, istep, iter); // 2) perform charge mixing for KSDFT using pw basis - module_charge::chgmixing_ks_pw(iter, this->p_chgmix, PARAM.inp); + module_charge::chgmixing_ks_pw(iter, this->p_chgmix, this->dftu, PARAM.inp); // 3) mohan move harris functional here, 2012-06-05 // use 'rho(in)' and 'v_h and v_xc'(in) @@ -172,14 +183,13 @@ void ESolver_KS_PW::iter_init(UnitCell& ucell, const int istep, const // should before lambda loop in DeltaSpin if (PARAM.inp.dft_plus_u && (iter != 1 || istep != 0)) { - auto* dftu = ModuleDFTU::DFTU::get_instance(); // only old DFT+U method should calculate energy correction in esolver, // new DFT+U method will calculate energy when evaluating the Hamiltonian - if (dftu->omc != 2) + if (this->dftu.omc != 2) { - dftu->cal_occ_pw(iter, this->stp.psi_t, this->pelec->wg, ucell, PARAM.inp.mixing_beta); + this->dftu.cal_occ_pw(iter, this->stp.psi_t, this->pelec->wg, ucell, PARAM.inp.mixing_beta); } - dftu->output(ucell); + this->dftu.output(ucell); } } @@ -279,7 +289,7 @@ void ESolver_KS_PW::iter_finish(UnitCell& ucell, const int istep, int // pp projectors, liuyu 2023-10-24 if (PARAM.globalv.use_uspp) { - ModuleBase::matrix veff = this->pelec->pot->get_effective_v(); + ModuleBase::matrix veff = this->pelec->pot->get_eff_v(); this->ppcell.cal_effective_D(veff, this->pw_rhod, ucell); } @@ -297,10 +307,7 @@ void ESolver_KS_PW::iter_finish(UnitCell& ucell, const int istep, int if (PARAM.inp.exx_thr_type == "energy") { dexx = exx_helper.cal_exx_energy(this->stp.psi_t); - } - exx_helper.set_psi(this->stp.psi_t); - if (PARAM.inp.exx_thr_type == "energy") - { + exx_helper.set_psi(this->stp.psi_t); dexx -= exx_helper.cal_exx_energy(this->stp.psi_t); // std::cout << "dexx = " << dexx << std::endl; } @@ -309,6 +316,10 @@ void ESolver_KS_PW::iter_finish(UnitCell& ucell, const int istep, int conv_esolver = exx_helper.exx_after_converge(iter, conv_ene); if (!conv_esolver) { + if (PARAM.inp.exx_thr_type != "energy") + { + exx_helper.set_psi(this->stp.psi_t); + } auto duration = std::chrono::high_resolution_clock::now() - start; std::cout << " Setting Psi for EXX PW Inner Loop took " << std::chrono::duration_cast(duration).count() / 1000.0 << "s" @@ -359,6 +370,7 @@ void ESolver_KS_PW::after_scf(UnitCell& ucell, const int istep, const if (PARAM.inp.out_elf[0] > 0) { this->ESolver_KS::psi = new psi::Psi(this->stp.psi_cpu[0]); + this->pelec->cal_tau(*(this->psi)); } // Call 'after_scf' of ESolver_KS @@ -388,7 +400,7 @@ void ESolver_KS_PW::cal_force(UnitCell& ucell, ModuleBase::matrix& fo // Calculate forces ff.cal_force(ucell, force, *this->pelec, this->pw_rhod, &ucell.symm, - &this->sf, this->solvent, &this->locpp, &this->ppcell, + &this->sf, this->solvent, &this->dftu, &this->locpp, &this->ppcell, &this->kv, this->pw_wfc, this->stp.psi_d); } @@ -400,7 +412,7 @@ void ESolver_KS_PW::cal_stress(UnitCell& ucell, ModuleBase::matrix& s // mohan add 2025-10-12 this->stp.update_psi_d(); - ss.cal_stress(stress, ucell, this->locpp, this->ppcell, this->pw_rhod, + ss.cal_stress(stress, ucell, this->dftu, this->locpp, this->ppcell, this->pw_rhod, &ucell.symm, &this->sf, &this->kv, this->pw_wfc, this->stp.psi_d); // external stress diff --git a/source/source_esolver/esolver_ks_pw.h b/source/source_esolver/esolver_ks_pw.h index 27eee6c564..01e1027d79 100644 --- a/source/source_esolver/esolver_ks_pw.h +++ b/source/source_esolver/esolver_ks_pw.h @@ -2,10 +2,9 @@ #define ESOLVER_KS_PW_H #include "./esolver_ks.h" #include "source_psi/setup_psi_pw.h" // mohan add 20251012 -#include "source_pw/module_pwdft/VSep_in_pw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_pw/module_pwdft/module_exx_helper/exx_helper.h" -#include "source_pw/module_pwdft/operator_pw/velocity_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" +#include "source_pw/module_pwdft/exx_helper.h" +#include "source_pw/module_pwdft/op_pw_vel.h" #include #include diff --git a/source/source_esolver/esolver_lj.cpp b/source/source_esolver/esolver_lj.cpp index 3f1dd95f23..d6bb6ff21c 100644 --- a/source/source_esolver/esolver_lj.cpp +++ b/source/source_esolver/esolver_lj.cpp @@ -2,8 +2,8 @@ #include "source_io/module_parameter/parameter.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_io/output_log.h" -#include "source_io/cif_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_output/cif_io.h" namespace ModuleESolver diff --git a/source/source_esolver/esolver_nep.cpp b/source/source_esolver/esolver_nep.cpp index 83dc20aa6c..680442bbf4 100644 --- a/source/source_esolver/esolver_nep.cpp +++ b/source/source_esolver/esolver_nep.cpp @@ -19,8 +19,8 @@ #include "source_base/parallel_common.h" #include "source_base/timer.h" -#include "source_io/output_log.h" -#include "source_io/cif_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_output/cif_io.h" #include #include diff --git a/source/source_esolver/esolver_nep.h b/source/source_esolver/esolver_nep.h index 82432d2e45..dfec17a83c 100644 --- a/source/source_esolver/esolver_nep.h +++ b/source/source_esolver/esolver_nep.h @@ -90,7 +90,7 @@ class ESolver_NEP : public ESolver * @note These variables are only defined if the __NEP preprocessor macro is defined. */ #ifdef __NEP - NEP3 nep; ///< NEP3 object for NEP calculations + NEP nep; ///< NEP object for NEP calculations #endif std::string nep_file; ///< directory of NEP model file diff --git a/source/source_esolver/esolver_of.cpp b/source/source_esolver/esolver_of.cpp index 598ba93bc6..4a086205c4 100644 --- a/source/source_esolver/esolver_of.cpp +++ b/source/source_esolver/esolver_of.cpp @@ -1,18 +1,20 @@ #include "esolver_of.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/cube_io.h" -#include "source_io/output_log.h" -#include "source_io/write_elecstat_pot.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_chgpot/write_elecstat_pot.h" //-----------temporary------------------------- #include "source_base/global_function.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/print_info.h" +#include "source_io/module_output/print_info.h" #include "source_estate/cal_ux.h" #include "source_pw/module_pwdft/forces.h" #include "source_pw/module_ofdft/of_stress_pw.h" +#include "source_pw/module_ofdft/of_print_info.h" +#include "source_hamilt/module_xc/xc_functional.h" + namespace ModuleESolver { @@ -25,10 +27,10 @@ ESolver_OF::ESolver_OF() ESolver_OF::~ESolver_OF() { - //**************************************************** - // do not add any codes in this deconstructor funcion - //**************************************************** - delete psi_; + //**************************************************** + // do not add any codes in this deconstructor funcion + //**************************************************** + delete psi_; delete[] this->pphi_; for (int i = 0; i < PARAM.inp.nspin; ++i) @@ -73,40 +75,15 @@ void ESolver_OF::before_all_runners(UnitCell& ucell, const Input_para& inp) ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SETUP UNITCELL"); - XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); +// XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); int func_type = XC_Functional::get_func_type(); if (func_type > 2) { ModuleBase::WARNING_QUIT("esolver_of", "meta-GGA and Hybrid functionals are not supported by OFDFT."); } - // symmetry analysis should be performed every time the cell is changed - if (ModuleSymmetry::Symmetry::symm_flag == 1) - { - ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); - } - - // Setup the k points according to symmetry. - kv.set(ucell,ucell.symm, inp.kpoint_file, inp.nspin, ucell.G, ucell.latvec, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); - - // print information - // mohan add 2021-01-30 - ModuleIO::print_parameters(ucell, kv, inp); - - // initialize the real-space uniform grid for FFT and parallel - // distribution of plane waves - Pgrid.init(pw_rho->nx, - pw_rho->ny, - pw_rho->nz, - pw_rho->nplane, - pw_rho->nrxx, - pw_big->nbz, - pw_big->bz); // mohan add 2010-07-22, update 2011-05-04 - // Calculate Structure factor - sf.setup_structure_factor(&ucell, Pgrid, pw_rho); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT BASIS"); + this->chr.init_rho(ucell, this->Pgrid, this->sf.strucFac, ucell.symm, &this->kv); + this->chr.check_rho(); // check the rho // initialize local pseudopotential this->locpp.init_vloc(ucell,pw_rho); @@ -117,12 +94,12 @@ void ESolver_OF::before_all_runners(UnitCell& ucell, const Input_para& inp) this->init_elecstate(ucell); // calculate the total local pseudopotential in real space - this->pelec->init_scf(0, ucell, Pgrid, sf.strucFac, locpp.numeric, ucell.symm); // atomic_rho, v_of_rho, set_vrs + this->pelec->init_scf(ucell, Pgrid, sf.strucFac, locpp.numeric, ucell.symm); // atomic_rho, v_of_rho, set_vrs // liuyu move here 2023-10-09 // D in uspp need vloc, thus behind init_scf() // calculate the effective coefficient matrix for non-local pseudopotential projectors - ModuleBase::matrix veff = this->pelec->pot->get_effective_v(); + ModuleBase::matrix veff = this->pelec->pot->get_eff_v(); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT POTENTIAL"); @@ -140,6 +117,7 @@ void ESolver_OF::before_all_runners(UnitCell& ucell, const Input_para& inp) this->nelec_[0] = this->pelec->nelec_spin[0]; this->nelec_[1] = this->pelec->nelec_spin[1]; } + delete[] this->kedf_manager_; this->kedf_manager_ = new KEDF_Manager(); this->kedf_manager_->init(inp, this->pw_rho, this->dV_, this->nelec_[0]); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT KEDF"); @@ -159,11 +137,7 @@ void ESolver_OF::runner(UnitCell& ucell, const int istep) this->iter_ = 0; bool conv_esolver = false; // this conv_esolver is added by mohan 20250302 -#ifdef __MPI - this->iter_time = MPI_Wtime(); -#else - this->iter_time = std::chrono::system_clock::now(); -#endif + this->iter_time = ModuleBase::get_time(); while (true) { @@ -214,6 +188,8 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell) //! 1) call before_scf() of ESolver_FP ESolver_FP::before_scf(ucell, istep); + + if (ucell.cell_parameter_updated) { this->dV_ = ucell.omega / this->pw_rho->nxyz; @@ -229,11 +205,9 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell) // Refresh the arrays delete this->psi_; - this->psi_ = new psi::Psi(1, - PARAM.inp.nspin, - this->pw_rho->nrxx, - this->pw_rho->nrxx, - true); + this->psi_ = new psi::Psi(1, PARAM.inp.nspin, + this->pw_rho->nrxx, this->pw_rho->nrxx, true); + for (int is = 0; is < PARAM.inp.nspin; ++is) { this->pphi_[is] = this->psi_->get_pointer(is); @@ -241,8 +215,9 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell) delete this->ptemp_rho_; this->ptemp_rho_ = new Charge(); - this->ptemp_rho_->set_rhopw(this->pw_rho); - this->ptemp_rho_->allocate(PARAM.inp.nspin); + this->ptemp_rho_->set_rhopw(this->pw_rho); + const bool kin_den = this->ptemp_rho_->kin_density(); // mohan add 20251202 + this->ptemp_rho_->allocate(PARAM.inp.nspin, kin_den); for (int is = 0; is < PARAM.inp.nspin; ++is) { @@ -257,7 +232,7 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell) } } - this->pelec->init_scf(istep, ucell, Pgrid, sf.strucFac, locpp.numeric, ucell.symm); + this->pelec->init_scf(ucell, Pgrid, sf.strucFac, locpp.numeric, ucell.symm); Symmetry_rho srho; for (int is = 0; is < PARAM.inp.nspin; is++) @@ -273,7 +248,7 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell) { // Here we initialize rho to be uniform, // because the rho got by pot.init_pot -> Charge::atomic_rho may contain minus elements. - this->chr.rho[is][ibs] = this->nelec_[is] / this->pelec->omega; + this->chr.rho[is][ibs] = this->nelec_[is] / ucell.omega; this->pphi_[is][ibs] = sqrt(this->chr.rho[is][ibs]); } } @@ -317,10 +292,10 @@ void ESolver_OF::update_potential(UnitCell& ucell) this->kedf_manager_->get_potential(this->chr.rho, this->pphi_, this->pw_rho, - this->pelec->pot->get_effective_v()); // KEDF potential + this->pelec->pot->get_eff_v()); // KEDF potential for (int is = 0; is < PARAM.inp.nspin; ++is) { - const double* vr_eff = this->pelec->pot->get_effective_v(is); + const double* vr_eff = this->pelec->pot->get_eff_v(is); for (int ir = 0; ir < this->pw_rho->nrxx; ++ir) { this->pdEdphi_[is][ir] = vr_eff[ir]; @@ -454,7 +429,8 @@ bool ESolver_OF::check_exit(bool& conv_esolver) conv_esolver = (this->of_conv_ == "energy" && energyConv) || (this->of_conv_ == "potential" && potConv) || (this->of_conv_ == "both" && potConv && energyConv); - this->print_info(conv_esolver); + OFDFT::print_info(this->iter_, this->iter_time, this->energy_current_, this->energy_last_, + this->normdLdphi_, this->pelec, this->kedf_manager_, conv_esolver); if (conv_esolver || this->iter_ >= this->max_iter_) { @@ -513,12 +489,12 @@ void ESolver_OF::after_opt(const int istep, UnitCell& ucell, const bool conv_eso if (PARAM.inp.of_ml_gene_data) { this->pelec->pot->update_from_charge(&this->chr, &ucell); // Hartree + XC + external - this->kedf_manager_->get_potential(this->chr.rho, - this->pphi_, - this->pw_rho, - this->pelec->pot->get_effective_v()); // KEDF potential + this->kedf_manager_->get_potential(this->chr.rho, + this->pphi_, + this->pw_rho, + this->pelec->pot->get_eff_v()); // KEDF potential - const double* vr_eff = this->pelec->pot->get_effective_v(0); + const double* vr_eff = this->pelec->pot->get_eff_v(0); for (int ir = 0; ir < this->pw_rho->nrxx; ++ir) { this->pdEdphi_[0][ir] = vr_eff[ir]; @@ -560,7 +536,7 @@ double ESolver_OF::cal_energy() this->pw_rho->nrxx, this->dV_); } - Parallel_Reduce::reduce_all(pseudopot_energy); + Parallel_Reduce::reduce_pool(pseudopot_energy); this->pelec->f_en.ekinetic = kinetic_energy; this->pelec->f_en.e_local_pp = pseudopot_energy; this->pelec->f_en.etot += kinetic_energy + pseudopot_energy; @@ -575,7 +551,10 @@ double ESolver_OF::cal_energy() void ESolver_OF::cal_force(UnitCell& ucell, ModuleBase::matrix& force) { Forces ff(ucell.nat); - ff.cal_force(ucell, force, *pelec, this->pw_rho, &ucell.symm, &sf, this->solvent, &this->locpp); + + // here nullptr is for DFT+U, which may cause bugs, mohan note 2025-11-07 + // solvent can be used? mohan ask 2025-11-07 + ff.cal_force(ucell, force, *pelec, this->pw_rho, &ucell.symm, &sf, this->solvent, nullptr, &this->locpp); } /** @@ -587,11 +566,8 @@ void ESolver_OF::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) { ModuleBase::matrix kinetic_stress_; kinetic_stress_.create(3, 3); - this->kedf_manager_->get_stress(this->pelec->omega, - this->chr.rho, - this->pphi_, - this->pw_rho, - kinetic_stress_); // kinetic stress + this->kedf_manager_->get_stress(ucell.omega, this->chr.rho, + this->pphi_, this->pw_rho, kinetic_stress_); // kinetic stress OF_Stress_PW ss(this->pelec, this->pw_rho); ss.cal_stress(stress, kinetic_stress_, ucell, &ucell.symm, this->locpp, &sf, &kv); diff --git a/source/source_esolver/esolver_of.h b/source/source_esolver/esolver_of.h index f35808cf1b..b94019d5fe 100644 --- a/source/source_esolver/esolver_of.h +++ b/source/source_esolver/esolver_of.h @@ -98,9 +98,6 @@ class ESolver_OF : public ESolver_FP void check_direction(double* dEdtheta, double** ptemp_phi, UnitCell& ucell); void test_direction(double* dEdtheta, double** ptemp_phi, UnitCell& ucell); - // --------------------- output the necessary information ----------- - void print_info(const bool conv_esolver); - // --------------------- interface to blas -------------------------- double inner_product(double* pa, double* pb, int length, double dV = 1) { diff --git a/source/source_esolver/esolver_of_interface.cpp b/source/source_esolver/esolver_of_interface.cpp index 7051308a00..d428b79506 100644 --- a/source/source_esolver/esolver_of_interface.cpp +++ b/source/source_esolver/esolver_of_interface.cpp @@ -1,5 +1,4 @@ #include "esolver_of.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" namespace ModuleESolver diff --git a/source/source_esolver/esolver_of_tddft.cpp b/source/source_esolver/esolver_of_tddft.cpp index a978a1267c..487cbbca5b 100644 --- a/source/source_esolver/esolver_of_tddft.cpp +++ b/source/source_esolver/esolver_of_tddft.cpp @@ -1,21 +1,22 @@ #include "esolver_of_tddft.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/cube_io.h" -#include "source_io/output_log.h" -#include "source_io/write_elecstat_pot.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_chgpot/write_elecstat_pot.h" //-----------temporary------------------------- #include "source_base/global_function.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_hamilt/module_ewald/H_Ewald_pw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/print_info.h" +#include "source_io/module_output/print_info.h" #include "source_estate/cal_ux.h" //-----force------------------- #include "source_pw/module_pwdft/forces.h" //-----stress------------------ #include "source_pw/module_ofdft/of_stress_pw.h" +#include + namespace ModuleESolver { @@ -39,18 +40,15 @@ void ESolver_OF_TDDFT::runner(UnitCell& ucell, const int istep) this->iter_ = 0; bool conv_esolver = false; // this conv_esolver is added by mohan 20250302 -#ifdef __MPI - this->iter_time = MPI_Wtime(); -#else - this->iter_time = std::chrono::system_clock::now(); -#endif + this->iter_time = ModuleBase::get_time(); - if (istep==0) + if (this->phi_td.empty()) { - this->phi_td.resize(PARAM.inp.nspin*this->pw_rho->nrxx); + const int size = PARAM.inp.nspin * this->pw_rho->nrxx; + this->phi_td.resize(size, std::complex(0.0, 0.0)); } - if ((istep<1) && PARAM.inp.init_chg != "file") + if ((istep==0) && PARAM.inp.init_chg != "file") { while (true) { @@ -91,7 +89,7 @@ void ESolver_OF_TDDFT::runner(UnitCell& ucell, const int istep) } } } - else if ((istep<1) && PARAM.inp.init_chg == "file") + else if ((istep==0) && PARAM.inp.init_chg == "file") { #ifdef _OPENMP #pragma omp parallel for collapse(2) @@ -107,7 +105,7 @@ void ESolver_OF_TDDFT::runner(UnitCell& ucell, const int istep) } else { - this->evolve_ofdft->propagate_psi(this->pelec, this->chr, ucell, this->phi_td, this->pw_rho); + this->evolve_ofdft->propagate_psi_RK4(this->pelec, this->chr, ucell, this->phi_td, this->pw_rho); #ifdef _OPENMP #pragma omp parallel for collapse(2) #endif diff --git a/source/source_esolver/esolver_of_tddft.h b/source/source_esolver/esolver_of_tddft.h index 99a4238c0f..85293b1761 100644 --- a/source/source_esolver/esolver_of_tddft.h +++ b/source/source_esolver/esolver_of_tddft.h @@ -15,7 +15,7 @@ class ESolver_OF_TDDFT : public ESolver_OF virtual void runner(UnitCell& ucell, const int istep) override; protected: - std::vector> phi_td; // pphi[i] = ppsi.get_pointer(i), which will be freed in ~Psi(). + std::vector> phi_td; // time dependent wavefunction Evolve_OFDFT* evolve_ofdft=nullptr; }; } // namespace ModuleESolver diff --git a/source/source_esolver/esolver_of_tool.cpp b/source/source_esolver/esolver_of_tool.cpp index 50c0ff6561..b54f4de53a 100644 --- a/source/source_esolver/esolver_of_tool.cpp +++ b/source/source_esolver/esolver_of_tool.cpp @@ -3,7 +3,6 @@ #include "source_base/memory.h" #include "source_estate/module_pot/efield.h" #include "source_estate/module_pot/gatefield.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_estate/cal_ux.h" @@ -20,9 +19,7 @@ void ESolver_OF::init_elecstate(UnitCell& ucell) if (this->pelec == nullptr) { this->pelec = new elecstate::ElecState((Charge*)(&chr), this->pw_rho, pw_big); - this->chr.allocate(PARAM.inp.nspin); } - this->pelec->omega = ucell.omega; delete this->pelec->pot; this->pelec->pot = new elecstate::Potential(this->pw_rhod, @@ -57,6 +54,10 @@ void ESolver_OF::init_elecstate(UnitCell& ucell) { pot_register_in.push_back("gatefield"); } + if (PARAM.inp.ml_exx) + { + pot_register_in.push_back("ml_exx"); + } // only Potential is not empty, Veff and Meta are available if (pot_register_in.size() > 0) { @@ -88,7 +89,8 @@ void ESolver_OF::allocate_array() delete this->ptemp_rho_; this->ptemp_rho_ = new Charge(); this->ptemp_rho_->set_rhopw(this->pw_rho); - this->ptemp_rho_->allocate(PARAM.inp.nspin); + const bool kin_den = this->ptemp_rho_->kin_density(); // mohan add 20251202 + this->ptemp_rho_->allocate(PARAM.inp.nspin, kin_den); this->theta_ = new double[PARAM.inp.nspin]; this->pdLdphi_ = new double*[PARAM.inp.nspin]; @@ -140,7 +142,7 @@ void ESolver_OF::cal_potential(double* ptemp_phi, double* rdLdphi, UnitCell& uce elecstate::cal_ux(ucell); this->pelec->pot->update_from_charge(this->ptemp_rho_, &ucell); - ModuleBase::matrix& vr_eff = this->pelec->pot->get_effective_v(); + ModuleBase::matrix& vr_eff = this->pelec->pot->get_eff_v(); this->kedf_manager_->get_potential(this->ptemp_rho_->rho, temp_phi, @@ -180,7 +182,7 @@ void ESolver_OF::cal_dEdtheta(double** ptemp_phi, Charge* temp_rho, UnitCell& uc elecstate::cal_ux(ucell); this->pelec->pot->update_from_charge(temp_rho, &ucell); - ModuleBase::matrix& vr_eff = this->pelec->pot->get_effective_v(); + ModuleBase::matrix& vr_eff = this->pelec->pot->get_eff_v(); this->kedf_manager_->get_potential(temp_rho->rho, ptemp_phi, @@ -380,140 +382,13 @@ void ESolver_OF::test_direction(double* dEdtheta, double** ptemp_phi, UnitCell& Parallel_Reduce::reduce_all(pseudopot_energy); temp_energy += kinetic_energy + pseudopot_energy; GlobalV::ofs_warning << i << " " << dEdtheta[0] << " " << temp_energy << std::endl; - if (this->theta_[0] == 0) { - std::cout << "dEdtheta " << dEdtheta[0] << std::endl; -} - } + if (this->theta_[0] == 0) + { + std::cout << "dEdtheta " << dEdtheta[0] << std::endl; + } + } exit(0); } } -/** - * @brief Print nessecary information to the screen, - * and write the components of the total energy into running_log. - */ -void ESolver_OF::print_info(const bool conv_esolver) -{ - if (this->iter_ == 0) - { - std::cout << " ============================= Running OFDFT " - "==============================" - << std::endl; - std::cout << " ITER ETOT/eV EDIFF/eV EFERMI/eV POTNORM TIME/s" - << std::endl; - } - - std::map prefix_map = { - {"cg1", "CG"}, - {"cg2", "CG"}, - {"tn", "TN"} - }; - std::string iteration = prefix_map[PARAM.inp.of_method] + std::to_string(this->iter_); -#ifdef __MPI - double duration = (double)(MPI_Wtime() - this->iter_time); -#else - double duration - = (std::chrono::duration_cast(std::chrono::system_clock::now() - this->iter_time)).count() - / static_cast(1e6); -#endif - std::cout << " " << std::setw(8) << iteration - << std::setw(18) << std::scientific << std::setprecision(8) << this->energy_current_ * ModuleBase::Ry_to_eV - << std::setw(18) << (this->energy_current_ - this->energy_last_) * ModuleBase::Ry_to_eV - << std::setw(13) << std::setprecision(4) << this->pelec->eferm.get_efval(0) * ModuleBase::Ry_to_eV - << std::setw(13) << std::setprecision(4) << this->normdLdphi_ - << std::setw(6) << std::fixed << std::setprecision(2) << duration << std::endl; - - GlobalV::ofs_running << std::setprecision(12); - GlobalV::ofs_running << std::setiosflags(std::ios::right); - - GlobalV::ofs_running << "\nIter" << this->iter_ << ": the norm of potential is " << this->normdLdphi_ << std::endl; - - std::vector titles; - std::vector energies_Ry; - std::vector energies_eV; - if ((PARAM.inp.out_band[0] > 0 && - ((this->iter_ + 1) % PARAM.inp.out_band[0] == 0 || - conv_esolver || - this->iter_ == PARAM.inp.scf_nmax)) || - PARAM.inp.init_chg == "file") - { - titles.push_back("E_Total"); - energies_Ry.push_back(this->pelec->f_en.etot); - titles.push_back("E_Kinetic"); - energies_Ry.push_back(this->pelec->f_en.ekinetic); - titles.push_back("E_Hartree"); - energies_Ry.push_back(this->pelec->f_en.hartree_energy); - titles.push_back("E_xc"); - energies_Ry.push_back(this->pelec->f_en.etxc - this->pelec->f_en.etxcc); - titles.push_back("E_LocalPP"); - energies_Ry.push_back(this->pelec->f_en.e_local_pp); - titles.push_back("E_Ewald"); - energies_Ry.push_back(this->pelec->f_en.ewald_energy); - - this->kedf_manager_->record_energy(titles, energies_Ry); - - std::string vdw_method = PARAM.inp.vdw_method; - if (vdw_method == "d2") // Peize Lin add 2014-04, update 2021-03-09 - { - titles.push_back("E_vdwD2"); - energies_Ry.push_back(this->pelec->f_en.evdw); - } - else if (vdw_method == "d3_0" || vdw_method == "d3_bj") // jiyy add 2019-05, update 2021-05-02 - { - titles.push_back("E_vdwD3"); - energies_Ry.push_back(this->pelec->f_en.evdw); - } - if (PARAM.inp.imp_sol) - { - titles.push_back("E_sol_el"); - energies_Ry.push_back(this->pelec->f_en.esol_el); - titles.push_back("E_sol_cav"); - energies_Ry.push_back(this->pelec->f_en.esol_cav); - } - if (PARAM.inp.efield_flag) - { - titles.push_back("E_efield"); - energies_Ry.push_back(elecstate::Efield::etotefield); - } - if (PARAM.inp.gate_flag) - { - titles.push_back("E_gatefield"); - energies_Ry.push_back(elecstate::Gatefield::etotgatefield); - } - } - else - { - titles.push_back("E_Total"); - energies_Ry.push_back(this->pelec->f_en.etot); - } - - if (PARAM.globalv.two_fermi) - { - titles.push_back("E_Fermi_up"); - energies_Ry.push_back(this->pelec->eferm.get_efval(0)); - titles.push_back("E_Fermi_dw"); - energies_Ry.push_back(this->pelec->eferm.get_efval(1)); - } - else - { - titles.push_back("E_Fermi"); - energies_Ry.push_back(this->pelec->eferm.get_efval(0)); - } - energies_eV.resize(energies_Ry.size()); - std::transform(energies_Ry.begin(), energies_Ry.end(), energies_eV.begin(), [](double energy) { - return energy * ModuleBase::Ry_to_eV; - }); - FmtTable table(/*titles=*/{"Energy", "Rydberg", "eV"}, - /*nrows=*/titles.size(), - /*formats=*/{"%20s", "%20.12f", "%20.12f"}, 0); - table << titles << energies_Ry << energies_eV; - GlobalV::ofs_running << table.str() << std::endl; - - // reset the iter_time for the next iteration -#ifdef __MPI - this->iter_time = MPI_Wtime(); -#else - this->iter_time = std::chrono::system_clock::now(); -#endif -} } // namespace ModuleESolver diff --git a/source/source_esolver/lcao_others.cpp b/source/source_esolver/lcao_others.cpp index 72aabae78e..f720493e75 100644 --- a/source/source_esolver/lcao_others.cpp +++ b/source/source_esolver/lcao_others.cpp @@ -1,34 +1,32 @@ -#include "source_lcao/hamilt_lcao.h" -#include "source_lcao/module_dftu/dftu.h" #include "source_esolver/esolver_ks_lcao.h" #include "source_estate/cal_ux.h" #include "source_estate/module_charge/symmetry_rho.h" -#include "source_pw/module_pwdft/global.h" -// -#include "source_io/berryphase.h" -#include "source_io/get_pchg_lcao.h" -#include "source_io/get_wf_lcao.h" -#include "source_io/write_HS_R.h" -#include "source_io/module_parameter/parameter.h" +#include "source_lcao/hamilt_lcao.h" +#include "source_lcao/module_dftu/dftu.h" +#include "source_base/formatter.h" #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_estate/elecstate_lcao.h" +#include "source_estate/module_dm/cal_dm_psi.h" +#include "source_io/module_unk/berryphase.h" +#include "source_io/module_chgpot/get_pchg_lcao.h" +#include "source_io/module_wf/get_wf_lcao.h" +#include "source_io/module_parameter/parameter.h" +#include "source_io/module_wf/read_wfc_nao.h" +#include "source_io/module_hs/write_HS_R.h" +#include "source_io/module_chgpot/write_elecstat_pot.h" #include "source_lcao/LCAO_domain.h" +#include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_lcao/module_operator_lcao/op_exx_lcao.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" -#include "source_lcao/module_deltaspin/spin_constrain.h" -#include "source_io/read_wfc_nao.h" -#include "source_io/write_elecstat_pot.h" -#include "source_base/formatter.h" -#include "source_estate/elecstate_lcao.h" -#include "source_estate/module_dm/cal_dm_psi.h" #ifdef __EXX -#include "source_io/restart_exx_csr.h" +#include "source_io/module_restart/restart_exx_csr.h" #endif // mohan add 2025-03-06 -#include "source_io/cal_test.h" +#include "source_io/module_output/cal_test.h" namespace ModuleESolver { @@ -90,23 +88,21 @@ void ESolver_KS_LCAO::others(UnitCell& ucell, const int istep) PARAM.inp.test_atom_input); // (3) Periodic condition search for each grid. - gint_info_.reset( - new ModuleGint::GintInfo( - this->pw_big->nbx, - this->pw_big->nby, - this->pw_big->nbz, - this->pw_rho->nx, - this->pw_rho->ny, - this->pw_rho->nz, - 0, - 0, - this->pw_big->nbzp_start, - this->pw_big->nbx, - this->pw_big->nby, - this->pw_big->nbzp, - orb_.Phi, - ucell, - this->gd)); + gint_info_.reset(new ModuleGint::GintInfo(this->pw_big->nbx, + this->pw_big->nby, + this->pw_big->nbz, + this->pw_rho->nx, + this->pw_rho->ny, + this->pw_rho->nz, + 0, + 0, + this->pw_big->nbzp_start, + this->pw_big->nbx, + this->pw_big->nby, + this->pw_big->nbzp, + orb_.Phi, + ucell, + this->gd)); ModuleGint::Gint::set_gint_info(gint_info_.get()); // (2)For each atom, calculate the adjacent atoms in different cells @@ -121,49 +117,8 @@ void ESolver_KS_LCAO::others(UnitCell& ucell, const int istep) // this information is used to calculate // the force. - // init psi - if (this->psi == nullptr) - { - int nsk = 0; - int ncol = 0; - if (PARAM.globalv.gamma_only_local) - { - nsk = PARAM.inp.nspin; - ncol = this->pv.ncol_bands; - if (PARAM.inp.ks_solver == "genelpa" || PARAM.inp.ks_solver == "elpa" || PARAM.inp.ks_solver == "lapack" - || PARAM.inp.ks_solver == "pexsi" || PARAM.inp.ks_solver == "cusolver" - || PARAM.inp.ks_solver == "cusolvermp") - { - ncol = this->pv.ncol; - } - } - else - { - nsk = this->kv.get_nks(); -#ifdef __MPI - ncol = this->pv.ncol_bands; -#else - ncol = PARAM.inp.nbands; -#endif - } - this->psi = new psi::Psi(nsk, ncol, this->pv.nrow, this->kv.ngk, true); - } - - // init wfc from file - if (istep == 0 && PARAM.inp.init_wfc == "file") - { - if (!ModuleIO::read_wfc_nao(PARAM.globalv.global_readin_dir, - this->pv, - *(this->psi), - this->pelec->ekb, - this->pelec->wg, - this->pelec->klist->ik2iktot, - this->pelec->klist->get_nkstot(), - PARAM.inp.nspin)) - { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::others", "read wfc nao failed"); - } - } + // init psi deleted by taoni 2026-01-23 + // don't need to since initialized in LCAO_domain::set_psi_occ_dm_chg in before_all_runners // init Hamiltonian if (this->p_hamilt != nullptr) @@ -173,28 +128,20 @@ void ESolver_KS_LCAO::others(UnitCell& ucell, const int istep) } if (this->p_hamilt == nullptr) { - elecstate::DensityMatrix* DM = dynamic_cast*>(this->pelec)->get_DM(); - this->p_hamilt = new hamilt::HamiltLCAO( - ucell, - this->gd, - &this->pv, - this->pelec->pot, - this->kv, - two_center_bundle_, - orb_, - DM, - this->deepks -#ifdef __EXX - , - istep, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->two_level_step : &this->exx_nao.exc->two_level_step, - GlobalC::exx_info.info_ri.real_number ? &this->exx_nao.exd->get_Hexxs() : nullptr, - GlobalC::exx_info.info_ri.real_number ? nullptr : &this->exx_nao.exc->get_Hexxs() -#endif - ); + this->p_hamilt = new hamilt::HamiltLCAO(ucell, + this->gd, + &this->pv, + this->pelec->pot, + this->kv, + two_center_bundle_, + orb_, + this->dmat.dm, + &this->dftu, + this->deepks, + istep, + this->exx_nao); } - // for each ionic step, the overlap must be rebuilt // since it depends on ionic positions this->deepks.build_overlap(ucell, orb_, pv, gd, *(two_center_bundle_.overlap_orb_alpha), PARAM.inp); @@ -214,6 +161,7 @@ void ESolver_KS_LCAO::others(UnitCell& ucell, const int istep) this->kv, this->p_hamilt, this->psi, + this->dmat.dm, this->pelec); } @@ -224,7 +172,7 @@ void ESolver_KS_LCAO::others(UnitCell& ucell, const int istep) elecstate::cal_ux(ucell); // pelec should be initialized before these calculations - this->pelec->init_scf(istep, ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); + this->pelec->init_scf(ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm); // self consistent calculations for electronic ground state if (cal_type == "get_pchg") diff --git a/source/source_esolver/pw_others.cpp b/source/source_esolver/pw_others.cpp index 38c3c927b0..fc42df14bd 100644 --- a/source/source_esolver/pw_others.cpp +++ b/source/source_esolver/pw_others.cpp @@ -1,13 +1,13 @@ #include "esolver_ks_pw.h" #include "source_base/memory.h" #include "source_base/module_device/device.h" -#include "source_io/numerical_basis.h" -#include "source_io/numerical_descriptor.h" +#include "source_io/module_bessel/numerical_basis.h" +#include "source_io/module_bessel/numerical_descriptor.h" #include "source_base/formatter.h" // mohan add 2025-03-06 -#include "source_io/cal_test.h" +#include "source_io/module_output/cal_test.h" namespace ModuleESolver { diff --git a/source/source_esolver/test/CMakeLists.txt b/source/source_esolver/test/CMakeLists.txt index c1e94abb70..f297fc7378 100644 --- a/source/source_esolver/test/CMakeLists.txt +++ b/source/source_esolver/test/CMakeLists.txt @@ -6,5 +6,5 @@ install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) AddTest( TARGET esolver_dp_test LIBS parameter ${math_libs} base device - SOURCES esolver_dp_test.cpp ../esolver_dp.cpp ../../source_io/cif_io.cpp ../../source_io/output_log.cpp + SOURCES esolver_dp_test.cpp ../esolver_dp.cpp ../../source_io/module_output/cif_io.cpp ../../source_io/module_output/output_log.cpp ) diff --git a/source/source_estate/CMakeLists.txt b/source/source_estate/CMakeLists.txt index 8a54110e55..658285ed75 100644 --- a/source/source_estate/CMakeLists.txt +++ b/source/source_estate/CMakeLists.txt @@ -13,9 +13,10 @@ list(APPEND objects module_pot/H_Hartree_pw.cpp module_pot/pot_xc.cpp module_pot/pot_local.cpp - module_pot/pot_local_paw.cpp module_pot/potential_new.cpp module_pot/potential_types.cpp + module_pot/pot_ml_exx.cpp + module_pot/pot_ml_exx_label.cpp module_pot/pot_sep.cpp module_charge/chgmixing.cpp module_charge/charge.cpp @@ -45,9 +46,8 @@ list(APPEND objects if(ENABLE_LCAO) list(APPEND objects elecstate_lcao.cpp - elecstate_lcao_cal_tau.cpp module_pot/H_TDDFT_pw.cpp - module_dm/setup_dm.cpp + module_dm/init_dm.cpp module_dm/density_matrix.cpp module_dm/density_matrix_io.cpp module_dm/cal_dm_psi.cpp diff --git a/source/source_estate/cal_ux.cpp b/source/source_estate/cal_ux.cpp index 5175e48d5a..f7ea856386 100644 --- a/source/source_estate/cal_ux.cpp +++ b/source/source_estate/cal_ux.cpp @@ -93,7 +93,7 @@ void cal_ux(UnitCell& ucell) { bool judge_parallel(double a[3], ModuleBase::Vector3 b) { bool jp = false; - double cross; + double cross = 0.0; cross = pow((a[1] * b.z - a[2] * b.y), 2) + pow((a[2] * b.x - a[0] * b.z), 2) + pow((a[0] * b.y - a[1] * b.x), 2); diff --git a/source/source_estate/elecstate.cpp b/source/source_estate/elecstate.cpp index 72ac36f06b..5e2c6a8ced 100644 --- a/source/source_estate/elecstate.cpp +++ b/source/source_estate/elecstate.cpp @@ -27,8 +27,7 @@ void ElecState::init_nelec_spin() } } -void ElecState::init_scf(const int istep, - const UnitCell& ucell, +void ElecState::init_scf(const UnitCell& ucell, const Parallel_Grid& pgrid, const ModuleBase::ComplexMatrix& strucfac, const bool* numeric, @@ -38,31 +37,21 @@ void ElecState::init_scf(const int istep, //! core correction potential. this->charge->set_rho_core(ucell,strucfac, numeric); - //! other effective potentials need charge density, - // choose charge density from ionic step 0. - if (istep == 0) - { - this->charge->init_rho(this->eferm,ucell, pgrid, strucfac, symm, (const void*)this->klist, wfcpw); - this->charge->check_rho(); // check the rho - } - //! renormalize the charge density this->charge->renormalize_rho(); //! initialize the potential - this->pot->init_pot(istep, this->charge); + this->pot->init_pot(this->charge); } -void ElecState::init_ks(Charge* chg_in, // pointer for class Charge +void ElecState::init_ks(Charge* chr_in, // pointer for class Charge const K_Vectors* klist_in, int nk_in, - ModulePW::PW_Basis* rhopw_in, const ModulePW::PW_Basis_Big* bigpw_in) { - this->charge = chg_in; + this->charge = chr_in; this->klist = klist_in; - this->charge->set_rhopw(rhopw_in); this->bigpw = bigpw_in; // init nelec_spin with nelec and nupdown this->init_nelec_spin(); diff --git a/source/source_estate/elecstate.h b/source/source_estate/elecstate.h index a59d2bf4c3..888b3b95dc 100644 --- a/source/source_estate/elecstate.h +++ b/source/source_estate/elecstate.h @@ -17,9 +17,9 @@ class ElecState ElecState() { } - ElecState(Charge* charge_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) + ElecState(Charge* chr_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) { - this->charge = charge_in; + this->charge = chr_in; this->charge->set_rhopw(rhopw_in); this->bigpw = bigpw_in; this->eferm.two_efermi = PARAM.globalv.two_fermi; @@ -32,10 +32,9 @@ class ElecState this->pot = nullptr; } } - void init_ks(Charge* chg_in, // pointer for class Charge + void init_ks(Charge* chr_in, // pointer for class Charge const K_Vectors* klist_in, int nk_in, // number of k points - ModulePW::PW_Basis* rhopw_in, const ModulePW::PW_Basis_Big* bigpw_in); // return current electronic density rho, as a input for constructing Hamiltonian @@ -98,14 +97,12 @@ class ElecState /** * @brief Init rho_core, init rho, renormalize rho, init pot * - * @param istep i-th step * @param ucell unit cell * @param strucfac structure factor * @param symm symmetry * @param wfcpw PW basis for wave function if needed */ - void init_scf(const int istep, - const UnitCell& ucell, + void init_scf(const UnitCell& ucell, const Parallel_Grid& pgrid, const ModuleBase::ComplexMatrix& strucfac, const bool* numeric, @@ -114,7 +111,6 @@ class ElecState std::string classname = "elecstate"; int iter = 0; ///< scf iteration - double omega = 0.0; ///< volume Potential* pot = nullptr; ///< pointer to potential Charge* charge = nullptr; ///< pointer to charge density const K_Vectors* klist = nullptr; ///< pointer to k points lists diff --git a/source/source_estate/elecstate_energy.cpp b/source/source_estate/elecstate_energy.cpp index 1e24bbf89a..ea8687f853 100644 --- a/source/source_estate/elecstate_energy.cpp +++ b/source/source_estate/elecstate_energy.cpp @@ -22,26 +22,35 @@ void ElecState::cal_bandgap() int nks = this->klist->get_nks(); double vbm = -std::numeric_limits::infinity(); // Valence Band Maximum double cbm = std::numeric_limits::infinity(); // Conduction Band Minimum + const double threshold = 1.0e-5; // threshold to avoid E_gap(k) = 0 for (int ib = 0; ib < nbands; ib++) { for (int ik = 0; ik < nks; ik++) { - if (this->ekb(ik, ib) <= this->eferm.ef && this->ekb(ik, ib) > vbm) + if (this->ekb(ik, ib) <= this->eferm.ef + threshold && this->ekb(ik, ib) > vbm) { vbm = this->ekb(ik, ib); } - if (this->ekb(ik, ib) >= this->eferm.ef && this->ekb(ik, ib) < cbm) + if (this->ekb(ik, ib) > this->eferm.ef + threshold && this->ekb(ik, ib) < cbm) { cbm = this->ekb(ik, ib); } } } - -#ifdef __MPI - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, vbm); - Parallel_Reduce::gather_min_double_all(GlobalV::NPROC, cbm); -#endif - + // Assign fermi level to CBM if it's still infinity + if(cbm == std::numeric_limits::infinity()) + { + cbm =this->eferm.ef; + } + // Assign fermi level to VBM if it's still negative infinity + if(vbm ==-std::numeric_limits::infinity()) + { + vbm =this->eferm.ef; + } + #ifdef __MPI + Parallel_Reduce::reduce_max(vbm); + Parallel_Reduce::reduce_min(cbm); + #endif this->bandgap = cbm - vbm; } @@ -62,42 +71,59 @@ void ElecState::cal_bandgap_updw() double cbm_up = std::numeric_limits::infinity(); double vbm_dw = -std::numeric_limits::infinity(); double cbm_dw = std::numeric_limits::infinity(); + const double threshold = 1.0e-5; for (int ib = 0; ib < nbands; ib++) { for (int ik = 0; ik < nks; ik++) { if (this->klist->isk[ik] == 0) { - if (this->ekb(ik, ib) <= this->eferm.ef_up && this->ekb(ik, ib) > vbm_up) + if (this->ekb(ik, ib) <= this->eferm.ef_up + threshold && this->ekb(ik, ib) > vbm_up) { vbm_up = this->ekb(ik, ib); } - if (this->ekb(ik, ib) >= this->eferm.ef_up && this->ekb(ik, ib) < cbm_up) + if (this->ekb(ik, ib) > this->eferm.ef_up + threshold && this->ekb(ik, ib) < cbm_up) { cbm_up = this->ekb(ik, ib); } } if (this->klist->isk[ik] == 1) { - if (this->ekb(ik, ib) <= this->eferm.ef_dw && this->ekb(ik, ib) > vbm_dw) + if (this->ekb(ik, ib) <= this->eferm.ef_dw + threshold && this->ekb(ik, ib) > vbm_dw) { vbm_dw = this->ekb(ik, ib); } - if (this->ekb(ik, ib) >= this->eferm.ef_dw && this->ekb(ik, ib) < cbm_dw) + if (this->ekb(ik, ib) > this->eferm.ef_dw + threshold && this->ekb(ik, ib) < cbm_dw) { cbm_dw = this->ekb(ik, ib); } } } } - -#ifdef __MPI - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, vbm_up); - Parallel_Reduce::gather_min_double_all(GlobalV::NPROC, cbm_up); - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, vbm_dw); - Parallel_Reduce::gather_min_double_all(GlobalV::NPROC, cbm_dw); -#endif - + // Assign fermi level to CBM if it's still infinity + if (cbm_up == std::numeric_limits::infinity()) + { + cbm_up =this->eferm.ef_up; + } + if (cbm_dw == std::numeric_limits::infinity()) + { + cbm_dw =this->eferm.ef_dw; + } + // Assign fermi level to VBM if it's still negative infinity + if(vbm_up ==-std::numeric_limits::infinity()) + { + vbm_up =this->eferm.ef_up; + } + if(vbm_dw ==-std::numeric_limits::infinity()) + { + vbm_dw =this->eferm.ef_dw; + } + #ifdef __MPI + Parallel_Reduce::reduce_max(vbm_up); + Parallel_Reduce::reduce_min(cbm_up); + Parallel_Reduce::reduce_max(vbm_dw); + Parallel_Reduce::reduce_min(cbm_dw); + #endif this->bandgap_up = cbm_up - vbm_up; this->bandgap_dw = cbm_dw - vbm_dw; } @@ -105,15 +131,15 @@ void ElecState::cal_bandgap_updw() /// @brief calculate deband double ElecState::cal_delta_eband(const UnitCell& ucell) const { - // out potentials from potential mixing - // total energy and band energy corrections + ModuleBase::timer::tick("ElecState", "cal_delta_eband"); + // out potentials from potential mixing + // total energy and band energy corrections double deband0 = 0.0; - double deband_aux = 0.0; // only potential related with charge is used here for energy correction - // on the fly calculate it here by v_effective - v_fixed - const double* v_eff = this->pot->get_effective_v(0); + // on the fly calculate it here by v_eff - v_fixed + const double* v_eff = this->pot->get_eff_v(0); const double* v_fixed = this->pot->get_fixed_v(); const double* v_ofk = nullptr; const bool v_ofk_flag = (XC_Functional::get_ked_flag()); @@ -122,10 +148,11 @@ double ElecState::cal_delta_eband(const UnitCell& ucell) const { deband_aux -= this->charge->rho[0][ir] * (v_eff[ir] - v_fixed[ir]); } + if (v_ofk_flag) { - v_ofk = this->pot->get_effective_vofk(0); - // cause in the get_effective_vofk, the func will return nullptr + v_ofk = this->pot->get_eff_vofk(0); + // cause in the get_eff_vofk, the func will return nullptr if (v_ofk == nullptr && this->charge->rhopw->nrxx > 0) { ModuleBase::WARNING_QUIT("ElecState::cal_delta_eband", "v_ofk is nullptr"); @@ -138,14 +165,14 @@ double ElecState::cal_delta_eband(const UnitCell& ucell) const if (PARAM.inp.nspin == 2) { - v_eff = this->pot->get_effective_v(1); + v_eff = this->pot->get_eff_v(1); for (int ir = 0; ir < this->charge->rhopw->nrxx; ir++) { deband_aux -= this->charge->rho[1][ir] * (v_eff[ir] - v_fixed[ir]); } if (v_ofk_flag) { - v_ofk = this->pot->get_effective_vofk(1); + v_ofk = this->pot->get_eff_vofk(1); if (v_ofk == nullptr && this->charge->rhopw->nrxx > 0) { ModuleBase::WARNING_QUIT("ElecState::cal_delta_eband", "v_ofk is nullptr"); @@ -160,7 +187,7 @@ double ElecState::cal_delta_eband(const UnitCell& ucell) const { for (int is = 1; is < 4; is++) { - v_eff = this->pot->get_effective_v(is); + v_eff = this->pot->get_eff_v(is); for (int ir = 0; ir < this->charge->rhopw->nrxx; ir++) { deband_aux -= this->charge->rho[is][ir] * v_eff[ir]; @@ -174,17 +201,20 @@ double ElecState::cal_delta_eband(const UnitCell& ucell) const deband0 = deband_aux; #endif - deband0 *= this->omega / this->charge->rhopw->nxyz; + deband0 *= ucell.omega / this->charge->rhopw->nxyz; // \int rho(r) v_{exx}(r) dr = 2 E_{exx}[rho] deband0 -= 2 * this->f_en.exx; // Peize Lin add 2017-10-16 + + ModuleBase::timer::tick("ElecState", "cal_delta_eband"); return deband0; } /// @brief calculate descf double ElecState::cal_delta_escf() const { - ModuleBase::TITLE("energy", "delta_escf"); + ModuleBase::TITLE("ElecState", "cal_delta_escf"); + ModuleBase::timer::tick("ElecState", "cal_delta_escf"); double descf = 0.0; // now rho1 is "mixed" charge density @@ -192,21 +222,21 @@ double ElecState::cal_delta_escf() const // because in "deband" the energy is calculated from "output" charge density, // so here is the correction. // only potential related with charge is used here for energy correction - // on the fly calculate it here by v_effective - v_fixed - const double* v_eff = this->pot->get_effective_v(0); + // on the fly calculate it here by v_eff - v_fixed + const double* v_eff = this->pot->get_eff_v(0); const double* v_fixed = this->pot->get_fixed_v(); const double* v_ofk = nullptr; if (XC_Functional::get_ked_flag()) { - v_ofk = this->pot->get_effective_vofk(0); + v_ofk = this->pot->get_eff_vofk(0); } for (int ir = 0; ir < this->charge->rhopw->nrxx; ir++) { descf -= (this->charge->rho[0][ir] - this->charge->rho_save[0][ir]) * (v_eff[ir] - v_fixed[ir]); if (XC_Functional::get_ked_flag()) { - // cause in the get_effective_vofk, the func will return nullptr + // cause in the get_eff_vofk, the func will return nullptr assert(v_ofk != nullptr); descf -= (this->charge->kin_r[0][ir] - this->charge->kin_r_save[0][ir]) * v_ofk[ir]; } @@ -214,10 +244,10 @@ double ElecState::cal_delta_escf() const if (PARAM.inp.nspin == 2) { - v_eff = this->pot->get_effective_v(1); + v_eff = this->pot->get_eff_v(1); if (XC_Functional::get_ked_flag()) { - v_ofk = this->pot->get_effective_vofk(1); + v_ofk = this->pot->get_eff_vofk(1); } for (int ir = 0; ir < this->charge->rhopw->nrxx; ir++) { @@ -232,7 +262,7 @@ double ElecState::cal_delta_escf() const { for (int is = 1; is < 4; is++) { - v_eff = this->pot->get_effective_v(is); + v_eff = this->pot->get_eff_v(is); for (int ir = 0; ir < this->charge->rhopw->nrxx; ir++) { descf -= (this->charge->rho[is][ir] - this->charge->rho_save[is][ir]) * v_eff[ir]; @@ -246,7 +276,15 @@ double ElecState::cal_delta_escf() const assert(this->charge->rhopw->nxyz > 0); - descf *= this->omega / this->charge->rhopw->nxyz; + descf *= this->charge->rhopw->omega / this->charge->rhopw->nxyz; + +// mohan move the code here, 2025-11-28 +#ifdef __MPI + MPI_Bcast(&descf, 1, MPI_DOUBLE, 0, BP_WORLD); +#endif + + + ModuleBase::timer::tick("ElecState", "cal_delta_escf"); return descf; } @@ -301,6 +339,10 @@ void ElecState::cal_energies(const int type) this->f_en.e_local_pp = get_local_pp_energy(); +#ifdef __MLALGO + this->f_en.ml_exx = this->pot->get_ml_exx_energy(); +#endif + if (type == 1) // Harris-Foulkes functional { this->f_en.calculate_harris(); @@ -311,7 +353,7 @@ void ElecState::cal_energies(const int type) } else { - ModuleBase::WARNING_QUIT("cal_energies", "The form of total energy functional is unknown!"); + ModuleBase::WARNING_QUIT("ElecState::cal_energies", "The form of total energy functional is unknown!"); } } diff --git a/source/source_estate/elecstate_energy_terms.cpp b/source/source_estate/elecstate_energy_terms.cpp index 73abe5f17b..c7bb4b55a5 100644 --- a/source/source_estate/elecstate_energy_terms.cpp +++ b/source/source_estate/elecstate_energy_terms.cpp @@ -4,7 +4,7 @@ #include "source_estate/module_pot/gatefield.h" #include "source_lcao/module_deepks/LCAO_deepks.h" #include "source_lcao/module_deltaspin/spin_constrain.h" -#include "source_lcao/module_dftu/dftu.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 namespace elecstate { @@ -36,7 +36,7 @@ double ElecState::get_solvent_model_Acav() double ElecState::get_dftu_energy() { - return GlobalC::dftu.get_energy(); + return Plus_U::get_energy(); } double ElecState::get_local_pp_energy() @@ -45,11 +45,14 @@ double ElecState::get_local_pp_energy() for (int is = 0; is < PARAM.inp.nspin; ++is) { local_pseudopot_energy - += BlasConnector::dot(this->charge->rhopw->nrxx, this->pot->get_fixed_v(), 1, this->charge->rho[is], 1) - * this->charge->rhopw->omega / this->charge->rhopw->nxyz; + += BlasConnector::dot(this->charge->rhopw->nrxx, + this->pot->get_fixed_v(), + 1, + this->charge->rho[is], 1) + * this->charge->rhopw->omega / this->charge->rhopw->nxyz; } - Parallel_Reduce::reduce_all(local_pseudopot_energy); + Parallel_Reduce::reduce_pool(local_pseudopot_energy); return local_pseudopot_energy; } -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/source_estate/elecstate_exx.cpp b/source/source_estate/elecstate_exx.cpp index b8854de319..addc7a03da 100644 --- a/source/source_estate/elecstate_exx.cpp +++ b/source/source_estate/elecstate_exx.cpp @@ -1,4 +1,5 @@ -#include "source_pw/module_pwdft/global.h" +#include "source_estate/elecstate.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info namespace elecstate { @@ -16,4 +17,4 @@ void ElecState::set_exx(const double& Eexx) return; } -} \ No newline at end of file +} diff --git a/source/source_estate/elecstate_lcao.cpp b/source/source_estate/elecstate_lcao.cpp index fe3bb11758..ffe81901e7 100644 --- a/source/source_estate/elecstate_lcao.cpp +++ b/source/source_estate/elecstate_lcao.cpp @@ -1,11 +1,9 @@ -#include "elecstate_lcao.h" - -#include "cal_dm.h" +#include "source_estate/elecstate_lcao.h" +#include "source_estate/cal_dm.h" #include "source_base/timer.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_lcao/module_deltaspin/spin_constrain.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_lcao/module_gint/gint_interface.h" @@ -15,74 +13,6 @@ namespace elecstate { -// multi-k case -template <> -void ElecStateLCAO>::psiToRho(const psi::Psi>& psi) -{ - ModuleBase::TITLE("ElecStateLCAO", "psiToRho"); - ModuleBase::timer::tick("ElecStateLCAO", "psiToRho"); - - for (int is = 0; is < PARAM.inp.nspin; is++) - { - ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], - this->charge->nrxx); // mohan 2009-11-10 - } - - //------------------------------------------------------------ - // calculate the charge density on real space grid. - //------------------------------------------------------------ - - ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!"); - ModuleGint::cal_gint_rho(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho); - - if (XC_Functional::get_ked_flag()) - { - this->cal_tau(psi); - } - - this->charge->renormalize_rho(); - - ModuleBase::timer::tick("ElecStateLCAO", "psiToRho"); - return; -} - -// Gamma_only case -template <> -void ElecStateLCAO::psiToRho(const psi::Psi& psi) -{ - ModuleBase::TITLE("ElecStateLCAO", "psiToRho"); - ModuleBase::timer::tick("ElecStateLCAO", "psiToRho"); - - for (int is = 0; is < PARAM.inp.nspin; is++) - { - ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], - this->charge->nrxx); // mohan 2009-11-10 - } - - //------------------------------------------------------------ - // calculate the charge density on real space grid. - //------------------------------------------------------------ - ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!"); - - ModuleGint::cal_gint_rho(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho); - - if (XC_Functional::get_ked_flag()) - { - this->cal_tau(psi); - } - - this->charge->renormalize_rho(); - - ModuleBase::timer::tick("ElecStateLCAO", "psiToRho"); - return; -} - -template -void ElecStateLCAO::init_DM(const K_Vectors* kv, const Parallel_Orbitals* paraV, const int nspin) -{ - const int nspin_dm = nspin == 2 ? 2 : 1; - this->DM = new DensityMatrix(paraV, nspin_dm, kv->kvec_d, kv->get_nks() / nspin_dm); -} template <> double ElecStateLCAO::get_spin_constrain_energy() @@ -99,11 +29,12 @@ double ElecStateLCAO>::get_spin_constrain_energy() return sc.cal_escon(); } -#ifdef __PEXSI template <> -void ElecStateLCAO::dmToRho(std::vector pexsi_DM, std::vector pexsi_EDM) +void ElecStateLCAO::dm2rho(std::vector pexsi_DM, + std::vector pexsi_EDM, + DensityMatrix* dm) { - ModuleBase::timer::tick("ElecStateLCAO", "dmToRho"); + ModuleBase::timer::tick("ElecStateLCAO", "dm2rho"); int nspin = PARAM.inp.nspin; if (PARAM.inp.nspin == 4) @@ -111,13 +42,15 @@ void ElecStateLCAO::dmToRho(std::vector pexsi_DM, std::vectorget_DM()->pexsi_EDM = pexsi_EDM; +#ifdef __PEXSI + dm->pexsi_EDM = pexsi_EDM; +#endif for (int is = 0; is < nspin; is++) { - this->DM->set_DMK_pointer(is, pexsi_DM[is]); + dm->set_DMK_pointer(is, pexsi_DM[is]); } - DM->cal_DMR(); + dm->cal_DMR(); for (int is = 0; is < PARAM.inp.nspin; is++) { @@ -126,30 +59,30 @@ void ElecStateLCAO::dmToRho(std::vector pexsi_DM, std::vectorDM->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho); + ModuleGint::cal_gint_rho(dm->get_DMR_vector(), PARAM.inp.nspin, this->charge->rho); if (XC_Functional::get_ked_flag()) { for (int is = 0; is < PARAM.inp.nspin; is++) { ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[0], this->charge->nrxx); } - ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r); + ModuleGint::cal_gint_tau(dm->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r); } this->charge->renormalize_rho(); - ModuleBase::timer::tick("ElecStateLCAO", "dmToRho"); + ModuleBase::timer::tick("ElecStateLCAO", "dm2rho"); return; } template <> -void ElecStateLCAO>::dmToRho(std::vector*> pexsi_DM, - std::vector*> pexsi_EDM) +void ElecStateLCAO>::dm2rho(std::vector*> pexsi_DM, + std::vector*> pexsi_EDM, + DensityMatrix, double>* dm) { ModuleBase::WARNING_QUIT("ElecStateLCAO", "pexsi is not completed for multi-k case"); } -#endif template class ElecStateLCAO; // Gamma_only case template class ElecStateLCAO>; // multi-k case diff --git a/source/source_estate/elecstate_lcao.h b/source/source_estate/elecstate_lcao.h index 7c19f2c39b..bf1f11e1f7 100644 --- a/source/source_estate/elecstate_lcao.h +++ b/source/source_estate/elecstate_lcao.h @@ -15,48 +15,27 @@ class ElecStateLCAO : public ElecState ElecStateLCAO() { } // will be called by ElecStateLCAO_TDDFT - ElecStateLCAO(Charge* chg_in, + ElecStateLCAO(Charge* chr_in, const K_Vectors* klist_in, int nks_in, - ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) { - init_ks(chg_in, klist_in, nks_in, rhopw_in, bigpw_in); + init_ks(chr_in, klist_in, nks_in, bigpw_in); this->classname = "ElecStateLCAO"; } virtual ~ElecStateLCAO() { - if (this->DM != nullptr) - { - delete this->DM; - } } - // void init(Charge* chg_in):charge(chg_in){} override; - - // interface for HSolver to calculate rho from Psi - virtual void psiToRho(const psi::Psi& psi) override; - // virtual void psiToRho(const psi::Psi& psi) override; - // return current electronic density rho, as a input for constructing Hamiltonian - // const double* getRho(int spin) const override; - virtual void cal_tau(const psi::Psi& psi) override; - // update charge density for next scf step // void getNewRho() override; - // initial density matrix - void init_DM(const K_Vectors* kv, const Parallel_Orbitals* paraV, const int nspin); - DensityMatrix* get_DM() const - { - return const_cast*>(this->DM); - } static int out_wfc_lcao; static bool need_psi_grid; double get_spin_constrain_energy() override; -#ifdef __PEXSI // use for pexsi /** @@ -65,19 +44,9 @@ class ElecStateLCAO : public ElecState * @param pexsi_EDM: pointers of energy-weighed density matrix (EDMK) calculated by pexsi, needed by MD, will be * stored in DensityMatrix::pexsi_EDM */ - void dmToRho(std::vector pexsi_DM, std::vector pexsi_EDM); -#endif - - DensityMatrix* DM = nullptr; - - protected: - // calculate electronic charge density on grid points or density matrix in real space - // the consequence charge density rho saved into rho_out, preparing for charge mixing. - // void updateRhoK(const psi::Psi>& psi) ;//override; - // sum over all pools for rho and ebands - // void parallelK(); - // calcualte rho for each k - // void rhoBandK(const psi::Psi>& psi); + void dm2rho(std::vector pexsi_DM, + std::vector pexsi_EDM, + DensityMatrix* dm); }; diff --git a/source/source_estate/elecstate_lcao_cal_tau.cpp b/source/source_estate/elecstate_lcao_cal_tau.cpp deleted file mode 100644 index a2a4210002..0000000000 --- a/source/source_estate/elecstate_lcao_cal_tau.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "elecstate_lcao.h" -#include "source_lcao/module_gint/gint_interface.h" - -#include "source_base/timer.h" - -namespace elecstate -{ - -// calculate the kinetic energy density tau, multi-k case -template <> -void ElecStateLCAO>::cal_tau(const psi::Psi>& psi) -{ - ModuleBase::timer::tick("ElecStateLCAO", "cal_tau"); - - for (int is = 0; is < PARAM.inp.nspin; is++) - { - ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx); - } - ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r); - ModuleBase::timer::tick("ElecStateLCAO", "cal_tau"); - return; -} - -// calculate the kinetic energy density tau, gamma-only case -template <> -void ElecStateLCAO::cal_tau(const psi::Psi& psi) -{ - ModuleBase::timer::tick("ElecStateLCAO", "cal_tau"); - - for (int is = 0; is < PARAM.inp.nspin; is++) - { - ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx); - } - ModuleGint::cal_gint_tau(this->DM->get_DMR_vector(), PARAM.inp.nspin, this->charge->kin_r); - - ModuleBase::timer::tick("ElecStateLCAO", "cal_tau"); - return; -} -} \ No newline at end of file diff --git a/source/source_estate/elecstate_print.cpp b/source/source_estate/elecstate_print.cpp index 4a5918f75e..84c7972a41 100644 --- a/source/source_estate/elecstate_print.cpp +++ b/source/source_estate/elecstate_print.cpp @@ -192,28 +192,52 @@ void print_etot(const Magnetism& magnet, if( (iter % PARAM.inp.out_freq_elec == 0) || converged || iter == PARAM.inp.scf_nmax ) { int n_order = std::max(0, Occupy::gaussian_type); + + //! Kohn-Sham functional energy titles.push_back("E_KohnSham"); energies_Ry.push_back(elec.f_en.etot); + + //! Kohn-Sham energy with sigma->0 titles.push_back("E_KS(sigma->0)"); energies_Ry.push_back(elec.f_en.etot - elec.f_en.demet / (2 + n_order)); + + //! Harris functional energy titles.push_back("E_Harris"); energies_Ry.push_back(elec.f_en.etot_harris); + + //! band energy titles.push_back("E_band"); energies_Ry.push_back(elec.f_en.eband); + + //! one-electron energy titles.push_back("E_one_elec"); energies_Ry.push_back(elec.f_en.eband + elec.f_en.deband); + + //! Hartree energy titles.push_back("E_Hartree"); energies_Ry.push_back(elec.f_en.hartree_energy); + + //! exchange-correlation energy titles.push_back("E_xc"); energies_Ry.push_back(elec.f_en.etxc - elec.f_en.etxcc); + + //! Ewald energy titles.push_back("E_Ewald"); energies_Ry.push_back(elec.f_en.ewald_energy); + + //! entropy energy titles.push_back("E_entropy(-TS)"); energies_Ry.push_back(elec.f_en.demet); + + //! correction energy for scf titles.push_back("E_descf"); energies_Ry.push_back(elec.f_en.descf); - titles.push_back("E_LocalPP"); + + //! local potential energy + titles.push_back("E_localpp"); energies_Ry.push_back(elec.f_en.e_local_pp); + + //! vdw energy std::string vdw_method = PARAM.inp.vdw_method; if (vdw_method == "d2") // Peize Lin add 2014-04, update 2021-03-09 { @@ -225,8 +249,19 @@ void print_etot(const Magnetism& magnet, titles.push_back("E_vdwD3"); energies_Ry.push_back(elec.f_en.evdw); } + + // mohan add 20251108 + if (PARAM.inp.dft_plus_u) + { + titles.push_back("E_plusU"); + energies_Ry.push_back(elec.f_en.edftu); + } + + //! hybrid functional energy titles.push_back("E_exx"); energies_Ry.push_back(elec.f_en.exx); + + //! solvation energy if (PARAM.inp.imp_sol) { titles.push_back("E_sol_el"); @@ -234,23 +269,33 @@ void print_etot(const Magnetism& magnet, titles.push_back("E_sol_cav"); energies_Ry.push_back(elec.f_en.esol_cav); } + + //! electric field energy if (PARAM.inp.efield_flag) { titles.push_back("E_efield"); energies_Ry.push_back(elecstate::Efield::etotefield); } + + //! gate energy if (PARAM.inp.gate_flag) { titles.push_back("E_gatefield"); energies_Ry.push_back(elecstate::Gatefield::etotgatefield); } + //! deepks energy #ifdef __MLALGO if (PARAM.inp.deepks_scf) { titles.push_back("E_DeePKS"); energies_Ry.push_back(elec.f_en.edeepks_delta); } + if (PARAM.inp.ml_exx) + { + titles.push_back("E_ML-EXX"); + energies_Ry.push_back(elec.f_en.ml_exx); + } #endif } else diff --git a/source/source_estate/elecstate_pw.cpp b/source/source_estate/elecstate_pw.cpp index caffd1211b..2d24321f2a 100644 --- a/source/source_estate/elecstate_pw.cpp +++ b/source/source_estate/elecstate_pw.cpp @@ -13,11 +13,10 @@ namespace elecstate { template ElecStatePW::ElecStatePW(ModulePW::PW_Basis_K* wfc_basis_in, - Charge* chg_in, + Charge* chr_in, K_Vectors* pkv_in, UnitCell* ucell_in, pseudopot_cell_vnl* ppcell_in, - ModulePW::PW_Basis* rhodpw_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) : basis(wfc_basis_in) @@ -26,7 +25,7 @@ ElecStatePW::ElecStatePW(ModulePW::PW_Basis_K* wfc_basis_in, this->rhopw_smooth = rhopw_in; this->ppcell = ppcell_in; this->ucell = ucell_in; - this->init_ks(chg_in, pkv_in, pkv_in->get_nks(), rhodpw_in, bigpw_in); + this->init_ks(chr_in, pkv_in, pkv_in->get_nks(), bigpw_in); } template diff --git a/source/source_estate/elecstate_pw.h b/source/source_estate/elecstate_pw.h index c3d7568dc4..f674beed89 100644 --- a/source/source_estate/elecstate_pw.h +++ b/source/source_estate/elecstate_pw.h @@ -20,11 +20,10 @@ class ElecStatePW : public ElecState public: ElecStatePW(ModulePW::PW_Basis_K* wfc_basis_in, - Charge* chg_in, + Charge* chr_in, K_Vectors* pkv_in, UnitCell* ucell_in, pseudopot_cell_vnl* ppcell_in, - ModulePW::PW_Basis* rhodpw_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in); diff --git a/source/source_estate/elecstate_pw_sdft.cpp b/source/source_estate/elecstate_pw_sdft.cpp index 4c04fbd886..1df5545cb5 100644 --- a/source/source_estate/elecstate_pw_sdft.cpp +++ b/source/source_estate/elecstate_pw_sdft.cpp @@ -42,4 +42,4 @@ template class ElecStatePW_SDFT, base_device::DEVICE_CPU>; #if ((defined __CUDA) || (defined __ROCM)) template class ElecStatePW_SDFT, base_device::DEVICE_GPU>; #endif -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/source_estate/elecstate_pw_sdft.h b/source/source_estate/elecstate_pw_sdft.h index fe9ab81834..0ffa00efc4 100644 --- a/source/source_estate/elecstate_pw_sdft.h +++ b/source/source_estate/elecstate_pw_sdft.h @@ -8,15 +8,14 @@ class ElecStatePW_SDFT : public ElecStatePW { public: ElecStatePW_SDFT(ModulePW::PW_Basis_K* wfc_basis_in, - Charge* chg_in, + Charge* chr_in, K_Vectors* pkv_in, UnitCell* ucell_in, pseudopot_cell_vnl* ppcell_in, - ModulePW::PW_Basis* rhodpw_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) : ElecStatePW(wfc_basis_in, chg_in, pkv_in, ucell_in, ppcell_in, rhodpw_in, rhopw_in, bigpw_in) + Device>(wfc_basis_in, chr_in, pkv_in, ucell_in, ppcell_in, rhopw_in, bigpw_in) { this->classname = "ElecStatePW_SDFT"; } @@ -27,4 +26,4 @@ class ElecStatePW_SDFT : public ElecStatePW using castmem_var_d2h_op = base_device::memory::cast_memory_op; }; } // namespace elecstate -#endif \ No newline at end of file +#endif diff --git a/source/source_estate/fp_energy.cpp b/source/source_estate/fp_energy.cpp index 8c11a3fac1..a8d3124b4f 100644 --- a/source/source_estate/fp_energy.cpp +++ b/source/source_estate/fp_energy.cpp @@ -16,7 +16,7 @@ namespace elecstate double fenergy::calculate_etot() { etot = eband + deband + (etxc - etxcc) + ewald_energy + hartree_energy + demet + descf + exx + efield - + gatefield + evdw + esol_el + esol_cav + edftu + edeepks_scf + escon; + + gatefield + evdw + esol_el + esol_cav + edftu + edeepks_scf + escon + ml_exx; return etot; } @@ -24,7 +24,7 @@ double fenergy::calculate_etot() double fenergy::calculate_harris() { etot_harris = eband + deband_harris + (etxc - etxcc) + ewald_energy + hartree_energy + demet + descf + exx - + efield + gatefield + evdw + esol_el + esol_cav + edftu + edeepks_scf + escon; + + efield + gatefield + evdw + esol_el + esol_cav + edftu + edeepks_scf + escon + ml_exx; return etot_harris; } @@ -33,7 +33,7 @@ void fenergy::clear_all() { etot = etot_old = eband = deband = etxc = etxcc = vtxc = ewald_energy = hartree_energy = demet = descf = exx = efield = gatefield = evdw = etot_harris = deband_harris = esol_el = esol_cav = edftu = edeepks_scf = escon - = 0.0; + = ml_exx = 0.0; } /// @brief print all energies @@ -49,6 +49,7 @@ void fenergy::print_all() const std::cout << " entropy(-TS)=" << demet << std::endl; std::cout << " descf=" << descf << std::endl; std::cout << " exx=" << exx << std::endl; + std::cout << " ml_exx=" << ml_exx << std::endl; std::cout << " efiled=" << efield << std::endl; std::cout << " gatefiled=" << gatefield << std::endl; std::cout << " evdw=" << evdw << std::endl; diff --git a/source/source_estate/fp_energy.h b/source/source_estate/fp_energy.h index 4d6ff36d5f..3f37ca2656 100644 --- a/source/source_estate/fp_energy.h +++ b/source/source_estate/fp_energy.h @@ -29,6 +29,7 @@ struct fenergy double demet = 0.0; ///< correction for metals or entropy (-TS) double descf = 0.0; ///< correction by the difference of rho double exx = 0.0; ///< the exact exchange energy. + double ml_exx = 0.0; ///< the ML-EXX energy. double efield = 0.0; ///< dipole potential in surface calculations double gatefield = 0.0; ///< correction energy for gatefield diff --git a/source/source_estate/kernels/cuda/elecstate_op.cu b/source/source_estate/kernels/cuda/elecstate_op.cu index 8b9753facc..4597a1f1ad 100644 --- a/source/source_estate/kernels/cuda/elecstate_op.cu +++ b/source/source_estate/kernels/cuda/elecstate_op.cu @@ -71,7 +71,7 @@ void elecstate_pw_op::operator()(const base_dev reinterpret_cast*>(wfcr) ); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -91,7 +91,7 @@ void elecstate_pw_op::operator()(const base_dev reinterpret_cast*>(wfcr_another_spin) ); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct elecstate_pw_op; diff --git a/source/source_estate/kernels/elecstate_op.cpp b/source/source_estate/kernels/elecstate_op.cpp index 0a1bd731da..c3933319fc 100644 --- a/source/source_estate/kernels/elecstate_op.cpp +++ b/source/source_estate/kernels/elecstate_op.cpp @@ -70,7 +70,7 @@ struct elecstate_pw_op } else { #ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 4096/sizeof(FPTYPE)) +#pragma omp parallel for collapse(2) schedule(static) #endif for (int is = 1; is < 4; is++) { diff --git a/source/source_estate/magnetism.cpp b/source/source_estate/magnetism.cpp index 3d42ce6062..a31bec1f79 100644 --- a/source/source_estate/magnetism.cpp +++ b/source/source_estate/magnetism.cpp @@ -23,8 +23,11 @@ void Magnetism::compute_mag(const double& omega, const double* const * rho, double* nelec_spin) { + assert(omega>0.0); assert(nxyz>0); + const double fac = omega / nxyz; + if (PARAM.inp.nspin==2) { this->tot_mag = 0.00; @@ -40,8 +43,8 @@ void Magnetism::compute_mag(const double& omega, Parallel_Reduce::reduce_pool(this->tot_mag); Parallel_Reduce::reduce_pool(this->abs_mag); #endif - this->tot_mag *= omega / nxyz; - this->abs_mag *= omega / nxyz; + this->tot_mag *= fac; + this->abs_mag *= fac; ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"Total magnetism (Bohr mag/cell)",this->tot_mag); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"Absolute magnetism (Bohr mag/cell)",this->abs_mag); @@ -82,7 +85,7 @@ void Magnetism::compute_mag(const double& omega, #endif for(int i=0;i<3;i++) { - this->tot_mag_nc[i] *= omega/ nxyz; + this->tot_mag_nc[i] *= fac; // mohan add 2025-06-21 if( std::abs(this->tot_mag_nc[i]) < 1.0e-16) { @@ -90,7 +93,7 @@ void Magnetism::compute_mag(const double& omega, } } - this->abs_mag *= omega/ nxyz; + this->abs_mag *= fac; // mohan update 2025-06-21 ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"Total magnetism (Bohr mag/cell)", diff --git a/source/source_estate/module_charge/charge.cpp b/source/source_estate/module_charge/charge.cpp index be86a04800..7c8008c34d 100644 --- a/source/source_estate/module_charge/charge.cpp +++ b/source/source_estate/module_charge/charge.cpp @@ -53,6 +53,19 @@ void Charge::set_rhopw(ModulePW::PW_Basis* rhopw_in) this->rhopw = rhopw_in; } +// mohan add 2025-12-02 +bool Charge::kin_density() +{ + if (XC_Functional::get_ked_flag() || PARAM.inp.out_elf[0] > 0) + { + return true; + } + else + { + return false; + } +} + void Charge::destroy() { if (allocate_rho || allocate_rho_final_scf) // LiuXh add 20180619 @@ -77,13 +90,20 @@ void Charge::destroy() } } -void Charge::allocate(const int& nspin_in) +void Charge::allocate(const int& nspin_in, const bool kin_den) { ModuleBase::TITLE("Charge", "allocate"); + + if (this->rhopw == nullptr) + { + ModuleBase::WARNING_QUIT("Charge::allocate","rhopw is nullptr."); + } + this->nrxx = this->rhopw->nrxx; this->nxyz = this->rhopw->nxyz; this->ngmc = this->rhopw->npw; + if (allocate_rho == true) { this->destroy(); @@ -105,7 +125,7 @@ void Charge::allocate(const int& nspin_in) _space_rho_save = new double[nspin * nrxx]; _space_rhog = new std::complex[nspin * ngmc]; _space_rhog_save = new std::complex[nspin * ngmc]; - if (XC_Functional::get_ked_flag() || PARAM.inp.out_elf[0] > 0) + if(kin_den) { _space_kin_r = new double[nspin * nrxx]; _space_kin_r_save = new double[nspin * nrxx]; @@ -114,7 +134,7 @@ void Charge::allocate(const int& nspin_in) rhog = new std::complex*[nspin]; rho_save = new double*[nspin]; rhog_save = new std::complex*[nspin]; - if (XC_Functional::get_ked_flag() || PARAM.inp.out_elf[0] > 0) + if(kin_den) { kin_r = new double*[nspin]; kin_r_save = new double*[nspin]; @@ -129,7 +149,7 @@ void Charge::allocate(const int& nspin_in) ModuleBase::GlobalFunc::ZEROS(rhog[is], ngmc); ModuleBase::GlobalFunc::ZEROS(rho_save[is], nrxx); ModuleBase::GlobalFunc::ZEROS(rhog_save[is], ngmc); - if (XC_Functional::get_ked_flag() || PARAM.inp.out_elf[0] > 0) + if(kin_den) { kin_r[is] = _space_kin_r + is * nrxx; ModuleBase::GlobalFunc::ZEROS(kin_r[is], nrxx); @@ -142,7 +162,7 @@ void Charge::allocate(const int& nspin_in) ModuleBase::Memory::record("Chg::rho_save", sizeof(double) * nspin * nrxx); ModuleBase::Memory::record("Chg::rhog", sizeof(double) * nspin * ngmc); ModuleBase::Memory::record("Chg::rhog_save", sizeof(double) * nspin * ngmc); - if (XC_Functional::get_ked_flag() || PARAM.inp.out_elf[0] > 0) + if(kin_den) { ModuleBase::Memory::record("Chg::kin_r", sizeof(double) * nspin * ngmc); ModuleBase::Memory::record("Chg::kin_r_save", sizeof(double) * nspin * ngmc); @@ -634,6 +654,8 @@ void Charge::save_rho_before_sum_band() double Charge::cal_rho2ne(const double* rho_in) const { + assert(this->rhopw->nxyz > 0); // mohan add 2025-12-02 + double ne = 0.0; for (int ir = 0; ir < this->rhopw->nrxx; ir++) { diff --git a/source/source_estate/module_charge/charge.h b/source/source_estate/module_charge/charge.h index 479eb8dc66..79a5f5ca9e 100644 --- a/source/source_estate/module_charge/charge.h +++ b/source/source_estate/module_charge/charge.h @@ -7,7 +7,7 @@ #include "source_base/parallel_global.h" #include "source_basis/module_pw/pw_basis.h" #include "source_cell/module_symmetry/symmetry.h" -#include "source_estate/fp_energy.h" +// #include "source_estate/fp_energy.h" #include "source_pw/module_pwdft/parallel_grid.h" //a forward declaration of UnitCell @@ -77,15 +77,17 @@ class Charge * @param klist [in] k points list if needed * @param wfcpw [in] PW basis for wave function if needed */ - void init_rho(elecstate::Efermi& eferm_iout, - const UnitCell& ucell, + void init_rho(const UnitCell& ucell, const Parallel_Grid& pgrid, const ModuleBase::ComplexMatrix& strucFac, ModuleSymmetry::Symmetry& symm, const void* klist = nullptr, const void* wfcpw = nullptr); - void allocate(const int &nspin_in); + // mohan add 2025-12-02 + bool kin_density(); + + void allocate(const int &nspin_in, const bool kin_den); void atomic_rho(const int spin_number_need, const double& omega, @@ -97,8 +99,6 @@ class Charge const ModuleBase::ComplexMatrix& structure_factor, const bool* numeric); - void set_rho_core_paw(); - void renormalize_rho(); double sum_rho() const; diff --git a/source/source_estate/module_charge/charge_extra.cpp b/source/source_estate/module_charge/charge_extra.cpp index 345a34b723..5d3c7e96d1 100644 --- a/source/source_estate/module_charge/charge_extra.cpp +++ b/source/source_estate/module_charge/charge_extra.cpp @@ -4,7 +4,7 @@ #include "source_base/global_variable.h" #include "source_base/timer.h" #include "source_base/tool_threading.h" -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" Charge_Extra::Charge_Extra() { @@ -107,7 +107,7 @@ void Charge_Extra::extrapolate_charge( rho_extr = std::min(istep, pot_order); if(rho_extr == 0) { - sf->setup_structure_factor(&ucell, *Pgrid, chr->rhopw); + sf->setup(&ucell, *Pgrid, chr->rhopw); ofs_running << " charge density from previous step !" << std::endl; return; } @@ -169,7 +169,7 @@ void Charge_Extra::extrapolate_charge( } } - sf->setup_structure_factor(&ucell, *Pgrid, chr->rhopw); + sf->setup(&ucell, *Pgrid, chr->rhopw); double** rho_atom = new double*[this->nspin]; for (int is = 0; is < this->nspin; is++) { @@ -314,4 +314,4 @@ void Charge_Extra::update_delta_rho(const UnitCell& ucell, const Charge* chr, co } delete[] rho_atom; return; -} \ No newline at end of file +} diff --git a/source/source_estate/module_charge/charge_init.cpp b/source/source_estate/module_charge/charge_init.cpp index b3a034c3d2..e93f1210c9 100644 --- a/source/source_estate/module_charge/charge_init.cpp +++ b/source/source_estate/module_charge/charge_init.cpp @@ -12,14 +12,15 @@ #include "source_base/timer.h" #include "source_base/tool_threading.h" #include "source_estate/magnetism.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/cube_io.h" -#include "source_io/rhog_io.h" -#include "source_io/read_wf2rho_pw.h" - -void Charge::init_rho(elecstate::Efermi& eferm_iout, - const UnitCell& ucell, +#include "source_io/module_output/cube_io.h" +#include "source_io/module_chgpot/rhog_io.h" +#include "source_io/module_wf/read_wf2rho_pw.h" +#include "source_io/module_restart/restart.h" +#include "source_hamilt/module_xc/xc_functional.h" +#include "source_cell/klist.h" + +void Charge::init_rho(const UnitCell& ucell, const Parallel_Grid& pgrid, const ModuleBase::ComplexMatrix& strucFac, ModuleSymmetry::Symmetry& symm, @@ -59,14 +60,14 @@ void Charge::init_rho(elecstate::Efermi& eferm_iout, { for (int is = 0; is < nspin; ++is) { - std::stringstream ssc; + std::stringstream ssc; if(nspin==1) { ssc << PARAM.globalv.global_readin_dir << "chg.cube"; } else - { + { ssc << PARAM.globalv.global_readin_dir << "chgs" << is + 1 << ".cube"; } @@ -117,7 +118,7 @@ void Charge::init_rho(elecstate::Efermi& eferm_iout, { const std::string warn_msg = " WARNING: \"init_chg\" is enabled but ABACUS failed to read\n charge density from file.\n" - " Please check if there is chgsx.cube (x=1,2,etc.) or\n {suffix}-CHARGE-DENSITY.restart in the " + " Please check if there is chg.cube (for nspin=1) or chgsx.cube (x=1,2,etc.) or\n {suffix}-CHARGE-DENSITY.restart in the " "directory.\n"; std::cout << warn_msg; if (PARAM.inp.init_chg == "file") @@ -229,7 +230,7 @@ void Charge::init_rho(elecstate::Efermi& eferm_iout, } catch (const std::exception& e) { - // try to load from the output of `out_chg` + // try to load from the output of `out_chg` std::stringstream ssc; ssc << PARAM.globalv.global_readin_dir << "chgs" << is + 1 << ".cube"; if (ModuleIO::read_vdata_palgrid(pgrid, @@ -261,7 +262,7 @@ void Charge::init_rho(elecstate::Efermi& eferm_iout, ModuleIO::read_wf2rho_pw(pw_wfc, symm, *this, PARAM.globalv.global_readin_dir, - GlobalV::KPAR, GlobalV::MY_POOL, GlobalV::MY_RANK, + GlobalV::KPAR, GlobalV::MY_POOL, GlobalV::MY_RANK, GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, PARAM.inp.nbands, nspin, PARAM.globalv.npol, kv->get_nkstot(),kv->ik2iktot,kv->isk,GlobalV::ofs_running); @@ -272,7 +273,7 @@ void Charge::init_rho(elecstate::Efermi& eferm_iout, // computes the core charge on the real space 3D mesh. //========================================================== void Charge::set_rho_core(const UnitCell& ucell, - const ModuleBase::ComplexMatrix& structure_factor, + const ModuleBase::ComplexMatrix& structure_factor, const bool* numeric) { ModuleBase::TITLE("Charge","set_rho_core"); @@ -299,7 +300,7 @@ void Charge::set_rho_core(const UnitCell& ucell, ModuleBase::GlobalFunc::ZEROS(rhocg, this->rhopw->ngg ); // three dimension. - std::complex *vg = new std::complex[this->rhopw->npw]; + std::complex *vg = new std::complex[this->rhopw->npw]; for (int it = 0; it < ucell.ntype;it++) { @@ -372,11 +373,6 @@ void Charge::set_rho_core(const UnitCell& ucell, return; } // end subroutine set_rhoc -void Charge::set_rho_core_paw() -{ - ModuleBase::TITLE("Charge","set_rho_core_paw"); -} - void Charge::non_linear_core_correction ( @@ -397,7 +393,7 @@ void Charge::non_linear_core_correction double gx = 0.0; double rhocg1 = 0.0; - double *aux; + double *aux = nullptr; // here we compute the fourier transform is the charge in numeric form if (numeric) @@ -429,11 +425,11 @@ void Charge::non_linear_core_correction igl_end += igl_beg; // G <> 0 term - for (int igl = igl_beg; igl < igl_end;igl++) + for (int igl = igl_beg; igl < igl_end;igl++) { gx = sqrt(this->rhopw->gg_uniq[igl] * tpiba2); ModuleBase::Sphbes::Spherical_Bessel(mesh, r, gx, 0, aux); - for (int ir = 0;ir < mesh; ir++) + for (int ir = 0;ir < mesh; ir++) { aux [ir] = r[ir] * r[ir] * rhoc [ir] * aux [ir]; } // enddo @@ -451,7 +447,7 @@ void Charge::non_linear_core_correction }; // end kernel // do not use omp parallel when this function is already in parallel block - // + // // it is called in parallel block in Forces::cal_force_cc, // but not in other funtcion such as Stress_Func::stress_cc. ModuleBase::TRY_OMP_PARALLEL(kernel); diff --git a/source/source_estate/module_charge/charge_mixing.cpp b/source/source_estate/module_charge/charge_mixing.cpp index 67e887a344..320edc37ef 100644 --- a/source/source_estate/module_charge/charge_mixing.cpp +++ b/source/source_estate/module_charge/charge_mixing.cpp @@ -4,7 +4,7 @@ #include "source_base/module_mixing/broyden_mixing.h" #include "source_base/module_mixing/pulay_mixing.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" +#include "source_hamilt/module_xc/xc_functional.h" Charge_Mixing::Charge_Mixing() { diff --git a/source/source_estate/module_charge/charge_mixing_preconditioner.cpp b/source/source_estate/module_charge/charge_mixing_preconditioner.cpp index 333cfb59e4..a2fecdb91c 100644 --- a/source/source_estate/module_charge/charge_mixing_preconditioner.cpp +++ b/source/source_estate/module_charge/charge_mixing_preconditioner.cpp @@ -2,7 +2,6 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" void Charge_Mixing::Kerker_screen_recip(std::complex* drhog) { diff --git a/source/source_estate/module_charge/charge_mixing_residual.cpp b/source/source_estate/module_charge/charge_mixing_residual.cpp index bbc7c7b6be..9120ff4b35 100644 --- a/source/source_estate/module_charge/charge_mixing_residual.cpp +++ b/source/source_estate/module_charge/charge_mixing_residual.cpp @@ -1,9 +1,8 @@ #include "charge_mixing.h" - #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/parallel_reduce.h" +#include "source_hamilt/module_xc/xc_functional.h" double Charge_Mixing::get_drho(Charge* chr, const double nelec) { diff --git a/source/source_estate/module_charge/charge_mixing_rho.cpp b/source/source_estate/module_charge/charge_mixing_rho.cpp index 38cd679f94..3eb3e91d1a 100644 --- a/source/source_estate/module_charge/charge_mixing_rho.cpp +++ b/source/source_estate/module_charge/charge_mixing_rho.cpp @@ -1,7 +1,7 @@ #include "charge_mixing.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" +#include "source_hamilt/module_xc/xc_functional.h" void Charge_Mixing::mix_rho_recip(Charge* chr) { diff --git a/source/source_estate/module_charge/charge_mpi.cpp b/source/source_estate/module_charge/charge_mpi.cpp index db1b458fbf..32fc8bc195 100644 --- a/source/source_estate/module_charge/charge_mpi.cpp +++ b/source/source_estate/module_charge/charge_mpi.cpp @@ -119,9 +119,10 @@ void Charge::reduce_diff_pools(double* array_rho) const void Charge::rho_mpi() { ModuleBase::TITLE("Charge", "rho_mpi"); - if (GlobalV::KPAR * PARAM.inp.bndpar <= 1) { - return; -} + if (GlobalV::KPAR * PARAM.inp.bndpar <= 1) + { + return; + } ModuleBase::timer::tick("Charge", "rho_mpi"); for (int is = 0; is < PARAM.inp.nspin; ++is) @@ -136,4 +137,4 @@ void Charge::rho_mpi() ModuleBase::timer::tick("Charge", "rho_mpi"); return; } -#endif \ No newline at end of file +#endif diff --git a/source/source_estate/module_charge/chgmixing.cpp b/source/source_estate/module_charge/chgmixing.cpp index 59467fc010..45e5c5b350 100644 --- a/source/source_estate/module_charge/chgmixing.cpp +++ b/source/source_estate/module_charge/chgmixing.cpp @@ -15,6 +15,7 @@ void module_charge::chgmixing_ks(const int iter, // scf iteration number const double &hsolver_error, const double &scf_thr, const double &scf_ene_thr, + const bool converged_u, // mohan add 2025-11-06 const Input_para& inp) // input parameters { @@ -36,17 +37,8 @@ void module_charge::chgmixing_ks(const int iter, // scf iteration number // drho will be 0 at p_chgmix->mixing_restart step, which is // not ground state bool not_restart_step = !(iter == p_chgmix->mixing_restart_step && inp.mixing_restart > 0.0); - // SCF will continue if U is not converged for uramping calculation - bool is_U_converged = true; - // to avoid unnecessary dependence on dft+u, refactor is needed -#ifdef __LCAO - if (inp.dft_plus_u) - { - is_U_converged = GlobalC::dftu.u_converged(); - } -#endif - conv_esolver = (drho < scf_thr && not_restart_step && is_U_converged); + conv_esolver = (drho < scf_thr && not_restart_step && converged_u); // add energy threshold for SCF convergence if (scf_ene_thr > 0.0) @@ -67,8 +59,6 @@ void module_charge::chgmixing_ks(const int iter, // scf iteration number } } - - // If drho < hsolver_error in the first iter or drho < scf_thr, we // do not change rho. if (drho < hsolver_error || conv_esolver || inp.calculation == "nscf") @@ -127,9 +117,9 @@ void module_charge::chgmixing_ks(const int iter, // scf iteration number } - void module_charge::chgmixing_ks_pw(const int iter, // scf iteration number Charge_Mixing* p_chgmix, // charge mixing class + Plus_U &dftu, // mohan add 2025-11-06 const Input_para& inp) // input parameters { ModuleBase::TITLE("module_charge", "chgmixing_ks_pw"); @@ -148,12 +138,11 @@ void module_charge::chgmixing_ks_pw(const int iter, // scf iteration number if (inp.dft_plus_u) { - auto* dftu = ModuleDFTU::DFTU::get_instance(); - if (dftu->uramping > 0.01 && !dftu->u_converged()) + if (dftu.uramping > 0.01 && !dftu.u_converged()) { p_chgmix->mixing_restart_step = inp.scf_nmax + 1; } - if (dftu->uramping > 0.01) + if (dftu.uramping > 0.01) { bool do_uramping = true; if (inp.sc_mag_switch) @@ -167,11 +156,11 @@ void module_charge::chgmixing_ks_pw(const int iter, // scf iteration number } if (do_uramping) { - dftu->uramping_update(); // update U by uramping if uramping > 0.01 + dftu.uramping_update(); // update U by uramping if uramping > 0.01 std::cout << " U-Ramping! Current U = "; - for (int i = 0; i < dftu->U0.size(); i++) + for (int i = 0; i < dftu.U0.size(); i++) { - std::cout << dftu->U[i] * ModuleBase::Ry_to_eV << " "; + std::cout << dftu.U[i] * ModuleBase::Ry_to_eV << " "; } std::cout << " eV " << std::endl; } @@ -184,6 +173,7 @@ void module_charge::chgmixing_ks_pw(const int iter, // scf iteration number void module_charge::chgmixing_ks_lcao(const int iter, // scf iteration number Charge_Mixing* p_chgmix, // charge mixing class + Plus_U &dftu, // mohan add 2025-11-06 const int nnr, // dimension of density matrix const Input_para& inp) // input parameters { @@ -195,12 +185,12 @@ void module_charge::chgmixing_ks_lcao(const int iter, // scf iteration number p_chgmix->mixing_restart_step = inp.scf_nmax + 1; p_chgmix->mixing_restart_count = 0; // this output will be removed once the feeature is stable - if (GlobalC::dftu.uramping > 0.01) + if (dftu.uramping > 0.01) { std::cout << " U-Ramping! Current U = "; - for (int i = 0; i < GlobalC::dftu.U0.size(); i++) + for (int i = 0; i < dftu.U0.size(); i++) { - std::cout << GlobalC::dftu.U[i] * ModuleBase::Ry_to_eV << " "; + std::cout << dftu.U[i] * ModuleBase::Ry_to_eV << " "; } std::cout << " eV " << std::endl; } @@ -213,17 +203,17 @@ void module_charge::chgmixing_ks_lcao(const int iter, // scf iteration number p_chgmix->mixing_restart_count++; if (inp.dft_plus_u) { - GlobalC::dftu.uramping_update(); // update U by uramping if uramping > 0.01 - if (GlobalC::dftu.uramping > 0.01) + dftu.uramping_update(); // update U by uramping if uramping > 0.01 + if (dftu.uramping > 0.01) { std::cout << " U-Ramping! Current U = "; - for (int i = 0; i < GlobalC::dftu.U0.size(); i++) + for (int i = 0; i < dftu.U0.size(); i++) { - std::cout << GlobalC::dftu.U[i] * ModuleBase::Ry_to_eV << " "; + std::cout << dftu.U[i] * ModuleBase::Ry_to_eV << " "; } std::cout << " eV " << std::endl; } - if (GlobalC::dftu.uramping > 0.01 && !GlobalC::dftu.u_converged()) + if (dftu.uramping > 0.01 && !dftu.u_converged()) { p_chgmix->mixing_restart_step = inp.scf_nmax + 1; } diff --git a/source/source_estate/module_charge/chgmixing.h b/source/source_estate/module_charge/chgmixing.h index 3be8660013..4a04a0880d 100644 --- a/source/source_estate/module_charge/chgmixing.h +++ b/source/source_estate/module_charge/chgmixing.h @@ -6,6 +6,7 @@ #include "source_estate/module_charge/charge_mixing.h" // use p_chgmix #include "source_io/module_parameter/input_parameter.h" // use Input_para #include "source_cell/unitcell.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 namespace module_charge { @@ -22,14 +23,17 @@ void chgmixing_ks(const int iter, // scf iteration number const double &hsolver_error, const double &scf_thr, const double &scf_ene_thr, + const bool converged_u, // mohan add 2025-11-06 const Input_para& inp); // input parameters void chgmixing_ks_pw(const int iter, Charge_Mixing* p_chgmix, + Plus_U &dftu, // mohan add 2025-11-06 const Input_para& inp); // input parameters void chgmixing_ks_lcao(const int iter, // scf iteration number Charge_Mixing* p_chgmix, // charge mixing class + Plus_U &dftu, // mohan add 2025-11-06 const int nnr, // dimension of density matrix const Input_para& inp); // input parameters diff --git a/source/source_estate/module_charge/symmetry_rhog.cpp b/source/source_estate/module_charge/symmetry_rhog.cpp index aae2103b75..7d37df1d80 100644 --- a/source/source_estate/module_charge/symmetry_rhog.cpp +++ b/source/source_estate/module_charge/symmetry_rhog.cpp @@ -1,5 +1,5 @@ #include "symmetry_rho.h" -#include "source_pw/module_pwdft/global.h" +#include "source_base/parallel_reduce.h" #include "source_base/parallel_global.h" #include "source_hamilt/module_xc/xc_functional.h" @@ -10,7 +10,7 @@ void Symmetry_rho::psymmg(std::complex* rhog_part, const ModulePW::PW_Ba int * fftixy2is = new int [rho_basis->fftnxy]; rho_basis->getfftixy2is(fftixy2is); //current proc #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, fftixy2is, rho_basis->fftnxy, MPI_INT, MPI_SUM, POOL_WORLD); + Parallel_Reduce::reduce_pool(fftixy2is, rho_basis->fftnxy); if(rho_basis->poolnproc>1) for (int i=0;ifftnxy;++i) fftixy2is[i]+=rho_basis->poolnproc-1; @@ -234,4 +234,4 @@ void Symmetry_rho::get_ixyz2ipw(const ModulePW::PW_Basis *rho_basis, delete[] nstnz_start; delete[] ipsz2ipw; return; -} \ No newline at end of file +} diff --git a/source/source_estate/module_dm/cal_dm_psi.cpp b/source/source_estate/module_dm/cal_dm_psi.cpp index 7f68838c94..ac52854be1 100644 --- a/source/source_estate/module_dm/cal_dm_psi.cpp +++ b/source/source_estate/module_dm/cal_dm_psi.cpp @@ -15,8 +15,8 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, const psi::Psi& wfc, elecstate::DensityMatrix& DM) { - ModuleBase::TITLE("elecstate", "cal_dm"); - ModuleBase::timer::tick("elecstate", "cal_dm"); + ModuleBase::TITLE("elecstate", "cal_dm_psi"); + ModuleBase::timer::tick("elecstate", "cal_dm_psi"); // dm.resize(wfc.get_nk(), ParaV->ncol, ParaV->nrow); const int nbands_local = wfc.get_nbands(); @@ -33,13 +33,10 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, // dm[ik].create(ParaV->ncol, ParaV->nrow); // wg_wfc(ib,iw) = wg[ib] * wfc(ib,iw); - psi::Psi wg_wfc(1, - wfc.get_nbands(), - wfc.get_nbasis(), - wfc.get_nbasis(), - true); - wg_wfc.set_all_psi(wfc.get_pointer(), wg_wfc.size()); + psi::Psi wg_wfc(1, wfc.get_nbands(), + wfc.get_nbasis(), wfc.get_nbasis(), true); + wg_wfc.set_all_psi(wfc.get_pointer(), wg_wfc.size()); int ib_global = 0; for (int ib_local = 0; ib_local < nbands_local; ++ib_local) @@ -50,7 +47,6 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, if (ib_global >= wg.nc) { break; - ModuleBase::WARNING_QUIT("ElecStateLCAO::cal_dm", "please check global2local_col!"); } } if (ib_global >= wg.nc) @@ -70,7 +66,7 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, psiMulPsi(wg_wfc, wfc, dmk_pointer); #endif } - ModuleBase::timer::tick("elecstate", "cal_dm"); + ModuleBase::timer::tick("elecstate", "cal_dm_psi"); return; } @@ -80,8 +76,8 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, const psi::Psi>& wfc, elecstate::DensityMatrix, double>& DM) { - ModuleBase::TITLE("elecstate", "cal_dm"); - ModuleBase::timer::tick("elecstate", "cal_dm"); + ModuleBase::TITLE("elecstate", "cal_dm_psi"); + ModuleBase::timer::tick("elecstate", "cal_dm_psi"); // dm.resize(wfc.get_nk(), ParaV->ncol, ParaV->nrow); const int nbands_local = wfc.get_nbands(); @@ -104,6 +100,7 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, const std::complex* pwfc = wfc.get_pointer(); std::complex* pwg_wfc = wg_wfc.get_pointer(); + #ifdef _OPENMP #pragma omp parallel for schedule(static, 1024) #endif @@ -139,8 +136,9 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, if (PARAM.inp.ks_solver == "cg_in_lcao") { psiMulPsi(wg_wfc, wfc, dmk_pointer); - } else - { + } + else + { psiMulPsiMpi(wg_wfc, wfc, dmk_pointer, ParaV->desc_wfc, ParaV->desc); } #else @@ -148,7 +146,7 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, #endif } - ModuleBase::timer::tick("elecstate", "cal_dm"); + ModuleBase::timer::tick("elecstate", "cal_dm_psi"); return; } @@ -166,24 +164,24 @@ void psiMulPsiMpi(const psi::Psi& psi1, const int nlocal = desc_dm[2]; const int nbands = desc_psi[3]; - pdgemm_(&N_char, - &T_char, - &nlocal, - &nlocal, - &nbands, - &one_float, + ScalapackConnector::gemm(N_char, + T_char, + nlocal, + nlocal, + nbands, + one_float, psi1.get_pointer(), - &one_int, - &one_int, + one_int, + one_int, desc_psi, psi2.get_pointer(), - &one_int, - &one_int, + one_int, + one_int, desc_psi, - &zero_float, + zero_float, dm_out, - &one_int, - &one_int, + one_int, + one_int, desc_dm); ModuleBase::timer::tick("psiMulPsiMpi", "pdgemm"); } @@ -200,24 +198,24 @@ void psiMulPsiMpi(const psi::Psi>& psi1, const char N_char = 'N', T_char = 'T'; const int nlocal = desc_dm[2]; const int nbands = desc_psi[3]; - pzgemm_(&N_char, - &T_char, - &nlocal, - &nlocal, - &nbands, - &one_complex, + ScalapackConnector::gemm(N_char, + T_char, + nlocal, + nlocal, + nbands, + one_complex, psi1.get_pointer(), - &one_int, - &one_int, + one_int, + one_int, desc_psi, psi2.get_pointer(), - &one_int, - &one_int, + one_int, + one_int, desc_psi, - &zero_complex, + zero_complex, dm_out, - &one_int, - &one_int, + one_int, + one_int, desc_dm); ModuleBase::timer::tick("psiMulPsiMpi", "pdgemm"); } @@ -231,19 +229,19 @@ void psiMulPsi(const psi::Psi& psi1, const psi::Psi& psi2, doubl const char N_char = 'N', T_char = 'T'; const int nlocal = psi1.get_nbasis(); const int nbands = psi1.get_nbands(); - dgemm_(&N_char, - &T_char, - &nlocal, - &nlocal, - &nbands, - &one_float, + BlasConnector::gemm_cm(N_char, + T_char, + nlocal, + nlocal, + nbands, + one_float, psi1.get_pointer(), - &nlocal, + nlocal, psi2.get_pointer(), - &nlocal, - &zero_float, + nlocal, + zero_float, dm_out, - &nlocal); + nlocal); } void psiMulPsi(const psi::Psi>& psi1, @@ -256,19 +254,19 @@ void psiMulPsi(const psi::Psi>& psi1, const int nbands = psi1.get_nbands(); const std::complex one_complex = {1.0, 0.0}; const std::complex zero_complex = {0.0, 0.0}; - zgemm_(&N_char, - &T_char, - &nlocal, - &nlocal, - &nbands, - &one_complex, + BlasConnector::gemm_cm(N_char, + T_char, + nlocal, + nlocal, + nbands, + one_complex, psi1.get_pointer(), - &nlocal, + nlocal, psi2.get_pointer(), - &nlocal, - &zero_complex, + nlocal, + zero_complex, dm_out, - &nlocal); + nlocal); } } // namespace elecstate diff --git a/source/source_estate/module_dm/cal_edm_tddft.cpp b/source/source_estate/module_dm/cal_edm_tddft.cpp index dd934d8a00..bd33477f97 100644 --- a/source/source_estate/module_dm/cal_edm_tddft.cpp +++ b/source/source_estate/module_dm/cal_edm_tddft.cpp @@ -1,35 +1,80 @@ #include "cal_edm_tddft.h" +#include "source_base/module_container/ATen/core/tensor.h" // For ct::Tensor +#include "source_base/module_container/ATen/kernels/blas.h" +#include "source_base/module_container/ATen/kernels/lapack.h" +#include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) +#include "source_base/module_device/memory_op.h" // memory operations #include "source_base/module_external/lapack_connector.h" #include "source_base/module_external/scalapack_connector.h" +#include "source_io/module_parameter/parameter.h" // use PARAM.globalv +#include "source_lcao/module_rt/gather_mat.h" // gatherMatrix and distributeMatrix +#include "source_lcao/module_rt/propagator.h" // Include header for create_identity_matrix + namespace elecstate { +void print_local_matrix(std::ostream& os, + const std::complex* matrix_data, + int local_rows, + int local_cols, + const std::string& matrix_name, + int rank) +{ + if (!matrix_name.empty() || rank >= 0) + { + os << "=== "; + if (!matrix_name.empty()) + { + os << "Matrix: " << matrix_name; + if (rank >= 0) + os << " "; + } + if (rank >= 0) + { + os << "(Process: " << rank + 1 << ")"; + } + os << " (Local dims: " << local_rows << " x " << local_cols << ") ===" << std::endl; + } + + os << std::fixed << std::setprecision(10) << std::showpos; + + for (int i = 0; i < local_rows; ++i) // Iterate over rows (i) + { + for (int j = 0; j < local_cols; ++j) // Iterate over columns (j) + { + // For column-major storage, element (i, j) is at index i + j * LDA + // where LDA (leading dimension) is typically the number of *rows* in the local block. + int idx = i + j * local_rows; + os << "(" << std::real(matrix_data[idx]) << "," << std::imag(matrix_data[idx]) << ") "; + } + os << std::endl; // New line after each row + } + os.unsetf(std::ios_base::fixed | std::ios_base::showpos); + os << std::endl; +} + // use the original formula (Hamiltonian matrix) to calculate energy density matrix void cal_edm_tddft(Parallel_Orbitals& pv, - elecstate::ElecState* pelec, + LCAO_domain::Setup_DM>& dmat, K_Vectors& kv, hamilt::Hamilt>* p_hamilt) { - // mohan add 2024-03-27 + ModuleBase::TITLE("elecstate", "cal_edm_tddft"); + ModuleBase::timer::tick("elecstate", "cal_edm_tddft"); + const int nlocal = PARAM.globalv.nlocal; assert(nlocal >= 0); - auto _pelec = dynamic_cast>*>(pelec); - - _pelec->get_DM()->EDMK.resize(kv.get_nks()); + dmat.dm->EDMK.resize(kv.get_nks()); for (int ik = 0; ik < kv.get_nks(); ++ik) { p_hamilt->updateHk(ik); - std::complex* tmp_dmk = _pelec->get_DM()->get_DMK_pointer(ik); - ModuleBase::ComplexMatrix& tmp_edmk = _pelec->get_DM()->EDMK[ik]; + std::complex* tmp_dmk = dmat.dm->get_DMK_pointer(ik); + ModuleBase::ComplexMatrix& tmp_edmk = dmat.dm->EDMK[ik]; #ifdef __MPI - - // mohan add 2024-03-27 - //! be careful, the type of nloc is 'long' - //! whether the long type is safe, needs more discussion - const long nloc = pv.nloc; + const int nloc = pv.nloc; const int ncol = pv.ncol; const int nrow = pv.nrow; @@ -54,14 +99,14 @@ void cal_edm_tddft(Parallel_Orbitals& pv, hamilt::MatrixBlock> s_mat; p_hamilt->matrix(h_mat, s_mat); - zcopy_(&nloc, h_mat.p, &inc, Htmp, &inc); - zcopy_(&nloc, s_mat.p, &inc, Sinv, &inc); + BlasConnector::copy(nloc, h_mat.p, inc, Htmp, inc); + BlasConnector::copy(nloc, s_mat.p, inc, Sinv, inc); vector ipiv(nloc, 0); int info = 0; const int one_int = 1; - pzgetrf_(&nlocal, &nlocal, Sinv, &one_int, &one_int, pv.desc, ipiv.data(), &info); + ScalapackConnector::getrf(nlocal, nlocal, Sinv, one_int, one_int, pv.desc, ipiv.data(), &info); int lwork = -1; int liwork = -1; @@ -72,136 +117,141 @@ void cal_edm_tddft(Parallel_Orbitals& pv, // if liwork = -1, then the size of iwork is (at least) of length 1. std::vector iwork(1, 0); - pzgetri_(&nlocal, - Sinv, - &one_int, - &one_int, - pv.desc, - ipiv.data(), - work.data(), - &lwork, - iwork.data(), - &liwork, - &info); + ScalapackConnector::getri(nlocal, + Sinv, + one_int, + one_int, + pv.desc, + ipiv.data(), + work.data(), + &lwork, + iwork.data(), + &liwork, + &info); lwork = work[0].real(); work.resize(lwork, 0); liwork = iwork[0]; iwork.resize(liwork, 0); - pzgetri_(&nlocal, - Sinv, - &one_int, - &one_int, - pv.desc, - ipiv.data(), - work.data(), - &lwork, - iwork.data(), - &liwork, - &info); + ScalapackConnector::getri(nlocal, + Sinv, + one_int, + one_int, + pv.desc, + ipiv.data(), + work.data(), + &lwork, + iwork.data(), + &liwork, + &info); const char N_char = 'N'; const char T_char = 'T'; - const std::complex one_float = {1.0, 0.0}; - const std::complex zero_float = {0.0, 0.0}; - const std::complex half_float = {0.5, 0.0}; - - pzgemm_(&N_char, - &N_char, - &nlocal, - &nlocal, - &nlocal, - &one_float, - Htmp, - &one_int, - &one_int, - pv.desc, - Sinv, - &one_int, - &one_int, - pv.desc, - &zero_float, - tmp1, - &one_int, - &one_int, - pv.desc); - - pzgemm_(&T_char, - &N_char, - &nlocal, - &nlocal, - &nlocal, - &one_float, - tmp1, - &one_int, - &one_int, - pv.desc, - tmp_dmk, - &one_int, - &one_int, - pv.desc, - &zero_float, - tmp2, - &one_int, - &one_int, - pv.desc); - - pzgemm_(&N_char, - &N_char, - &nlocal, - &nlocal, - &nlocal, - &one_float, - Sinv, - &one_int, - &one_int, - pv.desc, - Htmp, - &one_int, - &one_int, - pv.desc, - &zero_float, - tmp3, - &one_int, - &one_int, - pv.desc); - - pzgemm_(&N_char, - &T_char, - &nlocal, - &nlocal, - &nlocal, - &one_float, - tmp_dmk, - &one_int, - &one_int, - pv.desc, - tmp3, - &one_int, - &one_int, - pv.desc, - &zero_float, - tmp4, - &one_int, - &one_int, - pv.desc); - - pzgeadd_(&N_char, - &nlocal, - &nlocal, - &half_float, - tmp2, - &one_int, - &one_int, - pv.desc, - &half_float, - tmp4, - &one_int, - &one_int, - pv.desc); - - zcopy_(&nloc, tmp4, &inc, tmp_edmk.c, &inc); + const std::complex one_complex = {1.0, 0.0}; + const std::complex zero_complex = {0.0, 0.0}; + const std::complex half_complex = {0.5, 0.0}; + + // tmp1 = Htmp * Sinv + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + Htmp, + one_int, + one_int, + pv.desc, + Sinv, + one_int, + one_int, + pv.desc, + zero_complex, + tmp1, + one_int, + one_int, + pv.desc); + + // tmp2 = tmp1^T * tmp_dmk + ScalapackConnector::gemm(T_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + tmp1, + one_int, + one_int, + pv.desc, + tmp_dmk, + one_int, + one_int, + pv.desc, + zero_complex, + tmp2, + one_int, + one_int, + pv.desc); + + // tmp3 = Sinv * Htmp + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + Sinv, + one_int, + one_int, + pv.desc, + Htmp, + one_int, + one_int, + pv.desc, + zero_complex, + tmp3, + one_int, + one_int, + pv.desc); + + // tmp4 = tmp_dmk * tmp3^T + ScalapackConnector::gemm(N_char, + T_char, + nlocal, + nlocal, + nlocal, + one_complex, + tmp_dmk, + one_int, + one_int, + pv.desc, + tmp3, + one_int, + one_int, + pv.desc, + zero_complex, + tmp4, + one_int, + one_int, + pv.desc); + + // tmp4 = 0.5 * (tmp2 + tmp4) + ScalapackConnector::geadd(N_char, + nlocal, + nlocal, + half_complex, + tmp2, + one_int, + one_int, + pv.desc, + half_complex, + tmp4, + one_int, + one_int, + pv.desc); + + BlasConnector::copy(nloc, tmp4, inc, tmp_edmk.c, inc); delete[] Htmp; delete[] Sinv; @@ -219,7 +269,7 @@ void cal_edm_tddft(Parallel_Orbitals& pv, hamilt::MatrixBlock> s_mat; p_hamilt->matrix(h_mat, s_mat); - // cout<<"hmat "<>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt) +{ + ModuleBase::TITLE("elecstate", "cal_edm_tddft_tensor"); + ModuleBase::timer::tick("elecstate", "cal_edm_tddft_tensor"); + + const int nlocal = PARAM.globalv.nlocal; + assert(nlocal >= 0); + dmat.dm->EDMK.resize(kv.get_nks()); + + for (int ik = 0; ik < kv.get_nks(); ++ik) + { + p_hamilt->updateHk(ik); + std::complex* tmp_dmk = dmat.dm->get_DMK_pointer(ik); + ModuleBase::ComplexMatrix& tmp_edmk = dmat.dm->EDMK[ik]; + +#ifdef __MPI + const int nloc = pv.nloc; + const int ncol = pv.ncol; + const int nrow = pv.nrow; + + // Initialize EDMK matrix + tmp_edmk.create(ncol, nrow); + + // Allocate Tensor objects on CPU + ct::Tensor Htmp_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + Htmp_tensor.zero(); + + ct::Tensor Sinv_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + Sinv_tensor.zero(); + + ct::Tensor tmp1_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + tmp1_tensor.zero(); + + ct::Tensor tmp2_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + tmp2_tensor.zero(); + + ct::Tensor tmp3_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + tmp3_tensor.zero(); + + ct::Tensor tmp4_tensor(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({nloc})); + tmp4_tensor.zero(); + + // Get raw pointers from tensors for ScaLAPACK calls + std::complex* Htmp_ptr = Htmp_tensor.data>(); + std::complex* Sinv_ptr = Sinv_tensor.data>(); + std::complex* tmp1_ptr = tmp1_tensor.data>(); + std::complex* tmp2_ptr = tmp2_tensor.data>(); + std::complex* tmp3_ptr = tmp3_tensor.data>(); + std::complex* tmp4_ptr = tmp4_tensor.data>(); + + const int inc = 1; + hamilt::MatrixBlock> h_mat; + hamilt::MatrixBlock> s_mat; + p_hamilt->matrix(h_mat, s_mat); + + // Copy Hamiltonian and Overlap matrices into Tensor buffers using BlasConnector + BlasConnector::copy(nloc, h_mat.p, inc, Htmp_ptr, inc); + BlasConnector::copy(nloc, s_mat.p, inc, Sinv_ptr, inc); + + int myid = 0; + const int root_proc = 0; + MPI_Comm_rank(MPI_COMM_WORLD, &myid); + + // --- ScaLAPACK Inversion of S --- + ct::Tensor ipiv(ct::DataType::DT_INT, + ct::DeviceType::CpuDevice, + ct::TensorShape({pv.nrow + pv.nb})); // Size for ScaLAPACK pivot array + ipiv.zero(); + int* ipiv_ptr = ipiv.data(); + + int info = 0; + const int one_int = 1; + ScalapackConnector::getrf(nlocal, nlocal, Sinv_ptr, one_int, one_int, pv.desc, ipiv_ptr, &info); + + int lwork = -1; + int liwork = -1; + ct::Tensor work_query(ct::DataType::DT_COMPLEX_DOUBLE, ct::DeviceType::CpuDevice, ct::TensorShape({1})); + ct::Tensor iwork_query(ct::DataType::DT_INT, ct::DeviceType::CpuDevice, ct::TensorShape({1})); + + ScalapackConnector::getri(nlocal, + Sinv_ptr, + one_int, + one_int, + pv.desc, + ipiv_ptr, + work_query.data>(), + &lwork, + iwork_query.data(), + &liwork, + &info); + + // Resize work arrays based on query results + lwork = work_query.data>()[0].real(); + work_query.resize(ct::TensorShape({lwork})); + liwork = iwork_query.data()[0]; + iwork_query.resize(ct::TensorShape({liwork})); + + ScalapackConnector::getri(nlocal, + Sinv_ptr, + one_int, + one_int, + pv.desc, + ipiv_ptr, + work_query.data>(), + &lwork, + iwork_query.data(), + &liwork, + &info); + + // --- EDM Calculation using ScaLAPACK --- + const char N_char = 'N'; + const char T_char = 'T'; + const std::complex one_complex = {1.0, 0.0}; + const std::complex zero_complex = {0.0, 0.0}; + const std::complex half_complex = {0.5, 0.0}; + + // tmp1 = Htmp * Sinv + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + Htmp_ptr, + one_int, + one_int, + pv.desc, + Sinv_ptr, + one_int, + one_int, + pv.desc, + zero_complex, + tmp1_ptr, + one_int, + one_int, + pv.desc); + + // tmp2 = tmp1^T * tmp_dmk + ScalapackConnector::gemm(T_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + tmp1_ptr, + one_int, + one_int, + pv.desc, + tmp_dmk, + one_int, + one_int, + pv.desc, + zero_complex, + tmp2_ptr, + one_int, + one_int, + pv.desc); + + // tmp3 = Sinv * Htmp + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_complex, + Sinv_ptr, + one_int, + one_int, + pv.desc, + Htmp_ptr, + one_int, + one_int, + pv.desc, + zero_complex, + tmp3_ptr, + one_int, + one_int, + pv.desc); + + // tmp4 = tmp_dmk * tmp3^T + ScalapackConnector::gemm(N_char, + T_char, + nlocal, + nlocal, + nlocal, + one_complex, + tmp_dmk, + one_int, + one_int, + pv.desc, + tmp3_ptr, + one_int, + one_int, + pv.desc, + zero_complex, + tmp4_ptr, + one_int, + one_int, + pv.desc); + + // tmp4 = 0.5 * (tmp2 + tmp4) + ScalapackConnector::geadd(N_char, + nlocal, + nlocal, + half_complex, + tmp2_ptr, + one_int, + one_int, + pv.desc, + half_complex, + tmp4_ptr, + one_int, + one_int, + pv.desc); + + // Copy final result from Tensor buffer back to EDMK matrix + BlasConnector::copy(nloc, tmp4_ptr, inc, tmp_edmk.c, inc); + +#else + ModuleBase::WARNING_QUIT("elecstate::cal_edm_tddft_tensor", "MPI is required for this function!"); +#endif + } // end ik + ModuleBase::timer::tick("elecstate", "cal_edm_tddft_tensor"); + return; +} // cal_edm_tddft_tensor + +// Template function for EDM calculation supporting CPU and GPU +template +void cal_edm_tddft_tensor_lapack(Parallel_Orbitals& pv, + LCAO_domain::Setup_DM>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt) +{ + ModuleBase::TITLE("elecstate", "cal_edm_tddft_tensor_lapack"); + ModuleBase::timer::tick("elecstate", "cal_edm_tddft_tensor_lapack"); + + const int nlocal = PARAM.globalv.nlocal; + assert(nlocal >= 0); + dmat.dm->EDMK.resize(kv.get_nks()); + + // ct_device_type = ct::DeviceType::CpuDevice or ct::DeviceType::GpuDevice + ct::DeviceType ct_device_type = ct::DeviceTypeToEnum::value; + // ct_Device = ct::DEVICE_CPU or ct::DEVICE_GPU + using ct_Device = typename ct::PsiToContainer::type; + +#if ((defined __CUDA) /* || (defined __ROCM) */) + if (ct_device_type == ct::DeviceType::GpuDevice) + { + // Initialize cuBLAS & cuSOLVER handle + ct::kernels::createGpuSolverHandle(); + ct::kernels::createGpuBlasHandle(); + } +#endif // __CUDA + + for (int ik = 0; ik < kv.get_nks(); ++ik) + { + p_hamilt->updateHk(ik); + std::complex* tmp_dmk_local = dmat.dm->get_DMK_pointer(ik); + ModuleBase::ComplexMatrix& tmp_edmk = dmat.dm->EDMK[ik]; + +#ifdef __MPI + int myid = 0; + const int root_proc = 0; + MPI_Comm_rank(MPI_COMM_WORLD, &myid); + + // Gather local H, S, and DMK matrices to global matrices on root process + hamilt::MatrixBlock> h_mat_local, s_mat_local; + p_hamilt->matrix(h_mat_local, s_mat_local); + + module_rt::Matrix_g> h_mat_global, s_mat_global, dmk_global; + module_rt::gatherMatrix(myid, root_proc, h_mat_local, h_mat_global); + module_rt::gatherMatrix(myid, root_proc, s_mat_local, s_mat_global); + + // Create a temporary MatrixBlock for local DMK + hamilt::MatrixBlock> dmk_local_block; + dmk_local_block.p = tmp_dmk_local; + dmk_local_block.desc = pv.desc; + module_rt::gatherMatrix(myid, root_proc, dmk_local_block, dmk_global); + + // Declare and allocate global EDM matrix on ALL processes, prepare for distribution in the end + module_rt::Matrix_g> edm_global; + edm_global.p.reset(new std::complex[nlocal * nlocal]); + edm_global.row = nlocal; + edm_global.col = nlocal; + // Set the descriptor of the global EDM matrix + edm_global.desc.reset(new int[9]{1, pv.desc[1], nlocal, nlocal, nlocal, nlocal, 0, 0, nlocal}); + + // Only root process performs the global calculation + if (myid == root_proc) + { + ct::Tensor Htmp_global(ct::DataType::DT_COMPLEX_DOUBLE, + ct::DeviceType::CpuDevice, + ct::TensorShape({nlocal, nlocal})); + ct::Tensor S_global(ct::DataType::DT_COMPLEX_DOUBLE, + ct::DeviceType::CpuDevice, + ct::TensorShape({nlocal, nlocal})); + ct::Tensor DMK_global(ct::DataType::DT_COMPLEX_DOUBLE, + ct::DeviceType::CpuDevice, + ct::TensorShape({nlocal, nlocal})); + + // Copy gathered data into tensors + BlasConnector::copy(nlocal * nlocal, + h_mat_global.p.get(), + 1, + Htmp_global.template data>(), + 1); + BlasConnector::copy(nlocal * nlocal, + s_mat_global.p.get(), + 1, + S_global.template data>(), + 1); + BlasConnector::copy(nlocal * nlocal, + dmk_global.p.get(), + 1, + DMK_global.template data>(), + 1); + + // Move tensors to the target device (CPU or GPU) + ct::Tensor Htmp_global_dev = Htmp_global.to_device(); + ct::Tensor S_global_dev = S_global.to_device(); + ct::Tensor DMK_global_dev = DMK_global.to_device(); + + // --- Calculate S^-1 using getrf + getrs --- + ct::Tensor ipiv(ct::DataType::DT_INT, ct_device_type, ct::TensorShape({nlocal})); + ipiv.zero(); + + // 1. LU decomposition S = P * L * U + ct::kernels::lapack_getrf, ct_Device>()( + nlocal, + nlocal, + S_global_dev.template data>(), + nlocal, + ipiv.template data()); + + // 2. Solve S * Sinv = I for Sinv using the LU decomposition + // Create identity matrix as RHS + auto Sinv_global = module_rt::create_identity_matrix>(nlocal, ct_device_type); + + ct::kernels::lapack_getrs, ct_Device>()( + 'N', + nlocal, + nlocal, + S_global_dev.template data>(), + nlocal, + ipiv.template data(), + Sinv_global.template data>(), + nlocal); + + // --- EDM Calculation using BLAS on global tensors --- + // tmp1 = Htmp * Sinv + ct::Tensor tmp1_global_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({nlocal, nlocal})); + tmp1_global_tensor.zero(); + std::complex one_complex = {1.0, 0.0}; + std::complex zero_complex = {0.0, 0.0}; + ct::kernels::blas_gemm, ct_Device>()( + 'N', + 'N', + nlocal, + nlocal, + nlocal, + &one_complex, + Htmp_global_dev.template data>(), + nlocal, + Sinv_global.template data>(), + nlocal, + &zero_complex, + tmp1_global_tensor.template data>(), + nlocal); + + // tmp2 = tmp1^T * tmp_dmk + ct::Tensor tmp2_global_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({nlocal, nlocal})); + tmp2_global_tensor.zero(); + ct::kernels::blas_gemm, ct_Device>()( + 'T', + 'N', + nlocal, + nlocal, + nlocal, + &one_complex, + tmp1_global_tensor.template data>(), + nlocal, + DMK_global_dev.template data>(), + nlocal, + &zero_complex, + tmp2_global_tensor.template data>(), + nlocal); + + // tmp3 = Sinv * Htmp + ct::Tensor tmp3_global_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({nlocal, nlocal})); + tmp3_global_tensor.zero(); + ct::kernels::blas_gemm, ct_Device>()( + 'N', + 'N', + nlocal, + nlocal, + nlocal, + &one_complex, + Sinv_global.template data>(), + nlocal, + Htmp_global_dev.template data>(), + nlocal, + &zero_complex, + tmp3_global_tensor.template data>(), + nlocal); + + // tmp4 = tmp_dmk * tmp3^T + ct::Tensor tmp4_global_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({nlocal, nlocal})); + tmp4_global_tensor.zero(); + ct::kernels::blas_gemm, ct_Device>()( + 'N', + 'T', + nlocal, + nlocal, + nlocal, + &one_complex, + DMK_global_dev.template data>(), + nlocal, + tmp3_global_tensor.template data>(), + nlocal, + &zero_complex, + tmp4_global_tensor.template data>(), + nlocal); + + // tmp4 = tmp2 + tmp4 + ct::kernels::blas_axpy, ct_Device>()( + nlocal * nlocal, + &one_complex, + tmp2_global_tensor.template data>(), + 1, + tmp4_global_tensor.template data>(), + 1); + + // tmp4 = 0.5 * tmp4 + std::complex half_complex = {0.5, 0.0}; + ct::kernels::blas_scal, ct_Device>()( + nlocal * nlocal, + &half_complex, + tmp4_global_tensor.template data>(), + 1); + + // Copy result from device tensor back to CPU buffer for distribution + ct::Tensor tmp4_global_tensor_cpu = tmp4_global_tensor.to_device(); + BlasConnector::copy(nlocal * nlocal, + tmp4_global_tensor_cpu.template data>(), + 1, + edm_global.p.get(), + 1); + } + + // --- Distribute the globally computed EDM matrix back to distributed form --- + tmp_edmk.create(pv.ncol, pv.nrow); + + hamilt::MatrixBlock> edm_local_block; + edm_local_block.p = tmp_edmk.c; + edm_local_block.desc = pv.desc; + + // Distribute edm_global to all processes' local blocks + module_rt::distributeMatrix(edm_local_block, edm_global); +#else + ModuleBase::WARNING_QUIT("elecstate::cal_edm_tddft_tensor_lapack", "MPI is required for this function!"); +#endif // __MPI + } // end ik + +#if ((defined __CUDA) /* || (defined __ROCM) */) + if (ct_device_type == ct::DeviceType::GpuDevice) + { + // Destroy cuBLAS & cuSOLVER handle + ct::kernels::destroyGpuSolverHandle(); + ct::kernels::destroyGpuBlasHandle(); + } +#endif // __CUDA + + ModuleBase::timer::tick("elecstate", "cal_edm_tddft_tensor_lapack"); + return; +} // cal_edm_tddft_tensor_lapack + +// Explicit instantiation of template functions +template void cal_edm_tddft_tensor_lapack(Parallel_Orbitals& pv, + LCAO_domain::Setup_DM>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt); +#if ((defined __CUDA) /* || (defined __ROCM) */) +template void cal_edm_tddft_tensor_lapack(Parallel_Orbitals& pv, + LCAO_domain::Setup_DM>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt); +#endif // __CUDA + } // namespace elecstate diff --git a/source/source_estate/module_dm/cal_edm_tddft.h b/source/source_estate/module_dm/cal_edm_tddft.h index 49de0550b5..b442bd90cd 100644 --- a/source/source_estate/module_dm/cal_edm_tddft.h +++ b/source/source_estate/module_dm/cal_edm_tddft.h @@ -3,14 +3,32 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/klist.h" -#include "source_estate/elecstate_lcao.h" #include "source_hamilt/hamilt.h" +#include "source_lcao/setup_dm.h" namespace elecstate { +void print_local_matrix(std::ostream& os, + const std::complex* matrix_data, + int local_rows, // pv.nrow + int local_cols, // pv.ncol + const std::string& matrix_name = "", + int rank = -1); + void cal_edm_tddft(Parallel_Orbitals& pv, - elecstate::ElecState* pelec, + LCAO_domain::Setup_DM>& dmat, K_Vectors& kv, hamilt::Hamilt>* p_hamilt); + +void cal_edm_tddft_tensor(Parallel_Orbitals& pv, + LCAO_domain::Setup_DM>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt); + +template +void cal_edm_tddft_tensor_lapack(Parallel_Orbitals& pv, + LCAO_domain::Setup_DM>& dmat, + K_Vectors& kv, + hamilt::Hamilt>* p_hamilt); } // namespace elecstate #endif // CAL_EDM_TDDFT_H diff --git a/source/source_estate/module_dm/density_matrix.cpp b/source/source_estate/module_dm/density_matrix.cpp index 8dd87e73c4..e5ad1ba620 100644 --- a/source/source_estate/module_dm/density_matrix.cpp +++ b/source/source_estate/module_dm/density_matrix.cpp @@ -5,6 +5,7 @@ #include "source_base/memory.h" #include "source_base/timer.h" #include "source_base/tool_title.h" +#include "source_base/constants.h" #include "source_cell/klist.h" namespace elecstate @@ -29,7 +30,7 @@ template DensityMatrix::DensityMatrix(const Parallel_Orbitals* paraV_in, const int nspin, const std::vector>& kvec_d, const int nk) : _paraV(paraV_in), _nspin(nspin), _kvec_d(kvec_d), _nk((nk > 0 && nk <= _kvec_d.size()) ? nk : _kvec_d.size()) { - ModuleBase::TITLE("DensityMatrix", "DensityMatrix-MK"); + ModuleBase::TITLE("DensityMatrix", "resize_DMK"); const int nks = _nk * _nspin; this->_DMK.resize(nks); for (int ik = 0; ik < nks; ik++) @@ -42,7 +43,7 @@ DensityMatrix::DensityMatrix(const Parallel_Orbitals* paraV_in, const in template DensityMatrix::DensityMatrix(const Parallel_Orbitals* paraV_in, const int nspin) :_paraV(paraV_in), _nspin(nspin), _kvec_d({ ModuleBase::Vector3(0,0,0) }), _nk(1) { - ModuleBase::TITLE("DensityMatrix", "DensityMatrix-GO"); + ModuleBase::TITLE("DensityMatrix", "resize_gamma"); this->_DMK.resize(_nspin); for (int ik = 0; ik < this->_nspin; ik++) { @@ -51,134 +52,103 @@ DensityMatrix::DensityMatrix(const Parallel_Orbitals* paraV_in, const in ModuleBase::Memory::record("DensityMatrix::DMK", this->_DMK.size() * this->_DMK[0].size() * sizeof(TK)); } + + // calculate DMR from DMK using blas for multi-k calculation -template <> -void DensityMatrix, double>::cal_DMR(const int ik_in) +template +void DensityMatrix_Tools::cal_DMR( + const DensityMatrix &dm, + std::vector*> &dmR_out, + const int ik_in) { ModuleBase::TITLE("DensityMatrix", "cal_DMR"); // To check whether DMR has been initialized -#ifdef __DEBUG - assert(!this->_DMR.empty() && "DMR has not been initialized!"); -#endif + assert(dmR_out.size()==dm._nspin && "DMR has not been initialized!"); ModuleBase::timer::tick("DensityMatrix", "cal_DMR"); - int ld_hk = this->_paraV->nrow; - for (int is = 1; is <= this->_nspin; ++is) + const int ld_hk = dm._paraV->nrow; + for (int is = 1; is <= dm._nspin; ++is) { - int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 - hamilt::HContainer* target_DMR = this->_DMR[is - 1]; + const int ik_begin = dm._nk * (is - 1); // jump dm._nk for spin_down if nspin==2 + hamilt::HContainer*const target_DMR = dmR_out[is - 1]; // set zero since this function is called in every scf step target_DMR->set_zero(); -#ifdef _OPENMP -#pragma omp parallel for schedule(dynamic) -#endif + #ifdef _OPENMP + #pragma omp parallel for schedule(dynamic) + #endif for (int i = 0; i < target_DMR->size_atom_pairs(); ++i) { - hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); - int iat1 = target_ap.get_atom_i(); - int iat2 = target_ap.get_atom_j(); + hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); + const int iat1 = target_ap.get_atom_i(); + const int iat2 = target_ap.get_atom_j(); // get global indexes of whole matrix for each atom in this process - int row_ap = this->_paraV->atom_begin_row[iat1]; - int col_ap = this->_paraV->atom_begin_col[iat2]; - const int row_size = this->_paraV->get_row_size(iat1); - const int col_size = this->_paraV->get_col_size(iat2); + const int row_ap = dm._paraV->atom_begin_row[iat1]; + const int col_ap = dm._paraV->atom_begin_col[iat2]; + const int row_size = dm._paraV->get_row_size(iat1); + const int col_size = dm._paraV->get_col_size(iat2); const int mat_size = row_size * col_size; - const int r_size = target_ap.get_R_size(); - if (row_ap == -1 || col_ap == -1) - { - throw std::string("Atom-pair not belong this process"); - } - std::vector> tmp_DMR; - if (PARAM.inp.nspin == 4) - { - tmp_DMR.resize(mat_size * r_size, 0); - } + const int R_size = target_ap.get_R_size(); + assert(row_ap != -1 && col_ap != -1 && "Atom-pair not belong this process"); // calculate kphase and target_mat_ptr - std::vector> kphase_vec(r_size * this->_nk); - std::vector target_DMR_mat_vec(r_size); - for(int ir = 0; ir < r_size; ++ir) + std::vector> kphase_vec(dm._nk, std::vector(R_size)); + std::vector target_DMR_mat_vec(R_size); + for(int iR = 0; iR < R_size; ++iR) { - const ModuleBase::Vector3 r_index = target_ap.get_R_index(ir); - hamilt::BaseMatrix* target_mat = target_ap.find_matrix(r_index); -#ifdef __DEBUG + const ModuleBase::Vector3 R_index = target_ap.get_R_index(iR); + hamilt::BaseMatrix*const target_mat = target_ap.find_matrix(R_index); + #ifdef __DEBUG if (target_mat == nullptr) { std::cout << "target_mat is nullptr" << std::endl; continue; } -#endif - target_DMR_mat_vec[ir] = target_mat->get_pointer(); - for(int ik = 0; ik < this->_nk; ++ik) + #endif + target_DMR_mat_vec[iR] = target_mat->get_pointer(); + for(int ik = 0; ik < dm._nk; ++ik) { - if(ik_in >= 0 && ik_in != ik) - { - continue; - } + if(ik_in >= 0 && ik_in != ik) { continue; } // cal k_phase // if TK==std::complex, kphase is e^{ikR} - const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); - const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI; + const ModuleBase::Vector3 dR(R_index[0], R_index[1], R_index[2]); + const double arg = (dm._kvec_d[ik] * dR) * ModuleBase::TWO_PI; double sinp, cosp; ModuleBase::libm::sincos(arg, &sinp, &cosp); - kphase_vec[ik * r_size + ir] = std::complex(cosp, sinp); + kphase_vec[ik][iR] = TK(cosp, sinp); } } - std::vector> tmp_DMK_mat(mat_size); - // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 - // step_trace is used when nspin = 4; - int step_trace[4]{}; - if(PARAM.inp.nspin == 4) + std::vector DMK_mat_trans(mat_size); + std::vector tmp_DMR( (PARAM.inp.nspin==4) ? mat_size*R_size : 0); + for(int ik = 0; ik < dm._nk; ++ik) { - const int npol = 2; - for (int is = 0; is < npol; is++) - { - for (int is2 = 0; is2 < npol; is2++) - { - step_trace[is * npol + is2] = target_ap.get_col_size() * is + is2; - } - } - } - for(int ik = 0; ik < this->_nk; ++ik) - { - if(ik_in >= 0 && ik_in != ik) - { - continue; - } - - // copy column-major DMK to row-major tmp_DMK_mat (for the purpose of computational efficiency) - const std::complex* DMK_mat_ptr = this->_DMK[ik + ik_begin].data() + col_ap * this->_paraV->nrow + row_ap; - for(int icol = 0; icol < col_size; ++icol) - { - for(int irow = 0; irow < row_size; ++irow) - { - tmp_DMK_mat[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; - } - } + if(ik_in >= 0 && ik_in != ik) { continue; } + // copy column-major DMK to row-major DMK_mat_trans (for the purpose of computational efficiency) + const TK*const DMK_mat_ptr + = dm._DMK[ik + ik_begin].data() + + col_ap * dm._paraV->nrow + row_ap; + for(int icol = 0; icol < col_size; ++icol) { + for(int irow = 0; irow < row_size; ++irow) { + DMK_mat_trans[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; + }} // if nspin != 4, fill DMR // if nspin == 4, fill tmp_DMR - for(int ir = 0; ir < r_size; ++ir) + for(int iR = 0; iR < R_size; ++iR) { - std::complex kphase = kphase_vec[ik * r_size + ir]; - if(PARAM.inp.nspin != 4) + // (kr+i*ki) * (Dr+i*Di) = (kr*Dr-ki*Di) + i*(kr*Di+ki*Dr) + const TK kphase = kphase_vec[ik][iR]; + if(PARAM.inp.nspin != 4) // only save real kr*Dr-ki*Di { - double* target_DMR_mat = target_DMR_mat_vec[ir]; - for(int i = 0; i < mat_size; i++) - { - target_DMR_mat[i] += kphase.real() * tmp_DMK_mat[i].real() - - kphase.imag() * tmp_DMK_mat[i].imag(); - } + func_exp_mul_dmk(kphase, DMK_mat_trans, target_DMR_mat_vec[iR]); } else if(PARAM.inp.nspin == 4) { - std::complex* tmp_DMR_mat = &tmp_DMR[ir * mat_size]; BlasConnector::axpy(mat_size, kphase, - tmp_DMK_mat.data(), + DMK_mat_trans.data(), 1, - tmp_DMR_mat, + &tmp_DMR[iR * mat_size], 1); } } @@ -188,11 +158,19 @@ void DensityMatrix, double>::cal_DMR(const int ik_in) // copy tmp_DMR to fill target_DMR if(PARAM.inp.nspin == 4) { - std::complex tmp[4]{}; - for(int ir = 0; ir < r_size; ++ir) + // step_trace ={0, 1, local_col, local_col+1} for NSPIN=4 + int step_trace[4]{}; + constexpr int npol = 2; + for (int is = 0; is < npol; is++) { + for (int is2 = 0; is2 < npol; is2++) { + step_trace[is * npol + is2] = target_ap.get_col_size() * is + is2; + }} + + TK tmp[4]{}; + for(int iR = 0; iR < R_size; ++iR) { - std::complex* tmp_DMR_mat = &tmp_DMR[ir * mat_size]; - double* target_DMR_mat = target_DMR_mat_vec[ir]; + const TK* tmp_DMR_mat = &tmp_DMR[iR * mat_size]; + TR_out* target_DMR_mat = target_DMR_mat_vec[iR]; for (int irow = 0; irow < row_size; irow += 2) { for (int icol = 0; icol < col_size; icol += 2) @@ -202,13 +180,9 @@ void DensityMatrix, double>::cal_DMR(const int ik_in) tmp[1] = tmp_DMR_mat[icol + step_trace[1]]; tmp[2] = tmp_DMR_mat[icol + step_trace[2]]; tmp[3] = tmp_DMR_mat[icol + step_trace[3]]; - // transfer to Pauli matrix and save the real part - // save them back to the target_mat - target_DMR_mat[icol + step_trace[0]] = tmp[0].real() + tmp[3].real(); - target_DMR_mat[icol + step_trace[1]] = tmp[1].real() + tmp[2].real(); - target_DMR_mat[icol + step_trace[2]] - = -tmp[1].imag() + tmp[2].imag(); // (i * (rho_updown - rho_downup)).real() - target_DMR_mat[icol + step_trace[3]] = tmp[0].real() - tmp[3].real(); + + // transfer to Pauli matrix, save them back to the target_DMR_mat + func_xyz_to_updown(tmp, icol, step_trace, target_DMR_mat); } tmp_DMR_mat += col_size * 2; target_DMR_mat += col_size * 2; @@ -220,137 +194,119 @@ void DensityMatrix, double>::cal_DMR(const int ik_in) ModuleBase::timer::tick("DensityMatrix", "cal_DMR"); } -// calculate DMR from DMK using blas for multi-k calculation template <> -void DensityMatrix, double>::cal_DMR_td(const UnitCell& ucell, const ModuleBase::Vector3 At, const int ik_in) +void DensityMatrix, double>::cal_DMR(const int ik_in) +{ + DensityMatrix_Tools::cal_DMR(*this, this->_DMR, ik_in); +} + +template <> +void DensityMatrix, std::complex>::cal_DMR(const int ik_in) +{ + DensityMatrix_Tools::cal_DMR(*this, this->_DMR, ik_in); +} + + + +// calculate DMR from DMK using blas for multi-k calculation +template +void DensityMatrix_Tools::cal_DMR_td( + const DensityMatrix &dm, + std::vector*> &dmR_out, + const UnitCell& ucell, + const ModuleBase::Vector3 At, + const int ik_in) { ModuleBase::TITLE("DensityMatrix", "cal_DMR_td"); // To check whether DMR has been initialized -#ifdef __DEBUG - assert(!this->_DMR.empty() && "DMR has not been initialized!"); -#endif + assert(dmR_out.size()==dm._nspin && "DMR has not been initialized!"); ModuleBase::timer::tick("DensityMatrix", "cal_DMR_td"); - int ld_hk = this->_paraV->nrow; - for (int is = 1; is <= this->_nspin; ++is) + const int ld_hk = dm._paraV->nrow; + for (int is = 1; is <= dm._nspin; ++is) { - int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 - hamilt::HContainer* target_DMR = this->_DMR[is - 1]; + const int ik_begin = dm._nk * (is - 1); // jump dm._nk for spin_down if nspin==2 + hamilt::HContainer*const target_DMR = dmR_out[is - 1]; // set zero since this function is called in every scf step target_DMR->set_zero(); -#ifdef _OPENMP -#pragma omp parallel for schedule(dynamic) -#endif + #ifdef _OPENMP + #pragma omp parallel for schedule(dynamic) + #endif for (int i = 0; i < target_DMR->size_atom_pairs(); ++i) { - hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); - int iat1 = target_ap.get_atom_i(); - int iat2 = target_ap.get_atom_j(); + hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); + const int iat1 = target_ap.get_atom_i(); + const int iat2 = target_ap.get_atom_j(); // get global indexes of whole matrix for each atom in this process - int row_ap = this->_paraV->atom_begin_row[iat1]; - int col_ap = this->_paraV->atom_begin_col[iat2]; - const int row_size = this->_paraV->get_row_size(iat1); - const int col_size = this->_paraV->get_col_size(iat2); + const int row_ap = dm._paraV->atom_begin_row[iat1]; + const int col_ap = dm._paraV->atom_begin_col[iat2]; + const int row_size = dm._paraV->get_row_size(iat1); + const int col_size = dm._paraV->get_col_size(iat2); const int mat_size = row_size * col_size; - const int r_size = target_ap.get_R_size(); - if (row_ap == -1 || col_ap == -1) - { - throw std::string("Atom-pair not belong this process"); - } - std::vector> tmp_DMR; - if (PARAM.inp.nspin == 4) - { - tmp_DMR.resize(mat_size * r_size, 0); - } + const int R_size = target_ap.get_R_size(); + assert(row_ap != -1 && col_ap != -1 && "Atom-pair not belong this process"); // calculate kphase and target_mat_ptr - std::vector> kphase_vec(r_size * this->_nk); - std::vector target_DMR_mat_vec(r_size); - for(int ir = 0; ir < r_size; ++ir) + std::vector> kphase_vec(dm._nk, std::vector(R_size)); + std::vector target_DMR_mat_vec(R_size); + for(int iR = 0; iR < R_size; ++iR) { - const ModuleBase::Vector3 r_index = target_ap.get_R_index(ir); - hamilt::BaseMatrix* target_mat = target_ap.find_matrix(r_index); -#ifdef __DEBUG + const ModuleBase::Vector3 R_index = target_ap.get_R_index(iR); + hamilt::BaseMatrix*const target_mat = target_ap.find_matrix(R_index); + #ifdef __DEBUG if (target_mat == nullptr) { std::cout << "target_mat is nullptr" << std::endl; continue; } -#endif - target_DMR_mat_vec[ir] = target_mat->get_pointer(); - double arg_td = 0.0; + #endif + target_DMR_mat_vec[iR] = target_mat->get_pointer(); //cal tddft phase for hybrid gauge - ModuleBase::Vector3 dtau = ucell.cal_dtau(iat1, iat2, r_index); - arg_td = At * dtau * ucell.lat0; - for(int ik = 0; ik < this->_nk; ++ik) + const ModuleBase::Vector3 dtau = ucell.cal_dtau(iat1, iat2, R_index); + const double arg_td = At * dtau * ucell.lat0; + for(int ik = 0; ik < dm._nk; ++ik) { - if(ik_in >= 0 && ik_in != ik) - { - continue; - } + if(ik_in >= 0 && ik_in != ik) { continue; } // cal k_phase // if TK==std::complex, kphase is e^{ikR} - const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); - const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td; + const ModuleBase::Vector3 dR(R_index[0], R_index[1], R_index[2]); + const double arg = (dm._kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td; double sinp, cosp; ModuleBase::libm::sincos(arg, &sinp, &cosp); - kphase_vec[ik * r_size + ir] = std::complex(cosp, sinp); + kphase_vec[ik][iR] = TK(cosp, sinp); } } - std::vector> tmp_DMK_mat(mat_size); - // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 - // step_trace is used when nspin = 4; - int step_trace[4]{}; - if(PARAM.inp.nspin == 4) + std::vector DMK_mat_trans(mat_size); + std::vector tmp_DMR( (PARAM.inp.nspin==4) ? mat_size*R_size : 0); + for(int ik = 0; ik < dm._nk; ++ik) { - const int npol = 2; - for (int is = 0; is < npol; is++) - { - for (int is2 = 0; is2 < npol; is2++) - { - step_trace[is * npol + is2] = target_ap.get_col_size() * is + is2; - } - } - } - for(int ik = 0; ik < this->_nk; ++ik) - { - if(ik_in >= 0 && ik_in != ik) - { - continue; - } - - // copy column-major DMK to row-major tmp_DMK_mat (for the purpose of computational efficiency) - const std::complex* DMK_mat_ptr = this->_DMK[ik + ik_begin].data() + col_ap * this->_paraV->nrow + row_ap; - for(int icol = 0; icol < col_size; ++icol) - { - for(int irow = 0; irow < row_size; ++irow) - { - tmp_DMK_mat[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; - } - } + if(ik_in >= 0 && ik_in != ik) { continue; } + // copy column-major DMK to row-major DMK_mat_trans (for the purpose of computational efficiency) + const TK*const DMK_mat_ptr + = dm._DMK[ik + ik_begin].data() + + col_ap * dm._paraV->nrow + row_ap; + for(int icol = 0; icol < col_size; ++icol) { + for(int irow = 0; irow < row_size; ++irow) { + DMK_mat_trans[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; + }} // if nspin != 4, fill DMR // if nspin == 4, fill tmp_DMR - for(int ir = 0; ir < r_size; ++ir) + for(int iR = 0; iR < R_size; ++iR) { - std::complex kphase = kphase_vec[ik * r_size + ir]; - if(PARAM.inp.nspin != 4) + // (kr+i*ki) * (Dr+i*Di) = (kr*Dr-ki*Di) + i*(kr*Di+ki*Dr) + const TK kphase = kphase_vec[ik][iR]; + if(PARAM.inp.nspin != 4) // only save real kr*Dr-ki*Di { - double* target_DMR_mat = target_DMR_mat_vec[ir]; - for(int i = 0; i < mat_size; i++) - { - target_DMR_mat[i] += kphase.real() * tmp_DMK_mat[i].real() - - kphase.imag() * tmp_DMK_mat[i].imag(); - } + func_exp_mul_dmk(kphase, DMK_mat_trans, target_DMR_mat_vec[iR]); } else if(PARAM.inp.nspin == 4) { - std::complex* tmp_DMR_mat = &tmp_DMR[ir * mat_size]; BlasConnector::axpy(mat_size, kphase, - tmp_DMK_mat.data(), + DMK_mat_trans.data(), 1, - tmp_DMR_mat, + &tmp_DMR[iR * mat_size], 1); } } @@ -360,11 +316,19 @@ void DensityMatrix, double>::cal_DMR_td(const UnitCell& uce // copy tmp_DMR to fill target_DMR if(PARAM.inp.nspin == 4) { - std::complex tmp[4]{}; - for(int ir = 0; ir < r_size; ++ir) + // step_trace ={0, 1, local_col, local_col+1} for NSPIN=4 + int step_trace[4]{}; + constexpr int npol = 2; + for (int is = 0; is < npol; is++) { + for (int is2 = 0; is2 < npol; is2++) { + step_trace[is * npol + is2] = target_ap.get_col_size() * is + is2; + }} + + TK tmp[4]{}; + for(int iR = 0; iR < R_size; ++iR) { - std::complex* tmp_DMR_mat = &tmp_DMR[ir * mat_size]; - double* target_DMR_mat = target_DMR_mat_vec[ir]; + const TK* tmp_DMR_mat = &tmp_DMR[iR * mat_size]; + TR_out* target_DMR_mat = target_DMR_mat_vec[iR]; for (int irow = 0; irow < row_size; irow += 2) { for (int icol = 0; icol < col_size; icol += 2) @@ -374,13 +338,9 @@ void DensityMatrix, double>::cal_DMR_td(const UnitCell& uce tmp[1] = tmp_DMR_mat[icol + step_trace[1]]; tmp[2] = tmp_DMR_mat[icol + step_trace[2]]; tmp[3] = tmp_DMR_mat[icol + step_trace[3]]; - // transfer to Pauli matrix and save the real part - // save them back to the target_mat - target_DMR_mat[icol + step_trace[0]] = tmp[0].real() + tmp[3].real(); - target_DMR_mat[icol + step_trace[1]] = tmp[1].real() + tmp[2].real(); - target_DMR_mat[icol + step_trace[2]] - = -tmp[1].imag() + tmp[2].imag(); // (i * (rho_updown - rho_downup)).real() - target_DMR_mat[icol + step_trace[3]] = tmp[0].real() - tmp[3].real(); + + // transfer to Pauli matrix, save them back to the target_DMR_mat + func_xyz_to_updown(tmp, icol, step_trace, target_DMR_mat); } tmp_DMR_mat += col_size * 2; target_DMR_mat += col_size * 2; @@ -392,84 +352,100 @@ void DensityMatrix, double>::cal_DMR_td(const UnitCell& uce ModuleBase::timer::tick("DensityMatrix", "cal_DMR_td"); } -// calculate DMR from DMK using blas for multi-k calculation template <> -void DensityMatrix::cal_DMR_full(hamilt::HContainer>* dmR_out)const{} +void DensityMatrix, double>::cal_DMR_td(const UnitCell& ucell, const ModuleBase::Vector3 At, const int ik_in) +{ + DensityMatrix_Tools::cal_DMR_td(*this, this->_DMR, ucell, At, ik_in); +} + template <> -void DensityMatrix, double>::cal_DMR_full(hamilt::HContainer>* dmR_out)const +void DensityMatrix, std::complex>::cal_DMR_td(const UnitCell& ucell, const ModuleBase::Vector3 At, const int ik_in) +{ + DensityMatrix_Tools::cal_DMR_td(*this, this->_DMR, ucell, At, ik_in); +} + + + +// calculate DMR from DMK using blas for multi-k calculation +template +void DensityMatrix_Tools::cal_DMR_full( + const DensityMatrix &dm, + hamilt::HContainer* dmR_out, + const int ik_in) { ModuleBase::TITLE("DensityMatrix", "cal_DMR_full"); ModuleBase::timer::tick("DensityMatrix", "cal_DMR_full"); - int ld_hk = this->_paraV->nrow; - hamilt::HContainer>* target_DMR = dmR_out; + const int ld_hk = dm._paraV->nrow; + hamilt::HContainer* target_DMR = dmR_out; // set zero since this function is called in every scf step target_DMR->set_zero(); -#ifdef _OPENMP -#pragma omp parallel for schedule(dynamic) -#endif + #ifdef _OPENMP + #pragma omp parallel for schedule(dynamic) + #endif for (int i = 0; i < target_DMR->size_atom_pairs(); ++i) { - auto& target_ap = target_DMR->get_atom_pair(i); - int iat1 = target_ap.get_atom_i(); - int iat2 = target_ap.get_atom_j(); + hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); + const int iat1 = target_ap.get_atom_i(); + const int iat2 = target_ap.get_atom_j(); // get global indexes of whole matrix for each atom in this process - int row_ap = this->_paraV->atom_begin_row[iat1]; - int col_ap = this->_paraV->atom_begin_col[iat2]; - const int row_size = this->_paraV->get_row_size(iat1); - const int col_size = this->_paraV->get_col_size(iat2); + const int row_ap = dm._paraV->atom_begin_row[iat1]; + const int col_ap = dm._paraV->atom_begin_col[iat2]; + const int row_size = dm._paraV->get_row_size(iat1); + const int col_size = dm._paraV->get_col_size(iat2); const int mat_size = row_size * col_size; - const int r_size = target_ap.get_R_size(); + const int R_size = target_ap.get_R_size(); + assert(row_ap != -1 && col_ap != -1 && "Atom-pair not belong this process"); // calculate kphase and target_mat_ptr - std::vector> kphase_vec(r_size * this->_nk); - std::vector*> target_DMR_mat_vec(r_size); - for(int ir = 0; ir < r_size; ++ir) + std::vector> kphase_vec(dm._nk, std::vector(R_size)); + std::vector target_DMR_mat_vec(R_size); + for(int iR = 0; iR < R_size; ++iR) { - const ModuleBase::Vector3 r_index = target_ap.get_R_index(ir); - hamilt::BaseMatrix>* target_mat = target_ap.find_matrix(r_index); -#ifdef __DEBUG + const ModuleBase::Vector3 R_index = target_ap.get_R_index(iR); + hamilt::BaseMatrix*const target_mat = target_ap.find_matrix(R_index); + #ifdef __DEBUG if (target_mat == nullptr) { std::cout << "target_mat is nullptr" << std::endl; continue; } -#endif - target_DMR_mat_vec[ir] = target_mat->get_pointer(); - for(int ik = 0; ik < this->_nk; ++ik) + #endif + target_DMR_mat_vec[iR] = target_mat->get_pointer(); + for(int ik = 0; ik < dm._nk; ++ik) { + if(ik_in >= 0 && ik_in != ik) { continue; } // cal k_phase // if TK==std::complex, kphase is e^{ikR} - const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); - const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI; + const ModuleBase::Vector3 dR(R_index[0], R_index[1], R_index[2]); + const double arg = (dm._kvec_d[ik] * dR) * ModuleBase::TWO_PI; double sinp, cosp; ModuleBase::libm::sincos(arg, &sinp, &cosp); - kphase_vec[ik * r_size + ir] = std::complex(cosp, sinp); + kphase_vec[ik][iR] = TK(cosp, sinp); } } - std::vector> tmp_DMK_mat(mat_size); - for(int ik = 0; ik < this->_nk; ++ik) + std::vector DMK_mat_trans(mat_size); + for(int ik = 0; ik < dm._nk; ++ik) { - // copy column-major DMK to row-major tmp_DMK_mat (for the purpose of computational efficiency) - const std::complex* DMK_mat_ptr = this->_DMK[ik].data() + col_ap * this->_paraV->nrow + row_ap; - for(int icol = 0; icol < col_size; ++icol) + if(ik_in >= 0 && ik_in != ik) { continue; } + // copy column-major DMK to row-major DMK_mat_trans (for the purpose of computational efficiency) + const TK*const DMK_mat_ptr + = dm._DMK[ik].data() + + col_ap * dm._paraV->nrow + row_ap; + for(int icol = 0; icol < col_size; ++icol) { + for(int irow = 0; irow < row_size; ++irow) { + DMK_mat_trans[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; + }} + + for(int iR = 0; iR < R_size; ++iR) { - for(int irow = 0; irow < row_size; ++irow) - { - tmp_DMK_mat[irow * col_size + icol] = DMK_mat_ptr[icol * ld_hk + irow]; - } - } - - for(int ir = 0; ir < r_size; ++ir) - { - std::complex kphase = kphase_vec[ik * r_size + ir]; - std::complex* target_DMR_mat = target_DMR_mat_vec[ir]; + const TK kphase = kphase_vec[ik][iR]; BlasConnector::axpy(mat_size, kphase, - tmp_DMK_mat.data(), + DMK_mat_trans.data(), 1, - target_DMR_mat, + target_DMR_mat_vec[iR], 1); } } @@ -477,80 +453,85 @@ void DensityMatrix, double>::cal_DMR_full(hamilt::HContaine ModuleBase::timer::tick("DensityMatrix", "cal_DMR_full"); } +template <> +void DensityMatrix::cal_DMR_full( + hamilt::HContainer>* dmR_out, + const int ik_in) const{} +template <> +void DensityMatrix, double>::cal_DMR_full( + hamilt::HContainer>* dmR_out, + const int ik_in) const +{ + DensityMatrix_Tools::cal_DMR_full(*this, dmR_out, ik_in); +} + + + // calculate DMR from DMK using blas for gamma-only calculation template <> void DensityMatrix::cal_DMR(const int ik_in) { ModuleBase::TITLE("DensityMatrix", "cal_DMR"); + using TK = double; + using TR = double; assert(ik_in == -1 || ik_in == 0); + assert(this->_nk == 1); // To check whether DMR has been initialized -#ifdef __DEBUG - assert(!this->_DMR.empty() && "DMR has not been initialized!"); -#endif + assert(this->_DMR.size()==this->_nspin && "DMR has not been initialized!"); ModuleBase::timer::tick("DensityMatrix", "cal_DMR"); - int ld_hk = this->_paraV->nrow; + const int ld_hk = this->_paraV->nrow; for (int is = 1; is <= this->_nspin; ++is) { - int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 - hamilt::HContainer* target_DMR = this->_DMR[is - 1]; + const int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 + hamilt::HContainer*const target_DMR = this->_DMR[is - 1]; // set zero since this function is called in every scf step target_DMR->set_zero(); - -#ifdef __DEBUG - // assert(target_DMR->is_gamma_only() == true); - assert(this->_nk == 1); -#endif -#ifdef _OPENMP -#pragma omp parallel for schedule(dynamic) -#endif + #ifdef _OPENMP + #pragma omp parallel for schedule(dynamic) + #endif for (int i = 0; i < target_DMR->size_atom_pairs(); ++i) { - hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); - int iat1 = target_ap.get_atom_i(); - int iat2 = target_ap.get_atom_j(); + hamilt::AtomPair& target_ap = target_DMR->get_atom_pair(i); + const int iat1 = target_ap.get_atom_i(); + const int iat2 = target_ap.get_atom_j(); // get global indexes of whole matrix for each atom in this process - int row_ap = this->_paraV->atom_begin_row[iat1]; - int col_ap = this->_paraV->atom_begin_col[iat2]; + const int row_ap = this->_paraV->atom_begin_row[iat1]; + const int col_ap = this->_paraV->atom_begin_col[iat2]; const int row_size = this->_paraV->get_row_size(iat1); const int col_size = this->_paraV->get_col_size(iat2); - const int r_size = target_ap.get_R_size(); - if (row_ap == -1 || col_ap == -1) - { - throw std::string("Atom-pair not belong this process"); - } - // R index - const ModuleBase::Vector3 r_index = target_ap.get_R_index(0); -#ifdef __DEBUG - assert(r_size == 1); - assert(r_index.x == 0 && r_index.y == 0 && r_index.z == 0); -#endif - hamilt::BaseMatrix* target_mat = target_ap.find_matrix(r_index); -#ifdef __DEBUG + const int R_size = target_ap.get_R_size(); + assert(row_ap != -1 && col_ap != -1 && "Atom-pair not belong this process"); + assert(R_size == 1); + const ModuleBase::Vector3 R_index = target_ap.get_R_index(0); + assert(R_index.x == 0 && R_index.y == 0 && R_index.z == 0); + hamilt::BaseMatrix*const target_mat = target_ap.find_matrix(R_index); + #ifdef __DEBUG if (target_mat == nullptr) { std::cout << "target_mat is nullptr" << std::endl; continue; } -#endif + #endif // k index - double kphase = 1; - // set DMR element - double* target_DMR_ptr = target_mat->get_pointer(); - double* DMK_ptr = this->_DMK[0 + ik_begin].data(); + constexpr TK kphase = 1; // transpose DMK col=>row - DMK_ptr += col_ap * this->_paraV->nrow + row_ap; + const TK* DMK_mat_ptr + = this->_DMK[0 + ik_begin].data() + + col_ap * this->_paraV->nrow + row_ap; + // set DMR element + TR* target_DMR_ptr = target_mat->get_pointer(); for (int mu = 0; mu < row_size; ++mu) { BlasConnector::axpy(col_size, kphase, - DMK_ptr, + DMK_mat_ptr, ld_hk, target_DMR_ptr, 1); - DMK_ptr += 1; + DMK_mat_ptr += 1; target_DMR_ptr += col_size; } } @@ -558,6 +539,8 @@ void DensityMatrix::cal_DMR(const int ik_in) ModuleBase::timer::tick("DensityMatrix", "cal_DMR"); } + + // switch_dmr template void DensityMatrix::switch_dmr(const int mode) @@ -635,6 +618,51 @@ void DensityMatrix::switch_dmr(const int mode) } } + + +template <> +void DensityMatrix_Tools::func_exp_mul_dmk(const std::complex kphase, const std::vector> &DMK_mat_trans, double* target_DMR_mat) +{ + const std::size_t mat_size = DMK_mat_trans.size(); + for(std::size_t i = 0; i < mat_size; i++) + { + target_DMR_mat[i] + += kphase.real() * DMK_mat_trans[i].real() + - kphase.imag() * DMK_mat_trans[i].imag(); + } +} + +template <> +void DensityMatrix_Tools::func_exp_mul_dmk>(const std::complex kphase, const std::vector> &DMK_mat_trans, std::complex* target_DMR_mat) +{ + BlasConnector::axpy(DMK_mat_trans.size(), + kphase, + DMK_mat_trans.data(), + 1, + target_DMR_mat, + 1); +} + +template <> +void DensityMatrix_Tools::func_xyz_to_updown(const std::complex tmp[4], const int icol, const int step_trace[4], double* target_DMR_mat) +{ + target_DMR_mat[icol + step_trace[0]] = tmp[0].real() + tmp[3].real(); // rho_0 = (rho_upup + rho_downdown).real() + target_DMR_mat[icol + step_trace[1]] = tmp[1].real() + tmp[2].real(); // rho_x = (rho_updown + rho_downup).real() + target_DMR_mat[icol + step_trace[2]] = -tmp[1].imag() + tmp[2].imag(); // rho_y = (i * (rho_updown - rho_downup)).real() + target_DMR_mat[icol + step_trace[3]] = tmp[0].real() - tmp[3].real(); // rho_z = (rho_upup - rho_downdown).real() +} + +template <> +void DensityMatrix_Tools::func_xyz_to_updown>(const std::complex tmp[4], const int icol, const int step_trace[4], std::complex* target_DMR_mat) +{ + target_DMR_mat[icol + step_trace[0]] = tmp[0] + tmp[3]; // rho_0 = (rho_upup + rho_downdown) + target_DMR_mat[icol + step_trace[1]] = tmp[1] + tmp[2]; // rho_x = (rho_updown + rho_downup) + target_DMR_mat[icol + step_trace[2]] = ModuleBase::IMAG_UNIT * (tmp[1].imag() - tmp[2].imag()); // rho_y = (i * (rho_updown - rho_downup)) + target_DMR_mat[icol + step_trace[3]] = tmp[0] - tmp[3]; // rho_z = (rho_upup - rho_downdown) +} + + + // T of HContainer can be double or complex template class DensityMatrix; // Gamma-Only case template class DensityMatrix, double>; // Multi-k case diff --git a/source/source_estate/module_dm/density_matrix.h b/source/source_estate/module_dm/density_matrix.h index 5716340e07..a8b0e1c4ec 100644 --- a/source/source_estate/module_dm/density_matrix.h +++ b/source/source_estate/module_dm/density_matrix.h @@ -31,6 +31,40 @@ struct ShiftRealComplex> using type = double; }; + + template class DensityMatrix; + +// DensityMatrix,TR>::cal_DMR() is illegal in C++, so DensityMatrix_Tools is used instead. +namespace DensityMatrix_Tools +{ + template + extern void cal_DMR( + const DensityMatrix &dm, + std::vector*> &dmR_out, + const int ik_in); + + template + extern void cal_DMR_td( + const DensityMatrix &dm, + std::vector*> &dmR_out, + const UnitCell& ucell, + const ModuleBase::Vector3 At, + const int ik_in); + + template + extern void cal_DMR_full( + const DensityMatrix &dm, + hamilt::HContainer* dmR_out, + const int ik_in); + + template + extern void func_exp_mul_dmk(const std::complex kphase, const std::vector> &DMK_mat_trans, TR* target_DMR_mat); + + template + extern void func_xyz_to_updown(const std::complex tmp[4], const int icol, const int step_trace[4], TR* target_DMR_mat); +} + + template class DensityMatrix { @@ -51,7 +85,10 @@ class DensityMatrix * @param nk number of k-points, not always equal to K_Vectors::get_nks()/nspin_dm. * it will be set to kvec_d.size() if the value is invalid */ - DensityMatrix(const Parallel_Orbitals* _paraV, const int nspin, const std::vector>& kvec_d, const int nk); + DensityMatrix(const Parallel_Orbitals* _paraV, + const int nspin, + const std::vector>& kvec_d, + const int nk); /** * @brief Constructor of class DensityMatrix for gamma-only calculation, where kvector is not required @@ -176,6 +213,7 @@ class DensityMatrix /** * @brief calculate density matrix DMR from dm(k) using blas::axpy + * @param ik_in * if ik_in < 0, calculate all k-points * if ik_in >= 0, calculate only one k-point without summing over k-points */ @@ -183,6 +221,7 @@ class DensityMatrix /** * @brief calculate density matrix DMR with additional vector potential phase, used for hybrid gauge tddft + * @param ik_in * if ik_in < 0, calculate all k-points * if ik_in >= 0, calculate only one k-point without summing over k-points */ @@ -192,8 +231,11 @@ class DensityMatrix * @brief calculate complex density matrix DMR with both real and imaginary part for noncollinear-spin calculation * the stored dm(k) has been used to calculate the passin DMR * @param dmR_out pointer of HContainer object to store the calculated complex DMR + * @param ik_in + * if ik_in < 0, calculate all k-points + * if ik_in >= 0, calculate only one k-point without summing over k-points */ - void cal_DMR_full(hamilt::HContainer>* dmR_out) const; + void cal_DMR_full(hamilt::HContainer>* dmR_out, const int ik_in = -1) const; /** * @brief (Only nspin=2) switch DMR to total density matrix or magnetization density matrix @@ -284,6 +326,9 @@ class DensityMatrix std::vector dmr_origin_; TR* dmr_tmp_ = nullptr; + friend void DensityMatrix_Tools::cal_DMR(const DensityMatrix &dm, std::vector*> &dmR_out, const int ik_in); + friend void DensityMatrix_Tools::cal_DMR_td(const DensityMatrix &dm, std::vector*> &dmR_out, const UnitCell& ucell, const ModuleBase::Vector3 At, const int ik_in); + friend void DensityMatrix_Tools::cal_DMR_full(const DensityMatrix &dm, hamilt::HContainer>* dmR_out, const int ik_in); }; } // namespace elecstate diff --git a/source/source_estate/module_dm/init_dm.cpp b/source/source_estate/module_dm/init_dm.cpp new file mode 100644 index 0000000000..c45190e01e --- /dev/null +++ b/source/source_estate/module_dm/init_dm.cpp @@ -0,0 +1,58 @@ +#include "source_estate/module_dm/init_dm.h" +#include "source_estate/module_dm/cal_dm_psi.h" +#include "source_estate/elecstate_tools.h" +#include "source_estate/cal_ux.h" +#include "source_lcao/rho_tau_lcao.h" // mohan add 2025-11-12 + +template +void elecstate::init_dm(UnitCell& ucell, + elecstate::ElecState* pelec, + LCAO_domain::Setup_DM &dmat, + psi::Psi* psi, + Charge &chr, + const int iter, + const int exx_two_level_step) +{ + ModuleBase::TITLE("elecstate", "init_dm"); + + if (iter == 1 && exx_two_level_step == 0) + { + std::cout << " LCAO WAVEFUN -> CHARGE " << std::endl; + + elecstate::calEBand(pelec->ekb, pelec->wg, pelec->f_en); + + elecstate::cal_dm_psi(dmat.dm->get_paraV_pointer(), pelec->wg, *psi, *dmat.dm); + dmat.dm->cal_DMR(); + + // mohan add 2025-11-12, use density matrix to calculate the charge density + LCAO_domain::dm2rho(dmat.dm->get_DMR_vector(), PARAM.inp.nspin, &chr); + + elecstate::cal_ux(ucell); + + //! update the potentials by using new electron charge density + pelec->pot->update_from_charge(&chr, &ucell); + + //! compute the correction energy for metals + pelec->f_en.descf = pelec->cal_delta_escf(); + } + + return; +} + + +template void elecstate::init_dm(UnitCell& ucell, + elecstate::ElecState* pelec, + LCAO_domain::Setup_DM &dmat, + psi::Psi* psi, + Charge &chr, + const int iter, + const int exx_two_level_step); + +template void elecstate::init_dm>(UnitCell& ucell, + elecstate::ElecState* pelec, + LCAO_domain::Setup_DM> &dmat, + psi::Psi>* psi, + Charge &chr, + const int iter, + const int exx_two_level_step); + diff --git a/source/source_estate/module_dm/setup_dm.h b/source/source_estate/module_dm/init_dm.h similarity index 59% rename from source/source_estate/module_dm/setup_dm.h rename to source/source_estate/module_dm/init_dm.h index 73a9f8b00f..2fd969638d 100644 --- a/source/source_estate/module_dm/setup_dm.h +++ b/source/source_estate/module_dm/init_dm.h @@ -1,17 +1,19 @@ -#ifndef SETUP_DM_H -#define SETUP_DM_H +#ifndef INIT_DM_H +#define INIT_DM_H #include "source_cell/unitcell.h" // use unitcell -#include "source_estate/elecstate_lcao.h"// use ElecStateLCAO +#include "source_estate/elecstate.h"// use ElecState #include "source_psi/psi.h" // use electronic wave functions #include "source_estate/module_charge/charge.h" // use charge +#include "source_lcao/setup_dm.h" // define Setup_DM namespace elecstate { template -void setup_dm(UnitCell& ucell, - ElecStateLCAO* pelec, +void init_dm(UnitCell& ucell, + ElecState* pelec, + LCAO_domain::Setup_DM &dmat, psi::Psi* psi, Charge &chr, const int iter, diff --git a/source/source_estate/module_dm/setup_dm.cpp b/source/source_estate/module_dm/setup_dm.cpp deleted file mode 100644 index beb611b0dc..0000000000 --- a/source/source_estate/module_dm/setup_dm.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "source_estate/module_dm/setup_dm.h" -#include "source_estate/module_dm/cal_dm_psi.h" -#include "source_estate/elecstate_tools.h" -#include "source_estate/cal_ux.h" - -template -void elecstate::setup_dm(UnitCell& ucell, - elecstate::ElecStateLCAO* pelec, - psi::Psi* psi, - Charge &chr, - const int iter, - const int exx_two_level_step) -{ - ModuleBase::TITLE("elecstate", "setup_dm"); - - if (iter == 1 && exx_two_level_step == 0) - { - std::cout << " WAVEFUN -> CHARGE " << std::endl; - - // calculate the density matrix using read in wave functions - // and then calculate the charge density on grid. - - pelec->skip_weights = true; - elecstate::calculate_weights(pelec->ekb, - pelec->wg, - pelec->klist, - pelec->eferm, - pelec->f_en, - pelec->nelec_spin, - pelec->skip_weights); - - elecstate::calEBand(pelec->ekb, pelec->wg, pelec->f_en); - elecstate::cal_dm_psi(pelec->DM->get_paraV_pointer(), pelec->wg, *psi, *(pelec->DM)); - pelec->DM->cal_DMR(); - - pelec->psiToRho(*psi); - pelec->skip_weights = false; - - elecstate::cal_ux(ucell); - - //! update the potentials by using new electron charge density - pelec->pot->update_from_charge(&chr, &ucell); - - //! compute the correction energy for metals - pelec->f_en.descf = pelec->cal_delta_escf(); - } - - return; -} - - -template void elecstate::setup_dm(UnitCell& ucell, - elecstate::ElecStateLCAO* pelec, - psi::Psi* psi, - Charge &chr, - const int iter, - const int exx_two_level_step); - -template void elecstate::setup_dm>(UnitCell& ucell, - elecstate::ElecStateLCAO>* pelec, - psi::Psi>* psi, - Charge &chr, - const int iter, - const int exx_two_level_step); - diff --git a/source/source_estate/module_dm/test/CMakeLists.txt b/source/source_estate/module_dm/test/CMakeLists.txt index 1c4365cdb3..689804f54e 100644 --- a/source/source_estate/module_dm/test/CMakeLists.txt +++ b/source/source_estate/module_dm/test/CMakeLists.txt @@ -16,7 +16,7 @@ AddTest( ${ABACUS_SOURCE_DIR}/source_lcao/module_hcontainer/hcontainer.cpp ${ABACUS_SOURCE_DIR}/source_lcao/module_hcontainer/atom_pair.cpp ${ABACUS_SOURCE_DIR}/source_basis/module_ao/parallel_orbitals.cpp - ${ABACUS_SOURCE_DIR}/source_io/output.cpp + ${ABACUS_SOURCE_DIR}/source_io/module_output/output.cpp ) AddTest( diff --git a/source/source_estate/module_pot/H_TDDFT_pw.cpp b/source/source_estate/module_pot/H_TDDFT_pw.cpp index 3f6c8a7fcd..cdb8a28e2d 100644 --- a/source/source_estate/module_pot/H_TDDFT_pw.cpp +++ b/source/source_estate/module_pot/H_TDDFT_pw.cpp @@ -3,10 +3,9 @@ #include "source_base/constants.h" #include "source_base/math_integral.h" #include "source_base/timer.h" -#include "source_io/input_conv.h" +#include "source_io/module_parameter/input_conv.h" #include "source_io/module_parameter/parameter.h" #include "source_lcao/module_rt/evolve_elec.h" -#include "source_pw/module_pwdft/global.h" namespace elecstate { @@ -489,4 +488,4 @@ void H_TDDFT_pw::compute_force(const UnitCell& cell, ModuleBase::matrix& fe) } } -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/source_estate/module_pot/H_TDDFT_pw.h b/source/source_estate/module_pot/H_TDDFT_pw.h index 8f2064eb35..fc25f510bd 100644 --- a/source/source_estate/module_pot/H_TDDFT_pw.h +++ b/source/source_estate/module_pot/H_TDDFT_pw.h @@ -2,7 +2,7 @@ #define H_TDDFT_PW_H #include "pot_base.h" -#include "source_io/input_conv.h" +#include "source_io/module_parameter/input_conv.h" #include "source_io/module_parameter/parameter.h" // PARAM.globalv.global_readin_dir, PARAM.inp.mdp.md_restart namespace elecstate diff --git a/source/source_estate/module_pot/efield.cpp b/source/source_estate/module_pot/efield.cpp index c51b6262ac..2e9676d9d4 100644 --- a/source/source_estate/module_pot/efield.cpp +++ b/source/source_estate/module_pot/efield.cpp @@ -227,7 +227,7 @@ double Efield::cal_induced_dipole(const UnitCell& cell, Parallel_Reduce::reduce_pool(induced_dipole); induced_dipole *= cell.lat0 / bmod * ModuleBase::FOUR_PI / rho_basis->nxyz; - + delete[] induced_rho; return induced_dipole; } @@ -360,4 +360,4 @@ void Efield::autoset(std::vector& pos) ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Autoset efield_pos_dec", efield_pos_dec); } -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/source_estate/module_pot/pot_base.h b/source/source_estate/module_pot/pot_base.h index be47777af4..aaa578bc5b 100644 --- a/source/source_estate/module_pot/pot_base.h +++ b/source/source_estate/module_pot/pot_base.h @@ -28,6 +28,8 @@ class PotBase virtual void cal_fixed_v(double* vl_pseudo){} + virtual double get_energy() const { return 0.0; } + bool fixed_mode = 0; bool dynamic_mode = 0; diff --git a/source/source_estate/module_pot/pot_local_paw.cpp b/source/source_estate/module_pot/pot_local_paw.cpp deleted file mode 100644 index 03dab7d59e..0000000000 --- a/source/source_estate/module_pot/pot_local_paw.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "pot_local_paw.h" - -#include "source_base/timer.h" -#include "source_base/tool_title.h" - -#include - -namespace elecstate -{ - -//========================================================== -// This routine computes the local potential in real space -//========================================================== -void PotLocal_PAW::cal_fixed_v(double *vl_pseudo // store the local pseudopotential -) -{ - ModuleBase::TITLE("PotLocal_PAW", "cal_fixed_v"); - ModuleBase::timer::tick("PotLocal_PAW", "cal_fixed_v"); - - // GlobalV::ofs_running <<" set local pseudopotential done." << std::endl; - ModuleBase::timer::tick("PotLocal_PAW", "cal_fixed_v"); - return; -} - -} // namespace elecstate \ No newline at end of file diff --git a/source/source_estate/module_pot/pot_local_paw.h b/source/source_estate/module_pot/pot_local_paw.h deleted file mode 100644 index 7399827c33..0000000000 --- a/source/source_estate/module_pot/pot_local_paw.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef POTLOCALPAW_H -#define POTLOCALPAW_H - -#include "source_base/matrix.h" -#include "pot_base.h" - -namespace elecstate -{ - -class PotLocal_PAW : public PotBase -{ - public: - PotLocal_PAW() - { - this->fixed_mode = true; - this->dynamic_mode = false; - } - - void cal_fixed_v(double* vl_pseudo) override; -}; - -} // namespace elecstate - -#endif \ No newline at end of file diff --git a/source/source_estate/module_pot/pot_ml_exx.cpp b/source/source_estate/module_pot/pot_ml_exx.cpp new file mode 100644 index 0000000000..4d1237276d --- /dev/null +++ b/source/source_estate/module_pot/pot_ml_exx.cpp @@ -0,0 +1,217 @@ +#ifdef __MLALGO + +#include "pot_ml_exx.h" + +#include "npy.hpp" +#include "source_base/parallel_reduce.h" +#include "source_base/global_function.h" + +namespace elecstate +{ + +ML_EXX::ML_EXX() +{ + this->energy_prefactor = - 3. / 4. * std::pow(3. / M_PI, 1./3.) * 2; + this->energy_exponent = 4. / 3.; +} + +ML_EXX::~ML_EXX(){} + +void ML_EXX::set_para(const Input_para& inp, const UnitCell* ucell_in, const ModulePW::PW_Basis* rho_basis_in) +{ + torch::set_default_dtype(caffe2::TypeMeta::fromScalarType(torch::kDouble)); + auto output = torch::get_default_dtype(); + std::cout << "Default type: " << output << std::endl; + + this->set_device(inp.of_ml_device); + + this->nx = rho_basis_in->nrxx; + this->nx_tot = rho_basis_in->nrxx; + this->dV = ucell_in->omega / rho_basis_in->nxyz; + this->nkernel = inp.of_ml_nkernel; + + this->init_data( + this->nkernel, + inp.of_ml_gamma, + inp.of_ml_p, + inp.of_ml_q, + inp.of_ml_tanhp, + inp.of_ml_tanhq, + inp.of_ml_gammanl, + inp.of_ml_pnl, + inp.of_ml_qnl, + inp.of_ml_xi, + inp.of_ml_tanhxi, + inp.of_ml_tanhxi_nl, + inp.of_ml_tanh_pnl, + inp.of_ml_tanh_qnl, + inp.of_ml_tanhp_nl, + inp.of_ml_tanhq_nl); + + std::cout << "ninput = " << this->ninput << std::endl; + + if (PARAM.inp.ml_exx) + { + int nnode = 100; + int nlayer = 3; + this->nn = std::make_shared(this->nx, 0, this->ninput, nnode, nlayer, this->device); + torch::load(this->nn, "net.pt", this->device_type); + std::cout << "load net done" << std::endl; + if (PARAM.inp.of_ml_feg != 0) + { + torch::Tensor feg_inpt = torch::zeros(this->ninput, this->device_type); + for (int i = 0; i < this->ninput; ++i) + { + if (this->descriptor_type[i] == "gamma") feg_inpt[i] = 1.; + } + + if (PARAM.inp.of_ml_feg == 1) + this->feg_net_F = torch::softplus(this->nn->forward(feg_inpt)).to(this->device_CPU).contiguous().data_ptr()[0]; + else + { + this->feg_net_F = this->nn->forward(feg_inpt).to(this->device_CPU).contiguous().data_ptr()[0]; + } + + std::cout << "feg_net_F = " << this->feg_net_F << std::endl; + } + } + + if (PARAM.inp.ml_exx || PARAM.inp.of_ml_gene_data == 1) + { + this->cal_tool = new ModuleIO::Cal_MLKEDF_Descriptors; + + this->chi_p = inp.of_ml_chi_p; + this->chi_q = inp.of_ml_chi_q; + this->chi_xi = inp.of_ml_chi_xi; + this->chi_pnl = inp.of_ml_chi_pnl; + this->chi_qnl = inp.of_ml_chi_qnl; + + this->cal_tool->set_para(this->nx, inp.nelec, inp.of_tf_weight, inp.of_vw_weight, this->chi_p, this->chi_q, + this->chi_xi, this->chi_pnl, this->chi_qnl, this->nkernel, inp.of_ml_kernel, inp.of_ml_kernel_scaling, inp.of_ml_yukawa_alpha, inp.of_ml_kernel_file, this->dV * rho_basis_in->nxyz, rho_basis_in); + } +} + + +/** + * @brief Get the potential of ML KEDF, and add it into rpotential + * + * @param prho charge density + * @param pw_rho PW_Basis + * @param rpotential rpotential => rpotential + V_{ML} + */ +void ML_EXX::ml_potential(const double * const * prho, const ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential) +{ + double* rho_data = new double[this->nx]; + const double** prho_mod = new const double*[1]; + prho_mod[0] = rho_data; + + for (int ir = 0; ir < this->nx; ++ir) + { + rho_data[ir] = std::abs(prho[0][ir]); + } + + this->updateInput(prho_mod, pw_rho); + + this->NN_forward(prho_mod, pw_rho, true); + + torch::Tensor enhancement_cpu_tensor = this->nn->F.to(this->device_CPU).contiguous(); + this->enhancement_cpu_ptr = enhancement_cpu_tensor.data_ptr(); + torch::Tensor gradient_cpu_tensor = this->nn->inputs.grad().to(this->device_CPU).contiguous(); + this->gradient_cpu_ptr = gradient_cpu_tensor.data_ptr(); + + this->get_potential_(prho_mod, pw_rho, rpotential); + + // get energy + ModuleBase::timer::tick("ML_EXX", "Pauli Energy"); + double energy = 0.; + for (int ir = 0; ir < this->nx; ++ir) + { + energy += this->enhancement_cpu_ptr[ir] * std::pow(prho_mod[0][ir], this->energy_exponent); + } + energy *= this->dV * this->energy_prefactor; + this->ml_exx_energy = energy; + Parallel_Reduce::reduce_pool(this->ml_exx_energy); + ModuleBase::timer::tick("ML_EXX", "Pauli Energy"); + + delete[] rho_data; + delete[] prho_mod; +} + +/** + * @brief Generate training data for ML KEDF + * + * @param prho charge density + * @param wt KEDF_WT + * @param tf KEDF_TF + * @param pw_rho PW_Basis + * @param veff effective potential + */ +void ML_EXX::generateTrainData(const double * const *prho, const ModulePW::PW_Basis *pw_rho, const double *veff) +{ + if (PARAM.inp.of_kinetic == "ml") + { + this->updateInput(prho, pw_rho); + + this->NN_forward(prho, pw_rho, true); + + torch::Tensor enhancement_cpu_tensor = this->nn->F.to(this->device_CPU).contiguous(); + this->enhancement_cpu_ptr = enhancement_cpu_tensor.data_ptr(); + torch::Tensor gradient_cpu_tensor = this->nn->inputs.grad().to(this->device_CPU).contiguous(); + this->gradient_cpu_ptr = gradient_cpu_tensor.data_ptr(); + + torch::Tensor enhancement = this->nn->F.reshape({this->nx}); + ModuleBase::matrix potential(1, this->nx); + + this->get_potential_(prho, pw_rho, potential); + + this->dumpTensor("enhancement.npy", enhancement); + this->dumpMatrix("potential.npy", potential); + } +} + +/** + * @brief For test + * + * @param prho charge density + * @param pw_rho PW_Basis + */ +void ML_EXX::localTest(const double * const *pprho, const ModulePW::PW_Basis *pw_rho) +{ + // for test ===================== + std::vector cshape = {(long unsigned) this->nx}; + bool fortran_order = false; + + std::vector temp_prho(this->nx); + this->loadVector("path_to_rho_file", temp_prho); + + double ** prho = new double *[1]; + prho[0] = new double[this->nx]; + for (int ir = 0; ir < this->nx; ++ir) prho[0][ir] = temp_prho[ir]; + for (int ir = 0; ir < this->nx; ++ir) + { + if (prho[0][ir] == 0.){ + std::cout << "WARNING: rho = 0" << std::endl; + } + }; + // ============================== + this->updateInput(prho, pw_rho); + + this->NN_forward(prho, pw_rho, true); + + torch::Tensor enhancement_cpu_tensor = this->nn->F.to(this->device_CPU).contiguous(); + this->enhancement_cpu_ptr = enhancement_cpu_tensor.data_ptr(); + torch::Tensor gradient_cpu_tensor = this->nn->inputs.grad().to(this->device_CPU).contiguous(); + this->gradient_cpu_ptr = gradient_cpu_tensor.data_ptr(); + + torch::Tensor enhancement = this->nn->F.reshape({this->nx}); + ModuleBase::matrix potential(1, this->nx); + + this->get_potential_(prho, pw_rho, potential); + + this->dumpTensor("enhancement-abacus.npy", enhancement); + this->dumpMatrix("potential-abacus.npy", potential); + exit(0); +} + +} // namespace elecstate +#endif diff --git a/source/source_estate/module_pot/pot_ml_exx.h b/source/source_estate/module_pot/pot_ml_exx.h new file mode 100644 index 0000000000..41a4b63c0b --- /dev/null +++ b/source/source_estate/module_pot/pot_ml_exx.h @@ -0,0 +1,80 @@ +#ifndef POT_ML_EXX_H +#define POT_ML_EXX_H +#include "source_io/module_parameter/parameter.h" + +#ifdef __MLALGO + +#include "pot_base.h" +#include "source_pw/module_ofdft/ml_tools/nn_of.h" +#include "source_io/module_ml/cal_mlkedf_descriptors.h" +#include "source_pw/module_ofdft/ml_base.h" + +namespace elecstate +{ + +class ML_EXX : public ML_Base +{ +public: + ML_EXX(); + virtual ~ML_EXX(); + + void set_para(const Input_para& inp, const UnitCell* ucell_in, const ModulePW::PW_Basis* rho_basis_in); + + void ml_potential(const double * const * prho, const ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential); + + // output all parameters + void generateTrainData(const double * const *prho, const ModulePW::PW_Basis *pw_rho, const double *veff); + void localTest(const double * const *prho, const ModulePW::PW_Basis *pw_rho); + + void init_data( + const int &nkernel, + const bool &of_ml_gamma, + const bool &of_ml_p, + const bool &of_ml_q, + const bool &of_ml_tanhp, + const bool &of_ml_tanhq, + const std::vector &of_ml_gammanl_, + const std::vector &of_ml_pnl, + const std::vector &of_ml_qnl, + const std::vector &of_ml_xi, + const std::vector &of_ml_tanhxi, + const std::vector &of_ml_tanhxi_nl, + const std::vector &of_ml_tanh_pnl, + const std::vector &of_ml_tanh_qnl, + const std::vector &of_ml_tanhp_nl, + const std::vector &of_ml_tanhq_nl + ); + + double ml_exx_energy = 0.0; +}; + + +class PotML_EXX : public PotBase +{ + public: + PotML_EXX(const ModulePW::PW_Basis* rho_basis_in, const UnitCell* ucell_in) + { + this->rho_basis_ = rho_basis_in; + this->dynamic_mode = true; + this->fixed_mode = false; + + this->ml_exx.set_para(PARAM.inp, ucell_in, rho_basis_in); + } + ~PotML_EXX() {}; + + void cal_v_eff(const Charge*const chg, const UnitCell*const ucell, ModuleBase::matrix& v_eff) override + { + if (PARAM.inp.of_ml_local_test) this->ml_exx.localTest(chg->rho, this->rho_basis_); + this->ml_exx.ml_potential(chg->rho, this->rho_basis_, v_eff); + } + + double get_energy() const override { return this->ml_exx.ml_exx_energy; } + +private: + ML_EXX ml_exx; +}; + + +} +#endif +#endif diff --git a/source/source_estate/module_pot/pot_ml_exx_label.cpp b/source/source_estate/module_pot/pot_ml_exx_label.cpp new file mode 100644 index 0000000000..3908b7c5ef --- /dev/null +++ b/source/source_estate/module_pot/pot_ml_exx_label.cpp @@ -0,0 +1,305 @@ +#ifdef __MLALGO + +#include "pot_ml_exx.h" + +namespace elecstate +{ +/** + * @brief Initialize the data for ML KEDF, and generate the mapping between descriptor and kernel + * + * @param nkernel number of kernels + * @param of_ml_gamma whether to use gamma descriptor + * @param of_ml_p whether to use p descriptor + * @param of_ml_q whether to use q descriptor + * @param of_ml_tanhp whether to use tanhp descriptor + * @param of_ml_tanhq whether to use tanhq descriptor + * @param of_ml_gammanl whether to use gammanl descriptor + * @param of_ml_pnl whether to use pnl descriptor + * @param of_ml_qnl whether to use qnl descriptor + * @param of_ml_xi whether to use xi descriptor + * @param of_ml_tanhxi whether to use tanhxi descriptor + * @param of_ml_tanhxi_nl whether to use tanhxi_nl descriptor + * @param of_ml_tanh_pnl whether to use tanh_pnl descriptor + * @param of_ml_tanh_qnl whether to use tanh_qnl descriptor + * @param of_ml_tanhp_nl whether to use tanhp_nl descriptor + * @param of_ml_tanhq_nl whether to use tanhq_nl descriptor + */ +void ML_EXX::init_data( + const int &nkernel, + const bool &of_ml_gamma, + const bool &of_ml_p, + const bool &of_ml_q, + const bool &of_ml_tanhp, + const bool &of_ml_tanhq, + const std::vector &of_ml_gammanl, + const std::vector &of_ml_pnl, + const std::vector &of_ml_qnl, + const std::vector &of_ml_xi, + const std::vector &of_ml_tanhxi, + const std::vector &of_ml_tanhxi_nl, + const std::vector &of_ml_tanh_pnl, + const std::vector &of_ml_tanh_qnl, + const std::vector &of_ml_tanhp_nl, + const std::vector &of_ml_tanhq_nl +) +{ + + this->ninput = 0; + + // --------- semi-local descriptors --------- + if (of_ml_gamma){ + this->descriptor_type.push_back("gamma"); + this->kernel_index.push_back(-1); + this->ninput++; + } + if (of_ml_p){ + this->descriptor_type.push_back("p"); + this->kernel_index.push_back(-1); + this->ninput++; + } + if (of_ml_q){ + this->descriptor_type.push_back("q"); + this->kernel_index.push_back(-1); + this->ninput++; + } + // --------- non-local descriptors --------- + for (int ik = 0; ik < nkernel; ++ik) + { + if (of_ml_gammanl[ik]){ + this->descriptor_type.push_back("gammanl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_pnl[ik]){ + this->descriptor_type.push_back("pnl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_qnl[ik]){ + this->descriptor_type.push_back("qnl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_xi[ik]){ + this->descriptor_type.push_back("xi"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_tanhxi[ik]){ + this->descriptor_type.push_back("tanhxi"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_tanhxi_nl[ik]){ + this->descriptor_type.push_back("tanhxi_nl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + } + // --------- semi-local descriptors --------- + if (of_ml_tanhp){ + this->descriptor_type.push_back("tanhp"); + this->kernel_index.push_back(-1); + this->ninput++; + } + if (of_ml_tanhq){ + this->descriptor_type.push_back("tanhq"); + this->kernel_index.push_back(-1); + this->ninput++; + } + // --------- non-local descriptors --------- + for (int ik = 0; ik < nkernel; ++ik) + { + if (of_ml_tanh_pnl[ik]){ + this->descriptor_type.push_back("tanh_pnl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_tanh_qnl[ik]){ + this->descriptor_type.push_back("tanh_qnl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_tanhp_nl[ik]){ + this->descriptor_type.push_back("tanhp_nl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + if (of_ml_tanhq_nl[ik]){ + this->descriptor_type.push_back("tanhq_nl"); + this->kernel_index.push_back(ik); + this->ninput++; + } + } + + this->descriptor2kernel = {{"gamma", {}}, + {"p", {}}, + {"q", {}}, + {"tanhp", {}}, + {"tanhq", {}}, + {"gammanl", {}}, + {"pnl", {}}, + {"qnl", {}}, + {"xi", {}}, + {"tanhxi", {}}, + {"tanhxi_nl", {}}, + {"tanh_pnl", {}}, + {"tanh_qnl", {}}, + {"tanhp_nl", {}}, + {"tanhq_nl", {}}}; + this->descriptor2index = this->descriptor2kernel; + + for (int i = 0; i < this->ninput; ++i) + { + this->descriptor2kernel[this->descriptor_type[i]].push_back(this->kernel_index[i]); + this->descriptor2index[this->descriptor_type[i]].push_back(i); + } + // std::cout << "descriptor2index " << this->descriptor2index << std::endl; + // std::cout << "descriptor2kernel " << this->descriptor2kernel << std::endl; + + this->ml_gamma = this->descriptor2index["gamma"].size() > 0; + this->ml_p = this->descriptor2index["p"].size() > 0; + this->ml_q = this->descriptor2index["q"].size() > 0; + this->ml_tanhp = this->descriptor2index["tanhp"].size() > 0; + this->ml_tanhq = this->descriptor2index["tanhq"].size() > 0; + this->ml_gammanl = this->descriptor2index["gammanl"].size() > 0; + this->ml_pnl = this->descriptor2index["pnl"].size() > 0; + this->ml_qnl = this->descriptor2index["qnl"].size() > 0; + this->ml_xi = this->descriptor2index["xi"].size() > 0; + this->ml_tanhxi = this->descriptor2index["tanhxi"].size() > 0; + this->ml_tanhxi_nl = this->descriptor2index["tanhxi_nl"].size() > 0; + this->ml_tanh_pnl = this->descriptor2index["tanh_pnl"].size() > 0; + this->ml_tanh_qnl = this->descriptor2index["tanh_qnl"].size() > 0; + this->ml_tanhp_nl = this->descriptor2index["tanhp_nl"].size() > 0; + this->ml_tanhq_nl = this->descriptor2index["tanhq_nl"].size() > 0; + + bool gene_gammanl_tot = false; + bool gene_pnl_tot = false; + bool gene_qnl_tot = false; + bool gene_tanh_pnl_tot = false; + bool gene_tanh_qnl_tot = false; + bool gene_tanhp_nl_tot = false; + bool gene_tanhq_nl_tot = false; + + this->gene_data_label = {{"gamma", {}}, + {"p", {}}, + {"q", {}}, + {"tanhp", {}}, + {"tanhq", {}}, + {"gammanl", {}}, + {"pnl", {}}, + {"qnl", {}}, + {"xi", {}}, + {"tanhxi", {}}, + {"tanhxi_nl", {}}, + {"tanh_pnl", {}}, + {"tanh_qnl", {}}, + {"tanhp_nl", {}}, + {"tanhq_nl", {}}}; + + for (std::string descriptor : {"gamma", "p", "q", "tanhp", "tanhq"}) + { + this->gene_data_label[descriptor].push_back(0); + } + for (std::string descriptor : {"gammanl", "pnl", "qnl", "xi", "tanhxi", "tanhxi_nl", + "tanh_pnl", "tanh_qnl", "tanhp_nl", "tanhq_nl"}) + { + for (int ik = 0; ik < nkernel; ++ik) + { + this->gene_data_label[descriptor].push_back(0); + } + } + + for (int ik = 0; ik < nkernel; ++ik) + { + this->gene_data_label["pnl"][ik] = of_ml_pnl[ik] || of_ml_tanh_pnl[ik]; + this->gene_data_label["qnl"][ik] = of_ml_qnl[ik] || of_ml_tanh_qnl[ik]; + this->gene_data_label["tanhxi_nl"][ik] = of_ml_tanhxi_nl[ik]; + this->gene_data_label["tanhxi"][ik] = of_ml_tanhxi[ik] || of_ml_tanhxi_nl[ik]; + this->gene_data_label["xi"][ik] = of_ml_xi[ik] || this->gene_data_label["tanhxi"][ik]; + this->gene_data_label["gammanl"][ik] = of_ml_gammanl[ik] || this->gene_data_label["xi"][ik]; + this->gene_data_label["tanh_pnl"][ik] = of_ml_tanh_pnl[ik]; + this->gene_data_label["tanh_qnl"][ik] = of_ml_tanh_qnl[ik]; + this->gene_data_label["tanhp_nl"][ik] = of_ml_tanhp_nl[ik]; + this->gene_data_label["tanhq_nl"][ik] = of_ml_tanhq_nl[ik]; + // this->gene_data_label["pnl"][ik] = of_ml_pnl[ik] || of_ml_tanh_pnl[ik]; + + gene_gammanl_tot = gene_gammanl_tot || this->gene_data_label["gammanl"][ik]; + gene_pnl_tot = gene_pnl_tot || this->gene_data_label["pnl"][ik]; + gene_qnl_tot = gene_qnl_tot || this->gene_data_label["qnl"][ik]; + gene_tanh_pnl_tot = gene_tanh_pnl_tot || this->gene_data_label["tanh_pnl"][ik]; + gene_tanh_qnl_tot = gene_tanh_qnl_tot || this->gene_data_label["tanh_qnl"][ik]; + gene_tanhp_nl_tot = gene_tanhp_nl_tot || this->gene_data_label["tanhp_nl"][ik]; + gene_tanhq_nl_tot = gene_tanhq_nl_tot || this->gene_data_label["tanhq_nl"][ik]; + } + this->gene_data_label["gamma"][0] = of_ml_gamma || gene_gammanl_tot; + this->gene_data_label["tanhp"][0] = of_ml_tanhp || gene_tanhp_nl_tot || gene_tanh_pnl_tot; + this->gene_data_label["tanhq"][0] = of_ml_tanhq || gene_tanhq_nl_tot || gene_tanh_qnl_tot; + this->gene_data_label["p"][0] = of_ml_p || this->gene_data_label["tanhp"][0] || gene_pnl_tot; + this->gene_data_label["q"][0] = of_ml_q || this->gene_data_label["tanhq"][0] || gene_qnl_tot; + + + if (this->gene_data_label["gamma"][0]){ + this->gamma = std::vector(this->nx, 0.); + } + if (this->gene_data_label["p"][0]){ + this->nablaRho = std::vector >(3, std::vector(this->nx, 0.)); + this->p = std::vector(this->nx, 0.); + } + if (this->gene_data_label["q"][0]){ + this->q = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhp"][0]){ + this->tanhp = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhq"][0]){ + this->tanhq = std::vector(this->nx, 0.); + } + + for (int ik = 0; ik < nkernel; ++ik) + { + this->gammanl.push_back({}); + this->pnl.push_back({}); + this->qnl.push_back({}); + this->xi.push_back({}); + this->tanhxi.push_back({}); + this->tanhxi_nl.push_back({}); + this->tanh_pnl.push_back({}); + this->tanh_qnl.push_back({}); + this->tanhp_nl.push_back({}); + this->tanhq_nl.push_back({}); + + if (this->gene_data_label["gammanl"][ik]){ + this->gammanl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["pnl"][ik]){ + this->pnl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["qnl"][ik]){ + this->qnl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["xi"][ik]){ + this->xi[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhxi"][ik]){ + this->tanhxi[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhxi_nl"][ik]){ + this->tanhxi_nl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanh_pnl"][ik]){ + this->tanh_pnl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanh_qnl"][ik]){ + this->tanh_qnl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhp_nl"][ik]){ + this->tanhp_nl[ik] = std::vector(this->nx, 0.); + } + if (this->gene_data_label["tanhq_nl"][ik]){ + this->tanhq_nl[ik] = std::vector(this->nx, 0.); + } + } +} +} +#endif diff --git a/source/source_estate/module_pot/pot_sep.h b/source/source_estate/module_pot/pot_sep.h index fce110cb40..cb4368030d 100644 --- a/source/source_estate/module_pot/pot_sep.h +++ b/source/source_estate/module_pot/pot_sep.h @@ -3,7 +3,7 @@ #include "pot_base.h" #include "source_base/matrix.h" -#include "source_pw/module_pwdft/VSep_in_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" namespace elecstate { diff --git a/source/source_estate/module_pot/pot_surchem.hpp b/source/source_estate/module_pot/pot_surchem.hpp index 3ccb4960dc..dc06e60fd4 100644 --- a/source/source_estate/module_pot/pot_surchem.hpp +++ b/source/source_estate/module_pot/pot_surchem.hpp @@ -31,6 +31,7 @@ class PotSurChem : public PotBase } } + // Passing an explicit output matrix makes the lifetime and allocation explicit and avoids hidden allocations. void cal_v_eff(const Charge*const chg, const UnitCell*const ucell, ModuleBase::matrix& v_eff) override { if (!this->allocated) @@ -38,14 +39,16 @@ class PotSurChem : public PotBase this->surchem_->allocate(this->rho_basis_->nrxx, v_eff.nr); this->allocated = true; } - - v_eff += this->surchem_->v_correction(*ucell, - *chg->pgrid, - const_cast(this->rho_basis_), - v_eff.nr, - chg->rho, - this->vlocal, - this->structure_factors_); + ModuleBase::matrix v_sol_correction(v_eff.nr, this->rho_basis_->nrxx); + this->surchem_->v_correction(*ucell, + *chg->pgrid, + const_cast(this->rho_basis_), + v_eff.nr, + chg->rho, + this->vlocal, + this->structure_factors_, + v_sol_correction); + v_eff += v_sol_correction; } private: diff --git a/source/source_estate/module_pot/pot_xc.cpp b/source/source_estate/module_pot/pot_xc.cpp index 09c4719a5c..5bfccb118d 100644 --- a/source/source_estate/module_pot/pot_xc.cpp +++ b/source/source_estate/module_pot/pot_xc.cpp @@ -1,7 +1,6 @@ #include "pot_xc.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #ifdef USE_LIBXC #include "source_hamilt/module_xc/xc_functional_libxc.h" diff --git a/source/source_estate/module_pot/potential_new.cpp b/source/source_estate/module_pot/potential_new.cpp index b1968339aa..dceab85c0b 100644 --- a/source/source_estate/module_pot/potential_new.cpp +++ b/source/source_estate/module_pot/potential_new.cpp @@ -8,6 +8,7 @@ #include "source_base/tool_title.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_io/module_parameter/parameter.h" +#include "pot_ml_exx.h" #include @@ -109,10 +110,10 @@ void Potential::allocate() return; } - this->v_effective_fixed.resize(nrxx); + this->v_eff_fixed.resize(nrxx); ModuleBase::Memory::record("Pot::veff_fix", sizeof(double) * nrxx); - this->v_effective.create(nspin, nrxx); + this->v_eff.create(nspin, nrxx); ModuleBase::Memory::record("Pot::veff", sizeof(double) * nspin * nrxx); this->veff_smooth.create(nspin, nrxx_smooth); @@ -120,7 +121,7 @@ void Potential::allocate() if (XC_Functional::get_ked_flag()) { - this->vofk_effective.create(nspin, nrxx); + this->vofk_eff.create(nspin, nrxx); ModuleBase::Memory::record("Pot::vofk", sizeof(double) * nspin * nrxx); this->vofk_smooth.create(nspin, nrxx_smooth); @@ -162,11 +163,11 @@ void Potential::update_from_charge(const Charge*const chg, const UnitCell*const if (!this->fixed_done) { - this->cal_fixed_v(this->v_effective_fixed.data()); + this->cal_fixed_v(this->v_eff_fixed.data()); this->fixed_done = true; } - this->cal_v_eff(chg, ucell, this->v_effective); + this->cal_v_eff(chg, ucell, this->v_eff); // interpolate potential on the smooth mesh if necessary this->interpolate_vrs(); @@ -202,7 +203,7 @@ void Potential::cal_fixed_v(double* vl_pseudo) ModuleBase::TITLE("Potential", "cal_fixed_v"); ModuleBase::timer::tick("Potential", "cal_fixed_v"); - this->v_effective_fixed.assign(this->v_effective_fixed.size(), 0.0); + this->v_eff_fixed.assign(this->v_eff_fixed.size(), 0.0); for (size_t i = 0; i < this->components.size(); i++) { if (this->components[i]->fixed_mode) @@ -219,10 +220,10 @@ void Potential::cal_v_eff(const Charge*const chg, const UnitCell*const ucell, Mo ModuleBase::TITLE("Potential", "cal_veff"); ModuleBase::timer::tick("Potential", "cal_veff"); - const int nspin_current = this->v_effective.nr; - const int nrxx = this->v_effective.nc; - // first of all, set v_effective to zero. - this->v_effective.zero_out(); + const int nspin_current = this->v_eff.nr; + const int nrxx = this->v_eff.nc; + // first of all, set v_eff to zero. + this->v_eff.zero_out(); // add fixed potential components // nspin = 2, add fixed components for all @@ -231,11 +232,11 @@ void Potential::cal_v_eff(const Charge*const chg, const UnitCell*const ucell, Mo { if (i == 0 || nspin_current == 2) { - ModuleBase::GlobalFunc::COPYARRAY(this->v_effective_fixed.data(), this->get_effective_v(i), nrxx); + ModuleBase::GlobalFunc::COPYARRAY(this->v_eff_fixed.data(), this->get_eff_v(i), nrxx); } } - // cal effective by every components + // cal eff by every components for (size_t i = 0; i < this->components.size(); i++) { if (this->components[i]->dynamic_mode) @@ -247,12 +248,11 @@ void Potential::cal_v_eff(const Charge*const chg, const UnitCell*const ucell, Mo ModuleBase::timer::tick("Potential", "cal_veff"); } -void Potential::init_pot(int istep, const Charge*const chg) +void Potential::init_pot(const Charge*const chg) { ModuleBase::TITLE("Potential", "init_pot"); ModuleBase::timer::tick("Potential", "init_pot"); - assert(istep >= 0); // fixed components only calculated in the beginning of SCF this->fixed_done = false; @@ -265,14 +265,14 @@ void Potential::init_pot(int istep, const Charge*const chg) void Potential::get_vnew(const Charge* chg, ModuleBase::matrix& vnew) { ModuleBase::TITLE("Potential", "get_vnew"); - vnew.create(this->v_effective.nr, this->v_effective.nc); - vnew = this->v_effective; + vnew.create(this->v_eff.nr, this->v_eff.nc); + vnew = this->v_eff; this->update_from_charge(chg, this->ucell_); //(used later for scf correction to the forces ) for (int iter = 0; iter < vnew.nr * vnew.nc; ++iter) { - vnew.c[iter] = this->v_effective.c[iter] - vnew.c[iter]; + vnew.c[iter] = this->v_eff.c[iter] - vnew.c[iter]; } return; @@ -296,7 +296,7 @@ void Potential::interpolate_vrs(void) ModuleBase::ComplexMatrix vrs(nspin, rho_basis_->npw); for (int is = 0; is < nspin; is++) { - rho_basis_->real2recip(&v_effective(is, 0), &vrs(is, 0)); + rho_basis_->real2recip(&v_eff(is, 0), &vrs(is, 0)); rho_basis_smooth_->recip2real(&vrs(is, 0), &veff_smooth(is, 0)); } @@ -305,15 +305,15 @@ void Potential::interpolate_vrs(void) ModuleBase::ComplexMatrix vrs_ofk(nspin, rho_basis_->npw); for (int is = 0; is < nspin; is++) { - rho_basis_->real2recip(&vofk_effective(is, 0), &vrs_ofk(is, 0)); + rho_basis_->real2recip(&vofk_eff(is, 0), &vrs_ofk(is, 0)); rho_basis_smooth_->recip2real(&vrs_ofk(is, 0), &vofk_smooth(is, 0)); } } } else { - this->veff_smooth = this->v_effective; - this->vofk_smooth = this->vofk_effective; + this->veff_smooth = this->v_eff; + this->vofk_smooth = this->vofk_eff; } ModuleBase::timer::tick("Potential", "interpolate_vrs"); @@ -343,4 +343,21 @@ double* Potential::get_vofk_smooth_data() return this->vofk_smooth.nc > 0 ? this->d_vofk_smooth : nullptr; } +double Potential::get_ml_exx_energy() const +{ +#ifdef __MLALGO + for (size_t i = 0; i < this->components.size(); i++) + { + PotML_EXX* pot_ml_exx = dynamic_cast(this->components[i]); + if (pot_ml_exx != nullptr) + { + return pot_ml_exx->get_energy(); + } + } + return 0.0; +#else + return 0.0; +#endif +} + } // namespace elecstate diff --git a/source/source_estate/module_pot/potential_new.h b/source/source_estate/module_pot/potential_new.h index ec2688ed9b..5b888e7d8b 100644 --- a/source/source_estate/module_pot/potential_new.h +++ b/source/source_estate/module_pot/potential_new.h @@ -3,8 +3,8 @@ #include "source_base/complexmatrix.h" #include "source_hamilt/module_surchem/surchem.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" -#include "source_pw/module_pwdft/VSep_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" #include "source_pw/module_pwdft/structure_factor.h" #include "pot_base.h" @@ -18,7 +18,7 @@ namespace elecstate * 2. Func init_pot() * a. need istep for update_for_tddft(); * b. need Charge for update_from_charge(); - * c. it will reset fixed_done to false, v_effective_fixed will be calculated; + * c. it will reset fixed_done to false, v_eff_fixed will be calculated; * d. it should be called after Charge is initialized; * e. it can only be called once in one SCF loop * 3. Func pot_register() and components @@ -30,8 +30,8 @@ namespace elecstate * f. "efield", PotEfield introduces electronic field including dipole correction part of potentials; * g. "gatefield", PotGate introduces gate field part of potentials; * 4. Func update_from_charge() - * a. regenerate v_effective - * b. if Meta-GGA is choosed, it will regenerate vofk_effective + * a. regenerate v_eff + * b. if Meta-GGA is choosed, it will regenerate vofk_eff * 5. Func update_for_tddft() * a. in principle, it should be added to components, but it related to real time(istep) * b. it should be called after update_from_charge() as a compensation; @@ -41,9 +41,9 @@ namespace elecstate * 2. use the final delta_V_eff for calculating force correction * 7. Func write_potential() * 8. Func write_elecstat_pot() - * 9. interfaces for v_effective_fixed/v_effective/vofk_effective + * 9. interfaces for v_eff_fixed/v_eff/vofk_eff * 10. Func interpolate_vrs() - * a. interpolate v_effective on the smooth mesh + * a. interpolate v_eff on the smooth mesh */ class Potential : public PotBase { @@ -53,7 +53,7 @@ class Potential : public PotBase // In constructor, size of every potential components should be allocated // rho_basis_in is the dense grids, rho_basis_smooth_in is the smooth grids in USPP // charge density and potential are defined on dense grids, - // but effective potential needs to be interpolated on smooth grids in order to compute Veff|psi> + // but eff potential needs to be interpolated on smooth grids in order to compute Veff|psi> // Note: rho_basis_in and rho_basis_smooth_in are the same in NCPP Potential(const ModulePW::PW_Basis* rho_basis_in, const ModulePW::PW_Basis* rho_basis_smooth_in, @@ -67,7 +67,7 @@ class Potential : public PotBase ~Potential(); // initialize potential when SCF begin - void init_pot(int istep, const Charge*const chg); + void init_pot(const Charge*const chg); // initialize potential components before SCF void pot_register(const std::vector& components_list); // update potential from current charge @@ -78,61 +78,61 @@ class Potential : public PotBase PotBase* get_pot_type(const std::string& pot_type); // interfaces to get values - ModuleBase::matrix& get_effective_v() + ModuleBase::matrix& get_eff_v() { - return this->v_effective; + return this->v_eff; } - const ModuleBase::matrix& get_effective_v() const + const ModuleBase::matrix& get_eff_v() const { - return this->v_effective; + return this->v_eff; } - double* get_effective_v(int is) + double* get_eff_v(int is) { - if (this->v_effective.nc > 0) + if (this->v_eff.nc > 0) { - return &(this->v_effective(is, 0)); + return &(this->v_eff(is, 0)); } else { return nullptr; } } - const double* get_effective_v(int is) const + const double* get_eff_v(int is) const { - if (this->v_effective.nc > 0) + if (this->v_eff.nc > 0) { - return &(this->v_effective(is, 0)); + return &(this->v_eff(is, 0)); } else { return nullptr; } } - ModuleBase::matrix& get_effective_vofk() + ModuleBase::matrix& get_eff_vofk() { - return this->vofk_effective; + return this->vofk_eff; } - const ModuleBase::matrix& get_effective_vofk() const + const ModuleBase::matrix& get_eff_vofk() const { - return this->vofk_effective; + return this->vofk_eff; } - double* get_effective_vofk(int is) + double* get_eff_vofk(int is) { - if (this->vofk_effective.nc > 0) + if (this->vofk_eff.nc > 0) { - return &(this->vofk_effective(is, 0)); + return &(this->vofk_eff(is, 0)); } else { return nullptr; } } - const double* get_effective_vofk(int is) const + const double* get_eff_vofk(int is) const { - if (this->vofk_effective.nc > 0) + if (this->vofk_eff.nc > 0) { - return &(this->vofk_effective(is, 0)); + return &(this->vofk_eff(is, 0)); } else { @@ -166,11 +166,11 @@ class Potential : public PotBase double* get_fixed_v() { - return this->v_effective_fixed.data(); + return this->v_eff_fixed.data(); } const double* get_fixed_v() const { - return this->v_effective_fixed.data(); + return this->v_eff_fixed.data(); } const ModulePW::PW_Basis *get_rho_basis() const { @@ -187,6 +187,10 @@ class Potential : public PotBase return this->vl_of_0; } + /// @brief get the ML-EXX energy, avoiding static variable + /// @return E_ML-EXX + double get_ml_exx_energy() const; + private: void cal_v_eff(const Charge*const chg, const UnitCell*const ucell, ModuleBase::matrix& v_eff) override; void cal_fixed_v(double* vl_pseudo) override; @@ -195,18 +199,20 @@ class Potential : public PotBase void allocate(); - std::vector v_effective_fixed; - ModuleBase::matrix v_effective; + std::vector v_eff_fixed; + ModuleBase::matrix v_eff; ModuleBase::matrix veff_smooth; // used in uspp liuyu 2023-10-12 ModuleBase::matrix vofk_smooth; // used in uspp liuyu 2023-10-12 ModuleBase::matrix v_xc; // if PAW is used, vxc must be stored separately - float *s_veff_smooth = nullptr, *s_vofk_smooth = nullptr; - double *d_veff_smooth = nullptr, *d_vofk_smooth = nullptr; + float *s_veff_smooth = nullptr; + float *s_vofk_smooth = nullptr; + double *d_veff_smooth = nullptr; + double *d_vofk_smooth = nullptr; - ModuleBase::matrix vofk_effective; + ModuleBase::matrix vofk_eff; bool fixed_done = false; diff --git a/source/source_estate/module_pot/potential_types.cpp b/source/source_estate/module_pot/potential_types.cpp index f62a34aa75..f8f1315d8e 100644 --- a/source/source_estate/module_pot/potential_types.cpp +++ b/source/source_estate/module_pot/potential_types.cpp @@ -13,10 +13,12 @@ #include "pot_xc.h" #include "potential_new.h" #include "pot_sep.h" -#include "pot_local_paw.h" #ifdef __LCAO #include "H_TDDFT_pw.h" #endif +#ifdef __MLALGO +#include "pot_ml_exx.h" +#endif namespace elecstate { @@ -34,13 +36,13 @@ PotBase* Potential::get_pot_type(const std::string& pot_type) } else if (pot_type == "xc") { - return new PotXC(this->rho_basis_, this->etxc_, this->vtxc_, &(this->vofk_effective)); + return new PotXC(this->rho_basis_, this->etxc_, this->vtxc_, &(this->vofk_eff)); } else if (pot_type == "surchem") { return new PotSurChem(this->rho_basis_, this->structure_factors_, - this->v_effective_fixed.data(), + this->v_eff_fixed.data(), this->solvent_); } else if (pot_type == "efield") @@ -56,6 +58,12 @@ PotBase* Potential::get_pot_type(const std::string& pot_type) { return new H_TDDFT_pw(this->rho_basis_, this->ucell_); } +#endif +#ifdef __MLALGO + else if (pot_type == "ml_exx") + { + return new PotML_EXX(this->rho_basis_, this->ucell_); + } #endif else if (pot_type == "dfthalf") { return new PotSep(&(this->structure_factors_->strucFac), this->rho_basis_, this->vsep_cell); diff --git a/source/source_estate/occupy.cpp b/source/source_estate/occupy.cpp index d9d8bebf9b..fa50d1520d 100644 --- a/source/source_estate/occupy.cpp +++ b/source/source_estate/occupy.cpp @@ -179,10 +179,9 @@ void Occupy::iweights( } } } -#ifdef __MPI - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, ef); -#endif - + #ifdef __MPI + Parallel_Reduce::reduce_max(ef); + #endif return; } @@ -306,48 +305,50 @@ void Occupy::efermig(const ModuleBase::matrix& ekb, eup += 2 * smearing_sigma; elw -= 2 * smearing_sigma; - -#ifdef __MPI // find min and max across pools - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, eup); - Parallel_Reduce::gather_min_double_all(GlobalV::NPROC, elw); - -#endif + #ifdef __MPI + Parallel_Reduce::reduce_max(eup); + Parallel_Reduce::reduce_min(elw); + #endif //================= // Bisection method //================= // call sumkg int changetime = 0; -sumkg: - - const double sumkup = Occupy::sumkg(ekb, nband, nks, wk, smearing_sigma, ngauss, eup, is, isk); - const double sumklw = Occupy::sumkg(ekb, nband, nks, wk, smearing_sigma, ngauss, elw, is, isk); - - if (changetime > 1000) + while (true) { - std::cout << " SOMETHING WRONG: " << std::endl; - std::cout << " is = " << is << std::endl; - std::cout << " eup = " << eup << std::endl; - std::cout << " elw = " << elw << std::endl; - std::cout << " nband = " << nband << std::endl; - std::cout << " nelec = " << nelec << std::endl; - std::cout << " sumkup = " << sumkup << std::endl; - std::cout << " sumklw = " << sumklw << std::endl; - std::cout << " sumkup - nelec = " << sumkup - nelec << std::endl; - std::cout << " sumklw - nelec = " << sumklw - nelec << std::endl; - ModuleBase::WARNING_QUIT("Occupy::efermig", "ERROS in SMEARING"); - } - else if ((sumkup - nelec) < -eps) - { - eup += 2 * smearing_sigma; - ++changetime; - goto sumkg; - } - else if ((sumklw - nelec) > eps) - { - elw -= 2 * smearing_sigma; - ++changetime; - goto sumkg; + const double sumkup = Occupy::sumkg(ekb, nband, nks, wk, smearing_sigma, ngauss, eup, is, isk); + const double sumklw = Occupy::sumkg(ekb, nband, nks, wk, smearing_sigma, ngauss, elw, is, isk); + + if (changetime > 1000) + { + std::cout << " SOMETHING WRONG: " << std::endl; + std::cout << " is = " << is << std::endl; + std::cout << " eup = " << eup << std::endl; + std::cout << " elw = " << elw << std::endl; + std::cout << " nband = " << nband << std::endl; + std::cout << " nelec = " << nelec << std::endl; + std::cout << " sumkup = " << sumkup << std::endl; + std::cout << " sumklw = " << sumklw << std::endl; + std::cout << " sumkup - nelec = " << sumkup - nelec << std::endl; + std::cout << " sumklw - nelec = " << sumklw - nelec << std::endl; + ModuleBase::WARNING_QUIT("Occupy::efermig", "ERROS in SMEARING"); + // no need to break; quit directly + } + else if ((sumkup - nelec) < -eps) + { + eup += 2 * smearing_sigma; + ++changetime; + } + else if ((sumklw - nelec) > eps) + { + elw -= 2 * smearing_sigma; + ++changetime; + } + else + { + break; + } } for (int i = 0; i < maxiter; i++) diff --git a/source/source_estate/read_orb.cpp b/source/source_estate/read_orb.cpp index a40d66640a..ce6f1cfcbf 100644 --- a/source/source_estate/read_orb.cpp +++ b/source/source_estate/read_orb.cpp @@ -2,7 +2,7 @@ #include "source_base/formatter.h" namespace elecstate { - void read_orb_file(int it, std::string &orb_file, std::ofstream &ofs_running, Atom* atom) + bool read_orb_file(int it, std::string &orb_file, std::ofstream &ofs_running, Atom* atom) { // the maximum L is 9 like cc-pV9Z, according to the // basissetexchange https://www.basissetexchange.org/ @@ -14,8 +14,9 @@ namespace elecstate { { std::cout << " Element index " << it+1 << std::endl; std::cout << " orbital file: " << orb_file << std::endl; - ModuleBase::WARNING_QUIT("UnitCell::read_orb_file", - "ABACUS Cannot find the ORBITAL file (basis sets)"); + ModuleBase::WARNING("elecstate::read_orb_file", + "cannot open the ORBITAL file (NAO basis sets)"); + return false; } std::string word; atom->nw = 0; @@ -54,17 +55,20 @@ namespace elecstate { } if (!valid) { - ModuleBase::WARNING_QUIT("UnitCell::read_orb_file", - "ABACUS does not support numerical atomic orbital with L > 9, " + ModuleBase::WARNING("elecstate::read_orb_file", + "ABACUS does not support NAO with L > 9, " "or an invalid orbital label is found in the ORBITAL file."); + return false; } } } ifs.close(); if(!atom->nw) { - ModuleBase::WARNING_QUIT("UnitCell::read_orb_file","get nw = 0"); + ModuleBase::WARNING("elecstate::read_orb_file","get nw = 0, check the ORBITAL file"); + return false; } + return true; } -} \ No newline at end of file +} diff --git a/source/source_estate/read_orb.h b/source/source_estate/read_orb.h index 4f3822b4b9..8d42b789e7 100644 --- a/source/source_estate/read_orb.h +++ b/source/source_estate/read_orb.h @@ -13,11 +13,11 @@ namespace elecstate * @param ofs_running ofstream * @param atom Atom instance stored in UnitCell */ - void read_orb_file(int it, + bool read_orb_file(int it, std::string& orb_file, std::ofstream& ofs_running, Atom* atom); } -#endif \ No newline at end of file +#endif diff --git a/source/source_estate/setup_estate_pw.cpp b/source/source_estate/setup_estate_pw.cpp index 51bd14e8b1..5daa7be1b5 100644 --- a/source/source_estate/setup_estate_pw.cpp +++ b/source/source_estate/setup_estate_pw.cpp @@ -28,23 +28,15 @@ void elecstate::setup_estate_pw(UnitCell& ucell, // unitcell { //! SDFT only supports double precision currently pelec = new elecstate::ElecStatePW_SDFT, Device>(pw_wfc, - &chr, &kv, &ucell, &ppcell, - pw_rhod, pw_rho, pw_big); + &chr, &kv, &ucell, &ppcell, pw_rho, pw_big); } else { pelec = new elecstate::ElecStatePW(pw_wfc, - &chr, &kv, &ucell, &ppcell, - pw_rhod, pw_rho, pw_big); + &chr, &kv, &ucell, &ppcell, pw_rho, pw_big); } } - //! Set the cell volume variable in pelec - pelec->omega = ucell.omega; - - //! Inititlize the charge density. - chr.allocate(inp.nspin); - //! Initialize DFT-1/2 if (PARAM.inp.dfthalf_type > 0) { diff --git a/source/source_estate/setup_estate_pw.h b/source/source_estate/setup_estate_pw.h index 44864ad588..81a2261f6d 100644 --- a/source/source_estate/setup_estate_pw.h +++ b/source/source_estate/setup_estate_pw.h @@ -6,8 +6,8 @@ #include "source_cell/klist.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" -#include "source_pw/module_pwdft/VSep_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" namespace elecstate { diff --git a/source/source_estate/test/CMakeLists.txt b/source/source_estate/test/CMakeLists.txt index f3eddac1a9..b361f3026d 100644 --- a/source/source_estate/test/CMakeLists.txt +++ b/source/source_estate/test/CMakeLists.txt @@ -82,7 +82,7 @@ AddTest( TARGET charge_test LIBS parameter ${math_libs} planewave_serial base device cell_info SOURCES charge_test.cpp ../module_charge/charge.cpp - ../../source_io/output.cpp + ../../source_io/module_output/output.cpp ) AddTest( @@ -91,14 +91,14 @@ AddTest( SOURCES charge_mixing_test.cpp ../module_charge/charge_mixing.cpp ../module_charge/charge_mixing_dmr.cpp ../module_charge/charge_mixing_residual.cpp ../module_charge/charge_mixing_preconditioner.cpp ../module_charge/charge_mixing_rho.cpp - ../module_charge/charge_mixing_uspp.cpp ../../source_io/output.cpp + ../module_charge/charge_mixing_uspp.cpp ../../source_io/module_output/output.cpp ) AddTest( TARGET charge_extra LIBS parameter ${math_libs} base device cell_info - SOURCES charge_extra_test.cpp ../module_charge/charge_extra.cpp ../../source_io/read_cube.cpp ../../source_io/write_cube.cpp - ../../source_io/output.cpp ../../source_base/module_fft/fft_bundle.cpp ../../source_base/module_fft/fft_cpu.cpp + SOURCES charge_extra_test.cpp ../module_charge/charge_extra.cpp ../../source_io/module_output/read_cube.cpp ../../source_io/module_output/write_cube.cpp + ../../source_io/module_output/output.cpp ../../source_base/module_fft/fft_bundle.cpp ../../source_base/module_fft/fft_cpu.cpp ) endif() \ No newline at end of file diff --git a/source/source_estate/test/charge_extra_test.cpp b/source/source_estate/test/charge_extra_test.cpp index 255c2fbe78..c2951c1b5a 100644 --- a/source/source_estate/test/charge_extra_test.cpp +++ b/source/source_estate/test/charge_extra_test.cpp @@ -89,7 +89,7 @@ Structure_Factor::Structure_Factor() Structure_Factor::~Structure_Factor() { } -void Structure_Factor::setup_structure_factor(const UnitCell*, const Parallel_Grid&, const ModulePW::PW_Basis*) +void Structure_Factor::setup(const UnitCell*, const Parallel_Grid&, const ModulePW::PW_Basis*) { } diff --git a/source/source_estate/test/charge_test.cpp b/source/source_estate/test/charge_test.cpp index de28a5848c..261bcc5e3e 100644 --- a/source/source_estate/test/charge_test.cpp +++ b/source/source_estate/test/charge_test.cpp @@ -117,10 +117,11 @@ TEST_F(ChargeTest, Allocate) XC_Functional::ked_flag = true; charge->set_rhopw(rhopw); EXPECT_FALSE(charge->allocate_rho); - charge->allocate(PARAM.input.nspin); + const bool kin_den = charge->kin_density(); + charge->allocate(PARAM.input.nspin, kin_den); EXPECT_TRUE(charge->allocate_rho); // test if Charge::allocate() be called twice - EXPECT_NO_THROW(charge->allocate(PARAM.input.nspin)); + EXPECT_NO_THROW(charge->allocate(PARAM.input.nspin, kin_den)); EXPECT_TRUE(charge->allocate_rho); } @@ -128,7 +129,8 @@ TEST_F(ChargeTest, SumRho) { charge->set_rhopw(rhopw); EXPECT_FALSE(charge->allocate_rho); - charge->allocate(PARAM.input.nspin); + const bool kin_den = charge->kin_density(); + charge->allocate(PARAM.input.nspin, kin_den); EXPECT_TRUE(charge->allocate_rho); int nspin = (PARAM.input.nspin == 2) ? 2 : 1; for (int is = 0; is < nspin; is++) @@ -146,7 +148,8 @@ TEST_F(ChargeTest, RenormalizeRho) { charge->set_rhopw(rhopw); EXPECT_FALSE(charge->allocate_rho); - charge->allocate(PARAM.input.nspin); + const bool kin_den = charge->kin_density(); + charge->allocate(PARAM.input.nspin, kin_den); EXPECT_TRUE(charge->allocate_rho); int nspin = (PARAM.input.nspin == 2) ? 2 : 1; for (int is = 0; is < nspin; is++) @@ -166,7 +169,8 @@ TEST_F(ChargeTest, CheckNe) { charge->set_rhopw(rhopw); EXPECT_FALSE(charge->allocate_rho); - charge->allocate(PARAM.input.nspin); + const bool kin_den = charge->kin_density(); + charge->allocate(PARAM.input.nspin, kin_den); EXPECT_TRUE(charge->allocate_rho); int nspin = (PARAM.input.nspin == 2) ? 2 : 1; for (int is = 0; is < nspin; is++) @@ -187,7 +191,8 @@ TEST_F(ChargeTest, SaveRhoBeforeSumBand) { charge->set_rhopw(rhopw); EXPECT_FALSE(charge->allocate_rho); - charge->allocate(PARAM.input.nspin); + const bool kin_den = charge->kin_density(); + charge->allocate(PARAM.input.nspin, kin_den); EXPECT_TRUE(charge->allocate_rho); int nspin = (PARAM.input.nspin == 2) ? 2 : 1; for (int is = 0; is < nspin; is++) diff --git a/source/source_estate/test/elecstate_base_test.cpp b/source/source_estate/test/elecstate_base_test.cpp index 24ec4a5fff..e0d63df822 100644 --- a/source/source_estate/test/elecstate_base_test.cpp +++ b/source/source_estate/test/elecstate_base_test.cpp @@ -14,7 +14,7 @@ // Mock functions for testing elecstate.cpp namespace elecstate { -void Potential::init_pot(int, Charge const*) +void Potential::init_pot(Charge const*) { } void Potential::cal_v_eff(const Charge* chg, const UnitCell* ucell, ModuleBase::matrix& v_eff) @@ -80,11 +80,7 @@ void ModulePW::PW_Basis::distribute_r() void Charge::set_rho_core(const UnitCell& ucell, ModuleBase::ComplexMatrix const&, const bool*) { } -void Charge::set_rho_core_paw() -{ -} -void Charge::init_rho(elecstate::Efermi&, - const UnitCell&, +void Charge::init_rho(const UnitCell&, const Parallel_Grid&, ModuleBase::ComplexMatrix const&, ModuleSymmetry::Symmetry& symm, @@ -201,11 +197,10 @@ TEST_F(ElecStateTest, Constructor) TEST_F(ElecStateTest, InitKS) { Charge* charge = new Charge; - ModulePW::PW_Basis* rhopw = new ModulePW::PW_Basis; ModulePW::PW_Basis_Big* bigpw = new ModulePW::PW_Basis_Big; K_Vectors* klist = new K_Vectors; int nk = 1; - EXPECT_NO_THROW(elecstate->init_ks(charge, klist, nk, rhopw, bigpw)); + EXPECT_NO_THROW(elecstate->init_ks(charge, klist, nk, bigpw)); EXPECT_EQ(elecstate->charge, charge); EXPECT_EQ(elecstate->bigpw, bigpw); EXPECT_EQ(elecstate->klist, klist); @@ -215,14 +210,12 @@ TEST_F(ElecStateTest, InitKS) EXPECT_EQ(elecstate->wg.nc, PARAM.input.nbands); delete klist; delete bigpw; - delete rhopw; delete charge; } TEST_F(ElecStateTest, GetRho) { Charge* charge = new Charge; - ModulePW::PW_Basis* rhopw = new ModulePW::PW_Basis; ModulePW::PW_Basis_Big* bigpw = new ModulePW::PW_Basis_Big; K_Vectors* klist = new K_Vectors; int nk = 1; @@ -236,7 +229,7 @@ TEST_F(ElecStateTest, GetRho) charge->rho[i][j] = 1.0; } } - elecstate->init_ks(charge, klist, nk, rhopw, bigpw); + elecstate->init_ks(charge, klist, nk, bigpw); EXPECT_EQ(elecstate->getRho(0), &(charge->rho[0][0])); EXPECT_EQ(elecstate->getRho(0)[nrxx - 1], 1.0); for (int i = 0; i < PARAM.input.nspin; ++i) @@ -246,7 +239,6 @@ TEST_F(ElecStateTest, GetRho) delete[] charge->rho; delete klist; delete bigpw; - delete rhopw; delete charge; } @@ -271,7 +263,7 @@ TEST_F(ElecStateTest, InitSCF) ModuleBase::ComplexMatrix strucfac; elecstate->eferm = efermi; ModuleSymmetry::Symmetry symm; - EXPECT_NO_THROW(elecstate->init_scf(istep, ucell, pgrid, strucfac, nullptr, symm)); + EXPECT_NO_THROW(elecstate->init_scf(ucell, pgrid, strucfac, nullptr, symm)); // delete elecstate->pot is done in the destructor of elecstate delete charge; } diff --git a/source/source_estate/test/elecstate_energy_test.cpp b/source/source_estate/test/elecstate_energy_test.cpp index e6d0203b68..00b94bacc4 100644 --- a/source/source_estate/test/elecstate_energy_test.cpp +++ b/source/source_estate/test/elecstate_energy_test.cpp @@ -1,4 +1,3 @@ - #include "gmock/gmock.h" #include "gtest/gtest.h" #define private public @@ -242,3 +241,48 @@ TEST_F(ElecStateEnergyTest, CalBandgapUpDw) EXPECT_DOUBLE_EQ(elecstate->bandgap_up, 1.0); EXPECT_DOUBLE_EQ(elecstate->bandgap_dw, 0.5); } + +TEST_F(ElecStateEnergyTest, CalBandgapBoundaryConditions) +{ + K_Vectors* klist = new K_Vectors; + klist->set_nks(1); + elecstate->klist = klist; + elecstate->ekb.create(1, 1); + + // Case 1: Only VBM found (all bands below Fermi level) + elecstate->ekb(0, 0) = -5.0; + elecstate->eferm.ef = 0.0; + elecstate->cal_bandgap(); + // Only VBM found, CBM is set to eferm.ef, so bandgap should be eferm.ef - vbm + EXPECT_DOUBLE_EQ(elecstate->bandgap, 5.0); + + // Case 2: Only CBM found (all bands above Fermi level) + elecstate->ekb(0, 0) = 5.0; + elecstate->eferm.ef = 0.0; + elecstate->cal_bandgap(); + // Only CBM found, VBM is set to eferm.ef, so bandgap should be cbm - eferm.ef + EXPECT_DOUBLE_EQ(elecstate->bandgap, 5.0); +} + +TEST_F(ElecStateEnergyTest, CalBandgapUpDwBoundaryConditions) +{ + K_Vectors* klist = new K_Vectors; + klist->set_nks(2); + klist->isk.resize(2); + klist->isk[0] = 0; // spin up + klist->isk[1] = 1; // spin down + elecstate->klist = klist; + elecstate->ekb.create(2, 1); // 2 k-points, 1 band + + // Spin UP: Only VBM (band < ef) + elecstate->ekb(0, 0) = -5.0; + elecstate->eferm.ef_up = 0.0; + // Spin DW: Only CBM (band > ef) + elecstate->ekb(1, 0) = 5.0; + elecstate->eferm.ef_dw = 0.0; + elecstate->cal_bandgap_updw(); + // up: Only VBM found, CBM is set to eferm.ef_up, so gap should be eferm.ef_up - vbm_up + // dw: Only CBM found, VBM is set to eferm.ef_dw, so gap should be cbm_dw - eferm.ef_dw + EXPECT_DOUBLE_EQ(elecstate->bandgap_up, 5.0); + EXPECT_DOUBLE_EQ(elecstate->bandgap_dw, 5.0); +} diff --git a/source/source_estate/test/elecstate_pw_test.cpp b/source/source_estate/test/elecstate_pw_test.cpp index 4128d12812..c71a38002e 100644 --- a/source/source_estate/test/elecstate_pw_test.cpp +++ b/source/source_estate/test/elecstate_pw_test.cpp @@ -6,13 +6,13 @@ #define protected public #include "source_estate/elecstate_pw.h" #include "source_hamilt/module_xc/xc_functional.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_io/module_parameter/parameter.h" // mock functions for testing int XC_Functional::func_type = 1; namespace elecstate { -void Potential::init_pot(int, Charge const*) +void Potential::init_pot(Charge const*) { } void Potential::cal_v_eff(const Charge* chg, const UnitCell* ucell, ModuleBase::matrix& v_eff) @@ -130,11 +130,7 @@ Fcoef::~Fcoef() void Charge::set_rho_core(const UnitCell& ucell, ModuleBase::ComplexMatrix const&, const bool*) { } -void Charge::set_rho_core_paw() -{ -} -void Charge::init_rho(elecstate::Efermi&, - const UnitCell&, +void Charge::init_rho(const UnitCell&, const Parallel_Grid&, ModuleBase::ComplexMatrix const&, ModuleSymmetry::Symmetry& symm, @@ -244,7 +240,6 @@ TEST_F(ElecStatePWTest, ConstructorDouble) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); EXPECT_EQ(elecstate_pw_d->classname, "ElecStatePW"); @@ -260,7 +255,6 @@ TEST_F(ElecStatePWTest, ConstructorSingle) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); EXPECT_EQ(elecstate_pw_s->classname, "ElecStatePW"); @@ -278,7 +272,6 @@ TEST_F(ElecStatePWTest, InitRhoDataDouble) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); elecstate_pw_d->init_rho_data(); @@ -298,7 +291,6 @@ TEST_F(ElecStatePWTest, InitRhoDataSingle) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); elecstate_pw_s->init_rho_data(); @@ -315,7 +307,6 @@ TEST_F(ElecStatePWTest, ParallelKDouble) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); EXPECT_NO_THROW(elecstate_pw_d->parallelK()); @@ -329,7 +320,6 @@ TEST_F(ElecStatePWTest, ParallelKSingle) klist, ucell, ppcell, - rhodpw, rhopw, bigpw); EXPECT_NO_THROW(elecstate_pw_s->parallelK()); diff --git a/source/source_estate/test/potential_new_test.cpp b/source/source_estate/test/potential_new_test.cpp index b874be7b39..f91f473efa 100644 --- a/source/source_estate/test/potential_new_test.cpp +++ b/source/source_estate/test/potential_new_test.cpp @@ -88,7 +88,7 @@ void Set_GlobalV_Default() * - UpdateFromCharge: elecstate::Potential::update_from_charge() * - calls cal_fixed_v and cal_v_eff to update v_effective from rho * - InitPot: elecstate::Potential::init_pot() - * - using istep and update_from_charge to initialize v_effective + * - using update_from_charge to initialize v_effective * - GetVnew: elecstate::Potential::get_vnew() * - used later for scf correction to the forces * - GetEffective: elecstate::Potential::get_effective_v() @@ -170,9 +170,9 @@ TEST_F(PotentialNewTest, ConstructorCPUDouble) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); - EXPECT_EQ(pot->v_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->v_effective.nc, 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); + EXPECT_EQ(pot->v_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->v_eff.nc, 100); } TEST_F(PotentialNewTest, ConstructorCPUSingle) @@ -182,9 +182,9 @@ TEST_F(PotentialNewTest, ConstructorCPUSingle) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); - EXPECT_EQ(pot->v_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->v_effective.nc, 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); + EXPECT_EQ(pot->v_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->v_eff.nc, 100); } TEST_F(PotentialNewTest, ConstructorNRXX0) @@ -203,11 +203,11 @@ TEST_F(PotentialNewTest, ConstructorXC3) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); - EXPECT_EQ(pot->v_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->v_effective.nc, 100); - EXPECT_EQ(pot->vofk_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->vofk_effective.nc, 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); + EXPECT_EQ(pot->v_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->v_eff.nc, 100); + EXPECT_EQ(pot->vofk_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->vofk_eff.nc, 100); } TEST_F(PotentialNewTest, ConstructorGPUDouble) @@ -218,9 +218,9 @@ TEST_F(PotentialNewTest, ConstructorGPUDouble) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); - EXPECT_EQ(pot->v_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->v_effective.nc, 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); + EXPECT_EQ(pot->v_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->v_eff.nc, 100); } TEST_F(PotentialNewTest, ConstructorGPUSingle) @@ -232,9 +232,9 @@ TEST_F(PotentialNewTest, ConstructorGPUSingle) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); - EXPECT_EQ(pot->v_effective.nr, PARAM.input.nspin); - EXPECT_EQ(pot->v_effective.nc, 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); + EXPECT_EQ(pot->v_eff.nr, PARAM.input.nspin); + EXPECT_EQ(pot->v_eff.nc, 100); } TEST_F(PotentialNewTest, Getters) @@ -289,9 +289,9 @@ TEST_F(PotentialNewTest, CalFixedV) } double* vl_pseudo = new double[1000]; pot->cal_fixed_v(vl_pseudo); - for (int i = 0; i < pot->v_effective_fixed.size(); i++) + for (int i = 0; i < pot->v_eff_fixed.size(); i++) { - EXPECT_DOUBLE_EQ(pot->v_effective_fixed[i], 0.0); + EXPECT_DOUBLE_EQ(pot->v_eff_fixed[i], 0.0); } delete[] vl_pseudo; } @@ -319,9 +319,9 @@ TEST_F(PotentialNewTest, CalVeff) ModuleBase::matrix v_eff; v_eff.create(2, 100); pot->cal_v_eff(chg,this->ucell,v_eff); - for (int i = 0; i < pot->v_effective_fixed.size(); i++) + for (int i = 0; i < pot->v_eff_fixed.size(); i++) { - EXPECT_DOUBLE_EQ(pot->v_effective_fixed[i], 0.0); + EXPECT_DOUBLE_EQ(pot->v_eff_fixed[i], 0.0); } delete chg; } @@ -377,7 +377,7 @@ TEST_F(PotentialNewTest, InitPot) } Charge* chg = new Charge; EXPECT_FALSE(pot->fixed_done); - pot->init_pot(1,chg); + pot->init_pot(chg); EXPECT_TRUE(pot->fixed_done); delete chg; } @@ -417,8 +417,8 @@ TEST_F(PotentialNewTest, GetEffectiveVmatrix) rhopw->nrxx = 100; pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); // - ModuleBase::matrix v_eff_tmp = pot->get_effective_v(); - const ModuleBase::matrix v_eff_tmp_const = pot->get_effective_v(); + ModuleBase::matrix v_eff_tmp = pot->get_eff_v(); + const ModuleBase::matrix v_eff_tmp_const = pot->get_eff_v(); EXPECT_EQ(v_eff_tmp.nr, PARAM.input.nspin); EXPECT_EQ(v_eff_tmp.nc, 100); EXPECT_EQ(v_eff_tmp_const.nr, PARAM.input.nspin); @@ -427,8 +427,8 @@ TEST_F(PotentialNewTest, GetEffectiveVmatrix) { for (int ic = 0; ic < v_eff_tmp.nc; ic++) { - EXPECT_DOUBLE_EQ(v_eff_tmp(ir, ic), pot->v_effective(ir, ic)); - EXPECT_DOUBLE_EQ(v_eff_tmp_const(ir, ic), pot->v_effective(ir, ic)); + EXPECT_DOUBLE_EQ(v_eff_tmp(ir, ic), pot->v_eff(ir, ic)); + EXPECT_DOUBLE_EQ(v_eff_tmp_const(ir, ic), pot->v_eff(ir, ic)); } } } @@ -439,24 +439,24 @@ TEST_F(PotentialNewTest, GetEffectiveVarray) rhopw->nrxx = 100; pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); // - double* v_eff_tmp = pot->get_effective_v(0); - const double* v_eff_tmp_const = pot->get_effective_v(0); + double* v_eff_tmp = pot->get_eff_v(0); + const double* v_eff_tmp_const = pot->get_eff_v(0); for (int ic = 0; ic < rhopw->nrxx; ic++) { - EXPECT_DOUBLE_EQ(v_eff_tmp[ic], pot->v_effective(0, ic)); - EXPECT_DOUBLE_EQ(v_eff_tmp_const[ic], pot->v_effective(0, ic)); + EXPECT_DOUBLE_EQ(v_eff_tmp[ic], pot->v_eff(0, ic)); + EXPECT_DOUBLE_EQ(v_eff_tmp_const[ic], pot->v_eff(0, ic)); } v_eff_tmp[0] = 1.0; - EXPECT_DOUBLE_EQ(pot->v_effective(0, 0), 1.0); + EXPECT_DOUBLE_EQ(pot->v_eff(0, 0), 1.0); EXPECT_DOUBLE_EQ(v_eff_tmp_const[0], 1.0); } TEST_F(PotentialNewTest, GetEffectiveVarrayNullptr) { pot = new elecstate::Potential; - EXPECT_EQ(pot->v_effective.nc, 0); - double* v_eff_tmp = pot->get_effective_v(0); - const double* v_eff_tmp_const = pot->get_effective_v(0); + EXPECT_EQ(pot->v_eff.nc, 0); + double* v_eff_tmp = pot->get_eff_v(0); + const double* v_eff_tmp_const = pot->get_eff_v(0); EXPECT_EQ(v_eff_tmp, nullptr); EXPECT_EQ(v_eff_tmp_const, nullptr); } @@ -469,8 +469,8 @@ TEST_F(PotentialNewTest, GetEffectiveVofkmatrix) rhopw->nrxx = 100; pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); // - ModuleBase::matrix vofk_eff_tmp = pot->get_effective_vofk(); - const ModuleBase::matrix vofk_eff_tmp_const = pot->get_effective_vofk(); + ModuleBase::matrix vofk_eff_tmp = pot->get_eff_vofk(); + const ModuleBase::matrix vofk_eff_tmp_const = pot->get_eff_vofk(); EXPECT_EQ(vofk_eff_tmp.nr, PARAM.input.nspin); EXPECT_EQ(vofk_eff_tmp.nc, 100); EXPECT_EQ(vofk_eff_tmp_const.nr, PARAM.input.nspin); @@ -479,8 +479,8 @@ TEST_F(PotentialNewTest, GetEffectiveVofkmatrix) { for (int ic = 0; ic < vofk_eff_tmp.nc; ic++) { - EXPECT_DOUBLE_EQ(vofk_eff_tmp(ir, ic), pot->vofk_effective(ir, ic)); - EXPECT_DOUBLE_EQ(vofk_eff_tmp_const(ir, ic), pot->vofk_effective(ir, ic)); + EXPECT_DOUBLE_EQ(vofk_eff_tmp(ir, ic), pot->vofk_eff(ir, ic)); + EXPECT_DOUBLE_EQ(vofk_eff_tmp_const(ir, ic), pot->vofk_eff(ir, ic)); } } } @@ -491,24 +491,24 @@ TEST_F(PotentialNewTest, GetEffectiveVofkarray) rhopw->nrxx = 100; pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); // - double* vofk_eff_tmp = pot->get_effective_vofk(0); - const double* vofk_eff_tmp_const = pot->get_effective_vofk(0); + double* vofk_eff_tmp = pot->get_eff_vofk(0); + const double* vofk_eff_tmp_const = pot->get_eff_vofk(0); for (int ic = 0; ic < rhopw->nrxx; ic++) { - EXPECT_DOUBLE_EQ(vofk_eff_tmp[ic], pot->vofk_effective(0, ic)); - EXPECT_DOUBLE_EQ(vofk_eff_tmp_const[ic], pot->vofk_effective(0, ic)); + EXPECT_DOUBLE_EQ(vofk_eff_tmp[ic], pot->vofk_eff(0, ic)); + EXPECT_DOUBLE_EQ(vofk_eff_tmp_const[ic], pot->vofk_eff(0, ic)); } vofk_eff_tmp[0] = 1.0; - EXPECT_DOUBLE_EQ(pot->vofk_effective(0, 0), 1.0); + EXPECT_DOUBLE_EQ(pot->vofk_eff(0, 0), 1.0); EXPECT_DOUBLE_EQ(vofk_eff_tmp_const[0], 1.0); } TEST_F(PotentialNewTest, GetEffectiveVofkarrayNullptr) { pot = new elecstate::Potential; - EXPECT_EQ(pot->v_effective.nc, 0); - double* vofk_eff_tmp = pot->get_effective_vofk(0); - const double* vofk_eff_tmp_const = pot->get_effective_vofk(0); + EXPECT_EQ(pot->v_eff.nc, 0); + double* vofk_eff_tmp = pot->get_eff_vofk(0); + const double* vofk_eff_tmp_const = pot->get_eff_vofk(0); EXPECT_EQ(vofk_eff_tmp, nullptr); EXPECT_EQ(vofk_eff_tmp_const, nullptr); } @@ -519,14 +519,14 @@ TEST_F(PotentialNewTest, GetFixedV) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); EXPECT_TRUE(pot->fixed_mode); EXPECT_TRUE(pot->dynamic_mode); - EXPECT_EQ(pot->v_effective_fixed.size(), 100); + EXPECT_EQ(pot->v_eff_fixed.size(), 100); double* v_eff_fixed_tmp = pot->get_fixed_v(); const double* v_eff_fixed_tmp_const = pot->get_fixed_v(); for (int ic = 0; ic < rhopw->nrxx; ic++) { v_eff_fixed_tmp[ic] = ic; - EXPECT_DOUBLE_EQ(v_eff_fixed_tmp[ic], pot->v_effective_fixed[ic]); - EXPECT_DOUBLE_EQ(v_eff_fixed_tmp_const[ic], pot->v_effective_fixed[ic]); + EXPECT_DOUBLE_EQ(v_eff_fixed_tmp[ic], pot->v_eff_fixed[ic]); + EXPECT_DOUBLE_EQ(v_eff_fixed_tmp_const[ic], pot->v_eff_fixed[ic]); } } @@ -594,12 +594,12 @@ TEST_F(PotentialNewTest, InterpolateVrsDoubleGrids) pot = new elecstate::Potential(rhodpw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); - for (int ir = 0; ir < pot->v_effective.nr; ir++) + for (int ir = 0; ir < pot->v_eff.nr; ir++) { - for (int ic = 0; ic < pot->v_effective.nc; ic++) + for (int ic = 0; ic < pot->v_eff.nc; ic++) { - pot->v_effective(ir, ic) = ir + ic; - pot->vofk_effective(ir, ic) = ir + 2 * ic; + pot->v_eff(ir, ic) = ir + ic; + pot->vofk_eff(ir, ic) = ir + 2 * ic; } } @@ -655,12 +655,12 @@ TEST_F(PotentialNewTest, InterpolateVrsSingleGrids) pot = new elecstate::Potential(rhopw, rhopw, ucell, vloc, structure_factors, solvent, etxc, vtxc); - for (int ir = 0; ir < pot->v_effective.nr; ir++) + for (int ir = 0; ir < pot->v_eff.nr; ir++) { - for (int ic = 0; ic < pot->v_effective.nc; ic++) + for (int ic = 0; ic < pot->v_eff.nc; ic++) { - pot->v_effective(ir, ic) = ir + ic; - pot->vofk_effective(ir, ic) = ir + 2 * ic; + pot->v_eff(ir, ic) = ir + ic; + pot->vofk_eff(ir, ic) = ir + 2 * ic; } } diff --git a/source/source_estate/update_pot.cpp b/source/source_estate/update_pot.cpp index 8a49f66e0c..f0f0ef861a 100644 --- a/source/source_estate/update_pot.cpp +++ b/source/source_estate/update_pot.cpp @@ -12,9 +12,6 @@ void elecstate::update_pot(UnitCell& ucell, // unitcell elecstate::cal_ux(ucell); pelec->pot->update_from_charge(&chr, &ucell); pelec->f_en.descf = pelec->cal_delta_escf(); -#ifdef __MPI - MPI_Bcast(&(pelec->f_en.descf), 1, MPI_DOUBLE, 0, BP_WORLD); -#endif } else { diff --git a/source/source_hamilt/hamilt.h b/source/source_hamilt/hamilt.h index 634ff28b05..6d732d7a82 100644 --- a/source/source_hamilt/hamilt.h +++ b/source/source_hamilt/hamilt.h @@ -21,7 +21,7 @@ class Hamilt virtual void updateHk(const int ik){return;} /// refresh status of Hamiltonian, for example, refresh H(R) and S(R) in LCAO case - virtual void refresh(void){return;} + virtual void refresh(bool yes = true){return;} /// core function: for solving eigenvalues of Hamiltonian with iterative method virtual void hPsi( @@ -55,8 +55,6 @@ class Hamilt std::string classname = "none"; - int non_first_scf=0; - /// first node operator, add operations from each operators Operator* ops = nullptr; diff --git a/source/source_hamilt/module_ewald/H_Ewald_pw.cpp b/source/source_hamilt/module_ewald/H_Ewald_pw.cpp index 20e6762cc0..0a96c2058c 100644 --- a/source/source_hamilt/module_ewald/H_Ewald_pw.cpp +++ b/source/source_hamilt/module_ewald/H_Ewald_pw.cpp @@ -6,7 +6,6 @@ #include "source_base/parallel_reduce.h" #include "source_base/constants.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" double H_Ewald_pw::alpha=0.0; int H_Ewald_pw::mxr = 200; diff --git a/source/source_hamilt/module_surchem/H_correction_pw.cpp b/source/source_hamilt/module_surchem/H_correction_pw.cpp index 06bb2eea25..289f00d07e 100644 --- a/source/source_hamilt/module_surchem/H_correction_pw.cpp +++ b/source/source_hamilt/module_surchem/H_correction_pw.cpp @@ -5,14 +5,15 @@ #include "source_base/timer.h" #include "source_hamilt/module_xc/xc_functional.h" #include "surchem.h" - -ModuleBase::matrix surchem::v_correction(const UnitCell& cell, - const Parallel_Grid& pgrid, - const ModulePW::PW_Basis* rho_basis, - const int& nspin, - const double* const* const rho, - const double* vlocal, - Structure_Factor* sf) +// Changing the interface to use an explicit output parameter clarifies lifetime management and avoids hidden allocations. +void surchem::v_correction(const UnitCell& cell, + const Parallel_Grid& pgrid, + const ModulePW::PW_Basis* rho_basis, + const int& nspin, + const double* const* const rho, + const double* vlocal, + Structure_Factor* sf, + ModuleBase::matrix& v) { ModuleBase::TITLE("surchem", "v_cor"); ModuleBase::timer::tick("surchem", "v_cor"); @@ -46,10 +47,15 @@ ModuleBase::matrix surchem::v_correction(const UnitCell& cell, cal_pseudo(cell, pgrid, rho_basis, porter_g, ps_totn, sf); - ModuleBase::matrix v(nspin, rho_basis->nrxx); + // ModuleBase::matrix v(nspin, rho_basis->nrxx); + if (v.nr != nspin || v.nc != rho_basis->nrxx) + { + v.create(nspin, rho_basis->nrxx); + } + ModuleBase::GlobalFunc::ZEROS(v.c, nspin * rho_basis->nrxx); - v += cal_vel(cell, rho_basis, total_n, ps_totn, nspin); - v += cal_vcav(cell, rho_basis, ps_totn, nspin); + cal_vel(cell, rho_basis, total_n, ps_totn, nspin, v); + cal_vcav(cell, rho_basis, ps_totn, nspin, v); delete[] porter; delete[] porter_g; @@ -58,5 +64,5 @@ ModuleBase::matrix surchem::v_correction(const UnitCell& cell, delete[] total_n; ModuleBase::timer::tick("surchem", "v_cor"); - return v; -} + return; +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/cal_pseudo.cpp b/source/source_hamilt/module_surchem/cal_pseudo.cpp index 1e0a64c5b5..e58024d441 100644 --- a/source/source_hamilt/module_surchem/cal_pseudo.cpp +++ b/source/source_hamilt/module_surchem/cal_pseudo.cpp @@ -1,4 +1,3 @@ -#include "source_pw/module_pwdft/global.h" #include "surchem.h" // atom_in surchem::GetAtom; @@ -9,7 +8,8 @@ void surchem::gauss_charge(const UnitCell& cell, std::complex* N, Structure_Factor* sf) { - sf->setup_structure_factor(&cell, pgrid, rho_basis); // call strucFac(ntype,ngmc) + //sf->setup(&cell, pgrid, rho_basis); // this is strange, should be removed to other places, mohan add 2025-11-04 + //sf here was only needed in the test. const int ig0 = rho_basis->ig_gge0; // G=0 index for (int it = 0; it < cell.ntype; it++) { diff --git a/source/source_hamilt/module_surchem/cal_vcav.cpp b/source/source_hamilt/module_surchem/cal_vcav.cpp index 617da1376e..32f4db6f57 100644 --- a/source/source_hamilt/module_surchem/cal_vcav.cpp +++ b/source/source_hamilt/module_surchem/cal_vcav.cpp @@ -16,25 +16,26 @@ void lapl_rho(const double& tpiba2, // the formula is : rho(r)^prime = \int iG * rho(G)e^{iGr} dG for (int ig = 0; ig < rho_basis->npw; ig++) { gdrtmpg[ig] = rhog[ig]; -} + } + for(int i = 0 ; i < 3 ; ++i) { - // calculate the charge density gradient in reciprocal space. + // calculate the charge density gradient in reciprocal space. for (int ig = 0; ig < rho_basis->npw; ig++) { aux[ig] = gdrtmpg[ig] * pow(rho_basis->gcar[ig][i], 2); -} + } + // bring the gdr from G --> R rho_basis->recip2real(aux, aux); + // remember to multily 2pi/a0, which belongs to G vectors. for (int ir = 0; ir < rho_basis->nrxx; ir++) { lapn[ir] -= aux[ir].real() * tpiba2; -} - + } } delete[] gdrtmpg; delete[] aux; - return; } // calculates first derivative of the shape function in realspace @@ -66,6 +67,7 @@ void surchem::createcavity(const UnitCell& ucell, { ModuleBase::Vector3 *nablan = new ModuleBase::Vector3[rho_basis->nrxx]; ModuleBase::GlobalFunc::ZEROS(nablan, rho_basis->nrxx); + double *nablan_2 = new double[rho_basis->nrxx]; double *sqrt_nablan_2 = new double[rho_basis->nrxx]; double *lapn = new double[rho_basis->nrxx]; @@ -77,14 +79,14 @@ void surchem::createcavity(const UnitCell& ucell, // nabla n XC_Functional::grad_rho(ps_totn, nablan, rho_basis, ucell.tpiba); - // |\nabla n |^2 = nablan_2 + // |\nabla n |^2 = nablan_2 for (int ir = 0; ir < rho_basis->nrxx; ir++) { nablan_2[ir] = pow(nablan[ir].x, 2) + pow(nablan[ir].y, 2) + pow(nablan[ir].z, 2); } // Laplacian of n - lapl_rho(ucell.tpiba2,ps_totn, lapn, rho_basis); + lapl_rho(ucell.tpiba2, ps_totn, lapn, rho_basis); //------------------------------------------------------------- // add -Lap(n)/|\nabla n| to vwork and copy \sqrt(|\nabla n|^2) @@ -162,10 +164,13 @@ void surchem::createcavity(const UnitCell& ucell, delete[] ggn; } -ModuleBase::matrix surchem::cal_vcav(const UnitCell& ucell, - const ModulePW::PW_Basis* rho_basis, - std::complex* ps_totn, - int nspin) +//The interface is changed to use an explicit output parameter to +//clarify lifetime management and avoid hidden allocations. +void surchem::cal_vcav(const UnitCell& ucell, + const ModulePW::PW_Basis* rho_basis, + std::complex* ps_totn, + int nspin, + ModuleBase::matrix& v) { ModuleBase::TITLE("surchem", "cal_vcav"); ModuleBase::timer::tick("surchem", "cal_vcav"); @@ -175,12 +180,12 @@ ModuleBase::matrix surchem::cal_vcav(const UnitCell& ucell, createcavity(ucell, rho_basis, ps_totn, tmp_Vcav); - ModuleBase::GlobalFunc::ZEROS(Vcav.c, nspin * rho_basis->nrxx); if (nspin == 4) { for (int ir = 0; ir < rho_basis->nrxx; ir++) { - Vcav(0, ir) += tmp_Vcav[ir]; + Vcav(0, ir) = tmp_Vcav[ir]; + v(0, ir) += Vcav(0, ir); } } else @@ -189,12 +194,13 @@ ModuleBase::matrix surchem::cal_vcav(const UnitCell& ucell, { for (int ir = 0; ir < rho_basis->nrxx; ir++) { - Vcav(is, ir) += tmp_Vcav[ir]; + Vcav(is, ir) = tmp_Vcav[ir]; + v(is, ir) += Vcav(is, ir); } } } delete[] tmp_Vcav; ModuleBase::timer::tick("surchem", "cal_vcav"); - return Vcav; + return; } diff --git a/source/source_hamilt/module_surchem/cal_vel.cpp b/source/source_hamilt/module_surchem/cal_vel.cpp index 7790dd3341..83b72966a2 100644 --- a/source/source_hamilt/module_surchem/cal_vel.cpp +++ b/source/source_hamilt/module_surchem/cal_vel.cpp @@ -54,11 +54,14 @@ void eps_pot(const double* PS_TOTN_real, delete[] phisq; } -ModuleBase::matrix surchem::cal_vel(const UnitCell& cell, - const ModulePW::PW_Basis* rho_basis, - std::complex* TOTN, - std::complex* PS_TOTN, - int nspin) +//The interface is changed to use an explicit output parameter to +//clarify lifetime management and avoid hidden allocations. +void surchem::cal_vel(const UnitCell& cell, + const ModulePW::PW_Basis* rho_basis, + std::complex* TOTN, + std::complex* PS_TOTN, + int nspin, + ModuleBase::matrix& v) { ModuleBase::TITLE("surchem", "cal_vel"); ModuleBase::timer::tick("surchem", "cal_vel"); @@ -134,6 +137,7 @@ ModuleBase::matrix surchem::cal_vel(const UnitCell& cell, for (int ir = 0; ir < rho_basis->nrxx; ir++) { Vel(0, ir) += tmp_Vel[ir]; + v(0, ir) += Vel(0, ir); } } else @@ -143,6 +147,7 @@ ModuleBase::matrix surchem::cal_vel(const UnitCell& cell, for (int ir = 0; ir < rho_basis->nrxx; ir++) { Vel(is, ir) += tmp_Vel[ir]; + v(is, ir) += Vel(is, ir); } } } @@ -158,5 +163,5 @@ ModuleBase::matrix surchem::cal_vel(const UnitCell& cell, delete[] phi_tilda_R0; ModuleBase::timer::tick("surchem", "cal_vel"); - return Vel; -} + return; +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/minimize_cg.cpp b/source/source_hamilt/module_surchem/minimize_cg.cpp index fb9fe63f73..da41053cd5 100644 --- a/source/source_hamilt/module_surchem/minimize_cg.cpp +++ b/source/source_hamilt/module_surchem/minimize_cg.cpp @@ -15,9 +15,8 @@ void surchem::minimize_cg(const UnitCell& ucell, double rinvLr = 0; // r * r double r2 = 0; - // precond loop parameter - int i = 0; ModuleBase::GlobalFunc::ZEROS(phi, rho_basis->npw); + // malloc vectors in G space std::complex *resid = new std::complex[rho_basis->npw]; std::complex *z = new std::complex[rho_basis->npw]; @@ -25,23 +24,21 @@ void surchem::minimize_cg(const UnitCell& ucell, std::complex *gsqu = new std::complex[rho_basis->npw]; std::complex *d = new std::complex[rho_basis->npw]; - std::complex *gradphi_x = new std::complex[rho_basis->npw]; - std::complex *gradphi_y = new std::complex[rho_basis->npw]; - std::complex *gradphi_z = new std::complex[rho_basis->npw]; + std::complex *gradphi_G_work = new std::complex[rho_basis->npw]; - std::complex *phi_work = new std::complex[rho_basis->npw]; + // ========================================================== + // PRE-ALLOCATION FOR LEPS2 (Avoids allocation inside loop) + // ========================================================== + ModuleBase::Vector3 *aux_grad_phi = new ModuleBase::Vector3[rho_basis->nrxx]; + double *aux_grad_grad_phi_real = new double[rho_basis->nrxx]; + // remove aux_grad_grad_phi_G and aux_lp_real ModuleBase::GlobalFunc::ZEROS(resid, rho_basis->npw); ModuleBase::GlobalFunc::ZEROS(z, rho_basis->npw); ModuleBase::GlobalFunc::ZEROS(lp, rho_basis->npw); ModuleBase::GlobalFunc::ZEROS(gsqu, rho_basis->npw); ModuleBase::GlobalFunc::ZEROS(d, rho_basis->npw); - - ModuleBase::GlobalFunc::ZEROS(gradphi_x, rho_basis->npw); - ModuleBase::GlobalFunc::ZEROS(gradphi_y, rho_basis->npw); - ModuleBase::GlobalFunc::ZEROS(gradphi_z, rho_basis->npw); - - ModuleBase::GlobalFunc::ZEROS(phi_work, rho_basis->npw); + ModuleBase::GlobalFunc::ZEROS(gradphi_G_work, rho_basis->npw); int count = 0; double gg = 0; @@ -65,7 +62,9 @@ void surchem::minimize_cg(const UnitCell& ucell, } // call leps to calculate div ( epsilon * grad ) phi - Leps2(ucell, rho_basis, phi, d_eps, gradphi_x, gradphi_y, gradphi_z, phi_work, lp); + // Updated Leps2 call with new buffers + Leps2(ucell, rho_basis, phi, d_eps, gradphi_G_work, lp, + aux_grad_phi, aux_grad_grad_phi_real); // the residue // r = A*phi + (chtot + N) @@ -85,8 +84,6 @@ void surchem::minimize_cg(const UnitCell& ucell, rinvLr = ModuleBase::GlobalFunc::ddot_real(rho_basis->npw, resid, z); r2 = ModuleBase::GlobalFunc::ddot_real(rho_basis->npw, resid, resid); - double r20 = r2; - // copy for (int ig = 0; ig < rho_basis->npw; ig++) { @@ -103,9 +100,10 @@ void surchem::minimize_cg(const UnitCell& ucell, break; } - Leps2(ucell, rho_basis, d, d_eps, gradphi_x, gradphi_y, gradphi_z, phi_work, lp); + // Updated Leps2 call inside loop + Leps2(ucell, rho_basis, d, d_eps, gradphi_G_work, lp, + aux_grad_phi, aux_grad_grad_phi_real); - // cout <<"lp after leps"<npw, d, lp); // update phi @@ -149,96 +147,70 @@ void surchem::minimize_cg(const UnitCell& ucell, // output: num of cg loop ncgsol = count; - // comment test res + // CLEANUP delete[] resid; delete[] z; delete[] lp; delete[] gsqu; delete[] d; - delete[] gradphi_x; - delete[] gradphi_y; - delete[] gradphi_z; - delete[] phi_work; + delete[] gradphi_G_work; + + // Clean up auxiliary buffers + delete[] aux_grad_phi; + // delete[] aux_grad_grad_phi_G; // Removed + // delete[] aux_lp_real; // Removed + delete[] aux_grad_grad_phi_real; } +// avoid creating large temporary matrices inside its iteration loop +// reduce the intermediate FFT related calls void surchem::Leps2(const UnitCell& ucell, const ModulePW::PW_Basis* rho_basis, std::complex* phi, - double* epsilon, // epsilon from shapefunc, dim=nrxx - std::complex* gradphi_x, // dim=ngmc - std::complex* gradphi_y, - std::complex* gradphi_z, - std::complex* phi_work, - std::complex* lp) + double* epsilon, // epsilon from shapefunc, dim=nrxx + std::complex* gradphi_G_work, + std::complex* lp, + ModuleBase::Vector3* grad_phi_R, // size: nrxx + double* aux_R) // size: nrxx { - ModuleBase::Vector3 *grad_phi = new ModuleBase::Vector3[rho_basis->nrxx]; - XC_Functional::grad_rho(phi, grad_phi, rho_basis, ucell.tpiba); - - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - grad_phi[ir].x *= epsilon[ir]; - grad_phi[ir].y *= epsilon[ir]; - grad_phi[ir].z *= epsilon[ir]; - } - std::vector lp_real(rho_basis->nrxx,0); - ModuleBase::GlobalFunc::ZEROS(lp, rho_basis->npw); + XC_Functional::grad_rho(phi, grad_phi_R, rho_basis, ucell.tpiba); - std::vector grad_grad_phi(rho_basis->nrxx,0); - std::complex *grad_grad_phi_G = new std::complex[rho_basis->npw]; - ModuleBase::Vector3 *tmp_vector3 = new ModuleBase::Vector3[rho_basis->nrxx]; - // x - ModuleBase::GlobalFunc::ZEROS(grad_grad_phi_G, rho_basis->npw); - ModuleBase::GlobalFunc::ZEROS(tmp_vector3, rho_basis->nrxx); - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - grad_grad_phi[ir] = grad_phi[ir].x; - } - rho_basis->real2recip(grad_grad_phi.data(), grad_grad_phi_G); - XC_Functional::grad_rho(grad_grad_phi_G, tmp_vector3, rho_basis, ucell.tpiba); for (int ir = 0; ir < rho_basis->nrxx; ir++) { - lp_real[ir] += tmp_vector3[ir].x; + grad_phi_R[ir].x *= epsilon[ir]; + grad_phi_R[ir].y *= epsilon[ir]; + grad_phi_R[ir].z *= epsilon[ir]; } - // y - grad_grad_phi.assign(grad_grad_phi.size(),0.0); - ModuleBase::GlobalFunc::ZEROS(grad_grad_phi_G, rho_basis->npw); - ModuleBase::GlobalFunc::ZEROS(tmp_vector3, rho_basis->nrxx); - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - grad_grad_phi[ir] = grad_phi[ir].y; - } - rho_basis->real2recip(grad_grad_phi.data(), grad_grad_phi_G); - XC_Functional::grad_rho(grad_grad_phi_G, tmp_vector3, rho_basis, ucell.tpiba); - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - lp_real[ir] += tmp_vector3[ir].y; - } - // z - grad_grad_phi.assign(grad_grad_phi.size(),0.0); - ModuleBase::GlobalFunc::ZEROS(grad_grad_phi_G, rho_basis->npw); - ModuleBase::GlobalFunc::ZEROS(tmp_vector3, rho_basis->nrxx); - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - grad_grad_phi[ir] = grad_phi[ir].z; - } - rho_basis->real2recip(grad_grad_phi.data(), grad_grad_phi_G); - XC_Functional::grad_rho(grad_grad_phi_G, tmp_vector3, rho_basis, ucell.tpiba); - for (int ir = 0; ir < rho_basis->nrxx; ir++) - { - lp_real[ir] += tmp_vector3[ir].z; - } + ModuleBase::GlobalFunc::ZEROS(lp, rho_basis->npw); + // R -> G + for (int ir = 0; ir < rho_basis->nrxx; ir++) aux_R[ir] = grad_phi_R[ir].x; + rho_basis->real2recip(aux_R, gradphi_G_work); + + for(int ig=0; ignpw; ig++) { + // Divergence in G space: div(F) -> i * G * F(G) + lp[ig] += ModuleBase::IMAG_UNIT * gradphi_G_work[ig] * rho_basis->gcar[ig][0]; // 0 = x + } - rho_basis->real2recip(lp_real.data(), lp); + for (int ir = 0; ir < rho_basis->nrxx; ir++) aux_R[ir] = grad_phi_R[ir].y; + rho_basis->real2recip(aux_R, gradphi_G_work); + + for(int ig=0; ignpw; ig++) { + lp[ig] += ModuleBase::IMAG_UNIT * gradphi_G_work[ig] * rho_basis->gcar[ig][1]; // 1 = y + } - delete[] grad_phi; - std::vector().swap(lp_real); - std::vector().swap(grad_grad_phi); + for (int ir = 0; ir < rho_basis->nrxx; ir++) aux_R[ir] = grad_phi_R[ir].z; + rho_basis->real2recip(aux_R, gradphi_G_work); + + for(int ig=0; ignpw; ig++) { + lp[ig] += ModuleBase::IMAG_UNIT * gradphi_G_work[ig] * rho_basis->gcar[ig][2]; // 2 = z + } - delete[] grad_grad_phi_G; - delete[] tmp_vector3; -} + for(int ig=0; ignpw; ig++) { + lp[ig] *= ucell.tpiba; + } +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/surchem.cpp b/source/source_hamilt/module_surchem/surchem.cpp index 60db451b41..1f2a66ef86 100644 --- a/source/source_hamilt/module_surchem/surchem.cpp +++ b/source/source_hamilt/module_surchem/surchem.cpp @@ -50,9 +50,12 @@ void surchem::clear() this->TOTN_real = nullptr; this->delta_phi = nullptr; this->epspot = nullptr; + + this->Vcav.create(0, 0); + this->Vel.create(0, 0); } surchem::~surchem() { this->clear(); -} +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/surchem.h b/source/source_hamilt/module_surchem/surchem.h index e2358449c1..f7aa0a4b02 100644 --- a/source/source_hamilt/module_surchem/surchem.h +++ b/source/source_hamilt/module_surchem/surchem.h @@ -62,16 +62,18 @@ class surchem const std::complex* PS_TOTN, double* vwork); - ModuleBase::matrix cal_vcav(const UnitCell& ucell, - const ModulePW::PW_Basis* rho_basis, - std::complex* PS_TOTN, - int nspin); + void cal_vcav(const UnitCell& ucell, + const ModulePW::PW_Basis* rho_basis, + std::complex* PS_TOTN, + int nspin, + ModuleBase::matrix& v); - ModuleBase::matrix cal_vel(const UnitCell& cell, - const ModulePW::PW_Basis* rho_basis, - std::complex* TOTN, - std::complex* PS_TOTN, - int nspin); + void cal_vel(const UnitCell& cell, + const ModulePW::PW_Basis* rho_basis, + std::complex* TOTN, + std::complex* PS_TOTN, + int nspin, + ModuleBase::matrix& v); double cal_Ael(const UnitCell& cell, const int& nrxx, // num. of real space grids on current core @@ -96,19 +98,19 @@ class surchem const ModulePW::PW_Basis* rho_basis, std::complex* phi, double* epsilon, // epsilon from shapefunc, dim=nrxx - std::complex* gradphi_x, // dim=ngmc - std::complex* gradphi_y, - std::complex* gradphi_z, - std::complex* phi_work, - std::complex* lp); - - ModuleBase::matrix v_correction(const UnitCell& cell, - const Parallel_Grid& pgrid, - const ModulePW::PW_Basis* rho_basis, - const int& nspin, - const double* const* const rho, - const double* vlocal, - Structure_Factor* sf); + std::complex* gradphi_G_work, + std::complex* lp, + ModuleBase::Vector3* grad_phi_R, // size: nrxx + double* aux_R); + + void v_correction(const UnitCell& cell, + const Parallel_Grid& pgrid, + const ModulePW::PW_Basis* rho_basis, + const int& nspin, + const double* const* const rho, + const double* vlocal, + Structure_Factor* sf, + ModuleBase::matrix& v); void test_V_to_N(ModuleBase::matrix& v, const UnitCell& cell, @@ -134,4 +136,4 @@ class surchem private: }; -#endif +#endif \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/test/cal_pseudo_test.cpp b/source/source_hamilt/module_surchem/test/cal_pseudo_test.cpp index e60b192719..2bd8025f7d 100644 --- a/source/source_hamilt/module_surchem/test/cal_pseudo_test.cpp +++ b/source/source_hamilt/module_surchem/test/cal_pseudo_test.cpp @@ -76,6 +76,8 @@ TEST_F(cal_pseudo_test, gauss_charge) Structure_Factor sf; sf.nbspline = -1; + sf.setup(&ucell, pgrid, &pwtest); + solvent_model.gauss_charge(ucell, pgrid, &pwtest, N, &sf); EXPECT_NEAR(N[14].real(), 0.002, 1e-9); @@ -126,6 +128,7 @@ TEST_F(cal_pseudo_test, cal_pseudo) Structure_Factor sf; sf.nbspline = -1; + sf.setup(&ucell, pgrid, &pwtest); // sf.setup is moved to here std::complex* Porter_g = new std::complex[npw]; ModuleBase::GlobalFunc::ZEROS(Porter_g, npw); @@ -160,4 +163,4 @@ int main(int argc, char** argv) #endif return result; -} +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/test/cal_vcav_test.cpp b/source/source_hamilt/module_surchem/test/cal_vcav_test.cpp index 65fe839aa2..9a0af0432d 100644 --- a/source/source_hamilt/module_surchem/test/cal_vcav_test.cpp +++ b/source/source_hamilt/module_surchem/test/cal_vcav_test.cpp @@ -253,12 +253,14 @@ TEST_F(cal_vcav_test, cal_vcav) int nspin = 2; solvent_model.Vcav.create(nspin, nrxx); - solvent_model.cal_vcav(ucell, &pwtest, PS_TOTN, nspin); + ModuleBase::matrix v_res(nspin, nrxx); + ModuleBase::GlobalFunc::ZEROS(v_res.c, nspin * nrxx); + solvent_model.cal_vcav(ucell, &pwtest, PS_TOTN, nspin, v_res); - EXPECT_NEAR(solvent_model.Vcav(0, 0), 4.8556305312, 1e-10); - EXPECT_NEAR(solvent_model.Vcav(0, 1), -2.1006480538, 1e-10); - EXPECT_NEAR(solvent_model.Vcav(1, 0), 4.8556305312, 1e-10); - EXPECT_NEAR(solvent_model.Vcav(1, 1), -2.1006480538, 1e-10); + EXPECT_NEAR(v_res(0, 0), 4.8556305312, 1e-10); + EXPECT_NEAR(v_res(0, 1), -2.1006480538, 1e-10); + EXPECT_NEAR(v_res(1, 0), 4.8556305312, 1e-10); + EXPECT_NEAR(v_res(1, 1), -2.1006480538, 1e-10); delete[] PS_TOTN; } @@ -279,4 +281,4 @@ int main(int argc, char** argv) #endif return result; -} +} \ No newline at end of file diff --git a/source/source_hamilt/module_surchem/test/cal_vel_test.cpp b/source/source_hamilt/module_surchem/test/cal_vel_test.cpp index 60d925b3fb..818e52dbe6 100644 --- a/source/source_hamilt/module_surchem/test/cal_vel_test.cpp +++ b/source/source_hamilt/module_surchem/test/cal_vel_test.cpp @@ -220,10 +220,13 @@ TEST_F(cal_vel_test, cal_vel) solvent_model.TOTN_real = new double[nrxx]; solvent_model.delta_phi = new double[nrxx]; - solvent_model.cal_vel(ucell, &pwtest, TOTN, PS_TOTN, nspin); + ModuleBase::matrix v_res(nspin, nrxx); + ModuleBase::GlobalFunc::ZEROS(v_res.c, nspin * nrxx); - EXPECT_NEAR(solvent_model.Vel(0, 0), 0.0532168705, 1e-10); - EXPECT_NEAR(solvent_model.Vel(0, 1), 0.0447818244, 1e-10); + solvent_model.cal_vel(ucell, &pwtest, TOTN, PS_TOTN, nspin, v_res); + + EXPECT_NEAR(v_res(0, 0), 0.0532168705, 1e-10); + EXPECT_NEAR(v_res(0, 1), 0.0447818244, 1e-10); delete[] PS_TOTN; delete[] TOTN; @@ -245,4 +248,4 @@ int main(int argc, char** argv) #endif return result; -} +} \ No newline at end of file diff --git a/source/source_hamilt/module_vdw/vdwd2.h b/source/source_hamilt/module_vdw/vdwd2.h index 4315204288..4e1e836d57 100644 --- a/source/source_hamilt/module_vdw/vdwd2.h +++ b/source/source_hamilt/module_vdw/vdwd2.h @@ -36,9 +36,9 @@ class Vdwd2 : public Vdw int yidx = para_.period().y / 2; int zidx = para_.period().z / 2; - for (int it1 = 0; it1 != ucell_.ntype; ++it1) + for (int it1 = 0; it1 < ucell_.ntype; ++it1) { - for (int it2 = 0; it2 != ucell_.ntype; ++it2) + for (int it2 = 0; it2 < ucell_.ntype; ++it2) { const double C6_product = sqrt(para_.C6().at(ucell_.atoms[it1].ncpp.psd) * para_.C6().at(ucell_.atoms[it2].ncpp.psd)) diff --git a/source/source_hamilt/module_vdw/vdwd2_parameters.cpp b/source/source_hamilt/module_vdw/vdwd2_parameters.cpp index a562244be3..3ac48e1819 100644 --- a/source/source_hamilt/module_vdw/vdwd2_parameters.cpp +++ b/source/source_hamilt/module_vdw/vdwd2_parameters.cpp @@ -50,7 +50,7 @@ void Vdwd2Parameters::C6_input(const std::string &file, const std::string &unit) ModuleBase::WARNING_QUIT("Vdwd2::C6_input", "Can not find the file " + ModuleBase::GlobalFunc::TO_STRING(file)); std::string element; - double value; + double value = 0.0; while (ifs >> element >> value) C6_[element] = value; ifs.close(); @@ -77,7 +77,7 @@ void Vdwd2Parameters::R0_input(const std::string &file, const std::string &unit) ModuleBase::WARNING_QUIT("Vdwd2::R0_input", "Can not find the file " + ModuleBase::GlobalFunc::TO_STRING(file)); std::string element; - double value; + double value = 0.0; while (ifs >> element >> value) R0_[element] = value; ifs.close(); diff --git a/source/source_hamilt/module_vdw/vdwd3.cpp b/source/source_hamilt/module_vdw/vdwd3.cpp index 95aeac8226..66245e0f09 100644 --- a/source/source_hamilt/module_vdw/vdwd3.cpp +++ b/source/source_hamilt/module_vdw/vdwd3.cpp @@ -88,7 +88,7 @@ void Vdwd3::cal_energy() ModuleBase::timer::tick("Vdwd3", "cal_energy"); init(); - int ij; + int ij = 0; double c6 = 0.0, c8 = 0.0, r2 = 0.0, r6 = 0.0, r8 = 0.0, rr = 0.0, damp6 = 0.0, damp8 = 0.0; double e6 = 0.0, e8 = 0.0, eabc = 0.0; std::vector cc6ab(ucell_.nat * ucell_.nat), cn(ucell_.nat); @@ -96,7 +96,7 @@ void Vdwd3::cal_energy() ModuleBase::Vector3 tau; if (para_.version() == "d3_0") // DFT-D3(zero-damping) { - double tmp; + double tmp = 0.0; for (int iat = 0; iat != ucell_.nat - 1; iat++) { for (int jat = iat + 1; jat != ucell_.nat; jat++) { @@ -178,7 +178,7 @@ void Vdwd3::cal_energy() } // end d3_0 else if (para_.version() == "d3_bj") // DFT-D3(BJ-damping) { - double r42; + double r42 = 0.0; for (int iat = 0; iat != ucell_.nat; iat++) { for (int jat = iat + 1; jat != ucell_.nat; jat++) @@ -860,7 +860,7 @@ void Vdwd3::pbc_gdisp(std::vector> &g, ModuleBase::m } // end d3_0 else if (para_.version() == "d3_bj") { - double r4; + double r4 = 0.0; for (int iat = 0; iat != ucell_.nat; iat++) { get_dc6_dcnij(para_.mxc()[iz_[iat]], para_.mxc()[iz_[iat]], cn[iat], cn[iat], diff --git a/source/source_hamilt/module_vdw/vdwd3_autoset_xcparam.cpp b/source/source_hamilt/module_vdw/vdwd3_autoset_xcparam.cpp index 8e520c6a41..c2c68bb4a1 100644 --- a/source/source_hamilt/module_vdw/vdwd3_autoset_xcparam.cpp +++ b/source/source_hamilt/module_vdw/vdwd3_autoset_xcparam.cpp @@ -243,6 +243,9 @@ const std::pair> zero_data[] = { {"b97_d", {1.0, 0.892, 0.892, 0.909, 1.0, 1.0, 1.0, 14.0, 0.0}}, {"b973c", {1.0, 1.06, 1.06, 1.5, 1.0, 1.0, 1.0, 14.0, 0.0}}, {"pbe", {1.0, 1.217, 1.217, 0.722, 1.0, 1.0, 1.0, 14.0, 0.0}}, + {"pbesol", {1.0, 1.345, 1.345, 0.612, 1.0, 1.0, 1.0, 14.0, 0.0}}, + // issue#6646, d3 zero-damping support for PBEsol, + // parameters retrived from https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3/zero_damping {"rpw86pbe", {1.0, 1.224, 1.224, 0.901, 1.0, 1.0, 1.0, 14.0, 0.0}}, {"b3lyp", {1.0, 1.261, 1.261, 1.703, 1.0, 1.0, 1.0, 14.0, 0.0}}, {"tpss", {1.0, 1.166, 1.166, 1.105, 1.0, 1.0, 1.0, 14.0, 0.0}}, diff --git a/source/source_hamilt/module_vdw/vdwd3_parameters_tab.cpp b/source/source_hamilt/module_vdw/vdwd3_parameters_tab.cpp index bd06018e6e..534f845ea4 100644 --- a/source/source_hamilt/module_vdw/vdwd3_parameters_tab.cpp +++ b/source/source_hamilt/module_vdw/vdwd3_parameters_tab.cpp @@ -11,7 +11,7 @@ namespace vdw void Vdwd3Parameters::init_C6() { - std::vector C6_tmp = { + static const double C6_tmp[] = { 0.30267000E+1,0.100E+1,0.100E+1,0.91180000E+0,0.91180000E+0 ,0.20835000E+1,0.200E+1,0.100E+1,0.00000000E+0,0.91180000E+0 ,0.15583000E+1,0.200E+1,0.200E+1,0.00000000E+0,0.00000000E+0 @@ -32475,7 +32475,7 @@ void Vdwd3Parameters::init_rcov() void Vdwd3Parameters::init_r0ab() { - std::vector r = { + static const double r[] = { 2.1823, 1.8547, 1.7347, 2.9086, 2.5732, 3.4956, 2.3550, 2.5095, 2.9802, 3.0982, 2.5141, 2.3917, 2.9977, 2.9484, 3.2160, 2.4492, 2.2527, 3.1933, 3.0214, 2.9531, 2.9103, diff --git a/source/source_hamilt/module_xc/CMakeLists.txt b/source/source_hamilt/module_xc/CMakeLists.txt index 4db1ef083d..9d38b59fa2 100644 --- a/source/source_hamilt/module_xc/CMakeLists.txt +++ b/source/source_hamilt/module_xc/CMakeLists.txt @@ -17,6 +17,7 @@ add_library( xc_functional_libxc_wrapper_xc.cpp xc_functional_libxc_wrapper_gcxc.cpp xc_functional_libxc_wrapper_tauxc.cpp + exx_info.cpp ) if(ENABLE_COVERAGE) diff --git a/source/source_pw/module_pwdft/global.cpp b/source/source_hamilt/module_xc/exx_info.cpp similarity index 62% rename from source/source_pw/module_pwdft/global.cpp rename to source/source_hamilt/module_xc/exx_info.cpp index f483101fe2..8416891052 100644 --- a/source/source_pw/module_pwdft/global.cpp +++ b/source/source_hamilt/module_xc/exx_info.cpp @@ -1,13 +1,9 @@ -#include "global.h" +#include "exx_info.h" + //---------------------------------------------------------- // init "GLOBAL CLASS" object //---------------------------------------------------------- namespace GlobalC { -#ifdef __EXX Exx_Info exx_info; -#endif -Restart restart; // Peize Lin add 2020.04.04 -} - -//Magnetism mag; +} \ No newline at end of file diff --git a/source/source_hamilt/module_xc/exx_info.h b/source/source_hamilt/module_xc/exx_info.h index fa01daf46b..c9584f9b60 100644 --- a/source/source_hamilt/module_xc/exx_info.h +++ b/source/source_hamilt/module_xc/exx_info.h @@ -2,7 +2,6 @@ #define EXX_INFO_H #include "source_lcao/module_ri/conv_coulomb_pot_k.h" -#include "xc_functional.h" #include #include @@ -67,8 +66,7 @@ struct Exx_Info double ccp_rmesh_times = 10; bool exx_symmetry_realspace = true; double kmesh_times = 4; - - int abfs_Lmax = 0; // tmp + double Cs_inv_thr = -1; Exx_Info_RI(const Exx_Info::Exx_Info_Global& info_global) : coulomb_param(info_global.coulomb_param) @@ -79,7 +77,7 @@ struct Exx_Info struct Exx_Info_Opt_ABFs { - int abfs_Lmax = 0; // tmp + int abfs_Lmax = 0; double ecut_exx = 60; double tolerence = 1E-12; std::vector files_jles; @@ -96,4 +94,12 @@ struct Exx_Info } }; +//========================================================== +// EXPLAIN : define "GLOBAL CLASS" +//========================================================== +namespace GlobalC +{ + extern Exx_Info exx_info; +} // namespace GlobalC + #endif diff --git a/source/source_hamilt/module_xc/kernels/cuda/xc_functional_op.cu b/source/source_hamilt/module_xc/kernels/cuda/xc_functional_op.cu index 8d5c0683cc..6ee81727c4 100644 --- a/source/source_hamilt/module_xc/kernels/cuda/xc_functional_op.cu +++ b/source/source_hamilt/module_xc/kernels/cuda/xc_functional_op.cu @@ -59,7 +59,7 @@ void xc_functional_grad_wfc_op::operator()( xc_functional_grad_wfc<<>>( ik, pol, npw, npwx, tpiba, gcar, kvec_c, rhog_, porter_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -75,7 +75,7 @@ void xc_functional_grad_wfc_op::operator()( xc_functional_grad_wfc<<>>( ipol, nrxx, porter_, grad_); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct xc_functional_grad_wfc_op, base_device::DEVICE_GPU>; diff --git a/source/source_hamilt/module_xc/xc_funct_corr_gga.cpp b/source/source_hamilt/module_xc/xc_funct_corr_gga.cpp index 2c94989482..3c88eb653c 100644 --- a/source/source_hamilt/module_xc/xc_funct_corr_gga.cpp +++ b/source/source_hamilt/module_xc/xc_funct_corr_gga.cpp @@ -104,7 +104,7 @@ void XC_Functional::ggac(const double &rho,const double &grho, double &sc, doubl y = af * t * t; xy = (1.0 + y) / (1.0 + y + y * y); - double x; + double x = 0.0; x = 1.0 + y + y * y; qy = y * y * (2.0 + y) / (x * x); s1 = 1.0 + 2.0 * al / be * t * t * xy; diff --git a/source/source_hamilt/module_xc/xc_funct_corr_lda.cpp b/source/source_hamilt/module_xc/xc_funct_corr_lda.cpp index 4a749320b8..5b6ff5367b 100644 --- a/source/source_hamilt/module_xc/xc_funct_corr_lda.cpp +++ b/source/source_hamilt/module_xc/xc_funct_corr_lda.cpp @@ -138,7 +138,7 @@ void XC_Functional::vwn(const double &rs, double &ec, double &vc) fx = rs + b * rs12 + c; qx = atan(q / (2.0 * rs12 + b)); - double x; + double x = 0.0; x = (rs12 - x0); ec = a * (log(rs / fx) + f1 * qx - f2 * (log((x * x) / fx) + f3 * qx)); diff --git a/source/source_hamilt/module_xc/xc_functional.cpp b/source/source_hamilt/module_xc/xc_functional.cpp index 2462f8ac42..5cb8394b72 100644 --- a/source/source_hamilt/module_xc/xc_functional.cpp +++ b/source/source_hamilt/module_xc/xc_functional.cpp @@ -1,5 +1,4 @@ #include "xc_functional.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_base/global_function.h" @@ -29,18 +28,29 @@ void XC_Functional::set_xc_first_loop(const UnitCell& ucell) the first scf iteration only calculate the functional without exact exchange. but in "nscf" calculation, there is no need of "two-level" method. */ - if (ucell.atoms[0].ncpp.xc_func == "HF" || ucell.atoms[0].ncpp.xc_func == "HSE" - || ucell.atoms[0].ncpp.xc_func == "PBE0"|| ucell.atoms[0].ncpp.xc_func == "LC_PBE" - || ucell.atoms[0].ncpp.xc_func == "LC_WPBE" || ucell.atoms[0].ncpp.xc_func == "LRC_WPBEH" - || ucell.atoms[0].ncpp.xc_func == "CAM_PBEH") { + if (ucell.atoms[0].ncpp.xc_func == "HF" || ucell.atoms[0].ncpp.xc_func == "PBE0" || ucell.atoms[0].ncpp.xc_func == "HSE") + { XC_Functional::set_xc_type("pbe"); } - else if (ucell.atoms[0].ncpp.xc_func == "SCAN0") { - XC_Functional::set_xc_type("scan"); + else if ( ucell.atoms[0].ncpp.xc_func == "LC_PBE" || ucell.atoms[0].ncpp.xc_func == "LC_WPBE" + || ucell.atoms[0].ncpp.xc_func == "LRC_WPBEH" || ucell.atoms[0].ncpp.xc_func == "CAM_PBEH" ) + { + XC_Functional::set_xc_type("pbe"); + } + // added by jghan, 2024-07-07 + else if ( ucell.atoms[0].ncpp.xc_func == "MULLER" || ucell.atoms[0].ncpp.xc_func == "POWER" + || ucell.atoms[0].ncpp.xc_func == "WP22" || ucell.atoms[0].ncpp.xc_func == "CWP22" ) + { + XC_Functional::set_xc_type("pbe"); } - else if (ucell.atoms[0].ncpp.xc_func == "B3LYP") { + else if (ucell.atoms[0].ncpp.xc_func == "B3LYP") + { XC_Functional::set_xc_type("blyp"); } + else if (ucell.atoms[0].ncpp.xc_func == "SCAN0") + { + XC_Functional::set_xc_type("scan"); + } } // The setting values of functional id according to the index in LIBXC @@ -316,3 +326,42 @@ void XC_Functional::set_xc_type(const std::string xc_func_in) #endif } + +std::string XC_Functional::output_info() +{ + #ifdef USE_LIBXC + if(use_libxc) + { + std::stringstream ss; + ss<<" Libxc v"< funcs = XC_Functional_Libxc::init_func(func_id, XC_UNPOLARIZED); + for(const auto &func : funcs) + { + const xc_func_info_type *info = xc_func_get_info(&func); + ss<<" XC: "< func_id; // libxc id of functional diff --git a/source/source_hamilt/module_xc/xc_functional_gradcorr.cpp b/source/source_hamilt/module_xc/xc_functional_gradcorr.cpp index 66b0a4a0d6..008109377c 100644 --- a/source/source_hamilt/module_xc/xc_functional_gradcorr.cpp +++ b/source/source_hamilt/module_xc/xc_functional_gradcorr.cpp @@ -226,7 +226,7 @@ void XC_Functional::gradcorr(double &etxc, double &vtxc, ModuleBase::matrix &v, if(nspin0==1) { - double segno; + double segno = 0.0; #ifdef _OPENMP #pragma omp for #endif @@ -249,7 +249,7 @@ void XC_Functional::gradcorr(double &etxc, double &vtxc, ModuleBase::matrix &v, #ifdef USE_LIBXC if(func_type == 3 || func_type == 5) //the gradcorr part to stress of mGGA { - double v3xc; + double v3xc = 0.0; double atau = chr->kin_r[0][ir]/2.0; XC_Functional_Libxc::tau_xc( func_id, arho, grho2a, atau, sxc, v1xc, v2xc, v3xc); } diff --git a/source/source_hamilt/module_xc/xc_functional_libxc.cpp b/source/source_hamilt/module_xc/xc_functional_libxc.cpp index ca1f0099a7..3b1595a3a5 100644 --- a/source/source_hamilt/module_xc/xc_functional_libxc.cpp +++ b/source/source_hamilt/module_xc/xc_functional_libxc.cpp @@ -6,7 +6,7 @@ #include "source_base/formatter.h" #ifdef __EXX -#include "source_pw/module_pwdft/global.h" // just for GlobalC::exx_info +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info #endif #include @@ -40,7 +40,7 @@ bool not_supported_xc_with_nonlocal_vdw(const std::string& xc_func_in) if(xc_func.find("VV10") != std::string::npos) { return true; } /* known excluded: GGA_XC_VV10, HYB_GGA_XC_LC_VV10, MGGA_C_REVSCAN_VV10, MGGA_C_SCAN_VV10, - MGGA_C_SCANL_VV10, MGGA_XC_VCML_RVV10 */ + MGGA_C_SCANL_VV10, MGGA_XC_VCML_RVV10 */ const std::vector not_supported = {"C09X", "VCML", "HYB_MGGA_XC_WB97M_V", "MGGA_XC_B97M_V"}; for(const std::string& str : not_supported) @@ -54,8 +54,8 @@ bool not_supported_xc_with_nonlocal_vdw(const std::string& xc_func_in) { std::cout << " WARNING: range-seperated XC omega-B97 family with nonlocal correction term is used.\n" << " if you are not planning to use these functionals like wB97X-D3BJ that:\n" - << " XC_GGA_XC_WB97X_V with specified D3BJ DFT-D3 parameters, this is not what\n" - << " you want." << std::endl; + << " XC_GGA_XC_WB97X_V with specified D3BJ DFT-D3 parameters, this is not what\n" + << " you want." << std::endl; } return false; } @@ -92,7 +92,7 @@ int xc_func_type_classifier(const std::string& xc_func, std::pair> XC_Functional_Libxc::set_xc_type_libxc(const std::string& xc_func_in) { - // check if the functional involves Laplacian of rho + // check if the functional involves Laplacian of rho if (not_supported_xc_with_laplacian(xc_func_in)) { ModuleBase::WARNING_QUIT("XC_Functional::set_xc_type_libxc", @@ -120,14 +120,14 @@ XC_Functional_Libxc::set_xc_type_libxc(const std::string& xc_func_in) } // check if there is None (no, we dont check it) - int func_type = xcfunc_type_.front(); // all functionals are of the same type + int func_type = xcfunc_type_.front(); // all functionals are of the same type // if (func_type == 0) // { // ModuleBase::WARNING_QUIT("XC_Functional::set_xc_type_libxc", // "Unrecognized functional type in '" + xc_func_in + "'."); // } - // determine the functional id + // determine the functional id std::vector func_id(xcfunc_words_.size(), -1); std::transform(xcfunc_words_.begin(), xcfunc_words_.end(), func_id.begin(), [](const std::string& func) { return xc_functional_get_number(func.c_str()); }); @@ -144,7 +144,7 @@ XC_Functional_Libxc::set_xc_type_libxc(const std::string& xc_func_in) } // return - return std::make_pair(func_type, func_id); + return std::make_pair(func_type, func_id); } const std::vector in_built_xc_func_ext_params(const int id) @@ -176,45 +176,45 @@ const std::vector in_built_xc_func_ext_params(const int id) return {0.04918, 0.132, 0.2533, 0.349, 0.35/2.29, 2.0/2.29, GlobalC::exx_info.info_global.hse_omega}; // Long-range corrected functionals: - case XC_HYB_GGA_XC_LC_PBEOP: // LC version of PBE + case XC_HYB_GGA_XC_LC_PBEOP: // LC version of PBE { - // This is a range-separated hybrid functional with range-separation constant 0.330, - // and 0.0% short-range and 100.0% long-range exact exchange, - // using the error function kernel. + // This is a range-separated hybrid functional with range-separation constant 0.330, + // and 0.0% short-range and 100.0% long-range exact exchange, + // using the error function kernel. return { GlobalC::exx_info.info_global.hse_omega }; //Range separation constant: 0.33 } - case XC_HYB_GGA_XC_LC_WPBE: // Long-range corrected PBE (LC-wPBE) by Vydrov and Scuseria + case XC_HYB_GGA_XC_LC_WPBE: // Long-range corrected PBE (LC-wPBE) by Vydrov and Scuseria { - // This is a range-separated hybrid functional with range-separation constant 0.400, - // and 0.0% short-range and 100.0% long-range exact exchange, - // using the error function kernel. + // This is a range-separated hybrid functional with range-separation constant 0.400, + // and 0.0% short-range and 100.0% long-range exact exchange, + // using the error function kernel. return { std::stod(PARAM.inp.exx_fock_alpha[0]), //Fraction of Hartree-Fock exchange: 1.0 std::stod(PARAM.inp.exx_erfc_alpha[0]), //Fraction of short-range exact exchange: -1.0 GlobalC::exx_info.info_global.hse_omega }; //Range separation constant: 0.4 } - case XC_HYB_GGA_XC_LRC_WPBE: // Long-range corrected PBE (LRC-wPBE) by by Rohrdanz, Martins and Herbert + case XC_HYB_GGA_XC_LRC_WPBE: // Long-range corrected PBE (LRC-wPBE) by by Rohrdanz, Martins and Herbert { - // This is a range-separated hybrid functional with range-separation constant 0.300, - // and 0.0% short-range and 100.0% long-range exact exchange, - // using the error function kernel. + // This is a range-separated hybrid functional with range-separation constant 0.300, + // and 0.0% short-range and 100.0% long-range exact exchange, + // using the error function kernel. return { std::stod(PARAM.inp.exx_fock_alpha[0]), //Fraction of Hartree-Fock exchange: 1.0 std::stod(PARAM.inp.exx_erfc_alpha[0]), //Fraction of short-range exact exchange: -1.0 GlobalC::exx_info.info_global.hse_omega }; //Range separation constant: 0.3 } - case XC_HYB_GGA_XC_LRC_WPBEH: // Long-range corrected short-range hybrid PBE (LRC-wPBEh) by Rohrdanz, Martins and Herbert + case XC_HYB_GGA_XC_LRC_WPBEH: // Long-range corrected short-range hybrid PBE (LRC-wPBEh) by Rohrdanz, Martins and Herbert { - // This is a range-separated hybrid functional with range-separation constant 0.200, - // and 20.0% short-range and 100.0% long-range exact exchange, - // using the error function kernel. + // This is a range-separated hybrid functional with range-separation constant 0.200, + // and 20.0% short-range and 100.0% long-range exact exchange, + // using the error function kernel. return { std::stod(PARAM.inp.exx_fock_alpha[0]), //Fraction of Hartree-Fock exchange: 1.0 std::stod(PARAM.inp.exx_erfc_alpha[0]), //Fraction of short-range exact exchange: -0.8 GlobalC::exx_info.info_global.hse_omega }; //Range separation constant: 0.2 } - case XC_HYB_GGA_XC_CAM_PBEH: // CAM hybrid screened exchange PBE version + case XC_HYB_GGA_XC_CAM_PBEH: // CAM hybrid screened exchange PBE version { - // This is a range-separated hybrid functional with range-separation constant 0.700, - // and 100.0% short-range and 20.0% long-range exact exchange, - // using the error function kernel. + // This is a range-separated hybrid functional with range-separation constant 0.700, + // and 100.0% short-range and 20.0% long-range exact exchange, + // using the error function kernel. return { std::stod(PARAM.inp.exx_fock_alpha[0]), //Fraction of Hartree-Fock exchange: 0.2 std::stod(PARAM.inp.exx_erfc_alpha[0]), //Fraction of short-range exact exchange: 0.8 GlobalC::exx_info.info_global.hse_omega }; //Range separation constant: 0.7 @@ -287,10 +287,10 @@ XC_Functional_Libxc::init_func(const std::vector &func_id, void XC_Functional_Libxc::finish_func(std::vector &funcs) { - for(xc_func_type func : funcs) + for(xc_func_type func : funcs) { - xc_func_end(&func); - } + xc_func_end(&func); + } } -#endif \ No newline at end of file +#endif diff --git a/source/source_hamilt/module_xc/xc_functional_libxc.h b/source/source_hamilt/module_xc/xc_functional_libxc.h index 948db289db..defd851faa 100644 --- a/source/source_hamilt/module_xc/xc_functional_libxc.h +++ b/source/source_hamilt/module_xc/xc_functional_libxc.h @@ -53,13 +53,13 @@ namespace XC_Functional_Libxc // xc_functional_libxc_vxc.cpp //------------------- - extern std::tuple v_xc_libxc( - const std::vector &func_id, - const int &nrxx, // number of real-space grid - const double &omega, // volume of cell - const double tpiba, - const Charge* const chr, // charge density - const std::map* scaling_factor = nullptr); // added by jghan, 2024-10-10 + extern std::tuple v_xc_libxc( + const std::vector &func_id, + const int &nrxx, // number of real-space grid + const double &omega, // volume of cell + const double tpiba, + const Charge* const chr, // charge density + const std::map* scaling_factor = nullptr); // added by jghan, 2024-10-10 // for mGGA functional extern std::tuple v_xc_meta( diff --git a/source/source_hamilt/module_xc/xc_functional_libxc_wrapper_tauxc.cpp b/source/source_hamilt/module_xc/xc_functional_libxc_wrapper_tauxc.cpp index 8891fc98f6..a7499ef090 100644 --- a/source/source_hamilt/module_xc/xc_functional_libxc_wrapper_tauxc.cpp +++ b/source/source_hamilt/module_xc/xc_functional_libxc_wrapper_tauxc.cpp @@ -4,8 +4,9 @@ #ifdef USE_LIBXC +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info +#include "source_hamilt/module_xc/xc_functional.h" #include "xc_functional_libxc.h" -#include "source_pw/module_pwdft/global.h" #include //tau_xc and tau_xc_spin: interface for calling xc_mgga_exc_vxc from LIBXC @@ -102,4 +103,4 @@ void XC_Functional_Libxc::tau_xc_spin( XC_Functional_Libxc::finish_func(funcs); } -#endif \ No newline at end of file +#endif diff --git a/source/source_hamilt/module_xc/xc_functional_wrapper_gcxc.cpp b/source/source_hamilt/module_xc/xc_functional_wrapper_gcxc.cpp index 7b46ce96a1..3956d29702 100644 --- a/source/source_hamilt/module_xc/xc_functional_wrapper_gcxc.cpp +++ b/source/source_hamilt/module_xc/xc_functional_wrapper_gcxc.cpp @@ -8,7 +8,6 @@ #include "xc_functional.h" #include -#include "source_pw/module_pwdft/global.h" #include "source_base/global_function.h" #ifdef USE_LIBXC @@ -129,7 +128,7 @@ void XC_Functional::gcx_spin(double rhoup, double rhodw, double grhoup2, double // parameter : double small = 1.e-10; double sxup, sxdw; - int iflag; + int iflag = 0; // exchange double rho = rhoup + rhodw; @@ -248,7 +247,7 @@ void XC_Functional::gcc_spin(double rho, double &zeta, double grho, double &sc, double small = 1.0e-10; double epsr = 1.0e-6; - double x; + double x = 0.0; sc = 0.00; v1cup = 0.00; v1cdw = 0.00; diff --git a/source/source_hamilt/module_xc/xc_functional_wrapper_xc.cpp b/source/source_hamilt/module_xc/xc_functional_wrapper_xc.cpp index d13eb0d129..0a9bffbc42 100644 --- a/source/source_hamilt/module_xc/xc_functional_wrapper_xc.cpp +++ b/source/source_hamilt/module_xc/xc_functional_wrapper_xc.cpp @@ -17,7 +17,7 @@ void XC_Functional::xc(const double &rho, double &exc, double &vxc) double third = 1.0 / 3.0; double pi34 = 0.6203504908994e0 ; // pi34=(3/4pi)^(1/3) - double rs; + double rs = 0.0; double e,v; exc = vxc = 0.00; diff --git a/source/source_hsolver/CMakeLists.txt b/source/source_hsolver/CMakeLists.txt index c2aa8c60e4..f4e87cdf94 100644 --- a/source/source_hsolver/CMakeLists.txt +++ b/source/source_hsolver/CMakeLists.txt @@ -21,6 +21,7 @@ if(ENABLE_LCAO) hsolver_lcao.cpp diago_scalapack.cpp parallel_k2d.cpp + diago_lapack.cpp ) else () list(APPEND objects @@ -36,14 +37,14 @@ if(ENABLE_LCAO) endif () if(USE_CUDA) - list(APPEND objects + set(cuda_objects ./kernels/hegvd_op.cpp ./kernels/cuda/diag_cusolver.cu diago_cusolver.cpp diago_cusolver.h ) if(ENABLE_CUSOLVERMP) - list(APPEND objects + list(APPEND cuda_objects ./kernels/cuda/diag_cusolvermp.cu diago_cusolvermp.cpp diago_cusolvermp.h @@ -52,7 +53,7 @@ if(ENABLE_LCAO) add_library( diag_cusolver OBJECT - ${objects} + ${cuda_objects} ) if(ENABLE_COVERAGE) add_coverage(diag_cusolver) diff --git a/source/source_hsolver/diago_bpcg.cpp b/source/source_hsolver/diago_bpcg.cpp index 8b9a51b7f8..d4db3d790b 100644 --- a/source/source_hsolver/diago_bpcg.cpp +++ b/source/source_hsolver/diago_bpcg.cpp @@ -112,14 +112,14 @@ void DiagoBPCG::line_minimize( // Finally, the last two! template void DiagoBPCG::orth_cholesky( - ct::Tensor& workspace_in, - ct::Tensor& psi_out, - ct::Tensor& hpsi_out, + ct::Tensor& workspace_in, + ct::Tensor& psi_out, + ct::Tensor& hpsi_out, ct::Tensor& hsub_out) { // gemm: hsub_out(n_band x n_band) = psi_out^T(n_band x n_basis) * psi_out(n_basis x n_band) this->pmmcn.multiply(1.0, psi_out.data(), psi_out.data(), 0.0, hsub_out.data()); - + // set hsub matrix to lower format; ct::kernels::set_matrix()( 'L', hsub_out.data(), this->n_band); @@ -209,7 +209,8 @@ void DiagoBPCG::diag_hsub( // gemm: hsub_out(n_band x n_band) = hpsi_in^T(n_band x n_basis) * psi_in(n_basis x n_band) this->pmmcn.multiply(1.0, hpsi_in.data(), psi_in.data(), 0.0, hsub_out.data()); - ct::kernels::lapack_heevd()('V', 'U', hsub_out.data(), this->n_band, eigenvalue_out.data()); + // ct::kernels::lapack_heevd()('V', 'U', hsub_out.data(), this->n_band, eigenvalue_out.data()); + ct::kernels::lapack_heevd()(this->n_band, hsub_out.data(), this->n_band, eigenvalue_out.data()); return; } @@ -235,15 +236,15 @@ void DiagoBPCG::calc_hsub_with_block( // hpsi_out[n_basis, n_band] = psi_out[n_basis, n_band] x hsub_out[n_band, n_band] this->rotate_wf(hsub_out, psi_out, workspace_in); this->rotate_wf(hsub_out, hpsi_out, workspace_in); - + return; } template void DiagoBPCG::calc_hsub_with_block_exit( - ct::Tensor& psi_out, + ct::Tensor& psi_out, ct::Tensor& hpsi_out, - ct::Tensor& hsub_out, + ct::Tensor& hsub_out, ct::Tensor& workspace_in, ct::Tensor& eigenvalue_out) { diff --git a/source/source_hsolver/diago_cg.cpp b/source/source_hsolver/diago_cg.cpp index 1a72774303..564c36e74b 100644 --- a/source/source_hsolver/diago_cg.cpp +++ b/source/source_hsolver/diago_cg.cpp @@ -171,6 +171,7 @@ void DiagoCG::diag_once(const ct::Tensor& prec_in, { ++this->notconv_; } + iter_band.push_back(iter); avg += static_cast(iter) + 1.00; // reorder eigenvalue if they are not in the right order @@ -575,7 +576,7 @@ bool DiagoCG::test_exit_cond(const int& ntry, const int& notconv) con } template -void DiagoCG::diag(const Func& hpsi_func, +double DiagoCG::diag(const Func& hpsi_func, const Func& spsi_func, ct::Tensor& psi, ct::Tensor& eigen, @@ -626,6 +627,20 @@ void DiagoCG::diag(const Func& hpsi_func, psi.zero(); // copy psi_temp to psi for 0 to npw. psi.sync(psi_temp); + +#ifdef __DEBUG +// only output iter count for each band if DEBUG! +// this should not be output in production log + std::cout << "\n DiagoCG::diag' avg_iter_ = " << avg_iter_; + std::cout << "\n DiagoCG::diag' iter_band = "; + for (auto iter_in_band : iter_band) + { + std::cout << iter_in_band << " "; + } + std::cout << "\n"; +#endif + + return avg_iter_; } namespace hsolver @@ -644,4 +659,4 @@ template class DiagoCG; template class DiagoCG; #endif #endif -} // namespace hsolver \ No newline at end of file +} // namespace hsolver diff --git a/source/source_hsolver/diago_cg.h b/source/source_hsolver/diago_cg.h index 20a5890552..bf03cb5850 100644 --- a/source/source_hsolver/diago_cg.h +++ b/source/source_hsolver/diago_cg.h @@ -2,6 +2,7 @@ #define MODULE_HSOLVER_DIAGO_CG_H_ #include +#include #include #include @@ -35,13 +36,14 @@ class DiagoCG final const Real& pw_diag_thr, const int& pw_diag_nmax, const int& nproc_in_pool); - + ~DiagoCG(); // virtual void init(){}; // refactor hpsi_info // this is the diag() function for CG method - void diag(const Func& hpsi_func, + // returns avg_iter + double diag(const Func& hpsi_func, const Func& spsi_func, ct::Tensor& psi, ct::Tensor& eigen, @@ -59,7 +61,9 @@ class DiagoCG final /// col size for input psi matrix int n_basis_ = 0; /// average iteration steps for cg diagonalization - int avg_iter_ = 0; + double avg_iter_ = 0; + /// std::vector for iter count of each band + std::vector iter_band; /// threshold for cg diagonalization Real pw_diag_thr_ = 1e-5; /// maximum iteration steps for cg diagonalization @@ -87,15 +91,15 @@ class DiagoCG final ct::Tensor& pphi); void orth_grad( - const ct::Tensor& psi, - const int& m, - ct::Tensor& grad, + const ct::Tensor& psi, + const int& m, + ct::Tensor& grad, ct::Tensor& scg, ct::Tensor& lagrange); void calc_gamma_cg( const int& iter, - const Real& cg_norm, + const Real& cg_norm, const Real& theta, const ct::Tensor& prec, const ct::Tensor& scg, @@ -110,8 +114,8 @@ class DiagoCG final const ct::Tensor& cg, const ct::Tensor& scg, const double& ethreshold, - Real &cg_norm, - Real &theta, + Real &cg_norm, + Real &theta, Real &eigen, ct::Tensor& phi_m, ct::Tensor& sphi, @@ -133,4 +137,4 @@ class DiagoCG final } // namespace hsolver -#endif // MODULE_HSOLVER_DIAGO_CG_H_ \ No newline at end of file +#endif // MODULE_HSOLVER_DIAGO_CG_H_ diff --git a/source/source_hsolver/diago_dav_subspace.cpp b/source/source_hsolver/diago_dav_subspace.cpp index 5a525bd78d..27c6a5b348 100644 --- a/source/source_hsolver/diago_dav_subspace.cpp +++ b/source/source_hsolver/diago_dav_subspace.cpp @@ -77,7 +77,7 @@ Diago_DavSubspace::Diago_DavSubspace(const std::vector& precond if (this->device == base_device::GpuDevice) { resmem_real_op()(this->d_precondition, nbasis_in); - // syncmem_var_h2d_op()(this->ctx, this->cpu_ctx, this->d_precondition, this->precondition.data(), nbasis_in); + syncmem_var_h2d_op()(this->d_precondition, this->precondition.data(), nbasis_in); resmem_complex_op()(this->d_scc, this->nbase_x * this->nbase_x); resmem_real_op()(this->d_eigenvalue, this->nbase_x); } @@ -295,6 +295,8 @@ void Diago_DavSubspace::cal_grad(const HPsiFunc& hpsi_func, } } + if (notconv > 1){ + #ifdef __DSP ModuleBase::gemm_op_mt() #else @@ -313,6 +315,28 @@ void Diago_DavSubspace::cal_grad(const HPsiFunc& hpsi_func, this->zero, psi_iter + (nbase) * this->dim, this->dim); + } else + { + +#ifdef __DSP + ModuleBase::gemv_op_mt() +#else + ModuleBase::gemv_op() +#endif + ('N', + this->dim, // m: row of A + nbase, // n: col of A + this->one, // alpha + hpsi, // A dim * nbase + this->dim, // LDA: if(N) max(1,m) + vcc, // X nbase + 1, // incx + this->zero, // beta + psi_iter + (nbase) * this->dim, // Y dim + 1 // incy + ); + } + // Eigenvalues operation section Real* e_temp_hd = eigenvalue_iter->data(); @@ -323,7 +347,9 @@ void Diago_DavSubspace::cal_grad(const HPsiFunc& hpsi_func, } // vcc = - vcc * eigenvalue - ModuleBase::matrix_mul_vector_op()(nbase, notconv, vcc, this->nbase_x, eigenvalue_iter->data(), -1.0, vcc, this->nbase_x); + ModuleBase::matrix_mul_vector_op()(nbase, notconv, vcc, this->nbase_x, e_temp_hd, -1.0, vcc, this->nbase_x); + + if (notconv > 1){ #ifdef __DSP ModuleBase::gemm_op_mt() @@ -343,6 +369,26 @@ void Diago_DavSubspace::cal_grad(const HPsiFunc& hpsi_func, this->one, psi_iter + nbase * this->dim, this->dim); + } else + { +#ifdef __DSP + ModuleBase::gemv_op_mt() +#else + ModuleBase::gemv_op() +#endif + ('N', + this->dim, // m: row of A + nbase, // n: col of A + this->one, // alpha + spsi, // A dim * nbase + this->dim, // LDA: if(N) max(1,m) + vcc, // X nbase + 1, // incx + this->one, // beta + psi_iter + nbase * this->dim, // Y dim + 1 // incy + ); + } // Precondition section #if defined(__CUDA) || defined(__ROCM) @@ -413,6 +459,7 @@ void Diago_DavSubspace::cal_elem(const int& dim, { ModuleBase::timer::tick("Diago_DavSubspace", "cal_elem"); + if (notconv > 1){ #ifdef __DSP ModuleBase::gemm_op_mt() #else @@ -451,6 +498,46 @@ void Diago_DavSubspace::cal_elem(const int& dim, &scc[nbase * this->nbase_x], this->nbase_x); + } else { + +#ifdef __DSP + ModuleBase::gemv_op_mt() +#else + ModuleBase::gemv_op() +#endif + ('C', + this->dim, // m: row of A + nbase + notconv, // n: col of A + this->one, // alpha + psi_iter, // A dim * nbase + this->dim, // LDA: if(N) max(1,m) + &hpsi[nbase * this->dim], // X nbase + 1, // incx + this->zero, // beta + &hcc[nbase * this->nbase_x], // Y dim + 1 // incy + ); +#ifdef __DSP + ModuleBase::gemv_op_mt() +#else + ModuleBase::gemv_op() +#endif + ('C', + this->dim, // m: row of A + nbase + notconv, // n: col of A + this->one, // alpha + psi_iter, // A dim * nbase + this->dim, // LDA: if(N) max(1,m) + spsi + nbase * this->dim, // X nbase + 1, // incx + this->zero, // beta + &scc[nbase * this->nbase_x], // Y dim + 1 // incy + ); + + } + + #ifdef __MPI if (this->diag_comm.nproc > 1) { diff --git a/source/source_hsolver/diago_david.cpp b/source/source_hsolver/diago_david.cpp index bf390104af..ef4ba67cf3 100644 --- a/source/source_hsolver/diago_david.cpp +++ b/source/source_hsolver/diago_david.cpp @@ -351,7 +351,24 @@ void DiagoDavid::cal_grad(const HPsiFunc& hpsi_func, // basis[nbase] = hpsi * vc_ev_vector = hpsi*vcc // basis' = vc_ev_vector' * hpsi' // (dim, notconv) (dim, nbase) (nbase, notconv) - ModuleBase::gemm_op()('N', + if (notconv == 1){ + //Reuse gemv for vector case to avoid potential bug using gemm call with n=1 + ModuleBase::gemv_op()('N', + dim, // m: row of A + nbase, // n: col of A + this->one, // alpha + hpsi, // A dim * nbase + dim, // LDA: if(N) max(1,m) + vc_ev_vector, // X nbase + 1, // incx + this->zero, // beta + basis + dim * nbase, // Y dim + 1 // incy + ); + + }else + { + ModuleBase::gemm_op()('N', 'N', dim, // m: row of A,C notconv, // n: col of B,C @@ -364,7 +381,8 @@ void DiagoDavid::cal_grad(const HPsiFunc& hpsi_func, this->zero, // belta basis + dim * nbase, // C dim * notconv dim // LDC: if(N) max(1, m) - ); + ); + } //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // for (int m = 0; m < notconv; m++) @@ -411,20 +429,37 @@ void DiagoDavid::cal_grad(const HPsiFunc& hpsi_func, // = (H - lambda * S) * psi * vcc // = (H - lambda * S) * psi_new //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - ModuleBase::gemm_op()('N', - 'N', - dim, // m: row of A,C - notconv, // n: col of B,C - nbase, // k: col of A, row of B - this->one, // alpha - spsi, // A - dim, // LDA: if(N) max(1,m) if(T) max(1,k) - vc_ev_vector, // B - nbase, // LDB: if(N) max(1,k) if(T) max(1,n) - this->one, // belta - basis + dim * nbase, // C dim * notconv - dim // LDC: if(N) max(1, m) - ); + if (notconv == 1){ + //Use gemv for vector case to avoid potential bug using gemm call with n=1 + ModuleBase::gemv_op()('N', + dim, // m: row of A + nbase, // n: col of A + this->one, // alpha + spsi, // A dim * nbase + dim, // LDA: if(N) max(1,m) + vc_ev_vector, // X nbase + 1, // incx + this->one, // beta + basis + dim * nbase, // Y dim + 1 //incy + ); + } else + { + ModuleBase::gemm_op()('N', + 'N', + dim, // m: row of A,C + notconv, // n: col of B,C + nbase, // k: col of A, row of B + this->one, // alpha + spsi, // A + dim, // LDA: if(N) max(1,m) if(T) max(1,k) + vc_ev_vector, // B + nbase, // LDB: if(N) max(1,k) if(T) max(1,n) + this->one, // beta + basis + dim * nbase, // C dim * notconv + dim // LDC: if(N) max(1, m) + ); + } //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // Preconditioning @@ -478,20 +513,37 @@ void DiagoDavid::cal_grad(const HPsiFunc& hpsi_func, // first nbase bands psi* dot notconv bands spsi to prepare lagrange_matrix // calculate the square matrix for future lagranges - ModuleBase::gemm_op()('C', - 'N', - nbase, // m: row of A,C - notconv, // n: col of B,C - dim, // k: col of A, row of B - this->one, // alpha - basis, // A - dim, // LDA: if(N) max(1,m) if(T) max(1,k) - &spsi[nbase * dim], // B - dim, // LDB: if(N) max(1,k) if(T) max(1,n) - this->zero, // belta - lagrange, // C - nbase + notconv // LDC: if(N) max(1, m) - ); + if (notconv == 1){ + //Use gemv for vector case to avoid potential bug using gemm call with n=1 + ModuleBase::gemv_op()('C', + dim, // m: row of A + nbase, // n: col of A + this->one, // alpha + basis, // A dim * nbase + dim, // LDA: if(N) max(1,m) + &spsi[nbase * dim], // X dim + 1, // incx + this->zero, // beta + lagrange, // Y nbase + 1 + ); + } else + { + ModuleBase::gemm_op()('C', + 'N', + nbase, // m: row of A,C + notconv, // n: col of B,C + dim, // k: col of A, row of B + this->one, // alpha + basis, // A + dim, // LDA: if(N) max(1,m) if(T) max(1,k) + &spsi[nbase * dim], // B + dim, // LDB: if(N) max(1,k) if(T) max(1,n) + this->zero, // belta + lagrange, // C + nbase + notconv // LDC: if(N) max(1, m) + ); + } for (int m = 0; m < notconv; m++) { diff --git a/source/source_hsolver/diago_elpa_native.cpp b/source/source_hsolver/diago_elpa_native.cpp index f320191d28..dc4bf2b6d7 100644 --- a/source/source_hsolver/diago_elpa_native.cpp +++ b/source/source_hsolver/diago_elpa_native.cpp @@ -77,7 +77,7 @@ void DiagoElpaNative::diag_pool(hamilt::MatrixBlock& h_mat, } // elpa_init(20210430); - int success; + int success = 0; elpa_t handle = elpa_allocate(&success); #ifdef _OPENMP int num_threads = omp_get_max_threads(); diff --git a/source/source_hsolver/diago_iter_assist.cpp b/source/source_hsolver/diago_iter_assist.cpp index dc7ce63b43..fb87ad2350 100644 --- a/source/source_hsolver/diago_iter_assist.cpp +++ b/source/source_hsolver/diago_iter_assist.cpp @@ -422,7 +422,7 @@ template void DiagoIterAssist::diag_hegvd(const int nstart, const int nbands, const T *hcc, - const T *scc, + T *scc, const int ldh, // nstart Real *e, // always in CPU T *vcc) @@ -540,7 +540,7 @@ void DiagoIterAssist::cal_hs_subspace(const hamilt::Hamilt template void DiagoIterAssist::diag_responce( const T* hcc, - const T* scc, + T* scc, const int nbands, const T* mat_in, // [out] target matrix to be multiplied T* mat_out, @@ -583,7 +583,7 @@ void DiagoIterAssist::diag_responce( const T* hcc, template void DiagoIterAssist::diag_subspace_psi(const T* hcc, - const T* scc, + T* scc, const int dim_subspace, psi::Psi& evc, Real* en diff --git a/source/source_hsolver/diago_iter_assist.h b/source/source_hsolver/diago_iter_assist.h index 7978321147..2867b50b5c 100644 --- a/source/source_hsolver/diago_iter_assist.h +++ b/source/source_hsolver/diago_iter_assist.h @@ -80,7 +80,7 @@ class DiagoIterAssist static void diag_hegvd(const int nstart, const int nbands, const T *hcc, - const T *sc, + T *sc, const int ldh, // nstart Real *e, T *vcc); @@ -104,7 +104,7 @@ class DiagoIterAssist /// @param mat_col : number of columns of target matrix /// @param en : eigenvalues static void diag_responce(const T* hcc, - const T* scc, + T* scc, const int nbands, const T* mat_in, T* mat_out, @@ -113,7 +113,7 @@ class DiagoIterAssist /// @brief calculate the response wavefunction psi from rotation matrix solved by diagonalization of H and S matrix static void diag_subspace_psi(const T* hcc, - const T* scc, + T* scc, const int dim_subspace, psi::Psi& evc, Real* en); diff --git a/source/source_hsolver/diago_lapack.cpp b/source/source_hsolver/diago_lapack.cpp index 90018c288d..996115fa69 100644 --- a/source/source_hsolver/diago_lapack.cpp +++ b/source/source_hsolver/diago_lapack.cpp @@ -7,8 +7,8 @@ #include "source_base/global_variable.h" #include "source_base/module_external/lapack_connector.h" #include "source_base/timer.h" +#include #include "source_base/tool_quit.h" -#include "source_pw/module_pwdft/global.h" typedef hamilt::MatrixBlock matd; typedef hamilt::MatrixBlock> matcd; @@ -30,12 +30,10 @@ void DiagoLapack::diag(hamilt::Hamilt* phm_in, psi::Psi& // Diag this->dsygvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi); // Copy result - int size = eigen.size(); - for (int i = 0; i < size; i++) - { - eigenvalue_in[i] = eigen[i]; - } + const int inc = 1; + BlasConnector::copy(PARAM.inp.nbands, eigen.data(), inc, eigenvalue_in, inc); } + template <> void DiagoLapack>::diag(hamilt::Hamilt>* phm_in, psi::Psi>& psi, @@ -48,109 +46,152 @@ void DiagoLapack>::diag(hamilt::Hamilt std::vector eigen(PARAM.globalv.nlocal, 0.0); this->zhegvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi); - int size = eigen.size(); - for (int i = 0; i < size; i++) - { - eigenvalue_in[i] = eigen[i]; - } + const int inc = 1; + BlasConnector::copy(PARAM.inp.nbands, eigen.data(), inc, eigenvalue_in, inc); +} + +#ifdef __MPI + template<> + void DiagoLapack::diag_pool(hamilt::MatrixBlock& h_mat, + hamilt::MatrixBlock& s_mat, + psi::Psi& psi, + Real* eigenvalue_in, + MPI_Comm& comm) +{ + ModuleBase::TITLE("DiagoLapack", "diag_pool"); + assert(h_mat.col == s_mat.col && h_mat.row == s_mat.row && h_mat.desc == s_mat.desc); + std::vector eigen(PARAM.globalv.nlocal, 0.0); + this->dsygvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi); + const int inc = 1; + BlasConnector::copy(PARAM.inp.nbands, eigen.data(), inc, eigenvalue_in, inc); +} + template<> + void DiagoLapack>::diag_pool(hamilt::MatrixBlock>& h_mat, + hamilt::MatrixBlock>& s_mat, + psi::Psi>& psi, + Real* eigenvalue_in, + MPI_Comm& comm) +{ + ModuleBase::TITLE("DiagoLapack", "diag_pool"); + assert(h_mat.col == s_mat.col && h_mat.row == s_mat.row && h_mat.desc == s_mat.desc); + std::vector eigen(PARAM.globalv.nlocal, 0.0); + this->zhegvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi); + const int inc = 1; + BlasConnector::copy(PARAM.inp.nbands, eigen.data(), inc, eigenvalue_in, inc); } +#endif template -int DiagoLapack::dsygvx_once(const int ncol, +std::pair> DiagoLapack::dsygvx_once(const int ncol, const int nrow, const double* const h_mat, const double* const s_mat, double* const ekb, psi::Psi& wfc_2d) const { - // Copy matrix to temp variables ModuleBase::matrix h_tmp(ncol, nrow, false); memcpy(h_tmp.c, h_mat, sizeof(double) * ncol * nrow); - - ModuleBase::matrix s_tmp(ncol, nrow, false); memcpy(s_tmp.c, s_mat, sizeof(double) * ncol * nrow); - // Prepare caculate parameters const char jobz = 'V', range = 'I', uplo = 'U'; const int itype = 1, il = 1, iu = PARAM.inp.nbands, one = 1; - int M = 0, info = 0; + int M = 0, NZ = 0, lwork = -1, liwork = -1, info = 0; double vl = 0, vu = 0; - const double abstol = 0; - - int lwork = (ncol + 2) * ncol; - + const double abstol = 0, orfac = -1; std::vector work(3, 0); std::vector iwork(1, 0); std::vector ifail(PARAM.globalv.nlocal, 0); - - // Original Lapack caculate, obelsete - /*dsygvx_(&itype, - &jobz, - &range, - &uplo, - &PARAM.globalv.nlocal, - h_tmp.c, - &ncol, - s_tmp.c, - &ncol, - &vl, - &vu, - &il, - &iu, - &abstol, - &M, - ekb, - wfc_2d.get_pointer(), - &ncol, - work.data(), - &lwork, - iwork.data(), - ifail.data(), - &info); - - // Throw error if it returns info - if (info) + std::vector iclustr(2 * GlobalV::DSIZE); + std::vector gap(GlobalV::DSIZE); + + // LAPACK dsygvx signature: + // (ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, + // ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO) + int n = PARAM.globalv.nlocal; + int lda = n, ldb = n, ldz = n; + dsygvx_(&itype, + &jobz, + &range, + &uplo, + &n, + h_tmp.c, + &lda, + s_tmp.c, + &ldb, + &vl, + &vu, + &il, + &iu, + &abstol, + &M, + ekb, + wfc_2d.get_pointer(), + &ldz, + work.data(), + &lwork, + iwork.data(), + ifail.data(), + &info); + if (info) { throw std::runtime_error("info = " + ModuleBase::GlobalFunc::TO_STRING(info) + ".\n" + std::string(__FILE__) + " line " + std::to_string(__LINE__)); - //lwork = work[0]; - //work.resize(std::max(lwork, 3), 0); - //iwork.resize(iwork[0], 0); - - dsygvx_(&itype, - &jobz, - &range, - &uplo, - &PARAM.globalv.nlocal, - h_tmp.c, - &PARAM.globalv.nlocal, - s_tmp.c, - &PARAM.globalv.nlocal, - &vl, - &vu, - &il, - &iu, - &abstol, - &M, - ekb, - wfc_2d.get_pointer(), - &ncol, - work.data(), - &lwork, - iwork.data(), - ifail.data(), - &info);*/ - - double *ev = new double[ncol * ncol]; + } - dsygv_(&itype, &jobz, &uplo, &PARAM.globalv.nlocal, h_tmp.c, &ncol, s_tmp.c, &ncol, ekb, ev, &lwork, &info); + // Query returned optimal lwork in work[0] + lwork = static_cast(work[0]); + work.resize(std::max(lwork, 3), 0); + // LAPACK integer workspace: use conservative size (5*N) + liwork = std::max(1, 5 * n); + iwork.resize(liwork, 0); - return info; + dsygvx_(&itype, + &jobz, + &range, + &uplo, + &n, + h_tmp.c, + &lda, + s_tmp.c, + &ldb, + &vl, + &vu, + &il, + &iu, + &abstol, + &M, + ekb, + wfc_2d.get_pointer(), + &ldz, + work.data(), + &lwork, + iwork.data(), + ifail.data(), + &info); + // GlobalV::ofs_running<<"M="<{}); + } else if (info < 0) { + return std::make_pair(info, std::vector{}); + } else if (info % 2) { + return std::make_pair(info, ifail); + } else if (info / 2 % 2) { + return std::make_pair(info, iclustr); + } else if (info / 4 % 2) { + return std::make_pair(info, std::vector{M, NZ}); + } else if (info / 16 % 2) { + return std::make_pair(info, ifail); + } else { + throw std::runtime_error("info = " + ModuleBase::GlobalFunc::TO_STRING(info) + ".\n" + + std::string(__FILE__) + " line " + + std::to_string(__LINE__)); + } } template -int DiagoLapack::zhegvx_once(const int ncol, +std::pair> DiagoLapack::zhegvx_once(const int ncol, const int nrow, const std::complex* const h_mat, const std::complex* const s_mat, @@ -159,95 +200,110 @@ int DiagoLapack::zhegvx_once(const int ncol, { ModuleBase::ComplexMatrix h_tmp(ncol, nrow, false); memcpy(h_tmp.c, h_mat, sizeof(std::complex) * ncol * nrow); - ModuleBase::ComplexMatrix s_tmp(ncol, nrow, false); memcpy(s_tmp.c, s_mat, sizeof(std::complex) * ncol * nrow); const char jobz = 'V', range = 'I', uplo = 'U'; const int itype = 1, il = 1, iu = PARAM.inp.nbands, one = 1; - int M = 0, lrwork = -1, info = 0; - const double abstol = 0; - - int lwork = (ncol + 2) * ncol; - + int M = 0, NZ = 0, lwork = -1, lrwork = -1, liwork = -1, info = 0; + const double abstol = 0, orfac = -1; + const double vl = 0, vu = 0; std::vector> work(1, 0); - double *rwork = new double[3 * ncol - 2]; + std::vector rwork(3, 0); std::vector iwork(1, 0); std::vector ifail(PARAM.globalv.nlocal, 0); - - // Original Lapack caculate, obelsete - /* + std::vector iclustr(2 * GlobalV::DSIZE); + std::vector gap(GlobalV::DSIZE); + + // LAPACK zhegvx signature: + // (ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, + // ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK, IWORK, IFAIL, INFO) + int n = PARAM.globalv.nlocal; + int lda = n, ldb = n, ldz = n; zhegvx_(&itype, - &jobz, - &range, - &uplo, - &PARAM.globalv.nlocal, - h_tmp.c, - &PARAM.globalv.nlocal, - s_tmp.c, - &PARAM.globalv.nlocal, - &vl, - &vu, - &il, - &iu, - &abstol, - &M, - ekb, - wfc_2d.get_pointer(), - &ncol, - work.data(), - &lwork, - rwork.data(), - iwork.data(), - ifail.data(), - &info); - - if (info) + &jobz, + &range, + &uplo, + &n, + h_tmp.c, + &lda, + s_tmp.c, + &ldb, + &vl, + &vu, + &il, + &iu, + &abstol, + &M, + ekb, + wfc_2d.get_pointer(), + &ldz, + work.data(), + &lwork, + rwork.data(), + iwork.data(), + ifail.data(), + &info); + if (info) { throw std::runtime_error("info=" + ModuleBase::GlobalFunc::TO_STRING(info) + ". " + std::string(__FILE__) + " line " + std::to_string(__LINE__)); + } - // GlobalV::ofs_running<<"lwork="<(work[0].real()); + work.resize(std::max(lwork, 1), 0); + // rwork: choose conservative size. Use baseline 7*N plus degeneracy margin + lrwork = std::max(3, 7 * n + this->degeneracy_max * n); + rwork.resize(lrwork, 0); + // LAPACK integer workspace: use conservative size (5*N) + liwork = std::max(1, 5 * n); + iwork.resize(liwork, 0); zhegvx_(&itype, - &jobz, - &range, - &uplo, - &PARAM.globalv.nlocal, - h_tmp.c, - &PARAM.globalv.nlocal, - s_tmp.c, - &PARAM.globalv.nlocal, - &vl, - &vu, - &il, - &iu, - &abstol, - &M, - ekb, - wfc_2d.get_pointer(), - &ncol, - work.data(), - &lwork, - rwork.data(), - iwork.data(), - ifail.data(), - &info); - - */ - - std::complex *ev = new std::complex[ncol * ncol]; - - zhegv_(&itype, &jobz, &uplo, &PARAM.globalv.nlocal, h_tmp.c, &ncol, s_tmp.c, &ncol, ekb, ev, &lwork, rwork, &info); - - return info; + &jobz, + &range, + &uplo, + &n, + h_tmp.c, + &lda, + s_tmp.c, + &ldb, + &vl, + &vu, + &il, + &iu, + &abstol, + &M, + ekb, + wfc_2d.get_pointer(), + &ldz, + work.data(), + &lwork, + rwork.data(), + iwork.data(), + ifail.data(), + &info); + // GlobalV::ofs_running<<"M="<{}); + } else if (info < 0) { + return std::make_pair(info, std::vector{}); + } else if (info % 2) { + return std::make_pair(info, ifail); + } else if (info / 2 % 2) { + return std::make_pair(info, iclustr); + } else if (info / 4 % 2) { + return std::make_pair(info, std::vector{M, NZ}); + } else if (info / 16 % 2) { + return std::make_pair(info, ifail); + } else { + throw std::runtime_error("info = " + ModuleBase::GlobalFunc::TO_STRING(info) + ".\n" + + std::string(__FILE__) + " line " + + std::to_string(__LINE__)); + } } template @@ -260,9 +316,9 @@ void DiagoLapack::dsygvx_diag(const int ncol, { while (true) { - - int info_result = dsygvx_once(ncol, nrow, h_mat, s_mat, ekb, wfc_2d); - if (info_result == 0) { + const std::pair> info_vec = dsygvx_once(ncol, nrow, h_mat, s_mat, ekb, wfc_2d); + post_processing(info_vec.first, info_vec.second); + if (info_vec.first == 0) { break; } } @@ -278,8 +334,9 @@ void DiagoLapack::zhegvx_diag(const int ncol, { while (true) { - int info_result = zhegvx_once(ncol, nrow, h_mat, s_mat, ekb, wfc_2d); - if (info_result == 0) { + const std::pair> info_vec = zhegvx_once(ncol, nrow, h_mat, s_mat, ekb, wfc_2d); + post_processing(info_vec.first, info_vec.second); + if (info_vec.first == 0) { break; } } @@ -297,5 +354,60 @@ void DiagoLapack::post_processing(const int info, const std::vector& vec { return; } + else if (info < 0) + { + const int info_negative = -info; + const std::string str_index + = (info_negative > 100) + ? ModuleBase::GlobalFunc::TO_STRING(info_negative / 100) + "-th argument " + + ModuleBase::GlobalFunc::TO_STRING(info_negative % 100) + "-entry is illegal.\n" + : ModuleBase::GlobalFunc::TO_STRING(info_negative) + "-th argument is illegal.\n"; + throw std::runtime_error(str_info_FILE + str_index); + } + else if (info % 2) + { + std::string str_ifail = "ifail = "; + for (const int i: vec) { + str_ifail += ModuleBase::GlobalFunc::TO_STRING(i) + " "; + } + throw std::runtime_error(str_info_FILE + str_ifail); + } + else if (info / 2 % 2) + { + int degeneracy_need = 0; + for (int irank = 0; irank < GlobalV::DSIZE; ++irank) { + degeneracy_need = std::max(degeneracy_need, vec[2 * irank + 1] - vec[2 * irank]); + } + const std::string str_need = "degeneracy_need = " + ModuleBase::GlobalFunc::TO_STRING(degeneracy_need) + ".\n"; + const std::string str_saved + = "degeneracy_saved = " + ModuleBase::GlobalFunc::TO_STRING(this->degeneracy_max) + ".\n"; + if (degeneracy_need <= this->degeneracy_max) + { + throw std::runtime_error(str_info_FILE + str_need + str_saved); + } + else + { + GlobalV::ofs_running << str_need << str_saved; + this->degeneracy_max = degeneracy_need; + return; + } + } + else if (info / 4 % 2) + { + const std::string str_M = "M = " + ModuleBase::GlobalFunc::TO_STRING(vec[0]) + ".\n"; + const std::string str_NZ = "NZ = " + ModuleBase::GlobalFunc::TO_STRING(vec[1]) + ".\n"; + const std::string str_NBANDS + = "PARAM.inp.nbands = " + ModuleBase::GlobalFunc::TO_STRING(PARAM.inp.nbands) + ".\n"; + throw std::runtime_error(str_info_FILE + str_M + str_NZ + str_NBANDS); + } + else if (info / 16 % 2) + { + const std::string str_npos = "not positive definite = " + ModuleBase::GlobalFunc::TO_STRING(vec[0]) + ".\n"; + throw std::runtime_error(str_info_FILE + str_npos); + } + else + { + throw std::runtime_error(str_info_FILE); + } } -} // namespace hsolver \ No newline at end of file +} // namespace hsolver diff --git a/source/source_hsolver/diago_lapack.h b/source/source_hsolver/diago_lapack.h index 53b710ae63..bfdf78ac34 100644 --- a/source/source_hsolver/diago_lapack.h +++ b/source/source_hsolver/diago_lapack.h @@ -27,6 +27,10 @@ class DiagoLapack public: void diag(hamilt::Hamilt* phm_in, psi::Psi& psi, Real* eigenvalue_in); + #ifdef __MPI + // diagnolization used in parallel-k case + void diag_pool(hamilt::MatrixBlock& h_mat, hamilt::MatrixBlock& s_mat, psi::Psi& psi, Real* eigenvalue_in, MPI_Comm& comm); +#endif void dsygvx_diag(const int ncol, const int nrow, @@ -41,18 +45,18 @@ class DiagoLapack double* const ekb, psi::Psi>& wfc_2d); - int dsygvx_once(const int ncol, - const int nrow, - const double* const h_mat, - const double* const s_mat, - double* const ekb, - psi::Psi& wfc_2d) const; - int zhegvx_once(const int ncol, - const int nrow, - const std::complex* const h_mat, - const std::complex* const s_mat, - double* const ekb, - psi::Psi>& wfc_2d) const; + std::pair> dsygvx_once(const int ncol, + const int nrow, + const double* const h_mat, + const double* const s_mat, + double* const ekb, + psi::Psi& wfc_2d) const; + std::pair> zhegvx_once(const int ncol, + const int nrow, + const std::complex* const h_mat, + const std::complex* const s_mat, + double* const ekb, + psi::Psi>& wfc_2d) const; int degeneracy_max = 12; // For reorthogonalized memory. 12 followes siesta. diff --git a/source/source_hsolver/hsolver_lcao.cpp b/source/source_hsolver/hsolver_lcao.cpp index a9d940216b..6b3abd325e 100644 --- a/source/source_hsolver/hsolver_lcao.cpp +++ b/source/source_hsolver/hsolver_lcao.cpp @@ -3,10 +3,10 @@ #ifdef __MPI #include "diago_scalapack.h" #include "source_base/module_external/scalapack_connector.h" -#else -#include "diago_lapack.h" #endif +#include "diago_lapack.h" + #ifdef __CUSOLVERMP #include "diago_cusolvermp.h" #endif @@ -25,6 +25,7 @@ #endif #include "source_base/global_variable.h" +#include "source_base/module_device/device.h" #include "source_estate/elecstate_tools.h" #include "source_base/memory.h" #include "source_base/timer.h" @@ -34,13 +35,18 @@ #include "source_hsolver/parallel_k2d.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/rho_tau_lcao.h" // mohan add 20251024 + namespace hsolver { -template -void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, - psi::Psi& psi, - elecstate::ElecState* pes, +template +void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, + psi::Psi& psi, + elecstate::ElecState* pes, + elecstate::DensityMatrix& dm, // mohan add 2025-11-03 + Charge &chr, + const int nspin, const bool skip_charge) { ModuleBase::TITLE("HSolverLCAO", "solve"); @@ -56,7 +62,7 @@ void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, }else #endif if (PARAM.globalv.kpar_lcao > 1 - && (this->method == "genelpa" || this->method == "elpa" || this->method == "scalapack_gvx")) + && (this->method == "genelpa" || this->method == "elpa" || this->method == "scalapack_gvx" || this->method == "lapack")) { this->parakSolve(pHamilt, psi, pes, PARAM.globalv.kpar_lcao); } else @@ -90,16 +96,14 @@ void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, pes->nelec_spin, pes->skip_weights); - auto _pes_lcao = dynamic_cast*>(pes); - elecstate::calEBand(_pes_lcao->ekb, _pes_lcao->wg, _pes_lcao->f_en); - elecstate::cal_dm_psi(_pes_lcao->DM->get_paraV_pointer(), _pes_lcao->wg, psi, *(_pes_lcao->DM)); - _pes_lcao->DM->cal_DMR(); + elecstate::calEBand(pes->ekb, pes->wg, pes->f_en); + elecstate::cal_dm_psi(dm.get_paraV_pointer(), pes->wg, psi, dm); + dm.cal_DMR(); if (!skip_charge) { - // used in scf calculation - // calculate charge by eigenpairs(eigenvalues and eigenvectors) - pes->psiToRho(psi); + // compute charge density from density matrix, mohan update 20251024 + LCAO_domain::dm2rho(dm.get_DMR_vector(), nspin, &chr); } else { @@ -109,7 +113,7 @@ void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, else if (this->method == "pexsi") { #ifdef __PEXSI // other purification methods should follow this routine - DiagoPexsi pe(ParaV); + DiagoPexsi pe(ParaV); for (int ik = 0; ik < psi.get_nk(); ++ik) { /// update H(k) for each k point @@ -118,10 +122,10 @@ void HSolverLCAO::solve(hamilt::Hamilt* pHamilt, // solve eigenvector and eigenvalue for H(k) pe.diag(pHamilt, psi, nullptr); } - auto _pes = dynamic_cast*>(pes); + auto _pes = dynamic_cast*>(pes); pes->f_en.eband = pe.totalFreeEnergy; // maybe eferm could be dealt with in the future - _pes->dmToRho(pe.DM, pe.EDM); + _pes->dm2rho(pe.DM, pe.EDM, &dm); #endif } @@ -171,13 +175,11 @@ void HSolverLCAO::hamiltSolvePsiK(hamilt::Hamilt* hm, psi::Psi& } #endif #endif -#ifndef __MPI else if (this->method == "lapack") // only for single core { DiagoLapack la; la.diag(hm, psi, eigenvalue); } -#endif else { ModuleBase::WARNING_QUIT("HSolverLCAO::solve", "This method is not supported for lcao basis in ABACUS!"); @@ -253,6 +255,11 @@ void HSolverLCAO::parakSolve(hamilt::Hamilt* pHamilt, DiagoScalapack sa; sa.diag_pool(hk_pool, sk_pool, psi_pool, &(pes->ekb(ik_global, 0)), k2d.POOL_WORLD_K2D); } + else if (this->method == "lapack") + { + DiagoLapack la; + la.diag_pool(hk_pool, sk_pool, psi_pool, &(pes->ekb(ik_global, 0)), k2d.POOL_WORLD_K2D); + } #ifdef __ELPA else if (this->method == "genelpa") { @@ -311,57 +318,34 @@ void HSolverLCAO::parakSolve_cusolver(hamilt::Hamilt* pHamilt, elecstate::ElecState* pes) { ModuleBase::timer::tick("HSolverLCAO", "parakSolve"); - const int dev_id = base_device::information::set_device_by_rank(); + // GPU device is already bound by DeviceContext::init() in read_input.cpp + auto& dev_ctx = base_device::DeviceContext::instance(); + const int local_rank = dev_ctx.get_local_rank(); + const int device_count = dev_ctx.get_device_count(); int world_rank, world_size; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); MPI_Comm_size(MPI_COMM_WORLD, &world_size); - // Split communicator by shared memory node - MPI_Comm nodeComm; - MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, world_rank, MPI_INFO_NULL, &nodeComm); - - int local_rank, local_size; - MPI_Comm_rank(nodeComm, &local_rank); - MPI_Comm_size(nodeComm, &local_size); + // Determine if this process is active (assigned a dedicated GPU) + // We enforce 1 process per GPU by checking local_rank < device_count. + bool is_active = (local_rank < device_count); + int is_active_int = is_active ? 1 : 0; - // Get number of CUDA devices on this node - int device_count = 0; - cudaError_t cuda_err = cudaGetDeviceCount(&device_count); - if (cuda_err != cudaSuccess) { - device_count = 0; // Treat as no GPU available - } - - if(local_rank >= device_count) { - local_rank = -1; // Mark as inactive for GPU work - } - - // Determine the number of MPI processes on this node that can actively use a GPU. - // This is the minimum of: - // - The number of available MPI processes on the node (local_size) - // - The number of available CUDA-capable GPUs on the node (device_count) - // Each GPU is assumed to be used by one dedicated MPI process. - // Thus, only the first 'min(local_size, device_count)' ranks on this node - // will be assigned GPU work; the rest will be inactive or used for communication-only roles. - int active_procs_per_node = std::min(local_size, device_count); - - std::vector all_active_procs(world_size); std::vector all_local_ranks(world_size); + std::vector all_is_active(world_size); - MPI_Allgather(&active_procs_per_node, 1, MPI_INT, - all_active_procs.data(), 1, MPI_INT, MPI_COMM_WORLD); MPI_Allgather(&local_rank, 1, MPI_INT, all_local_ranks.data(), 1, MPI_INT, MPI_COMM_WORLD); - - int total_active_ranks = 0; - int total_nodes = 0; - int highest_active_rank = 0; + MPI_Allgather(&is_active_int, 1, MPI_INT, + all_is_active.data(), 1, MPI_INT, MPI_COMM_WORLD); + int total_active_ranks = 0; + int max_local_rank = 0; for (int i = 0; i < world_size; ++i) { - if (all_local_ranks[i] == 0) { // new node - total_nodes++; - total_active_ranks += all_active_procs[i]; - highest_active_rank = std::max(highest_active_rank, all_active_procs[i] - 1); + if (all_is_active[i]) { + total_active_ranks++; + if(all_local_ranks[i] > max_local_rank) max_local_rank = all_local_ranks[i]; } } @@ -370,11 +354,11 @@ void HSolverLCAO::parakSolve_cusolver(hamilt::Hamilt* pHamilt, // The k-points will be distributed among these ranks in a round-robin fashion. // The purpose of setting the order is to ensure load balancing among nodes as much as possible std::vector active_ranks; - for(int i = 0; i <= highest_active_rank; i++) + for(int r = 0; r <= max_local_rank; r++) { for(int j = 0; j < world_size; j++) { - if(all_local_ranks[j] == i) + if(all_is_active[j] && all_local_ranks[j] == r) { active_ranks.push_back(j); } @@ -483,7 +467,6 @@ void HSolverLCAO::parakSolve_cusolver(hamilt::Hamilt* pHamilt, } MPI_Comm_free(&self_comm); - MPI_Comm_free(&nodeComm); ModuleBase::timer::tick("HSolverLCAO", "parakSolve"); } #endif diff --git a/source/source_hsolver/hsolver_lcao.h b/source/source_hsolver/hsolver_lcao.h index a1905fbcac..eebab34208 100644 --- a/source/source_hsolver/hsolver_lcao.h +++ b/source/source_hsolver/hsolver_lcao.h @@ -5,28 +5,34 @@ #include "source_hamilt/hamilt.h" #include "source_basis/module_ao/parallel_orbitals.h" +#include "source_estate/module_charge/charge.h" // mohan add 20251024 +#include "source_estate/module_dm/density_matrix.h" // mohan add 20251103 + namespace hsolver { -template +template class HSolverLCAO { public: HSolverLCAO(const Parallel_Orbitals* ParaV_in, std::string method_in) : ParaV(ParaV_in), method(method_in) {}; - void solve(hamilt::Hamilt* pHamilt, - psi::Psi& psi, + void solve(hamilt::Hamilt* pHamilt, + psi::Psi& psi, elecstate::ElecState* pes, - const bool skip_charge); + elecstate::DensityMatrix& dm, // mohan add 2025-11-03 + Charge &chr, // charge density + const int nspin, + const bool skip_charge); private: - void hamiltSolvePsiK(hamilt::Hamilt* hm, psi::Psi& psi, double* eigenvalue); // for kpar_lcao == 1 + void hamiltSolvePsiK(hamilt::Hamilt* hm, psi::Psi& psi, double* eigenvalue); // for kpar_lcao == 1 - void parakSolve(hamilt::Hamilt* pHamilt, psi::Psi& psi, elecstate::ElecState* pes, int kpar); // for kpar_lcao > 1 + void parakSolve(hamilt::Hamilt* pHamilt, psi::Psi& psi, elecstate::ElecState* pes, int kpar); // for kpar_lcao > 1 // The solving algorithm using cusolver is different from others, so a separate function is needed - void parakSolve_cusolver(hamilt::Hamilt* pHamilt, - psi::Psi& psi, + void parakSolve_cusolver(hamilt::Hamilt* pHamilt, + psi::Psi& psi, elecstate::ElecState* pes); const Parallel_Orbitals* ParaV; @@ -36,4 +42,4 @@ class HSolverLCAO } // namespace hsolver -#endif \ No newline at end of file +#endif diff --git a/source/source_hsolver/hsolver_lcaopw.cpp b/source/source_hsolver/hsolver_lcaopw.cpp index 10c80c4481..2167330705 100644 --- a/source/source_hsolver/hsolver_lcaopw.cpp +++ b/source/source_hsolver/hsolver_lcaopw.cpp @@ -5,7 +5,6 @@ #include "source_base/timer.h" #include "source_base/tool_quit.h" #include "source_estate/elecstate_pw.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/hamilt_pw.h" #include "source_hsolver/diago_iter_assist.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_hsolver/hsolver_pw.cpp b/source/source_hsolver/hsolver_pw.cpp index f3e5a7ca60..2ea7b92a2b 100644 --- a/source/source_hsolver/hsolver_pw.cpp +++ b/source/source_hsolver/hsolver_pw.cpp @@ -105,7 +105,7 @@ void HSolverPW::solve(hamilt::Hamilt* pHamilt, for (int i = 0; i < this->wfc_basis->nks; ++i) { const int ik = k_order[i]; - + // update H(k) for each k point pHamilt->updateHk(ik); @@ -142,13 +142,13 @@ void HSolverPW::solve(hamilt::Hamilt* pHamilt, if (skip_charge) { - GlobalV::ofs_running << "Average iterative diagonalization steps for k-points " << ik - << " is: " << DiagoIterAssist::avg_iter - << " ; where current threshold is: " << this->diag_thr << " . " << std::endl; + GlobalV::ofs_running << " Average iterative diagonalization steps for k-points " << ik + << " is " << DiagoIterAssist::avg_iter + << "\n current threshold of diagonalization is " << this->diag_thr << std::endl; DiagoIterAssist::avg_iter = 0.0; } } - } + } // if (use_k_continuity) else { // Original code without k-point continuity for (int ik = 0; ik < this->wfc_basis->nks; ++ik) @@ -182,6 +182,7 @@ void HSolverPW::solve(hamilt::Hamilt* pHamilt, // solve eigenvector and eigenvalue for H(k) this->hamiltSolvePsiK(pHamilt, psi, precondition, eigenvalues.data() + ik * psi.get_nbands(), this->wfc_basis->nks); + // output iteration information and reset avg_iter if (skip_charge) { GlobalV::ofs_running << " k(" << ik+1 << "/" << pes->klist->get_nkstot() @@ -189,10 +190,14 @@ void HSolverPW::solve(hamilt::Hamilt* pHamilt, << " threshold=" << this->diag_thr << std::endl; DiagoIterAssist::avg_iter = 0.0; } + /// calculate the contribution of Psi for charge density rho } - } - + } // else (use_k_continuity) + + // output average iteration information and reset avg_iter + this->output_iterInfo(); + count++; // END Loop over k points @@ -341,7 +346,9 @@ void HSolverPW::hamiltSolvePsiK(hamilt::Hamilt* hm, .to_device() .slice({0}, {psi.get_current_ngk()}); - cg.diag(hpsi_func, spsi_func, psi_tensor, eigen_tensor, this->ethr_band, prec_tensor); + DiagoIterAssist::avg_iter += static_cast( + cg.diag(hpsi_func, spsi_func, psi_tensor, eigen_tensor, this->ethr_band, prec_tensor) + ); // TODO: Double check tensormap's potential problem // ct::TensorMap(psi.get_pointer(), psi_tensor, {psi.get_nbands(), psi.get_nbasis()}).sync(psi_tensor); } @@ -519,9 +526,9 @@ void HSolverPW::output_iterInfo() // in PW base, average iteration steps for each band and k-point should be printing if (DiagoIterAssist::avg_iter > 0.0) { - GlobalV::ofs_running << "Average iterative diagonalization steps: " + GlobalV::ofs_running << " Average iterative diagonalization steps for k-points is " << DiagoIterAssist::avg_iter / this->wfc_basis->nks - << " ; where current threshold is: " << this->diag_thr << " . " << std::endl; + << "\n current threshold of diagonalizaiton is " << this->diag_thr << std::endl; // reset avg_iter DiagoIterAssist::avg_iter = 0.0; } @@ -533,39 +540,39 @@ void HSolverPW::build_k_neighbors() { kvecs_c.resize(nk); k_order.clear(); k_order.reserve(nk); - + // Store k-points and corresponding indices struct KPoint { ModuleBase::Vector3 kvec; - int index; - double norm; - - KPoint(const ModuleBase::Vector3& v, int i) : + int index = 0; + double norm = 0.0; + + KPoint(const ModuleBase::Vector3& v, int i) : kvec(v), index(i), norm(v.norm()) {} }; - + // Build k-point list std::vector klist; for (int ik = 0; ik < nk; ++ik) { kvecs_c[ik] = this->wfc_basis->kvec_c[ik]; klist.push_back(KPoint(kvecs_c[ik], ik)); } - + // Sort k-points by distance from origin std::sort(klist.begin(), klist.end(), [](const KPoint& a, const KPoint& b) { return a.norm < b.norm; }); - + // Build parent-child relationships k_order.push_back(klist[0].index); - + // Find nearest processed k-point as parent for each k-point for (int i = 1; i < nk; ++i) { int current_k = klist[i].index; double min_dist = 1e10; int parent = -1; - + // find the nearest k-point as parent for (int j = 0; j < k_order.size(); ++j) { int processed_k = k_order[j]; @@ -575,7 +582,7 @@ void HSolverPW::build_k_neighbors() { parent = processed_k; } } - + k_parent[current_k] = parent; k_order.push_back(current_k); } @@ -585,34 +592,34 @@ template void HSolverPW::propagate_psi(psi::Psi& psi, const int from_ik, const int to_ik) { const int nbands = psi.get_nbands(); const int npwk = this->wfc_basis->npwk[to_ik]; - + // Get k-point difference ModuleBase::Vector3 dk = kvecs_c[to_ik] - kvecs_c[from_ik]; - + // Allocate porter locally T* porter = nullptr; resmem_complex_op()(porter, this->wfc_basis->nmaxgr, "HSolverPW::porter"); - + // Process each band for (int ib = 0; ib < nbands; ib++) { // Fix current k-point and band // psi.fix_k(from_ik); - + // FFT to real space // this->wfc_basis->recip_to_real(this->ctx, psi.get_pointer(ib), porter, from_ik); this->wfc_basis->recip_to_real(this->ctx, &psi(from_ik, ib, 0), porter, from_ik); - + // Apply phase factor // // TODO: Check how to get the r vector // ModuleBase::Vector3 r = this->wfc_basis->get_ir2r(ir); // double phase = this->wfc_basis->tpiba * (dk.x * r.x + dk.y * r.y + dk.z * r.z); // psi_real[ir] *= std::exp(std::complex(0.0, phase)); // } - + // Fix k-point for target // psi.fix_k(to_ik); - + // FFT back to reciprocal space // this->wfc_basis->real_to_recip(this->ctx, porter, psi.get_pointer(ib), to_ik, true); this->wfc_basis->real_to_recip(this->ctx, porter, &psi(to_ik, ib, 0), to_ik); diff --git a/source/source_hsolver/kernels/bpcg_kernel_op.cpp b/source/source_hsolver/kernels/bpcg_kernel_op.cpp index 3d74591783..88f94e288c 100644 --- a/source/source_hsolver/kernels/bpcg_kernel_op.cpp +++ b/source/source_hsolver/kernels/bpcg_kernel_op.cpp @@ -196,7 +196,7 @@ struct refresh_hcc_scc_vcc_op const T &one) { #ifdef _OPENMP -#pragma omp parallel for collapse(1) schedule(static, 8192 / sizeof(T)) +#pragma omp parallel for collapse(1) schedule(static) #endif for (int i = 0; i < n; i++) { diff --git a/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu b/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu index b0a08cc513..12d50b0df0 100644 --- a/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu +++ b/source/source_hsolver/kernels/cuda/bpcg_kernel_op.cu @@ -387,7 +387,7 @@ void line_minimize_with_block_op::operator()(T* grad A, B, C, D, n_basis, n_basis_max); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -412,7 +412,7 @@ void calc_grad_with_block_op::operator()(const Real* A, B, C, D, n_basis, n_basis_max); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -434,7 +434,7 @@ void apply_eigenvalues_op::operator()(const int& nba apply_eigenvalues_kernel<<>>( vec_complex, res_complex, eigenvalues, nbase, nbase_x, notconv); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -455,7 +455,7 @@ void precondition_op::operator()(const int& dim, precondition_kernel<<>>( psi_complex, precondition, eigenvalues, dim, nbase, notconv); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -471,7 +471,7 @@ void normalize_op::operator()(const int& dim, normalize_kernel<<>>( psi_complex, psi_norm, dim, nbase, notconv); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -487,7 +487,7 @@ void refresh_hcc_scc_vcc_op::operator()(const i int block = (n + thread - 1) / thread; refresh_hcc_scc_vcc_kernel <<>> (n, hcc, scc, vcc, ldh, eigenvalue, one); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -505,7 +505,7 @@ void refresh_hcc_scc_vcc_op, base_device::DEVICE_GPU>::opera reinterpret_cast*>(scc), reinterpret_cast*>(vcc), ldh, eigenvalue, thrust::complex(one)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template <> @@ -523,7 +523,7 @@ void refresh_hcc_scc_vcc_op, base_device::DEVICE_GPU>::oper reinterpret_cast*>(scc), reinterpret_cast*>(vcc), ldh, eigenvalue, thrust::complex(one)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct calc_grad_with_block_op, base_device::DEVICE_GPU>; diff --git a/source/source_hsolver/kernels/cuda/diag_cusolver.cu b/source/source_hsolver/kernels/cuda/diag_cusolver.cu index 90548f1c9b..642198cfd9 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolver.cu +++ b/source/source_hsolver/kernels/cuda/diag_cusolver.cu @@ -1,11 +1,11 @@ #include #include "diag_cusolver.cuh" -#include "helper_cuda.h" +#include "source_base/module_device/device_check.h" Diag_Cusolver_gvd::Diag_Cusolver_gvd(){ // step 1: create cusolver/cublas handle cusolverH = NULL; - checkCudaErrors( cusolverDnCreate(&cusolverH) ); + CHECK_CUSOLVER( cusolverDnCreate(&cusolverH) ); itype = CUSOLVER_EIG_TYPE_1; // A*x = (lambda)*B*x jobz = CUSOLVER_EIG_MODE_VECTOR; // compute eigenvalues and eigenvectors. @@ -29,37 +29,37 @@ Diag_Cusolver_gvd::Diag_Cusolver_gvd(){ void Diag_Cusolver_gvd::finalize(){ // free resources and destroy - if (d_A ) {checkCudaErrors( cudaFree(d_A) ); d_A = NULL;} - if (d_B ) {checkCudaErrors( cudaFree(d_B) ); d_B = NULL;} - if (d_A2 ) {checkCudaErrors( cudaFree(d_A2) ); d_A2 = NULL;} - if (d_B2 ) {checkCudaErrors( cudaFree(d_B2) ); d_B2 = NULL;} - if (d_W ) {checkCudaErrors( cudaFree(d_W) ); d_W = NULL;} - if (devInfo ) {checkCudaErrors( cudaFree(devInfo) ); devInfo = NULL;} + if (d_A ) {CHECK_CUDA( cudaFree(d_A) ); d_A = NULL;} + if (d_B ) {CHECK_CUDA( cudaFree(d_B) ); d_B = NULL;} + if (d_A2 ) {CHECK_CUDA( cudaFree(d_A2) ); d_A2 = NULL;} + if (d_B2 ) {CHECK_CUDA( cudaFree(d_B2) ); d_B2 = NULL;} + if (d_W ) {CHECK_CUDA( cudaFree(d_W) ); d_W = NULL;} + if (devInfo ) {CHECK_CUDA( cudaFree(devInfo) ); devInfo = NULL;} } Diag_Cusolver_gvd::~Diag_Cusolver_gvd(){ finalize(); - if (cusolverH) {checkCudaErrors( cusolverDnDestroy(cusolverH) ); cusolverH = NULL;} - //checkCudaErrors( cudaDeviceReset() ); + if (cusolverH) {CHECK_CUSOLVER( cusolverDnDestroy(cusolverH) ); cusolverH = NULL;} + //CHECK_CUDA( cudaDeviceReset() ); } void Diag_Cusolver_gvd::init_double(int N){ // step 2: Malloc A and B on device m = lda = N; - checkCudaErrors( cudaMalloc ((void**)&d_A, sizeof(double) * lda * m) ); - checkCudaErrors( cudaMalloc ((void**)&d_B, sizeof(double) * lda * m) ); - checkCudaErrors( cudaMalloc ((void**)&d_W, sizeof(double) * m) ); - checkCudaErrors( cudaMalloc ((void**)&devInfo, sizeof(int)) ); + CHECK_CUDA( cudaMalloc ((void**)&d_A, sizeof(double) * lda * m) ); + CHECK_CUDA( cudaMalloc ((void**)&d_B, sizeof(double) * lda * m) ); + CHECK_CUDA( cudaMalloc ((void**)&d_W, sizeof(double) * m) ); + CHECK_CUDA( cudaMalloc ((void**)&devInfo, sizeof(int)) ); } void Diag_Cusolver_gvd::init_complex(int N){ // step 2: Malloc A and B on device m = lda = N; - checkCudaErrors( cudaMalloc ((void**)&d_A2, sizeof(cuDoubleComplex) * lda * m) ); - checkCudaErrors( cudaMalloc ((void**)&d_B2, sizeof(cuDoubleComplex) * lda * m) ); - checkCudaErrors( cudaMalloc ((void**)&d_W, sizeof(double) * m) ); - checkCudaErrors( cudaMalloc ((void**)&devInfo, sizeof(int)) ); + CHECK_CUDA( cudaMalloc ((void**)&d_A2, sizeof(cuDoubleComplex) * lda * m) ); + CHECK_CUDA( cudaMalloc ((void**)&d_B2, sizeof(cuDoubleComplex) * lda * m) ); + CHECK_CUDA( cudaMalloc ((void**)&d_W, sizeof(double) * m) ); + CHECK_CUDA( cudaMalloc ((void**)&devInfo, sizeof(int)) ); } void Diag_Cusolver_gvd::Dngvd_double(int N, int M, double *A, double *B, double *W, double *V){ @@ -70,14 +70,14 @@ void Diag_Cusolver_gvd::Dngvd_double(int N, int M, double *A, double *B, double this->finalize(); this->init_double(M); } - checkCudaErrors( cudaMemcpy(d_A, A, sizeof(double) * lda * m, cudaMemcpyHostToDevice) ); - checkCudaErrors( cudaMemcpy(d_B, B, sizeof(double) * lda * m, cudaMemcpyHostToDevice) ); + CHECK_CUDA( cudaMemcpy(d_A, A, sizeof(double) * lda * m, cudaMemcpyHostToDevice) ); + CHECK_CUDA( cudaMemcpy(d_B, B, sizeof(double) * lda * m, cudaMemcpyHostToDevice) ); // Query working space of sygvd // The helper functions below can calculate the sizes needed for pre-allocated buffer. // The S and D data types are real valued single and double precision, respectively. // The C and Z data types are complex valued single and double precision, respectively. - checkCudaErrors(cusolverDnDsygvd_bufferSize( + CHECK_CUSOLVER(cusolverDnDsygvd_bufferSize( cusolverH, itype, jobz, @@ -90,10 +90,10 @@ void Diag_Cusolver_gvd::Dngvd_double(int N, int M, double *A, double *B, double d_W, &lwork )); - checkCudaErrors( cudaMalloc((void**)&d_work, sizeof(double)*lwork) ); + CHECK_CUDA( cudaMalloc((void**)&d_work, sizeof(double)*lwork) ); // compute spectrum of (A,B) - checkCudaErrors(cusolverDnDsygvd( + CHECK_CUSOLVER(cusolverDnDsygvd( cusolverH, itype, jobz, @@ -108,35 +108,35 @@ void Diag_Cusolver_gvd::Dngvd_double(int N, int M, double *A, double *B, double lwork, devInfo )); - checkCudaErrors( cudaDeviceSynchronize() ); + CHECK_CUDA( cudaDeviceSynchronize() ); // copy (W, V) to the cpu root - checkCudaErrors( cudaMemcpy(W, d_W, sizeof(double)*m, cudaMemcpyDeviceToHost) ); - checkCudaErrors( cudaMemcpy(V, d_A, sizeof(double)*lda*m, cudaMemcpyDeviceToHost) ); - checkCudaErrors( cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(W, d_W, sizeof(double)*m, cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(V, d_A, sizeof(double)*lda*m, cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost) ); assert(0 == info_gpu); // free the buffer - if (d_work ) checkCudaErrors( cudaFree(d_work) ); + if (d_work ) CHECK_CUDA( cudaFree(d_work) ); } void Diag_Cusolver_gvd::Dngvd_complex(int N, int M, std::complex *A, std::complex *B, double *W, std::complex *V){ - + // copy A, B to the GPU assert(N == M); if (M != m) { this->finalize(); this->init_complex(M); } - checkCudaErrors( cudaMemcpy(d_A2, A, sizeof(cuDoubleComplex) * lda * m, cudaMemcpyHostToDevice) ); - checkCudaErrors( cudaMemcpy(d_B2, B, sizeof(cuDoubleComplex) * lda * m, cudaMemcpyHostToDevice) ); + CHECK_CUDA( cudaMemcpy(d_A2, A, sizeof(cuDoubleComplex) * lda * m, cudaMemcpyHostToDevice) ); + CHECK_CUDA( cudaMemcpy(d_B2, B, sizeof(cuDoubleComplex) * lda * m, cudaMemcpyHostToDevice) ); // Query working space of Zhegvd // The helper functions below can calculate the sizes needed for pre-allocated buffer. // The S and D data types are real valued single and double precision, respectively. // The C and Z data types are complex valued single and double precision, respectively. - checkCudaErrors( + CHECK_CUSOLVER( cusolverDnZhegvd_bufferSize( cusolverH, itype, @@ -149,11 +149,11 @@ void Diag_Cusolver_gvd::Dngvd_complex(int N, int M, std::complex *A, std lda, d_W, &lwork) - ); - checkCudaErrors( cudaMalloc((void**)&d_work2, sizeof(cuDoubleComplex)*lwork) ); + ); + CHECK_CUDA( cudaMalloc((void**)&d_work2, sizeof(cuDoubleComplex)*lwork) ); // compute spectrum of (A,B) - checkCudaErrors( + CHECK_CUSOLVER( cusolverDnZhegvd( cusolverH, itype, @@ -169,14 +169,14 @@ void Diag_Cusolver_gvd::Dngvd_complex(int N, int M, std::complex *A, std lwork, devInfo) ); - checkCudaErrors( cudaDeviceSynchronize() ); - + CHECK_CUDA( cudaDeviceSynchronize() ); + // copy (W, V) to the cpu root - checkCudaErrors( cudaMemcpy(W, d_W, sizeof(double)*m, cudaMemcpyDeviceToHost) ); - checkCudaErrors( cudaMemcpy(V, d_A2, sizeof(std::complex)*lda*m, cudaMemcpyDeviceToHost) ); - checkCudaErrors( cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(W, d_W, sizeof(double)*m, cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(V, d_A2, sizeof(std::complex)*lda*m, cudaMemcpyDeviceToHost) ); + CHECK_CUDA( cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost) ); assert(0 == info_gpu); // free the buffer - if (d_work2 ) checkCudaErrors( cudaFree(d_work2) ); + if (d_work2 ) CHECK_CUDA( cudaFree(d_work2) ); } diff --git a/source/source_hsolver/kernels/cuda/diag_cusolver.cuh b/source/source_hsolver/kernels/cuda/diag_cusolver.cuh index faf4ec0a09..e47d43be50 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolver.cuh +++ b/source/source_hsolver/kernels/cuda/diag_cusolver.cuh @@ -3,12 +3,6 @@ #include #include -#if CUDA_VERSION < 12090 -#include "nvToolsExt.h" -#else -#include "nvtx3/nvToolsExt.h" -#endif - #include #include @@ -39,7 +33,7 @@ class Diag_Cusolver_gvd{ double *d_A = nullptr; double *d_B = nullptr; double *d_work = nullptr; - + cuDoubleComplex *d_A2 = nullptr; cuDoubleComplex *d_B2 = nullptr; cuDoubleComplex *d_work2 = nullptr; @@ -54,7 +48,7 @@ class Diag_Cusolver_gvd{ // - init_double : initializing relevant double type data structures and gpu apis' handle and memory // - init_complex : initializing relevant complex type data structures and gpu apis' handle and memory // Input Parameters -// N: the dimension of the matrix +// N: the dimension of the matrix void init_double(int N); void init_complex(int N); @@ -70,17 +64,17 @@ public: // - Dngvd_double : dense double type matrix // - Dngvd_complex : dense complex type matrix // Input Parameters -// N: the number of rows of the matrix -// M: the number of cols of the matrix -// A: the hermitian matrix A in A x=lambda B (column major) -// B: the SPD matrix B in A x=lambda B (column major) +// N: the number of rows of the matrix +// M: the number of cols of the matrix +// A: the hermitian matrix A in A x=lambda B (column major) +// B: the SPD matrix B in A x=lambda B (column major) // Output Parameter // W: generalized eigenvalues // V: generalized eigenvectors (column major) void Dngvd_double(int N, int M, double *A, double *B, double *W, double *V); void Dngvd_complex(int N, int M, std::complex *A, std::complex *B, double *W, std::complex *V); - + void Dngvd(int N, int M, double *A, double *B, double *W, double *V) { return Dngvd_double(N, M, A, B, W, V); diff --git a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu index 032efd797b..c53139897f 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu +++ b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cu @@ -1,6 +1,6 @@ #ifdef __CUSOLVERMP #include "diag_cusolvermp.cuh" -#include "helper_cuda.h" +#include "source_base/module_device/device_check.h" #include "source_base/global_variable.h" #include @@ -11,9 +11,15 @@ extern "C" } #include #include -#include "helper_cusolver.h" #include "source_base/global_function.h" #include "source_base/module_device/device.h" +#include "source_base/module_device/device_check.h" + +#ifdef __USE_CAL +// ============================================================================ +// CAL callback functions for MPI communication +// ============================================================================ + static calError_t allgather(void* src_buf, void* recv_buf, size_t size, void* data, void** request) { MPI_Request req; @@ -44,6 +50,7 @@ static calError_t request_free(void* request) { return CAL_OK; } +#endif // __USE_CAL template Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, @@ -70,10 +77,12 @@ Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, MPI_Comm_size(mpi_comm, &this->globalMpiSize); MPI_Comm_rank(mpi_comm, &(this->globalMpiRank)); - int local_device_id = base_device::information::set_device_by_rank(mpi_comm); + // GPU device is already bound by DeviceContext::init() in read_input.cpp + int local_device_id = base_device::DeviceContext::instance().get_device_id(); Cblacs_gridinfo(this->cblacs_ctxt, &this->nprows, &this->npcols, &this->myprow, &this->mypcol); - this->cusolverCalComm = NULL; +#ifdef __USE_CAL + // Initialize CAL communicator cal_comm_create_params_t params; params.allgather = allgather; params.req_test = request_test; @@ -82,11 +91,19 @@ Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, params.rank = this->globalMpiRank; params.nranks = this->globalMpiSize; params.local_device = local_device_id; + CHECK_CAL(cal_comm_create(params, &this->cusolverCalComm)); +#else + // Initialize NCCL communicator + ncclUniqueId ncclId; + if (this->globalMpiRank == 0) { + CHECK_NCCL(ncclGetUniqueId(&ncclId)); + } + MPI_Bcast(&ncclId, sizeof(ncclId), MPI_BYTE, 0, mpi_comm); + CHECK_NCCL(ncclCommInitRank(&this->ncclComm, this->globalMpiSize, ncclId, this->globalMpiRank)); +#endif - CAL_CHECK(cal_comm_create(params, &this->cusolverCalComm)); - - checkCudaErrors(cudaStreamCreate(&this->localStream)); - CUSOLVER_CHECK(cusolverMpCreate(&cusolverMpHandle, local_device_id, this->localStream)); + CHECK_CUDA(cudaStreamCreate(&this->localStream)); + CHECK_CUSOLVER(cusolverMpCreate(&cusolverMpHandle, local_device_id, this->localStream)); // 20240529 zhanghaochong // so far, cusolvermp only support = 1 @@ -113,18 +130,23 @@ Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, // This is because the current implementation of the cusolvermp library is ONE process ONE GPU. // So, when we use cusolvermp, we must ensure that the number of processes is equal to the number of GPUs. // In a sense, the MPI usage strategy of ABACUS must be subject to the cusolvermp. - CUSOLVER_CHECK(cusolverMpCreateDeviceGrid(cusolverMpHandle, + // Use ROW_MAJOR to match BLACS grid initialization (order='R' in parallel_2d.cpp) + CHECK_CUSOLVER(cusolverMpCreateDeviceGrid(cusolverMpHandle, &this->grid, +#ifdef __USE_CAL this->cusolverCalComm, +#else + this->ncclComm, +#endif this->nprows, this->npcols, - CUSOLVERMP_GRID_MAPPING_COL_MAJOR)); + CUSOLVERMP_GRID_MAPPING_ROW_MAJOR)); // 20240529 zhanghaochong // Actually, there should be three matrix descriptors, A matrix, B matrix, and output eigenvector matrix. // But in ABACUS the three matrices descriptors are the same. // So, I only create one matrix descriptor and use it for the three matrices. - CUSOLVER_CHECK(cusolverMpCreateMatrixDesc(&this->desc_for_cusolvermp, + CHECK_CUSOLVER(cusolverMpCreateMatrixDesc(&this->desc_for_cusolvermp, this->grid, this->datatype, nFull, @@ -139,12 +161,22 @@ Diag_CusolverMP_gvd::Diag_CusolverMP_gvd(const MPI_Comm mpi_comm, template Diag_CusolverMP_gvd::~Diag_CusolverMP_gvd() { - CAL_CHECK(cal_comm_barrier(this->cusolverCalComm, this->localStream)); - CUSOLVER_CHECK(cusolverMpDestroyMatrixDesc(this->desc_for_cusolvermp)); - CUSOLVER_CHECK(cusolverMpDestroyGrid(this->grid)); - CUSOLVER_CHECK(cusolverMpDestroy(this->cusolverMpHandle)); - CAL_CHECK(cal_comm_destroy(this->cusolverCalComm)); - checkCudaErrors(cudaStreamDestroy(this->localStream)); +#ifdef __USE_CAL + CHECK_CAL(cal_comm_barrier(this->cusolverCalComm, this->localStream)); + CHECK_CAL(cal_stream_sync(this->cusolverCalComm, this->localStream)); + CHECK_CUSOLVER(cusolverMpDestroyMatrixDesc(this->desc_for_cusolvermp)); + CHECK_CUSOLVER(cusolverMpDestroyGrid(this->grid)); + CHECK_CUSOLVER(cusolverMpDestroy(this->cusolverMpHandle)); + CHECK_CAL(cal_comm_destroy(this->cusolverCalComm)); + CHECK_CUDA(cudaStreamDestroy(this->localStream)); +#else + CHECK_CUDA(cudaStreamSynchronize(this->localStream)); + CHECK_CUSOLVER(cusolverMpDestroyMatrixDesc(this->desc_for_cusolvermp)); + CHECK_CUSOLVER(cusolverMpDestroyGrid(this->grid)); + CHECK_CUSOLVER(cusolverMpDestroy(this->cusolverMpHandle)); + CHECK_NCCL(ncclCommDestroy(this->ncclComm)); + CHECK_CUDA(cudaStreamDestroy(this->localStream)); +#endif } @@ -156,21 +188,21 @@ int Diag_CusolverMP_gvd::generalized_eigenvector(inputT* A, inputT* B, o void *d_D = NULL; void *d_Z = NULL; - checkCudaErrors(cudaMalloc((void**)&d_A, this->n_local * this->m_local * sizeof(inputT))); - checkCudaErrors(cudaMalloc((void**)&d_B, this->n_local * this->m_local * sizeof(inputT))); - checkCudaErrors(cudaMalloc((void**)&d_D, this->nFull * sizeof(outputT))); - checkCudaErrors(cudaMalloc((void**)&d_Z, this->n_local * this->m_local * sizeof(inputT))); + CHECK_CUDA(cudaMalloc((void**)&d_A, this->n_local * this->m_local * sizeof(inputT))); + CHECK_CUDA(cudaMalloc((void**)&d_B, this->n_local * this->m_local * sizeof(inputT))); + CHECK_CUDA(cudaMalloc((void**)&d_D, this->nFull * sizeof(outputT))); + CHECK_CUDA(cudaMalloc((void**)&d_Z, this->n_local * this->m_local * sizeof(inputT))); - checkCudaErrors( + CHECK_CUDA( cudaMemcpy(d_A, (void*)A, this->n_local * this->m_local * sizeof(inputT), cudaMemcpyHostToDevice)); - checkCudaErrors( + CHECK_CUDA( cudaMemcpy(d_B, (void*)B, this->n_local * this->m_local * sizeof(inputT), cudaMemcpyHostToDevice)); - CAL_CHECK(cal_stream_sync(this->cusolverCalComm, this->localStream)); + CHECK_CUDA(cudaStreamSynchronize(this->localStream)); size_t sygvdWorkspaceInBytesOnDevice = 0; size_t sygvdWorkspaceInBytesOnHost = 0; - CUSOLVER_CHECK(cusolverMpSygvd_bufferSize(cusolverMpHandle, + CHECK_CUSOLVER(cusolverMpSygvd_bufferSize(cusolverMpHandle, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, CUBLAS_FILL_MODE_LOWER, @@ -194,17 +226,17 @@ int Diag_CusolverMP_gvd::generalized_eigenvector(inputT* A, inputT* B, o /* Distributed device workspace */ void* d_sygvdWork = NULL; - checkCudaErrors(cudaMalloc((void**)&d_sygvdWork, sygvdWorkspaceInBytesOnDevice)); - checkCudaErrors(cudaMemset(d_sygvdWork, 0, sygvdWorkspaceInBytesOnDevice)); + CHECK_CUDA(cudaMalloc((void**)&d_sygvdWork, sygvdWorkspaceInBytesOnDevice)); + CHECK_CUDA(cudaMemset(d_sygvdWork, 0, sygvdWorkspaceInBytesOnDevice)); int* d_sygvdInfo = NULL; - checkCudaErrors(cudaMalloc((void**)&d_sygvdInfo, sizeof(int))); - checkCudaErrors(cudaMemset(d_sygvdInfo, 0, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&d_sygvdInfo, sizeof(int))); + CHECK_CUDA(cudaMemset(d_sygvdInfo, 0, sizeof(int))); /* sync wait for data to arrive to device */ - CAL_CHECK(cal_stream_sync(cusolverCalComm, localStream)); + CHECK_CUDA(cudaStreamSynchronize(this->localStream)); - CUSOLVER_CHECK(cusolverMpSygvd(cusolverMpHandle, + CHECK_CUSOLVER(cusolverMpSygvd(cusolverMpHandle, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, CUBLAS_FILL_MODE_LOWER, @@ -230,22 +262,22 @@ int Diag_CusolverMP_gvd::generalized_eigenvector(inputT* A, inputT* B, o d_sygvdInfo)); int h_sygvdInfo = 0; - checkCudaErrors(cudaMemcpyAsync(&h_sygvdInfo, d_sygvdInfo, sizeof(int), cudaMemcpyDeviceToHost, this->localStream)); + CHECK_CUDA(cudaMemcpyAsync(&h_sygvdInfo, d_sygvdInfo, sizeof(int), cudaMemcpyDeviceToHost, this->localStream)); /* wait for d_sygvdInfo copy */ - checkCudaErrors(cudaStreamSynchronize(this->localStream)); + CHECK_CUDA(cudaStreamSynchronize(this->localStream)); if (h_sygvdInfo != 0) { ModuleBase::WARNING_QUIT("cusolvermp", "cusolverMpSygvd failed with error"); } - CAL_CHECK(cal_stream_sync(this->cusolverCalComm, this->localStream)); + CHECK_CUDA(cudaStreamSynchronize(this->localStream)); - checkCudaErrors(cudaFree(d_sygvdWork)); - checkCudaErrors(cudaFree(d_sygvdInfo)); + CHECK_CUDA(cudaFree(d_sygvdWork)); + CHECK_CUDA(cudaFree(d_sygvdInfo)); free(h_sygvdWork); - checkCudaErrors(cudaMemcpy((void*)EigenValue, d_D, this->nFull * sizeof(outputT), cudaMemcpyDeviceToHost)); - checkCudaErrors(cudaMemcpy((void*)EigenVector, + CHECK_CUDA(cudaMemcpy((void*)EigenValue, d_D, this->nFull * sizeof(outputT), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy((void*)EigenVector, d_Z, this->n_local * this->m_local * sizeof(inputT), cudaMemcpyDeviceToHost)); @@ -253,13 +285,13 @@ int Diag_CusolverMP_gvd::generalized_eigenvector(inputT* A, inputT* B, o // I move the free operations from destructor to here. // Because I think it is more reasonable to free the memory in the function where it is allocated. // Destructor is used to release resources that allocated in the constructor. - // And currently, we construct and destruct the object in every SCF iteration. Maybe one day we + // And currently, we construct and destruct the object in every SCF iteration. Maybe one day we // will construct the object only once during the whole program life cycle. // In that case, allocate and free memory in compute function is more reasonable. - checkCudaErrors(cudaFree(d_A)); - checkCudaErrors(cudaFree(d_B)); - checkCudaErrors(cudaFree(d_D)); - checkCudaErrors(cudaFree(d_Z)); + CHECK_CUDA(cudaFree(d_A)); + CHECK_CUDA(cudaFree(d_B)); + CHECK_CUDA(cudaFree(d_D)); + CHECK_CUDA(cudaFree(d_Z)); return 0; } @@ -282,4 +314,4 @@ void Diag_CusolverMP_gvd::outputParameters() template class Diag_CusolverMP_gvd; template class Diag_CusolverMP_gvd>; -#endif \ No newline at end of file +#endif diff --git a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh index 0e330908dc..fe49677447 100644 --- a/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh +++ b/source/source_hsolver/kernels/cuda/diag_cusolvermp.cuh @@ -4,10 +4,15 @@ #include #include #include -#include #include #include "source_base/macros.h" +#ifdef __USE_CAL +#include +#else +#include +#endif + template class Diag_CusolverMP_gvd { @@ -53,7 +58,11 @@ class Diag_CusolverMP_gvd int globalMpiSize; cudaDataType_t datatype; +#ifdef __USE_CAL cal_comm_t cusolverCalComm = NULL; +#else + ncclComm_t ncclComm = NULL; +#endif cudaStream_t localStream = NULL; cusolverMpHandle_t cusolverMpHandle = NULL; cusolverMpGrid_t grid = NULL; @@ -64,6 +73,3 @@ class Diag_CusolverMP_gvd int64_t matrix_i; int64_t matrix_j; }; - -// 实现模板类的成员函数 - diff --git a/source/source_hsolver/kernels/cuda/hegvd_op.cu b/source/source_hsolver/kernels/cuda/hegvd_op.cu index f4d03a7522..6954522bc5 100644 --- a/source/source_hsolver/kernels/cuda/hegvd_op.cu +++ b/source/source_hsolver/kernels/cuda/hegvd_op.cu @@ -1,5 +1,5 @@ #include "source_hsolver/kernels/hegvd_op.h" -#include "helper_cuda.h" +#include "source_base/module_device/device_check.h" #include @@ -14,7 +14,7 @@ void createGpuSolverHandle() { if (cusolver_H == nullptr) { - cusolverErrcheck(cusolverDnCreate(&cusolver_H)); + CHECK_CUSOLVER(cusolverDnCreate(&cusolver_H)); } } @@ -22,7 +22,7 @@ void destroyGpuSolverHandle() { if (cusolver_H != nullptr) { - cusolverErrcheck(cusolverDnDestroy(cusolver_H)); + CHECK_CUSOLVER(cusolverDnDestroy(cusolver_H)); cusolver_H = nullptr; } } @@ -39,23 +39,23 @@ void xhegvd_wrapper( int* devInfo = nullptr; int lwork = 0, info_gpu = 0; double* work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsygvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnDsygvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, A, lda, B, ldb, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(double) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsygvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnDsygvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, A, lda, B, ldb, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); // free the buffer - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } static inline @@ -70,24 +70,24 @@ void xhegvd_wrapper ( int * devInfo = nullptr; int lwork = 0, info_gpu = 0; float2 * work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnChegvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnChegvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(float2) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(float2) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnChegvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnChegvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); // free the buffer - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } static inline @@ -102,24 +102,24 @@ void xhegvd_wrapper ( int * devInfo = nullptr; int lwork = 0, info_gpu = 0; double2 * work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZhegvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnZhegvd_bufferSize(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(double2) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(double2) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZhegvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnZhegvd(cusolver_H, CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, reinterpret_cast(B), ldb, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); // free the buffer - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } static inline @@ -133,20 +133,20 @@ void xheevd_wrapper( int* devInfo = nullptr; int lwork = 0, info_gpu = 0; double* work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnDsyevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnDsyevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, A, lda, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(double) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(double) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnDsyevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, A, lda, W, work, lwork, devInfo)); + CHECK_CUSOLVER(cusolverDnDsyevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, A, lda, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } static inline @@ -160,20 +160,20 @@ void xheevd_wrapper ( int * devInfo = nullptr; int lwork = 0, info_gpu = 0; float2 * work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnCheevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnCheevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(float2) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(float2) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnCheevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, W, work, lwork, devInfo)); + CHECK_CUSOLVER(cusolverDnCheevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } static inline @@ -187,21 +187,21 @@ void xheevd_wrapper ( int * devInfo = nullptr; int lwork = 0, info_gpu = 0; double2 * work = nullptr; - cudaErrcheck(cudaMalloc((void**)&devInfo, sizeof(int))); + CHECK_CUDA(cudaMalloc((void**)&devInfo, sizeof(int))); // calculate the sizes needed for pre-allocated buffer. - cusolverErrcheck(cusolverDnZheevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnZheevd_bufferSize(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, W, &lwork)); // allocate memery - cudaErrcheck(cudaMalloc((void**)&work, sizeof(double2) * lwork)); + CHECK_CUDA(cudaMalloc((void**)&work, sizeof(double2) * lwork)); // compute eigenvalues and eigenvectors. - cusolverErrcheck(cusolverDnZheevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, + CHECK_CUSOLVER(cusolverDnZheevd(cusolver_H, CUSOLVER_EIG_MODE_VECTOR, uplo, n, reinterpret_cast(A), lda, W, work, lwork, devInfo)); - cudaErrcheck(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(&info_gpu, devInfo, sizeof(int), cudaMemcpyDeviceToHost)); assert(0 == info_gpu); - cudaErrcheck(cudaFree(work)); - cudaErrcheck(cudaFree(devInfo)); + CHECK_CUDA(cudaFree(work)); + CHECK_CUDA(cudaFree(devInfo)); } template @@ -212,13 +212,13 @@ struct hegvd_op const int nstart, const int ldh, const T* A, // hcc - const T* B, // scc + T* B, // scc Real* W, // eigenvalue T* V) { // assert(nstart == ldh); // A to V - cudaErrcheck(cudaMemcpy(V, A, sizeof(T) * ldh * nstart, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(V, A, sizeof(T) * ldh * nstart, cudaMemcpyDeviceToDevice)); xhegvd_wrapper(CUBLAS_FILL_MODE_UPPER, nstart, V, ldh, (T*)B, ldh, W); } @@ -238,7 +238,7 @@ struct heevx_op { assert(nstart <= ldh); // A to V - cudaErrcheck(cudaMemcpy(V, A, sizeof(T) * nstart * ldh, cudaMemcpyDeviceToDevice)); + CHECK_CUDA(cudaMemcpy(V, A, sizeof(T) * nstart * ldh, cudaMemcpyDeviceToDevice)); xheevd_wrapper(CUBLAS_FILL_MODE_LOWER, nstart, V, ldh, W); } }; diff --git a/source/source_hsolver/kernels/cuda/helper_cuda.h b/source/source_hsolver/kernels/cuda/helper_cuda.h deleted file mode 100644 index e61e4597f6..0000000000 --- a/source/source_hsolver/kernels/cuda/helper_cuda.h +++ /dev/null @@ -1,968 +0,0 @@ -/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of NVIDIA CORPORATION nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -//////////////////////////////////////////////////////////////////////////////// -// These are CUDA Helper functions for initialization and error checking - -#ifndef COMMON_HELPER_CUDA_H_ -#define COMMON_HELPER_CUDA_H_ - -#pragma once - -#include -#include -#include -#include - -#include "helper_string.h" - -#ifndef EXIT_WAIVED -#define EXIT_WAIVED 2 -#endif - -// Note, it is required that your SDK sample to include the proper header -// files, please refer the CUDA examples for examples of the needed CUDA -// headers, which may change depending on which CUDA functions are used. - -// CUDA Runtime error messages -#ifdef __DRIVER_TYPES_H__ -static const char *_cudaGetErrorEnum(cudaError_t error) { - return cudaGetErrorName(error); -} -#endif - -#ifdef CUDA_DRIVER_API -// CUDA Driver API errors -static const char *_cudaGetErrorEnum(CUresult error) { - static char unknown[] = ""; - const char *ret = NULL; - cuGetErrorName(error, &ret); - return ret ? ret : unknown; -} -#endif - -#ifdef CUBLAS_API_H_ -// cuBLAS API errors -static const char *_cudaGetErrorEnum(cublasStatus_t error) { - switch (error) { - case CUBLAS_STATUS_SUCCESS: - return "CUBLAS_STATUS_SUCCESS"; - - case CUBLAS_STATUS_NOT_INITIALIZED: - return "CUBLAS_STATUS_NOT_INITIALIZED"; - - case CUBLAS_STATUS_ALLOC_FAILED: - return "CUBLAS_STATUS_ALLOC_FAILED"; - - case CUBLAS_STATUS_INVALID_VALUE: - return "CUBLAS_STATUS_INVALID_VALUE"; - - case CUBLAS_STATUS_ARCH_MISMATCH: - return "CUBLAS_STATUS_ARCH_MISMATCH"; - - case CUBLAS_STATUS_MAPPING_ERROR: - return "CUBLAS_STATUS_MAPPING_ERROR"; - - case CUBLAS_STATUS_EXECUTION_FAILED: - return "CUBLAS_STATUS_EXECUTION_FAILED"; - - case CUBLAS_STATUS_INTERNAL_ERROR: - return "CUBLAS_STATUS_INTERNAL_ERROR"; - - case CUBLAS_STATUS_NOT_SUPPORTED: - return "CUBLAS_STATUS_NOT_SUPPORTED"; - - case CUBLAS_STATUS_LICENSE_ERROR: - return "CUBLAS_STATUS_LICENSE_ERROR"; - } - - return ""; -} -#endif - -#ifdef _CUFFT_H_ -// cuFFT API errors -static const char *_cudaGetErrorEnum(cufftResult error) { - switch (error) { - case CUFFT_SUCCESS: - return "CUFFT_SUCCESS"; - - case CUFFT_INVALID_PLAN: - return "CUFFT_INVALID_PLAN"; - - case CUFFT_ALLOC_FAILED: - return "CUFFT_ALLOC_FAILED"; - - case CUFFT_INVALID_TYPE: - return "CUFFT_INVALID_TYPE"; - - case CUFFT_INVALID_VALUE: - return "CUFFT_INVALID_VALUE"; - - case CUFFT_INTERNAL_ERROR: - return "CUFFT_INTERNAL_ERROR"; - - case CUFFT_EXEC_FAILED: - return "CUFFT_EXEC_FAILED"; - - case CUFFT_SETUP_FAILED: - return "CUFFT_SETUP_FAILED"; - - case CUFFT_INVALID_SIZE: - return "CUFFT_INVALID_SIZE"; - - case CUFFT_UNALIGNED_DATA: - return "CUFFT_UNALIGNED_DATA"; - - case CUFFT_INCOMPLETE_PARAMETER_LIST: - return "CUFFT_INCOMPLETE_PARAMETER_LIST"; - - case CUFFT_INVALID_DEVICE: - return "CUFFT_INVALID_DEVICE"; - - case CUFFT_PARSE_ERROR: - return "CUFFT_PARSE_ERROR"; - - case CUFFT_NO_WORKSPACE: - return "CUFFT_NO_WORKSPACE"; - - case CUFFT_NOT_IMPLEMENTED: - return "CUFFT_NOT_IMPLEMENTED"; - - case CUFFT_LICENSE_ERROR: - return "CUFFT_LICENSE_ERROR"; - - case CUFFT_NOT_SUPPORTED: - return "CUFFT_NOT_SUPPORTED"; - } - - return ""; -} -#endif - -#ifdef CUSPARSEAPI -// cuSPARSE API errors -static const char *_cudaGetErrorEnum(cusparseStatus_t error) { - switch (error) { - case CUSPARSE_STATUS_SUCCESS: - return "CUSPARSE_STATUS_SUCCESS"; - - case CUSPARSE_STATUS_NOT_INITIALIZED: - return "CUSPARSE_STATUS_NOT_INITIALIZED"; - - case CUSPARSE_STATUS_ALLOC_FAILED: - return "CUSPARSE_STATUS_ALLOC_FAILED"; - - case CUSPARSE_STATUS_INVALID_VALUE: - return "CUSPARSE_STATUS_INVALID_VALUE"; - - case CUSPARSE_STATUS_ARCH_MISMATCH: - return "CUSPARSE_STATUS_ARCH_MISMATCH"; - - case CUSPARSE_STATUS_MAPPING_ERROR: - return "CUSPARSE_STATUS_MAPPING_ERROR"; - - case CUSPARSE_STATUS_EXECUTION_FAILED: - return "CUSPARSE_STATUS_EXECUTION_FAILED"; - - case CUSPARSE_STATUS_INTERNAL_ERROR: - return "CUSPARSE_STATUS_INTERNAL_ERROR"; - - case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; - } - - return ""; -} -#endif - -#ifdef CUSOLVER_COMMON_H_ -// cuSOLVER API errors -static const char *_cudaGetErrorEnum(cusolverStatus_t error) { - switch (error) { - case CUSOLVER_STATUS_SUCCESS: - return "CUSOLVER_STATUS_SUCCESS"; - case CUSOLVER_STATUS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_ALLOC_FAILED: - return "CUSOLVER_STATUS_ALLOC_FAILED"; - case CUSOLVER_STATUS_INVALID_VALUE: - return "CUSOLVER_STATUS_INVALID_VALUE"; - case CUSOLVER_STATUS_ARCH_MISMATCH: - return "CUSOLVER_STATUS_ARCH_MISMATCH"; - case CUSOLVER_STATUS_MAPPING_ERROR: - return "CUSOLVER_STATUS_MAPPING_ERROR"; - case CUSOLVER_STATUS_EXECUTION_FAILED: - return "CUSOLVER_STATUS_EXECUTION_FAILED"; - case CUSOLVER_STATUS_INTERNAL_ERROR: - return "CUSOLVER_STATUS_INTERNAL_ERROR"; - case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; - case CUSOLVER_STATUS_NOT_SUPPORTED: - return "CUSOLVER_STATUS_NOT_SUPPORTED "; - case CUSOLVER_STATUS_ZERO_PIVOT: - return "CUSOLVER_STATUS_ZERO_PIVOT"; - case CUSOLVER_STATUS_INVALID_LICENSE: - return "CUSOLVER_STATUS_INVALID_LICENSE"; - } - - return ""; -} -#endif - -#ifdef CURAND_H_ -// cuRAND API errors -static const char *_cudaGetErrorEnum(curandStatus_t error) { - switch (error) { - case CURAND_STATUS_SUCCESS: - return "CURAND_STATUS_SUCCESS"; - - case CURAND_STATUS_VERSION_MISMATCH: - return "CURAND_STATUS_VERSION_MISMATCH"; - - case CURAND_STATUS_NOT_INITIALIZED: - return "CURAND_STATUS_NOT_INITIALIZED"; - - case CURAND_STATUS_ALLOCATION_FAILED: - return "CURAND_STATUS_ALLOCATION_FAILED"; - - case CURAND_STATUS_TYPE_ERROR: - return "CURAND_STATUS_TYPE_ERROR"; - - case CURAND_STATUS_OUT_OF_RANGE: - return "CURAND_STATUS_OUT_OF_RANGE"; - - case CURAND_STATUS_LENGTH_NOT_MULTIPLE: - return "CURAND_STATUS_LENGTH_NOT_MULTIPLE"; - - case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED: - return "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED"; - - case CURAND_STATUS_LAUNCH_FAILURE: - return "CURAND_STATUS_LAUNCH_FAILURE"; - - case CURAND_STATUS_PREEXISTING_FAILURE: - return "CURAND_STATUS_PREEXISTING_FAILURE"; - - case CURAND_STATUS_INITIALIZATION_FAILED: - return "CURAND_STATUS_INITIALIZATION_FAILED"; - - case CURAND_STATUS_ARCH_MISMATCH: - return "CURAND_STATUS_ARCH_MISMATCH"; - - case CURAND_STATUS_INTERNAL_ERROR: - return "CURAND_STATUS_INTERNAL_ERROR"; - } - - return ""; -} -#endif - -#ifdef NVJPEGAPI -// nvJPEG API errors -static const char *_cudaGetErrorEnum(nvjpegStatus_t error) { - switch (error) { - case NVJPEG_STATUS_SUCCESS: - return "NVJPEG_STATUS_SUCCESS"; - - case NVJPEG_STATUS_NOT_INITIALIZED: - return "NVJPEG_STATUS_NOT_INITIALIZED"; - - case NVJPEG_STATUS_INVALID_PARAMETER: - return "NVJPEG_STATUS_INVALID_PARAMETER"; - - case NVJPEG_STATUS_BAD_JPEG: - return "NVJPEG_STATUS_BAD_JPEG"; - - case NVJPEG_STATUS_JPEG_NOT_SUPPORTED: - return "NVJPEG_STATUS_JPEG_NOT_SUPPORTED"; - - case NVJPEG_STATUS_ALLOCATOR_FAILURE: - return "NVJPEG_STATUS_ALLOCATOR_FAILURE"; - - case NVJPEG_STATUS_EXECUTION_FAILED: - return "NVJPEG_STATUS_EXECUTION_FAILED"; - - case NVJPEG_STATUS_ARCH_MISMATCH: - return "NVJPEG_STATUS_ARCH_MISMATCH"; - - case NVJPEG_STATUS_INTERNAL_ERROR: - return "NVJPEG_STATUS_INTERNAL_ERROR"; - } - - return ""; -} -#endif - -#ifdef NV_NPPIDEFS_H -// NPP API errors -static const char *_cudaGetErrorEnum(NppStatus error) { - switch (error) { - case NPP_NOT_SUPPORTED_MODE_ERROR: - return "NPP_NOT_SUPPORTED_MODE_ERROR"; - - case NPP_ROUND_MODE_NOT_SUPPORTED_ERROR: - return "NPP_ROUND_MODE_NOT_SUPPORTED_ERROR"; - - case NPP_RESIZE_NO_OPERATION_ERROR: - return "NPP_RESIZE_NO_OPERATION_ERROR"; - - case NPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY: - return "NPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY"; - -#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) <= 0x5000 - - case NPP_BAD_ARG_ERROR: - return "NPP_BAD_ARGUMENT_ERROR"; - - case NPP_COEFF_ERROR: - return "NPP_COEFFICIENT_ERROR"; - - case NPP_RECT_ERROR: - return "NPP_RECTANGLE_ERROR"; - - case NPP_QUAD_ERROR: - return "NPP_QUADRANGLE_ERROR"; - - case NPP_MEM_ALLOC_ERR: - return "NPP_MEMORY_ALLOCATION_ERROR"; - - case NPP_HISTO_NUMBER_OF_LEVELS_ERROR: - return "NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR"; - - case NPP_INVALID_INPUT: - return "NPP_INVALID_INPUT"; - - case NPP_POINTER_ERROR: - return "NPP_POINTER_ERROR"; - - case NPP_WARNING: - return "NPP_WARNING"; - - case NPP_ODD_ROI_WARNING: - return "NPP_ODD_ROI_WARNING"; -#else - - // These are for CUDA 5.5 or higher - case NPP_BAD_ARGUMENT_ERROR: - return "NPP_BAD_ARGUMENT_ERROR"; - - case NPP_COEFFICIENT_ERROR: - return "NPP_COEFFICIENT_ERROR"; - - case NPP_RECTANGLE_ERROR: - return "NPP_RECTANGLE_ERROR"; - - case NPP_QUADRANGLE_ERROR: - return "NPP_QUADRANGLE_ERROR"; - - case NPP_MEMORY_ALLOCATION_ERR: - return "NPP_MEMORY_ALLOCATION_ERROR"; - - case NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR: - return "NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR"; - - case NPP_INVALID_HOST_POINTER_ERROR: - return "NPP_INVALID_HOST_POINTER_ERROR"; - - case NPP_INVALID_DEVICE_POINTER_ERROR: - return "NPP_INVALID_DEVICE_POINTER_ERROR"; -#endif - - case NPP_LUT_NUMBER_OF_LEVELS_ERROR: - return "NPP_LUT_NUMBER_OF_LEVELS_ERROR"; - - case NPP_TEXTURE_BIND_ERROR: - return "NPP_TEXTURE_BIND_ERROR"; - - case NPP_WRONG_INTERSECTION_ROI_ERROR: - return "NPP_WRONG_INTERSECTION_ROI_ERROR"; - - case NPP_NOT_EVEN_STEP_ERROR: - return "NPP_NOT_EVEN_STEP_ERROR"; - - case NPP_INTERPOLATION_ERROR: - return "NPP_INTERPOLATION_ERROR"; - - case NPP_RESIZE_FACTOR_ERROR: - return "NPP_RESIZE_FACTOR_ERROR"; - - case NPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR: - return "NPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR"; - -#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) <= 0x5000 - - case NPP_MEMFREE_ERR: - return "NPP_MEMFREE_ERR"; - - case NPP_MEMSET_ERR: - return "NPP_MEMSET_ERR"; - - case NPP_MEMCPY_ERR: - return "NPP_MEMCPY_ERROR"; - - case NPP_MIRROR_FLIP_ERR: - return "NPP_MIRROR_FLIP_ERR"; -#else - - case NPP_MEMFREE_ERROR: - return "NPP_MEMFREE_ERROR"; - - case NPP_MEMSET_ERROR: - return "NPP_MEMSET_ERROR"; - - case NPP_MEMCPY_ERROR: - return "NPP_MEMCPY_ERROR"; - - case NPP_MIRROR_FLIP_ERROR: - return "NPP_MIRROR_FLIP_ERROR"; -#endif - - case NPP_ALIGNMENT_ERROR: - return "NPP_ALIGNMENT_ERROR"; - - case NPP_STEP_ERROR: - return "NPP_STEP_ERROR"; - - case NPP_SIZE_ERROR: - return "NPP_SIZE_ERROR"; - - case NPP_NULL_POINTER_ERROR: - return "NPP_NULL_POINTER_ERROR"; - - case NPP_CUDA_KERNEL_EXECUTION_ERROR: - return "NPP_CUDA_KERNEL_EXECUTION_ERROR"; - - case NPP_NOT_IMPLEMENTED_ERROR: - return "NPP_NOT_IMPLEMENTED_ERROR"; - - case NPP_ERROR: - return "NPP_ERROR"; - - case NPP_SUCCESS: - return "NPP_SUCCESS"; - - case NPP_WRONG_INTERSECTION_QUAD_WARNING: - return "NPP_WRONG_INTERSECTION_QUAD_WARNING"; - - case NPP_MISALIGNED_DST_ROI_WARNING: - return "NPP_MISALIGNED_DST_ROI_WARNING"; - - case NPP_AFFINE_QUAD_INCORRECT_WARNING: - return "NPP_AFFINE_QUAD_INCORRECT_WARNING"; - - case NPP_DOUBLE_SIZE_WARNING: - return "NPP_DOUBLE_SIZE_WARNING"; - - case NPP_WRONG_INTERSECTION_ROI_WARNING: - return "NPP_WRONG_INTERSECTION_ROI_WARNING"; - -#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) >= 0x6000 - /* These are 6.0 or higher */ - case NPP_LUT_PALETTE_BITSIZE_ERROR: - return "NPP_LUT_PALETTE_BITSIZE_ERROR"; - - case NPP_ZC_MODE_NOT_SUPPORTED_ERROR: - return "NPP_ZC_MODE_NOT_SUPPORTED_ERROR"; - - case NPP_QUALITY_INDEX_ERROR: - return "NPP_QUALITY_INDEX_ERROR"; - - case NPP_CHANNEL_ORDER_ERROR: - return "NPP_CHANNEL_ORDER_ERROR"; - - case NPP_ZERO_MASK_VALUE_ERROR: - return "NPP_ZERO_MASK_VALUE_ERROR"; - - case NPP_NUMBER_OF_CHANNELS_ERROR: - return "NPP_NUMBER_OF_CHANNELS_ERROR"; - - case NPP_COI_ERROR: - return "NPP_COI_ERROR"; - - case NPP_DIVISOR_ERROR: - return "NPP_DIVISOR_ERROR"; - - case NPP_CHANNEL_ERROR: - return "NPP_CHANNEL_ERROR"; - - case NPP_STRIDE_ERROR: - return "NPP_STRIDE_ERROR"; - - case NPP_ANCHOR_ERROR: - return "NPP_ANCHOR_ERROR"; - - case NPP_MASK_SIZE_ERROR: - return "NPP_MASK_SIZE_ERROR"; - - case NPP_MOMENT_00_ZERO_ERROR: - return "NPP_MOMENT_00_ZERO_ERROR"; - - case NPP_THRESHOLD_NEGATIVE_LEVEL_ERROR: - return "NPP_THRESHOLD_NEGATIVE_LEVEL_ERROR"; - - case NPP_THRESHOLD_ERROR: - return "NPP_THRESHOLD_ERROR"; - - case NPP_CONTEXT_MATCH_ERROR: - return "NPP_CONTEXT_MATCH_ERROR"; - - case NPP_FFT_FLAG_ERROR: - return "NPP_FFT_FLAG_ERROR"; - - case NPP_FFT_ORDER_ERROR: - return "NPP_FFT_ORDER_ERROR"; - - case NPP_SCALE_RANGE_ERROR: - return "NPP_SCALE_RANGE_ERROR"; - - case NPP_DATA_TYPE_ERROR: - return "NPP_DATA_TYPE_ERROR"; - - case NPP_OUT_OFF_RANGE_ERROR: - return "NPP_OUT_OFF_RANGE_ERROR"; - - case NPP_DIVIDE_BY_ZERO_ERROR: - return "NPP_DIVIDE_BY_ZERO_ERROR"; - - case NPP_RANGE_ERROR: - return "NPP_RANGE_ERROR"; - - case NPP_NO_MEMORY_ERROR: - return "NPP_NO_MEMORY_ERROR"; - - case NPP_ERROR_RESERVED: - return "NPP_ERROR_RESERVED"; - - case NPP_NO_OPERATION_WARNING: - return "NPP_NO_OPERATION_WARNING"; - - case NPP_DIVIDE_BY_ZERO_WARNING: - return "NPP_DIVIDE_BY_ZERO_WARNING"; -#endif - -#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) >= 0x7000 - /* These are 7.0 or higher */ - case NPP_OVERFLOW_ERROR: - return "NPP_OVERFLOW_ERROR"; - - case NPP_CORRUPTED_DATA_ERROR: - return "NPP_CORRUPTED_DATA_ERROR"; -#endif - } - - return ""; -} -#endif - -template -void check(T result, char const *const func, const char *const file, - int const line) { - if (result) { - fprintf(stderr, "CUDA error at %s:%d code=%d(%s) \"%s\" \n", file, line, - static_cast(result), _cudaGetErrorEnum(result), func); - exit(EXIT_FAILURE); - } -} - -#ifdef __DRIVER_TYPES_H__ -// This will output the proper CUDA error strings in the event -// that a CUDA host call returns an error -#define checkCudaErrors(val) check((val), #val, __FILE__, __LINE__) - -// This will output the proper error string when calling cudaGetLastError -#define getLastCudaError(msg) __getLastCudaError(msg, __FILE__, __LINE__) - -inline void __getLastCudaError(const char *errorMessage, const char *file, - const int line) { - cudaError_t err = cudaGetLastError(); - - if (cudaSuccess != err) { - fprintf(stderr, - "%s(%i) : getLastCudaError() CUDA error :" - " %s : (%d) %s.\n", - file, line, errorMessage, static_cast(err), - cudaGetErrorString(err)); - exit(EXIT_FAILURE); - } -} - -// This will only print the proper error string when calling cudaGetLastError -// but not exit program incase error detected. -#define printLastCudaError(msg) __printLastCudaError(msg, __FILE__, __LINE__) - -inline void __printLastCudaError(const char *errorMessage, const char *file, - const int line) { - cudaError_t err = cudaGetLastError(); - - if (cudaSuccess != err) { - fprintf(stderr, - "%s(%i) : getLastCudaError() CUDA error :" - " %s : (%d) %s.\n", - file, line, errorMessage, static_cast(err), - cudaGetErrorString(err)); - } -} -#endif - -#ifndef MAX -#define MAX(a, b) (a > b ? a : b) -#endif - -// Float To Int conversion -inline int ftoi(float value) { - return (value >= 0 ? static_cast(value + 0.5) - : static_cast(value - 0.5)); -} - -// Beginning of GPU Architecture definitions -inline int _ConvertSMVer2Cores(int major, int minor) { - // Defines for GPU Architecture types (using the SM version to determine - // the # of cores per SM - typedef struct { - int SM; // 0xMm (hexidecimal notation), M = SM Major version, - // and m = SM minor version - int Cores; - } sSMtoCores; - - sSMtoCores nGpuArchCoresPerSM[] = { - {0x30, 192}, - {0x32, 192}, - {0x35, 192}, - {0x37, 192}, - {0x50, 128}, - {0x52, 128}, - {0x53, 128}, - {0x60, 64}, - {0x61, 128}, - {0x62, 128}, - {0x70, 64}, - {0x72, 64}, - {0x75, 64}, - {0x80, 64}, - {0x86, 128}, - {0x87, 128}, - {-1, -1}}; - - int index = 0; - - while (nGpuArchCoresPerSM[index].SM != -1) { - if (nGpuArchCoresPerSM[index].SM == ((major << 4) + minor)) { - return nGpuArchCoresPerSM[index].Cores; - } - - index++; - } - - // If we don't find the values, we default use the previous one - // to run properly - printf( - "MapSMtoCores for SM %d.%d is undefined." - " Default to use %d Cores/SM\n", - major, minor, nGpuArchCoresPerSM[index - 1].Cores); - return nGpuArchCoresPerSM[index - 1].Cores; -} - -inline const char* _ConvertSMVer2ArchName(int major, int minor) { - // Defines for GPU Architecture types (using the SM version to determine - // the GPU Arch name) - typedef struct { - int SM; // 0xMm (hexidecimal notation), M = SM Major version, - // and m = SM minor version - const char* name; - } sSMtoArchName; - - sSMtoArchName nGpuArchNameSM[] = { - {0x30, "Kepler"}, - {0x32, "Kepler"}, - {0x35, "Kepler"}, - {0x37, "Kepler"}, - {0x50, "Maxwell"}, - {0x52, "Maxwell"}, - {0x53, "Maxwell"}, - {0x60, "Pascal"}, - {0x61, "Pascal"}, - {0x62, "Pascal"}, - {0x70, "Volta"}, - {0x72, "Xavier"}, - {0x75, "Turing"}, - {0x80, "Ampere"}, - {0x86, "Ampere"}, - {-1, "Graphics Device"}}; - - int index = 0; - - while (nGpuArchNameSM[index].SM != -1) { - if (nGpuArchNameSM[index].SM == ((major << 4) + minor)) { - return nGpuArchNameSM[index].name; - } - - index++; - } - - // If we don't find the values, we default use the previous one - // to run properly - printf( - "MapSMtoArchName for SM %d.%d is undefined." - " Default to use %s\n", - major, minor, nGpuArchNameSM[index - 1].name); - return nGpuArchNameSM[index - 1].name; -} - // end of GPU Architecture definitions - -#ifdef __CUDA_RUNTIME_H__ -// General GPU Device CUDA Initialization -inline int gpuDeviceInit(int devID) { - int device_count; - checkCudaErrors(cudaGetDeviceCount(&device_count)); - - if (device_count == 0) { - fprintf(stderr, - "gpuDeviceInit() CUDA error: " - "no devices supporting CUDA.\n"); - exit(EXIT_FAILURE); - } - - if (devID < 0) { - devID = 0; - } - - if (devID > device_count - 1) { - fprintf(stderr, "\n"); - fprintf(stderr, ">> %d CUDA capable GPU device(s) detected. <<\n", - device_count); - fprintf(stderr, - ">> gpuDeviceInit (-device=%d) is not a valid" - " GPU device. <<\n", - devID); - fprintf(stderr, "\n"); - return -devID; - } - - int computeMode = -1, major = 0, minor = 0; - checkCudaErrors(cudaDeviceGetAttribute(&computeMode, cudaDevAttrComputeMode, devID)); - checkCudaErrors(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, devID)); - checkCudaErrors(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, devID)); - if (computeMode == cudaComputeModeProhibited) { - fprintf(stderr, - "Error: device is running in , no threads can use cudaSetDevice().\n"); - return -1; - } - - if (major < 1) { - fprintf(stderr, "gpuDeviceInit(): GPU device does not support CUDA.\n"); - exit(EXIT_FAILURE); - } - - checkCudaErrors(cudaSetDevice(devID)); - printf("gpuDeviceInit() CUDA Device [%d]: \"%s\n", devID, _ConvertSMVer2ArchName(major, minor)); - - return devID; -} - -// This function returns the best GPU (with maximum GFLOPS) -inline int gpuGetMaxGflopsDeviceId() { - int current_device = 0, sm_per_multiproc = 0; - int max_perf_device = 0; - int device_count = 0; - int devices_prohibited = 0; - - uint64_t max_compute_perf = 0; - checkCudaErrors(cudaGetDeviceCount(&device_count)); - - if (device_count == 0) { - fprintf(stderr, - "gpuGetMaxGflopsDeviceId() CUDA error:" - " no devices supporting CUDA.\n"); - exit(EXIT_FAILURE); - } - - // Find the best CUDA capable GPU device - current_device = 0; - - while (current_device < device_count) { - int computeMode = -1, major = 0, minor = 0; - checkCudaErrors(cudaDeviceGetAttribute(&computeMode, cudaDevAttrComputeMode, current_device)); - checkCudaErrors(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, current_device)); - checkCudaErrors(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, current_device)); - - // If this GPU is not running on Compute Mode prohibited, - // then we can add it to the list - if (computeMode != cudaComputeModeProhibited) { - if (major == 9999 && minor == 9999) { - sm_per_multiproc = 1; - } else { - sm_per_multiproc = - _ConvertSMVer2Cores(major, minor); - } - int multiProcessorCount = 0, clockRate = 0; - checkCudaErrors(cudaDeviceGetAttribute(&multiProcessorCount, cudaDevAttrMultiProcessorCount, current_device)); - cudaError_t result = cudaDeviceGetAttribute(&clockRate, cudaDevAttrClockRate, current_device); - if (result != cudaSuccess) { - // If cudaDevAttrClockRate attribute is not supported we - // set clockRate as 1, to consider GPU with most SMs and CUDA Cores. - if(result == cudaErrorInvalidValue) { - clockRate = 1; - } - else { - fprintf(stderr, "CUDA error at %s:%d code=%d(%s) \n", __FILE__, __LINE__, - static_cast(result), _cudaGetErrorEnum(result)); - exit(EXIT_FAILURE); - } - } - uint64_t compute_perf = (uint64_t)multiProcessorCount * sm_per_multiproc * clockRate; - - if (compute_perf > max_compute_perf) { - max_compute_perf = compute_perf; - max_perf_device = current_device; - } - } else { - devices_prohibited++; - } - - ++current_device; - } - - if (devices_prohibited == device_count) { - fprintf(stderr, - "gpuGetMaxGflopsDeviceId() CUDA error:" - " all devices have compute mode prohibited.\n"); - exit(EXIT_FAILURE); - } - - return max_perf_device; -} - -// Initialization code to find the best CUDA Device -inline int findCudaDevice(int argc, const char **argv) { - int devID = 0; - - // If the command-line has a device number specified, use it - if (checkCmdLineFlag(argc, argv, "device")) { - devID = getCmdLineArgumentInt(argc, argv, "device="); - - if (devID < 0) { - printf("Invalid command line parameter\n "); - exit(EXIT_FAILURE); - } else { - devID = gpuDeviceInit(devID); - - if (devID < 0) { - printf("exiting...\n"); - exit(EXIT_FAILURE); - } - } - } else { - // Otherwise pick the device with highest Gflops/s - devID = gpuGetMaxGflopsDeviceId(); - checkCudaErrors(cudaSetDevice(devID)); - int major = 0, minor = 0; - checkCudaErrors(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, devID)); - checkCudaErrors(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, devID)); - printf("GPU Device %d: \"%s\" with compute capability %d.%d\n\n", - devID, _ConvertSMVer2ArchName(major, minor), major, minor); - - } - - return devID; -} - -inline int findIntegratedGPU() { - int current_device = 0; - int device_count = 0; - int devices_prohibited = 0; - - checkCudaErrors(cudaGetDeviceCount(&device_count)); - - if (device_count == 0) { - fprintf(stderr, "CUDA error: no devices supporting CUDA.\n"); - exit(EXIT_FAILURE); - } - - // Find the integrated GPU which is compute capable - while (current_device < device_count) { - int computeMode = -1, integrated = -1; - checkCudaErrors(cudaDeviceGetAttribute(&computeMode, cudaDevAttrComputeMode, current_device)); - checkCudaErrors(cudaDeviceGetAttribute(&integrated, cudaDevAttrIntegrated, current_device)); - // If GPU is integrated and is not running on Compute Mode prohibited, - // then cuda can map to GLES resource - if (integrated && (computeMode != cudaComputeModeProhibited)) { - checkCudaErrors(cudaSetDevice(current_device)); - - int major = 0, minor = 0; - checkCudaErrors(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, current_device)); - checkCudaErrors(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, current_device)); - printf("GPU Device %d: \"%s\" with compute capability %d.%d\n\n", - current_device, _ConvertSMVer2ArchName(major, minor), major, minor); - - return current_device; - } else { - devices_prohibited++; - } - - current_device++; - } - - if (devices_prohibited == device_count) { - fprintf(stderr, - "CUDA error:" - " No GLES-CUDA Interop capable GPU found.\n"); - exit(EXIT_FAILURE); - } - - return -1; -} - -// General check for CUDA GPU SM Capabilities -inline bool checkCudaCapabilities(int major_version, int minor_version) { - int dev; - int major = 0, minor = 0; - - checkCudaErrors(cudaGetDevice(&dev)); - checkCudaErrors(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, dev)); - checkCudaErrors(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, dev)); - - if ((major > major_version) || - (major == major_version && - minor >= minor_version)) { - printf(" Device %d: <%16s >, Compute SM %d.%d detected\n", dev, - _ConvertSMVer2ArchName(major, minor), major, minor); - return true; - } else { - printf( - " No GPU device was found that can support " - "CUDA compute capability %d.%d.\n", - major_version, minor_version); - return false; - } -} -#endif - - // end of CUDA Helper Functions - -#endif // COMMON_HELPER_CUDA_H_ \ No newline at end of file diff --git a/source/source_hsolver/kernels/cuda/helper_cusolver.h b/source/source_hsolver/kernels/cuda/helper_cusolver.h deleted file mode 100644 index 1beca4c6c7..0000000000 --- a/source/source_hsolver/kernels/cuda/helper_cusolver.h +++ /dev/null @@ -1,116 +0,0 @@ -// by zhanghaochong 20240529 -// The reason that I create a new helper file is the header file of helper_cuda.h is tooooo long - -#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HSOLVER_KERNELS_CUDA_HELPER_CUSOLVER_H -#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HSOLVER_KERNELS_CUDA_HELPER_CUSOLVER_H -#ifdef __CUSOLVERMP -#include - -const char* calGetErrorString(calError_t status) -{ - switch (status) - { - case CAL_OK: - return "CAL_OK"; - case CAL_ERROR: - return "CAL_ERROR"; - case CAL_ERROR_INVALID_PARAMETER: - return "CAL_ERROR_INVALID_PARAMETER"; - case CAL_ERROR_INTERNAL: - return "CAL_ERROR_INTERNAL"; - case CAL_ERROR_CUDA: - return "CAL_ERROR_CUDA"; - case CAL_ERROR_UCC: - return "CAL_ERROR_UCC"; - case CAL_ERROR_NOT_SUPPORTED: - return "CAL_ERROR_NOT_SUPPORTED"; - case CAL_ERROR_INPROGRESS: - return "CAL_ERROR_INPROGRESS"; - default: - return "CAL UNKNOWN ERROR"; - } -} - -#define CAL_CHECK(cmd) \ - do \ - { \ - calError_t status = cmd; \ - if (status != CAL_OK) \ - { \ - fprintf(stderr, "ERROR: %s %s %d\n", calGetErrorString(status), __FILE__, __LINE__); \ - abort(); \ - } \ - } while (0) -#endif - -const char* cusolverGetErrorString(cusolverStatus_t status) -{ - switch (status) - { - case CUSOLVER_STATUS_SUCCESS: - return "CUSOLVER_STATUS_SUCCESS"; - case CUSOLVER_STATUS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_ALLOC_FAILED: - return "CUSOLVER_STATUS_ALLOC_FAILED"; - case CUSOLVER_STATUS_INVALID_VALUE: - return "CUSOLVER_STATUS_INVALID_VALUE"; - case CUSOLVER_STATUS_ARCH_MISMATCH: - return "CUSOLVER_STATUS_ARCH_MISMATCH"; - case CUSOLVER_STATUS_MAPPING_ERROR: - return "CUSOLVER_STATUS_MAPPING_ERROR"; - case CUSOLVER_STATUS_EXECUTION_FAILED: - return "CUSOLVER_STATUS_EXECUTION_FAILED"; - case CUSOLVER_STATUS_INTERNAL_ERROR: - return "CUSOLVER_STATUS_INTERNAL_ERROR"; - case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; - case CUSOLVER_STATUS_NOT_SUPPORTED: - return "CUSOLVER_STATUS_NOT_SUPPORTED"; - case CUSOLVER_STATUS_ZERO_PIVOT: - return "CUSOLVER_STATUS_ZERO_PIVOT"; - case CUSOLVER_STATUS_INVALID_LICENSE: - return "CUSOLVER_STATUS_INVALID_LICENSE"; - case CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_IRS_PARAMS_INVALID: - return "CUSOLVER_STATUS_IRS_PARAMS_INVALID"; - case CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC: - return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_PREC"; - case CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE: - return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_REFINE"; - case CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER: - return "CUSOLVER_STATUS_IRS_PARAMS_INVALID_MAXITER"; - case CUSOLVER_STATUS_IRS_INTERNAL_ERROR: - return "CUSOLVER_STATUS_IRS_INTERNAL_ERROR"; - case CUSOLVER_STATUS_IRS_NOT_SUPPORTED: - return "CUSOLVER_STATUS_IRS_NOT_SUPPORTED"; - case CUSOLVER_STATUS_IRS_OUT_OF_RANGE: - return "CUSOLVER_STATUS_IRS_OUT_OF_RANGE"; - case CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES: - return "CUSOLVER_STATUS_IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES"; - case CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED: - return "CUSOLVER_STATUS_IRS_INFOS_NOT_INITIALIZED"; - case CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED: - return "CUSOLVER_STATUS_IRS_INFOS_NOT_DESTROYED"; - case CUSOLVER_STATUS_IRS_MATRIX_SINGULAR: - return "CUSOLVER_STATUS_IRS_MATRIX_SINGULAR"; - case CUSOLVER_STATUS_INVALID_WORKSPACE: - return "CUSOLVER_STATUS_INVALID_WORKSPACE"; - default: - return "CUSOLVER UNKNOWN ERROR"; - } -} - -#define CUSOLVER_CHECK(cmd) \ - do \ - { \ - cusolverStatus_t status = cmd; \ - if (status != CUSOLVER_STATUS_SUCCESS) \ - { \ - fprintf(stderr, "ERROR: %s %s %d\n", cusolverGetErrorString(status), __FILE__, __LINE__); \ - abort(); \ - } \ - } while (0) - -#endif // W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HSOLVER_KERNELS_CUDA_HELPER_CUSOLVER_H \ No newline at end of file diff --git a/source/source_hsolver/kernels/cuda/helper_string.h b/source/source_hsolver/kernels/cuda/helper_string.h deleted file mode 100644 index 47fb1ac1fa..0000000000 --- a/source/source_hsolver/kernels/cuda/helper_string.h +++ /dev/null @@ -1,428 +0,0 @@ -/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of NVIDIA CORPORATION nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// These are helper functions for the SDK samples (string parsing, timers, etc) -#ifndef COMMON_HELPER_STRING_H_ -#define COMMON_HELPER_STRING_H_ - -#include -#include -#include -#include - -#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE -#endif -#ifndef STRCASECMP -#define STRCASECMP _stricmp -#endif -#ifndef STRNCASECMP -#define STRNCASECMP _strnicmp -#endif -#ifndef STRCPY -#define STRCPY(sFilePath, nLength, sPath) strcpy_s(sFilePath, nLength, sPath) -#endif - -#ifndef FOPEN -#define FOPEN(fHandle, filename, mode) fopen_s(&fHandle, filename, mode) -#endif -#ifndef FOPEN_FAIL -#define FOPEN_FAIL(result) (result != 0) -#endif -#ifndef SSCANF -#define SSCANF sscanf_s -#endif -#ifndef SPRINTF -#define SPRINTF sprintf_s -#endif -#else // Linux Includes -#include -#include - -#ifndef STRCASECMP -#define STRCASECMP strcasecmp -#endif -#ifndef STRNCASECMP -#define STRNCASECMP strncasecmp -#endif -#ifndef STRCPY -#define STRCPY(sFilePath, nLength, sPath) strcpy(sFilePath, sPath) -#endif - -#ifndef FOPEN -#define FOPEN(fHandle, filename, mode) (fHandle = fopen(filename, mode)) -#endif -#ifndef FOPEN_FAIL -#define FOPEN_FAIL(result) (result == NULL) -#endif -#ifndef SSCANF -#define SSCANF sscanf -#endif -#ifndef SPRINTF -#define SPRINTF sprintf -#endif -#endif - -#ifndef EXIT_WAIVED -#define EXIT_WAIVED 2 -#endif - -// CUDA Utility Helper Functions -inline int stringRemoveDelimiter(char delimiter, const char *string) { - int string_start = 0; - - while (string[string_start] == delimiter) { - string_start++; - } - - if (string_start >= static_cast(strlen(string) - 1)) { - return 0; - } - - return string_start; -} - -inline int getFileExtension(char *filename, char **extension) { - int string_length = static_cast(strlen(filename)); - - while (filename[string_length--] != '.') { - if (string_length == 0) break; - } - - if (string_length > 0) string_length += 2; - - if (string_length == 0) - *extension = NULL; - else - *extension = &filename[string_length]; - - return string_length; -} - -inline bool checkCmdLineFlag(const int argc, const char **argv, - const char *string_ref) { - bool bFound = false; - - if (argc >= 1) { - for (int i = 1; i < argc; i++) { - int string_start = stringRemoveDelimiter('-', argv[i]); - const char *string_argv = &argv[i][string_start]; - - const char *equal_pos = strchr(string_argv, '='); - int argv_length = static_cast( - equal_pos == 0 ? strlen(string_argv) : equal_pos - string_argv); - - int length = static_cast(strlen(string_ref)); - - if (length == argv_length && - !STRNCASECMP(string_argv, string_ref, length)) { - bFound = true; - continue; - } - } - } - - return bFound; -} - -// This function wraps the CUDA Driver API into a template function -template -inline bool getCmdLineArgumentValue(const int argc, const char **argv, - const char *string_ref, T *value) { - bool bFound = false; - - if (argc >= 1) { - for (int i = 1; i < argc; i++) { - int string_start = stringRemoveDelimiter('-', argv[i]); - const char *string_argv = &argv[i][string_start]; - int length = static_cast(strlen(string_ref)); - - if (!STRNCASECMP(string_argv, string_ref, length)) { - if (length + 1 <= static_cast(strlen(string_argv))) { - int auto_inc = (string_argv[length] == '=') ? 1 : 0; - *value = (T)atoi(&string_argv[length + auto_inc]); - } - - bFound = true; - i = argc; - } - } - } - - return bFound; -} - -inline int getCmdLineArgumentInt(const int argc, const char **argv, - const char *string_ref) { - bool bFound = false; - int value = -1; - - if (argc >= 1) { - for (int i = 1; i < argc; i++) { - int string_start = stringRemoveDelimiter('-', argv[i]); - const char *string_argv = &argv[i][string_start]; - int length = static_cast(strlen(string_ref)); - - if (!STRNCASECMP(string_argv, string_ref, length)) { - if (length + 1 <= static_cast(strlen(string_argv))) { - int auto_inc = (string_argv[length] == '=') ? 1 : 0; - value = atoi(&string_argv[length + auto_inc]); - } else { - value = 0; - } - - bFound = true; - continue; - } - } - } - - if (bFound) { - return value; - } else { - return 0; - } -} - -inline float getCmdLineArgumentFloat(const int argc, const char **argv, - const char *string_ref) { - bool bFound = false; - float value = -1; - - if (argc >= 1) { - for (int i = 1; i < argc; i++) { - int string_start = stringRemoveDelimiter('-', argv[i]); - const char *string_argv = &argv[i][string_start]; - int length = static_cast(strlen(string_ref)); - - if (!STRNCASECMP(string_argv, string_ref, length)) { - if (length + 1 <= static_cast(strlen(string_argv))) { - int auto_inc = (string_argv[length] == '=') ? 1 : 0; - value = static_cast(atof(&string_argv[length + auto_inc])); - } else { - value = 0.f; - } - - bFound = true; - continue; - } - } - } - - if (bFound) { - return value; - } else { - return 0; - } -} - -inline bool getCmdLineArgumentString(const int argc, const char **argv, - const char *string_ref, - char **string_retval) { - bool bFound = false; - - if (argc >= 1) { - for (int i = 1; i < argc; i++) { - int string_start = stringRemoveDelimiter('-', argv[i]); - char *string_argv = const_cast(&argv[i][string_start]); - int length = static_cast(strlen(string_ref)); - - if (!STRNCASECMP(string_argv, string_ref, length)) { - *string_retval = &string_argv[length + 1]; - bFound = true; - continue; - } - } - } - - if (!bFound) { - *string_retval = NULL; - } - - return bFound; -} - -////////////////////////////////////////////////////////////////////////////// -//! Find the path for a file assuming that -//! files are found in the searchPath. -//! -//! @return the path if succeeded, otherwise 0 -//! @param filename name of the file -//! @param executable_path optional absolute path of the executable -////////////////////////////////////////////////////////////////////////////// -inline char *sdkFindFilePath(const char *filename, - const char *executable_path) { - // defines a variable that is replaced with the name of the - // executable - - // Typical relative search paths to locate needed companion files (e.g. sample - // input data, or JIT source files) The origin for the relative search may be - // the .exe file, a .bat file launching an .exe, a browser .exe launching the - // .exe or .bat, etc - const char *searchPath[] = { - "./", // same dir - "./data/", // same dir - - "../../../../Samples//", // up 4 in tree - "../../../Samples//", // up 3 in tree - "../../Samples//", // up 2 in tree - - "../../../../Samples//data/", // up 4 in tree - "../../../Samples//data/", // up 3 in tree - "../../Samples//data/", // up 2 in tree - - "../../../../Samples/0_Introduction//", // up 4 in tree - "../../../Samples/0_Introduction//", // up 3 in tree - "../../Samples/0_Introduction//", // up 2 in tree - - "../../../../Samples/1_Utilities//", // up 4 in tree - "../../../Samples/1_Utilities//", // up 3 in tree - "../../Samples/1_Utilities//", // up 2 in tree - - "../../../../Samples/2_Concepts_and_Techniques//", // up 4 in tree - "../../../Samples/2_Concepts_and_Techniques//", // up 3 in tree - "../../Samples/2_Concepts_and_Techniques//", // up 2 in tree - - "../../../../Samples/3_CUDA_Features//", // up 4 in tree - "../../../Samples/3_CUDA_Features//", // up 3 in tree - "../../Samples/3_CUDA_Features//", // up 2 in tree - - "../../../../Samples/4_CUDA_Libraries//", // up 4 in tree - "../../../Samples/4_CUDA_Libraries//", // up 3 in tree - "../../Samples/4_CUDA_Libraries//", // up 2 in tree - - "../../../../Samples/5_Domain_Specific//", // up 4 in tree - "../../../Samples/5_Domain_Specific//", // up 3 in tree - "../../Samples/5_Domain_Specific//", // up 2 in tree - - "../../../../Samples/6_Performance//", // up 4 in tree - "../../../Samples/6_Performance//", // up 3 in tree - "../../Samples/6_Performance//", // up 2 in tree - - "../../../../Samples/0_Introduction//data/", // up 4 in tree - "../../../Samples/0_Introduction//data/", // up 3 in tree - "../../Samples/0_Introduction//data/", // up 2 in tree - - "../../../../Samples/1_Utilities//data/", // up 4 in tree - "../../../Samples/1_Utilities//data/", // up 3 in tree - "../../Samples/1_Utilities//data/", // up 2 in tree - - "../../../../Samples/2_Concepts_and_Techniques//data/", // up 4 in tree - "../../../Samples/2_Concepts_and_Techniques//data/", // up 3 in tree - "../../Samples/2_Concepts_and_Techniques//data/", // up 2 in tree - - "../../../../Samples/3_CUDA_Features//data/", // up 4 in tree - "../../../Samples/3_CUDA_Features//data/", // up 3 in tree - "../../Samples/3_CUDA_Features//data/", // up 2 in tree - - "../../../../Samples/4_CUDA_Libraries//data/", // up 4 in tree - "../../../Samples/4_CUDA_Libraries//data/", // up 3 in tree - "../../Samples/4_CUDA_Libraries//data/", // up 2 in tree - - "../../../../Samples/5_Domain_Specific//data/", // up 4 in tree - "../../../Samples/5_Domain_Specific//data/", // up 3 in tree - "../../Samples/5_Domain_Specific//data/", // up 2 in tree - - "../../../../Samples/6_Performance//data/", // up 4 in tree - "../../../Samples/6_Performance//data/", // up 3 in tree - "../../Samples/6_Performance//data/", // up 2 in tree - - "../../../../Common/data/", // up 4 in tree - "../../../Common/data/", // up 3 in tree - "../../Common/data/" // up 2 in tree - }; - - // Extract the executable name - std::string executable_name; - - if (executable_path != 0) { - executable_name = std::string(executable_path); - -#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) - // Windows path delimiter - size_t delimiter_pos = executable_name.find_last_of('\\'); - executable_name.erase(0, delimiter_pos + 1); - - if (executable_name.rfind(".exe") != std::string::npos) { - // we strip .exe, only if the .exe is found - executable_name.resize(executable_name.size() - 4); - } - -#else - // Linux & OSX path delimiter - size_t delimiter_pos = executable_name.find_last_of('/'); - executable_name.erase(0, delimiter_pos + 1); -#endif - } - - // Loop over all search paths and return the first hit - for (unsigned int i = 0; i < sizeof(searchPath) / sizeof(char *); ++i) { - std::string path(searchPath[i]); - size_t executable_name_pos = path.find(""); - - // If there is executable_name variable in the searchPath - // replace it with the value - if (executable_name_pos != std::string::npos) { - if (executable_path != 0) { - path.replace(executable_name_pos, strlen(""), - executable_name); - } else { - // Skip this path entry if no executable argument is given - continue; - } - } - -#ifdef _DEBUG - printf("sdkFindFilePath <%s> in %s\n", filename, path.c_str()); -#endif - - // Test if the file exists - path.append(filename); - FILE *fp; - FOPEN(fp, path.c_str(), "rb"); - - if (fp != NULL) { - fclose(fp); - // File found - // returning an allocated array here for backwards compatibility reasons - char *file_path = reinterpret_cast(malloc(path.length() + 1)); - STRCPY(file_path, path.length() + 1, path.c_str()); - return file_path; - } - - if (fp) { - fclose(fp); - } - } - - // File not found - printf("\nerror: sdkFindFilePath: file <%s> not found!\n", filename); - return 0; -} - -#endif // COMMON_HELPER_STRING_H_ \ No newline at end of file diff --git a/source/source_hsolver/kernels/hegvd_op.cpp b/source/source_hsolver/kernels/hegvd_op.cpp index aa9d56239b..e9ecb10388 100644 --- a/source/source_hsolver/kernels/hegvd_op.cpp +++ b/source/source_hsolver/kernels/hegvd_op.cpp @@ -17,7 +17,7 @@ struct hegvd_op const int nstart, const int ldh, const T* hcc, - const T* scc, + T* scc, Real* eigenvalue, T* vcc) { diff --git a/source/source_hsolver/kernels/hegvd_op.h b/source/source_hsolver/kernels/hegvd_op.h index 5381f97415..dfe1aaf287 100644 --- a/source/source_hsolver/kernels/hegvd_op.h +++ b/source/source_hsolver/kernels/hegvd_op.h @@ -64,7 +64,7 @@ struct hegvd_op /// Output Parameter /// @param W : calculated eigenvalues /// @param V : calculated eigenvectors (col major) - void operator()(const Device* d, const int nstart, const int ldh, const T* A, const T* B, Real* W, T* V); + void operator()(const Device* d, const int nstart, const int ldh, const T* A, T* B, Real* W, T* V); }; // template diff --git a/source/source_hsolver/kernels/rocm/hegvd_op.hip.cu b/source/source_hsolver/kernels/rocm/hegvd_op.hip.cu index 121180de85..93b3457af6 100644 --- a/source/source_hsolver/kernels/rocm/hegvd_op.hip.cu +++ b/source/source_hsolver/kernels/rocm/hegvd_op.hip.cu @@ -32,7 +32,7 @@ void hegvd_op::operator()(const base_device::DE const int nstart, const int ldh, const double* _hcc, - const double* _scc, + double* _scc, double* _eigenvalue, double* _vcc) { diff --git a/source/source_hsolver/module_genelpa/elpa_new.cpp b/source/source_hsolver/module_genelpa/elpa_new.cpp index 3d214d20fd..d045482190 100644 --- a/source/source_hsolver/module_genelpa/elpa_new.cpp +++ b/source/source_hsolver/module_genelpa/elpa_new.cpp @@ -57,7 +57,7 @@ ELPA_Solver::ELPA_Solver(const bool isReal, else kernel_id = read_complex_kernel(); // cout<<"kernel id is inited as "< NEW_ELPA_HANDLE_POOL; - static int total_handle; + static int total_handle = 0; #ifdef _OPENMP int num_threads = omp_get_max_threads(); @@ -270,7 +270,7 @@ int ELPA_Solver::read_cpuflag() int ELPA_Solver::read_real_kernel() { - int kernel_id; + int kernel_id = 0; if (const char* env = getenv("ELPA_DEFAULT_real_kernel")) { @@ -454,7 +454,7 @@ int ELPA_Solver::read_complex_kernel() int ELPA_Solver::allocate_work() { unsigned long nloc = static_cast(narows) * nacols; // local size - unsigned long maxloc; // maximum local size + unsigned long maxloc = 0; // maximum local size MPI_Allreduce(&nloc, &maxloc, 1, MPI_UNSIGNED_LONG, MPI_MAX, comm); maxloc = nloc; @@ -467,7 +467,7 @@ int ELPA_Solver::allocate_work() void ELPA_Solver::timer(int myid, const char function[], const char step[], double& t0) { - double t1; + double t1 = 0.0; if (t0 < 0) // t0 < 0 means this is the init call before the function { t0 = MPI_Wtime(); diff --git a/source/source_hsolver/module_genelpa/elpa_new_complex.cpp b/source/source_hsolver/module_genelpa/elpa_new_complex.cpp index 0c78009522..cf28835942 100644 --- a/source/source_hsolver/module_genelpa/elpa_new_complex.cpp +++ b/source/source_hsolver/module_genelpa/elpa_new_complex.cpp @@ -19,9 +19,9 @@ extern std::map NEW_ELPA_HANDLE_POOL; int ELPA_Solver::eigenvector(std::complex* A, double* EigenValue, std::complex* EigenVector) { - int info; - int allinfo; - double t; + int info = 0; + int allinfo = 0; + double t = 0.0; if((loglevel>0 && myid==0) || loglevel>1) { @@ -42,7 +42,7 @@ int ELPA_Solver::generalized_eigenvector(std::complex* A, std::complex* EigenVector) { int info, allinfo; - double t; + double t = 0.0; if((loglevel>0 && myid==0) || loglevel>1) { @@ -164,7 +164,7 @@ int ELPA_Solver::decomposeRightMatrix(std::complex* B, double* EigenValu { int info=0; int allinfo=0; - double t; + double t = 0.0; // first try cholesky decomposing if(nFull* B, double* EigenValu int ELPA_Solver::composeEigenVector(int DecomposedState, std::complex* B, std::complex* EigenVector) { - double t; + double t = 0.0; if(DecomposedState==1 || DecomposedState==2) { // transform the eigenvectors to original general equation, let U^-1*q, and put to q diff --git a/source/source_hsolver/module_genelpa/elpa_new_real.cpp b/source/source_hsolver/module_genelpa/elpa_new_real.cpp index a780c89f55..cc6d0242bd 100644 --- a/source/source_hsolver/module_genelpa/elpa_new_real.cpp +++ b/source/source_hsolver/module_genelpa/elpa_new_real.cpp @@ -18,8 +18,8 @@ extern std::map NEW_ELPA_HANDLE_POOL; int ELPA_Solver::eigenvector(double* A, double* EigenValue, double* EigenVector) { - int info; - double t; + int info = 0; + double t = 0.0; if (loglevel > 0 && myid == 0) { @@ -41,7 +41,7 @@ int ELPA_Solver::generalized_eigenvector(double* A, double* EigenVector) { int info, allinfo; - double t; + double t = 0.0; if (loglevel > 0 && myid == 0) { @@ -407,7 +407,7 @@ void ELPA_Solver::verify(double* A, double* EigenValue, double* EigenVector, dou maxError = 0; for (int i = 1; i <= nev; ++i) { - double E; + double E = 0.0; ScalapackConnector::dot(nFull, E, R, 1, i, 1, R, 1, i, 1, desc); // printf("myid: %d, i: %d, E: %lf\n", myid, i, E); sumError += E; diff --git a/source/source_hsolver/module_genelpa/utils.cpp b/source/source_hsolver/module_genelpa/utils.cpp index d9e6e74c59..6654c33b9e 100644 --- a/source/source_hsolver/module_genelpa/utils.cpp +++ b/source/source_hsolver/module_genelpa/utils.cpp @@ -25,7 +25,7 @@ void initBlacsGrid(int loglevel, int nprows, npcols; int myprow, mypcol; int nprocs, myid; - int info; + int info = 0; MPI_Comm_size(comm, &nprocs); MPI_Comm_rank(comm, &myid); // set blacs parameters @@ -137,7 +137,7 @@ void loadMatrix(const char FileName[], int nFull, double* a, int* desca, int bla void saveLocalMatrix(const char filePrefix[], int narows, int nacols, double* a) { char FileName[80]; - int myid; + int myid = 0; std::ofstream matrixFile; #ifdef __MPI MPI_Comm_rank(MPI_COMM_WORLD, &myid); diff --git a/source/source_hsolver/module_pexsi/dist_bcd_matrix.cpp b/source/source_hsolver/module_pexsi/dist_bcd_matrix.cpp index ff3f85f32b..93a6dcb5b0 100644 --- a/source/source_hsolver/module_pexsi/dist_bcd_matrix.cpp +++ b/source/source_hsolver/module_pexsi/dist_bcd_matrix.cpp @@ -48,7 +48,7 @@ DistBCDMatrix::DistBCDMatrix(MPI_Comm comm, } // synchronize matrix parameters to all processes, including those are not in bcd group - int myid_in_comm_world; + int myid_in_comm_world = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myid_in_comm_world); if (myid_in_comm_world == 0) { diff --git a/source/source_hsolver/module_pexsi/dist_ccs_matrix.cpp b/source/source_hsolver/module_pexsi/dist_ccs_matrix.cpp index 74391f2fbe..0a73653c8e 100644 --- a/source/source_hsolver/module_pexsi/dist_ccs_matrix.cpp +++ b/source/source_hsolver/module_pexsi/dist_ccs_matrix.cpp @@ -55,7 +55,7 @@ DistCCSMatrix::DistCCSMatrix(MPI_Comm comm_in, int nproc_data_in, int size_in) this->size = size_in; this->nnz = 0; this->nnzLocal = 0; - int myproc; + int myproc = 0; if (comm != MPI_COMM_NULL) { MPI_Comm_size(comm, &nprocs); diff --git a/source/source_hsolver/module_pexsi/dist_matrix_transformer.cpp b/source/source_hsolver/module_pexsi/dist_matrix_transformer.cpp index 313a840e68..7a4ecec6b1 100644 --- a/source/source_hsolver/module_pexsi/dist_matrix_transformer.cpp +++ b/source/source_hsolver/module_pexsi/dist_matrix_transformer.cpp @@ -28,8 +28,8 @@ inline int DistMatrixTransformer::MinimumIndexPosition(const bool isFirst, { // usually the minimum index is continuous, so it will be a good idea to // check the one next to the previous index first. - static int pre_position; // previous position in index array of minimum index, - static int pre_process; // the process contains previous index + static int pre_position = 0; // previous position in index array of minimum index, + static int pre_process = 0; // the process contains previous index int minimum_index = INT_MAX; // the minimum index, initial value is a large number which is larger than any other index; @@ -110,7 +110,7 @@ inline void DistMatrixTransformer::buildCCSParameter(const int size, int pre_col = -1; int nnz_now = 0; - int p_mini; + int p_mini = 0; p_mini = MinimumIndexPosition(true, nprocs, &size_process[0], &displacement_process[0], position_index); while (p_mini >= 0) { @@ -146,7 +146,7 @@ inline void DistMatrixTransformer::countMatrixDistribution(int N, double* A, std { for (int i = 0; i < N; ++i) { - int key; + int key = 0; if (fabs(A[i] < 1e-31)) key = -100; else diff --git a/source/source_hsolver/module_pexsi/simple_pexsi.cpp b/source/source_hsolver/module_pexsi/simple_pexsi.cpp index edf000ecae..255b1019b3 100644 --- a/source/source_hsolver/module_pexsi/simple_pexsi.cpp +++ b/source/source_hsolver/module_pexsi/simple_pexsi.cpp @@ -27,7 +27,7 @@ namespace pexsi { inline void strtolower(char* sa, char* sb) { - char c; + char c = '\0'; int len = strlen(sa); for (int i = 0; i < len; i++) { @@ -172,8 +172,8 @@ void splitNProc2NProwNPcol(const int NPROC, int& nprow, int& npcol) } else { - int flag; - int i; + int flag = 0; + int i = 0; int low = pow(integral_part, 2); int high = pow(integral_part + 1, 2); if ((NPROC - low) >= (high - NPROC)) @@ -218,7 +218,7 @@ int simplePEXSI(MPI_Comm comm_PEXSI, if (comm_2D == MPI_COMM_NULL && comm_PEXSI == MPI_COMM_NULL) return 0; - int myid; + int myid = 0; std::ofstream f_log; if (comm_PEXSI != MPI_COMM_NULL) { @@ -228,15 +228,15 @@ int simplePEXSI(MPI_Comm comm_PEXSI, // set up PEXSI parameter PPEXSIOptions options; PPEXSISetDefaultOptions(&options); - int numProcessPerPole; - double ZERO_Limit; + int numProcessPerPole = 0; + double ZERO_Limit = 0.0; loadPEXSIOption(comm_PEXSI, PexsiOptionFile, options, numProcessPerPole, ZERO_Limit); options.mu0 = mu0; ModuleBase::timer::tick("Diago_LCAO_Matrix", "setup_PEXSI_plan"); PPEXSIPlan plan; - int info; - int outputFileIndex; + int info = 0; + int outputFileIndex = 0; int pexsi_prow, pexsi_pcol; ModuleBase::timer::tick("Diago_LCAO_Matrix", "splitNProc2NProwNPcol"); splitNProc2NProwNPcol(numProcessPerPole, pexsi_prow, pexsi_pcol); @@ -292,11 +292,11 @@ int simplePEXSI(MPI_Comm comm_PEXSI, SnzvalLocal, &info); - double nelec; - double muMinInertia; - double muMaxInertia; - int numTotalPEXSIIter; - int numTotalInertiaIter; // Number of total inertia[out] + double nelec = 0.0; + double muMinInertia = 0.0; + double muMaxInertia = 0.0; + int numTotalPEXSIIter = 0; + int numTotalInertiaIter = 0; // Number of total inertia[out] // LiuXh modify 2021-04-29, add DONE(ofs_running,"xx") for test ModuleBase::timer::tick("Diago_LCAO_Matrix", "PEXSIDFT"); PPEXSIDFTDriver2(plan, // PEXSI plan[in] diff --git a/source/source_hsolver/test/CMakeLists.txt b/source/source_hsolver/test/CMakeLists.txt index 72ad05e0ba..1b1529adb4 100644 --- a/source/source_hsolver/test/CMakeLists.txt +++ b/source/source_hsolver/test/CMakeLists.txt @@ -14,7 +14,7 @@ if (ENABLE_MPI) SOURCES diago_bpcg_test.cpp ../diago_bpcg.cpp ../para_linear_transform.cpp ../diago_iter_assist.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) AddTest( TARGET MODULE_HSOLVER_cg @@ -22,7 +22,7 @@ if (ENABLE_MPI) SOURCES diago_cg_test.cpp ../diago_cg.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) AddTest( TARGET MODULE_HSOLVER_cg_float @@ -30,7 +30,7 @@ if (ENABLE_MPI) SOURCES diago_cg_float_test.cpp ../diago_cg.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) AddTest( TARGET MODULE_HSOLVER_dav @@ -38,7 +38,7 @@ if (ENABLE_MPI) SOURCES diago_david_test.cpp ../diago_david.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) AddTest( TARGET MODULE_HSOLVER_dav_float @@ -46,7 +46,7 @@ if (ENABLE_MPI) SOURCES diago_david_float_test.cpp ../diago_david.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) if(ENABLE_LCAO) AddTest( @@ -55,7 +55,7 @@ if (ENABLE_MPI) SOURCES diago_cg_float_test.cpp ../diago_cg.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) AddTest( TARGET MODULE_HSOLVER_dav_real @@ -63,7 +63,7 @@ if (ENABLE_MPI) SOURCES diago_david_real_test.cpp ../diago_david.cpp ../diago_iter_assist.cpp ../diag_const_nums.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_hamilt/operator.cpp - ../../source_pw/module_pwdft/operator_pw/operator_pw.cpp + ../../source_pw/module_pwdft/op_pw.cpp ) endif() @@ -92,13 +92,13 @@ if (ENABLE_MPI) AddTest( TARGET MODULE_HSOLVER_LCAO LIBS parameter ${math_libs} ELPA::ELPA base genelpa psi device - SOURCES diago_lcao_test.cpp ../diago_elpa.cpp ../diago_scalapack.cpp + SOURCES diago_lcao_test.cpp ../diago_elpa.cpp ../diago_scalapack.cpp ../diago_lapack.cpp ) else() AddTest( TARGET MODULE_HSOLVER_LCAO LIBS parameter ${math_libs} base psi device - SOURCES diago_lcao_test.cpp ../diago_scalapack.cpp + SOURCES diago_lcao_test.cpp ../diago_scalapack.cpp ../diago_lapack.cpp ) endif() @@ -113,19 +113,12 @@ if (ENABLE_MPI) if (USE_CUDA) AddTest( TARGET MODULE_HSOLVER_LCAO_cusolver - LIBS parameter ${math_libs} base psi device - SOURCES diago_lcao_cusolver_test.cpp ../diago_cusolver.cpp ../diago_scalapack.cpp + LIBS parameter ${math_libs} base psi device + SOURCES diago_lcao_cusolver_test.cpp ../diago_cusolver.cpp ../diago_scalapack.cpp ../kernels/hegvd_op.cpp ../kernels/cuda/diag_cusolver.cu ) - endif() -else() - if(ENABLE_LCAO) - AddTest( - TARGET MODULE_HSOLVER_Lapack - LIBS parameter ${math_libs} base psi device - SOURCES diago_lapack_test.cpp ../diago_lapack.cpp - ) + target_compile_definitions(MODULE_HSOLVER_LCAO_cusolver PRIVATE __CUDA) endif() endif() install(FILES H-KPoints-Si2.dat DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/source/source_hsolver/test/diago_bpcg_test.cpp b/source/source_hsolver/test/diago_bpcg_test.cpp index 93e1147ccf..f36a09dafe 100644 --- a/source/source_hsolver/test/diago_bpcg_test.cpp +++ b/source/source_hsolver/test/diago_bpcg_test.cpp @@ -99,7 +99,7 @@ class DiagoBPCGPrepare double *en = new double[npw]; int ik = 1; hamilt::Hamilt>* ha; - ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr,nullptr); + ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); int* ngk = new int [1]; //psi::Psi> psi(ngk,ik,nband,npw); psi::Psi> psi; diff --git a/source/source_hsolver/test/diago_cg_float_test.cpp b/source/source_hsolver/test/diago_cg_float_test.cpp index b446bcb912..9af83f174c 100644 --- a/source/source_hsolver/test/diago_cg_float_test.cpp +++ b/source/source_hsolver/test/diago_cg_float_test.cpp @@ -108,7 +108,7 @@ class DiagoCGPrepare float *en = new float[npw]; int ik = 1; hamilt::Hamilt>* ha; - ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr,nullptr); + ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); psi::Psi> psi; psi.resize(ik,nband,npw); //psi.fix_k(0); diff --git a/source/source_hsolver/test/diago_cg_test.cpp b/source/source_hsolver/test/diago_cg_test.cpp index 65c283d94b..d360e47e53 100644 --- a/source/source_hsolver/test/diago_cg_test.cpp +++ b/source/source_hsolver/test/diago_cg_test.cpp @@ -104,7 +104,7 @@ class DiagoCGPrepare double *en = new double[npw]; int ik = 1; hamilt::Hamilt>* ha; - ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr,nullptr); + ha =new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); psi::Psi> psi; psi.resize(ik,nband,npw); //psi.fix_k(0); diff --git a/source/source_hsolver/test/diago_david_float_test.cpp b/source/source_hsolver/test/diago_david_float_test.cpp index f907f939e4..76c5226ce3 100644 --- a/source/source_hsolver/test/diago_david_float_test.cpp +++ b/source/source_hsolver/test/diago_david_float_test.cpp @@ -82,7 +82,7 @@ class DiagoDavPrepare //do Diago_David::diag() float* en = new float[npw]; hamilt::Hamilt> *phm; - phm = new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr,nullptr); + phm = new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); #ifdef __MPI const hsolver::diag_comm_info comm_info = {MPI_COMM_WORLD, mypnum, nprocs}; diff --git a/source/source_hsolver/test/diago_david_real_test.cpp b/source/source_hsolver/test/diago_david_real_test.cpp index b8670bc74d..77a64dcd01 100644 --- a/source/source_hsolver/test/diago_david_real_test.cpp +++ b/source/source_hsolver/test/diago_david_real_test.cpp @@ -81,7 +81,7 @@ class DiagoDavPrepare //do Diago_David::diag() double* en = new double[npw]; hamilt::Hamilt* phm; - phm = new hamilt::HamiltPW(nullptr, nullptr, nullptr, nullptr,nullptr); + phm = new hamilt::HamiltPW(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); #ifdef __MPI const hsolver::diag_comm_info comm_info = {MPI_COMM_WORLD, mypnum, nprocs}; diff --git a/source/source_hsolver/test/diago_david_test.cpp b/source/source_hsolver/test/diago_david_test.cpp index 643eeed4bf..6239be7a2e 100644 --- a/source/source_hsolver/test/diago_david_test.cpp +++ b/source/source_hsolver/test/diago_david_test.cpp @@ -77,14 +77,16 @@ class DiagoDavPrepare { //calculate eigenvalues by LAPACK; double* e_lapack = new double[npw]; - double* ev; - if(mypnum == 0) { lapackEigen(npw, DIAGOTEST::hmatrix, e_lapack,DETAILINFO); -} + double* ev = nullptr; + if(mypnum == 0) + { + lapackEigen(npw, DIAGOTEST::hmatrix, e_lapack,DETAILINFO); + } //do Diago_David::diag() double* en = new double[npw]; hamilt::Hamilt> *phm; - phm = new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr,nullptr); + phm = new hamilt::HamiltPW>(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); #ifdef __MPI const hsolver::diag_comm_info comm_info = {MPI_COMM_WORLD, mypnum, nprocs}; diff --git a/source/source_hsolver/test/diago_lcao_cusolver_test.cpp b/source/source_hsolver/test/diago_lcao_cusolver_test.cpp index 1137bf0107..9f340419b7 100644 --- a/source/source_hsolver/test/diago_lcao_cusolver_test.cpp +++ b/source/source_hsolver/test/diago_lcao_cusolver_test.cpp @@ -232,7 +232,9 @@ class DiagoPrepare else if (ks_solver == "cusolver") { hsolver::DiagoCusolver dh; - dh.diag(&hmtest, psi, e_solver.data()); + hamilt::MatrixBlock h_mat, s_mat; + hmtest.matrix(h_mat, s_mat); + dh.diag(h_mat, s_mat, psi, e_solver.data()); } #endif // dh->diag(&hmtest, psi, e_solver.data()); diff --git a/source/source_hsolver/test/diago_lcao_test.cpp b/source/source_hsolver/test/diago_lcao_test.cpp index bbfaad4a1e..69e4fab3bf 100644 --- a/source/source_hsolver/test/diago_lcao_test.cpp +++ b/source/source_hsolver/test/diago_lcao_test.cpp @@ -1,4 +1,5 @@ #include "source_hsolver/diago_scalapack.h" +#include "source_hsolver/diago_lapack.h" #include "source_hsolver/test/diago_elpa_utils.h" #define private public #include "source_io/module_parameter/parameter.h" @@ -74,6 +75,8 @@ class DiagoPrepare if (ks_solver == "scalapack_gvx") ; // dh = new hsolver::DiagoScalapack; + else if (ks_solver == "lapack") + ; #ifdef __ELPA else if (ks_solver == "genelpa") ; @@ -226,6 +229,11 @@ class DiagoPrepare hsolver::DiagoScalapack dh; dh.diag(&hmtest, psi, e_solver.data()); } + else if (ks_solver == "lapack") + { + hsolver::DiagoLapack la; + la.diag(&hmtest, psi, e_solver.data()); + } #ifdef __ELPA else if (ks_solver == "genelpa") { @@ -294,6 +302,15 @@ TEST_P(DiagoGammaOnlyTest, LCAO) std::stringstream out_info; DiagoPrepare dp = GetParam(); ASSERT_TRUE(dp.produce_HS()); + + // Skip lapack tests in multi-process environment + // LAPACK is a serial solver and cannot work with distributed matrices + if (dp.ks_solver == "lapack" && dp.dsize > 1) + { + GTEST_SKIP() << "Skipping lapack test with " << dp.dsize + << " MPI processes (lapack only supports single process)"; + } + dp.diago(); if (dp.myrank == 0) @@ -316,7 +333,9 @@ INSTANTIATE_TEST_SUITE_P( DiagoPrepare(0, 0, 32, 0, "genelpa", "H-GammaOnly-Si64.dat", "S-GammaOnly-Si64.dat"), #endif DiagoPrepare(0, 0, 1, 0, "scalapack_gvx", "H-GammaOnly-Si2.dat", "S-GammaOnly-Si2.dat"), - DiagoPrepare(0, 0, 32, 0, "scalapack_gvx", "H-GammaOnly-Si64.dat", "S-GammaOnly-Si64.dat"))); + DiagoPrepare(0, 0, 32, 0, "scalapack_gvx", "H-GammaOnly-Si64.dat", "S-GammaOnly-Si64.dat"), + DiagoPrepare(0, 0, 1, 0, "lapack", "H-GammaOnly-Si2.dat", "S-GammaOnly-Si2.dat"), + DiagoPrepare(0, 0, 32, 0, "lapack", "H-GammaOnly-Si64.dat", "S-GammaOnly-Si64.dat"))); class DiagoKPointsTest : public ::testing::TestWithParam>> { @@ -326,6 +345,15 @@ TEST_P(DiagoKPointsTest, LCAO) std::stringstream out_info; DiagoPrepare> dp = GetParam(); ASSERT_TRUE(dp.produce_HS()); + + // Skip lapack tests in multi-process environment + // LAPACK is a serial solver and cannot work with distributed matrices + if (dp.ks_solver == "lapack" && dp.dsize > 1) + { + GTEST_SKIP() << "Skipping lapack test with " << dp.dsize + << " MPI processes (lapack only supports single process)"; + } + dp.diago(); if (dp.myrank == 0) @@ -368,9 +396,6 @@ int main(int argc, char** argv) std::cout << "ERROR:some tests are not passed" << std::endl; return result; } - else - { - MPI_Finalize(); - return 0; - } + MPI_Finalize(); + return 0; } diff --git a/source/source_hsolver/test/diago_mock.h b/source/source_hsolver/test/diago_mock.h index ea2c2affaa..75cced8409 100644 --- a/source/source_hsolver/test/diago_mock.h +++ b/source/source_hsolver/test/diago_mock.h @@ -443,7 +443,7 @@ void hamilt::HamiltPW, base_device::DEVICE_CPU>::sPsi(const } //Mock function h_psi -#include "source_pw/module_pwdft/operator_pw/operator_pw.h" +#include "source_pw/module_pwdft/op_pw.h" template class OperatorMock : public hamilt::Operator { @@ -572,7 +572,13 @@ template<> void hamilt::HamiltPW::updateHk(const int ik) return; } -template<> hamilt::HamiltPW::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* pkv, pseudopot_cell_vnl*,const UnitCell*) +template<> hamilt::HamiltPW::HamiltPW( + elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* pkv, + pseudopot_cell_vnl* ppcell, + Plus_U* p_dftu, // mohan add 20251108 + const UnitCell* ucell) { this->ops = new OperatorMock; } @@ -587,7 +593,13 @@ template<> void hamilt::HamiltPW>::updateHk(const int ik) return; } -template<> hamilt::HamiltPW>::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* pkv, pseudopot_cell_vnl*,const UnitCell*) +template<> hamilt::HamiltPW>::HamiltPW( + elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* pkv, + pseudopot_cell_vnl* ppcell, + Plus_U* p_dftu, // mohan add 20251108 + const UnitCell* ucell) { this->ops = new OperatorMock>; } @@ -602,7 +614,13 @@ template<> void hamilt::HamiltPW>::updateHk(const int ik) return; } -template<> hamilt::HamiltPW>::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* pkv, pseudopot_cell_vnl*,const UnitCell*) +template<> hamilt::HamiltPW>::HamiltPW( + elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* pkv, + pseudopot_cell_vnl* ppcell, + Plus_U* p_dftu, // mohan add 20251108 + const UnitCell* ucell) { this->ops = new OperatorMock>; } diff --git a/source/source_hsolver/test/hsolver_pw_sup.h b/source/source_hsolver/test/hsolver_pw_sup.h index 07cc650013..fb3757a08b 100644 --- a/source/source_hsolver/test/hsolver_pw_sup.h +++ b/source/source_hsolver/test/hsolver_pw_sup.h @@ -92,7 +92,7 @@ DiagoCG::~DiagoCG() { } template -void DiagoCG::diag(const Func& hpsi_func, +double DiagoCG::diag(const Func& hpsi_func, const Func& spsi_func, ct::Tensor& psi, ct::Tensor& eigen, @@ -112,7 +112,7 @@ void DiagoCG::diag(const Func& hpsi_func, eigen_pack[ib] /= n_basis; } DiagoIterAssist::avg_iter += 1.0; - return; + return avg_iter_; } template class DiagoCG, base_device::DEVICE_CPU>; diff --git a/source/source_hsolver/test/hsolver_supplementary_mock.h b/source/source_hsolver/test/hsolver_supplementary_mock.h index b6beb9cb2d..87155ecd5a 100644 --- a/source/source_hsolver/test/hsolver_supplementary_mock.h +++ b/source/source_hsolver/test/hsolver_supplementary_mock.h @@ -19,8 +19,7 @@ void ElecState::init_nelec_spin() -void ElecState::init_scf(const int istep, - const UnitCell& ucell, +void ElecState::init_scf(const UnitCell& ucell, const Parallel_Grid& pgrid, const ModuleBase::ComplexMatrix& strucfac, const bool*, @@ -33,7 +32,6 @@ void ElecState::init_scf(const int istep, void ElecState::init_ks(Charge* chg_in, // pointer for class Charge const K_Vectors* klist_in, int nk_in, - ModulePW::PW_Basis* rhopw_in, const ModulePW::PW_Basis_Big* bigpw_in) { return; @@ -45,7 +43,6 @@ ElecStatePW::ElecStatePW(ModulePW::PW_Basis_K* wfc_basis_in, K_Vectors* pkv_in, UnitCell* ucell_in, pseudopot_cell_vnl* ppcell_in, - ModulePW::PW_Basis* rhodpw_in, ModulePW::PW_Basis* rhopw_in, ModulePW::PW_Basis_Big* bigpw_in) : basis(wfc_basis_in) diff --git a/source/source_hsolver/test/test_hsolver_sdft.cpp b/source/source_hsolver/test/test_hsolver_sdft.cpp index 4118ba7bb7..7ab1464195 100644 --- a/source/source_hsolver/test/test_hsolver_sdft.cpp +++ b/source/source_hsolver/test/test_hsolver_sdft.cpp @@ -262,7 +262,7 @@ namespace ModulePW { class TestHSolverPW_SDFT : public ::testing::Test { public: - TestHSolverPW_SDFT() : stoche(8, 1, 0, 0), elecstate_test(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr) + TestHSolverPW_SDFT() : stoche(8, 1, 0, 0), elecstate_test(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr) { } ModulePW::PW_Basis_K pwbk; @@ -408,4 +408,4 @@ int main(int argc, char** argv) return result; } -#endif \ No newline at end of file +#endif diff --git a/source/source_io/CMakeLists.txt b/source/source_io/CMakeLists.txt index 39e32a9fb0..d018181b3e 100644 --- a/source/source_io/CMakeLists.txt +++ b/source/source_io/CMakeLists.txt @@ -1,112 +1,114 @@ list(APPEND objects - input_conv.cpp - ctrl_output_fp.cpp - ctrl_output_pw.cpp - bessel_basis.cpp - cal_test.cpp - cal_dos.cpp - cal_ldos.cpp - cal_mlkedf_descriptors.cpp - cif_io.cpp - write_dos_pw.cpp - write_bands.cpp - nscf_fermi_surf.cpp - write_eig_occ.cpp - numerical_basis.cpp - numerical_basis_jyjy.cpp - numerical_descriptor.cpp - output.cpp - print_info.cpp - read_cube.cpp - rhog_io.cpp - read_exit_file.cpp - read_wfc_pw.cpp - read_wf2rho_pw.cpp - restart.cpp - binstream.cpp - write_wfc_pw.cpp - write_pao.cpp - write_cube.cpp - write_elecstat_pot.cpp - write_elf.cpp - write_dipole.cpp - write_init.cpp - write_mlkedf_descriptors.cpp - td_current_io.cpp - write_libxc_r.cpp - output_log.cpp - para_json.cpp + module_parameter/input_conv.cpp + module_ctrl/ctrl_output_fp.cpp + module_ctrl/ctrl_output_pw.cpp + module_ctrl/ctrl_output_td.cpp + module_bessel/bessel_basis.cpp + module_output/cal_test.cpp + module_dos/cal_dos.cpp + module_dos/cal_ldos.cpp + module_ml/cal_mlkedf_descriptors.cpp + module_output/cif_io.cpp + module_dos/write_dos_pw.cpp + module_energy/write_bands.cpp + module_energy/nscf_fermi_surf.cpp + module_energy/write_eig_occ.cpp + module_bessel/numerical_basis.cpp + module_bessel/numerical_basis_jyjy.cpp + module_bessel/numerical_descriptor.cpp + module_output/output.cpp + module_output/print_info.cpp + module_output/read_cube.cpp + module_chgpot/rhog_io.cpp + module_output/read_exit_file.cpp + module_wf/read_wfc_pw.cpp + module_wf/read_wf2rho_pw.cpp + module_restart/restart.cpp + module_output/binstream.cpp + module_wf/write_wfc_pw.cpp + module_output/write_pao.cpp + module_output/write_cube.cpp + module_chgpot/write_elecstat_pot.cpp + module_elf/write_elf.cpp + module_dipole/write_dipole.cpp + module_chgpot/write_init.cpp + module_ml/write_mlkedf_descriptors.cpp + module_current/td_current_io.cpp + module_current/td_current_io_comm.cpp + module_chgpot/write_libxc_r.cpp + module_output/output_log.cpp + module_json/para_json.cpp parse_args.cpp - orb_io.cpp - filename.cpp + module_output/orb_io.cpp + module_output/filename.cpp ) list(APPEND objects_advanced - unk_overlap_pw.cpp - berryphase.cpp - to_wannier90.cpp - to_wannier90_pw.cpp - to_wannier90_lcao_in_pw.cpp - to_wannier90_lcao.cpp - fR_overlap.cpp + module_unk/unk_overlap_pw.cpp + module_unk/berryphase.cpp + module_wannier/to_wannier90.cpp + module_wannier/to_wannier90_pw.cpp + module_wannier/to_wannier90_lcao_in_pw.cpp + module_wannier/to_wannier90_lcao.cpp + module_wannier/fR_overlap.cpp ) if(ENABLE_LCAO) list(APPEND objects - write_dos_lcao.cpp - cal_pdos_gamma.cpp - cal_pdos_multik.cpp - write_orb_info.cpp - write_proj_band_lcao.cpp - get_pchg_lcao.cpp - get_wf_lcao.cpp - read_wfc_nao.cpp - write_wfc_nao.cpp - write_dmk.cpp - write_dmr.cpp - sparse_matrix.cpp - file_reader.cpp - csr_reader.cpp - to_qo_kernel.cpp - to_qo_mpi.cpp - to_qo_structures.cpp - output_sk.cpp - output_dmk.cpp - output_mulliken.cpp - io_npz.cpp - cal_pLpR.cpp + module_dos/write_dos_lcao.cpp + module_dos/cal_pdos_gamma.cpp + module_dos/cal_pdos_multik.cpp + module_output/write_orb_info.cpp + module_energy/write_proj_band_lcao.cpp + module_chgpot/get_pchg_lcao.cpp + module_wf/get_wf_lcao.cpp + module_wf/read_wfc_nao.cpp + module_wf/write_wfc_nao.cpp + module_dm/write_dmk.cpp + module_dm/write_dmr.cpp + module_output/sparse_matrix.cpp + module_output/file_reader.cpp + module_output/csr_reader.cpp + module_qo/to_qo_kernel.cpp + module_qo/to_qo_mpi.cpp + module_qo/to_qo_structures.cpp + module_mulliken/output_sk.cpp + module_mulliken/output_dmk.cpp + module_mulliken/output_mulliken.cpp + module_ml/io_npz.cpp + module_hs/cal_pLpR.cpp ) - list(APPEND objects_advanced - unk_overlap_lcao.cpp - write_HS_R.cpp - write_HS_sparse.cpp - single_R_io.cpp - cal_r_overlap_R.cpp - output_mat_sparse.cpp - ctrl_scf_lcao.cpp - ctrl_runner_lcao.cpp - ctrl_iter_lcao.cpp + list(APPEND objects_advanced + module_unk/unk_overlap_lcao.cpp + module_hs/write_HS_R.cpp + module_hs/write_HS_sparse.cpp + module_hs/single_R_io.cpp + module_hs/cal_r_overlap_R.cpp + module_hs/output_mat_sparse.cpp + module_ctrl/ctrl_scf_lcao.cpp + module_ctrl/ctrl_runner_lcao.cpp + module_ctrl/ctrl_iter_lcao.cpp ) endif() add_library( io_input OBJECT - read_input_item_system.cpp - read_input_item_elec_stru.cpp - read_input_item_relax.cpp - read_input_item_md.cpp - read_input_item_ofdft.cpp - read_input_item_sdft.cpp - read_input_item_tddft.cpp - read_input_item_deepks.cpp - read_input_item_model.cpp - read_input_item_postprocess.cpp - read_input_item_exx_dftu.cpp - read_input_item_other.cpp - read_input_item_output.cpp - read_input.cpp - read_set_globalv.cpp + module_parameter/read_input_item_system.cpp + module_parameter/read_input_item_elec_stru.cpp + module_parameter/read_input_item_relax.cpp + module_parameter/read_input_item_md.cpp + module_parameter/read_input_item_ofdft.cpp + module_parameter/read_input_item_sdft.cpp + module_parameter/read_input_item_tddft.cpp + module_parameter/read_input_item_deepks.cpp + module_parameter/read_input_item_model.cpp + module_parameter/read_input_item_postprocess.cpp + module_parameter/read_input_item_exx_dftu.cpp + module_parameter/read_input_item_other.cpp + module_parameter/read_input_item_output.cpp + module_parameter/read_input.cpp + module_parameter/read_set_globalv.cpp ) add_library( @@ -115,6 +117,12 @@ add_library( ${objects} ) +target_include_directories( + io_basic + PUBLIC + ${CMAKE_BINARY_DIR}/source/source_io +) + add_library( io_advanced OBJECT @@ -134,6 +142,6 @@ endif() if(ENABLE_RAPIDJSON) if(ENABLE_MPI) - add_subdirectory(json_output) + add_subdirectory(module_json) endif() endif() diff --git a/source/source_io/build_info.h.in b/source/source_io/build_info.h.in new file mode 100644 index 0000000000..b0959240f4 --- /dev/null +++ b/source/source_io/build_info.h.in @@ -0,0 +1,60 @@ +#ifndef SOURCE_IO_BUILD_INFO_H +#define SOURCE_IO_BUILD_INFO_H + +// --- Platform & Environment --- +#define ABACUS_PLATFORM_NAME "@ABACUS_PLATFORM_NAME@" +#define ABACUS_BUILD_TYPE "@ABACUS_BUILD_TYPE@" +#define ABACUS_BUILD_USER "@ABACUS_BUILD_USER@" +#define ABACUS_BUILD_HOST "@ABACUS_BUILD_HOST@" +#define ABACUS_CXX_COMPILER_ID "@ABACUS_CXX_COMPILER_ID@" +#define ABACUS_CXX_COMPILER_PATH "@ABACUS_CXX_COMPILER_PATH@" +#define ABACUS_CXX_COMPILER_VERSION "@ABACUS_CXX_COMPILER_VERSION@" +#define ABACUS_CXX_FLAGS "@ABACUS_CXX_FLAGS@" +#define ABACUS_LINKER_FLAGS "@ABACUS_LINKER_FLAGS@" +#define ABACUS_CUDA_FLAGS "@ABACUS_CUDA_FLAGS@" + +// --- Sanitizers & Debugging --- +#define ABACUS_ASAN_STATUS "@ABACUS_ASAN_STATUS@" +#define ABACUS_DEBUG_SYMBOLS "@ABACUS_DEBUG_SYMBOLS@" + +// --- CMake Configuration Summary --- +#define ABACUS_CMAKE_OPTIONS "@ABACUS_CMAKE_OPTIONS@" +#define ABACUS_CMAKE_FIND_PACKAGES "@ABACUS_CMAKE_FIND_PACKAGES@" + +// --- Parallelism & Communication --- +#define ABACUS_MPI_IMPLEMENTATION "@ABACUS_MPI_IMPLEMENTATION@" +#define ABACUS_MPI_VERSION "@ABACUS_MPI_VERSION@" +#define ABACUS_CUDA_AWARE_MPI "@ABACUS_CUDA_AWARE_MPI@" +#define ABACUS_OPENMP_VERSION "@ABACUS_OPENMP_VERSION@" + +// --- Core Math Libraries --- +#define ABACUS_ELPA_VERSION "@ABACUS_ELPA_VERSION@" +#define ABACUS_MKL_SUPPORT "@ABACUS_MKL_SUPPORT@" +#define ABACUS_LIBXC_VERSION "@ABACUS_LIBXC_VERSION@" +#define ABACUS_FFTW_VERSION "@ABACUS_FFTW_VERSION@" + +// --- Accelerators & Specific Hardware --- +#define ABACUS_CUDA_VERSION "@ABACUS_CUDA_VERSION@" +#define ABACUS_ROCM_VERSION "@ABACUS_ROCM_VERSION@" +#define ABACUS_CUSOLVERMP_VERSION "@ABACUS_CUSOLVERMP_VERSION@" + +// --- Hybrid Functional Libraries --- +#define ABACUS_CEREAL_VERSION "@ABACUS_CEREAL_VERSION@" +#define ABACUS_LIBRI_VERSION "@ABACUS_LIBRI_VERSION@" +#define ABACUS_LIBCOMM_VERSION "@ABACUS_LIBCOMM_VERSION@" + +// --- AI & Machine Learning --- +#define ABACUS_LIBTORCH_VERSION "@ABACUS_LIBTORCH_VERSION@" +#define ABACUS_LIBNPY_VERSION "@ABACUS_LIBNPY_VERSION@" +#define ABACUS_DEEPMD_VERSION "@ABACUS_DEEPMD_VERSION@" +#define ABACUS_NEP_VERSION "@ABACUS_NEP_VERSION@" +#define ABACUS_TENSORFLOW_VERSION "@ABACUS_TENSORFLOW_VERSION@" + +// --- Testing & Other Libraries --- +#define ABACUS_GTEST_VERSION "@ABACUS_GTEST_VERSION@" +#define ABACUS_GOOGLEBENCH_VERSION "@ABACUS_GOOGLEBENCH_VERSION@" +#define ABACUS_RAPIDJSON_VERSION "@ABACUS_RAPIDJSON_VERSION@" +#define ABACUS_PEXSI_VERSION "@ABACUS_PEXSI_VERSION@" +#define ABACUS_CNPY_VERSION "@ABACUS_CNPY_VERSION@" + +#endif // SOURCE_IO_BUILD_INFO_H diff --git a/source/source_io/ctrl_output_fp.cpp b/source/source_io/ctrl_output_fp.cpp deleted file mode 100644 index 0cde6e6011..0000000000 --- a/source/source_io/ctrl_output_fp.cpp +++ /dev/null @@ -1,200 +0,0 @@ -#include "source_io/ctrl_output_fp.h" // use ctrl_output_fp() -#include "source_estate/module_charge/symmetry_rho.h" // use Symmetry_rho -#include "source_io/write_elecstat_pot.h" // use write_elecstat_pot -#include "source_io/write_elf.h" -#include "cube_io.h" // use write_vdata_palgrid -#include "source_hamilt/module_xc/xc_functional.h" // use XC_Functional - -#ifdef USE_LIBXC -#include "source_io/write_libxc_r.h" -#endif - -namespace ModuleIO -{ - -void ctrl_output_fp(UnitCell& ucell, - elecstate::ElecState* pelec, - ModulePW::PW_Basis_Big* pw_big, - ModulePW::PW_Basis* pw_rhod, - Charge &chr, - surchem &solvent, - Parallel_Grid ¶_grid, - const int istep) -{ - ModuleBase::TITLE("ModuleIO", "ctrl_output_fp"); - ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); - - const bool out_app_flag = PARAM.inp.out_app_flag; - const bool gamma_only = PARAM.globalv.gamma_only_local; - const int nspin = PARAM.inp.nspin; - const std::string global_out_dir = PARAM.globalv.global_out_dir; - - - // print out the 'g' index when istep_in!=-1 - int istep_in = -1; - if (PARAM.inp.out_freq_ion>0) // default value of out_freq_ion is 0 - { - if (istep % PARAM.inp.out_freq_ion == 0) - { - istep_in = istep; - } - } - - std::string geom_block; - if(istep_in==-1) - { - // do nothing - } - else if(istep_in>=0) - { - geom_block = "g" + std::to_string(istep + 1); - } - - - // 4) write charge density - if (PARAM.inp.out_chg[0] > 0) - { - for (int is = 0; is < nspin; ++is) - { - pw_rhod->real2recip(chr.rho_save[is], chr.rhog_save[is]); - - std::string fn =PARAM.globalv.global_out_dir + "chg"; - - std::string spin_block; - if(nspin == 2 || nspin == 4) - { - spin_block= "s" + std::to_string(is + 1); - } - else if(nspin == 1) - { - // do nothing - } - - fn += spin_block + geom_block + ".cube"; - - ModuleIO::write_vdata_palgrid(para_grid, - chr.rho_save[is], - is, - nspin, - istep_in, - fn, - pelec->eferm.get_efval(is), - &(ucell), - PARAM.inp.out_chg[1], - 1); - - if (XC_Functional::get_ked_flag()) - { - fn = PARAM.globalv.global_out_dir + "tau"; - - fn += spin_block + geom_block + ".cube"; - - ModuleIO::write_vdata_palgrid(para_grid, - chr.kin_r_save[is], - is, - nspin, - istep, - fn, - pelec->eferm.get_efval(is), - &(ucell)); - } - } - } - - // 5) write potential - if (PARAM.inp.out_pot == 1 || PARAM.inp.out_pot == 3) - { - for (int is = 0; is < nspin; is++) - { - std::string fn =PARAM.globalv.global_out_dir + "pot"; - - std::string spin_block; - if(nspin == 2 || nspin == 4) - { - spin_block= "s" + std::to_string(is + 1); - } - else if(nspin == 1) - { - // do nothing - } - - fn += spin_block + geom_block + ".cube"; - - ModuleIO::write_vdata_palgrid(para_grid, - pelec->pot->get_effective_v(is), - is, - nspin, - istep_in, - fn, - 0.0, // efermi - &(ucell), - 3, // precision - 0); // out_fermi - } - } - else if (PARAM.inp.out_pot == 2) - { - std::string fn =PARAM.globalv.global_out_dir + "potes"; - fn += geom_block + ".cube"; - - ModuleIO::write_elecstat_pot( -#ifdef __MPI - pw_big->bz, - pw_big->nbz, -#endif - fn, - istep, - pw_rhod, - &chr, - &(ucell), - pelec->pot->get_fixed_v(), - solvent); - } - - // 6) write ELF - if (PARAM.inp.out_elf[0] > 0) - { - chr.cal_elf = true; - Symmetry_rho srho; - for (int is = 0; is < nspin; is++) - { - srho.begin(is, chr, pw_rhod, ucell.symm); - } - - std::string out_dir =PARAM.globalv.global_out_dir; - ModuleIO::write_elf( -#ifdef __MPI - pw_big->bz, - pw_big->nbz, -#endif - out_dir, - istep, - nspin, - chr.rho, - chr.kin_r, - pw_rhod, - para_grid, - &(ucell), - PARAM.inp.out_elf[1]); - } - -#ifdef USE_LIBXC - // 7) write xc(r) - if(PARAM.inp.out_xc_r[0]>=0) - { - ModuleIO::write_libxc_r( - PARAM.inp.out_xc_r[0], - XC_Functional::get_func_id(), - pw_rhod->nrxx, // number of real-space grid - ucell.omega, // volume of cell - ucell.tpiba, - chr, - *pw_big, - *pw_rhod); - } -#endif - - ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); -} - -} // End ModuleIO diff --git a/source/source_io/ctrl_output_fp.h b/source/source_io/ctrl_output_fp.h deleted file mode 100644 index 12ff1e12b0..0000000000 --- a/source/source_io/ctrl_output_fp.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CTRL_OUTPUT_FP_H -#define CTRL_OUTPUT_FP_H - -#include "source_estate/elecstate_lcao.h" - -namespace ModuleIO -{ - - void ctrl_output_fp(UnitCell& ucell, - elecstate::ElecState* pelec, - ModulePW::PW_Basis_Big* pw_big, - ModulePW::PW_Basis* pw_rhod, - Charge &chr, - surchem &solvent, - Parallel_Grid ¶_grid, - const int istep); - -} -#endif diff --git a/source/source_io/ctrl_scf_lcao.cpp b/source/source_io/ctrl_scf_lcao.cpp deleted file mode 100644 index 9fd14afbd6..0000000000 --- a/source/source_io/ctrl_scf_lcao.cpp +++ /dev/null @@ -1,526 +0,0 @@ -#include - -#include "source_estate/elecstate_lcao.h" // use elecstate::ElecState -#include "source_io/ctrl_scf_lcao.h" // use ctrl_scf_lcao() -#include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO -#include "source_hamilt/hamilt.h" // use Hamilt - -// functions -#include "source_io/write_dos_lcao.h" // use ModuleIO::write_dos_lcao() -#include "source_io/write_dmr.h" // use ModuleIO::write_dmr() -#include "source_io/write_dmk.h" // use ModuleIO::write_dmk() -#include "source_io/write_HS.h" // use ModuleIO::write_hsk() -#include "source_io/write_wfc_nao.h" // use ModuleIO::write_wfc_nao() -#include "source_io/output_mat_sparse.h" // use ModuleIO::output_mat_sparse() -#include "source_io/output_mulliken.h" // use cal_mag() -#include "source_lcao/module_operator_lcao/ekinetic_new.h" // use hamilt::EkineticNew -#include "source_io/cal_pLpR.h" // use AngularMomentumCalculator() -#include "source_lcao/module_deltaspin/spin_constrain.h" // use spinconstrain::SpinConstrain -#include "source_io/berryphase.h" // use berryphase -#include "source_io/to_wannier90_lcao.h" // use toWannier90_LCAO -#include "source_io/to_wannier90_lcao_in_pw.h" // use toWannier90_LCAO_IN_PW -#ifdef __MLALGO -#include "source_lcao/module_deepks/LCAO_deepks.h" -#include "source_lcao/module_deepks/LCAO_deepks_interface.h" -#endif -#ifdef __EXX -#include "source_lcao/module_ri/Exx_LRI_interface.h" // use EXX codes -#include "source_lcao/module_ri/RPA_LRI.h" // use RPA code -#endif -#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes -#include "source_io/to_qo.h" // use toQO - - -template -void ModuleIO::ctrl_scf_lcao(UnitCell& ucell, - const Input_para& inp, - K_Vectors& kv, - elecstate::ElecStateLCAO* pelec, - Parallel_Orbitals& pv, - Grid_Driver& gd, - psi::Psi* psi, - hamilt::HamiltLCAO* p_hamilt, - TwoCenterBundle &two_center_bundle, - LCAO_Orbitals &orb, - const ModulePW::PW_Basis_K* pw_wfc, // for berryphase - const ModulePW::PW_Basis* pw_rho, // for berryphase - const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 - const Structure_Factor& sf, // for Wannier90 - rdmft::RDMFT &rdmft_solver, // for RDMFT - Setup_DeePKS &deepks, - Exx_NAO &exx_nao, - const bool conv_esolver, - const bool scf_nmax_flag, - const int istep) -{ - ModuleBase::TITLE("ModuleIO", "ctrl_scf_lcao"); - ModuleBase::timer::tick("ModuleIO", "ctrl_scf_lcao"); - - //***** - // if istep_in = -1, istep will not appear in file name - // if iter_in = -1, iter will not appear in file name - int istep_in = -1; - int iter_in = -1; - bool out_flag = false; - if (inp.out_freq_ion>0) // default value of out_freq_ion is 0 - { - if (istep % inp.out_freq_ion == 0) - { - istep_in = istep; - out_flag = true; - } - } - else if(conv_esolver || scf_nmax_flag) // mohan add scf_nmax_flag on 20250921 - { - out_flag = true; - } - - if(!out_flag) - { - return; - } - - //***** - - const bool out_app_flag = inp.out_app_flag; - const bool gamma_only = PARAM.globalv.gamma_only_local; - const int nspin = inp.nspin; - const std::string global_out_dir = PARAM.globalv.global_out_dir; - - //------------------------------------------------------------------ - //! 1) print out density of states (DOS) - //------------------------------------------------------------------ - if (inp.out_dos) - { - ModuleIO::write_dos_lcao(psi, - p_hamilt, - pv, - ucell, - kv, - inp.nbands, - pelec->eferm, - pelec->ekb, - pelec->wg, - inp.dos_edelta_ev, - inp.dos_scale, - inp.dos_sigma, - out_app_flag, - istep, - GlobalV::ofs_running); - } - - //------------------------------------------------------------------ - //! 2) Output density matrix DM(R) - //------------------------------------------------------------------ - if(inp.out_dmr[0]) - { - const auto& dmr_vector = pelec->get_DM()->get_DMR_vector(); - - const int precision = inp.out_dmr[1]; - - ModuleIO::write_dmr(dmr_vector, precision, pv, out_app_flag, - ucell.get_iat2iwt(), ucell.nat, istep); - } - - //------------------------------------------------------------------ - //! 3) Output density matrix DM(k) - //------------------------------------------------------------------ - if (inp.out_dmk[0]) - { - std::vector efermis(nspin == 2 ? 2 : 1); - for (int ispin = 0; ispin < efermis.size(); ispin++) - { - efermis[ispin] = pelec->eferm.get_efval(ispin); - } - const int precision = inp.out_dmk[1]; - - ModuleIO::write_dmk(pelec->get_DM()->get_DMK_vector(), - precision, efermis, &(ucell), pv, istep); - } - - //------------------------------------------------------------------ - // 4) Output H(k) and S(k) matrices for each k-point - //------------------------------------------------------------------ - if (inp.out_mat_hs[0]) - { - ModuleIO::write_hsk(global_out_dir, - nspin, - kv.get_nks(), - kv.get_nkstot(), - kv.ik2iktot, - kv.isk, - p_hamilt, - pv, - gamma_only, - out_app_flag, - istep, - GlobalV::ofs_running); - } - - //------------------------------------------------------------------ - //! 5) Output electronic wavefunctions Psi(k) - //------------------------------------------------------------------ - if (elecstate::ElecStateLCAO::out_wfc_lcao) - { - ModuleIO::write_wfc_nao(elecstate::ElecStateLCAO::out_wfc_lcao, - out_app_flag, - psi[0], - pelec->ekb, - pelec->wg, - kv.kvec_c, - kv.ik2iktot, - kv.get_nkstot(), - pv, - nspin, - istep); - } - - //------------------------------------------------------------------ - //! 6) Output DeePKS information - //------------------------------------------------------------------ -#ifdef __MLALGO - // need control parameter - hamilt::HamiltLCAO* p_ham_deepks = p_hamilt; - std::shared_ptr> ld_shared_ptr(&deepks.ld, [](LCAO_Deepks*) {}); - LCAO_Deepks_Interface deepks_interface(ld_shared_ptr); - - deepks_interface.out_deepks_labels(pelec->f_en.etot, - kv.get_nks(), - ucell.nat, - PARAM.globalv.nlocal, - pelec->ekb, - kv.kvec_d, - ucell, - orb, - gd, - &pv, - *psi, - pelec->get_DM(), - p_ham_deepks, - -1, // -1 when called in after scf - true, // no used when after scf - GlobalV::MY_RANK, - GlobalV::ofs_running); -#endif - - //------------------------------------------------------------------ - //! 7) Output matrices, where O can be chosen as - //! H, S, dH, dS, T, r. The format is CSR format. - //------------------------------------------------------------------ - hamilt::Hamilt* p_ham_tk = static_cast*>(p_hamilt); - - ModuleIO::output_mat_sparse(inp.out_mat_hs2, - inp.out_mat_dh, - inp.out_mat_ds, - inp.out_mat_t, - inp.out_mat_r, - istep, - pelec->pot->get_effective_v(), - pv, - two_center_bundle, - orb, - ucell, - gd, - kv, - p_ham_tk); - - //------------------------------------------------------------------ - //! 8) Output kinetic matrix - //------------------------------------------------------------------ - if (inp.out_mat_tk[0]) - { - hamilt::HS_Matrix_K hsk(&pv, true); - hamilt::HContainer hR(&pv); - hamilt::Operator* ekinetic - = new hamilt::EkineticNew>(&hsk, - kv.kvec_d, - &hR, - &ucell, - orb.cutoffs(), - &gd, - two_center_bundle.kinetic_orb.get()); - - const int nspin_k = (nspin == 2 ? 2 : 1); - for (int ik = 0; ik < kv.get_nks() / nspin_k; ++ik) - { - ekinetic->init(ik); - - const int out_label = 1; // 1: .txt, 2: .dat - - std::string t_fn = ModuleIO::filename_output(global_out_dir, - "tk","nao",ik,kv.ik2iktot, - inp.nspin,kv.get_nkstot(), - out_label,out_app_flag, - gamma_only,istep); - - ModuleIO::save_mat(istep, - hsk.get_hk(), - PARAM.globalv.nlocal, - false, // bit - inp.out_mat_tk[1], - 1, // true for upper triangle matrix - inp.out_app_flag, - t_fn, - pv, - GlobalV::DRANK); - } - - delete ekinetic; - } - - //------------------------------------------------------------------ - //! 9) Output expectation of angular momentum operator - //------------------------------------------------------------------ - if (inp.out_mat_l[0]) - { - ModuleIO::AngularMomentumCalculator mylcalculator( - inp.orbital_dir, - ucell, - inp.search_radius, - inp.test_deconstructor, - inp.test_grid, - inp.test_atom_input, - PARAM.globalv.search_pbc, - &GlobalV::ofs_running, - GlobalV::MY_RANK - ); - mylcalculator.calculate(inp.suffix, - global_out_dir, - ucell, - inp.out_mat_l[1], - GlobalV::MY_RANK); - } - - //------------------------------------------------------------------ - //! 10) Output Mulliken charge - //------------------------------------------------------------------ - if (inp.out_mul) - { - ModuleIO::cal_mag(&pv, - p_hamilt, - kv, - pelec, - two_center_bundle, - orb, - ucell, - gd, - istep, - true); - } - - //------------------------------------------------------------------ - //! 11) Output atomic magnetization by using 'spin_constraint' - //------------------------------------------------------------------ - if (inp.sc_mag_switch) - { - spinconstrain::SpinConstrain& sc = spinconstrain::SpinConstrain::getScInstance(); - sc.cal_mi_lcao(istep); - sc.print_Mi(GlobalV::ofs_running); - sc.print_Mag_Force(GlobalV::ofs_running); - } - - //------------------------------------------------------------------ - //! 12) Output Berry phase - //------------------------------------------------------------------ - if (inp.calculation == "nscf" && berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag != 1) - { - std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Berry phase calculation"); - berryphase bp(&pv); - bp.lcao_init(ucell, gd, kv, orb); - // additional step before calling macroscopic_polarization - bp.Macroscopic_polarization(ucell, pw_wfc->npwk_max, psi, pw_rho, pw_wfc, kv); - std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Berry phase calculation"); - } - - //------------------------------------------------------------------ - //! 13) Wannier90 interface in LCAO basis - // added by jingan in 2018.11.7 - //------------------------------------------------------------------ - if (inp.calculation == "nscf" && inp.towannier90) - { - std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Wave function to Wannier90"); - if (inp.wannier_method == 1) - { - toWannier90_LCAO_IN_PW wan(inp.out_wannier_mmn, - inp.out_wannier_amn, - inp.out_wannier_unk, - inp.out_wannier_eig, - inp.out_wannier_wvfn_formatted, - inp.nnkpfile, - inp.wannier_spin); - wan.set_tpiba_omega(ucell.tpiba, ucell.omega); - wan.calculate(ucell,pelec->ekb,pw_wfc,pw_big, - sf,kv,psi,&pv); - } - else if (inp.wannier_method == 2) - { - toWannier90_LCAO wan(inp.out_wannier_mmn, - inp.out_wannier_amn, - inp.out_wannier_unk, - inp.out_wannier_eig, - inp.out_wannier_wvfn_formatted, - inp.nnkpfile, - inp.wannier_spin, - orb); - - wan.calculate(ucell, gd, pelec->ekb, kv, *psi, &pv); - } - std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Wave function to Wannier90"); - } - - -#ifdef __EXX - //------------------------------------------------------------------ - //! 14) Output Hexx matrix in LCAO basis - // (see `out_chg` in docs/advanced/input_files/input-main.md) - //------------------------------------------------------------------ - if (inp.out_chg[0]) - { - if (GlobalC::exx_info.info_global.cal_exx && inp.calculation != "nscf") // Peize Lin add if 2022.11.14 - { - const std::string file_name_exx = global_out_dir - + "HexxR" + std::to_string(GlobalV::MY_RANK); - if (GlobalC::exx_info.info_ri.real_number) - { - ModuleIO::write_Hexxs_csr(file_name_exx, ucell, exx_nao.exd->get_Hexxs()); - } - else - { - ModuleIO::write_Hexxs_csr(file_name_exx, ucell, exx_nao.exc->get_Hexxs()); - } - } - } - - //------------------------------------------------------------------ - //! 15) Write RPA information in LCAO basis - //------------------------------------------------------------------ - if (inp.rpa) - { - RPA_LRI rpa_lri_double(GlobalC::exx_info.info_ri); - rpa_lri_double.cal_postSCF_exx(*dynamic_cast*>(pelec)->get_DM(), - MPI_COMM_WORLD, - ucell, - kv, - orb); - rpa_lri_double.init(MPI_COMM_WORLD, kv, orb.cutoffs()); - rpa_lri_double.out_for_RPA(ucell, pv, *psi, pelec); - } -#endif - - //------------------------------------------------------------------ - //! 16) Perform RDMFT calculations, added by jghan, 2024-10-17 - //------------------------------------------------------------------ - if (inp.rdmft == true) - { - ModuleBase::matrix occ_num(pelec->wg); - for (int ik = 0; ik < occ_num.nr; ++ik) - { - for (int inb = 0; inb < occ_num.nc; ++inb) - { - occ_num(ik, inb) /= kv.wk[ik]; - } - } - rdmft_solver.update_elec(ucell, occ_num, *psi); - - //! initialize the gradients of Etotal with respect to occupation numbers and wfc, - //! and set all elements to 0. - //! dedocc = d E/d Occ_Num - ModuleBase::matrix dedocc(pelec->wg.nr, pelec->wg.nc, true); - - //! dedwfc = d E/d wfc - psi::Psi dedwfc(psi->get_nk(), psi->get_nbands(), psi->get_nbasis(), kv.ngk, true); - dedwfc.zero_out(); - - double etot_rdmft = rdmft_solver.run(dedocc, dedwfc); - } - - //------------------------------------------------------------------ - //! 17) Output quasi orbitals - //------------------------------------------------------------------ - if (inp.qo_switch) - { - toQO tqo(inp.qo_basis, inp.qo_strategy, inp.qo_thr, inp.qo_screening_coeff); - tqo.initialize(global_out_dir, - inp.pseudo_dir, - inp.orbital_dir, - &ucell, - kv.kvec_d, - GlobalV::ofs_running, - GlobalV::MY_RANK, - GlobalV::NPROC); - tqo.calculate(); - } - - - ModuleBase::timer::tick("ModuleIO", "ctrl_scf_lcao"); -} - - - -// For gamma only -template void ModuleIO::ctrl_scf_lcao( - UnitCell& ucell, - const Input_para& inp, - K_Vectors& kv, - elecstate::ElecStateLCAO* pelec, - Parallel_Orbitals& pv, - Grid_Driver& gd, - psi::Psi* psi, - hamilt::HamiltLCAO* p_hamilt, - TwoCenterBundle &two_center_bundle, - LCAO_Orbitals &orb, - const ModulePW::PW_Basis_K* pw_wfc, // for berryphase - const ModulePW::PW_Basis* pw_rho, // for berryphase - const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 - const Structure_Factor& sf, // for Wannier90 - rdmft::RDMFT &rdmft_solver, // for RDMFT - Setup_DeePKS &deepks, - Exx_NAO &exx_nao, - const bool conv_esolver, - const bool scf_nmax_flag, - const int istep); - -// For multiple k-points -template void ModuleIO::ctrl_scf_lcao, double>( - UnitCell& ucell, - const Input_para& inp, - K_Vectors& kv, - elecstate::ElecStateLCAO>* pelec, - Parallel_Orbitals& pv, - Grid_Driver& gd, - psi::Psi>* psi, - hamilt::HamiltLCAO, double>* p_hamilt, - TwoCenterBundle &two_center_bundle, - LCAO_Orbitals &orb, - const ModulePW::PW_Basis_K* pw_wfc, // for berryphase - const ModulePW::PW_Basis* pw_rho, // for berryphase - const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 - const Structure_Factor& sf, // for Wannier90 - rdmft::RDMFT, double> &rdmft_solver, // for RDMFT - Setup_DeePKS> &deepks, - Exx_NAO> &exx_nao, - const bool conv_esolver, - const bool scf_nmax_flag, - const int istep); - -template void ModuleIO::ctrl_scf_lcao, std::complex>( - UnitCell& ucell, - const Input_para& inp, - K_Vectors& kv, - elecstate::ElecStateLCAO>* pelec, - Parallel_Orbitals& pv, - Grid_Driver& gd, - psi::Psi>* psi, - hamilt::HamiltLCAO, std::complex>* p_hamilt, - TwoCenterBundle &two_center_bundle, - LCAO_Orbitals &orb, - const ModulePW::PW_Basis_K* pw_wfc, // for berryphase - const ModulePW::PW_Basis* pw_rho, // for berryphase - const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 - const Structure_Factor& sf, // for Wannier90 - rdmft::RDMFT, std::complex> &rdmft_solver, // for RDMFT - Setup_DeePKS> &deepks, - Exx_NAO> &exx_nao, - const bool conv_esolver, - const bool scf_nmax_flag, - const int istep); diff --git a/source/source_io/ctrl_scf_lcao.h b/source/source_io/ctrl_scf_lcao.h deleted file mode 100644 index 98ee5e18a5..0000000000 --- a/source/source_io/ctrl_scf_lcao.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef CTRL_SCF_LCAO_H -#define CTRL_SCF_LCAO_H - -#include - -#include "source_cell/unitcell.h" // use UnitCell -#include "source_cell/klist.h" // use K_Vectors -#include "source_estate/elecstate_lcao.h" // use elecstate::ElecStateLCAO -#include "source_psi/psi.h" // use Psi -#include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO -#include "source_basis/module_nao/two_center_bundle.h" // use TwoCenterBundle -#include "source_basis/module_pw/pw_basis_k.h" // use ModulePW::PW_Basis_K and ModulePW::PW_Basis -#include "source_pw/module_pwdft/structure_factor.h" // use Structure_Factor -#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes - -#include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008 -#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008 - -namespace ModuleIO -{ - // in principle, we need to add const for all of the variables, mohan note 2025-06-05 - template - void ctrl_scf_lcao(UnitCell& ucell, - const Input_para& inp, - K_Vectors& kv, - elecstate::ElecStateLCAO* pelec, - Parallel_Orbitals& pv, - Grid_Driver& gd, - psi::Psi* psi, - hamilt::HamiltLCAO* p_hamilt, - TwoCenterBundle &two_center_bundle, - LCAO_Orbitals &orb, - const ModulePW::PW_Basis_K* pw_wfc, // for berryphase - const ModulePW::PW_Basis* pw_rho, // for berryphase - const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 - const Structure_Factor& sf, // for Wannier90 - rdmft::RDMFT &rdmft_solver, // for RDMFT - Setup_DeePKS &deepks, - Exx_NAO &exx_nao, - const bool conv_esolver, - const bool scf_nmax_flag, - const int istep); -} -#endif diff --git a/source/source_io/bessel_basis.cpp b/source/source_io/module_bessel/bessel_basis.cpp similarity index 98% rename from source/source_io/bessel_basis.cpp rename to source/source_io/module_bessel/bessel_basis.cpp index 8c98d3aca0..2795fefa25 100644 --- a/source/source_io/bessel_basis.cpp +++ b/source/source_io/module_bessel/bessel_basis.cpp @@ -5,7 +5,6 @@ #include "source_base/math_sphbes.h" #include "source_base/parallel_common.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include Bessel_Basis::Bessel_Basis() @@ -393,10 +392,10 @@ void Bessel_Basis::readin_C4( if(ModuleBase::GlobalFunc::SCAN_BEGIN(inc4, "")) { - double tmp_ecut; - double tmp_rcut; - double tmp_enumber; - double tmp_tolerence; + double tmp_ecut = 0.0; + double tmp_rcut = 0.0; + double tmp_enumber = 0.0; + double tmp_tolerence = 0.0; ModuleBase::GlobalFunc::READ_VALUE( inc4, tmp_ecut); ModuleBase::GlobalFunc::READ_VALUE( inc4, tmp_rcut); ModuleBase::GlobalFunc::READ_VALUE( inc4, tmp_enumber); diff --git a/source/source_io/bessel_basis.h b/source/source_io/module_bessel/bessel_basis.h similarity index 97% rename from source/source_io/bessel_basis.h rename to source/source_io/module_bessel/bessel_basis.h index 4fe1ab015d..e8307e7625 100644 --- a/source/source_io/bessel_basis.h +++ b/source/source_io/module_bessel/bessel_basis.h @@ -5,11 +5,11 @@ //========================================================== #ifndef BESSEL_BASIS_H #define BESSEL_BASIS_H -#include "../source_base/global_function.h" -#include "../source_base/global_variable.h" -#include "../source_base/realarray.h" +#include "../../source_base/global_function.h" +#include "../../source_base/global_variable.h" +#include "../../source_base/realarray.h" -#include "../source_cell/unitcell.h" +#include "../../source_cell/unitcell.h" //========================================================== // CLASS : diff --git a/source/source_io/numerical_basis.cpp b/source/source_io/module_bessel/numerical_basis.cpp similarity index 99% rename from source/source_io/numerical_basis.cpp rename to source/source_io/module_bessel/numerical_basis.cpp index aab51006f9..b7b0f050e6 100644 --- a/source/source_io/numerical_basis.cpp +++ b/source/source_io/module_bessel/numerical_basis.cpp @@ -9,8 +9,7 @@ #include "source_base/timer.h" #include "source_base/vector3.h" #include "source_cell/module_symmetry/symmetry.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/numerical_basis_jyjy.h" +#include "numerical_basis_jyjy.h" #include #include diff --git a/source/source_io/numerical_basis.h b/source/source_io/module_bessel/numerical_basis.h similarity index 90% rename from source/source_io/numerical_basis.h rename to source/source_io/module_bessel/numerical_basis.h index 7fc6b146c4..d7ffc62ee1 100644 --- a/source/source_io/numerical_basis.h +++ b/source/source_io/module_bessel/numerical_basis.h @@ -8,17 +8,17 @@ #include #include "bessel_basis.h" -#include "source_base/complexarray.h" -#include "source_base/complexmatrix.h" -#include "source_base/global_function.h" -#include "source_base/global_variable.h" -#include "source_base/intarray.h" -#include "source_base/matrix.h" -#include "source_base/vector3.h" -#include "source_basis/module_pw/pw_basis_k.h" -#include "source_cell/klist.h" -#include "source_pw/module_pwdft/structure_factor.h" -#include "source_psi/psi.h" +#include "../../source_base/complexarray.h" +#include "../../source_base/complexmatrix.h" +#include "../../source_base/global_function.h" +#include "../../source_base/global_variable.h" +#include "../../source_base/intarray.h" +#include "../../source_base/matrix.h" +#include "../../source_base/vector3.h" +#include "../../source_basis/module_pw/pw_basis_k.h" +#include "../../source_cell/klist.h" +#include "../../source_pw/module_pwdft/structure_factor.h" +#include "../../source_psi/psi.h" //========================================================== // CLASS : // NAME : Numerical_Basis diff --git a/source/source_io/numerical_basis_jyjy.cpp b/source/source_io/module_bessel/numerical_basis_jyjy.cpp similarity index 99% rename from source/source_io/numerical_basis_jyjy.cpp rename to source/source_io/module_bessel/numerical_basis_jyjy.cpp index 63599e5133..8f6c52880e 100644 --- a/source/source_io/numerical_basis_jyjy.cpp +++ b/source/source_io/module_bessel/numerical_basis_jyjy.cpp @@ -1,4 +1,4 @@ -#include "source_io/numerical_basis_jyjy.h" +#include "numerical_basis_jyjy.h" #include "source_base/matrix3.h" #include "source_base/vector3.h" diff --git a/source/source_io/numerical_basis_jyjy.h b/source/source_io/module_bessel/numerical_basis_jyjy.h similarity index 93% rename from source/source_io/numerical_basis_jyjy.h rename to source/source_io/module_bessel/numerical_basis_jyjy.h index 84296c57af..621e122523 100644 --- a/source/source_io/numerical_basis_jyjy.h +++ b/source/source_io/module_bessel/numerical_basis_jyjy.h @@ -1,9 +1,9 @@ #ifndef NUMERICAL_BASIS_JYJY_H #define NUMERICAL_BASIS_JYJY_H -#include "source_base/complexarray.h" -#include "source_base/matrix3.h" -#include "source_base/vector3.h" +#include "../../source_base/complexarray.h" +#include "../../source_base/matrix3.h" +#include "../../source_base/vector3.h" #include #include diff --git a/source/source_io/numerical_descriptor.cpp b/source/source_io/module_bessel/numerical_descriptor.cpp similarity index 99% rename from source/source_io/numerical_descriptor.cpp rename to source/source_io/module_bessel/numerical_descriptor.cpp index 5ccf46cb6e..6a3004416b 100644 --- a/source/source_io/numerical_descriptor.cpp +++ b/source/source_io/module_bessel/numerical_descriptor.cpp @@ -1,5 +1,4 @@ #include "numerical_descriptor.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_cell/module_symmetry/symmetry.h" #include "source_base/math_ylmreal.h" diff --git a/source/source_io/numerical_descriptor.h b/source/source_io/module_bessel/numerical_descriptor.h similarity index 86% rename from source/source_io/numerical_descriptor.h rename to source/source_io/module_bessel/numerical_descriptor.h index 7c50c616a1..ec504ee4a6 100644 --- a/source/source_io/numerical_descriptor.h +++ b/source/source_io/module_bessel/numerical_descriptor.h @@ -4,12 +4,12 @@ //========================================================== #ifndef NUMERICAL_DESCRIPTOR_H #define NUMERICAL_DESCRIPTOR_H -#include "../source_base/global_function.h" -#include "../source_base/global_variable.h" -#include "../source_base/intarray.h" -#include "../source_base/complexmatrix.h" +#include "../../source_base/global_function.h" +#include "../../source_base/global_variable.h" +#include "../../source_base/intarray.h" +#include "../../source_base/complexmatrix.h" #include "bessel_basis.h" -#include "source_psi/psi.h" +#include "../../source_psi/psi.h" //========================================================== // CLASS : // NAME : Numerical_Descriptor diff --git a/source/source_io/get_pchg_lcao.cpp b/source/source_io/module_chgpot/get_pchg_lcao.cpp similarity index 99% rename from source/source_io/get_pchg_lcao.cpp rename to source/source_io/module_chgpot/get_pchg_lcao.cpp index 346b56f12a..9115ed784e 100644 --- a/source/source_io/get_pchg_lcao.cpp +++ b/source/source_io/module_chgpot/get_pchg_lcao.cpp @@ -1,6 +1,6 @@ #include "get_pchg_lcao.h" -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_lcao/module_gint/gint_interface.h" @@ -408,7 +408,7 @@ void Get_pchg_lcao::idmatrix(const int& ib, if (ib_local >= 0) { - double wg_value; + double wg_value = 0.0; if (if_separate_k) { wg_value = (ib < fermi_band) ? wg_sum_k : wg_sum_k_homo; diff --git a/source/source_io/get_pchg_lcao.h b/source/source_io/module_chgpot/get_pchg_lcao.h similarity index 100% rename from source/source_io/get_pchg_lcao.h rename to source/source_io/module_chgpot/get_pchg_lcao.h diff --git a/source/source_io/get_pchg_pw.h b/source/source_io/module_chgpot/get_pchg_pw.h similarity index 99% rename from source/source_io/get_pchg_pw.h rename to source/source_io/module_chgpot/get_pchg_pw.h index 2a61c77aa3..7609b30eb8 100644 --- a/source/source_io/get_pchg_pw.h +++ b/source/source_io/module_chgpot/get_pchg_pw.h @@ -1,7 +1,7 @@ #ifndef GET_PCHG_PW_H #define GET_PCHG_PW_H -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include "source_estate/module_charge/symmetry_rho.h" namespace ModuleIO diff --git a/source/source_io/rhog_io.cpp b/source/source_io/module_chgpot/rhog_io.cpp similarity index 99% rename from source/source_io/rhog_io.cpp rename to source/source_io/module_chgpot/rhog_io.cpp index a642a15e31..b1ae0a4892 100644 --- a/source/source_io/rhog_io.cpp +++ b/source/source_io/module_chgpot/rhog_io.cpp @@ -1,4 +1,4 @@ -#include "binstream.h" +#include "source_io/module_output/binstream.h" #include "source_base/global_function.h" #include "source_io/module_parameter/parameter.h" #include "source_base/global_variable.h" diff --git a/source/source_io/rhog_io.h b/source/source_io/module_chgpot/rhog_io.h similarity index 100% rename from source/source_io/rhog_io.h rename to source/source_io/module_chgpot/rhog_io.h diff --git a/source/source_io/write_elecstat_pot.cpp b/source/source_io/module_chgpot/write_elecstat_pot.cpp similarity index 96% rename from source/source_io/write_elecstat_pot.cpp rename to source/source_io/module_chgpot/write_elecstat_pot.cpp index e70ba04525..f2e69c0c2e 100644 --- a/source/source_io/write_elecstat_pot.cpp +++ b/source/source_io/module_chgpot/write_elecstat_pot.cpp @@ -3,9 +3,8 @@ #include "source_io/module_parameter/parameter.h" #include "source_estate/module_pot/H_Hartree_pw.h" #include "source_estate/module_pot/efield.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/cube_io.h" -#include "source_io/output_log.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_output/output_log.h" #include "write_elecstat_pot.h" namespace ModuleIO diff --git a/source/source_io/write_elecstat_pot.h b/source/source_io/module_chgpot/write_elecstat_pot.h similarity index 91% rename from source/source_io/write_elecstat_pot.h rename to source/source_io/module_chgpot/write_elecstat_pot.h index 76c90bf70d..bd3f2a8734 100644 --- a/source/source_io/write_elecstat_pot.h +++ b/source/source_io/module_chgpot/write_elecstat_pot.h @@ -18,7 +18,7 @@ namespace ModuleIO /// @param rho_basis /// @param chr /// @param ucell_ -/// @param v_effective_fixed +/// @param v_eff_fixed void write_elecstat_pot( #ifdef __MPI const int& bz, @@ -29,7 +29,7 @@ void write_elecstat_pot( ModulePW::PW_Basis* rho_basis, const Charge* const chr, const UnitCell* ucell_, - const double* v_effective_fixed, + const double* v_eff_fixed, const surchem& solvent); } // namespace ModuleIO diff --git a/source/source_io/write_init.cpp b/source/source_io/module_chgpot/write_init.cpp similarity index 94% rename from source/source_io/write_init.cpp rename to source/source_io/module_chgpot/write_init.cpp index 8881647023..8455e0efe3 100644 --- a/source/source_io/write_init.cpp +++ b/source/source_io/module_chgpot/write_init.cpp @@ -1,5 +1,5 @@ -#include "source_io/write_init.h" -#include "source_io/cube_io.h" +#include "source_io/module_chgpot/write_init.h" +#include "source_io/module_output/cube_io.h" #include #include @@ -91,7 +91,7 @@ void ModuleIO::write_pot_init( } ModuleIO::write_vdata_palgrid(para_grid, - pelec->pot->get_effective_v(is), + pelec->pot->get_eff_v(is), is, nspin, istep, diff --git a/source/source_io/write_init.h b/source/source_io/module_chgpot/write_init.h similarity index 100% rename from source/source_io/write_init.h rename to source/source_io/module_chgpot/write_init.h diff --git a/source/source_io/write_libxc_r.cpp b/source/source_io/module_chgpot/write_libxc_r.cpp similarity index 57% rename from source/source_io/write_libxc_r.cpp rename to source/source_io/module_chgpot/write_libxc_r.cpp index 744f9f736a..e2a246bacf 100644 --- a/source/source_io/write_libxc_r.cpp +++ b/source/source_io/module_chgpot/write_libxc_r.cpp @@ -1,448 +1,496 @@ -//====================== -// AUTHOR : Peize Lin -// DATE : 2024-09-12 -//====================== - -#ifdef USE_LIBXC - -#include "write_libxc_r.h" -#include "source_hamilt/module_xc/xc_functional.h" -#include "source_hamilt/module_xc/xc_functional_libxc.h" -#include "source_estate/module_charge/charge.h" -#include "source_basis/module_pw/pw_basis_big.h" -#include "source_basis/module_pw/pw_basis.h" -#include "source_io/cube_io.h" -#include "source_base/global_variable.h" -#include "source_io/module_parameter/parameter.h" -#include "source_base/timer.h" -#include "source_base/tool_title.h" - -#include -#include -#include -#include -#include - -void ModuleIO::write_libxc_r( - const int order, - const std::vector &func_id, - const int &nrxx, // number of real-space grid - const double &omega, // volume of cell - const double tpiba, - const Charge &chr, - const ModulePW::PW_Basis_Big &pw_big, - const ModulePW::PW_Basis &pw_rhod) -{ - ModuleBase::TITLE("ModuleIO","write_libxc_r"); - ModuleBase::timer::tick("ModuleIO","write_libxc_r"); - - const int nspin = - (PARAM.inp.nspin == 1 || ( PARAM.inp.nspin ==4 && !PARAM.globalv.domag && !PARAM.globalv.domag_z)) - ? 1 : 2; - - //---------------------------------------------------------- - // xc_func_type is defined in Libxc package - // to understand the usage of xc_func_type, - // use can check on website, for example: - // https://www.tddft.org/programs/libxc/manual/libxc-5.1.x/ - //---------------------------------------------------------- - - std::vector funcs = XC_Functional_Libxc::init_func( func_id, (1==nspin) ? XC_UNPOLARIZED:XC_POLARIZED ); - - const bool is_gga = [&funcs]() - { - for( xc_func_type &func : funcs ) - { - switch( func.info->family ) - { - case XC_FAMILY_GGA: - case XC_FAMILY_HYB_GGA: - return true; - } - } - return false; - }(); - - // converting rho - std::vector rho; - std::vector amag; - if(1==nspin || 2==PARAM.inp.nspin) - { - rho = XC_Functional_Libxc::convert_rho(nspin, nrxx, &chr); - } - else - { - std::tuple,std::vector> rho_amag = XC_Functional_Libxc::convert_rho_amag_nspin4(nspin, nrxx, &chr); - rho = std::get<0>(std::move(rho_amag)); - amag = std::get<1>(std::move(rho_amag)); - } - - std::vector sigma; - if(is_gga) - { - const std::vector>> gdr = XC_Functional_Libxc::cal_gdr(nspin, nrxx, rho, tpiba, &chr); - sigma = XC_Functional_Libxc::convert_sigma(gdr); - } - - std::vector exc; - std::vector vrho; - std::vector vsigma; - std::vector v2rho2; - std::vector v2rhosigma; - std::vector v2sigma2; - std::vector v3rho3; - std::vector v3rho2sigma; - std::vector v3rhosigma2; - std::vector v3sigma3; - std::vector v4rho4; - std::vector v4rho3sigma; - std::vector v4rho2sigma2; - std::vector v4rhosigma3; - std::vector v4sigma4; - // attention: order 4321 don't break - switch( order ) - { - case 4: v4rho4.resize( nrxx * ((1==nspin)?1:5) ); - case 3: v3rho3.resize( nrxx * ((1==nspin)?1:4) ); - case 2: v2rho2.resize( nrxx * ((1==nspin)?1:3) ); - case 1: vrho .resize( nrxx * nspin ); - case 0: exc .resize( nrxx ); - break; - default: throw std::domain_error("order ="+std::to_string(order) - +" unfinished in "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - if(is_gga) - { - switch( order ) - { - case 4: v4rho3sigma .resize( nrxx * ((1==nspin)?1:12) ); - v4rho2sigma2.resize( nrxx * ((1==nspin)?1:15) ); - v4rhosigma3 .resize( nrxx * ((1==nspin)?1:20) ); - v4sigma4 .resize( nrxx * ((1==nspin)?1:15) ); - case 3: v3rho2sigma .resize( nrxx * ((1==nspin)?1:9) ); - v3rhosigma2 .resize( nrxx * ((1==nspin)?1:12) ); - v3sigma3 .resize( nrxx * ((1==nspin)?1:10) ); - case 2: v2rhosigma .resize( nrxx * ((1==nspin)?1:6) ); - v2sigma2 .resize( nrxx * ((1==nspin)?1:6) ); - case 1: vsigma .resize( nrxx * ((1==nspin)?1:3) ); - case 0: break; - default: throw std::domain_error("order ="+std::to_string(order) - +" unfinished in "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - } - - for( xc_func_type &func : funcs ) - { - // jiyy add for threshold - constexpr double rho_threshold = 1E-6; - constexpr double grho_threshold = 1E-10; - - xc_func_set_dens_threshold(&func, rho_threshold); - - // sgn for threshold mask - const std::vector sgn = XC_Functional_Libxc::cal_sgn(rho_threshold, grho_threshold, func, nspin, nrxx, rho, sigma); - - // call libxc function - // attention: order 432 don't break - switch( func.info->family ) - { - case XC_FAMILY_LDA: - { - switch( order ) - { - case 4: xc_lda_lxc ( &func, nrxx, rho.data(), v4rho4.data() ); - case 3: xc_lda_kxc ( &func, nrxx, rho.data(), v3rho3.data() ); - case 2: xc_lda_fxc ( &func, nrxx, rho.data(), v2rho2.data() ); - case 1: xc_lda_exc_vxc( &func, nrxx, rho.data(), exc.data(), vrho.data() ); - break; - case 0: xc_lda_exc ( &func, nrxx, rho.data(), exc.data() ); - break; - default: throw std::domain_error("order ="+std::to_string(order) - +" unfinished in "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - break; - } - case XC_FAMILY_GGA: - case XC_FAMILY_HYB_GGA: - { - switch( order ) - { - case 4: xc_gga_lxc ( &func, nrxx, rho.data(), sigma.data(), v4rho4.data(), v4rho3sigma.data(), v4rho2sigma2.data(), v4rhosigma3.data(), v4sigma4.data() ); - case 3: xc_gga_kxc ( &func, nrxx, rho.data(), sigma.data(), v3rho3.data(), v3rho2sigma.data(), v3rhosigma2.data(), v3sigma3.data() ); - case 2: xc_gga_fxc ( &func, nrxx, rho.data(), sigma.data(), v2rho2.data(), v2rhosigma.data(), v2sigma2.data() ); - case 1: xc_gga_exc_vxc( &func, nrxx, rho.data(), sigma.data(), exc.data(), vrho.data(), vsigma.data() ); - break; - case 0: xc_gga_exc ( &func, nrxx, rho.data(), sigma.data(), exc.data() ); - break; - default: throw std::domain_error("order ="+std::to_string(order) - +" unfinished in "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - break; - } - default: - { - throw std::domain_error("func.info->family ="+std::to_string(func.info->family) - +" unfinished in "+std::string(__FILE__)+" line "+std::to_string(__LINE__)); - break; - } - } // end switch( func.info->family ) - } // end for( xc_func_type &func : funcs ) - - auto write_data = [&pw_big, &pw_rhod]( - const std::string data_name, - const std::vector &data, - const int number_spin) - { - for(int is=0; is data_cube(nxyz, 0.0); - - // num_z: how many planes on processor 'ip' - std::vector num_z(nproc_in_pool, 0); - for (int iz = 0; iz < nbz; iz++) - { - const int ip = iz % nproc_in_pool; - num_z[ip] += bz; - } - - // start_z: start position of z in - // processor ip. - std::vector start_z(nproc_in_pool, 0); - for (int ip = 1; ip < nproc_in_pool; ip++) - { - start_z[ip] = start_z[ip - 1] + num_z[ip - 1]; - } - - // which_ip: found iz belongs to which ip. - std::vector which_ip(nz, 0); - for (int iz = 0; iz < nz; iz++) - { - for (int ip = 0; ip < nproc_in_pool; ip++) - { - if (iz >= start_z[nproc_in_pool - 1]) - { - which_ip[iz] = nproc_in_pool - 1; - break; - } - else if (iz >= start_z[ip] && iz < start_z[ip + 1]) - { - which_ip[iz] = ip; - break; - } - } - } - - int count = 0; - std::vector zpiece(nxy, 0.0); - - // save the rho one z by one z. - for (int iz = 0; iz < nz; iz++) - { - zpiece.assign(nxy, 0.0); - - // tag must be different for different iz. - const int tag = iz; - MPI_Status ierror; - - // case 1: the first part of rho in processor 0. - if (which_ip[iz] == 0 && rank_in_pool == 0) - { - for (int ixy = 0; ixy < nxy; ixy++) - { - // mohan change to rho_save on 2012-02-10 - // because this can make our next restart calculation lead - // to the same scf_thr as the one saved. - zpiece[ixy] = data[ixy * nplane + (iz - startz_current) * nld]; - } - } - // case 2: > first part rho: send the rho to - // processor 0. - else if (which_ip[iz] == rank_in_pool) - { - for (int ixy = 0; ixy < nxy; ixy++) - { - zpiece[ixy] = data[ixy * nplane + (iz - startz_current) * nld]; - } - MPI_Send(zpiece.data(), nxy, MPI_DOUBLE, 0, tag, POOL_WORLD); - } - - // case 2: > first part rho: processor 0 receive the rho - // from other processors - else if (rank_in_pool == 0) - { - MPI_Recv(zpiece.data(), nxy, MPI_DOUBLE, which_ip[iz], tag, POOL_WORLD, &ierror); - } - - if (my_rank == 0) - { - /// for cube file - for (int ixy = 0; ixy < nxy; ixy++) - { - data_cube[ixy * nz + iz] = zpiece[ixy]; - } - /// for cube file - } - } // end iz - - // for cube file - if (my_rank == 0) - { - for (int ixy = 0; ixy < nxy; ixy++) - { - for (int iz = 0; iz < nz; iz++) - { - ofs_cube << " " << data_cube[ixy * nz + iz]; - if ((iz % n_data_newline == n_data_newline-1) && (iz != nz - 1)) - { - ofs_cube << "\n"; - } - } - ofs_cube << "\n"; - } - } - /// for cube file - } - MPI_Barrier(MPI_COMM_WORLD); -} - -#else // #ifdef __MPI - -void ModuleIO::write_cube_core( - std::ofstream &ofs_cube, - const double*const data, - const int nxy, - const int nz, - const int n_data_newline) -{ - ModuleBase::TITLE("ModuleIO", "write_cube_core"); - for (int ixy = 0; ixy < nxy; ixy++) - { - for (int iz = 0; iz < nz; iz++) - { - ofs_cube << " " << data[iz * nxy + ixy]; - // ++count_cube; - if ((iz % n_data_newline == n_data_newline-1) && (iz != nz - 1)) - { - ofs_cube << "\n"; - } - } - ofs_cube << "\n"; - } -} - -#endif // #ifdef __MPI - -#endif // USE_LIBXC \ No newline at end of file +//====================== +// AUTHOR : Peize Lin +// DATE : 2024-09-12 +//====================== + +#ifdef USE_LIBXC + +#include "write_libxc_r.h" +#include "source_hamilt/module_xc/xc_functional.h" +#include "source_hamilt/module_xc/xc_functional_libxc.h" +#include "source_estate/module_charge/charge.h" +#include "source_basis/module_pw/pw_basis_big.h" +#include "source_basis/module_pw/pw_basis.h" +#include "source_io/module_output/cube_io.h" +#include "source_base/global_variable.h" +#include "source_io/module_parameter/parameter.h" +#include "source_base/timer.h" +#include "source_base/tool_title.h" + +#include +#include +#include +#include +#include + +void ModuleIO::write_libxc_r( + const int order, + const std::vector &func_id, + const int &nrxx, // number of real-space grid + const double &omega, // volume of cell + const double tpiba, + const Charge &chr, + const ModulePW::PW_Basis_Big &pw_big, + const ModulePW::PW_Basis &pw_rhod) +{ + ModuleBase::TITLE("ModuleIO","write_libxc_r"); + ModuleBase::timer::tick("ModuleIO","write_libxc_r"); + + const int nspin = + (PARAM.inp.nspin == 1 || ( + PARAM.inp.nspin ==4 && !PARAM.globalv.domag + && !PARAM.globalv.domag_z)) + ? 1 : 2; + + //---------------------------------------------------------- + // xc_func_type is defined in Libxc package + // to understand the usage of xc_func_type, + // use can check on website, for example: + // https://www.tddft.org/programs/libxc/manual/libxc-5.1.x/ + //---------------------------------------------------------- + + std::vector funcs = + XC_Functional_Libxc::init_func( + func_id, + (1==nspin) ? XC_UNPOLARIZED : XC_POLARIZED + ); + + const bool is_gga = [&funcs]() + { + for( xc_func_type &func : funcs ) + { + switch( func.info->family ) + { + case XC_FAMILY_GGA: + case XC_FAMILY_HYB_GGA: + return true; + } + } + return false; + }(); + + // converting rho + std::vector rho; + std::vector amag; + if(1==nspin || 2==PARAM.inp.nspin) + { + rho = XC_Functional_Libxc::convert_rho(nspin, nrxx, &chr); + } + else + { + std::tuple, std::vector> rho_amag = + XC_Functional_Libxc::convert_rho_amag_nspin4(nspin, nrxx, &chr); + rho = std::get<0>(std::move(rho_amag)); + amag = std::get<1>(std::move(rho_amag)); + } + + std::vector sigma; + if(is_gga) + { + const std::vector>> gdr = + XC_Functional_Libxc::cal_gdr(nspin, nrxx, rho, tpiba, &chr); + sigma = XC_Functional_Libxc::convert_sigma(gdr); + } + + std::vector exc; + std::vector vrho; + std::vector vsigma; + std::vector v2rho2; + std::vector v2rhosigma; + std::vector v2sigma2; + std::vector v3rho3; + std::vector v3rho2sigma; + std::vector v3rhosigma2; + std::vector v3sigma3; + std::vector v4rho4; + std::vector v4rho3sigma; + std::vector v4rho2sigma2; + std::vector v4rhosigma3; + std::vector v4sigma4; + // attention: order 4321 don't break + switch( order ) + { + case 4: v4rho4.resize( nrxx * ((1==nspin)?1:5) ); + case 3: v3rho3.resize( nrxx * ((1==nspin)?1:4) ); + case 2: v2rho2.resize( nrxx * ((1==nspin)?1:3) ); + case 1: vrho .resize( nrxx * nspin ); + case 0: exc .resize( nrxx ); + break; + default: throw std::domain_error( + "order =" + std::to_string(order) + + " unfinished in " + std::string(__FILE__) + + " line " + std::to_string(__LINE__)); + break; + } + if(is_gga) + { + switch( order ) + { + case 4: v4rho3sigma .resize( nrxx * ((1==nspin)?1:12) ); + v4rho2sigma2.resize( nrxx * ((1==nspin)?1:15) ); + v4rhosigma3 .resize( nrxx * ((1==nspin)?1:20) ); + v4sigma4 .resize( nrxx * ((1==nspin)?1:15) ); + case 3: v3rho2sigma .resize( nrxx * ((1==nspin)?1:9) ); + v3rhosigma2 .resize( nrxx * ((1==nspin)?1:12) ); + v3sigma3 .resize( nrxx * ((1==nspin)?1:10) ); + case 2: v2rhosigma .resize( nrxx * ((1==nspin)?1:6) ); + v2sigma2 .resize( nrxx * ((1==nspin)?1:6) ); + case 1: vsigma .resize( nrxx * ((1==nspin)?1:3) ); + case 0: break; + default: throw std::domain_error( + "order =" + std::to_string(order) + + " unfinished in " + std::string(__FILE__) + + " line " + std::to_string(__LINE__)); + break; + } + } + + for( xc_func_type &func : funcs ) + { + // jiyy add for threshold + constexpr double rho_threshold = 1E-6; + constexpr double grho_threshold = 1E-10; + + xc_func_set_dens_threshold(&func, rho_threshold); + + // sgn for threshold mask + const std::vector sgn = + XC_Functional_Libxc::cal_sgn( + rho_threshold, grho_threshold, func, nspin, nrxx, rho, sigma); + + // call libxc function + // attention: order 432 don't break + switch( func.info->family ) + { + case XC_FAMILY_LDA: + { + switch( order ) + { + case 4: xc_lda_lxc ( &func, nrxx, rho.data(), v4rho4.data() ); + case 3: xc_lda_kxc ( &func, nrxx, rho.data(), v3rho3.data() ); + case 2: xc_lda_fxc ( &func, nrxx, rho.data(), v2rho2.data() ); + case 1: xc_lda_exc_vxc( &func, nrxx, rho.data(), exc.data(), vrho.data() ); + break; + case 0: xc_lda_exc ( &func, nrxx, rho.data(), exc.data() ); + break; + default: throw std::domain_error( + "order =" + std::to_string(order) + + " unfinished in " + std::string(__FILE__) + + " line " + std::to_string(__LINE__)); + break; + } + break; + } + case XC_FAMILY_GGA: + case XC_FAMILY_HYB_GGA: + { + switch( order ) + { + case 4: xc_gga_lxc ( + &func, nrxx, rho.data(), sigma.data(), + v4rho4.data(), v4rho3sigma.data(), + v4rho2sigma2.data(), v4rhosigma3.data(), + v4sigma4.data() ); + case 3: xc_gga_kxc ( + &func, nrxx, rho.data(), sigma.data(), + v3rho3.data(), v3rho2sigma.data(), + v3rhosigma2.data(), v3sigma3.data() ); + case 2: xc_gga_fxc ( + &func, nrxx, rho.data(), sigma.data(), + v2rho2.data(), v2rhosigma.data(), + v2sigma2.data() ); + case 1: xc_gga_exc_vxc( + &func, nrxx, rho.data(), sigma.data(), + exc.data(), vrho.data(), vsigma.data() ); + break; + case 0: xc_gga_exc ( &func, nrxx, rho.data(), sigma.data(), exc.data() ); + break; + default: throw std::domain_error( + "order =" + std::to_string(order) + + " unfinished in " + std::string(__FILE__) + + " line " + std::to_string(__LINE__)); + break; + } + break; + } + default: + { + throw std::domain_error( + "func.info->family =" + std::to_string(func.info->family) + + " unfinished in " + std::string(__FILE__) + + " line " + std::to_string(__LINE__)); + break; + } + } // end switch( func.info->family ) + } // end for( xc_func_type &func : funcs ) + + auto write_data = [&pw_big, &pw_rhod, nspin]( + const std::string data_name, + const std::vector &data, + const int number_spin) +{ + for(int is=0; is data_cube(nxyz, 0.0); + + // num_z: how many planes on processor 'ip' + std::vector num_z(nproc_in_pool, 0); + for (int iz = 0; iz < nbz; iz++) + { + const int ip = iz % nproc_in_pool; + num_z[ip] += bz; + } + + // start_z: start position of z in + // processor ip. + std::vector start_z(nproc_in_pool, 0); + for (int ip = 1; ip < nproc_in_pool; ip++) + { + start_z[ip] = start_z[ip - 1] + num_z[ip - 1]; + } + + // which_ip: found iz belongs to which ip. + std::vector which_ip(nz, 0); + for (int iz = 0; iz < nz; iz++) + { + for (int ip = 0; ip < nproc_in_pool; ip++) + { + if (iz >= start_z[nproc_in_pool - 1]) + { + which_ip[iz] = nproc_in_pool - 1; + break; + } + else if (iz >= start_z[ip] && iz < start_z[ip + 1]) + { + which_ip[iz] = ip; + break; + } + } + } + + int count = 0; + std::vector zpiece(nxy, 0.0); + + // save the rho one z by one z. + for (int iz = 0; iz < nz; iz++) + { + zpiece.assign(nxy, 0.0); + + // tag must be different for different iz. + const int tag = iz; + MPI_Status ierror; + + // case 1: the first part of rho in processor 0. + if (which_ip[iz] == 0 && rank_in_pool == 0) + { + for (int ixy = 0; ixy < nxy; ixy++) + { + // mohan change to rho_save on 2012-02-10 + // because this can make our next restart calculation lead + // to the same scf_thr as the one saved. + zpiece[ixy] = data[ixy * nplane + (iz - startz_current) * nld]; + } + } + // case 2: > first part rho: send the rho to + // processor 0. + else if (which_ip[iz] == rank_in_pool) + { + for (int ixy = 0; ixy < nxy; ixy++) + { + zpiece[ixy] = data[ixy * nplane + (iz - startz_current) * nld]; + } + MPI_Send(zpiece.data(), nxy, MPI_DOUBLE, 0, tag, POOL_WORLD); + } + + // case 2: > first part rho: processor 0 receive the rho + // from other processors + else if (rank_in_pool == 0) + { + MPI_Recv(zpiece.data(), nxy, MPI_DOUBLE, which_ip[iz], + tag, POOL_WORLD, &ierror); + } + + if (my_rank == 0) + { + /// for cube file + for (int ixy = 0; ixy < nxy; ixy++) + { + data_cube[ixy * nz + iz] = zpiece[ixy]; + } + /// for cube file + } + } // end iz + + // for cube file + if (my_rank == 0) + { + for (int ixy = 0; ixy < nxy; ixy++) + { + for (int iz = 0; iz < nz; iz++) + { + ofs_cube << " " << data_cube[ixy * nz + iz]; + if ((iz % n_data_newline == n_data_newline-1) && (iz != nz - 1)) + { + ofs_cube << "\n"; + } + } + ofs_cube << "\n"; + } + } + /// for cube file + } + MPI_Barrier(MPI_COMM_WORLD); +} + +#else // #ifdef __MPI + +void ModuleIO::write_cube_core( + std::ofstream &ofs_cube, + const double*const data, + const int nxy, + const int nz, + const int n_data_newline) +{ + ModuleBase::TITLE("ModuleIO", "write_cube_core"); + for (int ixy = 0; ixy < nxy; ixy++) + { + for (int iz = 0; iz < nz; iz++) + { + ofs_cube << " " << data[iz * nxy + ixy]; + // ++count_cube; + if ((iz % n_data_newline == n_data_newline-1) && (iz != nz - 1)) + { + ofs_cube << "\n"; + } + } + ofs_cube << "\n"; + } +} + +#endif // #ifdef __MPI + +#endif // USE_LIBXC diff --git a/source/source_io/write_libxc_r.h b/source/source_io/module_chgpot/write_libxc_r.h similarity index 84% rename from source/source_io/write_libxc_r.h rename to source/source_io/module_chgpot/write_libxc_r.h index ad82e68b57..d5464998ea 100644 --- a/source/source_io/write_libxc_r.h +++ b/source/source_io/module_chgpot/write_libxc_r.h @@ -11,9 +11,9 @@ #include #include - class Charge; - namespace ModulePW{ class PW_Basis_Big; } - namespace ModulePW{ class PW_Basis; } +class Charge; +namespace ModulePW{ class PW_Basis_Big; } +namespace ModulePW{ class PW_Basis; } namespace ModuleIO { @@ -51,4 +51,4 @@ namespace ModuleIO #endif // USE_LIBXC -#endif // WRITE_LIBXC_R_H \ No newline at end of file +#endif // WRITE_LIBXC_R_H diff --git a/source/source_io/ctrl_iter_lcao.cpp b/source/source_io/module_ctrl/ctrl_iter_lcao.cpp similarity index 86% rename from source/source_io/ctrl_iter_lcao.cpp rename to source/source_io/module_ctrl/ctrl_iter_lcao.cpp index d0b0c1bd0a..9369dca5a1 100644 --- a/source/source_io/ctrl_iter_lcao.cpp +++ b/source/source_io/module_ctrl/ctrl_iter_lcao.cpp @@ -1,5 +1,4 @@ -#include "source_io/ctrl_iter_lcao.h" // use ctrl_iter_lcao() -#include "source_pw/module_pwdft/global.h" // use GlobalC::restart +#include "ctrl_iter_lcao.h" // use ctrl_iter_lcao() #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" @@ -13,7 +12,8 @@ template void ctrl_iter_lcao(UnitCell& ucell, // unit cell * const Input_para& inp, // input parameters * K_Vectors& kv, // k points * - elecstate::ElecStateLCAO* pelec, // electronic info * + elecstate::ElecState* pelec, // electronic info * + elecstate::DensityMatrix& dm, // density matrix, mohan add 2025-11-03 Parallel_Orbitals& pv, // parallel orbital info * Grid_Driver& gd, // adjacent atom info * psi::Psi* psi, // wave functions * @@ -48,9 +48,9 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell * if (GlobalC::exx_info.info_global.cal_exx) { GlobalC::exx_info.info_ri.real_number ? - exx_nao.exd->exx_iter_finish(kv, ucell, *p_hamilt, *pelec, + exx_nao.exd->exx_iter_finish(kv, ucell, *p_hamilt, *pelec, &dm, *p_chgmix, scf_ene_thr, iter, istep, conv_esolver) : - exx_nao.exc->exx_iter_finish(kv, ucell, *p_hamilt, *pelec, + exx_nao.exc->exx_iter_finish(kv, ucell, *p_hamilt, *pelec, &dm, *p_chgmix, scf_ene_thr, iter, istep, conv_esolver); } } @@ -68,7 +68,7 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell * deepks_interface.out_deepks_labels(pelec->f_en.etot, kv.get_nks(), ucell.nat, PARAM.globalv.nlocal, pelec->ekb, kv.kvec_d, - ucell, orb, gd, &pv, *psi, pelec->get_DM(), + ucell, orb, gd, &pv, *psi, &dm, p_hamilt, iter, conv_esolver, GlobalV::MY_RANK, GlobalV::ofs_running); } } @@ -81,7 +81,8 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell * template void ctrl_iter_lcao(UnitCell& ucell, // unit cell * const Input_para& inp, // input parameters * K_Vectors& kv, // k points * - elecstate::ElecStateLCAO* pelec, // electronic info * + elecstate::ElecState* pelec, // electronic info * + elecstate::DensityMatrix& dm, // density matrix, mohan add 2025-11-03 Parallel_Orbitals& pv, // parallel orbital info * Grid_Driver& gd, // adjacent atom info * psi::Psi* psi, // wave functions * @@ -100,7 +101,8 @@ template void ctrl_iter_lcao(UnitCell& ucell, // unit cell * template void ctrl_iter_lcao, double>(UnitCell& ucell, // unit cell * const Input_para& inp, // input parameters * K_Vectors& kv, // k points * - elecstate::ElecStateLCAO>* pelec, // electronic info * + elecstate::ElecState* pelec, // electronic info * + elecstate::DensityMatrix, double>& dm, // density matrix, mohan add 2025-11-03 Parallel_Orbitals& pv, // parallel orbital info * Grid_Driver& gd, // adjacent atom info * psi::Psi>* psi, // wave functions * @@ -119,7 +121,8 @@ template void ctrl_iter_lcao, double>(UnitCell& ucell, // u template void ctrl_iter_lcao, std::complex>(UnitCell& ucell, // unit cell * const Input_para& inp, // input parameters * K_Vectors& kv, // k points * - elecstate::ElecStateLCAO>* pelec, // electronic info * + elecstate::ElecState* pelec, // electronic info * + elecstate::DensityMatrix, double>& dm, // density matrix, mohan add 2025-11-03 Parallel_Orbitals& pv, // parallel orbital info * Grid_Driver& gd, // adjacent atom info * psi::Psi>* psi, // wave functions * diff --git a/source/source_io/ctrl_iter_lcao.h b/source/source_io/module_ctrl/ctrl_iter_lcao.h similarity index 87% rename from source/source_io/ctrl_iter_lcao.h rename to source/source_io/module_ctrl/ctrl_iter_lcao.h index c94afac122..64cc0123d2 100644 --- a/source/source_io/ctrl_iter_lcao.h +++ b/source/source_io/module_ctrl/ctrl_iter_lcao.h @@ -10,6 +10,7 @@ #include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO #include "source_lcao/setup_exx.h" // mohan add 20251008 #include "source_lcao/setup_deepks.h" // mohan add 20251010 +#include "source_io/module_restart/restart.h" namespace ModuleIO { @@ -18,7 +19,8 @@ template void ctrl_iter_lcao(UnitCell& ucell, // unit cell * const Input_para& inp, // input parameters * K_Vectors& kv, // k points * - elecstate::ElecStateLCAO* pelec, // electronic info * + elecstate::ElecState* pelec, // electronic info * + elecstate::DensityMatrix& dm, // density matrix, mohan add 2025-11-03 Parallel_Orbitals& pv, // parallel orbital info * Grid_Driver& gd, // adjacent atom info * psi::Psi* psi, // wave functions * diff --git a/source/source_io/module_ctrl/ctrl_output_fp.cpp b/source/source_io/module_ctrl/ctrl_output_fp.cpp new file mode 100644 index 0000000000..7b5a41408e --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_output_fp.cpp @@ -0,0 +1,205 @@ +#include "ctrl_output_fp.h" // use ctrl_output_fp() + +#include "../module_output/cube_io.h" // use write_vdata_palgrid +#include "source_estate/module_charge/symmetry_rho.h" // use Symmetry_rho +#include "source_hamilt/module_xc/xc_functional.h" // use XC_Functional +#include "source_io/module_chgpot/write_elecstat_pot.h" // use write_elecstat_pot +#include "source_io/module_elf/write_elf.h" + +#ifdef USE_LIBXC +#include "source_io/module_chgpot/write_libxc_r.h" +#endif + +namespace ModuleIO +{ + +void ctrl_output_fp(UnitCell& ucell, + elecstate::ElecState* pelec, + ModulePW::PW_Basis_Big* pw_big, + ModulePW::PW_Basis* pw_rhod, + Charge& chr, + surchem& solvent, + Parallel_Grid& para_grid, + const int istep) +{ + ModuleBase::TITLE("ModuleIO", "ctrl_output_fp"); + ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); + + const bool out_app_flag = PARAM.inp.out_app_flag; + const bool gamma_only = PARAM.globalv.gamma_only_local; + const int nspin = PARAM.inp.nspin; + const std::string global_out_dir = PARAM.globalv.global_out_dir; + + // print out the 'g' index when istep_in != -1 + int istep_in = -1; + if (PARAM.inp.esolver_type != "tddft" && PARAM.inp.out_freq_ion > 0) // default value of out_freq_ion is 0 + { + if (istep % PARAM.inp.out_freq_ion == 0) + { + istep_in = istep; + } + } + else if (PARAM.inp.esolver_type == "tddft" && PARAM.inp.out_freq_td > 0) // default value of out_freq_td is 0 + { + if (istep % PARAM.inp.out_freq_td == 0) + { + istep_in = istep; + } + } + + std::string geom_block; + if (istep_in == -1) + { + // do nothing + } + else if (istep_in >= 0) + { + geom_block = "g" + std::to_string(istep + 1); + } + + // 4) write charge density + if (PARAM.inp.out_chg[0] > 0) + { + for (int is = 0; is < nspin; ++is) + { + pw_rhod->real2recip(chr.rho_save[is], chr.rhog_save[is]); + + std::string fn = PARAM.globalv.global_out_dir + "chg"; + + std::string spin_block; + if (nspin == 2 || nspin == 4) + { + spin_block = "s" + std::to_string(is + 1); + } + else if (nspin == 1) + { + // do nothing + } + + fn += spin_block + geom_block + ".cube"; + + ModuleIO::write_vdata_palgrid(para_grid, + chr.rho_save[is], + is, + nspin, + istep_in, + fn, + pelec->eferm.get_efval(is), + &(ucell), + PARAM.inp.out_chg[1], + 1); + + if (XC_Functional::get_ked_flag()) + { + fn = PARAM.globalv.global_out_dir + "tau"; + + fn += spin_block + geom_block + ".cube"; + + ModuleIO::write_vdata_palgrid(para_grid, + chr.kin_r_save[is], + is, + nspin, + istep, + fn, + pelec->eferm.get_efval(is), + &(ucell)); + } + } + } + + // 5) write potential + if (PARAM.inp.out_pot == 1 || PARAM.inp.out_pot == 3) + { + for (int is = 0; is < nspin; is++) + { + std::string fn = PARAM.globalv.global_out_dir + "pot"; + + std::string spin_block; + if (nspin == 2 || nspin == 4) + { + spin_block = "s" + std::to_string(is + 1); + } + else if (nspin == 1) + { + // do nothing + } + + fn += spin_block + geom_block + ".cube"; + + ModuleIO::write_vdata_palgrid(para_grid, + pelec->pot->get_eff_v(is), + is, + nspin, + istep_in, + fn, + 0.0, // efermi + &(ucell), + 3, // precision + 0); // out_fermi + } + } + else if (PARAM.inp.out_pot == 2) + { + std::string fn = PARAM.globalv.global_out_dir + "potes"; + fn += geom_block + ".cube"; + + ModuleIO::write_elecstat_pot( +#ifdef __MPI + pw_big->bz, + pw_big->nbz, +#endif + fn, + istep, + pw_rhod, + &chr, + &(ucell), + pelec->pot->get_fixed_v(), + solvent); + } + + // 6) write ELF + if (PARAM.inp.out_elf[0] > 0) + { + chr.cal_elf = true; + Symmetry_rho srho; + for (int is = 0; is < nspin; is++) + { + srho.begin(is, chr, pw_rhod, ucell.symm); + } + + std::string out_dir = PARAM.globalv.global_out_dir; + ModuleIO::write_elf( +#ifdef __MPI + pw_big->bz, + pw_big->nbz, +#endif + out_dir, + istep, + nspin, + chr.rho, + chr.kin_r, + pw_rhod, + para_grid, + &(ucell), + PARAM.inp.out_elf[1]); + } + +#ifdef USE_LIBXC + // 7) write xc(r) + if (PARAM.inp.out_xc_r[0] >= 0) + { + ModuleIO::write_libxc_r(PARAM.inp.out_xc_r[0], + XC_Functional::get_func_id(), + pw_rhod->nrxx, // number of real-space grid + ucell.omega, // volume of cell + ucell.tpiba, + chr, + *pw_big, + *pw_rhod); + } +#endif + + ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); +} + +} // namespace ModuleIO diff --git a/source/source_io/module_ctrl/ctrl_output_fp.h b/source/source_io/module_ctrl/ctrl_output_fp.h new file mode 100644 index 0000000000..ec9f4e20e7 --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_output_fp.h @@ -0,0 +1,19 @@ +#ifndef CTRL_OUTPUT_FP_H +#define CTRL_OUTPUT_FP_H + +#include "source_estate/elecstate_lcao.h" + +namespace ModuleIO +{ + +void ctrl_output_fp(UnitCell& ucell, + elecstate::ElecState* pelec, + ModulePW::PW_Basis_Big* pw_big, + ModulePW::PW_Basis* pw_rhod, + Charge& chr, + surchem& solvent, + Parallel_Grid& para_grid, + const int istep); + +} +#endif diff --git a/source/source_io/ctrl_output_pw.cpp b/source/source_io/module_ctrl/ctrl_output_pw.cpp similarity index 97% rename from source/source_io/ctrl_output_pw.cpp rename to source/source_io/module_ctrl/ctrl_output_pw.cpp index 34d57caa01..2f0c157a82 100644 --- a/source/source_io/ctrl_output_pw.cpp +++ b/source/source_io/module_ctrl/ctrl_output_pw.cpp @@ -1,21 +1,21 @@ -#include "source_io/ctrl_output_pw.h" +#include "ctrl_output_pw.h" -#include "source_io/write_wfc_pw.h" // use write_wfc_pw -#include "source_io/write_dos_pw.h" // use write_dos_pw -#include "source_io/to_wannier90_pw.h" // wannier90 interface +#include "../module_wf/write_wfc_pw.h" // use write_wfc_pw +#include "../module_dos/write_dos_pw.h" // use write_dos_pw +#include "../module_wannier/to_wannier90_pw.h" // wannier90 interface #include "source_pw/module_pwdft/onsite_projector.h" // use projector -#include "source_io/numerical_basis.h" -#include "source_io/numerical_descriptor.h" -#include "source_io/cal_ldos.h" -#include "source_io/berryphase.h" +#include "../module_bessel/numerical_basis.h" +#include "../module_bessel/numerical_descriptor.h" +#include "../module_dos/cal_ldos.h" +#include "../module_unk/berryphase.h" #include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_base/formatter.h" -#include "source_io/get_pchg_pw.h" -#include "source_io/get_wf_pw.h" +#include "../module_chgpot/get_pchg_pw.h" +#include "../module_wf/get_wf_pw.h" #include "source_pw/module_pwdft/elecond.h" #ifdef __MLALGO -#include "source_io/write_mlkedf_descriptors.h" +#include "../module_ml/write_mlkedf_descriptors.h" #endif void ModuleIO::ctrl_iter_pw(const int istep, @@ -366,7 +366,7 @@ void ModuleIO::ctrl_runner_pw(UnitCell& ucell, pw_wfc, pw_rho, ucell, - pelec->pot->get_effective_v(0)); + pelec->pot->get_eff_v(0)); } #endif diff --git a/source/source_io/ctrl_output_pw.h b/source/source_io/module_ctrl/ctrl_output_pw.h similarity index 100% rename from source/source_io/ctrl_output_pw.h rename to source/source_io/module_ctrl/ctrl_output_pw.h diff --git a/source/source_io/module_ctrl/ctrl_output_td.cpp b/source/source_io/module_ctrl/ctrl_output_td.cpp new file mode 100644 index 0000000000..65d0c9ab96 --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_output_td.cpp @@ -0,0 +1,124 @@ +#include "ctrl_output_td.h" + +#include "source_base/parallel_global.h" +#include "source_io/module_dipole/dipole_io.h" +#include "source_io/module_parameter/parameter.h" +#include "source_io/module_current/td_current_io.h" + +namespace ModuleIO +{ + +template +void ctrl_output_td(const UnitCell& ucell, + double** rho_save, + const ModulePW::PW_Basis* rhopw, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const TwoCenterIntegrator* intor, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + const Velocity_op* velocity_mat, + const Grid_Driver& grid, + hamilt::HamiltLCAO, TR>* p_hamilt, + Record_adj& RA, + TD_info* td_p, + const Exx_NAO>& exx_nao + ) +{ + ModuleBase::TITLE("ModuleIO", "ctrl_output_td"); + +#ifdef __LCAO + // (1) Write dipole information + for (int is = 0; is < PARAM.inp.nspin; ++is) + { + if (PARAM.inp.out_dipole == 1) + { + std::stringstream ss_dipole; + ss_dipole << PARAM.globalv.global_out_dir << "dipole_s" << is + 1 << ".txt"; + ModuleIO::write_dipole(ucell, rho_save[is], rhopw, is, istep, ss_dipole.str()); + } + } + + // (2) Write current information + const elecstate::ElecStateLCAO>* pelec_lcao + = dynamic_cast>*>(pelec); + + if (!pelec_lcao) + { + ModuleBase::WARNING_QUIT("ModuleIO::ctrl_output_td", "Failed to cast ElecState to ElecStateLCAO"); + } + + if (TD_info::out_current == 1) + { + if (TD_info::out_current_k) + { + ModuleIO::write_current_eachk(ucell, istep, psi, pelec, kv, intor, pv, orb, velocity_mat, RA); + } + else + { + ModuleIO::write_current(ucell, istep, psi, pelec, kv, intor, pv, orb, velocity_mat, RA); + } + } + else if(TD_info::out_current==2) + { + ModuleIO::write_current(ucell, grid, istep, psi, pelec, kv, pv, orb, td_p->r_calculator, p_hamilt->getSR(), p_hamilt->getHR(), exx_nao); + } + + // (3) Output file for restart + if (PARAM.inp.out_freq_td > 0) // default value of out_freq_td is 0 + { + if (istep % PARAM.inp.out_freq_td == 0) + { + if (td_p != nullptr) + { + td_p->out_restart_info(istep, elecstate::H_TDDFT_pw::At, elecstate::H_TDDFT_pw::At_laststep); + } + else + { + ModuleBase::WARNING_QUIT("ModuleIO::ctrl_output_td", + "TD_info pointer is null, cannot output restart info."); + } + } + } +#endif // __LCAO +} + +template void ctrl_output_td(const UnitCell&, + double**, + const ModulePW::PW_Basis*, + const int, + const psi::Psi>*, + const elecstate::ElecState*, + const K_Vectors&, + const TwoCenterIntegrator*, + const Parallel_Orbitals*, + const LCAO_Orbitals&, + const Velocity_op*, + const Grid_Driver&, + hamilt::HamiltLCAO, double>*, + Record_adj&, + TD_info*, + const Exx_NAO>& + ); + +template void ctrl_output_td>(const UnitCell&, + double**, + const ModulePW::PW_Basis*, + const int, + const psi::Psi>*, + const elecstate::ElecState*, + const K_Vectors&, + const TwoCenterIntegrator*, + const Parallel_Orbitals*, + const LCAO_Orbitals&, + const Velocity_op>*, + const Grid_Driver&, + hamilt::HamiltLCAO, std::complex>*, + Record_adj&, + TD_info*, + const Exx_NAO>& + ); + +} // namespace ModuleIO \ No newline at end of file diff --git a/source/source_io/module_ctrl/ctrl_output_td.h b/source/source_io/module_ctrl/ctrl_output_td.h new file mode 100644 index 0000000000..1b57944d87 --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_output_td.h @@ -0,0 +1,44 @@ +#ifndef CTRL_OUTPUT_TD_H +#define CTRL_OUTPUT_TD_H + +#include "source_basis/module_ao/ORB_read.h" +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_basis/module_nao/two_center_bundle.h" +#include "source_cell/unitcell.h" +#include "source_estate/elecstate_lcao.h" +#include "source_estate/module_pot/H_TDDFT_pw.h" +#include "source_lcao/module_rt/td_info.h" +#include "source_lcao/module_rt/velocity_op.h" +#include "source_lcao/record_adj.h" +#include "source_psi/psi.h" +#include "source_lcao/hamilt_lcao.h" +#include "source_lcao/setup_exx.h" +#ifdef __EXX +#include +#endif + +namespace ModuleIO +{ + +template +void ctrl_output_td(const UnitCell& ucell, + double** rho_save, + const ModulePW::PW_Basis* rhopw, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const TwoCenterIntegrator* intor, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + const Velocity_op* velocity_mat, + const Grid_Driver& grid, + hamilt::HamiltLCAO, TR>* p_hamilt, + Record_adj& RA, + TD_info* td_p, + const Exx_NAO>& exx_nao + ); + +} // namespace ModuleIO + +#endif // CTRL_OUTPUT_TD_H \ No newline at end of file diff --git a/source/source_io/ctrl_runner_lcao.cpp b/source/source_io/module_ctrl/ctrl_runner_lcao.cpp similarity index 88% rename from source/source_io/ctrl_runner_lcao.cpp rename to source/source_io/module_ctrl/ctrl_runner_lcao.cpp index 9cf550830c..902337f35e 100644 --- a/source/source_io/ctrl_runner_lcao.cpp +++ b/source/source_io/module_ctrl/ctrl_runner_lcao.cpp @@ -1,13 +1,13 @@ -#include "source_io/ctrl_runner_lcao.h" // use ctrl_runner_lcao() +#include "ctrl_runner_lcao.h" // use ctrl_runner_lcao() #include "source_estate/elecstate_lcao.h" // use elecstate::ElecState #include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO -#include "source_io/write_proj_band_lcao.h" // projcted band structure -#include "source_io/cal_ldos.h" // cal LDOS -#include "source_io/write_eband_terms.hpp" -#include "source_io/write_vxc.hpp" -#include "source_io/write_vxc_r.hpp" +#include "../module_energy/write_proj_band_lcao.h" // projcted band structure +#include "../module_dos/cal_ldos.h" // cal LDOS +#include "../module_energy/write_eband_terms.hpp" +#include "../module_hs/write_vxc.hpp" +#include "../module_hs/write_vxc_r.hpp" namespace ModuleIO { @@ -16,7 +16,8 @@ template void ctrl_runner_lcao(UnitCell& ucell, // unitcell const Input_para &inp, // input K_Vectors &kv, // k-point - elecstate::ElecStateLCAO* pelec,// electronic info + elecstate::ElecState* pelec,// electronic info + const LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-02 Parallel_Orbitals &pv, // orbital info Parallel_Grid &pgrid, // grid info Grid_Driver &gd, // search for adjacent atoms @@ -44,7 +45,8 @@ void ctrl_runner_lcao(UnitCell& ucell, // unitcell // 2) out ldos if (inp.out_ldos[0]) { - ModuleIO::Cal_ldos::cal_ldos_lcao(pelec, psi[0], pgrid, ucell); + ModuleIO::Cal_ldos::cal_ldos_lcao(pelec->eferm, chr, dmat, kv, + pelec->ekb, pelec->wg, psi[0], pgrid, ucell); } // 3) print out exchange-correlation potential @@ -131,10 +133,11 @@ void ctrl_runner_lcao(UnitCell& ucell, // unitcell // TK: double TR: double -template void ModuleIO::ctrl_runner_lcao(UnitCell& ucell, // unitcell +template void ctrl_runner_lcao(UnitCell& ucell, // unitcell const Input_para &inp, // input K_Vectors &kv, // k-point - elecstate::ElecStateLCAO* pelec,// electronic info + elecstate::ElecState* pelec,// electronic info + const LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-02 Parallel_Orbitals &pv, // orbital info Parallel_Grid &pgrid, // grid info Grid_Driver &gd, // search for adjacent atoms @@ -154,7 +157,8 @@ template void ModuleIO::ctrl_runner_lcao(UnitCell& ucell, / template void ctrl_runner_lcao, double>(UnitCell& ucell, // unitcell const Input_para &inp, // input K_Vectors &kv, // k-point - elecstate::ElecStateLCAO>* pelec,// electronic info + elecstate::ElecState* pelec,// electronic info + const LCAO_domain::Setup_DM> &dmat, // mohan add 2025-11-02 Parallel_Orbitals &pv, // orbital info Parallel_Grid &pgrid, // grid info Grid_Driver &gd, // search for adjacent atoms @@ -174,7 +178,8 @@ template void ctrl_runner_lcao, double>(UnitCell& ucell, template void ctrl_runner_lcao, std::complex>(UnitCell& ucell, // unitcell const Input_para &inp, // input K_Vectors &kv, // k-point - elecstate::ElecStateLCAO>* pelec,// electronic info + elecstate::ElecState* pelec,// electronic info + const LCAO_domain::Setup_DM> &dmat, // mohan add 2025-11-02 Parallel_Orbitals &pv, // orbital info Parallel_Grid &pgrid, // grid info Grid_Driver &gd, // search for adjacent atoms diff --git a/source/source_io/ctrl_runner_lcao.h b/source/source_io/module_ctrl/ctrl_runner_lcao.h similarity index 83% rename from source/source_io/ctrl_runner_lcao.h rename to source/source_io/module_ctrl/ctrl_runner_lcao.h index 2b57c1800f..95c4fe4658 100644 --- a/source/source_io/ctrl_runner_lcao.h +++ b/source/source_io/module_ctrl/ctrl_runner_lcao.h @@ -3,11 +3,12 @@ #include "source_cell/unitcell.h" // use UnitCell #include "source_cell/klist.h" // use K_Vectors -#include "source_estate/elecstate_lcao.h" // use elecstate::ElecStateLCAO +#include "source_estate/elecstate.h" // use elecstate::ElecStateLCAO #include "source_psi/psi.h" // use Psi #include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO #include "source_basis/module_nao/two_center_bundle.h" // use TwoCenterBundle #include "source_lcao/setup_exx.h" // for exx, mohan add 20251018 +#include "source_lcao/setup_dm.h" // for density matrix, mohan add 20251103 namespace ModuleIO { @@ -16,7 +17,8 @@ template void ctrl_runner_lcao(UnitCell& ucell, // unitcell const Input_para &inp, // input K_Vectors &kv, // k-point - elecstate::ElecStateLCAO* pelec,// electronic info + elecstate::ElecState* pelec,// electronic info + const LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-02 Parallel_Orbitals &pv, // orbital info Parallel_Grid &pgrid, // grid info Grid_Driver &gd, // search for adjacent atoms diff --git a/source/source_io/module_ctrl/ctrl_scf_lcao.cpp b/source/source_io/module_ctrl/ctrl_scf_lcao.cpp new file mode 100644 index 0000000000..d89993ce1a --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_scf_lcao.cpp @@ -0,0 +1,572 @@ +#include "ctrl_scf_lcao.h" // use ctrl_scf_lcao() + +#include "source_estate/elecstate_lcao.h" // use elecstate::ElecState +#include "source_hamilt/hamilt.h" // use Hamilt +#include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO + +#include + +// functions +#include "../module_unk/berryphase.h" // use berryphase +#include "../module_hs/cal_pLpR.h" // use AngularMomentumCalculator() +#include "source_io/module_hs/output_mat_sparse.h" // use ModuleIO::output_mat_sparse() +#include "../module_mulliken/output_mulliken.h" // use cal_mag() +#include "../module_wannier/to_wannier90_lcao.h" // use toWannier90_LCAO +#include "../module_wannier/to_wannier90_lcao_in_pw.h" // use toWannier90_LCAO_IN_PW +#include "../module_hs/write_HS.h" // use ModuleIO::write_hsk() +#include "../module_dm/write_dmk.h" // use ModuleIO::write_dmk() +#include "../module_dm/write_dmr.h" // use ModuleIO::write_dmr() +#include "../module_dos/write_dos_lcao.h" // use ModuleIO::write_dos_lcao() +#include "../module_wf/write_wfc_nao.h" // use ModuleIO::write_wfc_nao() +#include "source_lcao/module_deltaspin/spin_constrain.h" // use spinconstrain::SpinConstrain +#include "source_lcao/module_operator_lcao/ekinetic.h" // use hamilt::EKinetic +#ifdef __MLALGO +#include "source_lcao/module_deepks/LCAO_deepks.h" +#include "source_lcao/module_deepks/LCAO_deepks_interface.h" +#endif +#ifdef __EXX +#include "source_lcao/module_ri/Exx_LRI_interface.h" // use EXX codes +#include "source_lcao/module_ri/RPA_LRI.h" // use RPA code +#endif +#include "../module_qo/to_qo.h" // use toQO +#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes +#include "source_lcao/rho_tau_lcao.h" // mohan add 2025-10-24 +#include "source_lcao/module_operator_lcao/overlap.h" // use hamilt::Overlap for NAMD + +template +void ModuleIO::ctrl_scf_lcao(UnitCell& ucell, + const Input_para& inp, + K_Vectors& kv, + elecstate::ElecState* pelec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + Parallel_Orbitals& pv, + Grid_Driver& gd, + psi::Psi* psi, + hamilt::HamiltLCAO* p_hamilt, + Plus_U& dftu, // mohan add 2025-11-07 + TwoCenterBundle& two_center_bundle, + LCAO_Orbitals& orb, + const ModulePW::PW_Basis_K* pw_wfc, // for berryphase + const ModulePW::PW_Basis* pw_rho, // for berryphase + const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 + const Structure_Factor& sf, // for Wannier90 + rdmft::RDMFT& rdmft_solver, // for RDMFT + Setup_DeePKS& deepks, + Exx_NAO& exx_nao, + const bool conv_esolver, + const bool scf_nmax_flag, + const int istep) +{ + ModuleBase::TITLE("ModuleIO", "ctrl_scf_lcao"); + ModuleBase::timer::tick("ModuleIO", "ctrl_scf_lcao"); + + //***** + // if istep_in = -1, istep will not appear in file name + // if iter_in = -1, iter will not appear in file name + int istep_in = -1; + int iter_in = -1; + bool out_flag = false; + if (PARAM.inp.esolver_type != "tddft" && inp.out_freq_ion > 0) // default value of out_freq_ion is 0 + { + if (istep % inp.out_freq_ion == 0) + { + istep_in = istep; + out_flag = true; + } + } + else if (PARAM.inp.esolver_type == "tddft" && inp.out_freq_td > 0) // default value of out_freq_td is 0 + { + if (istep % inp.out_freq_td == 0) + { + istep_in = istep; + out_flag = true; + } + } + else if (conv_esolver || scf_nmax_flag) // mohan add scf_nmax_flag on 20250921 + { + out_flag = true; + } + + if (!out_flag) + { + return; + } + + //***** + + const bool out_app_flag = inp.out_app_flag; + const bool gamma_only = PARAM.globalv.gamma_only_local; + const int nspin = inp.nspin; + const std::string global_out_dir = PARAM.globalv.global_out_dir; + + //------------------------------------------------------------------ + //! 1) print out density of states (DOS) + //------------------------------------------------------------------ + if (inp.out_dos) + { + ModuleIO::write_dos_lcao(psi, + p_hamilt, + pv, + ucell, + kv, + inp.nbands, + pelec->eferm, + pelec->ekb, + pelec->wg, + inp.dos_edelta_ev, + inp.dos_scale, + inp.dos_sigma, + out_app_flag, + istep, + GlobalV::ofs_running); + } + + //------------------------------------------------------------------ + //! 2) Output density matrix DM(R) + //------------------------------------------------------------------ + if (inp.out_dmr[0]) + { + const int precision = inp.out_dmr[1]; + + ModuleIO::write_dmr(dm->get_DMR_vector(), precision, pv, out_app_flag, ucell.get_iat2iwt(), ucell.nat, istep); + } + + //------------------------------------------------------------------ + //! 3) Output density matrix DM(k) + //------------------------------------------------------------------ + if (inp.out_dmk[0]) + { + std::vector efermis(nspin == 2 ? 2 : 1); + for (int ispin = 0; ispin < efermis.size(); ispin++) + { + efermis[ispin] = pelec->eferm.get_efval(ispin); + } + const int precision = inp.out_dmk[1]; + + ModuleIO::write_dmk(dm->get_DMK_vector(), precision, efermis, &(ucell), pv, istep); + } + + //------------------------------------------------------------------ + // 4) Output H(k) and S(k) matrices for each k-point + //------------------------------------------------------------------ + if (inp.out_mat_hs[0]) + { + ModuleIO::write_hsk(global_out_dir, + nspin, + kv.get_nks(), + kv.get_nkstot(), + kv.ik2iktot, + kv.isk, + p_hamilt, + pv, + gamma_only, + out_app_flag, + istep, + GlobalV::ofs_running); + } + + //------------------------------------------------------------------ + //! 5) Output electronic wavefunctions Psi(k) + //------------------------------------------------------------------ + if (elecstate::ElecStateLCAO::out_wfc_lcao) + { + ModuleIO::write_wfc_nao(elecstate::ElecStateLCAO::out_wfc_lcao, + out_app_flag, + psi[0], + pelec->ekb, + pelec->wg, + kv.kvec_c, + kv.ik2iktot, + kv.get_nkstot(), + pv, + nspin, + istep); + } + + //------------------------------------------------------------------ + //! 6) Output DeePKS information + //------------------------------------------------------------------ +#ifdef __MLALGO + // need control parameter + hamilt::HamiltLCAO* p_ham_deepks = p_hamilt; + std::shared_ptr> ld_shared_ptr(&deepks.ld, [](LCAO_Deepks*) {}); + LCAO_Deepks_Interface deepks_interface(ld_shared_ptr); + + deepks_interface.out_deepks_labels(pelec->f_en.etot, + kv.get_nks(), + ucell.nat, + PARAM.globalv.nlocal, + pelec->ekb, + kv.kvec_d, + ucell, + orb, + gd, + &pv, + *psi, + dm, + p_ham_deepks, + -1, // -1 when called in after scf + true, // no used when after scf + GlobalV::MY_RANK, + GlobalV::ofs_running); +#endif + + //------------------------------------------------------------------ + //! 7) Output matrices, where O can be chosen as + //! H, S, dH, dS, T, r. The format is CSR format. + //------------------------------------------------------------------ + hamilt::Hamilt* p_ham_tk = static_cast*>(p_hamilt); + + ModuleIO::output_mat_sparse(inp.out_mat_hs2, + inp.out_mat_dh, + inp.out_mat_ds, + inp.out_mat_t, + inp.out_mat_r, + istep, + pelec->pot->get_eff_v(), + pv, + two_center_bundle, + orb, + ucell, + gd, + kv, + p_ham_tk, + &dftu); + + //------------------------------------------------------------------ + //! 8) Output kinetic matrix + //------------------------------------------------------------------ + if (inp.out_mat_tk[0]) + { + hamilt::HS_Matrix_K hsk(&pv, true); + hamilt::HContainer hR(&pv); + hamilt::Operator* ekinetic + = new hamilt::EKinetic>(&hsk, + kv.kvec_d, + &hR, + &ucell, + orb.cutoffs(), + &gd, + two_center_bundle.kinetic_orb.get()); + + const int nspin_k = (nspin == 2 ? 2 : 1); + for (int ik = 0; ik < kv.get_nks() / nspin_k; ++ik) + { + ekinetic->init(ik); + + const int out_label = 1; // 1: .txt, 2: .dat + + std::string t_fn = ModuleIO::filename_output(global_out_dir, + "tk", + "nao", + ik, + kv.ik2iktot, + inp.nspin, + kv.get_nkstot(), + out_label, + out_app_flag, + gamma_only, + istep); + + ModuleIO::save_mat(istep, + hsk.get_hk(), + PARAM.globalv.nlocal, + false, // bit + inp.out_mat_tk[1], + 1, // true for upper triangle matrix + inp.out_app_flag, + t_fn, + pv, + GlobalV::DRANK); + } + + delete ekinetic; + } + + //------------------------------------------------------------------ + //! 9) Output expectation of angular momentum operator + //------------------------------------------------------------------ + if (inp.out_mat_l[0]) + { + ModuleIO::AngularMomentumCalculator mylcalculator(inp.orbital_dir, + ucell, + orb.get_rcutmax_Phi(), + inp.test_deconstructor, + inp.test_grid, + inp.test_atom_input, + PARAM.globalv.search_pbc, + &GlobalV::ofs_running, + GlobalV::MY_RANK); + mylcalculator.calculate(inp.suffix, global_out_dir, ucell, inp.out_mat_l[1], GlobalV::MY_RANK); + } + + //------------------------------------------------------------------ + //! 10) Output Mulliken charge + //------------------------------------------------------------------ + if (inp.out_mul) + { + ModuleIO::cal_mag(&pv, + p_hamilt, + kv, + dm, // mohan add 2025-11-04 + two_center_bundle, + orb, + ucell, + gd, + istep, + true); + } + + //------------------------------------------------------------------ + //! 11) Output atomic magnetization by using 'spin_constraint' + //------------------------------------------------------------------ + if (inp.sc_mag_switch) + { + spinconstrain::SpinConstrain& sc = spinconstrain::SpinConstrain::getScInstance(); + sc.cal_mi_lcao(istep); + sc.print_Mi(GlobalV::ofs_running); + sc.print_Mag_Force(GlobalV::ofs_running); + } + + //------------------------------------------------------------------ + //! 12) Output Berry phase + //------------------------------------------------------------------ + if (inp.calculation == "nscf" && berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag != 1) + { + std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Berry phase calculation"); + berryphase bp(&pv); + bp.lcao_init(ucell, gd, kv, orb); + // additional step before calling macroscopic_polarization + bp.Macroscopic_polarization(ucell, pw_wfc->npwk_max, psi, pw_rho, pw_wfc, kv); + std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Berry phase calculation"); + } + + //------------------------------------------------------------------ + //! 13) Wannier90 interface in LCAO basis + // added by jingan in 2018.11.7 + //------------------------------------------------------------------ + if (inp.calculation == "nscf" && inp.towannier90) + { + std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "Wave function to Wannier90"); + if (inp.wannier_method == 1) + { + toWannier90_LCAO_IN_PW wan(inp.out_wannier_mmn, + inp.out_wannier_amn, + inp.out_wannier_unk, + inp.out_wannier_eig, + inp.out_wannier_wvfn_formatted, + inp.nnkpfile, + inp.wannier_spin); + wan.set_tpiba_omega(ucell.tpiba, ucell.omega); + wan.calculate(ucell, pelec->ekb, pw_wfc, pw_big, sf, kv, psi, &pv); + } + else if (inp.wannier_method == 2) + { + toWannier90_LCAO wan(inp.out_wannier_mmn, + inp.out_wannier_amn, + inp.out_wannier_unk, + inp.out_wannier_eig, + inp.out_wannier_wvfn_formatted, + inp.nnkpfile, + inp.wannier_spin, + orb); + + wan.calculate(ucell, gd, pelec->ekb, kv, *psi, &pv); + } + std::cout << FmtCore::format(" >> Finish %s.\n * * * * * *\n", "Wave function to Wannier90"); + } + + // 14) calculate the kinetic energy density tau + // mohan add 2025-10-24 + // if (inp.out_elf[0] > 0) + // { + // LCAO_domain::dm2tau(pelec->DM->get_DMR_vector(), inp.nspin, pelec->charge); + // } + +#ifdef __EXX + //------------------------------------------------------------------ + //! 15) Output Hexx matrix in LCAO basis + // (see `out_chg` in docs/advanced/input_files/input-main.md) + //------------------------------------------------------------------ + if (inp.out_chg[0]) + { + if (GlobalC::exx_info.info_global.cal_exx && inp.calculation != "nscf") // Peize Lin add if 2022.11.14 + { + const std::string file_name_exx = global_out_dir + "HexxR" + std::to_string(GlobalV::MY_RANK); + if (GlobalC::exx_info.info_ri.real_number) + { + ModuleIO::write_Hexxs_csr(file_name_exx, ucell, exx_nao.exd->get_Hexxs()); + } + else + { + ModuleIO::write_Hexxs_csr(file_name_exx, ucell, exx_nao.exc->get_Hexxs()); + } + } + } + + //------------------------------------------------------------------ + //! 16) Write RPA information in LCAO basis + //------------------------------------------------------------------ + if (inp.rpa) + { + RPA_LRI rpa_lri_double(GlobalC::exx_info.info_ri); + rpa_lri_double.cal_postSCF_exx(*dm, MPI_COMM_WORLD, ucell, kv, orb); + rpa_lri_double.init(MPI_COMM_WORLD, kv, orb.cutoffs()); + rpa_lri_double.out_for_RPA(ucell, pv, *psi, pelec); + } +#endif + + //------------------------------------------------------------------ + //! 17) Perform RDMFT calculations, added by jghan, 2024-10-17 + //------------------------------------------------------------------ + if (inp.rdmft == true) + { + ModuleBase::matrix occ_num(pelec->wg); + for (int ik = 0; ik < occ_num.nr; ++ik) + { + for (int inb = 0; inb < occ_num.nc; ++inb) + { + occ_num(ik, inb) /= kv.wk[ik]; + } + } + rdmft_solver.update_elec(ucell, occ_num, *psi); + + //! initialize the gradients of Etotal with respect to occupation numbers and wfc, + //! and set all elements to 0. + //! dedocc = d E/d Occ_Num + ModuleBase::matrix dedocc(pelec->wg.nr, pelec->wg.nc, true); + + //! dedwfc = d E/d wfc + psi::Psi dedwfc(psi->get_nk(), psi->get_nbands(), psi->get_nbasis(), kv.ngk, true); + dedwfc.zero_out(); + + double etot_rdmft = rdmft_solver.run(dedocc, dedwfc); + } + + //------------------------------------------------------------------ + //! 17) Output quasi orbitals + //------------------------------------------------------------------ + if (inp.qo_switch) + { + toQO tqo(inp.qo_basis, inp.qo_strategy, inp.qo_thr, inp.qo_screening_coeff); + tqo.initialize(global_out_dir, + inp.pseudo_dir, + inp.orbital_dir, + &ucell, + kv.kvec_d, + GlobalV::ofs_running, + GlobalV::MY_RANK, + GlobalV::NPROC); + tqo.calculate(); + } + + //------------------------------------------------------------------ + //! 18) Calculate and output asynchronous overlap matrix for Hefei-NAMD + //------------------------------------------------------------------ + if (inp.cal_syns && (istep > 0 || inp.init_vel)) + { + ModuleBase::TITLE("ModuleIO", "output_namd_async_overlap"); + ModuleBase::timer::tick("ModuleIO", "output_namd_async_overlap"); + + // Create a new Overlap instance specifically for SR_async calculation + // This allows SR_async to be initialized with velocity-shifted dtau + hamilt::Overlap>* overlap_async = + new hamilt::Overlap>( + nullptr, // hsk_in: not needed for SR_async calculation + kv.kvec_d, + nullptr, // hR_in: not needed for SR_async calculation + nullptr, // SR_in: not needed for SR_async calculation + &ucell, + orb.cutoffs(), + &gd, + two_center_bundle.overlap_orb.get()); + + // Use same precision as DMR output (default 8 if not specified) + const int precision = inp.out_dmr[0] > 0 ? inp.out_dmr[1] : 8; + const Parallel_Orbitals* paraV = p_hamilt->getSR()->get_paraV(); + hamilt::HContainer* SR_async = overlap_async->calculate_SR_async(ucell, PARAM.mdp.md_dt, paraV); + overlap_async->output_SR_async_csr(istep, SR_async, precision); + + // Clean up + delete SR_async; + delete overlap_async; + + ModuleBase::timer::tick("ModuleIO", "output_namd_async_overlap"); + } + + ModuleBase::timer::tick("ModuleIO", "ctrl_scf_lcao"); +} + +// For gamma only +template void ModuleIO::ctrl_scf_lcao( + UnitCell& ucell, + const Input_para& inp, + K_Vectors& kv, + elecstate::ElecState* pelec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + Parallel_Orbitals& pv, + Grid_Driver& gd, + psi::Psi* psi, + hamilt::HamiltLCAO* p_hamilt, + Plus_U& dftu, // mohan add 2025-11-07 + TwoCenterBundle& two_center_bundle, + LCAO_Orbitals& orb, + const ModulePW::PW_Basis_K* pw_wfc, // for berryphase + const ModulePW::PW_Basis* pw_rho, // for berryphase + const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 + const Structure_Factor& sf, // for Wannier90 + rdmft::RDMFT& rdmft_solver, // for RDMFT + Setup_DeePKS& deepks, + Exx_NAO& exx_nao, + const bool conv_esolver, + const bool scf_nmax_flag, + const int istep); + +// For multiple k-points +template void ModuleIO::ctrl_scf_lcao, double>( + UnitCell& ucell, + const Input_para& inp, + K_Vectors& kv, + elecstate::ElecState* pelec, + elecstate::DensityMatrix, double>* dm, // mohan add 2025-11-04 + Parallel_Orbitals& pv, + Grid_Driver& gd, + psi::Psi>* psi, + hamilt::HamiltLCAO, double>* p_hamilt, + Plus_U& dftu, // mohan add 2025-11-07 + TwoCenterBundle& two_center_bundle, + LCAO_Orbitals& orb, + const ModulePW::PW_Basis_K* pw_wfc, // for berryphase + const ModulePW::PW_Basis* pw_rho, // for berryphase + const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 + const Structure_Factor& sf, // for Wannier90 + rdmft::RDMFT, double>& rdmft_solver, // for RDMFT + Setup_DeePKS>& deepks, + Exx_NAO>& exx_nao, + const bool conv_esolver, + const bool scf_nmax_flag, + const int istep); + +template void ModuleIO::ctrl_scf_lcao, std::complex>( + UnitCell& ucell, + const Input_para& inp, + K_Vectors& kv, + elecstate::ElecState* pelec, + elecstate::DensityMatrix, double>* dm, // mohan add 2025-11-04 + Parallel_Orbitals& pv, + Grid_Driver& gd, + psi::Psi>* psi, + hamilt::HamiltLCAO, std::complex>* p_hamilt, + Plus_U& dftu, // mohan add 2025-11-07 + TwoCenterBundle& two_center_bundle, + LCAO_Orbitals& orb, + const ModulePW::PW_Basis_K* pw_wfc, // for berryphase + const ModulePW::PW_Basis* pw_rho, // for berryphase + const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 + const Structure_Factor& sf, // for Wannier90 + rdmft::RDMFT, std::complex>& rdmft_solver, // for RDMFT + Setup_DeePKS>& deepks, + Exx_NAO>& exx_nao, + const bool conv_esolver, + const bool scf_nmax_flag, + const int istep); diff --git a/source/source_io/module_ctrl/ctrl_scf_lcao.h b/source/source_io/module_ctrl/ctrl_scf_lcao.h new file mode 100644 index 0000000000..ae895f0262 --- /dev/null +++ b/source/source_io/module_ctrl/ctrl_scf_lcao.h @@ -0,0 +1,47 @@ +#ifndef CTRL_SCF_LCAO_H +#define CTRL_SCF_LCAO_H + +#include "source_basis/module_nao/two_center_bundle.h" // use TwoCenterBundle +#include "source_basis/module_pw/pw_basis_k.h" // use ModulePW::PW_Basis_K and ModulePW::PW_Basis +#include "source_cell/klist.h" // use K_Vectors +#include "source_cell/unitcell.h" // use UnitCell +#include "source_estate/elecstate.h" // use elecstate::ElecStateLCAO +#include "source_estate/module_dm/density_matrix.h" // mohan add 2025-11-04 +#include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 +#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes +#include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008 +#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008 +#include "source_psi/psi.h" // use Psi +#include "source_pw/module_pwdft/structure_factor.h" // use Structure_Factor + +#include + +namespace ModuleIO +{ +// in principle, we need to add const for all of the variables, mohan note 2025-06-05 +template +void ctrl_scf_lcao(UnitCell& ucell, + const Input_para& inp, + K_Vectors& kv, + elecstate::ElecState* pelec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + Parallel_Orbitals& pv, + Grid_Driver& gd, + psi::Psi* psi, + hamilt::HamiltLCAO* p_hamilt, + Plus_U& dftu, // mohan add 2025-11-07 + TwoCenterBundle& two_center_bundle, + LCAO_Orbitals& orb, + const ModulePW::PW_Basis_K* pw_wfc, // for berryphase + const ModulePW::PW_Basis* pw_rho, // for berryphase + const ModulePW::PW_Basis_Big* pw_big, // for Wannier90 + const Structure_Factor& sf, // for Wannier90 + rdmft::RDMFT& rdmft_solver, // for RDMFT + Setup_DeePKS& deepks, + Exx_NAO& exx_nao, + const bool conv_esolver, + const bool scf_nmax_flag, + const int istep); +} // namespace ModuleIO +#endif diff --git a/source/source_io/td_current_io.cpp b/source/source_io/module_current/td_current_io.cpp similarity index 97% rename from source/source_io/td_current_io.cpp rename to source/source_io/module_current/td_current_io.cpp index 4cf0e56045..75166e368e 100644 --- a/source/source_io/td_current_io.cpp +++ b/source/source_io/module_current/td_current_io.cpp @@ -11,7 +11,6 @@ #include "source_estate/module_pot/H_TDDFT_pw.h" #include "source_lcao/LCAO_domain.h" #include "source_lcao/module_rt/td_info.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #ifdef __LCAO @@ -180,12 +179,14 @@ void ModuleIO::write_current(const UnitCell& ucell, // write end if (GlobalV::MY_RANK == 0) { - std::string filename = PARAM.globalv.global_out_dir + "current_total.dat"; + std::string filename = PARAM.globalv.global_out_dir + "current_tot.txt"; std::ofstream fout; fout.open(filename, std::ios::app); fout << std::setprecision(16); fout << std::scientific; - fout << istep << " " << current_total[0]/omega << " " << current_total[1]/omega << " " << current_total[2]/omega << std::endl; + fout << istep+1 << " " << current_total[0]/omega + << " " << current_total[1]/omega + << " " << current_total[2]/omega << std::endl; fout.close(); } @@ -559,13 +560,15 @@ void ModuleIO::write_current_eachk(const UnitCell& ucell, // MPI_Reduce(local_current_ik, current_ik, 3, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (GlobalV::MY_RANK == 0 && TD_info::out_current_k) { - std::string filename = PARAM.globalv.global_out_dir + "current_spin" + std::to_string(is) + "_ik" - + std::to_string(ik) + ".dat"; + std::string filename = PARAM.globalv.global_out_dir + "current_s" + std::to_string(is) + "k" + + std::to_string(ik+1) + ".txt"; std::ofstream fout; fout.open(filename, std::ios::app); fout << std::setprecision(16); fout << std::scientific; - fout << istep << " " << current_ik[0]/omega << " " << current_ik[1]/omega << " " << current_ik[2]/omega << std::endl; + fout << istep+1 << " " << current_ik[0]/omega + << " " << current_ik[1]/omega + << " " << current_ik[2]/omega << std::endl; fout.close(); } // write end @@ -573,12 +576,14 @@ void ModuleIO::write_current_eachk(const UnitCell& ucell, } // end is if (GlobalV::MY_RANK == 0) { - std::string filename = PARAM.globalv.global_out_dir + "current_total.dat"; + std::string filename = PARAM.globalv.global_out_dir + "current_tot.txt"; std::ofstream fout; fout.open(filename, std::ios::app); fout << std::setprecision(16); fout << std::scientific; - fout << istep << " " << current_total[0]/omega << " " << current_total[1]/omega << " " << current_total[2]/omega << std::endl; + fout << istep+1 << " " << current_total[0]/omega + << " " << current_total[1]/omega + << " " << current_total[2]/omega << std::endl; fout.close(); } diff --git a/source/source_io/module_current/td_current_io.h b/source/source_io/module_current/td_current_io.h new file mode 100644 index 0000000000..9ed7b6a111 --- /dev/null +++ b/source/source_io/module_current/td_current_io.h @@ -0,0 +1,126 @@ +#ifndef TD_CURRENT_IO_H +#define TD_CURRENT_IO_H + +#include "source_basis/module_nao/two_center_bundle.h" +#include "source_estate/elecstate_lcao.h" +#include "source_estate/module_dm/density_matrix.h" +#include "source_psi/psi.h" +#include "source_lcao/module_rt/velocity_op.h" +#include "source_lcao/setup_exx.h" +#ifdef __EXX +#include +#endif + +namespace ModuleIO +{ +#ifdef __LCAO +/// @brief func to output current, only used in tddft +template +void write_current_eachk(const UnitCell& ucell, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const TwoCenterIntegrator* intor, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + const Velocity_op* cal_current, + Record_adj& ra); +template +void write_current(const UnitCell& ucell, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const TwoCenterIntegrator* intor, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + const Velocity_op* cal_current, + Record_adj& ra); +/// @brief func to output current calculated using i[r,H] directly +template +void write_current( + const UnitCell& ucell, + const Grid_Driver& GridD, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer* sR, + const hamilt::HContainer* hR, + const Exx_NAO>& exx_nao +); +/// @brief calculate sum_n[𝜌_(𝑛𝑘,𝜇𝜈)] for current calculation +void cal_tmp_DM_k(const UnitCell& ucell, + elecstate::DensityMatrix, double>& DM_real, + elecstate::DensityMatrix, double>& DM_imag, + const int ik, + const int nspin, + const int is, + const bool reset = true); + +void cal_tmp_DM(const UnitCell& ucell, + elecstate::DensityMatrix, double>& DM_real, + elecstate::DensityMatrix, double>& DM_imag, + const int nspin); +void set_rR_from_hR(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer>* hR, + ModuleBase::Vector3*>& rR); +template +void sum_HR( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + const K_Vectors& kv, + const hamilt::HContainer* hR, + hamilt::HContainer>* full_hR, + const Exx_NAO>& exx_nao +); + +template +void add_HR(const hamilt::HContainer* hR, hamilt::HContainer* full_hR); + +void init_from_adj(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + std::vector& adjs_all, + ModuleBase::Vector3*>& rR); +template +void init_from_hR(const hamilt::HContainer* hR, hamilt::HContainer* aimR); +template +void cal_velocity_basis_k(const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + const ModuleBase::Vector3*>& rR, + const hamilt::HContainer& sR, + const hamilt::HContainer>& hR, + std::vector*>>& velocity_basis_k); + +void cal_velocity_matrix(const psi::Psi>* psi, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + const std::vector*>>& velocity_basis_k, + std::vector>& velocity_k); +template +void cal_current_comm_k(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer& sR, + const hamilt::HContainer>& hR, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + std::vector>& current_k); +#endif // __LCAO +} // namespace ModuleIO +#endif diff --git a/source/source_io/module_current/td_current_io_comm.cpp b/source/source_io/module_current/td_current_io_comm.cpp new file mode 100644 index 0000000000..394a852450 --- /dev/null +++ b/source/source_io/module_current/td_current_io_comm.cpp @@ -0,0 +1,910 @@ +#include "td_current_io.h" +#include "source_base/timer.h" +#include "source_base/global_function.h" +#include "source_base/global_variable.h" +#include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_rt/td_info.h" +#include "source_base/libm/libm.h" +#include "source_base/parallel_reduce.h" +#include "source_base/tool_threading.h" +#include "source_base/vector3.h" +#include "source_estate/module_dm/cal_dm_psi.h" +#include "source_estate/module_pot/H_TDDFT_pw.h" +#include "source_lcao/LCAO_domain.h" +#include "source_base/module_external/lapack_connector.h" +#include "source_base/module_external/scalapack_connector.h" +#include "source_lcao/module_hcontainer/hcontainer_funcs.h" +#include "source_lcao/module_rt/td_folding.h" +#ifdef __EXX +#include "source_lcao/module_operator_lcao/op_exx_lcao.h" +#include "source_lcao/module_ri/Exx_LRI.h" +#endif +#ifdef __LCAO +template +void ModuleIO::init_from_hR(const hamilt::HContainer* hR, hamilt::HContainer* aimR) +{ + ModuleBase::TITLE("ModuleIO", "init_from_hR"); + ModuleBase::timer::tick("ModuleIO", "init_from_hR"); + for (int i = 0; i < hR->size_atom_pairs(); i++) + { + hamilt::AtomPair atom_ij = hR->get_atom_pair(i); + const int iat1 = atom_ij.get_atom_i(); + const int iat2 = atom_ij.get_atom_j(); + for (int iR = 0; iR < atom_ij.get_R_size(); iR++) + { + const ModuleBase::Vector3 r_index = atom_ij.get_R_index(iR); + hamilt::AtomPair atom_ij_ta(iat1, iat2, r_index, hR->get_paraV()); + aimR->insert_pair(atom_ij_ta); + } + } + aimR->allocate(nullptr, true); + + ModuleBase::timer::tick("ModuleIO", "init_from_hR"); +} +void ModuleIO::init_from_adj(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + std::vector& adjs_all, + ModuleBase::Vector3*>& rR) +{ + ModuleBase::TITLE("ModuleIOTD_mixing_pot", "init_from_adj"); + ModuleBase::timer::tick("ModuleIO", "init_from_adj"); + + auto orb_cutoff_ = orb.cutoffs(); + adjs_all.clear(); + adjs_all.reserve(ucell.nat); + + for (int iat1 = 0; iat1 < ucell.nat; iat1++) + { + auto tau1 = ucell.get_tau(iat1); + int T1, I1; + ucell.iat2iait(iat1, &I1, &T1); + AdjacentAtomInfo adjs; + GridD.Find_atom(ucell, tau1, T1, I1, &adjs); + std::vector is_adj(adjs.adj_num + 1, false); + for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) + { + const int T2 = adjs.ntype[ad1]; + const int I2 = adjs.natom[ad1]; + const int iat2 = ucell.itia2iat(T2, I2); + if (pv->get_row_size(iat1) <= 0 || pv->get_col_size(iat2) <= 0) + { + continue; + } + const ModuleBase::Vector3& R_index2 = adjs.box[ad1]; + // choose the real adjacent atoms + // Note: the distance of atoms should less than the cutoff radius, + // When equal, the theoretical value of matrix element is zero, + // but the calculated value is not zero due to the numerical error, which would lead to result changes. + if (ucell.cal_dtau(iat1, iat2, R_index2).norm() * ucell.lat0 + < orb_cutoff_[T1] + orb_cutoff_[T2]) + { + is_adj[ad1] = true; + } + } + filter_adjs(is_adj, adjs); + adjs_all.push_back(adjs); + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T2 = adjs.ntype[ad]; + const int I2 = adjs.natom[ad]; + int iat2 = ucell.itia2iat(T2, I2); + ModuleBase::Vector3& R_index = adjs.box[ad]; + hamilt::AtomPair tmp(iat1, iat2, R_index, pv); + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + rR[i_alpha]->insert_pair(tmp); + } + } + } + // allocate the memory of BaseMatrix in HR, and set the new values to zero + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + rR[i_alpha]->allocate(nullptr, true); + } + ModuleBase::timer::tick("ModuleIO", "init_from_adj"); +} + +void ModuleIO::set_rR_from_hR(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer>* hR, + ModuleBase::Vector3*>& rR) +{ + ModuleBase::TITLE("ModuleIO", "set_rR_from_hR"); + ModuleBase::timer::tick("ModuleIO", "set_rR_from_hR"); + + // init + std::vector adjs_all; + init_from_adj(ucell, GridD, orb, pv, adjs_all, rR); + + for (int iat1 = 0; iat1 < ucell.nat; iat1++) + { + auto tau1 = ucell.get_tau(iat1); + int T1, I1; + ucell.iat2iait(iat1, &I1, &T1); + AdjacentAtomInfo& adjs = adjs_all[iat1]; + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T2 = adjs.ntype[ad]; + const int I2 = adjs.natom[ad]; + const int iat2 = ucell.itia2iat(T2, I2); + const ModuleBase::Vector3& r_index = adjs.box[ad]; + ModuleBase::Vector3 dtau = ucell.cal_dtau(iat1, iat2, r_index); + + Atom& atom1 = ucell.atoms[T1]; + Atom& atom2 = ucell.atoms[T2]; + const int npol = ucell.get_npol(); + + const int* iw2l1 = atom1.iw2l.data(); + const int* iw2n1 = atom1.iw2n.data(); + const int* iw2m1 = atom1.iw2m.data(); + const int* iw2l2 = atom2.iw2l.data(); + const int* iw2n2 = atom2.iw2n.data(); + const int* iw2m2 = atom2.iw2m.data(); + + auto row_indexes = pv->get_indexes_row(iat1); + auto col_indexes = pv->get_indexes_col(iat2); + + const ModuleBase::Vector3& tau1 = ucell.get_tau(iat1); + // std::cout << "tau1: " << tau1 << " tau2: " << GlobalC::ucell.get_tau(iat2) << " r_index: " << r_index + // << std::endl; + const ModuleBase::Vector3 tau2 = tau1 + dtau; + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const int iw1 = row_indexes[iw1l] / npol; + const int L1 = iw2l1[iw1]; + const int N1 = iw2n1[iw1]; + const int m1 = iw2m1[iw1]; + + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const int iw2 = col_indexes[iw2l] / npol; + const int L2 = iw2l2[iw2]; + const int N2 = iw2n2[iw2]; + const int m2 = iw2m2[iw2]; + + // std::cout<<"L1: "< tmp_r = r_calculator.get_psi_r_psi(tau1 * ucell.lat0, + T1, + L1, + m1, + N1, + tau2 * ucell.lat0, + T2, + L2, + m2, + N2); + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + hamilt::BaseMatrix* HlocR = rR[i_alpha]->find_matrix(iat1, iat2, r_index); + if(HlocR!=nullptr)HlocR->add_element(iw1, iw2, tmp_r[i_alpha]); + // if (i_alpha == 2) + // { + // std::cout << "iw1: " << iw1 << " iw2: " << iw2 << " i_alpha: " << i_alpha + // << " tmp_r: " << tmp_r[i_alpha] << std::endl; + // } + } + } + } + } + } + ModuleBase::TITLE("ModuleIO", "set_rR_from_sR"); +} +template +void ModuleIO::sum_HR( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + const K_Vectors& kv, + const hamilt::HContainer* hR, + hamilt::HContainer>* full_hR, + const Exx_NAO>& exx_nao +) +{ + ModuleBase::TITLE("ModuleIO", "sum_HR"); + ModuleBase::timer::tick("ModuleIO", "sum_HR"); + + // init complex full_hR + init_from_hR(hR, full_hR); +#ifdef __EXX + const bool use_cell_nearest = (ModuleBase::Vector3(std::fmod(kv.get_koffset(0), 1.0), + std::fmod(kv.get_koffset(1), 1.0), + std::fmod(kv.get_koffset(2), 1.0)).norm()< 1e-10); + RI::Cell_Nearest cell_nearest; + // reallocate full_hR for BvK used in EXX + if (GlobalC::exx_info.info_global.cal_exx) + { + const std::array Rs_period = {kv.nmp[0], kv.nmp[1], kv.nmp[2]}; + if (use_cell_nearest) + { + // set cell_nearest + std::map> atoms_pos; + for (int iat = 0; iat < ucell.nat; ++iat) + { + atoms_pos[iat] = RI_Util::Vector3_to_array3( + ucell.atoms[ucell.iat2it[iat]].tau[ucell.iat2ia[iat]]); + } + const std::array, 3> latvec = {RI_Util::Vector3_to_array3(ucell.a1), + RI_Util::Vector3_to_array3(ucell.a2), + RI_Util::Vector3_to_array3(ucell.a3)}; + cell_nearest.init(atoms_pos, latvec, Rs_period); + hamilt::reallocate_hcontainer(ucell.nat, full_hR, Rs_period, &cell_nearest); + } + else + hamilt::reallocate_hcontainer(ucell.nat, full_hR, Rs_period); + } +#endif + // add other hR + add_HR(hR, full_hR); + // add velocity complex hR + if (PARAM.inp.td_stype==1) + { + if (TD_info::td_vel_op == nullptr) + { + ModuleBase::WARNING_QUIT("ModuleIO::write_current", "velocity gauge infos is null!"); + } + const hamilt::HContainer>* velocity_hR = TD_info::td_vel_op->get_velocity_HR_pointer(); + add_HR(velocity_hR, full_hR); + } +#ifdef __EXX + // add HexxR to complex full_hR + if (GlobalC::exx_info.info_global.cal_exx) + { + for (size_t is = 0; is != PARAM.inp.nspin; ++is) + { + if (use_cell_nearest) + RI_2D_Comm::add_HexxR(is, GlobalC::exx_info.info_global.hybrid_alpha, exx_nao.exc->get_Hexxs(), pv, PARAM.globalv.npol, *full_hR, &cell_nearest); + else + RI_2D_Comm::add_HexxR(is, GlobalC::exx_info.info_global.hybrid_alpha, exx_nao.exc->get_Hexxs(), pv, PARAM.globalv.npol, *full_hR, nullptr); + } + } +#endif + + ModuleBase::timer::tick("ModuleIO", "sum_HR"); +} + +template +void ModuleIO::add_HR(const hamilt::HContainer* hR, hamilt::HContainer* full_hR) +{ + ModuleBase::TITLE("ModuleIO", "add_HR"); + ModuleBase::timer::tick("ModuleIO", "add_HR"); + + for (int ipair = 0; ipair < hR->size_atom_pairs(); ++ipair) + { + hamilt::AtomPair atom_ij = hR->get_atom_pair(ipair); + const int iat1 = atom_ij.get_atom_i(); + const int iat2 = atom_ij.get_atom_j(); + // loop R-index + for (int iR = 0; iR < atom_ij.get_R_size(); iR++) + { + const ModuleBase::Vector3 r_index = atom_ij.get_R_index(iR); + hamilt::BaseMatrix* full_HlocR = full_hR->find_matrix(iat1, iat2, r_index.x, r_index.y, r_index.z); + const hamilt::BaseMatrix* HlocR = hR->find_matrix(iat1, iat2, r_index.x, r_index.y, r_index.z); + + if (full_HlocR == nullptr || HlocR == nullptr) + ModuleBase::WARNING_QUIT("ModuleIO::add_HR", "HR cannot be nullptr!"); + + for (int i = 0; i < atom_ij.get_row_size(); ++i) + { + for (int j = 0; j < atom_ij.get_col_size(); ++j) + { + Tadd v = HlocR->get_value(i, j); + full_HlocR->add_element(i, j, Tfull(v)); + } + } + } + } + + ModuleBase::timer::tick("ModuleIO", "add_HR"); +} + +// for molecule, if vacuum size is small, the number of R of Hs is smaller than SR +// which may lead to some errors +template +void ModuleIO::cal_velocity_basis_k(const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + const ModuleBase::Vector3*>& rR, + const hamilt::HContainer& sR, + const hamilt::HContainer>& hR, + std::vector*>>& velocity_basis_k) +{ + ModuleBase::TITLE("ModuleIO", "cal_velocity_basis_k"); + ModuleBase::timer::tick("ModuleIO", "cal_velocity_basis_k"); +#ifdef __MPI + const int nlocal = PARAM.globalv.nlocal; + const char N_char = 'N'; + const std::complex one_imag = ModuleBase::IMAG_UNIT; + const std::complex neg_one_imag = ModuleBase::NEG_IMAG_UNIT; + const std::complex one_real = ModuleBase::ONE; + const std::complex neg_one_real = ModuleBase::NEG_ONE; + const std::complex zero_complex = ModuleBase::ZERO; + std::cout<nloc<* hk = new std::complex[pv->nloc]; + std::complex* sk = new std::complex[pv->nloc]; + std::complex* partial_hk = new std::complex[pv->nloc]; + std::complex* partial_sk = new std::complex[pv->nloc]; + std::complex* rk = new std::complex[pv->nloc]; + std::complex* h_is = new std::complex[pv->nloc]; + std::complex* h_is_r = new std::complex[pv->nloc]; + std::complex* r_is = new std::complex[pv->nloc]; + std::complex* r_is_h = new std::complex[pv->nloc]; + std::complex* h_is_ps = new std::complex[pv->nloc]; + + // for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + // { + // for (int i = 0; i < hR.size_atom_pairs(); ++i) + // { + // hamilt::AtomPair& tmp = rR[i_alpha]->get_atom_pair(i); + // std::cout<<"cal_velocity_basis_k: "<size_atom_pairs()<<" R_size: + // "< r_index = tmp.get_R_index(ir); + // std::cout<<"r_index: "<nloc); + const int nrow = pv->get_row_size(); + if (elecstate::H_TDDFT_pw::stype == 2) + module_rt::folding_HR_td(ucell, hR, hk, kv.kvec_d[ik], TD_info::cart_At, nrow, 1); + else + hamilt::folding_HR(hR, hk, kv.kvec_d[ik], nrow, 1); + // 1.2 set S(k) + ModuleBase::GlobalFunc::ZEROS(sk, pv->nloc); + if (elecstate::H_TDDFT_pw::stype == 2) + module_rt::folding_HR_td(ucell, sR, sk, kv.kvec_d[ik], TD_info::cart_At, nrow, 1); + else + hamilt::folding_HR(sR, sk, kv.kvec_d[ik], nrow, 1); + // for (int ir = 0; ir < pv->nrow; ir++) + // { + // const int iwt1 = pv->local2global_row(ir); + // const int iat1 = GlobalC::ucell.iwt2iat[iwt1]; + // for (int ic = 0; ic < pv->ncol; ic++) + // { + // const int iwt2 = pv->local2global_col(ic); + // const int iat2 = GlobalC::ucell.iwt2iat[iwt2]; + // const int irc = ic * pv->nrow + ir; + // std::cout << "ik: " << ik << " iat1:" << iat1 << " iat2:" << iat2 << " iwt1: " << iwt1 + // << " iwt2: " << iwt2 << " hk: " << hk[irc] << std::endl; + // } + // } + // 2. set inverse S(k) -> sk will be changed to sk_inv + int* ipiv = new int[pv->nloc]; + int info = 0; + // 2.1 compute ipiv + ScalapackConnector::getrf(nlocal, nlocal, sk, 1, 1, pv->desc, ipiv, &info); + int lwork = -1; + int liwotk = -1; + std::vector> work(1, 0); + std::vector iwork(1, 0); + // 2.2 compute work + ScalapackConnector::getri(nlocal, sk, 1, 1, pv->desc, ipiv, work.data(), &lwork, iwork.data(), &liwotk, &info); + lwork = work[0].real(); + work.resize(lwork, 0); + liwotk = iwork[0]; + iwork.resize(liwotk, 0); + // 2.3 compute inverse matrix of Sk + ScalapackConnector::getri(nlocal, + sk, // return sk^-1 + 1, + 1, + pv->desc, + ipiv, + work.data(), + &lwork, + iwork.data(), + &liwotk, + &info); + delete[] ipiv; + assert(0 == info); + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + // 3. set partial_H(k), partial_S(k) and r(k) + // 3.1 set partial_H(k) + ModuleBase::GlobalFunc::ZEROS(partial_hk, pv->nloc); + if (elecstate::H_TDDFT_pw::stype == 2) + module_rt::folding_partial_HR_td(ucell, hR, partial_hk, kv.kvec_d[ik], TD_info::cart_At, i_alpha, nrow, 1); + else + module_rt::folding_partial_HR(ucell, hR, partial_hk, kv.kvec_d[ik], i_alpha, nrow, 1); + // 3.2 set partial S(k) + ModuleBase::GlobalFunc::ZEROS(partial_sk, pv->nloc); + if (elecstate::H_TDDFT_pw::stype == 2) + module_rt::folding_partial_HR_td(ucell, sR, partial_sk, kv.kvec_d[ik], TD_info::cart_At, i_alpha, nrow, 1); + else + module_rt::folding_partial_HR(ucell, sR, partial_sk, kv.kvec_d[ik], i_alpha, nrow, 1); + // if(i_alpha == 2) + // { + // for(int ir=0;ir< pv->nrow; ir++) + // { + // const int iwt1 = pv->local2global_row(ir); + // const int iat1 = GlobalC::ucell.iwt2iat[iwt1]; + // for(int ic=0;ic< pv->ncol; ic++) + // { + // const int iwt2 = pv->local2global_col(ic); + // const int iat2 = GlobalC::ucell.iwt2iat[iwt2]; + // const int irc=ic*pv->nrow + ir; + // std::cout<<"ik: "<nloc); + // folding_rR(rR[i_alpha], partial_sk, rk, pv, kv.kvec_d[ik], nrow, 1); + if (elecstate::H_TDDFT_pw::stype == 2) + module_rt::folding_HR_td(ucell, *rR[i_alpha], rk, kv.kvec_d[ik], TD_info::cart_At, nrow, 1); + else + hamilt::folding_HR(*rR[i_alpha], rk, kv.kvec_d[ik], nrow, 1); // set r(k) + // if (i_alpha == 2) + // { + // std::cout << "ik: " << ik << " i_alpha: " << i_alpha << std::endl; + // for (int ir = 0; ir < pv->nrow; ir++) + // { + // const int iwt1 = pv->local2global_row(ir); + // const int iat1 = GlobalC::ucell.iwt2iat[iwt1]; + // for (int ic = 0; ic < pv->ncol; ic++) + // { + // const int iwt2 = pv->local2global_col(ic); + // const int iat2 = GlobalC::ucell.iwt2iat[iwt2]; + // const int irc = ic * pv->nrow + ir; + // std::cout << " iat1: " << iat1 << " iat2: " << iat2 << " iw1: " << + // GlobalC::ucell.iwt2iw[iwt1] + // << " iw2: " << GlobalC::ucell.iwt2iw[iwt2] << " rk: " << rk[irc] << std::endl; + // } + // } + // } + // 4. calculate <\vu,k|v_a|\mu,k> = partial_Hk + IMAG_UNIT * (Hk * Sk_inv * rk) - IMAG_UNIT * (rk * Sk_inv * + // Hk) - Hk * Sk_inv * partial_Sk + // 4.1.1 Hk * Sk_inv (note 2.) + ModuleBase::GlobalFunc::ZEROS(h_is, pv->nloc); + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_real, + hk, + 1, + 1, + pv->desc, + sk, + 1, + 1, + pv->desc, + zero_complex, + h_is, + 1, + 1, + pv->desc); + // 4.1.2 (Hk * Sk_inv) * rk + ModuleBase::GlobalFunc::ZEROS(h_is_r, pv->nloc); + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_real, + h_is, + 1, + 1, + pv->desc, + rk, + 1, + 1, + pv->desc, + zero_complex, + h_is_r, + 1, + 1, + pv->desc); + // 4.2.1 rk * Sk_inv (note 2.) + ModuleBase::GlobalFunc::ZEROS(r_is, pv->nloc); + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_real, + rk, + 1, + 1, + pv->desc, + sk, + 1, + 1, + pv->desc, + zero_complex, + r_is, + 1, + 1, + pv->desc); + // 4.2.2 (rk * Sk_inv) * Hk + ModuleBase::GlobalFunc::ZEROS(r_is_h, pv->nloc); + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_real, + r_is, + 1, + 1, + pv->desc, + hk, + 1, + 1, + pv->desc, + zero_complex, + r_is_h, + 1, + 1, + pv->desc); + // 4.3.1 (Hk * Sk_inv) * partial_Sk + ModuleBase::GlobalFunc::ZEROS(h_is_ps, pv->nloc); + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nlocal, + nlocal, + one_real, + h_is, + 1, + 1, + pv->desc, + partial_sk, + 1, + 1, + pv->desc, + zero_complex, + h_is_ps, + 1, + 1, + pv->desc); + // 4.4 h_is_r will be changed to partial_Hk + IMAG_UNIT * (Hk * Sk_inv * rk) + ScalapackConnector::geadd('N', + nlocal, + nlocal, + one_real, + partial_hk, + 1, + 1, + pv->desc, + one_imag, + h_is_r, + 1, + 1, + pv->desc); + // 4.5 r_is_h will be changed to h_is_r - IMAG_UNIT * (rk * Sk_inv * Hk) + ScalapackConnector::geadd('N', + nlocal, + nlocal, + one_real, + h_is_r, + 1, + 1, + pv->desc, + neg_one_imag, + r_is_h, + 1, + 1, + pv->desc); + // 4.6 h_is_ps will be changed to r_is_h - Hk * Sk_inv * partial_Sk + ScalapackConnector::geadd('N', + nlocal, + nlocal, + one_real, + r_is_h, + 1, + 1, + pv->desc, + neg_one_real, + h_is_ps, + 1, + 1, + pv->desc); + // 5. copy h_is_ps to velocity_basis_k[ik][i_alpha] + BlasConnector::copy(pv->nloc, h_is_ps, 1, velocity_basis_k[ik][i_alpha], 1); + // if(i_alpha == 2) + // { + // for(int ir=0;ir< pv->nrow; ir++) + // { + // const int iwt1 = pv->local2global_row(ir); + // const int iat1 = GlobalC::ucell.iwt2iat[iwt1]; + // for(int ic=0;ic< pv->ncol; ic++) + // { + // const int iwt2 = pv->local2global_col(ic); + // const int iat2 = GlobalC::ucell.iwt2iat[iwt2]; + // const int irc=ic*pv->nrow + ir; + // std::cout<<"ik: "<>* psi, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + const std::vector*>>& velocity_basis_k, + std::vector>& velocity_k) +{ + ModuleBase::TITLE("ModuleIO", "cal_velocity_matrix"); + ModuleBase::timer::tick("ModuleIO", "cal_velocity_matrix"); +#ifdef __MPI + const char N_char = 'N'; + const char C_char = 'C'; + const std::complex one_real = ModuleBase::ONE; + const std::complex zero_complex = ModuleBase::ZERO; + const double zero_double = 0.0; + const int nlocal = PARAM.globalv.nlocal; + const int nbands = PARAM.inp.nbands; + std::complex* vk_c = new std::complex[pv->ncol_bands * pv->nrow_bands]; // local one + std::complex* v_c = new std::complex[pv->nloc_wfc]; + + for (int ik = 0; ik < kv.get_nks(); ik++) + { + // 1. set C + psi->fix_k(ik); + // 2. set <\Psi_{n,\mu}|v_{\mu,\nu}|\Psi_{m,\nu}> = C^\dagger_{n,\mu} * v_{\mu,\nu} * C_{\nu,m} + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + ModuleBase::GlobalFunc::ZEROS(vk_c, pv->ncol_bands * pv->nrow_bands); + ModuleBase::GlobalFunc::ZEROS(v_c, pv->nloc_wfc); + // v_c_{\mu,m} = v_{\mu,\nu} * C_{\nu,m} + ScalapackConnector::gemm(N_char, + N_char, + nlocal, + nbands, + nlocal, + one_real, + velocity_basis_k[ik][i_alpha], + 1, + 1, + pv->desc, + psi[0].get_pointer(), + 1, + 1, + pv->desc_wfc, + zero_complex, + v_c, + 1, + 1, + pv->desc_wfc); + // velocity_k_{n,m} = C^\dagger_{n,\mu} * v_c_{\mu,m} + ScalapackConnector::gemm(C_char, + N_char, + nbands, + nbands, + nlocal, + one_real, + psi[0].get_pointer(), + 1, + 1, + pv->desc_wfc, + v_c, + 1, + 1, + pv->desc_wfc, + zero_complex, + vk_c, + 1, + 1, + pv->desc_Eij); + + for (int ir = 0; ir < PARAM.inp.nbands; ++ir) + { + // const int iwt1 = pv->local2global_row(ir); + // const int iat1 = GlobalC::ucell.iwt2iat[iwt1]; + for (int ic = 0; ic < PARAM.inp.nbands; ++ic) + { + const int irc = ic * pv->nrow + ir; + if (pv->in_this_processor(ir, ic)) + { + // const int iwt2 = pv->local2global_col(ic); + // const int iat2 = GlobalC::ucell.iwt2iat[iwt2]; + velocity_k[ik][i_alpha](ir, ic) = vk_c[irc]; + // if (i_alpha == 0) + // { + // std::cout<<"ik: "< +void ModuleIO::cal_current_comm_k(const UnitCell& ucell, + const Grid_Driver& GridD, + const LCAO_Orbitals& orb, + const Parallel_Orbitals* pv, + const K_Vectors& kv, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer& sR, + const hamilt::HContainer>& hR, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + std::vector>& current_k) +{ + ModuleBase::TITLE("ModuleIO", "cal_current_exx"); + ModuleBase::timer::tick("ModuleIO", "cal_current_exx"); + + const int nlocal = PARAM.globalv.nlocal; + const int nbands = PARAM.inp.nbands; + // init + ModuleBase::Vector3*> rR(nullptr, nullptr, nullptr); + std::vector*>> velocity_basis_k; + std::vector> velocity_k; + velocity_basis_k.resize(kv.get_nks()); + velocity_k.resize(kv.get_nks()); + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + rR[i_alpha] = new hamilt::HContainer(pv); + for (int ik = 0; ik < kv.get_nks(); ik++) + { + velocity_basis_k[ik][i_alpha] = new std::complex[pv->nloc]; + ModuleBase::GlobalFunc::ZEROS(velocity_basis_k[ik][i_alpha], pv->nloc); + velocity_k[ik][i_alpha].create(nbands, nbands); + } + } + // set rR + set_rR_from_hR(ucell, GridD, orb, pv, r_calculator, &hR, rR); + // set velocity_basis_k + cal_velocity_basis_k(ucell, orb, pv, kv, rR, sR, hR, velocity_basis_k); + // set velocity_k + cal_velocity_matrix(psi, pv, kv, velocity_basis_k, velocity_k); + + // sum n and m for current_k + for (size_t ik = 0; ik != kv.get_nks(); ++ik) + for (size_t i_alpha = 0; i_alpha != 3; ++i_alpha) + { + for (size_t ib = 0; ib != PARAM.inp.nbands; ++ib) + current_k[ik][i_alpha] -= pelec->wg(ik, ib) * velocity_k[ik][i_alpha](ib, ib).real() / 2.0; // for unit + } + for (size_t i_alpha = 0; i_alpha < 3; ++i_alpha) + { + delete rR[i_alpha]; + for (int ik = 0; ik < kv.get_nks(); ik++) + delete[] velocity_basis_k[ik][i_alpha]; + } + + ModuleBase::TITLE("ModuleIO", "cal_current_exx"); +} +template +void ModuleIO::write_current( + const UnitCell& ucell, + const Grid_Driver& GridD, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer* sR, + const hamilt::HContainer* hR, + const Exx_NAO>& exx_nao +) +{ + ModuleBase::TITLE("ModuleIO", "write_current"); + ModuleBase::timer::tick("ModuleIO", "write_current"); + double omega = ucell.omega; + + std::vector> current_k; + hamilt::HContainer>* full_hR; + full_hR = new hamilt::HContainer>(pv); + current_k.resize(kv.get_nks()); + sum_HR(ucell, *pv, kv, hR, full_hR, exx_nao); + cal_current_comm_k(ucell, GridD, orb, pv, kv, r_calculator, *sR, *full_hR, psi, pelec, current_k); + delete full_hR; + + int nspin0 = 1; + if (PARAM.inp.nspin == 2) + { + nspin0 = 2; + } + for (int is = 0; is < nspin0; ++is) + { + for (int ik = 0; ik < kv.get_nks(); ik++) + { + if (is == kv.isk[ik]) + { + if (GlobalV::MY_RANK == 0 && TD_info::out_current_k) + { + std::string filename = PARAM.globalv.global_out_dir + "currents" + std::to_string(is) + + "k" + std::to_string(ik) + "comm.txt"; + std::ofstream fout; + fout.open(filename, std::ios::app); + fout << std::setprecision(16); + fout << std::scientific; + fout << istep << " " << current_k[ik][0] / omega << " " << current_k[ik][1] / omega << " " + << current_k[ik][2] / omega << std::endl; + fout.close(); + } + } + } + } + + ModuleBase::Vector3 current_total; + for (int dir = 0; dir < 3; dir++) + for (int ik = 0; ik < kv.get_nks(); ik++) + current_total[dir] += current_k[ik][dir]; + if (GlobalV::MY_RANK == 0) + { + std::string filename = PARAM.globalv.global_out_dir + "current_tot_comm.txt"; + std::ofstream fout; + fout.open(filename, std::ios::app); + fout << std::setprecision(16); + fout << std::scientific; + fout << istep << " " << current_total[0] / omega << " " << current_total[1] / omega << " " + << current_total[2] / omega << std::endl; + fout.close(); + } + + ModuleBase::timer::tick("ModuleIO", "write_current"); +} +template +void ModuleIO::write_current( + const UnitCell& ucell, + const Grid_Driver& GridD, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer* sR, + const hamilt::HContainer* hR, + const Exx_NAO>& exx_nao +); + +template +void ModuleIO::write_current>( + const UnitCell& ucell, + const Grid_Driver& GridD, + const int istep, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + const LCAO_Orbitals& orb, + cal_r_overlap_R& r_calculator, + const hamilt::HContainer>* sR, + const hamilt::HContainer>* hR, + const Exx_NAO>& exx_nao +); +#endif //__LCAO diff --git a/source/source_io/dipole_io.h b/source/source_io/module_dipole/dipole_io.h similarity index 100% rename from source/source_io/dipole_io.h rename to source/source_io/module_dipole/dipole_io.h diff --git a/source/source_io/write_dipole.cpp b/source/source_io/module_dipole/write_dipole.cpp similarity index 95% rename from source/source_io/write_dipole.cpp rename to source/source_io/module_dipole/write_dipole.cpp index d2f00631c0..56448365bf 100644 --- a/source/source_io/write_dipole.cpp +++ b/source/source_io/module_dipole/write_dipole.cpp @@ -1,8 +1,7 @@ #include "source_base/parallel_reduce.h" #include "source_estate/module_charge/charge.h" -#include "source_io/dipole_io.h" +#include "source_io/module_dipole/dipole_io.h" #include "source_lcao/module_rt/evolve_elec.h" -#include "source_pw/module_pwdft/global.h" // fuxiang add 2017-03-15 void ModuleIO::write_dipole(const UnitCell& ucell, @@ -64,7 +63,7 @@ void ModuleIO::write_dipole(const UnitCell& ucell, Parallel_Reduce::reduce_pool(dipole_elec_y); Parallel_Reduce::reduce_pool(dipole_elec_z); - ofs << istep << " " << dipole_elec_x << " " << dipole_elec_y << dipole_elec_z; + ofs << istep+1 << " " << dipole_elec_x << " " << dipole_elec_y << dipole_elec_z; #else double dipole_elec[3] = {0.0, 0.0, 0.0}; @@ -95,7 +94,7 @@ void ModuleIO::write_dipole(const UnitCell& ucell, ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Electronic dipole moment P_elec_y(t)", dipole_elec[1]); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "Electronic dipole moment P_elec_z(t)", dipole_elec[2]); - ofs << std::setprecision(precision) << istep << " " << dipole_elec[0] << " " << dipole_elec[1] << " " + ofs << std::setprecision(precision) << istep+1 << " " << dipole_elec[0] << " " << dipole_elec[1] << " " << dipole_elec[2] << std::endl; double dipole_ion[3] = {0.0}; diff --git a/source/source_io/test/write_dmk_test.cpp b/source/source_io/module_dm/test/write_dmk_test.cpp similarity index 99% rename from source/source_io/test/write_dmk_test.cpp rename to source/source_io/module_dm/test/write_dmk_test.cpp index 5c56a0bfad..95dbe118b9 100644 --- a/source/source_io/test/write_dmk_test.cpp +++ b/source/source_io/module_dm/test/write_dmk_test.cpp @@ -1,10 +1,10 @@ -#include "source_io/write_dmk.h" +#include "source_io/module_dm/write_dmk.h" #define private public #include "source_io/module_parameter/parameter.h" #undef private #include "source_base/global_variable.h" -#include "prepare_unitcell.h" +#include "../../test/prepare_unitcell.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/source_io/write_dmk.cpp b/source/source_io/module_dm/write_dmk.cpp similarity index 99% rename from source/source_io/write_dmk.cpp rename to source/source_io/module_dm/write_dmk.cpp index 7a6762eeef..cc999c68bc 100644 --- a/source/source_io/write_dmk.cpp +++ b/source/source_io/module_dm/write_dmk.cpp @@ -1,4 +1,4 @@ -#include "source_io/write_dmk.h" +#include "source_io/module_dm/write_dmk.h" #include "source_base/parallel_common.h" #include "source_base/module_external/scalapack_connector.h" diff --git a/source/source_io/write_dmk.h b/source/source_io/module_dm/write_dmk.h similarity index 100% rename from source/source_io/write_dmk.h rename to source/source_io/module_dm/write_dmk.h diff --git a/source/source_io/write_dmr.cpp b/source/source_io/module_dm/write_dmr.cpp similarity index 98% rename from source/source_io/write_dmr.cpp rename to source/source_io/module_dm/write_dmr.cpp index ed1288cfa7..0cb040b1d3 100644 --- a/source/source_io/write_dmr.cpp +++ b/source/source_io/module_dm/write_dmr.cpp @@ -3,7 +3,6 @@ #include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_lcao/module_hcontainer/output_hcontainer.h" -#include "source_pw/module_pwdft/global.h" #include diff --git a/source/source_io/write_dmr.h b/source/source_io/module_dm/write_dmr.h similarity index 100% rename from source/source_io/write_dmr.h rename to source/source_io/module_dm/write_dmr.h diff --git a/source/source_io/cal_dos.cpp b/source/source_io/module_dos/cal_dos.cpp similarity index 98% rename from source/source_io/cal_dos.cpp rename to source/source_io/module_dos/cal_dos.cpp index 6eb53aac8f..2e3e7f869c 100644 --- a/source/source_io/cal_dos.cpp +++ b/source/source_io/module_dos/cal_dos.cpp @@ -56,8 +56,8 @@ void ModuleIO::prepare_dos(std::ofstream& ofs_running, } #ifdef __MPI - Parallel_Reduce::gather_max_double_all(GlobalV::NPROC, emax); - Parallel_Reduce::gather_min_double_all(GlobalV::NPROC, emin); + Parallel_Reduce::reduce_max(emax); + Parallel_Reduce::reduce_min(emin); #endif emax *= ModuleBase::Ry_to_eV; diff --git a/source/source_io/cal_dos.h b/source/source_io/module_dos/cal_dos.h similarity index 100% rename from source/source_io/cal_dos.h rename to source/source_io/module_dos/cal_dos.h diff --git a/source/source_io/cal_ldos.cpp b/source/source_io/module_dos/cal_ldos.cpp similarity index 88% rename from source/source_io/cal_ldos.cpp rename to source/source_io/module_dos/cal_ldos.cpp index f12fc9e391..4463c4cf03 100644 --- a/source/source_io/cal_ldos.cpp +++ b/source/source_io/module_dos/cal_ldos.cpp @@ -1,7 +1,7 @@ #include "cal_ldos.h" #include "cal_dos.h" -#include "cube_io.h" +#include "../module_output/cube_io.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_lcao/module_gint/gint_interface.h" @@ -12,10 +12,16 @@ namespace ModuleIO #ifdef __LCAO template -void Cal_ldos::cal_ldos_lcao(const elecstate::ElecStateLCAO* pelec, - const psi::Psi& psi, - const Parallel_Grid& pgrid, - const UnitCell& ucell) +void Cal_ldos::cal_ldos_lcao( + const elecstate::Efermi &eferm, // mohan add 2025-11-02 + const Charge &chr, // mohan add add 2025-11-02 + const LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-02 + const K_Vectors &kv, // k points, mohan add 2025-11-02 + const ModuleBase::matrix &ekb, // mohan add 2025-11-02 + const ModuleBase::matrix &wg, // mohan add 2025-11-02 + const psi::Psi& psi, + const Parallel_Grid& pgrid, + const UnitCell& ucell) { for (int ie = 0; ie < PARAM.inp.stm_bias[2]; ie++) { @@ -25,38 +31,38 @@ void Cal_ldos::cal_ldos_lcao(const elecstate::ElecStateLCAO* pelec, const double emax = en > 0 ? en : 0; // calculate weight (for bands not in the range, weight is zero) - ModuleBase::matrix weight(pelec->ekb.nr, pelec->ekb.nc); - for (int ik = 0; ik < pelec->ekb.nr; ++ik) + ModuleBase::matrix weight(ekb.nr, ekb.nc); + for (int ik = 0; ik < ekb.nr; ++ik) { - const double efermi = pelec->eferm.get_efval(pelec->klist->isk[ik]); + const double efermi = eferm.get_efval(kv.isk[ik]); - for (int ib = 0; ib < pelec->ekb.nc; ib++) + for (int ib = 0; ib < ekb.nc; ib++) { - const double eigenval = (pelec->ekb(ik, ib) - efermi) * ModuleBase::Ry_to_eV; + const double eigenval = (ekb(ik, ib) - efermi) * ModuleBase::Ry_to_eV; if (eigenval >= emin && eigenval <= emax) { - weight(ik, ib) = en > 0 ? pelec->klist->wk[ik] - pelec->wg(ik, ib) : pelec->wg(ik, ib); + weight(ik, ib) = en > 0 ? kv.wk[ik] - wg(ik, ib) : wg(ik, ib); } } } // calculate dm-like for ldos const int nspin_dm = PARAM.inp.nspin == 2 ? 2 : 1; - elecstate::DensityMatrix dm_ldos(pelec->DM->get_paraV_pointer(), + elecstate::DensityMatrix dm_ldos(dmat.dm->get_paraV_pointer(), nspin_dm, - pelec->klist->kvec_d, - pelec->klist->get_nks() / nspin_dm); + kv.kvec_d, + kv.get_nks() / nspin_dm); - elecstate::cal_dm_psi(pelec->DM->get_paraV_pointer(), weight, psi, dm_ldos); - dm_ldos.init_DMR(*(pelec->DM->get_DMR_pointer(1))); + elecstate::cal_dm_psi(dmat.dm->get_paraV_pointer(), weight, psi, dm_ldos); + dm_ldos.init_DMR(*(dmat.dm->get_DMR_pointer(1))); dm_ldos.cal_DMR(); // allocate ldos space - std::vector ldos_space(PARAM.inp.nspin * pelec->charge->nrxx); + std::vector ldos_space(PARAM.inp.nspin * chr.nrxx); double** ldos = new double*[PARAM.inp.nspin]; for (int is = 0; is < PARAM.inp.nspin; ++is) { - ldos[is] = &ldos_space[is * pelec->charge->nrxx]; + ldos[is] = &ldos_space[is * chr.nrxx]; } // calculate ldos @@ -66,7 +72,7 @@ void Cal_ldos::cal_ldos_lcao(const elecstate::ElecStateLCAO* pelec, // ldos[0] += ldos[1] for nspin_dm == 2 if (nspin_dm == 2) { - BlasConnector::axpy(pelec->charge->nrxx, 1.0, ldos[1], 1, ldos[0], 1); + BlasConnector::axpy(chr.nrxx, 1.0, ldos[1], 1, ldos[0], 1); } // write ldos to cube file diff --git a/source/source_io/cal_ldos.h b/source/source_io/module_dos/cal_ldos.h similarity index 77% rename from source/source_io/cal_ldos.h rename to source/source_io/module_dos/cal_ldos.h index a18ac0f1d0..8a16046b76 100644 --- a/source/source_io/cal_ldos.h +++ b/source/source_io/module_dos/cal_ldos.h @@ -4,6 +4,12 @@ #include "source_estate/elecstate_lcao.h" #include "source_estate/elecstate_pw.h" +#include "source_estate/fp_energy.h" // eferm +#include "source_estate/module_charge/charge.h" // chr +#include "source_lcao/setup_dm.h" // Setup_DM +#include "source_cell/klist.h" // K_Vectors +#include "source_base/matrix.h" // matrix + namespace ModuleIO { template @@ -13,10 +19,17 @@ class Cal_ldos Cal_ldos(){}; ~Cal_ldos(){}; - static void cal_ldos_lcao(const elecstate::ElecStateLCAO* pelec, - const psi::Psi& psi, - const Parallel_Grid& pgrid, - const UnitCell& ucell); + static void cal_ldos_lcao( + const elecstate::Efermi &eferm, // mohan add 2025-11-02 + const Charge &chr, // mohan add add 2025-11-02 + const LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-02 + const K_Vectors &kv, // k points, mohan add 2025-11-02 + const ModuleBase::matrix &ekb, // mohan add 2025-11-02 + const ModuleBase::matrix &wg, // mohan add 2025-11-02 + const psi::Psi& psi, + const Parallel_Grid& pgrid, + const UnitCell& ucell); + }; // namespace Cal_ldos void cal_ldos_pw(const elecstate::ElecStatePW>* pelec, @@ -72,4 +85,4 @@ void trilinear_interpolate(const std::vector>& points, } // namespace ModuleIO -#endif // CAL_LDOS_H \ No newline at end of file +#endif // CAL_LDOS_H diff --git a/source/source_io/cal_pdos_gamma.cpp b/source/source_io/module_dos/cal_pdos_gamma.cpp similarity index 98% rename from source/source_io/cal_pdos_gamma.cpp rename to source/source_io/module_dos/cal_pdos_gamma.cpp index c51519207e..50acad4f26 100644 --- a/source/source_io/cal_pdos_gamma.cpp +++ b/source/source_io/module_dos/cal_pdos_gamma.cpp @@ -1,13 +1,13 @@ #include "cal_pdos_gamma.h" - +#include "source_io/module_parameter/parameter.h" // use PARAM #include "source_base/parallel_reduce.h" #include "source_base/module_external/blas_connector.h" #include "source_base/module_external/scalapack_connector.h" -#include "write_orb_info.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" -#include "source_pw/module_pwdft/global.h" #include "source_lcao/hamilt_lcao.h" +#include "source_io/module_output/write_orb_info.h" + void ModuleIO::cal_pdos( const psi::Psi* psi, diff --git a/source/source_io/cal_pdos_gamma.h b/source/source_io/module_dos/cal_pdos_gamma.h similarity index 100% rename from source/source_io/cal_pdos_gamma.h rename to source/source_io/module_dos/cal_pdos_gamma.h diff --git a/source/source_io/cal_pdos_multik.cpp b/source/source_io/module_dos/cal_pdos_multik.cpp similarity index 98% rename from source/source_io/cal_pdos_multik.cpp rename to source/source_io/module_dos/cal_pdos_multik.cpp index d16b517f3f..b7766b22f4 100644 --- a/source/source_io/cal_pdos_multik.cpp +++ b/source/source_io/module_dos/cal_pdos_multik.cpp @@ -1,12 +1,11 @@ #include "cal_pdos_multik.h" - +#include "source_io/module_parameter/parameter.h" // use PARAM #include "source_base/parallel_reduce.h" #include "source_base/module_external/blas_connector.h" #include "source_base/module_external/scalapack_connector.h" -#include "write_orb_info.h" +#include "source_io/module_output/write_orb_info.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" -#include "source_pw/module_pwdft/global.h" #include "source_lcao/hamilt_lcao.h" void ModuleIO::cal_pdos( diff --git a/source/source_io/cal_pdos_multik.h b/source/source_io/module_dos/cal_pdos_multik.h similarity index 100% rename from source/source_io/cal_pdos_multik.h rename to source/source_io/module_dos/cal_pdos_multik.h diff --git a/source/source_io/write_dos_lcao.cpp b/source/source_io/module_dos/write_dos_lcao.cpp similarity index 98% rename from source/source_io/write_dos_lcao.cpp rename to source/source_io/module_dos/write_dos_lcao.cpp index 228207d7e2..359b22fee4 100644 --- a/source/source_io/write_dos_lcao.cpp +++ b/source/source_io/module_dos/write_dos_lcao.cpp @@ -2,7 +2,7 @@ #include "cal_dos.h" #include "cal_pdos_gamma.h" #include "cal_pdos_multik.h" -#include "nscf_fermi_surf.h" +#include "source_io/module_energy/nscf_fermi_surf.h" #include "source_io/module_parameter/parameter.h" namespace ModuleIO diff --git a/source/source_io/write_dos_lcao.h b/source/source_io/module_dos/write_dos_lcao.h similarity index 100% rename from source/source_io/write_dos_lcao.h rename to source/source_io/module_dos/write_dos_lcao.h diff --git a/source/source_io/write_dos_pw.cpp b/source/source_io/module_dos/write_dos_pw.cpp similarity index 97% rename from source/source_io/write_dos_pw.cpp rename to source/source_io/module_dos/write_dos_pw.cpp index b766358584..bfcc094d5c 100644 --- a/source/source_io/write_dos_pw.cpp +++ b/source/source_io/module_dos/write_dos_pw.cpp @@ -1,6 +1,6 @@ #include "write_dos_pw.h" #include "cal_dos.h" -#include "nscf_fermi_surf.h" +#include "../module_energy/nscf_fermi_surf.h" #include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_io/write_dos_pw.h b/source/source_io/module_dos/write_dos_pw.h similarity index 100% rename from source/source_io/write_dos_pw.h rename to source/source_io/module_dos/write_dos_pw.h diff --git a/source/source_io/write_elf.cpp b/source/source_io/module_elf/write_elf.cpp similarity index 68% rename from source/source_io/write_elf.cpp rename to source/source_io/module_elf/write_elf.cpp index e3c72596fa..347a119099 100644 --- a/source/source_io/write_elf.cpp +++ b/source/source_io/module_elf/write_elf.cpp @@ -1,6 +1,5 @@ #include "write_elf.h" -#include "source_io/cube_io.h" -#include "source_pw/module_pwdft/global.h" +#include "source_io/module_output/cube_io.h" namespace ModuleIO { @@ -19,12 +18,20 @@ void write_elf( const UnitCell* ucell_, const int& precision) { - std::vector> elf(nspin, std::vector(rho_basis->nrxx, 0.)); + // For nspin = 4, we only calculate the total ELF using the rho_total and tau_total, + // containing in the first channel of rho and tau. + // What's more, we have not introduced the U(1) and SU(2) gauge invariance corrections + // proposed by Desmarais J K, Vignale G, Bencheikh K, et al. Physical Review Letters, 2024, 133(13): 136401, + // where the current density is also included in the ELF calculation. + + int nspin_eff = (nspin == 4) ? 1 : nspin; + + std::vector> elf(nspin_eff, std::vector(rho_basis->nrxx, 0.)); // 1) calculate the kinetic energy density of vW KEDF - std::vector> tau_vw(nspin, std::vector(rho_basis->nrxx, 0.)); + std::vector> tau_vw(nspin_eff, std::vector(rho_basis->nrxx, 0.)); std::vector phi(rho_basis->nrxx, 0.); // phi = sqrt(rho) - for (int is = 0; is < nspin; ++is) + for (int is = 0; is < nspin_eff; ++is) { for (int ir = 0; ir < rho_basis->nrxx; ++ir) { @@ -55,36 +62,58 @@ void write_elf( } // 2) calculate the kinetic energy density of TF KEDF - std::vector> tau_TF(nspin, std::vector(rho_basis->nrxx, 0.)); + std::vector> tau_TF(nspin_eff, std::vector(rho_basis->nrxx, 0.)); const double c_tf = 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0) * 2.0; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) - if (nspin == 1) + if (nspin == 1 || nspin == 4) { for (int ir = 0; ir < rho_basis->nrxx; ++ir) { - tau_TF[0][ir] = c_tf * std::pow(rho[0][ir], 5.0 / 3.0); + if (rho[0][ir] > 0.0) + { + tau_TF[0][ir] = c_tf * std::pow(rho[0][ir], 5.0 / 3.0); + } + else + { + tau_TF[0][ir] = 0.0; + } } } else if (nspin == 2) { + // the spin-scaling law: tau_TF[rho_up, rho_dn] = 1/2 * (tau_TF[2*rho_up] + tau_TF[2*rho_dn]) for (int is = 0; is < nspin; ++is) { for (int ir = 0; ir < rho_basis->nrxx; ++ir) { - tau_TF[is][ir] = 0.5 * c_tf * std::pow(2.0 * rho[is][ir], 5.0 / 3.0); + if (rho[is][ir] > 0.0) + { + tau_TF[is][ir] = 0.5 * c_tf * std::pow(2.0 * rho[is][ir], 5.0 / 3.0); + } + else + { + tau_TF[is][ir] = 0.0; + } } } } // 3) calculate the enhancement factor F = (tau_KS - tau_vw) / tau_TF, and then ELF = 1 / (1 + F^2) double eps = 1.0e-5; // suppress the numerical instability in LCAO (Ref: Acta Phys. -Chim. Sin. 2011, 27(12), 2786-2792. doi: 10.3866/PKU.WHXB20112786) - for (int is = 0; is < nspin; ++is) + for (int is = 0; is < nspin_eff; ++is) { for (int ir = 0; ir < rho_basis->nrxx; ++ir) { - elf[is][ir] = (tau[is][ir] - tau_vw[is][ir] + eps) / tau_TF[is][ir]; - elf[is][ir] = 1. / (1. + elf[is][ir] * elf[is][ir]); + if (tau_TF[is][ir] > 1.0e-12) + { + elf[is][ir] = (tau[is][ir] - tau_vw[is][ir] + eps) / tau_TF[is][ir]; + elf[is][ir] = 1. / (1. + elf[is][ir] * elf[is][ir]); + } + else + { + elf[is][ir] = 0.0; + } } } @@ -92,7 +121,7 @@ void write_elf( double ef_tmp = 0.0; int out_fermi = 0; - if (nspin == 1) + if (nspin == 1 || nspin == 4) { std::string fn = out_dir + "/elf.cube"; @@ -148,7 +177,7 @@ void write_elf( ef_tmp, ucell_, precision, - out_fermi); + out_fermi); } } } diff --git a/source/source_io/write_elf.h b/source/source_io/module_elf/write_elf.h similarity index 100% rename from source/source_io/write_elf.h rename to source/source_io/module_elf/write_elf.h diff --git a/source/source_io/nscf_fermi_surf.cpp b/source/source_io/module_energy/nscf_fermi_surf.cpp similarity index 100% rename from source/source_io/nscf_fermi_surf.cpp rename to source/source_io/module_energy/nscf_fermi_surf.cpp diff --git a/source/source_io/nscf_fermi_surf.h b/source/source_io/module_energy/nscf_fermi_surf.h similarity index 100% rename from source/source_io/nscf_fermi_surf.h rename to source/source_io/module_energy/nscf_fermi_surf.h diff --git a/source/source_io/write_bands.cpp b/source/source_io/module_energy/write_bands.cpp similarity index 100% rename from source/source_io/write_bands.cpp rename to source/source_io/module_energy/write_bands.cpp diff --git a/source/source_io/write_bands.h b/source/source_io/module_energy/write_bands.h similarity index 100% rename from source/source_io/write_bands.h rename to source/source_io/module_energy/write_bands.h diff --git a/source/source_io/write_eband_terms.hpp b/source/source_io/module_energy/write_eband_terms.hpp similarity index 95% rename from source/source_io/write_eband_terms.hpp rename to source/source_io/module_energy/write_eband_terms.hpp index 701b097b25..8732c9c0f8 100644 --- a/source/source_io/write_eband_terms.hpp +++ b/source/source_io/module_energy/write_eband_terms.hpp @@ -1,9 +1,9 @@ #ifndef WRITE_EBAND_TERMS_HPP #define WRITE_EBAND_TERMS_HPP -#include "source_io/write_vxc.hpp" -#include "source_lcao/module_operator_lcao/ekinetic_new.h" -#include "source_lcao/module_operator_lcao/nonlocal_new.h" +#include "source_io/module_hs/write_vxc.hpp" +#include "source_lcao/module_operator_lcao/ekinetic.h" +#include "source_lcao/module_operator_lcao/nonlocal.h" #include "source_basis/module_nao/two_center_bundle.h" namespace ModuleIO @@ -75,7 +75,7 @@ void write_eband_terms(const int nspin, hamilt::HContainer kinetic_R_ao(pv); if_gamma_fix(kinetic_R_ao); - hamilt::EkineticNew> kinetic_op(&kinetic_k_ao, kv.kvec_d, + hamilt::EKinetic> kinetic_op(&kinetic_k_ao, kv.kvec_d, &kinetic_R_ao, &ucell, orb_cutoff, &gd, two_center_bundle.kinetic_orb.get()); kinetic_op.contributeHR(); @@ -132,7 +132,7 @@ void write_eband_terms(const int nspin, hamilt::HContainer v_pp_nonlocal_R_ao(pv); if_gamma_fix(v_pp_nonlocal_R_ao); std::vector> e_orb_pp_nonlocal; - hamilt::NonlocalNew> v_pp_nonlocal_op(&v_pp_nonlocal_k_ao, kv.kvec_d, + hamilt::Nonlocal> v_pp_nonlocal_op(&v_pp_nonlocal_k_ao, kv.kvec_d, &v_pp_nonlocal_R_ao, &ucell, orb_cutoff, &gd, two_center_bundle.overlap_orb_beta.get()); v_pp_nonlocal_op.contributeHR(); for (int ik = 0;ik < kv.get_nks();++ik) diff --git a/source/source_io/write_eig_occ.cpp b/source/source_io/module_energy/write_eig_occ.cpp similarity index 97% rename from source/source_io/write_eig_occ.cpp rename to source/source_io/module_energy/write_eig_occ.cpp index e403448a4c..4b13d885b9 100644 --- a/source/source_io/write_eig_occ.cpp +++ b/source/source_io/module_energy/write_eig_occ.cpp @@ -20,13 +20,6 @@ void ModuleIO::write_eig_iter(const ModuleBase::matrix &ekb,const ModuleBase::ma const int nspin = PARAM.inp.nspin; const int nks = kv.get_nks(); const int nkstot = kv.get_nkstot(); - - std::vector ngk_tot = kv.ngk; - -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, ngk_tot.data(), nks, MPI_INT, MPI_SUM, POOL_WORLD); -#endif - const int nk_fac = nspin == 2 ? 2 : 1; const int nks_np = nks / nk_fac; const int nkstot_np = nkstot / nk_fac; @@ -205,11 +198,10 @@ void ModuleIO::write_eig_file(const ModuleBase::matrix &ekb, { ModuleBase::WARNING_QUIT("ModuleIO::write_eig_file", "Eigenvalues are too large!"); } - std::vector ngk_tot = kv.ngk; - #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, ngk_tot.data(), nks, MPI_INT, MPI_SUM, POOL_WORLD); + std::vector send_ngk_tot = kv.ngk; + MPI_Allreduce(send_ngk_tot.data(), ngk_tot.data(), nks, MPI_INT, MPI_SUM, POOL_WORLD); #endif // file name to store eigenvalues diff --git a/source/source_io/write_eig_occ.h b/source/source_io/module_energy/write_eig_occ.h similarity index 100% rename from source/source_io/write_eig_occ.h rename to source/source_io/module_energy/write_eig_occ.h diff --git a/source/source_io/write_proj_band_lcao.cpp b/source/source_io/module_energy/write_proj_band_lcao.cpp similarity index 99% rename from source/source_io/write_proj_band_lcao.cpp rename to source/source_io/module_energy/write_proj_band_lcao.cpp index a01937c5d2..dfcbda0757 100644 --- a/source/source_io/write_proj_band_lcao.cpp +++ b/source/source_io/module_energy/write_proj_band_lcao.cpp @@ -6,7 +6,7 @@ #include "source_base/module_external/scalapack_connector.h" #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" -#include "write_orb_info.h" +#include "source_io/module_output/write_orb_info.h" #include "source_lcao/hamilt_lcao.h" template<> diff --git a/source/source_io/write_proj_band_lcao.h b/source/source_io/module_energy/write_proj_band_lcao.h similarity index 100% rename from source/source_io/write_proj_band_lcao.h rename to source/source_io/module_energy/write_proj_band_lcao.h diff --git a/source/source_io/cal_pLpR.cpp b/source/source_io/module_hs/cal_pLpR.cpp similarity index 85% rename from source/source_io/cal_pLpR.cpp rename to source/source_io/module_hs/cal_pLpR.cpp index 7c3a5f0eab..e437335ec0 100644 --- a/source/source_io/cal_pLpR.cpp +++ b/source/source_io/module_hs/cal_pLpR.cpp @@ -11,7 +11,7 @@ #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/cal_pLpR.h" +#include "source_io/module_hs/cal_pLpR.h" #include "source_base/formatter.h" #include "source_base/parallel_common.h" /** @@ -150,12 +150,21 @@ ModuleIO::AngularMomentumCalculator::AngularMomentumCalculator( // for neighbor list search double temp = -1.0; + if (search_radius < rcut_max) + { + *ofs_ << "Find the `search_radius` from the input file being smaller than the \n" + "`rcut_max` of the orbitals.\n" + << "Reset the `search_radius` (" << search_radius << ") " + << "to `rcut_max` ("<< rcut_max << ")." + << std::endl; + // we don't really set, but use std::max to mask :) + } temp = atom_arrange::set_sr_NL(*ofs_, PARAM.inp.out_level, - search_radius, + std::max(search_radius, rcut_max), ucell.infoNL.get_rcutmax_Beta(), PARAM.globalv.gamma_only_local); - temp = std::max(temp, search_radius); + temp = std::max(temp, std::max(search_radius, rcut_max)); this->neighbor_searcher_ = std::unique_ptr(new Grid_Driver(tdestructor, tgrid)); atom_arrange::search(searchpbc, *ofs_, @@ -190,24 +199,29 @@ void ModuleIO::AngularMomentumCalculator::kernel( fmtstr += "%" + std::to_string(precision*2) + "." + std::to_string(precision) + "e\n"; FmtCore fmt(fmtstr); - ModuleBase::Vector3 ri, rj, dr; + // placeholders + std::complex val = 0; + ModuleBase::Vector3 taui; // the origin position + ModuleBase::Vector3 dtau; // the displacement + AdjacentAtomInfo adjinfo; // adjacent atom information carrier for (int it = 0; it < ucell.ntype; it++) { const Atom& atyp_i = ucell.atoms[it]; for (int ia = 0; ia < atyp_i.na; ia++) { - ri = atyp_i.tau[ia]; - neighbor_searcher_->Find_atom(ucell, ri, it, ia); - for (int ia_adj = 0; ia_adj < neighbor_searcher_->getAdjacentNum(); ia_adj++) + taui = ucell.get_tau(ucell.itia2iat(it, ia)); + neighbor_searcher_->Find_atom(ucell, taui, it, ia, &adjinfo); + for (int ia_adj = 0; ia_adj < adjinfo.adj_num + 1; ia_adj++) // "+1" is to include itself { - rj = neighbor_searcher_->getAdjacentTau(ia_adj); - int jt = neighbor_searcher_->getType(ia_adj); + int jt = adjinfo.ntype[ia_adj]; // ityp + int ja = adjinfo.natom[ia_adj]; // iat with in atomtype const Atom& atyp_j = ucell.atoms[jt]; - int ja = neighbor_searcher_->getNatom(ia_adj); - dr = (ri - rj) * ucell.lat0; - const ModuleBase::Vector3 iR = neighbor_searcher_->getBox(ia_adj); - // the two-center-integral + const ModuleBase::Vector3 iR = adjinfo.box[ia_adj]; + dtau = ucell.cal_dtau(ucell.itia2iat(it, ia), + ucell.itia2iat(jt, ja), + iR) * ucell.lat0; // convert to unit of Bohr + // nested loop: calculate the two-center-integral for (int li = 0; li < atyp_i.nwl + 1; li++) { for (int iz = 0; iz < atyp_i.l_nchi[li]; iz++) @@ -220,21 +234,20 @@ void ModuleIO::AngularMomentumCalculator::kernel( { for (int mj = -lj; mj <= lj; mj++) { - std::complex val = 0; if (dir == 'x') { val = cal_LxijR(calculator_, - it, ia, li, iz, mi, jt, ja, lj, jz, mj, dr); + it, ia, li, iz, mi, jt, ja, lj, jz, mj, dtau); } else if (dir == 'y') { val = cal_LyijR(calculator_, - it, ia, li, iz, mi, jt, ja, lj, jz, mj, dr); + it, ia, li, iz, mi, jt, ja, lj, jz, mj, dtau); } else if (dir == 'z') { val = cal_LzijR(calculator_, - it, ia, li, iz, mi, jt, ja, lj, jz, mj, dr); + it, ia, li, iz, mi, jt, ja, lj, jz, mj, dtau); } *ofs << fmt.format( @@ -266,7 +279,7 @@ void ModuleIO::AngularMomentumCalculator::calculate( } std::ofstream ofout; const std::string dir = "xyz"; - const std::string title = "# it ia il iz im iRx iRy iRz jt ja jl jz jm \n" + const std::string title = "# it ia il iz im iRx iRy iRz jt ja jl jz jm Re[] Im[]\n" "# it: atomtype index of the first atom\n" "# ia: atomic index of the first atom within the atomtype\n" "# il: angular momentum index of the first atom\n" @@ -278,7 +291,8 @@ void ModuleIO::AngularMomentumCalculator::calculate( "# jl: angular momentum index of the second atom\n" "# jz: zeta function index of the second atom\n" "# jm: magnetic quantum number of the second atom\n" - "# : the value of the matrix element\n"; + "# Re[], Im[]: the real and imaginary parts " + "of the value of the matrix element\n"; for (char d : dir) { diff --git a/source/source_io/cal_pLpR.h b/source/source_io/module_hs/cal_pLpR.h similarity index 100% rename from source/source_io/cal_pLpR.h rename to source/source_io/module_hs/cal_pLpR.h diff --git a/source/source_io/cal_r_overlap_R.cpp b/source/source_io/module_hs/cal_r_overlap_R.cpp similarity index 98% rename from source/source_io/cal_r_overlap_R.cpp rename to source/source_io/module_hs/cal_r_overlap_R.cpp index f81bf8026f..8ea658c3db 100644 --- a/source/source_io/cal_r_overlap_R.cpp +++ b/source/source_io/module_hs/cal_r_overlap_R.cpp @@ -4,7 +4,6 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/mathzone_add1.h" cal_r_overlap_R::cal_r_overlap_R() @@ -18,19 +17,11 @@ cal_r_overlap_R::~cal_r_overlap_R() void cal_r_overlap_R::initialize_orb_table(const UnitCell& ucell, const LCAO_Orbitals& orb) { - int Lmax_used = 0; - int Lmax = 0; - int exx_lmax = 0; -#ifdef __EXX - exx_lmax = GlobalC::exx_info.info_ri.abfs_Lmax; -#endif - const int ntype = orb.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; + int lmax_orb = -1; for (int it = 0; it < ntype; it++) { lmax_orb = std::max(lmax_orb, orb.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); } const double dr = orb.get_dR(); const double dk = orb.get_dk(); @@ -38,13 +29,9 @@ void cal_r_overlap_R::initialize_orb_table(const UnitCell& ucell, int Rmesh = static_cast(orb.get_Rmax() / dr) + 4; Rmesh += 1 - Rmesh % 2; - Center2_Orb::init_Table_Spherical_Bessel(2, - 3, - Lmax_used, - Lmax, - exx_lmax, - lmax_orb, - lmax_beta, + const int Lmax = lmax_orb + 1; + const int Lmax_used = 2 * lmax_orb + 1; + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, diff --git a/source/source_io/cal_r_overlap_R.h b/source/source_io/module_hs/cal_r_overlap_R.h similarity index 100% rename from source/source_io/cal_r_overlap_R.h rename to source/source_io/module_hs/cal_r_overlap_R.h diff --git a/source/source_io/module_hs/output_mat_sparse.cpp b/source/source_io/module_hs/output_mat_sparse.cpp new file mode 100644 index 0000000000..4f8b04ec29 --- /dev/null +++ b/source/source_io/module_hs/output_mat_sparse.cpp @@ -0,0 +1,115 @@ +#include "output_mat_sparse.h" + +#include "cal_r_overlap_R.h" +#include "source_io/module_hs/write_HS_R.h" + +namespace ModuleIO +{ +template +void output_mat_sparse(const bool& out_mat_hsR, + const bool& out_mat_dh, + const bool& out_mat_ds, + const bool& out_mat_t, + const bool& out_mat_r, + const int& istep, + const ModuleBase::matrix& v_eff, + const Parallel_Orbitals& pv, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + UnitCell& ucell, + const Grid_Driver& grid, + const K_Vectors& kv, + hamilt::Hamilt* p_ham, + Plus_U* p_dftu) +{ + LCAO_HS_Arrays HS_Arrays; // store sparse arrays + + //! generate a file containing the Hamiltonian and S(overlap) matrices + if (out_mat_hsR) + { + output_HSR(ucell, istep, pv, HS_Arrays, grid, kv, *p_dftu, p_ham); + } + + //! generate a file containing the kinetic energy matrix + if (out_mat_t) + { + output_TR(istep, ucell, pv, HS_Arrays, grid, two_center_bundle, orb); + } + + //! generate a file containing the derivatives of the Hamiltonian matrix (in Ry/Bohr) + if (out_mat_dh) + { + output_dHR(istep, + v_eff, + ucell, + pv, + HS_Arrays, + grid, // mohan add 2024-04-06 + two_center_bundle, + orb, + kv); // LiuXh add 2019-07-15 + } + //! generate a file containing the derivatives of the overlap matrix (in Ry/Bohr) + if (out_mat_ds) + { + output_dSR(istep, + ucell, + pv, + HS_Arrays, + grid, // mohan add 2024-04-06 + two_center_bundle, + orb, + kv); + } + + // add by jingan for out r_R matrix 2019.8.14 + if (out_mat_r) + { + cal_r_overlap_R r_matrix; + r_matrix.init(ucell, pv, orb); + if (out_mat_hsR) + { + r_matrix.out_rR_other(ucell, istep, HS_Arrays.output_R_coor); + } + else + { + r_matrix.out_rR(ucell, grid, istep); + } + } + + return; +} + +template void output_mat_sparse(const bool& out_mat_hsR, + const bool& out_mat_dh, + const bool& out_mat_ds, + const bool& out_mat_t, + const bool& out_mat_r, + const int& istep, + const ModuleBase::matrix& v_eff, + const Parallel_Orbitals& pv, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + UnitCell& ucell, + const Grid_Driver& grid, + const K_Vectors& kv, + hamilt::Hamilt* p_ham, + Plus_U* p_dftu); + +template void output_mat_sparse>(const bool& out_mat_hsR, + const bool& out_mat_dh, + const bool& out_mat_ds, + const bool& out_mat_t, + const bool& out_mat_r, + const int& istep, + const ModuleBase::matrix& v_eff, + const Parallel_Orbitals& pv, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + UnitCell& ucell, + const Grid_Driver& grid, + const K_Vectors& kv, + hamilt::Hamilt>* p_ham, + Plus_U* p_dftu); + +} // namespace ModuleIO diff --git a/source/source_io/output_mat_sparse.h b/source/source_io/module_hs/output_mat_sparse.h similarity index 88% rename from source/source_io/output_mat_sparse.h rename to source/source_io/module_hs/output_mat_sparse.h index bce47f7fb0..ec9af7af72 100644 --- a/source/source_io/output_mat_sparse.h +++ b/source/source_io/module_hs/output_mat_sparse.h @@ -6,6 +6,8 @@ #include "source_cell/klist.h" #include "source_hamilt/hamilt.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 + namespace ModuleIO { /// @brief the output interface to write the sparse matrix of H, S, T, and r @@ -23,7 +25,8 @@ void output_mat_sparse(const bool& out_mat_hsR, UnitCell& ucell, const Grid_Driver& grid, // mohan add 2024-04-06 const K_Vectors& kv, - hamilt::Hamilt* p_ham); + hamilt::Hamilt* p_ham, + Plus_U* p_dftu); // mohan add 20251107 } // namespace ModuleIO #endif // OUTPUT_MAT_SPARSE_H diff --git a/source/source_io/single_R_io.cpp b/source/source_io/module_hs/single_R_io.cpp similarity index 90% rename from source/source_io/single_R_io.cpp rename to source/source_io/module_hs/single_R_io.cpp index f2bc24886f..a8e7e3cace 100644 --- a/source/source_io/single_R_io.cpp +++ b/source/source_io/module_hs/single_R_io.cpp @@ -6,12 +6,11 @@ inline void write_data(std::ofstream& ofs, const double& data) { - ofs << " " << std::fixed << std::scientific << std::setprecision(8) << data; + ofs << " " << data; } inline void write_data(std::ofstream& ofs, const std::complex& data) { - ofs << " (" << std::fixed << std::scientific << std::setprecision(8) << data.real() << "," - << std::fixed << std::scientific << std::setprecision(8) << data.imag() << ")"; + ofs << " (" << data.real() << "," << data.imag() << ")"; } template @@ -23,7 +22,7 @@ void ModuleIO::output_single_R(std::ofstream& ofs, const bool& reduce) { T* line = nullptr; - std::vector indptr; + std::vector indptr; indptr.reserve(PARAM.globalv.nlocal + 1); indptr.push_back(0); @@ -68,7 +67,8 @@ void ModuleIO::output_single_R(std::ofstream& ofs, if (!reduce || GlobalV::DRANK == 0) { - int nonzeros_count = 0; + long long nonzeros_count = 0; + ofs << std::fixed << std::scientific << std::setprecision(8); for (int col = 0; col < PARAM.globalv.nlocal; ++col) { if (std::abs(line[col]) > sparse_threshold) @@ -106,7 +106,7 @@ void ModuleIO::output_single_R(std::ofstream& ofs, ifs_tem1.close(); for (auto &i : indptr) { - ofs.write(reinterpret_cast(&i), sizeof(int)); + ofs.write(reinterpret_cast(&i), sizeof(long long)); } } else diff --git a/source/source_io/single_R_io.h b/source/source_io/module_hs/single_R_io.h similarity index 100% rename from source/source_io/single_R_io.h rename to source/source_io/module_hs/single_R_io.h diff --git a/source/source_io/write_HS.h b/source/source_io/module_hs/write_HS.h similarity index 97% rename from source/source_io/write_HS.h rename to source/source_io/module_hs/write_HS.h index dae3f8ef11..43cd65b6d8 100644 --- a/source/source_io/write_HS.h +++ b/source/source_io/module_hs/write_HS.h @@ -7,6 +7,7 @@ //#include "source_base/global_function.h" //#include "source_base/global_variable.h" #include "source_basis/module_ao/parallel_orbitals.h" // use Parallel_Orbitals +#include "source_hamilt/hamilt.h" // mohan add this file 2010-09-10 diff --git a/source/source_io/write_HS.hpp b/source/source_io/module_hs/write_HS.hpp similarity index 75% rename from source/source_io/write_HS.hpp rename to source/source_io/module_hs/write_HS.hpp index c08771ff4e..b16dd64a38 100644 --- a/source/source_io/write_HS.hpp +++ b/source/source_io/module_hs/write_HS.hpp @@ -4,8 +4,7 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/filename.h" // use filename_output function +#include "source_io/module_output/filename.h" // use filename_output function template @@ -111,16 +110,19 @@ void ModuleIO::save_mat(const int istep, ModuleBase::TITLE("ModuleIO", "save_mat"); ModuleBase::timer::tick("ModuleIO", "save_mat"); - // print out .dat file + const bool gamma_only = std::is_same::value; + + // write .dat file if (bit) { +// write .dat file with MPI #ifdef __MPI - FILE* g = nullptr; + FILE* out_matrix = nullptr; if (drank == 0) { - g = fopen(filename.c_str(), "wb"); - fwrite(&dim, sizeof(int), 1, g); + out_matrix = fopen(filename.c_str(), "wb"); + fwrite(&dim, sizeof(int), 1, out_matrix); } int ir=0; @@ -162,7 +164,7 @@ void ModuleIO::save_mat(const int istep, { for (int j = (tri ? i : 0); j < dim; ++j) { - fwrite(&line[tri ? j - i : j], sizeof(T), 1, g); + fwrite(&line[tri ? j - i : j], sizeof(T), 1, out_matrix); } } delete[] line; @@ -172,39 +174,47 @@ void ModuleIO::save_mat(const int istep, if (drank == 0) { - fclose(g); + fclose(out_matrix); } +// write .dat file without MPI #else - FILE* g = fopen(filename.c_str(), "wb"); + FILE* out_matrix = fopen(filename.c_str(), "wb"); - fwrite(&dim, sizeof(int), 1, g); + fwrite(&dim, sizeof(int), 1, out_matrix); for (int i = 0; i < dim; i++) { for (int j = (tri ? i : 0); j < dim; j++) { - fwrite(&mat[i * dim + j], sizeof(T), 1, g); + fwrite(&mat[i * dim + j], sizeof(T), 1, out_matrix); } } - fclose(g); + fclose(out_matrix); #endif - } // end .dat file - else // .txt file + } // end writing .dat file + else // write .txt file { - std::ofstream g; - g << std::setprecision(precision); + std::ofstream out_matrix; + out_matrix << std::scientific << std::setprecision(precision); #ifdef __MPI if (drank == 0) { if (app && istep > 0) { - g.open(filename.c_str(), std::ofstream::app); + out_matrix.open(filename.c_str(), std::ofstream::app); } else { - g.open(filename.c_str()); + out_matrix.open(filename.c_str()); } - g << dim; + out_matrix << "#------------------------------------------------------------------------" << std::endl; + out_matrix << "# ionic step " << istep+1 << std::endl; // istep starts from 0 + out_matrix << "# filename " << filename << std::endl; + out_matrix << "# gamma only " << gamma_only << std::endl; + out_matrix << "# rows " << dim << std::endl; + out_matrix << "# columns " << dim << std::endl; + out_matrix << "#------------------------------------------------------------------------" << std::endl; + } int ir=0; @@ -223,7 +233,7 @@ void ModuleIO::save_mat(const int istep, ic = pv.global2local_col(j); if (ic >= 0) { - int iic; + int iic=0; if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) { iic = ir + ic * pv.nrow; @@ -244,40 +254,50 @@ void ModuleIO::save_mat(const int istep, if (drank == 0) { + out_matrix << "Row " << i+1 << std::endl; + size_t count = 0; for (int j = (tri ? i : 0); j < dim; j++) { - g << " " << line[tri ? j - i : j]; + out_matrix << " " << line[tri ? j - i : j]; + ++count; + if(count%8==0) + { + if(j!=dim-1) + { + out_matrix << std::endl; + } + } } - g << std::endl; + out_matrix << std::endl; } delete[] line; } if (drank == 0) - { // Peize Lin delete ; at 2020.01.31 - g.close(); + { + out_matrix.close(); } #else if (app) { - std::ofstream g(filename.c_str(), std::ofstream::app); + std::ofstream out_matrix(filename.c_str(), std::ofstream::app); } else { - std::ofstream g(filename.c_str()); + std::ofstream out_matrix(filename.c_str()); } - g << dim; - g << std::setprecision(precision); + out_matrix << dim; + out_matrix << std::setprecision(precision); for (int i = 0; i < dim; i++) { for (int j = (tri ? i : 0); j < dim; j++) { - g << " " << mat[i * dim + j]; + out_matrix << " " << mat[i * dim + j]; } - g << std::endl; + out_matrix << std::endl; } - g.close(); + out_matrix.close(); #endif } ModuleBase::timer::tick("ModuleIO", "save_mat"); diff --git a/source/source_io/write_HS_R.cpp b/source/source_io/module_hs/write_HS_R.cpp similarity index 51% rename from source/source_io/write_HS_R.cpp rename to source/source_io/module_hs/write_HS_R.cpp index b98b74ef80..293e315918 100644 --- a/source/source_io/write_HS_R.cpp +++ b/source/source_io/module_hs/write_HS_R.cpp @@ -1,7 +1,7 @@ #include "write_HS_R.h" -#include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" +#include "source_io/module_parameter/parameter.h" #include "source_lcao/LCAO_HS_arrays.hpp" #include "source_lcao/spar_dh.h" #include "source_lcao/spar_hsr.h" @@ -12,14 +12,15 @@ // The 'sparse_thr' is the accuracy of the sparse matrix. // If the absolute value of the matrix element is less than or equal to the // 'sparse_thr', it will be ignored. +template void ModuleIO::output_HSR(const UnitCell& ucell, const int& istep, - const ModuleBase::matrix& v_eff, const Parallel_Orbitals& pv, LCAO_HS_Arrays& HS_Arrays, const Grid_Driver& grid, // mohan add 2024-04-06 - const K_Vectors& kv, - hamilt::Hamilt>* p_ham, + const K_Vectors& kv, + Plus_U &dftu, // mohan add 20251107 + hamilt::Hamilt* p_ham, #ifdef __EXX const std::vector>>>* Hexxd, const std::vector>>>>* Hexxc, @@ -28,64 +29,89 @@ void ModuleIO::output_HSR(const UnitCell& ucell, const std::string& HR_filename_up, const std::string HR_filename_down, const bool& binary, - const double& sparse_thr) + const double& sparse_thr) { ModuleBase::TITLE("ModuleIO", "output_HSR"); ModuleBase::timer::tick("ModuleIO", "output_HSR"); - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " | #Print out Hamiltonian matrix H(R) or overlap matrix S(R)# |" << std::endl; - GlobalV::ofs_running << " | Use numerical atomic orbitals basis. Here R is the Bravis lattice |" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " | #Print out Hamiltonian matrix H(R) or overlap matrix S(R)# |" << std::endl; + GlobalV::ofs_running << " | Use numerical atomic orbitals basis. Here R is the Bravis lattice |" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; const int nspin = PARAM.inp.nspin; - if (nspin == 1 || nspin == 4) { + if (nspin == 1 || nspin == 4) + { const int spin_now = 0; // jingan add 2021-6-4, modify 2021-12-2 - sparse_format::cal_HSR(ucell,pv, HS_Arrays, grid, spin_now, sparse_thr, kv.nmp, p_ham + sparse_format::cal_HSR(ucell, + dftu, // mohan add 20251107 + pv, + HS_Arrays, + grid, + spin_now, + sparse_thr, + kv.nmp, + p_ham #ifdef __EXX - , Hexxd, Hexxc + , + Hexxd, + Hexxc #endif ); } - else if (nspin == 2) { + else if (nspin == 2) + { int spin_now = 1; // save HR of spin down first (the current spin always be down) - sparse_format::cal_HSR(ucell,pv, HS_Arrays, grid, spin_now, sparse_thr, kv.nmp, p_ham + sparse_format::cal_HSR(ucell, + dftu, + pv, + HS_Arrays, + grid, + spin_now, + sparse_thr, + kv.nmp, + p_ham #ifdef __EXX - , Hexxd, Hexxc + , + Hexxd, + Hexxc #endif - ); + ); // cal HR of the spin up - if (PARAM.inp.vl_in_h) { + if (PARAM.inp.vl_in_h) + { const int ik = 0; p_ham->refresh(); p_ham->updateHk(ik); spin_now = 0; } - sparse_format::cal_HSR(ucell,pv, HS_Arrays, grid, spin_now, sparse_thr, kv.nmp, p_ham + sparse_format::cal_HSR(ucell, + dftu, + pv, + HS_Arrays, + grid, + spin_now, + sparse_thr, + kv.nmp, + p_ham #ifdef __EXX - , Hexxd, Hexxc + , + Hexxd, + Hexxc #endif ); } - ModuleIO::save_HSR_sparse(istep, - pv, - HS_Arrays, - sparse_thr, - binary, - SR_filename, - HR_filename_up, - HR_filename_down); + ModuleIO::save_HSR_sparse(istep, pv, HS_Arrays, sparse_thr, binary, SR_filename, HR_filename_up, HR_filename_down); sparse_format::destroy_HS_R_sparse(HS_Arrays); @@ -94,34 +120,28 @@ void ModuleIO::output_HSR(const UnitCell& ucell, } void ModuleIO::output_dSR(const int& istep, - const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, // mohan add 2024-04-06 - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const K_Vectors& kv, - const bool& binary, - const double& sparse_thr) + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, // mohan add 2024-04-06 + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const K_Vectors& kv, + const bool& binary, + const double& sparse_thr) { - ModuleBase::TITLE("ModuleIO", "output_dSR"); - ModuleBase::timer::tick("ModuleIO", "output_dSR"); + ModuleBase::TITLE("ModuleIO", "output_dSR"); + ModuleBase::timer::tick("ModuleIO", "output_dSR"); - sparse_format::cal_dS(ucell, - pv, - HS_Arrays, - grid, - two_center_bundle, - orb, - sparse_thr); + sparse_format::cal_dS(ucell, pv, HS_Arrays, grid, two_center_bundle, orb, sparse_thr); - // mohan update 2024-04-01 - ModuleIO::save_dH_sparse(istep, pv, HS_Arrays, sparse_thr, binary, "s"); + // mohan update 2024-04-01 + ModuleIO::save_dH_sparse(istep, pv, HS_Arrays, sparse_thr, binary, "s"); - sparse_format::destroy_dH_R_sparse(HS_Arrays); + sparse_format::destroy_dH_R_sparse(HS_Arrays); - ModuleBase::timer::tick("ModuleIO", "output_dSR"); - return; + ModuleBase::timer::tick("ModuleIO", "output_dSR"); + return; } void ModuleIO::output_dHR(const int& istep, @@ -139,42 +159,26 @@ void ModuleIO::output_dHR(const int& istep, ModuleBase::TITLE("ModuleIO", "output_dHR"); ModuleBase::timer::tick("ModuleIO", "output_dHR"); - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " | #Print out dH/dR# |" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " | #Print out dH/dR# |" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; const int nspin = PARAM.inp.nspin; - if (nspin == 1 || nspin == 4) - { - // mohan add 2024-04-01 - const int cspin = 0; + if (nspin == 1 || nspin == 4) + { + // mohan add 2024-04-01 + const int cspin = 0; - sparse_format::cal_dH(ucell, - pv, - HS_Arrays, - grid, - two_center_bundle, - orb, - cspin, - sparse_thr, - v_eff); - } - else if (nspin == 2) - { - for (int cspin = 0; cspin < 2; cspin++) - { - sparse_format::cal_dH(ucell, - pv, - HS_Arrays, - grid, - two_center_bundle, - orb, - cspin, - sparse_thr, - v_eff); + sparse_format::cal_dH(ucell, pv, HS_Arrays, grid, two_center_bundle, orb, cspin, sparse_thr, v_eff); + } + else if (nspin == 2) + { + for (int cspin = 0; cspin < 2; cspin++) + { + sparse_format::cal_dH(ucell, pv, HS_Arrays, grid, two_center_bundle, orb, cspin, sparse_thr, v_eff); } } // mohan update 2024-04-01 @@ -186,9 +190,10 @@ void ModuleIO::output_dHR(const int& istep, return; } +template void ModuleIO::output_SR(Parallel_Orbitals& pv, const Grid_Driver& grid, - hamilt::Hamilt>* p_ham, + hamilt::Hamilt* p_ham, const std::string& SR_filename, const bool& binary, const double& sparse_thr) @@ -205,7 +210,6 @@ void ModuleIO::output_SR(Parallel_Orbitals& pv, std::cout << " Overlap matrix file is in " << SR_filename << std::endl; GlobalV::ofs_running << " Overlap matrix file is in " << SR_filename << std::endl; - LCAO_HS_Arrays HS_Arrays; sparse_format::cal_SR(pv, @@ -261,31 +265,25 @@ void ModuleIO::output_TR(const int istep, ModuleBase::TITLE("ModuleIO", "output_TR"); ModuleBase::timer::tick("ModuleIO", "output_TR"); - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " | #Print out kinetic energy term matrix T(R)# |" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " | #Print out kinetic energy term matrix T(R)# |" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; std::stringstream sst; - if (PARAM.inp.calculation == "md" && !PARAM.inp.out_app_flag) - { - sst << PARAM.globalv.global_matrix_dir << TR_filename << "g" << istep; + if (PARAM.inp.calculation == "md" && !PARAM.inp.out_app_flag) + { + sst << PARAM.globalv.global_matrix_dir << TR_filename << "g" << istep; GlobalV::ofs_running << " T(R) data are in file: " << sst.str() << std::endl; - } - else - { + } + else + { sst << PARAM.globalv.global_out_dir << TR_filename; GlobalV::ofs_running << " T(R) data are in file: " << sst.str() << std::endl; } - sparse_format::cal_TR(ucell, - pv, - HS_Arrays, - grid, - two_center_bundle, - orb, - sparse_thr); + sparse_format::cal_TR(ucell, pv, HS_Arrays, grid, two_center_bundle, orb, sparse_thr); ModuleIO::save_sparse(HS_Arrays.TR_sparse, HS_Arrays.all_R_coor, @@ -301,3 +299,54 @@ void ModuleIO::output_TR(const int istep, ModuleBase::timer::tick("ModuleIO", "output_TR"); return; } + +template void ModuleIO::output_HSR( + const UnitCell& ucell, + const int& istep, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const K_Vectors& kv, + Plus_U &dftu, // mohan add 20251107 + hamilt::Hamilt* p_ham, +#ifdef __EXX + const std::vector>>>* Hexxd, + const std::vector>>>>* Hexxc, +#endif + const std::string& SR_filename, + const std::string& HR_filename_up, + const std::string HR_filename_down, + const bool& binary, + const double& sparse_thr); + +template void ModuleIO::output_HSR>( + const UnitCell& ucell, + const int& istep, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const K_Vectors& kv, + Plus_U &dftu, // mohan add 20251107 + hamilt::Hamilt>* p_ham, +#ifdef __EXX + const std::vector>>>* Hexxd, + const std::vector>>>>* Hexxc, +#endif + const std::string& SR_filename, + const std::string& HR_filename_up, + const std::string HR_filename_down, + const bool& binary, + const double& sparse_thr); + +template void ModuleIO::output_SR(Parallel_Orbitals& pv, + const Grid_Driver& grid, + hamilt::Hamilt* p_ham, + const std::string& SR_filename, + const bool& binary, + const double& sparse_thr); +template void ModuleIO::output_SR>(Parallel_Orbitals& pv, + const Grid_Driver& grid, + hamilt::Hamilt>* p_ham, + const std::string& SR_filename, + const bool& binary, + const double& sparse_thr); diff --git a/source/source_io/module_hs/write_HS_R.h b/source/source_io/module_hs/write_HS_R.h new file mode 100644 index 0000000000..fcd2dd1172 --- /dev/null +++ b/source/source_io/module_hs/write_HS_R.h @@ -0,0 +1,81 @@ +#ifndef WRITE_HS_R_H +#define WRITE_HS_R_H + +#include "source_base/matrix.h" +#include "source_basis/module_nao/two_center_bundle.h" +#include "source_cell/klist.h" +#include "source_hamilt/hamilt.h" +#include "source_lcao/LCAO_HS_arrays.hpp" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 + +#ifdef __EXX +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info +#include "RI/global/Tensor.h" // for RI::Tensor +#endif + +namespace ModuleIO +{ +using TAC = std::pair>; +template +void output_HSR(const UnitCell& ucell, + const int& istep, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, // mohan add 2024-04-06 + const K_Vectors& kv, + Plus_U &dftu, // mohan add 20251107 + hamilt::Hamilt* p_ham, +#ifdef __EXX + const std::vector>>>* Hexxd = nullptr, + const std::vector>>>>* Hexxc = nullptr, +#endif + const std::string& SR_filename = "srs1_nao.csr", + const std::string& HR_filename_up = "hrs1_nao.csr", + const std::string HR_filename_down = "hrs2_nao.csr", + const bool& binary = false, + const double& sparse_threshold = 1e-10); // LiuXh add 2019-07-15, modify in 2021-12-3 + +void output_dHR(const int& istep, + const ModuleBase::matrix& v_eff, + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, // mohan add 2024-04-06 + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const K_Vectors& kv, + const bool& binary = false, + const double& sparse_threshold = 1e-10); + +void output_dSR(const int& istep, + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, // mohan add 2024-04-06 + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const K_Vectors& kv, + const bool& binary = false, + const double& sparse_thr = 1e-10); + +void output_TR(const int istep, + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const std::string& TR_filename = "trs1_nao.csr", + const bool& binary = false, + const double& sparse_threshold = 1e-10); + +template +void output_SR(Parallel_Orbitals& pv, + const Grid_Driver& grid, + hamilt::Hamilt* p_ham, + const std::string& SR_filename = "srs1_nao.csr", + const bool& binary = false, + const double& sparse_threshold = 1e-10); +} // namespace ModuleIO + +#endif diff --git a/source/source_io/write_HS_sparse.cpp b/source/source_io/module_hs/write_HS_sparse.cpp similarity index 99% rename from source/source_io/write_HS_sparse.cpp rename to source/source_io/module_hs/write_HS_sparse.cpp index 505933ad0d..382ece5a03 100644 --- a/source/source_io/write_HS_sparse.cpp +++ b/source/source_io/module_hs/write_HS_sparse.cpp @@ -4,7 +4,6 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_lcao/module_rt/td_info.h" -#include "source_pw/module_pwdft/global.h" #include "single_R_io.h" void ModuleIO::save_HSR_sparse(const int& istep, @@ -716,7 +715,7 @@ void ModuleIO::save_sparse( ModuleBase::timer::tick("ModuleIO", "save_sparse"); int total_R_num = all_R_coor.size(); - std::vector nonzero_num(total_R_num, 0); + std::vector nonzero_num(total_R_num, 0); int count = 0; for (auto& R_coor: all_R_coor) { auto iter = smat.find(R_coor); diff --git a/source/source_io/write_HS_sparse.h b/source/source_io/module_hs/write_HS_sparse.h similarity index 100% rename from source/source_io/write_HS_sparse.h rename to source/source_io/module_hs/write_HS_sparse.h diff --git a/source/source_io/write_vxc.hpp b/source/source_io/module_hs/write_vxc.hpp similarity index 98% rename from source/source_io/write_vxc.hpp rename to source/source_io/module_hs/write_vxc.hpp index ad503265c0..52e70e2514 100644 --- a/source/source_io/write_vxc.hpp +++ b/source/source_io/module_hs/write_vxc.hpp @@ -7,8 +7,8 @@ #include "source_lcao/module_operator_lcao/op_dftu_lcao.h" #include "source_lcao/module_operator_lcao/veff_lcao.h" #include "source_psi/psi.h" -#include "source_io/write_HS.h" -#include "source_io/filename.h" // use filename_output function +#include "source_io/module_hs/write_HS.h" +#include "source_io/module_output/filename.h" // use filename_output function namespace ModuleIO { @@ -203,7 +203,7 @@ void write_Vxc(const int nspin, &vxcs_R_ao[0],ucell,/*for paraV*/ kv, Hexxd, Hexxc, hamilt::Add_Hexx_Type::k); std::vector> e_orb_exx; // orbital energy (EXX) #endif - hamilt::OperatorDFTU> vdftu_op_ao(&vxc_k_ao, kv.kvec_d, nullptr, kv.isk); + hamilt::OperatorDFTU> vdftu_op_ao(&vxc_k_ao, kv.kvec_d, nullptr, nullptr, kv.isk); // 4. calculate and write the MO-matrix Exc Parallel_2D p2d; diff --git a/source/source_io/write_vxc_lip.hpp b/source/source_io/module_hs/write_vxc_lip.hpp similarity index 98% rename from source/source_io/write_vxc_lip.hpp rename to source/source_io/module_hs/write_vxc_lip.hpp index 3705993022..30a7e043d0 100644 --- a/source/source_io/write_vxc_lip.hpp +++ b/source/source_io/module_hs/write_vxc_lip.hpp @@ -3,13 +3,13 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/parallel_reduce.h" #include "source_base/module_container/base/third_party/blas.h" -#include "source_pw/module_pwdft/operator_pw/veff_pw.h" +#include "source_pw/module_pwdft/op_pw_veff.h" #include "source_psi/psi.h" #include "source_cell/unitcell.h" #include "source_cell/klist.h" #include "source_estate/module_pot/potential_new.h" -#include "source_io/write_HS.h" -#include "source_io/filename.h" // use filename_output function +#include "source_io/module_hs/write_HS.h" +#include "source_io/module_output/filename.h" // use filename_output function #include namespace ModuleIO diff --git a/source/source_io/module_hs/write_vxc_r.hpp b/source/source_io/module_hs/write_vxc_r.hpp new file mode 100644 index 0000000000..04c01d80ca --- /dev/null +++ b/source/source_io/module_hs/write_vxc_r.hpp @@ -0,0 +1,161 @@ +#ifndef __WRITE_VXC_R_H_ +#define __WRITE_VXC_R_H_ +#include "source_io/module_parameter/parameter.h" +#include "source_io/module_hs/write_HS_sparse.h" +#include "source_lcao/module_operator_lcao/op_dftu_lcao.h" +#include "source_lcao/module_operator_lcao/veff_lcao.h" +#include "source_lcao/spar_hsr.h" +#ifdef __EXX +#include "source_lcao/module_operator_lcao/op_exx_lcao.h" +#include "source_lcao/module_ri/RI_2D_Comm.h" +#endif + +namespace ModuleIO +{ +template +std::set> get_R_range(const hamilt::HContainer& hR) +{ + std::set> all_R_coor; + + return all_R_coor; +} + +template +std::map, std::map>> cal_HR_sparse(const hamilt::HContainer& hR, + const double sparse_thr) +{ + std::map, std::map>> target; + sparse_format::cal_HContainer(*hR.get_paraV(), sparse_thr, hR, target); + return target; +} + +/// @brief write the Vxc matrix in KS orbital representation, usefull for GW calculation +/// including terms: local/semi-local XC, EXX, DFTU +template +void write_Vxc_R(const int nspin, + const Parallel_Orbitals* pv, + const UnitCell& ucell, + Structure_Factor& sf, + surchem& solvent, + const ModulePW::PW_Basis& rho_basis, + const ModulePW::PW_Basis& rhod_basis, + const ModuleBase::matrix& vloc, + const Charge& chg, + const K_Vectors& kv, + const std::vector& orb_cutoff, + Grid_Driver& gd, +#ifdef __EXX + const std::vector>>>* const Hexxd, + const std::vector>>>>* const Hexxc, +#endif + const double sparse_thr = 1e-10) +{ + ModuleBase::TITLE("ModuleIO", "write_Vxc_R"); + // 1. real-space xc potential + // ModuleBase::matrix vr_xc(nspin, chg.nrxx); + double etxc = 0.0; + double vtxc = 0.0; + // elecstate::PotXC* potxc(&rho_basis, &etxc, vtxc, nullptr); + // potxc.cal_v_eff(&chg, &ucell, vr_xc); + elecstate::Potential* potxc + = new elecstate::Potential(&rhod_basis, &rho_basis, &ucell, &vloc, &sf, &solvent, &etxc, &vtxc); + std::vector compnents_list = {"xc"}; + potxc->pot_register(compnents_list); + potxc->update_from_charge(&chg, &ucell); + + // 2. allocate H(R) + // (the number of hR: 1 for nspin=1, 4; 2 for nspin=2) + int nspin0 = (nspin == 2) ? 2 : 1; + std::vector> vxcs_R_ao(nspin0, hamilt::HContainer(ucell, pv)); // call move constructor +#ifdef __EXX + std::array Rs_period = {kv.nmp[0], kv.nmp[1], kv.nmp[2]}; + const auto cell_nearest = hamilt::init_cell_nearest(ucell, Rs_period); +#endif + for (int is = 0; is < nspin0; ++is) + { + if (std::is_same::value) + { + vxcs_R_ao[is].fix_gamma(); + } +#ifdef __EXX + if (GlobalC::exx_info.info_global.cal_exx) + { + GlobalC::exx_info.info_ri.real_number + ? hamilt::reallocate_hcontainer(*Hexxd, &vxcs_R_ao[is], &cell_nearest) + : hamilt::reallocate_hcontainer(*Hexxc, &vxcs_R_ao[is], &cell_nearest); + } +#endif + } + + // 3. calculate the Vxc(R) + hamilt::HS_Matrix_K vxc_k_ao(pv, 1); // only hk is needed, sk is skipped + std::vector>*> vxcs_op_ao(nspin0); + for (int is = 0; is < nspin0; ++is) + { + vxcs_op_ao[is] = new hamilt::Veff>(&vxc_k_ao, + kv.kvec_d, + potxc, + &vxcs_R_ao[is], + &ucell, + orb_cutoff, + &gd, + nspin); + vxcs_op_ao[is]->contributeHR(); +#ifdef __EXX + if (GlobalC::exx_info.info_global.cal_exx) + { + GlobalC::exx_info.info_ri.real_number ? RI_2D_Comm::add_HexxR(is, + GlobalC::exx_info.info_global.hybrid_alpha, + *Hexxd, + *pv, + ucell.get_npol(), + vxcs_R_ao[is], + &cell_nearest) + : RI_2D_Comm::add_HexxR(is, + GlobalC::exx_info.info_global.hybrid_alpha, + *Hexxc, + *pv, + ucell.get_npol(), + vxcs_R_ao[is], + &cell_nearest); + } +#endif + } + + // test: fold Vxc(R) and check whether it is equal to Vxc(k) + // for (int ik = 0; ik < kv.get_nks(); ++ik) + // { + // vxc_k_ao.set_zero_hk(); + // dynamic_cast*>(vxcs_op_ao[kv.isk[ik]])->contributeHk(ik); + + // // output Vxc(k) (test) + // const TK* const hk = vxc_k_ao.get_hk(); + // std::cout << "ik=" << ik << ", Vxc(K): " << std::endl; + // for (int i = 0; i < pv->get_row_size(); i++) + // { + // for (int j = 0; j < pv->get_col_size(); j++) + // { + // std::cout << hk[j * pv->get_row_size() + i] << " "; + // } + // std::cout << std::endl; + // } + // } + + // 4. write Vxc(R) in csr format + for (int is = 0; is < nspin0; ++is) + { + std::set> all_R_coor = sparse_format::get_R_range(vxcs_R_ao[is]); + const std::string filename = "Vxc_R_spin" + std::to_string(is); + ModuleIO::save_sparse(cal_HR_sparse(vxcs_R_ao[is], sparse_thr), + all_R_coor, + sparse_thr, + false, // binary + PARAM.globalv.global_out_dir + filename + ".csr", + *pv, + filename, + -1, + true); // all-reduce + } +} +} // namespace ModuleIO +#endif diff --git a/source/source_io/json_output/CMakeLists.txt b/source/source_io/module_json/CMakeLists.txt similarity index 100% rename from source/source_io/json_output/CMakeLists.txt rename to source/source_io/module_json/CMakeLists.txt diff --git a/source/source_io/json_output/abacusjson.cpp b/source/source_io/module_json/abacusjson.cpp similarity index 100% rename from source/source_io/json_output/abacusjson.cpp rename to source/source_io/module_json/abacusjson.cpp diff --git a/source/source_io/json_output/abacusjson.h b/source/source_io/module_json/abacusjson.h similarity index 100% rename from source/source_io/json_output/abacusjson.h rename to source/source_io/module_json/abacusjson.h diff --git a/source/source_io/json_output/general_info.cpp b/source/source_io/module_json/general_info.cpp similarity index 98% rename from source/source_io/json_output/general_info.cpp rename to source/source_io/module_json/general_info.cpp index c57a9c5746..8b45c0f192 100644 --- a/source/source_io/json_output/general_info.cpp +++ b/source/source_io/module_json/general_info.cpp @@ -1,6 +1,6 @@ #include "general_info.h" -#include "../para_json.h" +#include "para_json.h" #include "abacusjson.h" #include "source_base/parallel_global.h" #include "source_main/version.h" @@ -68,4 +68,4 @@ void gen_general_info(const Parameter& param) // AbacusJson::add_Json(end_time_str,false,"general_info", "end_time"); } #endif -} // namespace Json \ No newline at end of file +} // namespace Json diff --git a/source/source_io/json_output/general_info.h b/source/source_io/module_json/general_info.h similarity index 100% rename from source/source_io/json_output/general_info.h rename to source/source_io/module_json/general_info.h diff --git a/source/source_io/json_output/init_info.cpp b/source/source_io/module_json/init_info.cpp similarity index 99% rename from source/source_io/json_output/init_info.cpp rename to source/source_io/module_json/init_info.cpp index 2bcc479659..647df761bb 100644 --- a/source/source_io/json_output/init_info.cpp +++ b/source/source_io/module_json/init_info.cpp @@ -1,7 +1,7 @@ #include "init_info.h" #include "source_io/module_parameter/parameter.h" -#include "../para_json.h" +#include "para_json.h" #include "abacusjson.h" // Add json objects to init @@ -149,4 +149,4 @@ void gen_stru(UnitCell* ucell) } #endif -} // namespace Json \ No newline at end of file +} // namespace Json diff --git a/source/source_io/json_output/init_info.h b/source/source_io/module_json/init_info.h similarity index 100% rename from source/source_io/json_output/init_info.h rename to source/source_io/module_json/init_info.h diff --git a/source/source_io/json_output/json_node.h b/source/source_io/module_json/json_node.h similarity index 100% rename from source/source_io/json_output/json_node.h rename to source/source_io/module_json/json_node.h diff --git a/source/source_io/json_output/output_info.cpp b/source/source_io/module_json/output_info.cpp similarity index 99% rename from source/source_io/json_output/output_info.cpp rename to source/source_io/module_json/output_info.cpp index 4cc9add9de..0789bf67f5 100644 --- a/source/source_io/json_output/output_info.cpp +++ b/source/source_io/module_json/output_info.cpp @@ -1,5 +1,5 @@ #include "output_info.h" -#include "../para_json.h" +#include "para_json.h" #include "source_io/module_parameter/parameter.h" #include "abacusjson.h" @@ -162,4 +162,4 @@ namespace Json } #endif -} // namespace Json \ No newline at end of file +} // namespace Json diff --git a/source/source_io/json_output/output_info.h b/source/source_io/module_json/output_info.h similarity index 100% rename from source/source_io/json_output/output_info.h rename to source/source_io/module_json/output_info.h diff --git a/source/source_io/para_json.cpp b/source/source_io/module_json/para_json.cpp similarity index 88% rename from source/source_io/para_json.cpp rename to source/source_io/module_json/para_json.cpp index 526567429e..f5cdf7be81 100644 --- a/source/source_io/para_json.cpp +++ b/source/source_io/module_json/para_json.cpp @@ -1,18 +1,14 @@ - #include "para_json.h" - #include "source_base/global_variable.h" - #include #include #include #include #ifdef __RAPIDJSON -#include "json_output/abacusjson.h" -#include "json_output/general_info.h" -#include "json_output/init_info.h" -#include "json_output/readin_info.h" - +#include "abacusjson.h" +#include "general_info.h" +#include "init_info.h" +#include "readin_info.h" #endif // __RAPIDJSON namespace Json diff --git a/source/source_io/para_json.h b/source/source_io/module_json/para_json.h similarity index 100% rename from source/source_io/para_json.h rename to source/source_io/module_json/para_json.h diff --git a/source/source_io/json_output/readin_info.cpp b/source/source_io/module_json/readin_info.cpp similarity index 70% rename from source/source_io/json_output/readin_info.cpp rename to source/source_io/module_json/readin_info.cpp index 88e400026d..a150967af8 100644 --- a/source/source_io/json_output/readin_info.cpp +++ b/source/source_io/module_json/readin_info.cpp @@ -1,16 +1,11 @@ #include "readin_info.h" -#include "../para_json.h" +#include "para_json.h" #include "abacusjson.h" - //Add json objects to init namespace Json { #ifdef __RAPIDJSON - - - - #endif -} // namespace Json \ No newline at end of file +} // namespace Json diff --git a/source/source_io/json_output/readin_info.h b/source/source_io/module_json/readin_info.h similarity index 100% rename from source/source_io/json_output/readin_info.h rename to source/source_io/module_json/readin_info.h diff --git a/source/source_io/json_output/test/CMakeLists.txt b/source/source_io/module_json/test/CMakeLists.txt similarity index 80% rename from source/source_io/json_output/test/CMakeLists.txt rename to source/source_io/module_json/test/CMakeLists.txt index 51bf466cc5..288009206e 100644 --- a/source/source_io/json_output/test/CMakeLists.txt +++ b/source/source_io/module_json/test/CMakeLists.txt @@ -7,5 +7,5 @@ AddTest( TARGET MODULE_IO_JSON_OUTPUT_TEST LIBS parameter ${math_libs} base device cell_info SOURCES para_json_test.cpp ../general_info.cpp ../init_info.cpp ../readin_info.cpp - ../../para_json.cpp ../abacusjson.cpp ../../output.cpp -) \ No newline at end of file + ../para_json.cpp ../abacusjson.cpp ../../module_output/output.cpp +) diff --git a/source/source_io/json_output/test/para_json_test.cpp b/source/source_io/module_json/test/para_json_test.cpp similarity index 98% rename from source/source_io/json_output/test/para_json_test.cpp rename to source/source_io/module_json/test/para_json_test.cpp index 94a1e5e5dd..1b6a5b71d2 100644 --- a/source/source_io/json_output/test/para_json_test.cpp +++ b/source/source_io/module_json/test/para_json_test.cpp @@ -1,12 +1,13 @@ #include "gtest/gtest.h" + #define private public #define __RAPIDJSON 1 -#include "../abacusjson.h" -#include "../general_info.h" -#include "../init_info.h" -#include "../readin_info.h" +#include "source_io/module_json/abacusjson.h" +#include "source_io/module_json/general_info.h" +#include "source_io/module_json/init_info.h" +#include "source_io/module_json/readin_info.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/para_json.h" +#include "source_io/module_json/para_json.h" #include "source_main/version.h" #undef private /************************************************ diff --git a/source/source_io/cal_mlkedf_descriptors.cpp b/source/source_io/module_ml/cal_mlkedf_descriptors.cpp similarity index 92% rename from source/source_io/cal_mlkedf_descriptors.cpp rename to source/source_io/module_ml/cal_mlkedf_descriptors.cpp index 58e3f8f259..7e88cddfde 100644 --- a/source/source_io/cal_mlkedf_descriptors.cpp +++ b/source/source_io/module_ml/cal_mlkedf_descriptors.cpp @@ -19,7 +19,7 @@ void Cal_MLKEDF_Descriptors::set_para( const std::vector &yukawa_alpha, const std::vector &kernel_file, const double &omega, - ModulePW::PW_Basis *pw_rho + const ModulePW::PW_Basis *pw_rho ) { this->nx = nx; @@ -129,7 +129,7 @@ double Cal_MLKEDF_Descriptors::MLkernel_yukawa(double eta, double alpha) } // Read kernel from file -void Cal_MLKEDF_Descriptors::read_kernel(const std::string &fileName, const double& scaling, ModulePW::PW_Basis *pw_rho, double* kernel_) +void Cal_MLKEDF_Descriptors::read_kernel(const std::string &fileName, const double& scaling, const ModulePW::PW_Basis *pw_rho, double* kernel_) { std::ifstream ifs(fileName.c_str(), std::ios::in); @@ -203,7 +203,7 @@ void Cal_MLKEDF_Descriptors::read_kernel(const std::string &fileName, const doub ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "FILL WT KERNEL"); } -void Cal_MLKEDF_Descriptors::multiKernel(const int ikernel, double *pinput, ModulePW::PW_Basis *pw_rho, double *routput) +void Cal_MLKEDF_Descriptors::multiKernel(const int ikernel, double *pinput, const ModulePW::PW_Basis *pw_rho, double *routput) { std::complex *recipOutput = new std::complex[pw_rho->npw]; @@ -217,7 +217,7 @@ void Cal_MLKEDF_Descriptors::multiKernel(const int ikernel, double *pinput, Modu delete[] recipOutput; } -void Cal_MLKEDF_Descriptors::Laplacian(double * pinput, ModulePW::PW_Basis *pw_rho, double * routput) +void Cal_MLKEDF_Descriptors::Laplacian(double * pinput, const ModulePW::PW_Basis *pw_rho, double * routput) { std::complex *recipContainer = new std::complex[pw_rho->npw]; @@ -231,7 +231,7 @@ void Cal_MLKEDF_Descriptors::Laplacian(double * pinput, ModulePW::PW_Basis *pw_r delete[] recipContainer; } -void Cal_MLKEDF_Descriptors::divergence(double ** pinput, ModulePW::PW_Basis *pw_rho, double * routput) +void Cal_MLKEDF_Descriptors::divergence(double ** pinput, const ModulePW::PW_Basis *pw_rho, double * routput) { std::complex *recipContainer = new std::complex[pw_rho->npw]; std::complex img(0.0, 1.0); @@ -270,7 +270,7 @@ void Cal_MLKEDF_Descriptors::getGamma(const double * const *prho, std::vector> &pnablaRho, std::vector &rp) +void Cal_MLKEDF_Descriptors::getP(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector> &pnablaRho, std::vector &rp) { for(int ir = 0; ir < this->nx; ++ir) { @@ -283,7 +283,7 @@ void Cal_MLKEDF_Descriptors::getP(const double * const *prho, ModulePW::PW_Basis } } -void Cal_MLKEDF_Descriptors::getQ(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rq) +void Cal_MLKEDF_Descriptors::getQ(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector &rq) { // get Laplacian rho std::complex *recipRho = new std::complex[pw_rho->npw]; @@ -302,17 +302,17 @@ void Cal_MLKEDF_Descriptors::getQ(const double * const *prho, ModulePW::PW_Basis delete[] recipRho; } -void Cal_MLKEDF_Descriptors::getGammanl(const int ikernel, std::vector &pgamma, ModulePW::PW_Basis *pw_rho, std::vector &rgammanl) +void Cal_MLKEDF_Descriptors::getGammanl(const int ikernel, std::vector &pgamma, const ModulePW::PW_Basis *pw_rho, std::vector &rgammanl) { this->multiKernel(ikernel, pgamma.data(), pw_rho, rgammanl.data()); } -void Cal_MLKEDF_Descriptors::getPnl(const int ikernel, std::vector &pp, ModulePW::PW_Basis *pw_rho, std::vector &rpnl) +void Cal_MLKEDF_Descriptors::getPnl(const int ikernel, std::vector &pp, const ModulePW::PW_Basis *pw_rho, std::vector &rpnl) { this->multiKernel(ikernel, pp.data(), pw_rho, rpnl.data()); } -void Cal_MLKEDF_Descriptors::getQnl(const int ikernel, std::vector &pq, ModulePW::PW_Basis *pw_rho, std::vector &rqnl) +void Cal_MLKEDF_Descriptors::getQnl(const int ikernel, std::vector &pq, const ModulePW::PW_Basis *pw_rho, std::vector &rqnl) { this->multiKernel(ikernel, pq.data(), pw_rho, rqnl.data()); } @@ -376,19 +376,19 @@ void Cal_MLKEDF_Descriptors::getTanh_Qnl(const int ikernel, std::vector } // tanh(p)_nl -void Cal_MLKEDF_Descriptors::getTanhP_nl(const int ikernel, std::vector &ptanhp, ModulePW::PW_Basis *pw_rho, std::vector &rtanhp_nl) +void Cal_MLKEDF_Descriptors::getTanhP_nl(const int ikernel, std::vector &ptanhp, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhp_nl) { this->multiKernel(ikernel, ptanhp.data(), pw_rho, rtanhp_nl.data()); } // tanh(q)_nl -void Cal_MLKEDF_Descriptors::getTanhQ_nl(const int ikernel, std::vector &ptanhq, ModulePW::PW_Basis *pw_rho, std::vector &rtanhq_nl) +void Cal_MLKEDF_Descriptors::getTanhQ_nl(const int ikernel, std::vector &ptanhq, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhq_nl) { this->multiKernel(ikernel, ptanhq.data(), pw_rho, rtanhq_nl.data()); } // (tanhxi)_nl -void Cal_MLKEDF_Descriptors::getTanhXi_nl(const int ikernel, std::vector &ptanhxi, ModulePW::PW_Basis *pw_rho, std::vector &rtanhxi_nl) +void Cal_MLKEDF_Descriptors::getTanhXi_nl(const int ikernel, std::vector &ptanhxi, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhxi_nl) { this->multiKernel(ikernel, ptanhxi.data(), pw_rho, rtanhxi_nl.data()); } @@ -397,7 +397,7 @@ void Cal_MLKEDF_Descriptors::getF_KS( psi::Psi> *psi, elecstate::ElecState *pelec, ModulePW::PW_Basis_K *pw_psi, - ModulePW::PW_Basis *pw_rho, + const ModulePW::PW_Basis *pw_rho, UnitCell& ucell, const std::vector> &nablaRho, std::vector &rF, @@ -497,7 +497,7 @@ void Cal_MLKEDF_Descriptors::getF_KS( } } -void Cal_MLKEDF_Descriptors::getNablaRho(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector> &rnablaRho) +void Cal_MLKEDF_Descriptors::getNablaRho(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector> &rnablaRho) { std::complex *recipRho = new std::complex[pw_rho->npw]; std::complex *recipNablaRho = new std::complex[pw_rho->npw]; @@ -517,4 +517,4 @@ void Cal_MLKEDF_Descriptors::getNablaRho(const double * const *prho, ModulePW::P delete[] recipNablaRho; } -} \ No newline at end of file +} diff --git a/source/source_io/cal_mlkedf_descriptors.h b/source/source_io/module_ml/cal_mlkedf_descriptors.h similarity index 71% rename from source/source_io/cal_mlkedf_descriptors.h rename to source/source_io/module_ml/cal_mlkedf_descriptors.h index 00b2daa722..9c28763da5 100644 --- a/source/source_io/cal_mlkedf_descriptors.h +++ b/source/source_io/module_ml/cal_mlkedf_descriptors.h @@ -3,8 +3,11 @@ #include #include "source_base/global_function.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" +#include "source_basis/module_pw/pw_basis.h" +#include "source_cell/unitcell.h" +#include "source_psi/psi.h" +#include "source_estate/elecstate_pw.h" namespace ModuleIO { @@ -36,14 +39,14 @@ class Cal_MLKEDF_Descriptors const std::vector &yukawa_alpha, const std::vector &kernel_file, const double &omega, - ModulePW::PW_Basis *pw_rho); + const ModulePW::PW_Basis *pw_rho); // get input parameters void getGamma(const double * const *prho, std::vector &rgamma); - void getP(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector> &pnablaRho, std::vector &rp); - void getQ(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rq); - void getGammanl(const int ikernel, std::vector &pgamma, ModulePW::PW_Basis *pw_rho, std::vector &rgammanl); - void getPnl(const int ikernel, std::vector &pp, ModulePW::PW_Basis *pw_rho, std::vector &rpnl); - void getQnl(const int ikernel, std::vector &pq, ModulePW::PW_Basis *pw_rho, std::vector &rqnl); + void getP(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector> &pnablaRho, std::vector &rp); + void getQ(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector &rq); + void getGammanl(const int ikernel, std::vector &pgamma, const ModulePW::PW_Basis *pw_rho, std::vector &rgammanl); + void getPnl(const int ikernel, std::vector &pp, const ModulePW::PW_Basis *pw_rho, std::vector &rpnl); + void getQnl(const int ikernel, std::vector &pq, const ModulePW::PW_Basis *pw_rho, std::vector &rqnl); // new parameters 2023-02-03 void getXi(std::vector &pgamma, std::vector &pgammanl, std::vector &rxi); void getTanhXi(const int ikernel, std::vector &pgamma, std::vector &pgammanl, std::vector &rtanhxi); @@ -51,31 +54,31 @@ class Cal_MLKEDF_Descriptors void getTanhQ(std::vector &pq, std::vector &rtanhq); void getTanh_Pnl(const int ikernel, std::vector &ppnl, std::vector &rtanh_pnl); void getTanh_Qnl(const int ikernel, std::vector &pqnl, std::vector &rtanh_qnl); - void getTanhP_nl(const int ikernel, std::vector &ptanhp, ModulePW::PW_Basis *pw_rho, std::vector &rtanhp_nl); - void getTanhQ_nl(const int ikernel, std::vector &ptanhq, ModulePW::PW_Basis *pw_rho, std::vector &rtanhq_nl); + void getTanhP_nl(const int ikernel, std::vector &ptanhp, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhp_nl); + void getTanhQ_nl(const int ikernel, std::vector &ptanhq, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhq_nl); // 2023-03-20 - void getTanhXi_nl(const int ikernel, std::vector &ptanhxi, ModulePW::PW_Basis *pw_rho, std::vector &rtanhxi_nl); + void getTanhXi_nl(const int ikernel, std::vector &ptanhxi, const ModulePW::PW_Basis *pw_rho, std::vector &rtanhxi_nl); void getF_KS( psi::Psi> *psi, elecstate::ElecState *pelec, ModulePW::PW_Basis_K *pw_psi, - ModulePW::PW_Basis *pw_rho, + const ModulePW::PW_Basis *pw_rho, UnitCell& ucell, const std::vector> &nablaRho, std::vector &rF, std::vector &rpauli ); // get intermediate variables of V_Pauli - void getNablaRho(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector> &rnablaRho); + void getNablaRho(const double * const *prho, const ModulePW::PW_Basis *pw_rho, std::vector> &rnablaRho); // tools double MLkernel(double eta, double tf_weight, double vw_weight); double MLkernel_yukawa(double eta, double alpha); - void read_kernel(const std::string &fileName, const double& scaling, ModulePW::PW_Basis *pw_rho, double* kernel_); - void multiKernel(const int ikernel, double *pinput, ModulePW::PW_Basis *pw_rho, double *routput); - void Laplacian(double * pinput, ModulePW::PW_Basis *pw_rho, double * routput); - void divergence(double ** pinput, ModulePW::PW_Basis *pw_rho, double * routput); + void read_kernel(const std::string &fileName, const double& scaling, const ModulePW::PW_Basis *pw_rho, double* kernel_); + void multiKernel(const int ikernel, double *pinput, const ModulePW::PW_Basis *pw_rho, double *routput); + void Laplacian(double * pinput, const ModulePW::PW_Basis *pw_rho, double * routput); + void divergence(double ** pinput, const ModulePW::PW_Basis *pw_rho, double * routput); void tanh(std::vector &pinput, std::vector &routput, double chi=1.); double dtanh(double tanhx, double chi=1.); @@ -106,4 +109,4 @@ class Cal_MLKEDF_Descriptors } // namespace ModuleIO -#endif \ No newline at end of file +#endif diff --git a/source/source_io/io_npz.cpp b/source/source_io/module_ml/io_npz.cpp similarity index 100% rename from source/source_io/io_npz.cpp rename to source/source_io/module_ml/io_npz.cpp diff --git a/source/source_io/io_npz.h b/source/source_io/module_ml/io_npz.h similarity index 100% rename from source/source_io/io_npz.h rename to source/source_io/module_ml/io_npz.h diff --git a/source/source_io/write_mlkedf_descriptors.cpp b/source/source_io/module_ml/write_mlkedf_descriptors.cpp similarity index 100% rename from source/source_io/write_mlkedf_descriptors.cpp rename to source/source_io/module_ml/write_mlkedf_descriptors.cpp diff --git a/source/source_io/write_mlkedf_descriptors.h b/source/source_io/module_ml/write_mlkedf_descriptors.h similarity index 97% rename from source/source_io/write_mlkedf_descriptors.h rename to source/source_io/module_ml/write_mlkedf_descriptors.h index 5ff1fa2d5d..801fc40143 100644 --- a/source/source_io/write_mlkedf_descriptors.h +++ b/source/source_io/module_ml/write_mlkedf_descriptors.h @@ -3,7 +3,7 @@ #ifdef __MLALGO -#include "source_io/cal_mlkedf_descriptors.h" +#include "cal_mlkedf_descriptors.h" #include "source_estate/elecstate_pw.h" namespace ModuleIO diff --git a/source/source_io/output_dmk.cpp b/source/source_io/module_mulliken/output_dmk.cpp similarity index 89% rename from source/source_io/output_dmk.cpp rename to source/source_io/module_mulliken/output_dmk.cpp index e4b78d3098..c7a5e414d1 100644 --- a/source/source_io/output_dmk.cpp +++ b/source/source_io/module_mulliken/output_dmk.cpp @@ -1,4 +1,4 @@ -#include "source_io/output_dmk.h" +#include "source_io/module_mulliken/output_dmk.h" namespace ModuleIO { diff --git a/source/source_io/output_dmk.h b/source/source_io/module_mulliken/output_dmk.h similarity index 100% rename from source/source_io/output_dmk.h rename to source/source_io/module_mulliken/output_dmk.h diff --git a/source/source_io/output_mulliken.cpp b/source/source_io/module_mulliken/output_mulliken.cpp similarity index 97% rename from source/source_io/output_mulliken.cpp rename to source/source_io/module_mulliken/output_mulliken.cpp index f5d0c47f65..3acba7bc51 100644 --- a/source/source_io/output_mulliken.cpp +++ b/source/source_io/module_mulliken/output_mulliken.cpp @@ -1,5 +1,4 @@ -#include "source_io/output_mulliken.h" - +#include "source_io/module_mulliken/output_mulliken.h" #include "source_io/module_parameter/parameter.h" #include "source_base/formatter.h" #include "source_base/name_angular.h" @@ -547,24 +546,24 @@ void Output_Mulliken>::cal_orbMulP() const char N_char = 'N'; const int one_int = 1; const std::complex one_float = {1.0, 0.0}, zero_float = {0.0, 0.0}; - pzgemm_(&N_char, - &T_char, - &nw, - &nw, - &nw, - &one_float, + ScalapackConnector::gemm(N_char, + T_char, + nw, + nw, + nw, + one_float, p_DMk, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc, p_Sk, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc, - &zero_float, + zero_float, mud.c, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc); this->collect_MW(MecMulP, mud, nw, this->isk_[ik]); #endif @@ -597,24 +596,24 @@ void Output_Mulliken::cal_orbMulP() const char N_char = 'N'; const int one_int = 1; const double one_float = 1.0, zero_float = 0.0; - pdgemm_(&N_char, - &T_char, - &nw, - &nw, - &nw, - &one_float, + ScalapackConnector::gemm(N_char, + T_char, + nw, + nw, + nw, + one_float, p_DMk, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc, p_Sk, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc, - &zero_float, + zero_float, mud.c, - &one_int, - &one_int, + one_int, + one_int, this->ParaV_->desc); if (this->nspin_ == 1 || this->nspin_ == 2) { diff --git a/source/source_io/output_mulliken.h b/source/source_io/module_mulliken/output_mulliken.h similarity index 91% rename from source/source_io/output_mulliken.h rename to source/source_io/module_mulliken/output_mulliken.h index e20cea9e04..5fc1fd7f7c 100644 --- a/source/source_io/output_mulliken.h +++ b/source/source_io/module_mulliken/output_mulliken.h @@ -5,10 +5,11 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/cell_index.h" #include "source_estate/elecstate_lcao.h" -#include "source_io/output_dmk.h" -#include "source_io/output_sk.h" +#include "source_io/module_mulliken/output_dmk.h" +#include "source_io/module_mulliken/output_sk.h" #include "source_base/formatter.h" #include "source_lcao/module_operator_lcao/dspin_lcao.h" +#include "source_estate/module_dm/density_matrix.h" // mohan add 2025-11-04 #include #include @@ -89,7 +90,7 @@ template void cal_mag(Parallel_Orbitals* pv, hamilt::Hamilt* p_ham, K_Vectors& kv, - elecstate::ElecState* pelec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 const TwoCenterBundle& two_center_bundle, const LCAO_Orbitals& orb, UnitCell& ucell, @@ -103,10 +104,7 @@ void cal_mag(Parallel_Orbitals* pv, auto cell_index = CellIndex(ucell.get_atomLabels(), ucell.get_atomCounts(), ucell.get_lnchiCounts(), PARAM.inp.nspin); auto out_s_k = ModuleIO::Output_Sk(p_ham, pv, PARAM.inp.nspin, kv.get_nks()); - auto out_dm_k = ModuleIO::Output_DMK(dynamic_cast*>(pelec)->get_DM(), - pv, - PARAM.inp.nspin, - kv.get_nks()); + auto out_dm_k = ModuleIO::Output_DMK(dm, pv, PARAM.inp.nspin, kv.get_nks()); auto mulp = ModuleIO::Output_Mulliken(&(out_s_k), &(out_dm_k), pv, &cell_index, kv.isk, PARAM.inp.nspin); auto atom_chg = mulp.get_atom_chg(); @@ -127,8 +125,7 @@ void cal_mag(Parallel_Orbitals* pv, { std::vector> atom_mag(ucell.nat, std::vector(PARAM.inp.nspin, 0.0)); std::vector> constrain(ucell.nat, ModuleBase::Vector3(1, 1, 1)); - const hamilt::HContainer* dmr - = dynamic_cast*>(pelec)->get_DM()->get_DMR_pointer(1); + const hamilt::HContainer* dmr = dm->get_DMR_pointer(1); std::vector moments; std::vector mag_x(ucell.nat, 0.0); std::vector mag_y(ucell.nat, 0.0); @@ -144,9 +141,9 @@ void cal_mag(Parallel_Orbitals* pv, &gd, two_center_bundle.overlap_orb_onsite.get(), orb.cutoffs()); - dynamic_cast*>(pelec)->get_DM()->switch_dmr(2); + dm->switch_dmr(2); moments = sc_lambda->cal_moment(dmr, constrain); - dynamic_cast*>(pelec)->get_DM()->switch_dmr(0); + dm->switch_dmr(0); delete sc_lambda; //const std::vector title = {"Total Magnetism (uB)", ""}; //const std::vector fmts = {"%-26s", "%20.10f"}; diff --git a/source/source_io/output_sk.cpp b/source/source_io/module_mulliken/output_sk.cpp similarity index 100% rename from source/source_io/output_sk.cpp rename to source/source_io/module_mulliken/output_sk.cpp diff --git a/source/source_io/output_sk.h b/source/source_io/module_mulliken/output_sk.h similarity index 100% rename from source/source_io/output_sk.h rename to source/source_io/module_mulliken/output_sk.h diff --git a/source/source_io/binstream.cpp b/source/source_io/module_output/binstream.cpp similarity index 100% rename from source/source_io/binstream.cpp rename to source/source_io/module_output/binstream.cpp diff --git a/source/source_io/binstream.h b/source/source_io/module_output/binstream.h similarity index 100% rename from source/source_io/binstream.h rename to source/source_io/module_output/binstream.h diff --git a/source/source_io/cal_test.cpp b/source/source_io/module_output/cal_test.cpp similarity index 96% rename from source/source_io/cal_test.cpp rename to source/source_io/module_output/cal_test.cpp index 98d32a3942..d162bb7137 100644 --- a/source/source_io/cal_test.cpp +++ b/source/source_io/module_output/cal_test.cpp @@ -1,4 +1,3 @@ -#include "source_pw/module_pwdft/global.h" #include "source_base/global_function.h" #define private public #include "source_io/module_parameter/parameter.h" @@ -61,12 +60,6 @@ void Cal_Test::test_memory(const int nat, const int ngmw = Cal_Test::cal_np(GGT,wfcpw->ggecut, rhopw->nx, rhopw->ny, rhopw->nz); const int ngmc = Cal_Test::cal_np(GGT,rhopw->ggecut, rhopw->nx, rhopw->ny, rhopw->nz); -// const int ecut_wfc = INPUT.ecutwfc; -// const int ecut_chg = INPUT.ecutrho; - -// const int ngmw = Cal_Test::cal_np(ecut_wfc, rhopw->nx, rhopw->ny, rhopw->nz); -// const int ngmc = Cal_Test::cal_np(ecut_chg, rhopw->nx, rhopw->ny, rhopw->nz); - std::cout << " number of atoms = " << nat << std::endl; std::cout << " plane wave number for wave functions = " << ngmw << std::endl; std::cout << " plane wave number for chage density = " << ngmc << std::endl; diff --git a/source/source_io/cal_test.h b/source/source_io/module_output/cal_test.h similarity index 100% rename from source/source_io/cal_test.h rename to source/source_io/module_output/cal_test.h diff --git a/source/source_io/cif_io.cpp b/source/source_io/module_output/cif_io.cpp similarity index 99% rename from source/source_io/cif_io.cpp rename to source/source_io/module_output/cif_io.cpp index c06ecb7033..4b9a0e0fea 100644 --- a/source/source_io/cif_io.cpp +++ b/source/source_io/module_output/cif_io.cpp @@ -3,7 +3,7 @@ #include #include #include "source_base/formatter.h" -#include "source_io/cif_io.h" +#include "cif_io.h" #include #include #include "source_base/tool_quit.h" @@ -238,7 +238,7 @@ void bcast_cifmap(std::map>& map, // the m const int rank = 0) // source rank: from which rank to broadcast { #ifdef __MPI - int myrank; + int myrank = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myrank); // use Parallel_Common namespace bcast_int and bcast_string to broadcast the size of map and key, value pairs int size = map.size(); @@ -328,7 +328,7 @@ void ModuleIO::CifParser::write(const std::string& fcif, const std::string& cell_formula_units_z) { #ifdef __MPI // well...very simple... - int myrank; + int myrank = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myrank); if (myrank != rank) // if present rank is not the rank assigned to write the cif file, then return { @@ -402,7 +402,7 @@ void ModuleIO::CifParser::write(const std::string& fcif, const std::string& cell_formula_units_z) { #ifdef __MPI - int myrank; + int myrank = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myrank); if (myrank != rank) // if present rank is not the rank assigned to write the cif file, then return { @@ -429,7 +429,7 @@ void ModuleIO::CifParser::write(const std::string& fcif, const int rank) { #ifdef __MPI - int myrank; + int myrank = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myrank); if (myrank != rank) // if present rank is not the rank assigned to write the cif file, then return { @@ -437,7 +437,7 @@ void ModuleIO::CifParser::write(const std::string& fcif, } #endif std::vector veca, vecb, vecc; - int natom; + int natom = 0; std::vector atom_site_labels; std::vector atom_site_fract_coords; _unpack_ucell(ucell, veca, vecb, vecc, natom, atom_site_labels, atom_site_fract_coords); @@ -468,7 +468,7 @@ void ModuleIO::CifParser::read(const std::string& fcif, // okey for read, cannot just use if rank != 0 then return, because need to broadcast the map out.clear(); #ifdef __MPI - int myrank; + int myrank = 0; MPI_Comm_rank(MPI_COMM_WORLD, &myrank); if (myrank == rank) // only the rank assigned to read the cif file will read the file { diff --git a/source/source_io/cif_io.h b/source/source_io/module_output/cif_io.h similarity index 100% rename from source/source_io/cif_io.h rename to source/source_io/module_output/cif_io.h diff --git a/source/source_io/csr_reader.cpp b/source/source_io/module_output/csr_reader.cpp similarity index 99% rename from source/source_io/csr_reader.cpp rename to source/source_io/module_output/csr_reader.cpp index 160cb78a61..7e85c137b6 100644 --- a/source/source_io/csr_reader.cpp +++ b/source/source_io/module_output/csr_reader.cpp @@ -40,7 +40,7 @@ void csrFileReader::parseFile() for (int i = 0; i < numberOfR; i++) { std::vector RCoord(3); - int nonZero; + int nonZero = 0; readLine(); ss >> RCoord[0] >> RCoord[1] >> RCoord[2] >> nonZero; diff --git a/source/source_io/csr_reader.h b/source/source_io/module_output/csr_reader.h similarity index 100% rename from source/source_io/csr_reader.h rename to source/source_io/module_output/csr_reader.h diff --git a/source/source_io/cube_io.h b/source/source_io/module_output/cube_io.h similarity index 100% rename from source/source_io/cube_io.h rename to source/source_io/module_output/cube_io.h diff --git a/source/source_io/file_reader.cpp b/source/source_io/module_output/file_reader.cpp similarity index 100% rename from source/source_io/file_reader.cpp rename to source/source_io/module_output/file_reader.cpp diff --git a/source/source_io/file_reader.h b/source/source_io/module_output/file_reader.h similarity index 100% rename from source/source_io/file_reader.h rename to source/source_io/module_output/file_reader.h diff --git a/source/source_io/filename.cpp b/source/source_io/module_output/filename.cpp similarity index 85% rename from source/source_io/filename.cpp rename to source/source_io/module_output/filename.cpp index b60012c4b0..966da0bc8f 100644 --- a/source/source_io/filename.cpp +++ b/source/source_io/module_output/filename.cpp @@ -1,5 +1,5 @@ #include -#include "filename.h" +#include "source_io/module_output/filename.h" #include "source_base/tool_quit.h" namespace ModuleIO @@ -47,27 +47,33 @@ std::string filename_output( // spin part std::string spin_block; - if(nspin == 1) - { - } - else if(nspin == 2) + + // mohan add 2026-01-04, overlap matrix is the same for any spin + if(property != "sk") { - const int half_k = nkstot/2; - if(ik0 >= half_k) + if(nspin == 1) { - is0 = 2; - ik0 -= half_k; + // do nothing } - else + else if(nspin == 2) { - is0 = 1; + const int half_k = nkstot/2; + if(ik0 >= half_k) + { + is0 = 2; + ik0 -= half_k; + } + else + { + is0 = 1; + } + spin_block = "s" + std::to_string(is0); + } + else if(nspin==4) + { + is0 = 4; + spin_block = "s" + std::to_string(is0); } - spin_block = "s" + std::to_string(is0); - } - else if(nspin==4) - { - is0 = 4; - spin_block = "s" + std::to_string(is0); } diff --git a/source/source_io/filename.h b/source/source_io/module_output/filename.h similarity index 100% rename from source/source_io/filename.h rename to source/source_io/module_output/filename.h diff --git a/source/source_io/orb_io.cpp b/source/source_io/module_output/orb_io.cpp similarity index 99% rename from source/source_io/orb_io.cpp rename to source/source_io/module_output/orb_io.cpp index 8a615b9a3c..cd1763e924 100644 --- a/source/source_io/orb_io.cpp +++ b/source/source_io/module_output/orb_io.cpp @@ -1,4 +1,4 @@ -#include "source_io/orb_io.h" +#include "source_io/module_output/orb_io.h" #include "source_base/tool_quit.h" #ifdef __MPI #include "source_base/parallel_common.h" diff --git a/source/source_io/orb_io.h b/source/source_io/module_output/orb_io.h similarity index 100% rename from source/source_io/orb_io.h rename to source/source_io/module_output/orb_io.h diff --git a/source/source_io/output.cpp b/source/source_io/module_output/output.cpp similarity index 100% rename from source/source_io/output.cpp rename to source/source_io/module_output/output.cpp diff --git a/source/source_io/output.h b/source/source_io/module_output/output.h similarity index 96% rename from source/source_io/output.h rename to source/source_io/module_output/output.h index 909abc6e94..3bc0671dd0 100644 --- a/source/source_io/output.h +++ b/source/source_io/module_output/output.h @@ -5,10 +5,10 @@ #ifndef OUTPUT_H #define OUTPUT_H -#include "../source_base/realarray.h" -#include "../source_base/matrix3.h" -#include "../source_base/complexmatrix.h" -#include "../source_base/matrix.h" +#include "../../source_base/realarray.h" +#include "../../source_base/matrix3.h" +#include "../../source_base/complexmatrix.h" +#include "../../source_base/matrix.h" class output { public: diff --git a/source/source_io/output_log.cpp b/source/source_io/module_output/output_log.cpp similarity index 99% rename from source/source_io/output_log.cpp rename to source/source_io/module_output/output_log.cpp index 7a4471b0a6..8c3ba0d114 100644 --- a/source/source_io/output_log.cpp +++ b/source/source_io/module_output/output_log.cpp @@ -4,7 +4,7 @@ #include "source_base/constants.h" #include "source_base/formatter.h" #include "source_base/global_variable.h" - +#include "source_base/parallel_reduce.h" #include "source_base/parallel_comm.h" #ifdef __MPI @@ -154,7 +154,7 @@ void output_vacuum_level(const UnitCell* ucell, } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, ave, length, MPI_DOUBLE, MPI_SUM, POOL_WORLD); + Parallel_Reduce::reduce_pool(ave, length); #endif int surface = nxyz / length; diff --git a/source/source_io/output_log.h b/source/source_io/module_output/output_log.h similarity index 100% rename from source/source_io/output_log.h rename to source/source_io/module_output/output_log.h diff --git a/source/source_io/print_info.cpp b/source/source_io/module_output/print_info.cpp similarity index 100% rename from source/source_io/print_info.cpp rename to source/source_io/module_output/print_info.cpp diff --git a/source/source_io/print_info.h b/source/source_io/module_output/print_info.h similarity index 100% rename from source/source_io/print_info.h rename to source/source_io/module_output/print_info.h diff --git a/source/source_io/read_cube.cpp b/source/source_io/module_output/read_cube.cpp similarity index 99% rename from source/source_io/read_cube.cpp rename to source/source_io/module_output/read_cube.cpp index dea1136edd..f71374ad89 100644 --- a/source/source_io/read_cube.cpp +++ b/source/source_io/module_output/read_cube.cpp @@ -1,4 +1,4 @@ -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include #include "source_pw/module_pwdft/parallel_grid.h" #include // use std::memcpy diff --git a/source/source_io/read_exit_file.cpp b/source/source_io/module_output/read_exit_file.cpp similarity index 100% rename from source/source_io/read_exit_file.cpp rename to source/source_io/module_output/read_exit_file.cpp diff --git a/source/source_io/read_exit_file.h b/source/source_io/module_output/read_exit_file.h similarity index 100% rename from source/source_io/read_exit_file.h rename to source/source_io/module_output/read_exit_file.h diff --git a/source/source_io/sparse_matrix.cpp b/source/source_io/module_output/sparse_matrix.cpp similarity index 100% rename from source/source_io/sparse_matrix.cpp rename to source/source_io/module_output/sparse_matrix.cpp diff --git a/source/source_io/sparse_matrix.h b/source/source_io/module_output/sparse_matrix.h similarity index 100% rename from source/source_io/sparse_matrix.h rename to source/source_io/module_output/sparse_matrix.h diff --git a/source/source_io/write_cube.cpp b/source/source_io/module_output/write_cube.cpp similarity index 99% rename from source/source_io/write_cube.cpp rename to source/source_io/module_output/write_cube.cpp index ae591969d0..79181a5dc0 100644 --- a/source/source_io/write_cube.cpp +++ b/source/source_io/module_output/write_cube.cpp @@ -1,7 +1,7 @@ #include "source_base/element_name.h" #include "source_base/parallel_comm.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include "source_io/module_parameter/parameter.h" #include diff --git a/source/source_io/write_orb_info.cpp b/source/source_io/module_output/write_orb_info.cpp similarity index 100% rename from source/source_io/write_orb_info.cpp rename to source/source_io/module_output/write_orb_info.cpp diff --git a/source/source_io/write_orb_info.h b/source/source_io/module_output/write_orb_info.h similarity index 100% rename from source/source_io/write_orb_info.h rename to source/source_io/module_output/write_orb_info.h diff --git a/source/source_io/write_pao.cpp b/source/source_io/module_output/write_pao.cpp similarity index 100% rename from source/source_io/write_pao.cpp rename to source/source_io/module_output/write_pao.cpp diff --git a/source/source_io/write_pao.h b/source/source_io/module_output/write_pao.h similarity index 100% rename from source/source_io/write_pao.h rename to source/source_io/module_output/write_pao.h diff --git a/source/source_io/input_conv.cpp b/source/source_io/module_parameter/input_conv.cpp similarity index 96% rename from source/source_io/input_conv.cpp rename to source/source_io/module_parameter/input_conv.cpp index 279c09c405..c83b46ecd6 100644 --- a/source/source_io/input_conv.cpp +++ b/source/source_io/module_parameter/input_conv.cpp @@ -1,4 +1,4 @@ -#include "source_io/input_conv.h" +#include "input_conv.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" @@ -6,14 +6,15 @@ #include "source_cell/unitcell.h" #include "source_estate/occupy.h" #include "source_hamilt/module_surchem/surchem.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/berryphase.h" +#include "../module_unk/berryphase.h" #include "source_io/module_parameter/parameter.h" #include "source_relax/ions_move_basic.h" #include "source_relax/lattice_change_basic.h" #include +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info +#include "source_hamilt/module_xc/xc_functional.h" // use XC_Functional #ifdef __EXX #include "source_lcao/module_ri/exx_abfs-jle.h" #endif @@ -43,6 +44,12 @@ #include "source_hsolver/hsolver_pw.h" #include "source_md/md_func.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 + +#include "source_io/module_restart/restart.h" +#include "source_relax/bfgs_basic.h" +#include "source_relax/ions_move_cg.h" + #ifdef __LCAO std::vector Input_Conv::convert_units(std::string params, double c) { std::vector params_ori; @@ -213,16 +220,16 @@ void Input_Conv::Convert() if (PARAM.inp.dft_plus_u) { - GlobalC::dftu.Yukawa = PARAM.inp.yukawa_potential; - GlobalC::dftu.omc = PARAM.inp.omc; - GlobalC::dftu.orbital_corr = PARAM.inp.orbital_corr; - GlobalC::dftu.uramping = PARAM.globalv.uramping; - GlobalC::dftu.mixing_dftu = PARAM.inp.mixing_dftu; - GlobalC::dftu.U = PARAM.globalv.hubbard_u; - GlobalC::dftu.U0 = PARAM.globalv.hubbard_u; + Plus_U::Yukawa = PARAM.inp.yukawa_potential; + Plus_U::omc = PARAM.inp.omc; + Plus_U::orbital_corr = PARAM.inp.orbital_corr; + Plus_U::uramping = PARAM.globalv.uramping; + Plus_U::mixing_dftu = PARAM.inp.mixing_dftu; + Plus_U::U = PARAM.globalv.hubbard_u; + Plus_U::U0 = PARAM.globalv.hubbard_u; if (PARAM.globalv.uramping > 0.01) { - ModuleBase::GlobalFunc::ZEROS(GlobalC::dftu.U.data(), PARAM.inp.ntype); + ModuleBase::GlobalFunc::ZEROS(Plus_U::U.data(), PARAM.inp.ntype); } } @@ -472,6 +479,7 @@ void Input_Conv::Convert() GlobalC::exx_info.info_ri.V_grad_R_threshold = PARAM.inp.exx_v_grad_r_threshold; GlobalC::exx_info.info_ri.ccp_rmesh_times = std::stod(PARAM.inp.exx_ccp_rmesh_times); GlobalC::exx_info.info_ri.exx_symmetry_realspace = PARAM.inp.exx_symmetry_realspace; + GlobalC::exx_info.info_ri.Cs_inv_thr = PARAM.inp.exx_cs_inv_thr; GlobalC::exx_info.info_opt_abfs.pca_threshold = PARAM.inp.exx_pca_threshold; GlobalC::exx_info.info_opt_abfs.abfs_Lmax = PARAM.inp.exx_opt_orb_lmax; diff --git a/source/source_io/input_conv.h b/source/source_io/module_parameter/input_conv.h similarity index 100% rename from source/source_io/input_conv.h rename to source/source_io/module_parameter/input_conv.h diff --git a/source/source_io/input_item.h b/source/source_io/module_parameter/input_item.h similarity index 100% rename from source/source_io/input_item.h rename to source/source_io/module_parameter/input_item.h diff --git a/source/source_io/module_parameter/input_parameter.h b/source/source_io/module_parameter/input_parameter.h index 64392c8c34..6dbae92e7f 100644 --- a/source/source_io/module_parameter/input_parameter.h +++ b/source/source_io/module_parameter/input_parameter.h @@ -248,6 +248,9 @@ struct Input_para std::vector of_ml_chi_qnl = {1.0}; ///< Hyperparameter: tanh_qnl = tanh(chi_qnl * qnl) bool of_ml_local_test = false; ///< Test: read in the density, and output the F and Pauli potential + // ML EXX, temporarily located here, sunliang + bool ml_exx = false; ///< Use ML EXX or not + // ============== #Parameters (7.stochastic DFT) =========================== int method_sto = 2; ///< different methods for sdft, 1: slow, less memory 2: ///< fast, more memory @@ -367,6 +370,7 @@ struct Input_para bool out_stru = false; ///< outut stru file each ion step int out_freq_elec = 0; ///< print information every few electronic steps int out_freq_ion = 0; ///< print information every few ionic steps + int out_freq_td = 0; ///< print information every few completed electronic iterations in RT-TDDFT std::vector out_chg = {0, 3}; ///< output charge density. 0: no; 1: yes std::vector out_xc_r = {-1, 3}; ///< output xc(r). -1: no; >=0: output the order of xc(r) int out_pot = 0; ///< yes or no @@ -399,7 +403,7 @@ struct Input_para int out_wfc_lcao = 0; ///< output the wave functions in local basis. bool out_dipole = false; ///< output the dipole or not bool out_efield = false; ///< output the efield or not - bool out_current = false; ///< output the current or not + int out_current = 0; ///< output the current or not bool out_current_k = false; ///< output tddft current for all k points bool out_vecpot = false; ///< output the vector potential or not bool restart_save = false; ///< restart //Peize Lin add 2020-04-04 @@ -552,6 +556,7 @@ struct Input_para = true; ///< whether to reduce the real-space sector in when using symmetry=1 in EXX calculation double rpa_ccp_rmesh_times = 10.0; ///< how many times larger the radial mesh required for ///< calculating Columb potential is to that of atomic orbitals + double exx_cs_inv_thr = -1; ///< threshold to inverse Vq in abfs for generating Cs bool out_ri_cv = false; ///< Whether to output the coefficient tensor C and ABFs-representation Coulomb matrix V // ============== #Parameters (16.dft+u) ====================== // DFT+U Xin Qu added on 2020-10-29 @@ -656,6 +661,7 @@ struct Input_para bool exx_gamma_extrapolation = true; // gamma point extrapolation for exx, https://doi.org/10.1103/PhysRevB.79.205114 std::string exx_thr_type = "density"; // threshold type for exx outer loop, energy or density double exx_ene_thr = 1e-5; // threshold for exx outer loop when exx_thr_type = energy + double ecutexx = 0.0; // energy cutoff for exx calculation, Ry // ==== #Parameters (23.XC external parameterization) ======== /* @@ -691,5 +697,8 @@ struct Input_para bool of_cd = false; ///< add CD potential or not https://doi.org/10.1103/PhysRevB.98.144302 double of_mCD_alpha = 1.0; /// parameter of modified CD Potential + // ============== #Parameters (25.uncommon hardware) ================= + int dsp_count = 4; /// the count of dsp hardwares in one node + }; #endif diff --git a/source/source_io/read_input.cpp b/source/source_io/module_parameter/read_input.cpp similarity index 80% rename from source/source_io/read_input.cpp rename to source/source_io/module_parameter/read_input.cpp index 14f25d115d..311a44e9b2 100644 --- a/source/source_io/read_input.cpp +++ b/source/source_io/module_parameter/read_input.cpp @@ -1,5 +1,6 @@ #include "read_input.h" + #include #include #include @@ -15,6 +16,10 @@ #include "source_base/tool_quit.h" #include "source_base/tool_title.h" #include "source_base/module_device/device.h" +#include +#include +#include +#include namespace ModuleIO { @@ -69,7 +74,7 @@ std::string to_dir(const std::string& str) return str_dir; } -void read_information(std::ifstream& ifs, std::vector& output, const std::string& delimiters) +void read_information(std::stringstream& ifs, std::vector& output, const std::string& delimiters) { std::string line; getline(ifs, line); @@ -88,10 +93,74 @@ void read_information(std::ifstream& ifs, std::vector& output, cons bool ReadInput::check_mode = false; +bool filter_nonascii_and_comment(std::ifstream& ifs, + std::stringstream& out_ascii_stream) +{ + if (!ifs.is_open()) + { + if (!ifs) return false; + } + + std::streampos old_pos = ifs.tellg(); + ifs.clear(); + ifs.seekg(0, std::ios::beg); + + char c = '\0'; + while (ifs.get(c)) + { + // If comment start, skip until end of line (but keep the newline) + if (c == '#') + { + char d = '\0'; + bool newline_found = false; + while (ifs.get(d)) + { + if (d == '\n' || d == '\r') + { + // preserve line break in output + out_ascii_stream.put('\n'); + // If CRLF, consume the LF after CR (already wrote a single '\n') + if (d == '\r' && ifs.peek() == '\n') + { + ifs.get(d); // consume '\n' + } + newline_found = true; + break; + } + } + if (!newline_found) + { + // reached EOF while skipping comment + break; + } + continue; + } + + unsigned char uc = static_cast(c); + if (uc <= 0x7F) + { + // ASCII character + out_ascii_stream.put(c); + } + else + { + // replace non-ASCII with space character + out_ascii_stream.put(' '); + } + } + + // recover ifstream state and position + ifs.clear(); + ifs.seekg(old_pos, std::ios::beg); + + return true; +} + + ReadInput::ReadInput(const int& rank) { this->rank = rank; - + // add items this->item_system(); this->item_elec_stru(); @@ -114,6 +183,7 @@ ReadInput::ReadInput(const int& rank) void ReadInput::read_parameters(Parameter& param, const std::string& filename_in) { ModuleBase::TITLE("ReadInput", "read_parameters"); + // 1. only rank 0 read the input file if (this->rank == 0) { @@ -154,17 +224,14 @@ void ReadInput::read_parameters(Parameter& param, const std::string& filename_in } } - // 6. check and reset kpar. - // It must be after bcastfunc, and kpar and bndpar are synchronized - // It must be before wirte_txt_input, because kpar is used in write_txt_input - if (param.inp.device == "gpu" && param.inp.basis_type == "pw") + // 6. Initialize GPU device context (unified entry point) + // This must be after bcastfunc to ensure param.inp.device is synchronized across all ranks + // This replaces scattered cudaSetDevice/hipSetDevice calls throughout the codebase + if (param.inp.device == "gpu") { - param.input.kpar = base_device::information::get_device_kpar(param.inp.kpar, param.inp.bndpar); + base_device::DeviceContext::instance().init(); } - - - if (this->check_mode) { std::cout << "----------------------------------------------------------" << std::endl; @@ -197,7 +264,6 @@ void ReadInput::create_directory(const Parameter& param) } // NOTE: "make_dir_out" must be called by all processes!!! // Maybe it is not good, because only rank 0 can create the directory. - #ifndef __SW ModuleBase::Global_File::make_dir_out(param.input.suffix, param.input.calculation, out_dir, @@ -205,14 +271,12 @@ void ReadInput::create_directory(const Parameter& param) this->rank, param.input.mdp.md_restart, param.input.out_alllog); // xiaohui add 2013-09-01 - #endif - const std::string ss = "test -d " + PARAM.inp.read_file_dir; - #ifndef __SW - if (system(ss.c_str())) + //const std::string ss = "test -d " + PARAM.inp.read_file_dir; + struct stat st; + if (stat(PARAM.inp.read_file_dir.c_str(), &st) != 0 || !S_ISDIR(st.st_mode)) { ModuleBase::WARNING_QUIT("ReadInput", "please set right files directory for reading in."); } - #endif return; } @@ -228,32 +292,36 @@ void ReadInput::read_txt_input(Parameter& param, const std::string& filename) { ModuleBase::TITLE("ReadInput", "read_txt_input"); - std::ifstream ifs(filename.c_str(), std::ios::in); + std::stringstream ascii_stream; - if (!ifs) - { - std::cout << " Can't find the INPUT file." << std::endl; - ModuleBase::WARNING_QUIT("Input::Init", "Error during readin parameters.", 1); - } + std::ifstream ifs(filename.c_str(), std::ios::in); - ifs.clear(); - ifs.seekg(0); + if (!ifs) + { + std::cout << " Can't find the INPUT file." << std::endl; + ModuleBase::WARNING_QUIT("Input::Init", "Error during readin parameters.", 1); + } - std::string word; - int ierr = 0; + ifs.clear(); + ifs.seekg(0); + + filter_nonascii_and_comment(ifs, ascii_stream); + ifs.clear(); - // ifs >> std::setiosflags(ios::uppercase); - ifs.rdstate(); - while (ifs.good()) + // file close after reading + + int ierr = 0; + ascii_stream.rdstate(); + while (ascii_stream.good()) { - ifs >> word; - ifs.ignore(150, '\n'); + std::string word; + ascii_stream >> word; + ascii_stream.ignore(150, '\n'); if (word == "INPUT_PARAMETERS") { ierr = 1; break; } - ifs.rdstate(); } if (ierr == 0) @@ -266,14 +334,13 @@ void ReadInput::read_txt_input(Parameter& param, const std::string& filename) "Bad parameter, please check the input parameters in file INPUT", 1); } - ifs.rdstate(); - // the `word1` is moved here and is renamed to improve the code-readability - std::string word_; // temporary variable to store the keyword read-in - while (ifs.good()) + ascii_stream.rdstate(); + while (ascii_stream.good()) { - ifs >> word_; - if (ifs.eof()) { break; } - word = FmtCore::lower(word_); // the lowercase of the keyword + std::string word; // temporary variable to store the keyword read-in + ascii_stream >> word; + if (ascii_stream.eof()) { break; } + word = FmtCore::lower(word); // the lowercase of the keyword auto it = std::find_if(input_lists.begin(), input_lists.end(), [&word](const std::pair& item) { return item.first == word; }); if (it != this->input_lists.end()) // find the keyword @@ -286,7 +353,7 @@ void ReadInput::read_txt_input(Parameter& param, const std::string& filename) ModuleBase::WARNING_QUIT("ReadInput", warningstr); } // qianrui delete '/' 2024-07-10, because path has '/' head. - read_information(ifs, p_item->str_values, "#!"); + read_information(ascii_stream, p_item->str_values, "#!"); } else // otherwise, it should be a comment or an unrecognized parameter { @@ -299,25 +366,24 @@ void ReadInput::read_txt_input(Parameter& param, const std::string& filename) // otherwise, it is a comment. However, ... // but it is not always to be shorter than 150 characters // we can use ignore to skip the rest of the line - ifs.ignore(std::numeric_limits::max(), '\n'); + ascii_stream.ignore(std::numeric_limits::max(), '\n'); } - ifs.rdstate(); - if (ifs.eof()) + ascii_stream.rdstate(); + if (ascii_stream.eof()) { break; } - else if (ifs.bad()) + else if (ascii_stream.bad()) { - std::cout << " Bad input parameters. " << std::endl; - exit(1); + ModuleBase::WARNING_QUIT("Input", + " Bad input parameters. ", 1); } - else if (ifs.fail()) + else if (ascii_stream.fail()) { - std::cout << " word = " << word << std::endl; - std::cout << " Fail to read parameters. " << std::endl; - ifs.clear(); - exit(1); + ascii_stream.clear(); + ModuleBase::WARNING_QUIT("Input", + " fail to read parameters. ", 1); } } @@ -332,8 +398,9 @@ void ReadInput::read_txt_input(Parameter& param, const std::string& filename) for (auto& input_item: this->input_lists) { Input_Item* resetvalue_item = &(input_item.second); - if (resetvalue_item->reset_value != nullptr) { - resetvalue_item->reset_value(*resetvalue_item, param); + if (resetvalue_item->reset_value != nullptr) + { + resetvalue_item->reset_value(*resetvalue_item, param); } } } @@ -488,15 +555,15 @@ void ReadInput::check_ntype(const std::string& fn, int& param_ntype) int ReadInput::current_md_step(const std::string& file_dir) { std::stringstream ssc; - ssc << file_dir << "Restart_md.dat"; + ssc << file_dir << "Restart_md.txt"; std::ifstream file(ssc.str().c_str()); if (!file) { - ModuleBase::WARNING_QUIT("current_md_step", "no Restart_md.dat"); + ModuleBase::WARNING_QUIT("current_md_step", "no Restart_md.txt"); } - int md_step; + int md_step = 0; file >> md_step; file.close(); diff --git a/source/source_io/read_input.h b/source/source_io/module_parameter/read_input.h similarity index 93% rename from source/source_io/read_input.h rename to source/source_io/module_parameter/read_input.h index 92bda04bdb..f65379e7c3 100644 --- a/source/source_io/read_input.h +++ b/source/source_io/module_parameter/read_input.h @@ -5,6 +5,9 @@ #include "source_io/module_parameter/parameter.h" #include +#include +#include + namespace ModuleIO { @@ -68,7 +71,7 @@ class ReadInput /** * @brief determine the md step in restart case * - * @param file_dir directory of Restart_md.dat + * @param file_dir directory of Restart_md.txt * @return md step */ int current_md_step(const std::string& file_dir); @@ -152,6 +155,13 @@ std::string to_dir(const std::string& str); // return a warning string if the string is not found in the vector std::string nofound_str(std::vector init_chgs, const std::string& str); + +// filter non-ASCII characters from ifstream and output to stringstream +// return true if successful, false otherwise +bool filter_nonascii_and_comment(std::ifstream& ifs, + std::stringstream& out_ascii_stream); + + } // namespace ModuleIO #endif \ No newline at end of file diff --git a/source/source_io/read_input_item_deepks.cpp b/source/source_io/module_parameter/read_input_item_deepks.cpp similarity index 100% rename from source/source_io/read_input_item_deepks.cpp rename to source/source_io/module_parameter/read_input_item_deepks.cpp diff --git a/source/source_io/read_input_item_elec_stru.cpp b/source/source_io/module_parameter/read_input_item_elec_stru.cpp similarity index 100% rename from source/source_io/read_input_item_elec_stru.cpp rename to source/source_io/module_parameter/read_input_item_elec_stru.cpp diff --git a/source/source_io/read_input_item_exx_dftu.cpp b/source/source_io/module_parameter/read_input_item_exx_dftu.cpp similarity index 97% rename from source/source_io/read_input_item_exx_dftu.cpp rename to source/source_io/module_parameter/read_input_item_exx_dftu.cpp index eec98263c1..580e4d7b4d 100644 --- a/source/source_io/read_input_item_exx_dftu.cpp +++ b/source/source_io/module_parameter/read_input_item_exx_dftu.cpp @@ -164,6 +164,13 @@ void ReadInput::item_exx() Input_Item item("exx_separate_loop"); item.annotation = "if 1, a two-step method is employed, else it will " "start with a GGA-Loop, and then Hybrid-Loop"; + item.reset_value = [](const Input_Item& item, Parameter& para) { + if (para.input.esolver_type == "tddft" && para.input.exx_separate_loop) + { + GlobalV::ofs_running << "For RT-TDDFT with hybrid functionals, only exx_separate_loop = 0 is supported" << std::endl; + para.input.exx_separate_loop = false; + } + }; read_sync_bool(input.exx_separate_loop); this->add_item(item); } @@ -243,6 +250,12 @@ void ReadInput::item_exx() read_sync_double(input.exx_pca_threshold); this->add_item(item); } + { + Input_Item item("exx_cs_inv_thr"); + item.annotation = "threshold to inverse Vq in abfs for generating Cs"; + read_sync_double(input.exx_cs_inv_thr); + this->add_item(item); + } { Input_Item item("exx_c_threshold"); item.annotation = "threshold to screen C matrix in exx"; @@ -326,9 +339,9 @@ void ReadInput::item_exx() } }; item.check_value = [](const Input_Item& item, const Parameter& para) { - if (std::stod(para.input.exx_ccp_rmesh_times) < 1) + if (std::stod(para.input.exx_ccp_rmesh_times) <=0) { - ModuleBase::WARNING_QUIT("ReadInput", "exx_ccp_rmesh_times must >= 1"); + ModuleBase::WARNING_QUIT("ReadInput", "exx_ccp_rmesh_times must > 0"); } }; this->add_item(item); diff --git a/source/source_io/read_input_item_md.cpp b/source/source_io/module_parameter/read_input_item_md.cpp similarity index 100% rename from source/source_io/read_input_item_md.cpp rename to source/source_io/module_parameter/read_input_item_md.cpp diff --git a/source/source_io/read_input_item_model.cpp b/source/source_io/module_parameter/read_input_item_model.cpp similarity index 100% rename from source/source_io/read_input_item_model.cpp rename to source/source_io/module_parameter/read_input_item_model.cpp diff --git a/source/source_io/read_input_item_ofdft.cpp b/source/source_io/module_parameter/read_input_item_ofdft.cpp similarity index 98% rename from source/source_io/read_input_item_ofdft.cpp rename to source/source_io/module_parameter/read_input_item_ofdft.cpp index 794bbc4d30..543f4efa90 100644 --- a/source/source_io/read_input_item_ofdft.cpp +++ b/source/source_io/module_parameter/read_input_item_ofdft.cpp @@ -14,7 +14,8 @@ void ReadInput::item_ofdft() #ifndef __MLALGO if (para.input.of_kinetic == "ml" || para.input.of_kinetic == "mpn" || para.input.of_kinetic == "cpn5") { - ModuleBase::WARNING_QUIT("ReadInput", "ML KEDF is not supported."); + ModuleBase::WARNING_QUIT("ReadInput", "Error: ML KEDF requires ENABLE_MLALGO option.\n " + "Please enable ENABLE_MLALGO during compilation to use this feature."); } #endif if (para.input.of_kinetic != "tf" && para.input.of_kinetic != "vw" && para.input.of_kinetic != "wt" @@ -473,5 +474,11 @@ void ReadInput::item_ofdft() read_sync_bool(input.of_ml_local_test); this->add_item(item); } + { + Input_Item item("ml_exx"); + item.annotation = "Use ML EXX or not"; + read_sync_bool(input.ml_exx); + this->add_item(item); + } } } // namespace ModuleIO \ No newline at end of file diff --git a/source/source_io/read_input_item_other.cpp b/source/source_io/module_parameter/read_input_item_other.cpp similarity index 98% rename from source/source_io/read_input_item_other.cpp rename to source/source_io/module_parameter/read_input_item_other.cpp index cdd23df1c9..93bce67e35 100644 --- a/source/source_io/read_input_item_other.cpp +++ b/source/source_io/module_parameter/read_input_item_other.cpp @@ -571,6 +571,18 @@ void ReadInput::item_others() }; this->add_item(item); } + { + Input_Item item("ecutexx"); + item.annotation = "energy cutoff for exx calculation, Ry"; + read_sync_double(input.ecutexx); + item.check_value = [](const Input_Item& item, const Parameter& para) { + if (para.input.ecutexx < 0) + { + ModuleBase::WARNING_QUIT("ReadInput", "ecutexx must >= 0"); + } + }; + this->add_item(item); + } } } // namespace ModuleIO \ No newline at end of file diff --git a/source/source_io/read_input_item_output.cpp b/source/source_io/module_parameter/read_input_item_output.cpp similarity index 97% rename from source/source_io/read_input_item_output.cpp rename to source/source_io/module_parameter/read_input_item_output.cpp index 3fd805cfb7..dce309772c 100644 --- a/source/source_io/read_input_item_output.cpp +++ b/source/source_io/module_parameter/read_input_item_output.cpp @@ -345,12 +345,24 @@ void ReadInput::item_output() Input_Item item("out_freq_ion"); item.annotation = "print information every few ionic steps"; item.reset_value = [](const Input_Item& item, Parameter& para) { - if (para.input.out_freq_ion <= 0) - { - para.input.out_freq_ion = 0; // 0 means no output of info - } - }; - read_sync_int(input.out_freq_ion); + if (para.input.out_freq_ion <= 0) + { + para.input.out_freq_ion = 0; // 0 means no output of info + } + }; + read_sync_int(input.out_freq_ion); + this->add_item(item); + } + { + Input_Item item("out_freq_td"); + item.annotation = "print information every few completed electronic iterations in RT-TDDFT"; + item.reset_value = [](const Input_Item& item, Parameter& para) { + if (para.input.out_freq_td <= 0) + { + para.input.out_freq_td = 0; // 0 means no output of info + } + }; + read_sync_int(input.out_freq_td); this->add_item(item); } { @@ -431,7 +443,7 @@ void ReadInput::item_output() { Input_Item item("out_current"); item.annotation = "output current or not"; - read_sync_bool(input.out_current); + read_sync_int(input.out_current); this->add_item(item); } { diff --git a/source/source_io/read_input_item_postprocess.cpp b/source/source_io/module_parameter/read_input_item_postprocess.cpp similarity index 100% rename from source/source_io/read_input_item_postprocess.cpp rename to source/source_io/module_parameter/read_input_item_postprocess.cpp diff --git a/source/source_io/read_input_item_relax.cpp b/source/source_io/module_parameter/read_input_item_relax.cpp similarity index 100% rename from source/source_io/read_input_item_relax.cpp rename to source/source_io/module_parameter/read_input_item_relax.cpp diff --git a/source/source_io/read_input_item_sdft.cpp b/source/source_io/module_parameter/read_input_item_sdft.cpp similarity index 100% rename from source/source_io/read_input_item_sdft.cpp rename to source/source_io/module_parameter/read_input_item_sdft.cpp diff --git a/source/source_io/read_input_item_system.cpp b/source/source_io/module_parameter/read_input_item_system.cpp similarity index 98% rename from source/source_io/read_input_item_system.cpp rename to source/source_io/module_parameter/read_input_item_system.cpp index ba3398b13a..9d379f1aa9 100644 --- a/source/source_io/read_input_item_system.cpp +++ b/source/source_io/module_parameter/read_input_item_system.cpp @@ -245,6 +245,19 @@ void ReadInput::item_system() para.sys.kpar_lcao = para.inp.kpar; para.input.kpar = 1; } +#endif + // GPU + PW: validate kpar against total processors + // Moved from base_device::information::get_device_kpar() +#if defined(__CUDA) || defined(__ROCM) + if (para.input.device == "gpu" && para.input.basis_type == "pw") + { + if (GlobalV::NPROC != para.input.kpar * para.input.bndpar) + { + para.input.kpar = GlobalV::NPROC / para.input.bndpar; + ModuleBase::WARNING("ReadInput", + "kpar is not compatible with the number of processors, auto set kpar value."); + } + } #endif }; item.check_value = [](const Input_Item& item, const Parameter& para) { @@ -552,7 +565,7 @@ void ReadInput::item_system() } }; item.check_value = [](const Input_Item& item, const Parameter& para) { - const std::vector init_chgs = {"atomic", "file", "wfc", "auto"}; + const std::vector init_chgs = {"atomic", "file", "wfc", "auto", "dm", "hr"}; if (std::find(init_chgs.begin(), init_chgs.end(), para.input.init_chg) == init_chgs.end()) { const std::string warningstr = nofound_str(init_chgs, "init_chg"); diff --git a/source/source_io/read_input_item_tddft.cpp b/source/source_io/module_parameter/read_input_item_tddft.cpp similarity index 100% rename from source/source_io/read_input_item_tddft.cpp rename to source/source_io/module_parameter/read_input_item_tddft.cpp diff --git a/source/source_io/read_input_tool.h b/source/source_io/module_parameter/read_input_tool.h similarity index 100% rename from source/source_io/read_input_tool.h rename to source/source_io/module_parameter/read_input_tool.h diff --git a/source/source_io/read_set_globalv.cpp b/source/source_io/module_parameter/read_set_globalv.cpp similarity index 100% rename from source/source_io/read_set_globalv.cpp rename to source/source_io/module_parameter/read_set_globalv.cpp diff --git a/source/source_io/to_qo.h b/source/source_io/module_qo/to_qo.h similarity index 100% rename from source/source_io/to_qo.h rename to source/source_io/module_qo/to_qo.h diff --git a/source/source_io/to_qo_kernel.cpp b/source/source_io/module_qo/to_qo_kernel.cpp similarity index 99% rename from source/source_io/to_qo_kernel.cpp rename to source/source_io/module_qo/to_qo_kernel.cpp index b16917259a..1c0471b697 100644 --- a/source/source_io/to_qo_kernel.cpp +++ b/source/source_io/module_qo/to_qo_kernel.cpp @@ -1,7 +1,7 @@ #include "source_base/libm/libm.h" #include "source_base/ylm.h" #include "source_basis/module_nao/two_center_integrator.h" -#include "source_io/to_qo.h" +#include "to_qo.h" #ifdef __MPI #include "source_base/parallel_common.h" #endif @@ -598,7 +598,7 @@ void toQO::read_ovlp(const std::string& dir, const int& nrows, const int& ncols, { if (is_R) { - double val; + double val = 0.0; ifs >> val; inum++; if (inum <= nchi_ * nphi_) { diff --git a/source/source_io/to_qo_mpi.cpp b/source/source_io/module_qo/to_qo_mpi.cpp similarity index 94% rename from source/source_io/to_qo_mpi.cpp rename to source/source_io/module_qo/to_qo_mpi.cpp index e8823a3ee5..4628a90f91 100644 --- a/source/source_io/to_qo_mpi.cpp +++ b/source/source_io/module_qo/to_qo_mpi.cpp @@ -1,13 +1,13 @@ -#include "source_io/to_qo.h" +#include "to_qo.h" #ifdef __MPI -#include "../source_base/parallel_common.h" +#include "../../source_base/parallel_common.h" #endif void toQO::bcast_stdvector_ofvector3int(std::vector>& vec, const int rank) { #ifdef __MPI - int dim; + int dim = 0; std::vector vec_1d; if(rank == 0) { @@ -37,7 +37,7 @@ void toQO::bcast_stdvector_ofvector3double(std::vector vec_1d; if(rank == 0) { diff --git a/source/source_io/to_qo_structures.cpp b/source/source_io/module_qo/to_qo_structures.cpp similarity index 99% rename from source/source_io/to_qo_structures.cpp rename to source/source_io/module_qo/to_qo_structures.cpp index 28679baf58..921191c38d 100644 --- a/source/source_io/to_qo_structures.cpp +++ b/source/source_io/module_qo/to_qo_structures.cpp @@ -1,6 +1,6 @@ -#include "source_io/to_qo.h" +#include "to_qo.h" #ifdef __MPI -#include "../source_base/parallel_common.h" +#include "../../source_base/parallel_common.h" #endif void toQO::read_structures(const UnitCell* p_ucell, const std::vector>& kvecs_d, @@ -60,7 +60,7 @@ void toQO::read_structures(const UnitCell* p_ucell, } for(int i = 0; i < nranks; i++) { - int nks_dim; + int nks_dim = 0; if(iproc_ == 0) nks_dim = nks_divided[i].size(); Parallel_Common::bcast_int(nks_dim); if(iproc_ != 0) nks_divided[i].resize(nks_dim); @@ -244,7 +244,7 @@ void toQO::scan_supercell(const int& rank, const int& nranks) } for(int i = 0; i < nranks; i++) { - int nR_dim; + int nR_dim = 0; if(rank == 0) nR_dim = nR_divided[i].size(); Parallel_Common::bcast_int(nR_dim); if(rank != 0) nR_divided[i].resize(nR_dim); diff --git a/source/source_io/restart.cpp b/source/source_io/module_restart/restart.cpp similarity index 96% rename from source/source_io/restart.cpp rename to source/source_io/module_restart/restart.cpp index 1841f3bb37..c960215a2a 100644 --- a/source/source_io/restart.cpp +++ b/source/source_io/module_restart/restart.cpp @@ -42,6 +42,11 @@ bool Restart::write_file2(const std::string& file_name, const void* const ptr, c return true; } +namespace GlobalC +{ +Restart restart; // Peize Lin add 2020.04.04 +} // namespace GlobalC + bool Restart::read_file2(const std::string& file_name, void* const ptr, const size_t size, const bool error_quit) const { const int file = open(file_name.c_str(), O_RDONLY); diff --git a/source/source_io/restart.h b/source/source_io/module_restart/restart.h similarity index 95% rename from source/source_io/restart.h rename to source/source_io/module_restart/restart.h index d3cf0cf2df..8908c9d802 100644 --- a/source/source_io/restart.h +++ b/source/source_io/module_restart/restart.h @@ -55,4 +55,9 @@ class Restart bool read_file2(const std::string& file_name, void* const ptr, const size_t size, const bool error_quit = true) const; }; +namespace GlobalC +{ +extern Restart restart; // Peize Lin add 2020.04.04 +} // namespace GlobalC + #endif diff --git a/source/source_io/restart_exx_csr.h b/source/source_io/module_restart/restart_exx_csr.h similarity index 97% rename from source/source_io/restart_exx_csr.h rename to source/source_io/module_restart/restart_exx_csr.h index 1e259f9933..2900e9237e 100644 --- a/source/source_io/restart_exx_csr.h +++ b/source/source_io/module_restart/restart_exx_csr.h @@ -35,4 +35,4 @@ namespace ModuleIO const UnitCell& ucell); } -#include "source_io/restart_exx_csr.hpp" \ No newline at end of file +#include "restart_exx_csr.hpp" \ No newline at end of file diff --git a/source/source_io/restart_exx_csr.hpp b/source/source_io/module_restart/restart_exx_csr.hpp similarity index 97% rename from source/source_io/restart_exx_csr.hpp rename to source/source_io/module_restart/restart_exx_csr.hpp index 75027faff5..fa373dd6e1 100644 --- a/source/source_io/restart_exx_csr.hpp +++ b/source/source_io/module_restart/restart_exx_csr.hpp @@ -1,8 +1,8 @@ #pragma once -#include "source_io/restart_exx_csr.h" +#include "restart_exx_csr.h" #include "source_cell/unitcell.h" -#include "source_io/csr_reader.h" -#include "source_io/write_HS_sparse.h" +#include "source_io/module_output/csr_reader.h" +#include "source_io/module_hs/write_HS_sparse.h" #include "source_lcao/module_ri/serialization_cereal.h" #include #include diff --git a/source/source_io/berryphase.cpp b/source/source_io/module_unk/berryphase.cpp similarity index 99% rename from source/source_io/berryphase.cpp rename to source/source_io/module_unk/berryphase.cpp index c98913b35d..04c44a2935 100644 --- a/source/source_io/berryphase.cpp +++ b/source/source_io/module_unk/berryphase.cpp @@ -1,10 +1,9 @@ -#include "berryphase.h" +#include "berryphase.h" #include "source_base/module_external/lapack_connector.h" #include "source_io/module_parameter/parameter.h" #include "source_cell/klist.h" -#include "source_pw/module_pwdft/global.h" bool berryphase::berry_phase_flag = false; @@ -216,7 +215,7 @@ void berryphase::set_kpoints(const K_Vectors& kv, const int direction) } } -#include "../source_base/complexmatrix.h" +#include "../../source_base/complexmatrix.h" double berryphase::stringPhase(const UnitCell& ucell, int index_str, int nbands, diff --git a/source/source_io/berryphase.h b/source/source_io/module_unk/berryphase.h similarity index 100% rename from source/source_io/berryphase.h rename to source/source_io/module_unk/berryphase.h diff --git a/source/source_io/unk_overlap_lcao.cpp b/source/source_io/module_unk/unk_overlap_lcao.cpp similarity index 94% rename from source/source_io/unk_overlap_lcao.cpp rename to source/source_io/module_unk/unk_overlap_lcao.cpp index a352995a79..99726117ff 100644 --- a/source/source_io/unk_overlap_lcao.cpp +++ b/source/source_io/module_unk/unk_overlap_lcao.cpp @@ -1,10 +1,9 @@ #include "unk_overlap_lcao.h" - +#include "source_base/parallel_comm.h" // use POOL_WORLD, etc. #include "source_io/module_parameter/parameter.h" #include "ctime" #include "source_base/module_external/scalapack_connector.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" unkOverlap_lcao::unkOverlap_lcao() { @@ -28,20 +27,11 @@ void unkOverlap_lcao::init(const UnitCell& ucell, const int nkstot, const LCAO_Orbitals& orb) { - - int Lmax_used = 0; - int Lmax = 0; - int exx_lmax = 0; -#ifdef __EXX - exx_lmax = GlobalC::exx_info.info_ri.abfs_Lmax; -#endif - const int ntype = orb.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; + int lmax_orb = -1; for (int it = 0; it < ntype; it++) { lmax_orb = std::max(lmax_orb, orb.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); } const double dr = orb.get_dR(); const double dk = orb.get_dk(); @@ -49,13 +39,9 @@ void unkOverlap_lcao::init(const UnitCell& ucell, int Rmesh = static_cast(orb.get_Rmax() / dr) + 4; Rmesh += 1 - Rmesh % 2; - Center2_Orb::init_Table_Spherical_Bessel(2, - 3, - Lmax_used, - Lmax, - exx_lmax, - lmax_orb, - lmax_beta, + const int Lmax = lmax_orb + 1; + const int Lmax_used = 2 * lmax_orb + 1; + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, @@ -110,7 +96,7 @@ void unkOverlap_lcao::init(const UnitCell& ucell, { local_term++; } - int start; + int start = 0; for (int rank = 0; rank < nproc; rank++) { if (rank == myrank) @@ -576,51 +562,51 @@ std::complex unkOverlap_lcao::det_berryphase(const UnitCell& ucell, std::complex alpha = {1.0, 0.0}, beta = {0.0, 0.0}; int one = 1; #ifdef __MPI - pzgemm_(&transa, - &transb, - &occBands, - &nlocal, - &nlocal, - &alpha, + ScalapackConnector::gemm(transa, + transb, + occBands, + nlocal, + nlocal, + alpha, &psi_in[0](ik_L, 0, 0), - &one, - &one, + one, + one, para_orb.desc, midmatrix, - &one, - &one, + one, + one, para_orb.desc, - &beta, + beta, C_matrix, - &one, - &one, + one, + one, para_orb.desc); - pzgemm_(&transb, - &transb, - &occBands, - &occBands, - &nlocal, - &alpha, + ScalapackConnector::gemm(transb, + transb, + occBands, + occBands, + nlocal, + alpha, C_matrix, - &one, - &one, + one, + one, para_orb.desc, &psi_in[0](ik_R, 0, 0), - &one, - &one, + one, + one, para_orb.desc, - &beta, + beta, out_matrix, - &one, - &one, + one, + one, para_orb.desc); assert(para_orb.nrow>0); int* ipiv = new int[para_orb.nrow]; int info = 0; - pzgetrf_(&occBands, &occBands, out_matrix, &one, &one, para_orb.desc, ipiv, &info); + ScalapackConnector::getrf(occBands, occBands, out_matrix, one, one, para_orb.desc, ipiv, &info); for (int i = 0; i < occBands; i++) // global { diff --git a/source/source_io/unk_overlap_lcao.h b/source/source_io/module_unk/unk_overlap_lcao.h similarity index 100% rename from source/source_io/unk_overlap_lcao.h rename to source/source_io/module_unk/unk_overlap_lcao.h diff --git a/source/source_io/unk_overlap_pw.cpp b/source/source_io/module_unk/unk_overlap_pw.cpp similarity index 99% rename from source/source_io/unk_overlap_pw.cpp rename to source/source_io/module_unk/unk_overlap_pw.cpp index 0c87b1f6fb..fab9242837 100644 --- a/source/source_io/unk_overlap_pw.cpp +++ b/source/source_io/module_unk/unk_overlap_pw.cpp @@ -1,6 +1,5 @@ #include "unk_overlap_pw.h" - -#include "source_pw/module_pwdft/global.h" +#include "source_base/parallel_comm.h" // use POOL_WORLD, etc. #include "source_io/module_parameter/parameter.h" unkOverlap_pw::unkOverlap_pw() diff --git a/source/source_io/unk_overlap_pw.h b/source/source_io/module_unk/unk_overlap_pw.h similarity index 100% rename from source/source_io/unk_overlap_pw.h rename to source/source_io/module_unk/unk_overlap_pw.h diff --git a/source/source_io/fR_overlap.cpp b/source/source_io/module_wannier/fR_overlap.cpp similarity index 100% rename from source/source_io/fR_overlap.cpp rename to source/source_io/module_wannier/fR_overlap.cpp diff --git a/source/source_io/fR_overlap.h b/source/source_io/module_wannier/fR_overlap.h similarity index 100% rename from source/source_io/fR_overlap.h rename to source/source_io/module_wannier/fR_overlap.h diff --git a/source/source_io/to_wannier90.cpp b/source/source_io/module_wannier/to_wannier90.cpp similarity index 99% rename from source/source_io/to_wannier90.cpp rename to source/source_io/module_wannier/to_wannier90.cpp index 47241c0789..e7a291dcfc 100644 --- a/source/source_io/to_wannier90.cpp +++ b/source/source_io/module_wannier/to_wannier90.cpp @@ -5,7 +5,6 @@ #include "source_base/math_polyint.h" #include "source_base/math_sphbes.h" #include "source_base/math_ylmreal.h" -#include "source_pw/module_pwdft/global.h" toWannier90::toWannier90() { @@ -203,7 +202,7 @@ bool toWannier90::try_read_nnkp(const UnitCell& ucell, const K_Vectors& kv) cal_num_kpts = num_kpts / 2; } - int numkpt_nnkp; + int numkpt_nnkp = 0; ModuleBase::GlobalFunc::READ_VALUE(nnkp_read, numkpt_nnkp); if ((PARAM.inp.nspin == 1 || PARAM.inp.nspin == 4) && numkpt_nnkp != num_kpts) { @@ -434,7 +433,7 @@ bool toWannier90::try_read_nnkp(const UnitCell& ucell, const K_Vectors& kv) { for (int ib = 0; ib < nntot; ib++) { - int ik_nnkp; + int ik_nnkp = 0; nnkp_read >> ik_nnkp; if (ik_nnkp != (ik + 1)) { @@ -514,4 +513,4 @@ bool toWannier90::try_read_nnkp(const UnitCell& ucell, const K_Vectors& kv) } return true; -} \ No newline at end of file +} diff --git a/source/source_io/to_wannier90.h b/source/source_io/module_wannier/to_wannier90.h similarity index 100% rename from source/source_io/to_wannier90.h rename to source/source_io/module_wannier/to_wannier90.h diff --git a/source/source_io/to_wannier90_lcao.cpp b/source/source_io/module_wannier/to_wannier90_lcao.cpp similarity index 97% rename from source/source_io/to_wannier90_lcao.cpp rename to source/source_io/module_wannier/to_wannier90_lcao.cpp index 1388dc6975..8c1b8288d9 100644 --- a/source/source_io/to_wannier90_lcao.cpp +++ b/source/source_io/module_wannier/to_wannier90_lcao.cpp @@ -9,7 +9,6 @@ #include "source_base/parallel_reduce.h" #include "source_base/module_external/scalapack_connector.h" #include "source_lcao/module_hcontainer/atom_pair.h" -#include "source_pw/module_pwdft/global.h" #include #include @@ -265,20 +264,12 @@ void toWannier90_LCAO::out_unk(const psi::Psi>& psi) void toWannier90_LCAO::initialize_orb_table(const UnitCell& ucell) { - int Lmax_used = 0; - int Lmax = 0; - int exx_lmax = 0; -#ifdef __EXX - exx_lmax = GlobalC::exx_info.info_ri.abfs_Lmax; -#endif - #ifdef __LCAO const int ntype = orb_.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; + int lmax_orb = -1; for (int it = 0; it < ntype; it++) { lmax_orb = std::max(lmax_orb, orb_.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); } const double dr = orb_.get_dR(); const double dk = orb_.get_dk(); @@ -286,13 +277,9 @@ void toWannier90_LCAO::initialize_orb_table(const UnitCell& ucell) int Rmesh = static_cast(orb_.get_Rmax() / dr) + 4; Rmesh += 1 - Rmesh % 2; - Center2_Orb::init_Table_Spherical_Bessel(2, - 3, - Lmax_used, - Lmax, - exx_lmax, - lmax_orb, - lmax_beta, + const int Lmax = lmax_orb + 1; + const int Lmax_used = 2 * lmax_orb + 1; + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, @@ -435,44 +422,44 @@ void toWannier90_LCAO::unkdotkb(const UnitCell& ucell, ModuleBase::GlobalFunc::ZEROS(out_matrix, nloc); #ifdef __MPI - pzgemm_(&transa, - &transb, - &Bands, - &nlocal, - &nlocal, - &alpha, + ScalapackConnector::gemm(transa, + transb, + Bands, + nlocal, + nlocal, + alpha, &psi_in(ik, 0, 0), - &one, - &one, + one, + one, this->ParaV->desc, midmatrix, - &one, - &one, + one, + one, this->ParaV->desc, - &beta, + beta, C_matrix, - &one, - &one, + one, + one, this->ParaV->desc); - pzgemm_(&transb, - &transb, - &Bands, - &Bands, - &nlocal, - &alpha, + ScalapackConnector::gemm(transb, + transb, + Bands, + Bands, + nlocal, + alpha, C_matrix, - &one, - &one, + one, + one, this->ParaV->desc, &psi_in(ikb, 0, 0), - &one, - &one, + one, + one, this->ParaV->desc, - &beta, + beta, out_matrix, - &one, - &one, + one, + one, this->ParaV->desc); #endif diff --git a/source/source_io/to_wannier90_lcao.h b/source/source_io/module_wannier/to_wannier90_lcao.h similarity index 98% rename from source/source_io/to_wannier90_lcao.h rename to source/source_io/module_wannier/to_wannier90_lcao.h index fa75293d9b..6681dadece 100644 --- a/source/source_io/to_wannier90_lcao.h +++ b/source/source_io/module_wannier/to_wannier90_lcao.h @@ -22,9 +22,8 @@ #include "source_lcao/center2_orb-orb21.h" #include "source_lcao/center2_orb.h" #include "source_lcao/wavefunc_in_pw.h" -#include "source_pw/module_pwdft/global.h" #include "source_psi/psi.h" -#include "single_R_io.h" +#include "../module_hs/single_R_io.h" #include "to_wannier90.h" #include diff --git a/source/source_io/to_wannier90_lcao_in_pw.cpp b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.cpp similarity index 97% rename from source/source_io/to_wannier90_lcao_in_pw.cpp rename to source/source_io/module_wannier/to_wannier90_lcao_in_pw.cpp index 1f0019241c..48d3e7ae65 100644 --- a/source/source_io/to_wannier90_lcao_in_pw.cpp +++ b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.cpp @@ -1,15 +1,14 @@ #include "to_wannier90_lcao_in_pw.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/math_integral.h" #include "source_base/math_polyint.h" #include "source_base/math_sphbes.h" #include "source_base/math_ylmreal.h" #include "source_base/parallel_reduce.h" -#include "binstream.h" +#include "../module_output/binstream.h" -#include "source_psi/psi_initializer_nao.h" +#include "source_psi/psi_init_nao.h" #ifdef __LCAO toWannier90_LCAO_IN_PW::toWannier90_LCAO_IN_PW( const bool &out_wannier_mmn, @@ -45,7 +44,7 @@ void toWannier90_LCAO_IN_PW::calculate( Structure_Factor* sf_ptr = const_cast(&sf); ModulePW::PW_Basis_K* wfcpw_ptr = const_cast(wfcpw); delete this->psi_initer_; - this->psi_initer_ = new psi_initializer_nao>(); + this->psi_initer_ = new psi_init_nao>(); this->psi_initer_->initialize(sf_ptr, wfcpw_ptr, &ucell, &kv, 1, nullptr, GlobalV::MY_RANK); this->psi_initer_->tabulate(); delete this->psi; diff --git a/source/source_io/to_wannier90_lcao_in_pw.h b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h similarity index 98% rename from source/source_io/to_wannier90_lcao_in_pw.h rename to source/source_io/module_wannier/to_wannier90_lcao_in_pw.h index cf6d5fc915..763c050a81 100644 --- a/source/source_io/to_wannier90_lcao_in_pw.h +++ b/source/source_io/module_wannier/to_wannier90_lcao_in_pw.h @@ -16,9 +16,8 @@ #include "source_basis/module_ao/ORB_read.h" #include "source_cell/klist.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" #include "source_psi/psi.h" -#include "single_R_io.h" +#include "../module_hs/single_R_io.h" #include "to_wannier90.h" #include "to_wannier90_pw.h" diff --git a/source/source_io/to_wannier90_pw.cpp b/source/source_io/module_wannier/to_wannier90_pw.cpp similarity index 99% rename from source/source_io/to_wannier90_pw.cpp rename to source/source_io/module_wannier/to_wannier90_pw.cpp index 9c33cf4976..3f6af1d44e 100644 --- a/source/source_io/to_wannier90_pw.cpp +++ b/source/source_io/module_wannier/to_wannier90_pw.cpp @@ -1,13 +1,13 @@ #include "to_wannier90_pw.h" +#include "source_base/parallel_comm.h" // use POOL_WORLD #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/math_integral.h" #include "source_base/math_polyint.h" #include "source_base/math_sphbes.h" #include "source_base/math_ylmreal.h" #include "source_base/parallel_reduce.h" -#include "binstream.h" +#include "../module_output/binstream.h" toWannier90_PW::toWannier90_PW( const bool &out_wannier_mmn, diff --git a/source/source_io/to_wannier90_pw.h b/source/source_io/module_wannier/to_wannier90_pw.h similarity index 100% rename from source/source_io/to_wannier90_pw.h rename to source/source_io/module_wannier/to_wannier90_pw.h diff --git a/source/source_io/get_wf_lcao.cpp b/source/source_io/module_wf/get_wf_lcao.cpp similarity index 99% rename from source/source_io/get_wf_lcao.cpp rename to source/source_io/module_wf/get_wf_lcao.cpp index 7d6cd0d15c..4fd6c9a5f3 100644 --- a/source/source_io/get_wf_lcao.cpp +++ b/source/source_io/module_wf/get_wf_lcao.cpp @@ -1,7 +1,7 @@ #include "get_wf_lcao.h" -#include "source_io/cube_io.h" -#include "source_io/write_wfc_pw.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_wf/write_wfc_pw.h" #include "source_base/memory.h" #include "source_lcao/module_gint/gint_env_gamma.h" @@ -480,6 +480,7 @@ template int Get_wf_lcao::set_wfc_grid(const int naroc[2], const double* in, double** out, const std::vector& trace_lo); + template int Get_wf_lcao::set_wfc_grid(const int naroc[2], const int nb, const int dim0, @@ -512,7 +513,7 @@ void Get_wf_lcao::wfc_2d_to_grid(const T* lowf_2d, MPI_Comm_rank(pv.comm(), &rank); // calculate the maximum number of nlocal over all processes in pv.comm() range - long buf_size; + long buf_size = 0; mpi_info = MPI_Reduce(&pv.nloc_wfc, &buf_size, 1, MPI_LONG, MPI_MAX, 0, pv.comm()); mpi_info = MPI_Bcast(&buf_size, 1, MPI_LONG, 0, pv.comm()); // get and then broadcast std::vector lowf_block(buf_size); diff --git a/source/source_io/get_wf_lcao.h b/source/source_io/module_wf/get_wf_lcao.h similarity index 100% rename from source/source_io/get_wf_lcao.h rename to source/source_io/module_wf/get_wf_lcao.h diff --git a/source/source_io/get_wf_pw.h b/source/source_io/module_wf/get_wf_pw.h similarity index 100% rename from source/source_io/get_wf_pw.h rename to source/source_io/module_wf/get_wf_pw.h diff --git a/source/source_io/read_wf2rho_pw.cpp b/source/source_io/module_wf/read_wf2rho_pw.cpp similarity index 98% rename from source/source_io/read_wf2rho_pw.cpp rename to source/source_io/module_wf/read_wf2rho_pw.cpp index 1be65a268c..55e5e80822 100644 --- a/source/source_io/read_wf2rho_pw.cpp +++ b/source/source_io/module_wf/read_wf2rho_pw.cpp @@ -2,11 +2,10 @@ #include "read_wfc_pw.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_io/module_parameter/parameter.h" #include "source_estate/kernels/elecstate_op.h" -#include "source_io/filename.h" +#include "source_io/module_output/filename.h" void ModuleIO::read_wf2rho_pw( const ModulePW::PW_Basis_K* pw_wfc, diff --git a/source/source_io/read_wf2rho_pw.h b/source/source_io/module_wf/read_wf2rho_pw.h similarity index 100% rename from source/source_io/read_wf2rho_pw.h rename to source/source_io/module_wf/read_wf2rho_pw.h diff --git a/source/source_io/read_wfc_nao.cpp b/source/source_io/module_wf/read_wfc_nao.cpp similarity index 98% rename from source/source_io/read_wfc_nao.cpp rename to source/source_io/module_wf/read_wfc_nao.cpp index 984e6298ac..188f3abe6c 100644 --- a/source/source_io/read_wfc_nao.cpp +++ b/source/source_io/module_wf/read_wfc_nao.cpp @@ -2,11 +2,11 @@ #include "source_base/parallel_common.h" #include "source_base/timer.h" -#include "source_io/write_wfc_nao.h" +#include "source_io/module_wf/write_wfc_nao.h" -#include "write_wfc_nao.h" +#include "source_io/module_wf/write_wfc_nao.h" #include "source_base/module_external/scalapack_connector.h" -#include "source_io/filename.h" +#include "source_io/module_output/filename.h" #include "source_base/tool_title.h" // use title #include "source_base/global_function.h" // use READ_VALUE diff --git a/source/source_io/read_wfc_nao.h b/source/source_io/module_wf/read_wfc_nao.h similarity index 100% rename from source/source_io/read_wfc_nao.h rename to source/source_io/module_wf/read_wfc_nao.h diff --git a/source/source_io/read_wfc_pw.cpp b/source/source_io/module_wf/read_wfc_pw.cpp similarity index 99% rename from source/source_io/read_wfc_pw.cpp rename to source/source_io/module_wf/read_wfc_pw.cpp index 981a0e6211..66b58ae517 100644 --- a/source/source_io/read_wfc_pw.cpp +++ b/source/source_io/module_wf/read_wfc_pw.cpp @@ -1,7 +1,7 @@ #include "read_wfc_pw.h" #include "source_io/module_parameter/parameter.h" -#include "binstream.h" +#include "source_io/module_output/binstream.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" #include "source_base/parallel_common.h" diff --git a/source/source_io/read_wfc_pw.h b/source/source_io/module_wf/read_wfc_pw.h similarity index 100% rename from source/source_io/read_wfc_pw.h rename to source/source_io/module_wf/read_wfc_pw.h diff --git a/source/source_io/write_wfc_nao.cpp b/source/source_io/module_wf/write_wfc_nao.cpp similarity index 99% rename from source/source_io/write_wfc_nao.cpp rename to source/source_io/module_wf/write_wfc_nao.cpp index ccb7e50827..1ea1717c29 100644 --- a/source/source_io/write_wfc_nao.cpp +++ b/source/source_io/module_wf/write_wfc_nao.cpp @@ -8,8 +8,8 @@ #include "source_base/module_external/scalapack_connector.h" #include "source_base/global_variable.h" #include "source_base/global_function.h" -#include "binstream.h" -#include "filename.h" +#include "source_io/module_output/binstream.h" +#include "source_io/module_output/filename.h" namespace ModuleIO { diff --git a/source/source_io/write_wfc_nao.h b/source/source_io/module_wf/write_wfc_nao.h similarity index 100% rename from source/source_io/write_wfc_nao.h rename to source/source_io/module_wf/write_wfc_nao.h diff --git a/source/source_io/write_wfc_pw.cpp b/source/source_io/module_wf/write_wfc_pw.cpp similarity index 99% rename from source/source_io/write_wfc_pw.cpp rename to source/source_io/module_wf/write_wfc_pw.cpp index c677eafcca..0a8a7cf912 100644 --- a/source/source_io/write_wfc_pw.cpp +++ b/source/source_io/module_wf/write_wfc_pw.cpp @@ -4,12 +4,12 @@ #include "mpi.h" #endif -#include "binstream.h" +#include "source_io/module_output/binstream.h" #include "source_base/global_variable.h" #include "source_base/parallel_global.h" #include "source_base/tool_title.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/filename.h" +#include "source_io/module_output/filename.h" void ModuleIO::write_wfc_pw( const int istep, diff --git a/source/source_io/write_wfc_pw.h b/source/source_io/module_wf/write_wfc_pw.h similarity index 100% rename from source/source_io/write_wfc_pw.h rename to source/source_io/module_wf/write_wfc_pw.h diff --git a/source/source_io/output_mat_sparse.cpp b/source/source_io/output_mat_sparse.cpp deleted file mode 100644 index 7381c61391..0000000000 --- a/source/source_io/output_mat_sparse.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "output_mat_sparse.h" - -#include "source_io/cal_r_overlap_R.h" -#include "source_io/write_HS_R.h" - -namespace ModuleIO -{ - -template <> -void output_mat_sparse(const bool& out_mat_hsR, - const bool& out_mat_dh, - const bool& out_mat_ds, - const bool& out_mat_t, - const bool& out_mat_r, - const int& istep, - const ModuleBase::matrix& v_eff, - const Parallel_Orbitals& pv, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - UnitCell& ucell, - const Grid_Driver& grid, - const K_Vectors& kv, - hamilt::Hamilt* p_ham) -{ -} - -template <> -void output_mat_sparse(const bool& out_mat_hsR, - const bool& out_mat_dh, - const bool& out_mat_ds, - const bool& out_mat_t, - const bool& out_mat_r, - const int& istep, - const ModuleBase::matrix& v_eff, - const Parallel_Orbitals& pv, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - UnitCell& ucell, - const Grid_Driver& grid, - const K_Vectors& kv, - hamilt::Hamilt>* p_ham) -{ - LCAO_HS_Arrays HS_Arrays; // store sparse arrays - - //! generate a file containing the Hamiltonian and S(overlap) matrices - if (out_mat_hsR) - { - output_HSR(ucell,istep, v_eff, pv, HS_Arrays, grid, kv, p_ham); - } - - //! generate a file containing the kinetic energy matrix - if (out_mat_t) - { - output_TR(istep, ucell, pv, HS_Arrays, grid, two_center_bundle, orb); - } - - //! generate a file containing the derivatives of the Hamiltonian matrix (in Ry/Bohr) - if (out_mat_dh) - { - output_dHR(istep, - v_eff, - ucell, - pv, - HS_Arrays, - grid, // mohan add 2024-04-06 - two_center_bundle, - orb, - kv); // LiuXh add 2019-07-15 - } - //! generate a file containing the derivatives of the overlap matrix (in Ry/Bohr) - if (out_mat_ds) - { - output_dSR(istep, - ucell, - pv, - HS_Arrays, - grid, // mohan add 2024-04-06 - two_center_bundle, - orb, - kv); - } - - // add by jingan for out r_R matrix 2019.8.14 - if (out_mat_r) - { - cal_r_overlap_R r_matrix; - r_matrix.init(ucell, pv, orb); - if (out_mat_hsR) - { - r_matrix.out_rR_other(ucell,istep, HS_Arrays.output_R_coor); - } - else - { - r_matrix.out_rR(ucell, grid, istep); - } - } - - return; -} - -} // namespace ModuleIO diff --git a/source/source_io/parse_args.cpp b/source/source_io/parse_args.cpp index 9d172e2469..08974d1de2 100644 --- a/source/source_io/parse_args.cpp +++ b/source/source_io/parse_args.cpp @@ -1,14 +1,121 @@ #include "parse_args.h" +#include "build_info.h" #include #include +#include +#include -#include "source_io/read_input.h" +#include "module_parameter/read_input.h" #include "source_main/version.h" +#if defined(COMMIT_INFO) +#include "commit.h" +#endif + namespace ModuleIO { +void print_build_info() +{ + const int label_width = 30; + + auto print_section = [](const std::string& title) { + std::cout << std::endl; + std::cout << "----------------- " << title << " -----------------" << std::endl; + }; + + auto print_info = [label_width](const std::string& label, const std::string& value) { + std::cout << std::left << std::setw(label_width) << (label + ":") << " " << value << std::endl; + }; + + // --- 1. Core & Platform Info --- + print_section("ABACUS Core & Platform"); + print_info("ABACUS Version", VERSION); +#if defined(COMMIT) + print_info("Git Commit", COMMIT); +#else + print_info("Git Commit", "N/A"); +#endif + print_info("Target Platform", ABACUS_PLATFORM_NAME); + print_info("Build Type", ABACUS_BUILD_TYPE); + + // --- 2. Build Environment --- + print_section("Build Environment"); + print_info("Built By", ABACUS_BUILD_USER); + print_info("Built On", ABACUS_BUILD_HOST); + print_info("Built At", std::string(__DATE__) + " " + __TIME__); + + // --- 3. Compiler Info --- + print_section("Compiler & Flags"); + print_info("C++ Compiler", std::string(ABACUS_CXX_COMPILER_ID) + " (" + ABACUS_CXX_COMPILER_PATH + ")"); + print_info("C++ Compiler Ver", ABACUS_CXX_COMPILER_VERSION); + print_info("C++ Flags", ABACUS_CXX_FLAGS); + print_info("Linker Flags", ABACUS_LINKER_FLAGS); + print_info("CUDA Flags", ABACUS_CUDA_FLAGS); + + // --- 4. Sanitizers & Debugging --- + print_section("Sanitizers & Debugging"); + print_info("AddressSanitizer", ABACUS_ASAN_STATUS); + print_info("Debug Symbols", ABACUS_DEBUG_SYMBOLS); + + // --- 5. CMake Configuration Summary --- + print_section("CMake Configuration Summary"); + std::cout << ABACUS_CMAKE_OPTIONS << std::endl; + std::cout << std::endl; + std::cout << ABACUS_CMAKE_FIND_PACKAGES << std::endl; + + // --- 6. Parallelism & Communication --- + print_section("Parallelism & Communication"); + print_info("MPI Implementation", ABACUS_MPI_IMPLEMENTATION); + print_info("MPI Version", ABACUS_MPI_VERSION); + print_info("CUDA-aware MPI", ABACUS_CUDA_AWARE_MPI); + print_info("OpenMP Support", ABACUS_OPENMP_VERSION); + + // --- 7. Core Math Libraries --- + print_section("Core Math Libraries"); +#if defined(__LCAO) + print_info("LCAO Algorithm", "yes"); +#else + print_info("LCAO Algorithm", "no"); +#endif + print_info("ELPA Support", ABACUS_ELPA_VERSION); + print_info("MKL Support", ABACUS_MKL_SUPPORT); + print_info("LibXC Support", ABACUS_LIBXC_VERSION); + print_info("FFTW Support", ABACUS_FFTW_VERSION); + + // --- 8. Accelerators & Specific Hardware --- + print_section("Accelerators & Hardware"); + print_info("NVIDIA CUDA Support", ABACUS_CUDA_VERSION); + print_info("AMD ROCm Support", ABACUS_ROCM_VERSION); + print_info("CUSOLVERMP Support", ABACUS_CUSOLVERMP_VERSION); + + // --- 9. Hybrid Functional Libraries --- + print_section("Hybrid Functional Libraries"); + print_info("Cereal Serialization", ABACUS_CEREAL_VERSION); + print_info("LibRI Support", ABACUS_LIBRI_VERSION); + print_info("LibComm Support", ABACUS_LIBCOMM_VERSION); + + // --- 10. AI & Machine Learning --- + print_section("AI & Machine Learning"); + print_info("LibTorch Support", ABACUS_LIBTORCH_VERSION); + print_info("Libnpy Support", ABACUS_LIBNPY_VERSION); + print_info("DeePMD-kit Support", ABACUS_DEEPMD_VERSION); + print_info("NEP Support", ABACUS_NEP_VERSION); + print_info("TensorFlow Support", ABACUS_TENSORFLOW_VERSION); + + // --- 11. Testing & Other Libraries --- + print_section("Testing & Other Libraries"); + print_info("GTest Support", ABACUS_GTEST_VERSION); + print_info("Google Benchmark", ABACUS_GOOGLEBENCH_VERSION); + print_info("RapidJSON Support", ABACUS_RAPIDJSON_VERSION); + print_info("PEXSI Support", ABACUS_PEXSI_VERSION); + print_info("cnpy Support", ABACUS_CNPY_VERSION); + + std::cout << "----------------------------------------------------" << std::endl; + std::cout << std::endl; +} + void parse_args(int argc, char** argv) { for (int i = 1; i < argc; ++i) // Start from 1 to skip the program name @@ -16,7 +123,7 @@ void parse_args(int argc, char** argv) std::string arg = argv[i]; if (arg == "--version" || arg == "-v" || arg == "-V") { -#ifdef VERSION +#if defined(VERSION) const char* version = VERSION; #else const char* version = "unknown"; @@ -24,16 +131,25 @@ void parse_args(int argc, char** argv) std::cout << "ABACUS version " << version << std::endl; std::exit(0); } + else if (arg == "--info" || arg == "-i" || arg == "-I") + { + print_build_info(); + std::exit(0); + } else if (arg == "--check-input") { ModuleIO::ReadInput::check_mode = true; } else { - std::cerr << "Unknown argument: " << arg << std::endl; + std::cerr << "Error: Unknown argument: " << arg << std::endl; + std::cerr << "Usage: abacus [options]" << std::endl; + std::cerr << " -v, -V, --version Display version information." << std::endl; + std::cerr << " -i, -I, --info Display detailed build information." << std::endl; + std::cerr << " --check-input Check input file syntax and exit." << std::endl; std::exit(1); } } } -} // namespace ModuleIO \ No newline at end of file +} // namespace ModuleIO diff --git a/source/source_io/parse_args.h b/source/source_io/parse_args.h index c2a246946e..24d99ec5e6 100644 --- a/source/source_io/parse_args.h +++ b/source/source_io/parse_args.h @@ -4,8 +4,10 @@ namespace ModuleIO { /** - * @brief This function reture the version information when using command - * "abacus --version", "abacus -v" or "abacus -V". Otherwise, it does nothing. + * @brief This function returns the version information when using command + * "abacus --version", "abacus -v" or "abacus -V"; returns the compilation + * details when using command "abacus --info", "abacus -i" or "abacus -I"; + * otherwise, it returns usage. * * @param [in] argc (ARGument Count) is an integer variable that stores the number * of command-line arguments passed by the user including the name of the program. @@ -18,6 +20,7 @@ namespace ModuleIO * arguments. */ void parse_args(int argc, char** argv); +void print_build_info(); } // namespace ModuleIO -#endif \ No newline at end of file +#endif diff --git a/source/source_io/td_current_io.h b/source/source_io/td_current_io.h deleted file mode 100644 index 5158d1de26..0000000000 --- a/source/source_io/td_current_io.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef TD_CURRENT_IO_H -#define TD_CURRENT_IO_H - -#include "source_basis/module_nao/two_center_bundle.h" -#include "source_estate/elecstate_lcao.h" -#include "source_estate/module_dm/density_matrix.h" -#include "source_psi/psi.h" -#include "source_lcao/module_rt/velocity_op.h" - -namespace ModuleIO -{ -#ifdef __LCAO -/// @brief func to output current, only used in tddft -template -void write_current_eachk(const UnitCell& ucell, - const int istep, - const psi::Psi>* psi, - const elecstate::ElecState* pelec, - const K_Vectors& kv, - const TwoCenterIntegrator* intor, - const Parallel_Orbitals* pv, - const LCAO_Orbitals& orb, - const Velocity_op* cal_current, - Record_adj& ra); -template -void write_current(const UnitCell& ucell, - const int istep, - const psi::Psi>* psi, - const elecstate::ElecState* pelec, - const K_Vectors& kv, - const TwoCenterIntegrator* intor, - const Parallel_Orbitals* pv, - const LCAO_Orbitals& orb, - const Velocity_op* cal_current, - Record_adj& ra); - -/// @brief calculate sum_n[𝜌_(𝑛𝑘,𝜇𝜈)] for current calculation -void cal_tmp_DM_k(const UnitCell& ucell, - elecstate::DensityMatrix, double>& DM_real, - elecstate::DensityMatrix, double>& DM_imag, - const int ik, - const int nspin, - const int is, - const bool reset = true); - -void cal_tmp_DM(const UnitCell& ucell, - elecstate::DensityMatrix, double>& DM_real, - elecstate::DensityMatrix, double>& DM_imag, - const int nspin); - -#endif // __LCAO -} // namespace ModuleIO -#endif diff --git a/source/source_io/test/CMakeLists.txt b/source/source_io/test/CMakeLists.txt index 48b52a2054..4bd304a27b 100644 --- a/source/source_io/test/CMakeLists.txt +++ b/source/source_io/test/CMakeLists.txt @@ -8,7 +8,7 @@ install(FILES INPUTs DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) AddTest( TARGET MODULE_IO_input_test_para - LIBS parameter ${math_libs} base device io_input + LIBS parameter ${math_libs} base device io_input SOURCES read_input_ptest.cpp ) @@ -19,8 +19,8 @@ add_test(NAME MODULE_IO_input_test_para_4 AddTest( TARGET MODULE_IO_read_exit_file_test - LIBS parameter ${math_libs} base device - SOURCES read_exit_file_test.cpp ../read_exit_file.cpp + LIBS parameter ${math_libs} base device + SOURCES read_exit_file_test.cpp ../module_output/read_exit_file.cpp ) add_test(NAME MODULE_IO_read_exit_file_test_para_4 @@ -31,54 +31,55 @@ add_test(NAME MODULE_IO_read_exit_file_test_para_4 AddTest( TARGET MODULE_IO_output_test LIBS parameter ${math_libs} base device - SOURCES output_test.cpp ../output.cpp + SOURCES output_test.cpp ../module_output/output.cpp ) AddTest( TARGET MODULE_IO_binstream_test - SOURCES binstream_test.cpp ../binstream.cpp + SOURCES binstream_test.cpp ../module_output/binstream.cpp ) AddTest( TARGET MODULE_IO_write_eig_occ_test - LIBS parameter ${math_libs} base device symmetry - SOURCES write_eig_occ_test.cpp ../write_eig_occ.cpp ../output.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/klist.cpp ../../source_cell/k_vector_utils.cpp - ../cif_io.cpp + LIBS parameter ${math_libs} base device symmetry + SOURCES write_eig_occ_test.cpp ../module_energy/write_eig_occ.cpp ../module_output/output.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/klist.cpp ../../source_cell/k_vector_utils.cpp + ../module_output/cif_io.cpp ) AddTest( TARGET MODULE_IO_cal_dos LIBS parameter ${math_libs} base device - SOURCES cal_dos_test.cpp ../cal_dos.cpp + SOURCES cal_dos_test.cpp ../module_dos/cal_dos.cpp ) AddTest( TARGET MODULE_IO_write_dos_pw LIBS parameter ${math_libs} base device symmetry - SOURCES write_dos_pw_test.cpp ../cal_dos.cpp ../write_dos_pw.cpp ../output.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/klist.cpp ../nscf_fermi_surf.cpp ../../source_cell/k_vector_utils.cpp + SOURCES write_dos_pw_test.cpp ../module_dos/cal_dos.cpp ../module_dos/write_dos_pw.cpp ../module_output/output.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/klist.cpp ../module_energy/nscf_fermi_surf.cpp ../../source_cell/k_vector_utils.cpp ) AddTest( TARGET MODULE_IO_print_info - LIBS parameter ${math_libs} base device symmetry cell_info - SOURCES print_info_test.cpp ../print_info.cpp ../output.cpp ../../source_cell/klist.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/k_vector_utils.cpp + LIBS parameter ${math_libs} base device symmetry cell_info + SOURCES print_info_test.cpp ../module_output/print_info.cpp ../module_output/output.cpp ../../source_cell/klist.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/k_vector_utils.cpp ) AddTest( TARGET MODULE_IO_single_R_test LIBS parameter ${math_libs} - SOURCES single_R_io_test.cpp ../single_R_io.cpp - ../../source_base/global_variable.cpp + SOURCES single_R_io_test.cpp ../module_hs/single_R_io.cpp + ../../source_base/global_variable.cpp ../../source_base/parallel_reduce.cpp ../../source_base/parallel_common.cpp ../../source_base/parallel_global.cpp ../../source_base/parallel_comm.cpp + ../../source_base/tool_quit.cpp ../../source_base/global_file.cpp ../../source_base/global_function.cpp ../../source_base/memory.cpp ../../source_base/timer.cpp ) AddTest( TARGET MODULE_IO_write_wfc_nao LIBS parameter ${math_libs} base psi device - SOURCES write_wfc_nao_test.cpp ../filename.cpp ../write_wfc_nao.cpp ../../source_basis/module_ao/parallel_orbitals.cpp ../binstream.cpp + SOURCES write_wfc_nao_test.cpp ../module_output/filename.cpp ../module_wf/write_wfc_nao.cpp ../../source_basis/module_ao/parallel_orbitals.cpp ../module_output/binstream.cpp ) install(FILES write_wfc_nao_para.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -90,72 +91,73 @@ add_test(NAME MODULE_IO_write_wfc_nao_para AddTest( TARGET MODULE_IO_write_orb_info - LIBS parameter ${math_libs} base device cell_info - SOURCES write_orb_info_test.cpp ../write_orb_info.cpp ../output.cpp + LIBS parameter ${math_libs} base device cell_info + SOURCES write_orb_info_test.cpp ../module_output/write_orb_info.cpp ../module_output/output.cpp ) AddTest( TARGET MODULE_IO_parse_args + LIBS parameter ${math_libs} base device io_input SOURCES parse_args_test.cpp ../parse_args.cpp ) AddTest( TARGET MODULE_IO_bessel_basis_test LIBS parameter ${math_libs} base device - SOURCES bessel_basis_test.cpp ../bessel_basis.cpp + SOURCES bessel_basis_test.cpp ../module_bessel/bessel_basis.cpp ) AddTest( TARGET MODULE_IO_output_log_test - LIBS parameter base ${math_libs} device - SOURCES ../output_log.cpp outputlog_test.cpp ../../source_basis/module_pw/test/test_tool.cpp + LIBS parameter base ${math_libs} device + SOURCES ../module_output/output_log.cpp outputlog_test.cpp ../../source_basis/module_pw/test/test_tool.cpp ) AddTest( TARGET MODULE_IO_sparse_matrix_test LIBS parameter base ${math_libs} device - SOURCES sparse_matrix_test.cpp ../sparse_matrix.cpp + SOURCES sparse_matrix_test.cpp ../module_output/sparse_matrix.cpp ) AddTest( TARGET MODULE_IO_file_reader_test LIBS parameter base ${math_libs} device - SOURCES file_reader_test.cpp ../file_reader.cpp + SOURCES file_reader_test.cpp ../module_output/file_reader.cpp ) AddTest( TARGET MODULE_IO_csr_reader_test LIBS parameter base ${math_libs} device - SOURCES csr_reader_test.cpp ../csr_reader.cpp ../file_reader.cpp ../sparse_matrix.cpp + SOURCES csr_reader_test.cpp ../module_output/csr_reader.cpp ../module_output/file_reader.cpp ../module_output/sparse_matrix.cpp ) AddTest( TARGET MODULE_IO_read_rhog_test LIBS parameter ${math_libs} base device planewave - SOURCES read_rhog_test.cpp ../rhog_io.cpp ../binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp + SOURCES read_rhog_test.cpp ../module_chgpot/rhog_io.cpp ../module_output/binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp ) if(ENABLE_LCAO) AddTest( TARGET MODULE_IO_to_qo_test - LIBS parameter base ${math_libs} device numerical_atomic_orbitals container orb - SOURCES + LIBS parameter base ${math_libs} device numerical_atomic_orbitals container orb + SOURCES to_qo_test.cpp - ../to_qo_kernel.cpp - ../to_qo_mpi.cpp - ../to_qo_structures.cpp + ../module_qo/to_qo_kernel.cpp + ../module_qo/to_qo_mpi.cpp + ../module_qo/to_qo_structures.cpp ../../source_cell/atom_spec.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/test/support/mock_unitcell.cpp ../../source_lcao/center2_orb.cpp - ../orb_io.cpp + ../module_output/orb_io.cpp ) endif() AddTest( TARGET MODULE_IO_read_wfc_pw_test LIBS parameter base ${math_libs} device planewave - SOURCES read_wfc_pw_test.cpp ../read_wfc_pw.cpp ../binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp + SOURCES read_wfc_pw_test.cpp ../module_wf/read_wfc_pw.cpp ../module_output/binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp ) add_test(NAME MODULE_IO_read_wfc_pw_test_parallel @@ -166,7 +168,7 @@ add_test(NAME MODULE_IO_read_wfc_pw_test_parallel AddTest( TARGET MODULE_IO_read_wf2rho_pw_test LIBS parameter base ${math_libs} device planewave psi - SOURCES read_wf2rho_pw_test.cpp ../read_wfc_pw.cpp ../read_wf2rho_pw.cpp ../binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_estate/module_charge/charge_mpi.cpp ../filename.cpp ../write_wfc_pw.cpp + SOURCES read_wf2rho_pw_test.cpp ../module_wf/read_wfc_pw.cpp ../module_wf/read_wf2rho_pw.cpp ../module_output/binstream.cpp ../../source_basis/module_pw/test/test_tool.cpp ../../source_estate/module_charge/charge_mpi.cpp ../module_output/filename.cpp ../module_wf/write_wfc_pw.cpp ) add_test(NAME MODULE_IO_read_wf2rho_pw_parallel @@ -177,21 +179,21 @@ add_test(NAME MODULE_IO_read_wf2rho_pw_parallel AddTest( TARGET MODULE_IO_numerical_basis_test - LIBS parameter base ${math_libs} device numerical_atomic_orbitals container orb - SOURCES numerical_basis_test.cpp - ../numerical_basis_jyjy.cpp + LIBS parameter base ${math_libs} device numerical_atomic_orbitals container orb + SOURCES numerical_basis_test.cpp + ../module_bessel/numerical_basis_jyjy.cpp ../../source_lcao/center2_orb.cpp - ../orb_io.cpp + ../module_output/orb_io.cpp ) AddTest( TARGET MODULE_IO_mulliken_test LIBS parameter base ${math_libs} device - SOURCES output_mulliken_test.cpp output_mulliken_mock.cpp ../output_mulliken.cpp + SOURCES output_mulliken_test.cpp output_mulliken_mock.cpp ../module_mulliken/output_mulliken.cpp ../../source_cell/cell_index.cpp ../../source_basis/module_ao/parallel_orbitals.cpp - ../orb_io.cpp + ../module_output/orb_io.cpp ) #if(ENABLE_LCAO) @@ -211,7 +213,7 @@ AddTest( AddTest( TARGET MODULE_IO_cif_io_test LIBS parameter base ${math_libs} device - SOURCES cif_io_test.cpp ../cif_io.cpp + SOURCES cif_io_test.cpp ../module_output/cif_io.cpp ) add_test(NAME MODULE_IO_cif_io_test_parallel @@ -222,7 +224,7 @@ add_test(NAME MODULE_IO_cif_io_test_parallel AddTest( TARGET MODULE_IO_orb_io_test LIBS parameter base ${math_libs} device - SOURCES orb_io_test.cpp ../orb_io.cpp + SOURCES orb_io_test.cpp ../module_output/orb_io.cpp ) add_test(NAME MODULE_IO_orb_io_test_parallel @@ -232,8 +234,8 @@ add_test(NAME MODULE_IO_orb_io_test_parallel AddTest( TARGET MODULE_IO_write_dmk - LIBS parameter ${math_libs} base device cell_info - SOURCES write_dmk_test.cpp ../write_dmk.cpp ../output.cpp + LIBS parameter ${math_libs} base device cell_info + SOURCES ../module_dm/test/write_dmk_test.cpp ../module_dm/write_dmk.cpp ../module_output/output.cpp ) add_test( @@ -245,7 +247,7 @@ add_test( AddTest( TARGET MODULE_IO_read_wfc_nao_test LIBS parameter ${math_libs} base device - SOURCES read_wfc_nao_test.cpp ../read_wfc_nao.cpp ../../source_psi/psi.cpp ../../source_basis/module_ao/parallel_orbitals.cpp + SOURCES read_wfc_nao_test.cpp ../module_wf/read_wfc_nao.cpp ../../source_psi/psi.cpp ../../source_basis/module_ao/parallel_orbitals.cpp ) add_test( @@ -258,9 +260,9 @@ if(ENABLE_LCAO) AddTest( TARGET MODULE_IO_cal_pLpR_test LIBS parameter base ${math_libs} device neighbor - SOURCES - cal_pLpR_test.cpp - ../cal_pLpR.cpp + SOURCES + cal_pLpR_test.cpp + ../module_hs/cal_pLpR.cpp ../../source_basis/module_ao/ORB_atomic_lm.cpp ../../source_basis/module_ao/ORB_atomic.cpp ../../source_basis/module_nao/radial_set.cpp @@ -276,3 +278,9 @@ AddTest( ../../source_basis/module_nao/radial_collection.cpp ) endif() + +AddTest( + TARGET MODULE_IO_write_elf_logic_test + SOURCES write_elf_logic_test.cpp +) + diff --git a/source/source_io/test/bessel_basis_test.cpp b/source/source_io/test/bessel_basis_test.cpp index 82728e5af4..6224bf35c0 100644 --- a/source/source_io/test/bessel_basis_test.cpp +++ b/source/source_io/test/bessel_basis_test.cpp @@ -12,7 +12,7 @@ #include -#include "../bessel_basis.h" +#include "../module_bessel/bessel_basis.h" #include "../../source_cell/unitcell.h" #include "../../source_estate/magnetism.h" diff --git a/source/source_io/test/binstream_test.cpp b/source/source_io/test/binstream_test.cpp index c83ea07114..0ecd1d8487 100644 --- a/source/source_io/test/binstream_test.cpp +++ b/source/source_io/test/binstream_test.cpp @@ -12,7 +12,7 @@ * - Close a binary file */ -#include "../binstream.h" +#include "../module_output/binstream.h" class BinstreamTest : public testing::Test { diff --git a/source/source_io/test/cal_dos_test.cpp b/source/source_io/test/cal_dos_test.cpp index f52447a6cf..cc8448dd27 100644 --- a/source/source_io/test/cal_dos_test.cpp +++ b/source/source_io/test/cal_dos_test.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "source_io/cal_dos.h" +#include "source_io/module_dos/cal_dos.h" #include "source_base/global_variable.h" #include #ifdef __MPI diff --git a/source/source_io/test/cal_pLpR_test.cpp b/source/source_io/test/cal_pLpR_test.cpp index 40d5a976cc..2dad5f663d 100644 --- a/source/source_io/test/cal_pLpR_test.cpp +++ b/source/source_io/test/cal_pLpR_test.cpp @@ -4,7 +4,7 @@ #include #include -#include "source_io/cal_pLpR.h" +#include "source_io/module_hs/cal_pLpR.h" #include "source_basis/module_nao/two_center_integrator.h" #include "source_basis/module_nao/radial_collection.h" #include "source_base/spherical_bessel_transformer.h" diff --git a/source/source_io/test/cif_io_test.cpp b/source/source_io/test/cif_io_test.cpp index c8323f4771..5d7a1c2337 100644 --- a/source/source_io/test/cif_io_test.cpp +++ b/source/source_io/test/cif_io_test.cpp @@ -1,5 +1,5 @@ #include -#include "source_io/cif_io.h" +#include "source_io/module_output/cif_io.h" #include #include #include "source_base/formatter.h" diff --git a/source/source_io/test/csr_reader_test.cpp b/source/source_io/test/csr_reader_test.cpp index e42ad335c7..75d53a3ce8 100644 --- a/source/source_io/test/csr_reader_test.cpp +++ b/source/source_io/test/csr_reader_test.cpp @@ -1,4 +1,4 @@ -#include "source_io/csr_reader.h" +#include "source_io/module_output/csr_reader.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/source_io/test/file_reader_test.cpp b/source/source_io/test/file_reader_test.cpp index a9479b6d4b..5d132a3a40 100644 --- a/source/source_io/test/file_reader_test.cpp +++ b/source/source_io/test/file_reader_test.cpp @@ -1,4 +1,4 @@ -#include "source_io/file_reader.h" +#include "source_io/module_output/file_reader.h" #include diff --git a/source/source_io/test/for_testing_input_conv.h b/source/source_io/test/for_testing_input_conv.h index 8cca07361f..4d54e89778 100644 --- a/source/source_io/test/for_testing_input_conv.h +++ b/source/source_io/test/for_testing_input_conv.h @@ -14,11 +14,11 @@ #include "source_lcao/module_dftu/dftu.h" #include "source_lcao/module_rt/evolve_elec.h" #include "source_lcao/module_rt/td_velocity.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_hsolver/hsolver_lcao.h" #include "source_io/berryphase.h" -#include "source_io/restart.h" +#include "source_io/module_restart/restart.h" #include "source_md/md_func.h" #include "source_relax/bfgs_basic.h" #include "source_relax/ions_move_basic.h" @@ -30,7 +30,7 @@ #undef private bool berryphase::berry_phase_flag = false; -bool TD_Velocity::out_current; +int TD_Velocity::out_current; bool TD_Velocity::out_current_k; bool TD_Velocity::out_vecpot; bool TD_Velocity::init_vecpot_file; @@ -186,18 +186,11 @@ void UnitCell::setup(const std::string& latname_in, this->lc[0] = 1; this->lc[1] = 1; this->lc[2] = 1; - if (!PARAM.input.relax_new) { - ModuleBase::WARNING_QUIT( - "Input", - "there are bugs in the old implementation; set relax_new to be " - "1 for fixed_volume relaxation"); - } + // Note: fixed_axes="volume" is now supported with relax_new=false + // (see commit cdc3457f5a8546cda869655c3faabd8b29687aff) } else if (fixed_axes_in == "shape") { - if (!PARAM.input.relax_new) { - ModuleBase::WARNING_QUIT( - "Input", - "set relax_new to be 1 for fixed_shape relaxation"); - } + // Note: fixed_axes="shape" is now supported with relax_new=false + // (see commit cdc3457f5a8546cda869655c3faabd8b29687aff) this->lc[0] = 1; this->lc[1] = 1; this->lc[2] = 1; diff --git a/source/source_io/test/for_testing_klist.h b/source/source_io/test/for_testing_klist.h index e8d518fa49..8fe875fa58 100644 --- a/source/source_io/test/for_testing_klist.h +++ b/source/source_io/test/for_testing_klist.h @@ -11,10 +11,10 @@ #include "source_cell/setup_nonlocal.h" #include "source_cell/unitcell.h" #include "source_estate/magnetism.h" -#include "source_pw/module_pwdft/VL_in_pw.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/berryphase.h" +#include "source_io/module_unk/berryphase.h" bool berryphase::berry_phase_flag=0; diff --git a/source/source_io/test/numerical_basis_test.cpp b/source/source_io/test/numerical_basis_test.cpp index 75f4205cd3..87037c4507 100644 --- a/source/source_io/test/numerical_basis_test.cpp +++ b/source/source_io/test/numerical_basis_test.cpp @@ -1,7 +1,7 @@ #include "source_base/math_sphbes.h" #include "source_base/matrix3.h" #include "source_base/vector3.h" -#include "source_io/numerical_basis_jyjy.h" +#include "source_io/module_bessel/numerical_basis_jyjy.h" #include "gtest/gtest.h" diff --git a/source/source_io/test/orb_io_test.cpp b/source/source_io/test/orb_io_test.cpp index fb26f83850..a17133da67 100644 --- a/source/source_io/test/orb_io_test.cpp +++ b/source/source_io/test/orb_io_test.cpp @@ -1,5 +1,5 @@ #include -#include "source_io/orb_io.h" +#include "source_io/module_output/orb_io.h" #ifdef __MPI #include diff --git a/source/source_io/test/output_mulliken_mock.cpp b/source/source_io/test/output_mulliken_mock.cpp index 66e8cbe814..b83e66b57c 100644 --- a/source/source_io/test/output_mulliken_mock.cpp +++ b/source/source_io/test/output_mulliken_mock.cpp @@ -66,8 +66,8 @@ std::vector read_k(std::string filename, int ik) } // namespace ModuleIO -#include "source_io/output_dmk.h" -#include "source_io/output_sk.h" +#include "source_io/module_mulliken/output_dmk.h" +#include "source_io/module_mulliken/output_sk.h" namespace ModuleIO { diff --git a/source/source_io/test/output_mulliken_test.cpp b/source/source_io/test/output_mulliken_test.cpp index 651b2a2b52..a4938ecaba 100644 --- a/source/source_io/test/output_mulliken_test.cpp +++ b/source/source_io/test/output_mulliken_test.cpp @@ -1,9 +1,9 @@ -#include "../output_mulliken.h" +#include "../module_mulliken/output_mulliken.h" #include "source_cell/cell_index.h" -#include "source_io/output_dmk.h" -#include "source_io/output_sk.h" +#include "source_io/module_mulliken/output_dmk.h" +#include "source_io/module_mulliken/output_sk.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/source/source_io/test/output_test.cpp b/source/source_io/test/output_test.cpp index 8ef69c0f68..769898339f 100644 --- a/source/source_io/test/output_test.cpp +++ b/source/source_io/test/output_test.cpp @@ -33,7 +33,7 @@ T* get_simple_array(int num) return rand_array; } -#include "../output.h" +#include "../module_output/output.h" class OutputTest : public testing::Test { diff --git a/source/source_io/test/outputlog_test.cpp b/source/source_io/test/outputlog_test.cpp index 5bcffe27ca..2eabec2b9f 100644 --- a/source/source_io/test/outputlog_test.cpp +++ b/source/source_io/test/outputlog_test.cpp @@ -10,7 +10,7 @@ #include "source_base/constants.h" #include "source_base/global_variable.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" #ifdef __MPI #include "source_basis/module_pw/test/test_tool.h" diff --git a/source/source_io/test/parse_args_test.cpp b/source/source_io/test/parse_args_test.cpp index 1ff3c4d543..e12e1a5d91 100644 --- a/source/source_io/test/parse_args_test.cpp +++ b/source/source_io/test/parse_args_test.cpp @@ -1,63 +1,122 @@ #include "source_io/parse_args.h" - #include "gtest/gtest.h" -#include "source_io/read_input.h" +#include "source_io/module_parameter/read_input.h" #include "source_main/version.h" -bool ModuleIO::ReadInput::check_mode = false; +// Already deal with Testing.cmake +// #include "build_info.h" + +// This file is modified by ZhouXY-PKU at 2025-12-01 -TEST(ParseArgsTest, OutVersionTest) -{ - // Test case 1: no arguments +// Refresh test status +class ParseArgsTest : public ::testing::Test { +protected: + void SetUp() override { + ModuleIO::ReadInput::check_mode = false; + } +}; + +// Test for no argument +TEST_F(ParseArgsTest, NoArguments) { char arg0[] = "test"; char* argv[] = {arg0}; int argc = 1; + testing::internal::CaptureStdout(); ModuleIO::parse_args(argc, argv); std::string output = testing::internal::GetCapturedStdout(); - EXPECT_EQ("", output); - // No output expected + EXPECT_TRUE(output.empty()) << "Expected no output for no arguments."; +} +// Test for abacus version +TEST_F(ParseArgsTest, VersionFlags) { #ifdef VERSION std::string output_ref = "ABACUS version " + std::string(VERSION) + "\n"; #else std::string output_ref = "ABACUS version unknown\n"; #endif - // Test case 2: --version argument - char arg1[] = "--version"; - char* argv1[] = {arg0, arg1}; - argc = 2; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleIO::parse_args(argc, argv1), ::testing::ExitedWithCode(0), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_EQ(output_ref, output); - - // Test case 3: -v argument - char arg2[] = "-v"; - char* argv2[] = {arg0, arg2}; - argc = 2; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleIO::parse_args(argc, argv2), ::testing::ExitedWithCode(0), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_EQ(output_ref, output); - - // Test case 4: -V argument - char arg3[] = "-V"; - char* argv3[] = {arg0, arg3}; - argc = 2; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleIO::parse_args(argc, argv3), ::testing::ExitedWithCode(0), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_EQ(output_ref, output); + std::vector version_args = {"--version", "-v", "-V"}; + + for (const auto& arg : version_args) { + char arg0[] = "test"; + std::vector argv = {arg0, const_cast(arg.c_str())}; + int argc = argv.size(); + + testing::internal::CaptureStdout(); + EXPECT_EXIT( + { ModuleIO::parse_args(argc, argv.data()); }, + ::testing::ExitedWithCode(0), + "" + ) << "Failed for argument: " << arg; + + std::string output = testing::internal::GetCapturedStdout(); + EXPECT_EQ(output_ref, output) << "Output mismatch for argument: " << arg; + } } -TEST(ParseArgsTest, CheckInput) -{ +// Test for abacus info +TEST_F(ParseArgsTest, InfoFlags) { + std::vector info_args = {"--info", "-i", "-I"}; + + for (const auto& arg : info_args) { + char arg0[] = "test"; + std::vector argv = {arg0, const_cast(arg.c_str())}; + int argc = argv.size(); + + testing::internal::CaptureStdout(); + EXPECT_EXIT( + { ModuleIO::parse_args(argc, argv.data()); }, + ::testing::ExitedWithCode(0), + "" + ) << "Failed for argument: " << arg; + + std::string output = testing::internal::GetCapturedStdout(); + EXPECT_TRUE(output.find("ABACUS Core") != std::string::npos) + << "Output mismatch for argument: " << arg << "\nCaptured output was: " << output; + } +} + +// Test for unavailable arguments +TEST_F(ParseArgsTest, UnknownArgument) { + char arg0[] = "test"; + char arg1[] = "--nonexistent-option"; + char* argv[] = {arg0, arg1}; + int argc = 2; + + EXPECT_EXIT( + { ModuleIO::parse_args(argc, argv); }, + ::testing::ExitedWithCode(1), + "Usage: abacus" + ) << "Failed for unknown argument test."; +} + +// Test for --check-input +TEST_F(ParseArgsTest, CheckInputFlag) { char arg0[] = "test"; char arg1[] = "--check-input"; char* argv[] = {arg0, arg1}; int argc = 2; + ModuleIO::parse_args(argc, argv); + EXPECT_TRUE(ModuleIO::ReadInput::check_mode); -} \ No newline at end of file +} + +TEST_F(ParseArgsTest, PriorityVersionOverCheckInput) { + char arg0[] = "test"; + char arg1[] = "--version"; + char arg2[] = "--check-input"; + char* argv[] = {arg0, arg1, arg2}; + int argc = 3; + + testing::internal::CaptureStdout(); + EXPECT_EXIT( + { ModuleIO::parse_args(argc, argv); }, + ::testing::ExitedWithCode(0), + "" + ); + std::string output = testing::internal::GetCapturedStdout(); + EXPECT_TRUE(output.find("ABACUS version") != std::string::npos) + << "Output did not contain version information.\nCaptured output was: " << output; +} diff --git a/source/source_io/test/print_info_test.cpp b/source/source_io/test/print_info_test.cpp index bc5d90bf1c..4e7739ea96 100644 --- a/source/source_io/test/print_info_test.cpp +++ b/source/source_io/test/print_info_test.cpp @@ -5,8 +5,8 @@ #include "source_cell/klist.h" #include "source_cell/parallel_kpoints.h" #include "source_cell/unitcell.h" -#include "source_io/berryphase.h" -#include "source_io/print_info.h" +#include "source_io/module_unk/berryphase.h" +#include "source_io/module_output/print_info.h" #include "prepare_unitcell.h" #undef private #ifdef __LCAO diff --git a/source/source_io/test/read_exit_file_test.cpp b/source/source_io/test/read_exit_file_test.cpp index b746d70cd5..e12c055576 100644 --- a/source/source_io/test/read_exit_file_test.cpp +++ b/source/source_io/test/read_exit_file_test.cpp @@ -1,5 +1,5 @@ -#include "source_io/read_exit_file.h" -#include "source_io/read_input.h" +#include "source_io/module_output/read_exit_file.h" +#include "source_io/module_parameter/read_input.h" #include "mpi.h" #include "gmock/gmock.h" diff --git a/source/source_io/test/read_input_ptest.cpp b/source/source_io/test/read_input_ptest.cpp index a25bc2a926..953852a3a4 100644 --- a/source/source_io/test/read_input_ptest.cpp +++ b/source/source_io/test/read_input_ptest.cpp @@ -4,7 +4,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "source_base/tool_quit.h" -#include "source_io/read_input.h" +#include "source_io/module_parameter/read_input.h" #include "source_io/module_parameter/parameter.h" // #ifdef __MPI @@ -182,6 +182,7 @@ TEST_F(InputParaTest, ParaRead) EXPECT_EQ(param.inp.chg_extrap, "atomic"); EXPECT_EQ(param.inp.out_freq_elec, 50); EXPECT_EQ(param.inp.out_freq_ion, 0); + EXPECT_EQ(param.inp.out_freq_td, 0); EXPECT_EQ(param.inp.out_chg[0], 0); EXPECT_EQ(param.inp.out_chg[1], 3); EXPECT_EQ(param.inp.out_elf[0], 0); @@ -207,7 +208,6 @@ TEST_F(InputParaTest, ParaRead) EXPECT_FALSE(param.inp.out_mat_xc); EXPECT_FALSE(param.inp.out_mat_xc2); EXPECT_FALSE(param.inp.out_eband_terms); - EXPECT_EQ(param.inp.out_freq_ion, 0); EXPECT_EQ(param.inp.out_app_flag, 0); EXPECT_EQ(param.inp.out_mat_r, 0); EXPECT_FALSE(param.inp.out_wfc_lcao); diff --git a/source/source_io/test/read_rhog_test.cpp b/source/source_io/test/read_rhog_test.cpp index 783951d4c0..bb90e3b344 100644 --- a/source/source_io/test/read_rhog_test.cpp +++ b/source/source_io/test/read_rhog_test.cpp @@ -3,7 +3,7 @@ #define private public #include "source_io/module_parameter/parameter.h" #undef private -#include "source_io/rhog_io.h" +#include "source_io/module_chgpot/rhog_io.h" #ifdef __MPI #include "source_basis/module_pw/test/test_tool.h" #include "mpi.h" diff --git a/source/source_io/test/read_wf2rho_pw_test.cpp b/source/source_io/test/read_wf2rho_pw_test.cpp index 786efd42a4..9b1611ae1e 100644 --- a/source/source_io/test/read_wf2rho_pw_test.cpp +++ b/source/source_io/test/read_wf2rho_pw_test.cpp @@ -10,9 +10,9 @@ #include "source_estate/module_charge/symmetry_rho.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_pw/module_pwdft/parallel_grid.h" -#include "source_io/read_wf2rho_pw.h" -#include "source_io/write_wfc_pw.h" -#include "source_io/filename.h" // mohan add 2025-05-17 +#include "source_io/module_wf/read_wf2rho_pw.h" +#include "source_io/module_wf/write_wfc_pw.h" +#include "source_io/module_output/filename.h" // mohan add 2025-05-17 #include "source_io/module_parameter/parameter.h" #include "source_psi/psi.h" diff --git a/source/source_io/test/read_wfc_nao_test.cpp b/source/source_io/test/read_wfc_nao_test.cpp index c1b31cc99b..d49c7f5834 100644 --- a/source/source_io/test/read_wfc_nao_test.cpp +++ b/source/source_io/test/read_wfc_nao_test.cpp @@ -3,9 +3,9 @@ #define private public #include "source_io/module_parameter/parameter.h" #undef private -#include "source_io/read_wfc_nao.h" +#include "source_io/module_wf/read_wfc_nao.h" #include "source_basis/module_ao/parallel_orbitals.h" -#include "source_io/write_wfc_nao.h" +#include "source_io/module_wf/write_wfc_nao.h" namespace ModuleIO { diff --git a/source/source_io/test/read_wfc_pw_test.cpp b/source/source_io/test/read_wfc_pw_test.cpp index c008508344..c5602454f9 100644 --- a/source/source_io/test/read_wfc_pw_test.cpp +++ b/source/source_io/test/read_wfc_pw_test.cpp @@ -1,4 +1,4 @@ -#include "source_io/read_wfc_pw.h" +#include "source_io/module_wf/read_wfc_pw.h" #define private public #include "source_io/module_parameter/parameter.h" diff --git a/source/source_io/test/single_R_io_test.cpp b/source/source_io/test/single_R_io_test.cpp index 3b378f8801..735ed7f60c 100644 --- a/source/source_io/test/single_R_io_test.cpp +++ b/source/source_io/test/single_R_io_test.cpp @@ -3,7 +3,7 @@ #define private public #include "source_io/module_parameter/parameter.h" #undef private -#include "source_io/single_R_io.h" +#include "source_io/module_hs/single_R_io.h" #include "source_base/global_variable.h" #include "source_basis/module_ao/parallel_orbitals.h" /************************************************ diff --git a/source/source_io/test/sparse_matrix_test.cpp b/source/source_io/test/sparse_matrix_test.cpp index 4ebecd6d12..9287a0981b 100644 --- a/source/source_io/test/sparse_matrix_test.cpp +++ b/source/source_io/test/sparse_matrix_test.cpp @@ -1,4 +1,4 @@ -#include "source_io/sparse_matrix.h" +#include "source_io/module_output/sparse_matrix.h" #include diff --git a/source/source_io/test/to_qo_test.cpp b/source/source_io/test/to_qo_test.cpp index 6ba673c643..90a2bec960 100644 --- a/source/source_io/test/to_qo_test.cpp +++ b/source/source_io/test/to_qo_test.cpp @@ -1,5 +1,5 @@ #include -#include "source_io/to_qo.h" +#include "source_io/module_qo/to_qo.h" #define private public #include "source_io/module_parameter/parameter.h" #undef private diff --git a/source/source_io/test/write_dos_pw_test.cpp b/source/source_io/test/write_dos_pw_test.cpp index a7dcd74202..fae1c70445 100644 --- a/source/source_io/test/write_dos_pw_test.cpp +++ b/source/source_io/test/write_dos_pw_test.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "source_io/write_dos_pw.h" +#include "source_io/module_dos/write_dos_pw.h" #ifdef __MPI #include "mpi.h" #endif diff --git a/source/source_io/test/write_eig_occ_test.cpp b/source/source_io/test/write_eig_occ_test.cpp index 3797efe8a5..b7139ba093 100644 --- a/source/source_io/test/write_eig_occ_test.cpp +++ b/source/source_io/test/write_eig_occ_test.cpp @@ -11,7 +11,7 @@ #include "source_cell/parallel_kpoints.h" #include "mpi.h" #endif -#include "../write_eig_occ.h" +#include "../module_energy/write_eig_occ.h" #include "for_testing_klist.h" /************************************************ diff --git a/source/source_io/test/write_elf_logic_test.cpp b/source/source_io/test/write_elf_logic_test.cpp new file mode 100644 index 0000000000..25269172f7 --- /dev/null +++ b/source/source_io/test/write_elf_logic_test.cpp @@ -0,0 +1,177 @@ +#include "gtest/gtest.h" +#include +#include + +/************************************************ + * unit test of write_elf logic + ***********************************************/ + +/** + * This test verifies the ELF calculation logic for nspin=4 + * by testing the key formulas directly without file I/O. + */ + +class ElfLogicTest : public ::testing::Test +{ +protected: + // Test the Thomas-Fermi kinetic energy density calculation + double calculate_tau_TF(double rho) { + const double c_tf = 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0) * 2.0; + if (rho > 0.0) { + return c_tf * std::pow(rho, 5.0 / 3.0); + } else { + return 0.0; + } + } + + // Test the ELF calculation + double calculate_elf(double tau, double tau_vw, double tau_TF) { + const double eps = 1.0e-5; + if (tau_TF > 1.0e-12) { + double chi = (tau - tau_vw + eps) / tau_TF; + return 1.0 / (1.0 + chi * chi); + } else { + return 0.0; + } + } +}; + +TEST_F(ElfLogicTest, ThomasFermiPositiveDensity) +{ + // Test with positive density + double rho = 0.1; + double tau_TF = calculate_tau_TF(rho); + + EXPECT_GT(tau_TF, 0.0); + EXPECT_LT(tau_TF, 1.0); // Should be reasonable value +} + +TEST_F(ElfLogicTest, ThomasFermiNegativeDensity) +{ + // Test with negative density (for magnetization components) + double rho = -0.02; + double tau_TF = calculate_tau_TF(rho); + + EXPECT_EQ(tau_TF, 0.0); // Should return 0 for negative density +} + +TEST_F(ElfLogicTest, ThomasFermiZeroDensity) +{ + // Test with zero density + double rho = 0.0; + double tau_TF = calculate_tau_TF(rho); + + EXPECT_EQ(tau_TF, 0.0); +} + +TEST_F(ElfLogicTest, ElfCalculationNormal) +{ + // Test ELF calculation with normal values + double tau = 0.05; + double tau_vw = 0.02; + double tau_TF = 0.03; + + double elf = calculate_elf(tau, tau_vw, tau_TF); + + EXPECT_GE(elf, 0.0); + EXPECT_LE(elf, 1.0); +} + +TEST_F(ElfLogicTest, ElfCalculationSmallTauTF) +{ + // Test ELF calculation with very small tau_TF + double tau = 0.05; + double tau_vw = 0.02; + double tau_TF = 1.0e-15; // Very small + + double elf = calculate_elf(tau, tau_vw, tau_TF); + + EXPECT_EQ(elf, 0.0); // Should return 0 for very small tau_TF +} + +TEST_F(ElfLogicTest, ElfCalculationZeroTauTF) +{ + // Test ELF calculation with zero tau_TF + double tau = 0.05; + double tau_vw = 0.02; + double tau_TF = 0.0; + + double elf = calculate_elf(tau, tau_vw, tau_TF); + + EXPECT_EQ(elf, 0.0); // Should return 0 for zero tau_TF +} + +TEST_F(ElfLogicTest, ElfValueRange) +{ + // Test that ELF is always in [0, 1] for various inputs + std::vector tau_values = {0.01, 0.05, 0.1, 0.5, 1.0}; + std::vector tau_vw_values = {0.005, 0.02, 0.05, 0.2, 0.5}; + std::vector tau_TF_values = {0.01, 0.03, 0.08, 0.3, 0.8}; + + for (double tau : tau_values) { + for (double tau_vw : tau_vw_values) { + for (double tau_TF : tau_TF_values) { + double elf = calculate_elf(tau, tau_vw, tau_TF); + EXPECT_GE(elf, 0.0) << "ELF should be >= 0"; + EXPECT_LE(elf, 1.0) << "ELF should be <= 1"; + } + } + } +} + +TEST_F(ElfLogicTest, Nspin4ComponentHandling) +{ + // Test that we can handle 4 components independently + int nspin = 4; + std::vector rho(nspin); + std::vector tau_TF(nspin); + + // Component 0: total charge (positive) + rho[0] = 0.1; + tau_TF[0] = calculate_tau_TF(rho[0]); + EXPECT_GT(tau_TF[0], 0.0); + + // Components 1-3: magnetization (can be negative) + for (int i = 1; i < nspin; ++i) { + rho[i] = -0.01 * i; // Negative + tau_TF[i] = calculate_tau_TF(rho[i]); + EXPECT_EQ(tau_TF[i], 0.0); // Should be 0 for negative density + } +} + +TEST_F(ElfLogicTest, Nspin4AllPositive) +{ + // Test with all positive densities + int nspin = 4; + std::vector rho(nspin); + std::vector tau_TF(nspin); + + for (int i = 0; i < nspin; ++i) { + rho[i] = 0.05 + 0.01 * i; + tau_TF[i] = calculate_tau_TF(rho[i]); + EXPECT_GT(tau_TF[i], 0.0); + } +} + +TEST_F(ElfLogicTest, Nspin4MixedSigns) +{ + // Test with mixed positive and negative densities + int nspin = 4; + std::vector rho = {0.1, -0.02, 0.03, -0.01}; + std::vector tau_TF(nspin); + + for (int i = 0; i < nspin; ++i) { + tau_TF[i] = calculate_tau_TF(rho[i]); + if (rho[i] > 0.0) { + EXPECT_GT(tau_TF[i], 0.0); + } else { + EXPECT_EQ(tau_TF[i], 0.0); + } + } +} + +int main(int argc, char** argv) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/source/source_io/test/write_orb_info_test.cpp b/source/source_io/test/write_orb_info_test.cpp index 4d439ec4b4..c56c772c2f 100644 --- a/source/source_io/test/write_orb_info_test.cpp +++ b/source/source_io/test/write_orb_info_test.cpp @@ -3,7 +3,7 @@ #define private public #include "source_io/module_parameter/parameter.h" #undef private -#include "source_io/write_orb_info.h" +#include "source_io/module_output/write_orb_info.h" #include "source_cell/unitcell.h" #include "prepare_unitcell.h" #include "source_estate/read_pseudo.h" diff --git a/source/source_io/test/write_wfc_nao_test.cpp b/source/source_io/test/write_wfc_nao_test.cpp index 04512196e0..d5cf630b86 100644 --- a/source/source_io/test/write_wfc_nao_test.cpp +++ b/source/source_io/test/write_wfc_nao_test.cpp @@ -1,10 +1,10 @@ -#include "../write_wfc_nao.h" -#include "../filename.h" +#include "../module_wf/write_wfc_nao.h" +#include "../module_output/filename.h" #define private public #include "source_io/module_parameter/parameter.h" #undef private -#include "../binstream.h" +#include "../module_output/binstream.h" #include "source_base/global_variable.h" #include "source_base/module_external/scalapack_connector.h" diff --git a/source/source_io/test_serial/CMakeLists.txt b/source/source_io/test_serial/CMakeLists.txt index 57a591d597..838377d9b8 100644 --- a/source/source_io/test_serial/CMakeLists.txt +++ b/source/source_io/test_serial/CMakeLists.txt @@ -6,21 +6,21 @@ remove_definitions(-D__MPI) add_library( io_input_serial OBJECT - ../read_input_item_system.cpp - ../read_input_item_elec_stru.cpp - ../read_input_item_relax.cpp - ../read_input_item_md.cpp - ../read_input_item_ofdft.cpp - ../read_input_item_sdft.cpp - ../read_input_item_tddft.cpp - ../read_input_item_deepks.cpp - ../read_input_item_model.cpp - ../read_input_item_postprocess.cpp - ../read_input_item_exx_dftu.cpp - ../read_input_item_other.cpp - ../read_input_item_output.cpp - ../read_input.cpp - ../read_set_globalv.cpp + ../module_parameter/read_input_item_system.cpp + ../module_parameter/read_input_item_elec_stru.cpp + ../module_parameter/read_input_item_relax.cpp + ../module_parameter/read_input_item_md.cpp + ../module_parameter/read_input_item_ofdft.cpp + ../module_parameter/read_input_item_sdft.cpp + ../module_parameter/read_input_item_tddft.cpp + ../module_parameter/read_input_item_deepks.cpp + ../module_parameter/read_input_item_model.cpp + ../module_parameter/read_input_item_postprocess.cpp + ../module_parameter/read_input_item_exx_dftu.cpp + ../module_parameter/read_input_item_other.cpp + ../module_parameter/read_input_item_output.cpp + ../module_parameter/read_input.cpp + ../module_parameter/read_set_globalv.cpp ) install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -47,13 +47,13 @@ AddTest( AddTest( TARGET MODULE_IO_rho_io LIBS parameter ${math_libs} base device cell_info - SOURCES rho_io_test.cpp ../read_cube.cpp ../write_cube.cpp ../output.cpp + SOURCES rho_io_test.cpp ../module_output/read_cube.cpp ../module_output/write_cube.cpp ../module_output/output.cpp ) AddTest( TARGET MODULE_IO_write_bands LIBS parameter ${math_libs} base device - SOURCES write_bands_test.cpp ../write_bands.cpp + SOURCES write_bands_test.cpp ../module_energy/write_bands.cpp ) AddTest( diff --git a/source/source_io/test_serial/io_system_variable_test.cpp b/source/source_io/test_serial/io_system_variable_test.cpp index 3cc777573a..235f01b855 100644 --- a/source/source_io/test_serial/io_system_variable_test.cpp +++ b/source/source_io/test_serial/io_system_variable_test.cpp @@ -16,8 +16,8 @@ * - read in specific values for some items */ #define private public -#include "source_io/input_item.h" -#include "source_io/read_input.h" +#include "source_io/module_parameter/input_item.h" +#include "source_io/module_parameter/read_input.h" #undef private class InputTest : public testing::Test diff --git a/source/source_io/test_serial/read_input_item_test.cpp b/source/source_io/test_serial/read_input_item_test.cpp index b6898b57e4..15c872a4bd 100644 --- a/source/source_io/test_serial/read_input_item_test.cpp +++ b/source/source_io/test_serial/read_input_item_test.cpp @@ -16,8 +16,8 @@ * - read in specific values for some items */ #define private public -#include "source_io/input_item.h" -#include "source_io/read_input.h" +#include "source_io/module_parameter/input_item.h" +#include "source_io/module_parameter/read_input.h" #undef private class InputTest : public testing::Test @@ -1397,7 +1397,7 @@ TEST_F(InputTest, Item_test2) it->second.reset_value(it->second, param); EXPECT_EQ(param.input.exx_ccp_rmesh_times, "1"); - param.input.exx_ccp_rmesh_times = "0"; + param.input.exx_ccp_rmesh_times = "-1"; testing::internal::CaptureStdout(); EXPECT_EXIT(it->second.check_value(it->second, param), ::testing::ExitedWithCode(1), ""); output = testing::internal::GetCapturedStdout(); diff --git a/source/source_io/test_serial/read_input_test.cpp b/source/source_io/test_serial/read_input_test.cpp index 1d2b3acfc1..b07189a7ab 100644 --- a/source/source_io/test_serial/read_input_test.cpp +++ b/source/source_io/test_serial/read_input_test.cpp @@ -1,4 +1,4 @@ -#include "source_io/read_input.h" +#include "source_io/module_parameter/read_input.h" #include "source_base/tool_quit.h" #include "source_io/module_parameter/parameter.h" diff --git a/source/source_io/test_serial/read_input_tool_test.cpp b/source/source_io/test_serial/read_input_tool_test.cpp index 399e6387ec..f66c5da958 100644 --- a/source/source_io/test_serial/read_input_tool_test.cpp +++ b/source/source_io/test_serial/read_input_tool_test.cpp @@ -1,4 +1,4 @@ -#include "../read_input_tool.h" +#include "../module_parameter/read_input_tool.h" #include // Test fixture for parse_expression tests diff --git a/source/source_io/test_serial/rho_io_test.cpp b/source/source_io/test_serial/rho_io_test.cpp index 36232800b2..29abde039e 100644 --- a/source/source_io/test_serial/rho_io_test.cpp +++ b/source/source_io/test_serial/rho_io_test.cpp @@ -1,9 +1,9 @@ -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "source_base/global_variable.h" -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #include "prepare_unitcell.h" #include "source_pw/module_pwdft/parallel_grid.h" @@ -119,7 +119,11 @@ TEST_F(RhoIOTest, Write) Parallel_Grid pgrid(nx, ny, nz, nz, nrxx, nz, 1); ModuleIO::read_vdata_palgrid(pgrid, my_rank, ofs_running, "support/chg.cube", rho[0], ucell->nat); ModuleIO::write_vdata_palgrid(pgrid, rho[0], 0, nspin, 0, "test_write_vdata_palgrid.cube", 0.461002, ucell, 11, 1); - EXPECT_EQ(system("diff -q test_write_vdata_palgrid.cube support/chg.cube"), 0); + std::ifstream ifs1("test_write_vdata_palgrid.cube", std::ifstream::binary | std::ifstream::ate); + std::ifstream ifs2("support/chg.cube", std::ifstream::binary | std::ifstream::ate); + EXPECT_EQ(ifs1.tellg(), ifs2.tellg()); + ifs1.close(); + ifs2.close(); } TEST_F(RhoIOTest, TrilinearInterpolate) @@ -235,6 +239,9 @@ TEST_F(CubeIOTest, WriteCube) nx_read, ny_read, nz_read, dx, dy, dz, atom_type, atom_charge, atom_pos, data_read, 11); - - EXPECT_EQ(system("diff -q test_write.cube ./support/chg.cube"), 0); + std::ifstream ifs1("test_write.cube", std::ifstream::binary | std::ifstream::ate); + std::ifstream ifs2("./support/chg.cube", std::ifstream::binary | std::ifstream::ate); + EXPECT_EQ(ifs1.tellg(), ifs2.tellg()); + ifs1.close(); + ifs2.close(); } diff --git a/source/source_io/test_serial/write_bands_test.cpp b/source/source_io/test_serial/write_bands_test.cpp index e7e82684da..f03e27719e 100644 --- a/source/source_io/test_serial/write_bands_test.cpp +++ b/source/source_io/test_serial/write_bands_test.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "source_io/write_bands.h" +#include "source_io/module_energy/write_bands.h" #include "source_cell/parallel_kpoints.h" #include "source_cell/klist.h" diff --git a/source/source_io/write_HS_R.h b/source/source_io/write_HS_R.h deleted file mode 100644 index 2f831d2baa..0000000000 --- a/source/source_io/write_HS_R.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef WRITE_HS_R_H -#define WRITE_HS_R_H - -#include "source_base/matrix.h" -#include "source_basis/module_nao/two_center_bundle.h" -#include "source_cell/klist.h" -#include "source_hamilt/hamilt.h" -#include "source_pw/module_pwdft/global.h" -#include "source_lcao/LCAO_HS_arrays.hpp" - -namespace ModuleIO -{ - using TAC = std::pair>; - void output_HSR(const UnitCell& ucell, - const int& istep, - const ModuleBase::matrix& v_eff, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, // mohan add 2024-04-06 - const K_Vectors& kv, - hamilt::Hamilt>* p_ham, -#ifdef __EXX - const std::vector>>>* Hexxd = nullptr, - const std::vector>>>>* Hexxc = nullptr, -#endif - const std::string& SR_filename = "srs1_nao.csr", - const std::string& HR_filename_up = "hrs1_nao.csr", - const std::string HR_filename_down = "hrs2_nao.csr", - const bool& binary = false, - const double& sparse_threshold = 1e-10); // LiuXh add 2019-07-15, modify in 2021-12-3 - - void output_dHR(const int& istep, - const ModuleBase::matrix& v_eff, - const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, // mohan add 2024-04-06 - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const K_Vectors& kv, - const bool& binary = false, - const double& sparse_threshold = 1e-10); - - void output_dSR(const int& istep, - const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, // mohan add 2024-04-06 - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const K_Vectors& kv, - const bool& binary = false, - const double& sparse_thr = 1e-10); - - void output_TR(const int istep, - const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const std::string& TR_filename = "trs1_nao.csr", - const bool& binary = false, - const double& sparse_threshold = 1e-10); - - void output_SR(Parallel_Orbitals& pv, - const Grid_Driver& grid, - hamilt::Hamilt>* p_ham, - const std::string& SR_filename = "srs1_nao.csr", - const bool& binary = false, - const double& sparse_threshold = 1e-10); -} // namespace ModuleIO - -#endif diff --git a/source/source_io/write_vxc_r.hpp b/source/source_io/write_vxc_r.hpp deleted file mode 100644 index 0adfddb299..0000000000 --- a/source/source_io/write_vxc_r.hpp +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef __WRITE_VXC_R_H_ -#define __WRITE_VXC_R_H_ -#include "source_io/module_parameter/parameter.h" -#include "source_lcao/module_operator_lcao/op_dftu_lcao.h" -#include "source_lcao/module_operator_lcao/veff_lcao.h" -#include "source_lcao/spar_hsr.h" -#include "source_io/write_HS_sparse.h" -#ifdef __EXX -#include "source_lcao/module_operator_lcao/op_exx_lcao.h" -#include "source_lcao/module_ri/RI_2D_Comm.h" -#endif - -namespace ModuleIO -{ -template std::set> get_R_range(const hamilt::HContainer& hR) -{ - std::set> all_R_coor; - - return all_R_coor; -} - -template -std::map, std::map>> -cal_HR_sparse(const hamilt::HContainer& hR, - const int current_spin, - const double sparse_thr); - -template <> -std::map, std::map>> -cal_HR_sparse(const hamilt::HContainer& hR, - const int current_spin, - const double sparse_thr) -{ - std::map, std::map>> target; - sparse_format::cal_HContainer_d(*hR.get_paraV(), current_spin, sparse_thr, hR, target); - return target; -} -template <> -std::map, std::map>>> -cal_HR_sparse(const hamilt::HContainer>& hR, - const int current_spin, - const double sparse_thr) -{ - std::map, std::map>>> target; - sparse_format::cal_HContainer_cd(*hR.get_paraV(), current_spin, sparse_thr, hR, target); - return target; -} - -/// @brief write the Vxc matrix in KS orbital representation, usefull for GW calculation -/// including terms: local/semi-local XC, EXX, DFTU -template -void write_Vxc_R(const int nspin, - const Parallel_Orbitals* pv, - const UnitCell& ucell, - Structure_Factor& sf, - surchem& solvent, - const ModulePW::PW_Basis& rho_basis, - const ModulePW::PW_Basis& rhod_basis, - const ModuleBase::matrix& vloc, - const Charge& chg, - const K_Vectors& kv, - const std::vector& orb_cutoff, - Grid_Driver& gd, -#ifdef __EXX - const std::vector>>>* const Hexxd, - const std::vector>>>>* const Hexxc, -#endif -const double sparse_thr=1e-10) -{ - ModuleBase::TITLE("ModuleIO", "write_Vxc_R"); - // 1. real-space xc potential - // ModuleBase::matrix vr_xc(nspin, chg.nrxx); - double etxc = 0.0; - double vtxc = 0.0; - // elecstate::PotXC* potxc(&rho_basis, &etxc, vtxc, nullptr); - // potxc.cal_v_eff(&chg, &ucell, vr_xc); - elecstate::Potential* potxc - = new elecstate::Potential(&rhod_basis, &rho_basis, &ucell, &vloc, &sf, &solvent, &etxc, &vtxc); - std::vector compnents_list = {"xc"}; - potxc->pot_register(compnents_list); - potxc->update_from_charge(&chg, &ucell); - - // 2. allocate H(R) - // (the number of hR: 1 for nspin=1, 4; 2 for nspin=2) - int nspin0 = (nspin == 2) ? 2 : 1; - std::vector> vxcs_R_ao(nspin0, hamilt::HContainer(ucell, pv)); // call move constructor -#ifdef __EXX - std::array Rs_period = { kv.nmp[0], kv.nmp[1], kv.nmp[2] }; - const auto cell_nearest = hamilt::init_cell_nearest(ucell, Rs_period); -#endif - for (int is = 0; is < nspin0; ++is) - { - if (std::is_same::value) { vxcs_R_ao[is].fix_gamma(); } -#ifdef __EXX - if (GlobalC::exx_info.info_global.cal_exx) - { - GlobalC::exx_info.info_ri.real_number ? - hamilt::reallocate_hcontainer(*Hexxd, &vxcs_R_ao[is], &cell_nearest) : - hamilt::reallocate_hcontainer(*Hexxc, &vxcs_R_ao[is], &cell_nearest); - } -#endif - } - - // 3. calculate the Vxc(R) - hamilt::HS_Matrix_K vxc_k_ao(pv, 1); // only hk is needed, sk is skipped - std::vector>*> vxcs_op_ao(nspin0); - for (int is = 0; is < nspin0; ++is) - { - vxcs_op_ao[is] = new hamilt::Veff>( - &vxc_k_ao, kv.kvec_d, potxc, &vxcs_R_ao[is], &ucell, orb_cutoff, &gd, nspin); - vxcs_op_ao[is]->contributeHR(); -#ifdef __EXX - if (GlobalC::exx_info.info_global.cal_exx) - { - GlobalC::exx_info.info_ri.real_number ? - RI_2D_Comm::add_HexxR(is, GlobalC::exx_info.info_global.hybrid_alpha, *Hexxd, *pv, ucell.get_npol(), vxcs_R_ao[is], &cell_nearest) : - RI_2D_Comm::add_HexxR(is, GlobalC::exx_info.info_global.hybrid_alpha, *Hexxc, *pv, ucell.get_npol(), vxcs_R_ao[is], &cell_nearest); - } -#endif - } - - // test: fold Vxc(R) and check whether it is equal to Vxc(k) - // for (int ik = 0; ik < kv.get_nks(); ++ik) - // { - // vxc_k_ao.set_zero_hk(); - // dynamic_cast*>(vxcs_op_ao[kv.isk[ik]])->contributeHk(ik); - - // // output Vxc(k) (test) - // const TK* const hk = vxc_k_ao.get_hk(); - // std::cout << "ik=" << ik << ", Vxc(K): " << std::endl; - // for (int i = 0; i < pv->get_row_size(); i++) - // { - // for (int j = 0; j < pv->get_col_size(); j++) - // { - // std::cout << hk[j * pv->get_row_size() + i] << " "; - // } - // std::cout << std::endl; - // } - // } - - // 4. write Vxc(R) in csr format - for (int is = 0; is < nspin0; ++is) - { - std::set> all_R_coor = sparse_format::get_R_range(vxcs_R_ao[is]); - const std::string filename = "Vxc_R_spin" + std::to_string(is); - ModuleIO::save_sparse( - cal_HR_sparse(vxcs_R_ao[is], is, sparse_thr), - all_R_coor, - sparse_thr, - false, //binary - PARAM.globalv.global_out_dir + filename + ".csr", - *pv, - filename, - -1, - true); //all-reduce - } -} -} // namespace ModuleIO -#endif diff --git a/source/source_lcao/CMakeLists.txt b/source/source_lcao/CMakeLists.txt index 118e877239..2bdbfc0b45 100644 --- a/source/source_lcao/CMakeLists.txt +++ b/source/source_lcao/CMakeLists.txt @@ -14,14 +14,15 @@ if(ENABLE_LCAO) module_operator_lcao/op_dftu_lcao.cpp module_operator_lcao/deepks_lcao.cpp module_operator_lcao/op_exx_lcao.cpp - module_operator_lcao/overlap_new.cpp - module_operator_lcao/ekinetic_new.cpp - module_operator_lcao/nonlocal_new.cpp + module_operator_lcao/overlap.cpp + module_operator_lcao/ekinetic.cpp + module_operator_lcao/nonlocal.cpp module_operator_lcao/td_ekinetic_lcao.cpp module_operator_lcao/td_nonlocal_lcao.cpp module_operator_lcao/td_pot_hybrid.cpp module_operator_lcao/dspin_lcao.cpp module_operator_lcao/dftu_lcao.cpp + module_operator_lcao/operator_force_stress_utils.cpp pulay_fs_center2.cpp FORCE_STRESS.cpp FORCE_gamma.cpp @@ -33,6 +34,7 @@ if(ENABLE_LCAO) spar_hsr.cpp spar_st.cpp spar_u.cpp + LCAO_set.cpp LCAO_set_fs.cpp LCAO_set_st.cpp LCAO_nl_mu.cpp @@ -42,6 +44,8 @@ if(ENABLE_LCAO) LCAO_init_basis.cpp setup_exx.cpp setup_deepks.cpp + setup_dm.cpp + rho_tau_lcao.cpp record_adj.cpp center2_orb.cpp center2_orb-orb11.cpp diff --git a/source/source_lcao/FORCE.h b/source/source_lcao/FORCE.h index 5eba250181..a80dd02f25 100644 --- a/source/source_lcao/FORCE.h +++ b/source/source_lcao/FORCE.h @@ -37,8 +37,9 @@ class Force_LCAO const UnitCell& ucell, const Grid_Driver& gd, const psi::Psi* psi, - const elecstate::ElecState* pelec, - ModuleBase::matrix& foverlap, + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + ModuleBase::matrix& foverlap, ModuleBase::matrix& ftvnl_dphi, ModuleBase::matrix& fvnl_dbeta, ModuleBase::matrix& fvl_dphi, diff --git a/source/source_lcao/FORCE_STRESS.cpp b/source/source_lcao/FORCE_STRESS.cpp index af51e04ab2..6ae974bf78 100644 --- a/source/source_lcao/FORCE_STRESS.cpp +++ b/source/source_lcao/FORCE_STRESS.cpp @@ -1,8 +1,7 @@ #include "FORCE_STRESS.h" #include "source_lcao/module_dftu/dftu.h" //Quxin add for DFT+U on 20201029 -#include "source_pw/module_pwdft/global.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" #include "source_io/module_parameter/parameter.h" // new #include "source_base/timer.h" @@ -20,7 +19,38 @@ #endif #include "source_lcao/module_operator_lcao/dftu_lcao.h" #include "source_lcao/module_operator_lcao/dspin_lcao.h" -#include "source_lcao/module_operator_lcao/nonlocal_new.h" +#include "source_lcao/module_operator_lcao/nonlocal.h" +#include "source_lcao/module_operator_lcao/ekinetic.h" +#include "source_lcao/module_operator_lcao/overlap.h" +#include "source_lcao/pulay_fs.h" + + +// mohan add 2025-11-04 +template <> +void assign_dmk_ptr( + elecstate::DensityMatrix* dm, + std::vector>*& dmk_d, + std::vector>>*& dmk_c, + bool gamma_only_local +) { + auto& dmk_tmp = dm->get_DMK_vector(); + dmk_d = &dmk_tmp; + dmk_c = nullptr; +} + +template <> +void assign_dmk_ptr>( + elecstate::DensityMatrix,double>* dm, + std::vector>*& dmk_d, + std::vector>>*& dmk_c, + bool gamma_only_local +) { + auto& dmk_tmp = dm->get_DMK_vector(); + dmk_c = &dmk_tmp; + dmk_d = nullptr; +} + + template Force_Stress_LCAO::Force_Stress_LCAO(Record_adj& ra, const int nat_in) : RA(&ra), nat(nat_in) @@ -39,6 +69,7 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, const Grid_Driver& gd, Parallel_Orbitals& pv, const elecstate::ElecState* pelec, + LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-03 const psi::Psi* psi, const TwoCenterBundle& two_center_bundle, const LCAO_Orbitals& orb, @@ -48,7 +79,8 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, const Structure_Factor& sf, const K_Vectors& kv, ModulePW::PW_Basis* rhopw, - surchem& solvent, + surchem& solvent, + Plus_U &dftu, // mohan add 2025-11-07 Setup_DeePKS& deepks, Exx_NAO &exx_nao, ModuleSymmetry::Symmetry* symm) @@ -64,7 +96,8 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, const int nat = ucell.nat; - ForceStressArrays fsr; // mohan add 2024-06-15 + // NOTE: ForceStressArrays is no longer needed as we use operator-based force calculation + // ForceStressArrays fsr; // removed - no longer needed // total force : ModuleBase::matrix fcs; @@ -131,50 +164,140 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, sigmaxc, pelec->f_en.etxc, pelec->charge, rhopw, locpp, sf); } - //! atomic forces from integration (4 terms) - this->integral_part(PARAM.globalv.gamma_only_local, isforce, isstress, - ucell, gd, fsr, pelec, psi, foverlap, ftvnl_dphi, - fvnl_dbeta, fvl_dphi, soverlap, stvnl_dphi, svnl_dbeta, - svl_dphi, fvnl_dalpha, svnl_dalpha, deepks, - two_center_bundle, orb, pv, kv); + // Calculate forces and stresses using new operator-based methods + // Step 1: Calculate Energy Density Matrix (EDM) for overlap force + // EDM = Σ_k w_k * ε_k * |ψ_k><ψ_k| + elecstate::DensityMatrix edm = flk.cal_edm(pelec, *psi, *dmat.dm, kv, pv, + PARAM.inp.nspin, PARAM.inp.nbands, ucell, *this->RA); - // calculate force and stress for Nonlocal part + // Step 2: Handle different spin cases if (PARAM.inp.nspin == 1 || PARAM.inp.nspin == 2) { - hamilt::NonlocalNew> tmp_nonlocal(nullptr, - kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, two_center_bundle.overlap_orb_beta.get()); + // For nspin=1 or nspin=2, use double precision + // Switch to spin channel 1 for DMR access + if (PARAM.inp.nspin == 2) + { + dmat.dm->switch_dmr(1); + edm.switch_dmr(1); + } - const auto* dm_p = dynamic_cast*>(pelec)->get_DM(); + const hamilt::HContainer* dmR = dmat.dm->get_DMR_pointer(1); + const hamilt::HContainer* edmR = edm.get_DMR_pointer(1); - if (PARAM.inp.nspin == 2) + // Calculate kinetic force/stress (uses DM) + if (PARAM.inp.t_in_h) { - const_cast*>(dm_p)->switch_dmr(1); + hamilt::EKinetic> tmp_ekinetic( + nullptr, kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.kinetic_orb.get()); + tmp_ekinetic.cal_force_stress(isforce, isstress, dmR, ftvnl_dphi, stvnl_dphi); } - const hamilt::HContainer* dmr = dm_p->get_DMR_pointer(1); - tmp_nonlocal.cal_force_stress(isforce, isstress, dmr, fvnl_dbeta, svnl_dbeta); + // Calculate overlap force/stress (uses EDM) + hamilt::Overlap> tmp_overlap( + nullptr, kv.kvec_d, nullptr, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.overlap_orb.get()); + tmp_overlap.cal_force_stress(isforce, isstress, edmR, foverlap, soverlap); + + // Calculate nonlocal force/stress (uses DM) + hamilt::Nonlocal> tmp_nonlocal( + nullptr, kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.overlap_orb_beta.get()); + tmp_nonlocal.cal_force_stress(isforce, isstress, dmR, fvnl_dbeta, svnl_dbeta); + + // Switch back to spin channel 0 if (PARAM.inp.nspin == 2) { - const_cast*>(dm_p)->switch_dmr(0); + dmat.dm->switch_dmr(0); + edm.switch_dmr(0); } + + // Calculate local potential force/stress (vl_dphi) + // This uses grid integration, not operator-based method + flk.ParaV = dmat.dm->get_paraV_pointer(); + PulayForceStress::cal_pulay_fs(fvl_dphi, svl_dphi, *dmat.dm, ucell, pelec->pot, + isforce, isstress, false /*reset dm to gint*/); } else if (PARAM.inp.nspin == 4) { - hamilt::NonlocalNew, std::complex>> tmp_nonlocal( - nullptr, kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, - two_center_bundle.overlap_orb_beta.get()); - // calculate temporary complex DMR for nonlocal force&stress - // In fact, only SOC part need the imaginary part of DMR for correct force&stress - const auto* dm_p = dynamic_cast>*>(pelec)->get_DM(); - hamilt::HContainer> tmp_dmr(dm_p->get_DMR_pointer(1)->get_paraV()); - std::vector ijrs = dm_p->get_DMR_pointer(1)->get_ijr_info(); + // Calculate kinetic force/stress (uses DM) + if (PARAM.inp.t_in_h) + { + hamilt::EKinetic, std::complex>> tmp_ekinetic( + nullptr, kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.kinetic_orb.get()); + tmp_ekinetic.cal_force_stress(isforce, isstress, dmat.dm->get_DMR_pointer(1), ftvnl_dphi, stvnl_dphi); + } + + // Calculate overlap force/stress (uses EDM) + hamilt::Overlap, std::complex>> tmp_overlap( + nullptr, kv.kvec_d, nullptr, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.overlap_orb.get()); + tmp_overlap.cal_force_stress(isforce, isstress, edm.get_DMR_pointer(1), foverlap, soverlap); + + // For nspin=4 (non-collinear), need complex DMR + // Create temporary complex DMR for DM + hamilt::HContainer> tmp_dmr(dmat.dm->get_DMR_pointer(1)->get_paraV()); + std::vector ijrs = dmat.dm->get_DMR_pointer(1)->get_ijr_info(); tmp_dmr.insert_ijrs(&ijrs); tmp_dmr.allocate(); - dm_p->cal_DMR_full(&tmp_dmr); + dmat.dm->cal_DMR_full(&tmp_dmr); + // Calculate nonlocal force/stress (uses DM) + hamilt::Nonlocal, std::complex>> tmp_nonlocal( + nullptr, kv.kvec_d, nullptr, &ucell, orb.cutoffs(), &gd, + two_center_bundle.overlap_orb_beta.get()); tmp_nonlocal.cal_force_stress(isforce, isstress, &tmp_dmr, fvnl_dbeta, svnl_dbeta); + + // Calculate local potential force/stress (vl_dphi) + flk.ParaV = dmat.dm->get_paraV_pointer(); + PulayForceStress::cal_pulay_fs(fvl_dphi, svl_dphi, *dmat.dm, ucell, pelec->pot, + isforce, isstress, false /*reset dm to gint*/); } + // MPI reduction for forces + if (isforce) + { + Parallel_Reduce::reduce_pool(fvl_dphi.c, fvl_dphi.nr * fvl_dphi.nc); + } + + // MPI reduction for stresses + if (isstress) + { + Parallel_Reduce::reduce_pool(svl_dphi.c, svl_dphi.nr * svl_dphi.nc); + } + + // Handle DeePKS forces if enabled +#ifdef __MLALGO + if (PARAM.inp.deepks_scf) + { + const int nks = (PARAM.inp.nspin == 1 || PARAM.inp.nspin == 2) ? 1 : kv.get_nks(); + if (PARAM.globalv.gamma_only_local) + { + DeePKS_domain::cal_f_delta(deepks.ld.dm_r, ucell, orb, gd, + *flk.ParaV, nks, deepks.ld.deepks_param, + kv.kvec_d, deepks.ld.phialpha, deepks.ld.gedm, + fvnl_dalpha, isstress, svnl_dalpha); + } + else + { + DeePKS_domain::cal_f_delta>(deepks.ld.dm_r, ucell, orb, gd, + *flk.ParaV, nks, deepks.ld.deepks_param, + kv.kvec_d, deepks.ld.phialpha, deepks.ld.gedm, + fvnl_dalpha, isstress, svnl_dalpha); + } + + if (isforce) + { + Parallel_Reduce::reduce_pool(fvnl_dalpha.c, fvnl_dalpha.nr * fvnl_dalpha.nc); + } + if (isstress) + { + Parallel_Reduce::reduce_pool(svnl_dalpha.c, svnl_dalpha.nr * svnl_dalpha.nc); + } + } +#endif + //! forces and stress from vdw // Peize Lin add 2014-04-04, update 2021-03-09 // jiyy add 2019-05-18, update 2021-05-02 @@ -233,35 +356,40 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, } //! atomic forces from DFT+U (Quxin version) - ModuleBase::matrix force_dftu; - ModuleBase::matrix stress_dftu; + ModuleBase::matrix force_u; + ModuleBase::matrix stress_u; if (PARAM.inp.dft_plus_u) // Quxin add for DFT+U on 20201029 { if (isforce) { - force_dftu.create(nat, 3); + force_u.create(nat, 3); } if (isstress) { - stress_dftu.create(3, 3); + stress_u.create(3, 3); } if (PARAM.inp.dft_plus_u == 2) { - GlobalC::dftu.force_stress(ucell, gd, pelec, pv, fsr, force_dftu, stress_dftu, kv); + // Old DFT+U implementation (dft_plus_u==2) still needs ForceStressArrays + ForceStressArrays fsr_dftu; + std::vector>* dmk_d = nullptr; + std::vector>>* dmk_c = nullptr; + assign_dmk_ptr(dmat.dm, dmk_d, dmk_c, PARAM.globalv.gamma_only_local); + dftu.force_stress(ucell, gd, dmk_d, dmk_c, pv, fsr_dftu, force_u, stress_u, kv); } else { - hamilt::DFTU> tmp_dftu(nullptr, // HK and SK are not used for force&stress + hamilt::DFTU> tmpu(nullptr, // HK and SK are not used for force&stress kv.kvec_d, nullptr, // HR are not used for force&stress ucell, &gd, two_center_bundle.overlap_orb_onsite.get(), orb.cutoffs(), - &GlobalC::dftu); + &dftu); - tmp_dftu.cal_force_stress(isforce, isstress, force_dftu, stress_dftu); + tmpu.cal_force_stress(isforce, isstress, force_u, stress_u); } } @@ -287,23 +415,23 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, two_center_bundle.overlap_orb_onsite.get(), orb.cutoffs()); - const auto* dm_p = dynamic_cast>*>(pelec)->get_DM(); if (PARAM.inp.nspin == 2) { - const_cast, double>*>(dm_p)->switch_dmr(2); + dmat.dm->switch_dmr(2); } - const hamilt::HContainer* dmr = dm_p->get_DMR_pointer(1); + const hamilt::HContainer* dmr = dmat.dm->get_DMR_pointer(1); tmp_dspin.cal_force_stress(isforce, isstress, dmr, force_dspin, stress_dspin); if (PARAM.inp.nspin == 2) { - const_cast, double>*>(dm_p)->switch_dmr(0); + dmat.dm->switch_dmr(0); } } - if (!PARAM.globalv.gamma_only_local) - { - this->flk.finish_ftable(fsr); - } + // NOTE: finish_ftable is no longer needed as we don't use ForceStressArrays for overlap/kinetic + // if (!PARAM.globalv.gamma_only_local) + // { + // this->flk.finish_ftable(fsr); + // } #ifdef __EXX // Force and Stress contribution from exx @@ -362,7 +490,7 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, // Force contribution from DFT+U, Quxin add on 20201029 if (PARAM.inp.dft_plus_u) { - fcs(iat, i) += force_dftu(iat, i); + fcs(iat, i) += force_u(iat, i); } if (PARAM.inp.sc_mag_switch) { @@ -460,8 +588,8 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, //----------------------------- // this->print_force("OVERLAP FORCE",foverlap,1,ry); ModuleIO::print_force(GlobalV::ofs_running, ucell, "OVERLAP FORCE", foverlap, false); - // this->print_force("TVNL_DPHI force",ftvnl_dphi,PARAM.inp.test_force); - // this->print_force("VNL_DBETA force",fvnl_dbeta,PARAM.inp.test_force); + ModuleIO::print_force(GlobalV::ofs_running, ucell, "TVNL_DPHI force",ftvnl_dphi,false); + ModuleIO::print_force(GlobalV::ofs_running, ucell, "VNL_DBETA force",fvnl_dbeta,false); // this->print_force("T_VNL FORCE",ftvnl,1,ry); ModuleIO::print_force(GlobalV::ofs_running, ucell, "T_VNL FORCE", ftvnl, false); ModuleIO::print_force(GlobalV::ofs_running, ucell, "VL_dPHI FORCE", fvl_dphi, false); @@ -505,7 +633,7 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, } if (PARAM.inp.dft_plus_u) { - ModuleIO::print_force(GlobalV::ofs_running, ucell, "DFT+U FORCE", force_dftu, false); + ModuleIO::print_force(GlobalV::ofs_running, ucell, "DFT+U FORCE", force_u, false); } if (PARAM.inp.sc_mag_switch) { @@ -573,7 +701,7 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, // DFT plus U stress from qux if (PARAM.inp.dft_plus_u) { - scs(i, j) += stress_dftu(i, j); + scs(i, j) += stress_u(i, j); } if (PARAM.inp.sc_mag_switch) { @@ -642,7 +770,7 @@ void Force_Stress_LCAO::getForceStress(UnitCell& ucell, } if (PARAM.inp.dft_plus_u) { - ModuleIO::print_stress("DFTU STRESS", stress_dftu, screen, ry, GlobalV::ofs_running); + ModuleIO::print_stress("DFTU STRESS", stress_u, screen, ry, GlobalV::ofs_running); } if (PARAM.inp.sc_mag_switch) { @@ -712,31 +840,32 @@ void Force_Stress_LCAO::calForcePwPart(UnitCell& ucell, // overlap, kinetic, nonlocal pseudopotential, Local potential terms in force and stress template <> void Force_Stress_LCAO::integral_part(const bool isGammaOnly, - const bool isforce, - const bool isstress, - const UnitCell& ucell, - const Grid_Driver& gd, - ForceStressArrays& fsr, // mohan add 2024-06-15 - const elecstate::ElecState* pelec, - const psi::Psi* psi, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& ftvnl_dphi, - ModuleBase::matrix& fvnl_dbeta, - ModuleBase::matrix& fvl_dphi, - ModuleBase::matrix& soverlap, - ModuleBase::matrix& stvnl_dphi, - ModuleBase::matrix& svnl_dbeta, - ModuleBase::matrix& svl_dphi, - ModuleBase::matrix& fvnl_dalpha, - ModuleBase::matrix& svnl_dalpha, - Setup_DeePKS& deepks, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const K_Vectors& kv) + const bool isforce, + const bool isstress, + const UnitCell& ucell, + const Grid_Driver& gd, + ForceStressArrays& fsr, // mohan add 2024-06-15 + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + const psi::Psi* psi, + ModuleBase::matrix& foverlap, + ModuleBase::matrix& ftvnl_dphi, + ModuleBase::matrix& fvnl_dbeta, + ModuleBase::matrix& fvl_dphi, + ModuleBase::matrix& soverlap, + ModuleBase::matrix& stvnl_dphi, + ModuleBase::matrix& svnl_dbeta, + ModuleBase::matrix& svl_dphi, + ModuleBase::matrix& fvnl_dalpha, + ModuleBase::matrix& svnl_dalpha, + Setup_DeePKS& deepks, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, + const K_Vectors& kv) { - flk.ftable(isforce, isstress, fsr, ucell, gd, psi, pelec, + flk.ftable(isforce, isstress, fsr, ucell, gd, psi, pelec, dm, foverlap, ftvnl_dphi, fvnl_dbeta, fvl_dphi, soverlap, stvnl_dphi, svnl_dbeta, svl_dphi, fvnl_dalpha, svnl_dalpha, deepks, two_center_bundle, orb, pv); @@ -745,30 +874,31 @@ void Force_Stress_LCAO::integral_part(const bool isGammaOnly, template <> void Force_Stress_LCAO>::integral_part(const bool isGammaOnly, - const bool isforce, - const bool isstress, - const UnitCell& ucell, - const Grid_Driver& gd, - ForceStressArrays& fsr, // mohan add 2024-06-15 - const elecstate::ElecState* pelec, - const psi::Psi>* psi, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& ftvnl_dphi, - ModuleBase::matrix& fvnl_dbeta, - ModuleBase::matrix& fvl_dphi, - ModuleBase::matrix& soverlap, - ModuleBase::matrix& stvnl_dphi, - ModuleBase::matrix& svnl_dbeta, - ModuleBase::matrix& svl_dphi, - ModuleBase::matrix& fvnl_dalpha, - ModuleBase::matrix& svnl_dalpha, - Setup_DeePKS>& deepks, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const K_Vectors& kv) + const bool isforce, + const bool isstress, + const UnitCell& ucell, + const Grid_Driver& gd, + ForceStressArrays& fsr, // mohan add 2024-06-15 + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix, double>* dm, // mohan add 2025-11-04 + const psi::Psi>* psi, + ModuleBase::matrix& foverlap, + ModuleBase::matrix& ftvnl_dphi, + ModuleBase::matrix& fvnl_dbeta, + ModuleBase::matrix& fvl_dphi, + ModuleBase::matrix& soverlap, + ModuleBase::matrix& stvnl_dphi, + ModuleBase::matrix& svnl_dbeta, + ModuleBase::matrix& svl_dphi, + ModuleBase::matrix& fvnl_dalpha, + ModuleBase::matrix& svnl_dalpha, + Setup_DeePKS>& deepks, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, + const K_Vectors& kv) { - flk.ftable(isforce, isstress, fsr, ucell, gd, psi, pelec, + flk.ftable(isforce, isstress, fsr, ucell, gd, psi, pelec, dm, foverlap, ftvnl_dphi, fvnl_dbeta, fvl_dphi, soverlap, stvnl_dphi, svnl_dbeta, svl_dphi, fvnl_dalpha, svnl_dalpha, deepks, diff --git a/source/source_lcao/FORCE_STRESS.h b/source/source_lcao/FORCE_STRESS.h index dd7d464b94..8fce219b5a 100644 --- a/source/source_lcao/FORCE_STRESS.h +++ b/source/source_lcao/FORCE_STRESS.h @@ -8,7 +8,7 @@ #include "source_pw/module_pwdft/forces.h" #include "source_pw/module_pwdft/stress_func.h" #include "source_pw/module_pwdft/structure_factor.h" -#include "source_io/input_conv.h" +#include "source_io/module_parameter/input_conv.h" #include "source_psi/psi.h" #ifdef __EXX #include "source_lcao/module_ri/Exx_LRI_interface.h" @@ -16,6 +16,8 @@ #include "force_stress_arrays.h" #include "source_lcao/setup_exx.h" // for exx, mohan add 20251008 #include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251010 +#include "source_lcao/setup_dm.h" // mohan add 2025-11-03 +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-07 template @@ -38,6 +40,7 @@ class Force_Stress_LCAO const Grid_Driver& gd, Parallel_Orbitals& pv, const elecstate::ElecState* pelec, + LCAO_domain::Setup_DM &dmat, // mohan add 2025-11-03 const psi::Psi* psi, const TwoCenterBundle& two_center_bundle, const LCAO_Orbitals& orb, @@ -47,7 +50,8 @@ class Force_Stress_LCAO const Structure_Factor& sf, const K_Vectors& kv, ModulePW::PW_Basis* rhopw, - surchem& solvent, + surchem& solvent, + Plus_U &dftu, // mohan add 2025-11-07 Setup_DeePKS &deepks, Exx_NAO &exx_nao, ModuleSymmetry::Symmetry* symm); @@ -79,8 +83,9 @@ class Force_Stress_LCAO const UnitCell& ucell, const Grid_Driver& gd, ForceStressArrays& fsr, // mohan add 2024-06-15 - const elecstate::ElecState* pelec, - const psi::Psi* psi, + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + const psi::Psi* psi, ModuleBase::matrix& foverlap, ModuleBase::matrix& ftvnl_dphi, ModuleBase::matrix& fvnl_dbeta, @@ -115,4 +120,13 @@ class Force_Stress_LCAO template double Force_Stress_LCAO::force_invalid_threshold_ev = 0.00; +// only for DFT+U, mohan add 2025-11-04 +template +void assign_dmk_ptr( + elecstate::DensityMatrix* dm, + std::vector>*& dmk_d, + std::vector>>*& dmk_c, + bool gamma_only_local +); + #endif diff --git a/source/source_lcao/FORCE_gamma.cpp b/source/source_lcao/FORCE_gamma.cpp index 763a3e3321..b7eb00a441 100644 --- a/source/source_lcao/FORCE_gamma.cpp +++ b/source/source_lcao/FORCE_gamma.cpp @@ -3,7 +3,6 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" //caoyu add for deepks on 20210813 @@ -13,7 +12,7 @@ #include "source_estate/elecstate_lcao.h" #include "source_lcao/LCAO_domain.h" #include "source_lcao/pulay_fs.h" -#include "source_io/write_HS.h" +#include "source_io/module_hs/write_HS.h" template <> void Force_LCAO::allocate(const UnitCell& ucell, @@ -110,14 +109,6 @@ void Force_LCAO::allocate(const UnitCell& ucell, &gd, nullptr); - // calculate asynchronous S matrix to output for Hefei-NAMD - if (PARAM.inp.cal_syns) - { - cal_deri = false; - ModuleBase::timer::tick("Forces", "allocate"); - ModuleBase::WARNING_QUIT("cal_syns", "this function has been broken and will be fixed later."); - } - ModuleBase::timer::tick("Forces", "allocate"); return; } @@ -158,9 +149,10 @@ void Force_LCAO::ftable(const bool isforce, const UnitCell& ucell, const Grid_Driver& gd, const psi::Psi* psi, - const elecstate::ElecState* pelec, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& ftvnl_dphi, + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + ModuleBase::matrix& foverlap, + ModuleBase::matrix& ftvnl_dphi, ModuleBase::matrix& fvnl_dbeta, ModuleBase::matrix& fvl_dphi, ModuleBase::matrix& soverlap, @@ -179,10 +171,6 @@ void Force_LCAO::ftable(const bool isforce, ModuleBase::TITLE("Forces", "ftable"); ModuleBase::timer::tick("Forces", "ftable"); - // get DM - const elecstate::DensityMatrix* dm - = dynamic_cast*>(pelec)->get_DM(); - this->ParaV = dm->get_paraV_pointer(); // allocate DSloc_x, DSloc_y, DSloc_z @@ -234,10 +222,10 @@ void Force_LCAO::ftable(const bool isforce, gd, *this->ParaV, nks, + deepks.ld.deepks_param, kv->kvec_d, deepks.ld.phialpha, deepks.ld.gedm, - deepks.ld.inl_index, fvnl_dalpha, isstress, svnl_dalpha); diff --git a/source/source_lcao/FORCE_k.cpp b/source/source_lcao/FORCE_k.cpp index 1e19a53a20..1ba2d435f0 100644 --- a/source/source_lcao/FORCE_k.cpp +++ b/source/source_lcao/FORCE_k.cpp @@ -10,8 +10,7 @@ #include "source_estate/module_dm/cal_dm_psi.h" #include "source_lcao/LCAO_domain.h" #include "source_lcao/pulay_fs.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/write_HS.h" +#include "source_io/module_hs/write_HS.h" #include "source_io/module_parameter/parameter.h" #include @@ -133,33 +132,6 @@ void Force_LCAO>::allocate(const UnitCell& ucell, &gd, nullptr); // delete lm.Hloc_fixedR - // calculate asynchronous S matrix to output for Hefei-NAMD - if (PARAM.inp.cal_syns) - { - cal_deri = false; - - ModuleBase::WARNING_QUIT("cal_syns", "This function has been broken and will be fixed later."); - - LCAO_domain::build_ST_new(fsr, - 'S', - cal_deri, - PARAM.inp.cal_stress, - ucell, - orb, - pv, - two_center_bundle, - &(gd), - nullptr, // delete lm.SlocR - PARAM.inp.cal_syns, - PARAM.inp.dmax); - - for (int ik = 0; ik < nks; ik++) - { - - bool bit = false; // LiuXh, 2017-03-21 - } - } - ModuleBase::timer::tick("Forces", "allocate"); return; } @@ -190,35 +162,33 @@ void Force_LCAO>::finish_ftable(ForceStressArrays& fsr) // be called in Force_LCAO::start_force_calculation template <> void Force_LCAO>::ftable(const bool isforce, - const bool isstress, - ForceStressArrays& fsr, // mohan add 2024-06-15 - const UnitCell& ucell, - const Grid_Driver& gd, - const psi::Psi>* psi, - const elecstate::ElecState* pelec, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& ftvnl_dphi, - ModuleBase::matrix& fvnl_dbeta, - ModuleBase::matrix& fvl_dphi, - ModuleBase::matrix& soverlap, - ModuleBase::matrix& stvnl_dphi, - ModuleBase::matrix& svnl_dbeta, - ModuleBase::matrix& svl_dphi, - ModuleBase::matrix& fvnl_dalpha, - ModuleBase::matrix& svnl_dalpha, - Setup_DeePKS>& deepks, - const TwoCenterBundle& two_center_bundle, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const K_Vectors* kv, - Record_adj* ra) + const bool isstress, + ForceStressArrays& fsr, // mohan add 2024-06-15 + const UnitCell& ucell, + const Grid_Driver& gd, + const psi::Psi>* psi, + const elecstate::ElecState* pelec, + const elecstate::DensityMatrix, double>* dm, // mohan add 2025-11-04 + ModuleBase::matrix& foverlap, + ModuleBase::matrix& ftvnl_dphi, + ModuleBase::matrix& fvnl_dbeta, + ModuleBase::matrix& fvl_dphi, + ModuleBase::matrix& soverlap, + ModuleBase::matrix& stvnl_dphi, + ModuleBase::matrix& svnl_dbeta, + ModuleBase::matrix& svl_dphi, + ModuleBase::matrix& fvnl_dalpha, + ModuleBase::matrix& svnl_dalpha, + Setup_DeePKS>& deepks, + const TwoCenterBundle& two_center_bundle, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, + const K_Vectors* kv, + Record_adj* ra) { ModuleBase::TITLE("Forces", "ftable"); ModuleBase::timer::tick("Forces", "ftable"); - elecstate::DensityMatrix , double>* dm - = dynamic_cast>*>(pelec)->get_DM(); - this->allocate(ucell, gd, pv, @@ -259,10 +229,10 @@ void Force_LCAO>::ftable(const bool isforce, gd, pv, kv->get_nks(), + deepks.ld.deepks_param, kv->kvec_d, deepks.ld.phialpha, deepks.ld.gedm, - deepks.ld.inl_index, fvnl_dalpha, isstress, svnl_dalpha); diff --git a/source/source_lcao/LCAO_allocate.cpp b/source/source_lcao/LCAO_allocate.cpp index 0143727c7e..adbe45c3c3 100644 --- a/source/source_lcao/LCAO_allocate.cpp +++ b/source/source_lcao/LCAO_allocate.cpp @@ -1,7 +1,6 @@ #include "source_base/timer.h" #include "source_lcao/LCAO_domain.h" #include "source_lcao/module_deepks/LCAO_deepks.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" namespace LCAO_domain diff --git a/source/source_lcao/LCAO_hamilt.hpp b/source/source_lcao/LCAO_hamilt.hpp deleted file mode 100644 index 4e91ca724d..0000000000 --- a/source/source_lcao/LCAO_hamilt.hpp +++ /dev/null @@ -1,152 +0,0 @@ -#include "source_io/module_parameter/parameter.h" - -#ifndef LCAO_HAMILT_HPP -#define LCAO_HAMILT_HPP - -#include "source_base/abfs-vector3_order.h" -#include "source_base/global_variable.h" -#include "source_base/timer.h" -#include "source_lcao/spar_exx.h" -#include "source_lcao/module_ri/RI_2D_Comm.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef __EXX -// Peize Lin add 2022.09.13 - -template -void sparse_format::cal_HR_exx(const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const int& current_spin, - const double& sparse_threshold, - const int (&nmp)[3], - const std::vector>, - RI::Tensor>>>& Hexxs) { - ModuleBase::TITLE("sparse_format", "cal_HR_exx"); - ModuleBase::timer::tick("sparse_format", "cal_HR_exx"); - - const Tdata frac = GlobalC::exx_info.info_global.hybrid_alpha; - - std::map> atoms_pos; - for (int iat = 0; iat < ucell.nat; ++iat) { - atoms_pos[iat] = RI_Util::Vector3_to_array3( - ucell.atoms[ucell.iat2it[iat]] - .tau[ucell.iat2ia[iat]]); - } - const std::array, 3> latvec - = {RI_Util::Vector3_to_array3(ucell.a1), // too bad to use GlobalC here, - RI_Util::Vector3_to_array3(ucell.a2), - RI_Util::Vector3_to_array3(ucell.a3)}; - - const std::array Rs_period = {nmp[0], nmp[1], nmp[2]}; - - RI::Cell_Nearest cell_nearest; - cell_nearest.init(atoms_pos, latvec, Rs_period); - - const std::vector is_list = (PARAM.inp.nspin != 4) - ? std::vector{current_spin} - : std::vector{0, 1, 2, 3}; - - for (const int is: is_list) - { - int is0_b = 0; - int is1_b = 0; - std::tie(is0_b, is1_b) = RI_2D_Comm::split_is_block(is); - - if (Hexxs.empty()) - { - break; - } - - for (const auto& HexxA: Hexxs[is]) - { - const int iat0 = HexxA.first; - for (const auto& HexxB: HexxA.second) - { - const int iat1 = HexxB.first.first; - - const Abfs::Vector3_Order R = RI_Util::array3_to_Vector3( - cell_nearest.get_cell_nearest_discrete(iat0, - iat1, - HexxB.first.second)); - - HS_Arrays.all_R_coor.insert(R); - - const RI::Tensor& Hexx = HexxB.second; - - for (size_t iw0 = 0; iw0 < Hexx.shape[0]; ++iw0) - { - const int iwt0 = RI_2D_Comm::get_iwt(ucell,iat0, iw0, is0_b); - const int iwt0_local = pv.global2local_row(iwt0); - - if (iwt0_local < 0) - { - continue; - } - - for (size_t iw1 = 0; iw1 < Hexx.shape[1]; ++iw1) - { - const int iwt1 = RI_2D_Comm::get_iwt(ucell,iat1, iw1, is1_b); - const int iwt1_local = pv.global2local_col(iwt1); - - if (iwt1_local < 0) - { - continue; - } - - if (std::abs(Hexx(iw0, iw1)) > sparse_threshold) - { - if (PARAM.inp.nspin == 1 || PARAM.inp.nspin == 2) - { - auto& HR_sparse_ptr - = HS_Arrays - .HR_sparse[current_spin][R][iwt0]; - double& HR_sparse = HR_sparse_ptr[iwt1]; - HR_sparse += RI::Global_Func::convert( - frac * Hexx(iw0, iw1)); - if (std::abs(HR_sparse) <= sparse_threshold) - { - HR_sparse_ptr.erase(iwt1); - } - } - else if (PARAM.inp.nspin == 4) - { - auto& HR_sparse_ptr - = HS_Arrays.HR_soc_sparse[R][iwt0]; - - std::complex& HR_sparse - = HR_sparse_ptr[iwt1]; - - HR_sparse += RI::Global_Func::convert< - std::complex>(frac * Hexx(iw0, iw1)); - - if (std::abs(HR_sparse) <= sparse_threshold) - { - HR_sparse_ptr.erase(iwt1); - } - } - else - { - throw std::invalid_argument(std::string(__FILE__) + " line " - + std::to_string(__LINE__)); - } - } - } - } - } - } - } - - ModuleBase::timer::tick("sparse_format", "cal_HR_exx"); -} -#endif - -#endif diff --git a/source/source_lcao/LCAO_init_basis.cpp b/source/source_lcao/LCAO_init_basis.cpp index f8b60b6298..c18e859599 100644 --- a/source/source_lcao/LCAO_init_basis.cpp +++ b/source/source_lcao/LCAO_init_basis.cpp @@ -2,11 +2,6 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/parallel_comm.h" -/// once the GlobalC::exx_info has been deleted, this include can be gone -/// mohan note 2024-07-21 -#ifdef __EXX -#include "source_pw/module_pwdft/global.h" -#endif namespace LCAO_domain { @@ -62,11 +57,6 @@ void init_basis_lcao(Parallel_Orbitals& pv, two_center_bundle.build_beta(ucell.ntype, ucell.infoNL.Beta); } - int Lmax = 0; -#ifdef __EXX - Lmax = GlobalC::exx_info.info_ri.abfs_Lmax; -#endif - #ifdef USE_NEW_TWO_CENTER two_center_bundle.tabulate(); #else diff --git a/source/source_lcao/LCAO_set.cpp b/source/source_lcao/LCAO_set.cpp new file mode 100644 index 0000000000..9d30b073a0 --- /dev/null +++ b/source/source_lcao/LCAO_set.cpp @@ -0,0 +1,205 @@ +#include "source_lcao/LCAO_set.h" +#include "source_io/module_parameter/parameter.h" +#include "source_psi/setup_psi.h" // use Setup_Psi +#include "source_io/module_wf/read_wfc_nao.h" // use read_wfc_nao +#include "source_estate/elecstate_tools.h" // use fixed_weights +#include "source_lcao/module_hcontainer/read_hcontainer.h" + +template +void LCAO_domain::set_psi_occ_dm_chg( + const K_Vectors &kv, // k-points + psi::Psi* &psi, // coefficients of NAO basis + const Parallel_Orbitals &pv, // parallel scheme of NAO basis + elecstate::ElecState* pelec, // eigen values and weights + LCAO_domain::Setup_DM &dmat, // density matrix + Charge &chr, // charge density + const Input_para &inp) // input parameters +{ + + //! 1) init electronic wave function psi + Setup_Psi::allocate_psi(psi, kv, pv, inp); + + //! 2) read psi from file + if (inp.init_wfc == "file" && inp.esolver_type != "tddft") + { + if (!ModuleIO::read_wfc_nao(PARAM.globalv.global_readin_dir, + pv, *psi, pelec->ekb, pelec->wg, kv.ik2iktot, + kv.get_nkstot(), inp.nspin)) + { + ModuleBase::WARNING_QUIT("set_psi_occ_dm_chg", "read electronic wave functions failed"); + } + } + + //! 3) set occupations, tddft does not need to set occupations in the first scf + if (inp.ocp && inp.esolver_type != "tddft") + { + elecstate::fixed_weights(inp.ocp_kb, inp.nbands, inp.nelec, + &kv, pelec->wg, pelec->skip_weights); + } + + //! 4) init DMK, but DMR is constructed in before_scf() + dmat.allocate_dm(&kv, &pv, inp.nspin); + + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "CHARGE"); + + return; +} + + +template +void LCAO_domain::set_pot( + UnitCell &ucell, // not const because of dftu + K_Vectors &kv, // not const due to exx + Structure_Factor& sf, // will be modified in potential + const ModulePW::PW_Basis &pw_rho, + const ModulePW::PW_Basis &pw_rhod, + elecstate::ElecState* pelec, + const LCAO_Orbitals& orb, + Parallel_Orbitals &pv, // not const due to deepks + pseudopot_cell_vl &locpp, + Plus_U &dftu, + surchem& solvent, + Exx_NAO &exx_nao, + Setup_DeePKS &deepks, + const Input_para &inp) +{ + //! 1) init local pseudopotentials + locpp.init_vloc(ucell, &pw_rho); + + //! 2) init potentials + if (pelec->pot == nullptr) + { + // where is the pot deleted? + pelec->pot = new elecstate::Potential(&pw_rhod, &pw_rho, + &ucell, &locpp.vloc, &sf, &solvent, + &(pelec->f_en.etxc), &(pelec->f_en.vtxc)); + } + + //! 3) initialize DFT+U + if (inp.dft_plus_u) + { + dftu.init(ucell, &pv, kv.get_nks(), &orb); + } + + //! 4) init exact exchange calculations + exx_nao.before_runner(ucell, kv, orb, pv, inp); + + //! 5) init deepks + deepks.before_runner(ucell, kv.get_nks(), orb, pv, inp); + + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "POTENTIALS"); + + return; +} + +template +void LCAO_domain::init_dm_from_file( + const std::string dmfile, + LCAO_domain::Setup_DM& dmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv) +{ + ModuleBase::TITLE("LCAO_domain", "init_dm_from_file"); + hamilt::HContainer* dm_container = dmat.dm->get_DMR_vector()[0]; + hamilt::Read_HContainer reader_dm( + dm_container, + dmfile, + PARAM.globalv.nlocal, + &ucell + ); + reader_dm.read(); + return; +} + +template +void LCAO_domain::init_hr_from_file( + const std::string hrfile, + hamilt::HContainer* hmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv) +{ + ModuleBase::TITLE("LCAO_domain", "init_hr_from_file"); + hmat->set_zero(); + hamilt::Read_HContainer reader_hr( + hmat, + hrfile, + PARAM.globalv.nlocal, + &ucell + ); + reader_hr.read(); + return; +} + + + +template void LCAO_domain::set_psi_occ_dm_chg( + const K_Vectors &kv, // k-points + psi::Psi* &psi, // coefficients of NAO basis + const Parallel_Orbitals &pv, // parallel scheme of NAO basis + elecstate::ElecState* pelec, // eigen values and weights + LCAO_domain::Setup_DM &dmat, // density matrix + Charge &chr, // charge density + const Input_para &inp); + +template void LCAO_domain::set_psi_occ_dm_chg>( + const K_Vectors &kv, // k-points + psi::Psi>* &psi, // coefficients of NAO basis + const Parallel_Orbitals &pv, // parallel scheme of NAO basis + elecstate::ElecState* pelec, // eigen values and weights + LCAO_domain::Setup_DM> &dmat, // density matrix + Charge &chr, // charge density + const Input_para &inp); + +template void LCAO_domain::set_pot( + UnitCell &ucell, + K_Vectors &kv, + Structure_Factor& sf, + const ModulePW::PW_Basis &pw_rho, + const ModulePW::PW_Basis &pw_rhod, + elecstate::ElecState* pelec, + const LCAO_Orbitals& orb, + Parallel_Orbitals &pv, + pseudopot_cell_vl &locpp, + Plus_U &dftu, + surchem& solvent, + Exx_NAO &exx_nao, + Setup_DeePKS &deepks, + const Input_para &inp); + +template void LCAO_domain::set_pot>( + UnitCell &ucell, + K_Vectors &kv, + Structure_Factor& sf, + const ModulePW::PW_Basis &pw_rho, + const ModulePW::PW_Basis &pw_rhod, + elecstate::ElecState* pelec, + const LCAO_Orbitals& orb, + Parallel_Orbitals &pv, + pseudopot_cell_vl &locpp, + Plus_U &dftu, + surchem& solvent, + Exx_NAO> &exx_nao, + Setup_DeePKS> &deepks, + const Input_para &inp); + +template void LCAO_domain::init_dm_from_file( + const std::string dmfile, + LCAO_domain::Setup_DM& dmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); +template void LCAO_domain::init_dm_from_file>( + const std::string dmfile, + LCAO_domain::Setup_DM>& dmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); + +template void LCAO_domain::init_hr_from_file( + const std::string hrfile, + hamilt::HContainer* hmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); +template void LCAO_domain::init_hr_from_file>( + const std::string hrfile, + hamilt::HContainer>* hmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); diff --git a/source/source_lcao/LCAO_set.h b/source/source_lcao/LCAO_set.h new file mode 100644 index 0000000000..fc7d807a37 --- /dev/null +++ b/source/source_lcao/LCAO_set.h @@ -0,0 +1,77 @@ +#ifndef LCAO_SET_H +#define LCAO_SET_H + +#include "source_cell/unitcell.h" +#include "source_cell/klist.h" +#include "source_psi/psi.h" +#include "source_estate/elecstate.h" +#include "source_lcao/setup_dm.h" +#include "source_pw/module_pwdft/structure_factor.h" +#include "source_basis/module_pw/pw_basis.h" +#include "source_hamilt/module_surchem/surchem.h" +#include "source_pw/module_pwdft/vl_pw.h" +#include "source_lcao/module_deepks/LCAO_deepks.h" +#include "source_lcao/module_dftu/dftu.h" +#include "source_lcao/setup_exx.h" +#include "source_lcao/setup_deepks.h" + +namespace LCAO_domain +{ + +/** + * @brief set up wave functions, occupation numbers, + * density matrix and charge density + */ +template +void set_psi_occ_dm_chg( + const K_Vectors &kv, // k-points + psi::Psi* &psi, // coefficients of NAO basis + const Parallel_Orbitals &pv, // parallel scheme of NAO basis + elecstate::ElecState* pelec, // eigen values and weights + LCAO_domain::Setup_DM &dmat, // density matrix + Charge &chr, // charge density + const Input_para& inp); // input parameters + +/** + * @brief set up potentials, including local pseudopotentials, + * +U potential, solvent potential, exx potential and deepks potential + */ +template +void set_pot( + UnitCell &ucell, + K_Vectors &kv, + Structure_Factor& sf, + const ModulePW::PW_Basis &pw_rho, + const ModulePW::PW_Basis &pw_rhod, + elecstate::ElecState* pelec, + const LCAO_Orbitals& orb, + Parallel_Orbitals &pv, + pseudopot_cell_vl &locpp, + Plus_U &dftu, + surchem& solvent, + Exx_NAO &exx_nao, + Setup_DeePKS &deepks, + const Input_para &inp); + +/** + * @brief read in DMR from file, and save it into dmat + */ +template +void init_dm_from_file( + const std::string dmfile, + LCAO_domain::Setup_DM& dmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); + +/** + * @brief read in HR from file, and save it into hmat + */ +template +void init_hr_from_file( + const std::string hrfile, + hamilt::HContainer* hmat, + const UnitCell& ucell, + const Parallel_Orbitals* pv); +} // end namespace + +#endif diff --git a/source/source_lcao/center2_orb-orb11.cpp b/source/source_lcao/center2_orb-orb11.cpp index 9c4612d6fa..7e4304f01b 100644 --- a/source/source_lcao/center2_orb-orb11.cpp +++ b/source/source_lcao/center2_orb-orb11.cpp @@ -24,6 +24,8 @@ Center2_Orb::Orb11::Orb11(const Numerical_Orbital_Lm& nA_in, void Center2_Orb::Orb11::init_radial_table() { + const int rmesh = Center2_Orb::get_rmesh(this->nA.getRcut(), this->nB.getRcut(), dr_); + const int LA = this->nA.getL(); const int LB = this->nB.getL(); for (int LAB = std::abs(LA - LB); LAB <= LA + LB; ++LAB) @@ -33,8 +35,6 @@ void Center2_Orb::Orb11::init_radial_table() continue; } - const int rmesh = Center2_Orb::get_rmesh(this->nA.getRcut(), this->nB.getRcut(), dr_); - this->Table_r[LAB].resize(rmesh, 0); this->Table_dr[LAB].resize(rmesh, 0); @@ -43,8 +43,8 @@ void Center2_Orb::Orb11::init_radial_table() this->nA, this->nB, rmesh, - this->Table_r[LAB].data(), - this->Table_dr[LAB].data(), + this->Table_r[LAB], + this->Table_dr[LAB], psb_); } return; @@ -81,8 +81,8 @@ void Center2_Orb::Orb11::init_radial_table(const std::set& radials) this->nA, this->nB, radials_used, - this->Table_r[LAB].data(), - this->Table_dr[LAB].data(), + this->Table_r[LAB], + this->Table_dr[LAB], psb_); } } diff --git a/source/source_lcao/center2_orb.cpp b/source/source_lcao/center2_orb.cpp index a2abeaf8bd..b222716ce1 100644 --- a/source/source_lcao/center2_orb.cpp +++ b/source/source_lcao/center2_orb.cpp @@ -3,7 +3,6 @@ #include "source_base/constants.h" #include "source_base/math_integral.h" #include "source_base/mathzone_add1.h" -#include "source_base/memory.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" #include "source_base/tool_title.h" @@ -29,83 +28,7 @@ int Center2_Orb::get_rmesh(const double& R1, const double& R2, const double dr) } // Peize Lin update 2016-01-26 -void Center2_Orb::init_Lmax(const int orb_num, - const int mode, - int& Lmax_used, - int& Lmax, - const int& Lmax_exx, - const int lmax_orb, - const int lmax_beta) -{ - - Lmax = -1; - - switch (orb_num) - { - case 2: - switch (mode) - { - case 1: // used in or - Lmax = std::max({Lmax, lmax_orb, lmax_beta}); - // use 2lmax+1 in dS - Lmax_used = 2 * Lmax + 1; - break; - case 2: // used in or - Lmax = std::max(Lmax, Lmax_exx); - Lmax_used = 2 * Lmax + 1; - break; - case 3: // used in berryphase by jingan - Lmax = std::max(Lmax, lmax_orb); - Lmax++; - Lmax_used = 2 * Lmax + 1; - break; - default: - throw std::invalid_argument("Center2_Orb::init_Lmax orb_num=2, mode error"); - break; - } - break; - case 3: - switch (mode) - { - case 1: // used in or - Lmax = std::max(Lmax, lmax_orb); - Lmax_used = 2 * Lmax + 1; - Lmax = std::max(Lmax, Lmax_exx); - Lmax_used += Lmax_exx; - break; - default: - throw std::invalid_argument("Center2_Orb::init_Lmax orb_num=3, mode error"); - break; - } - break; - case 4: - switch (mode) - { - case 1: // used in - Lmax = std::max(Lmax, lmax_orb); - Lmax_used = 2 * (2 * Lmax + 1); - break; - default: - throw std::invalid_argument("Center2_Orb::init_Lmax orb_num=4, mode error"); - break; - } - break; - default: - throw std::invalid_argument("Center2_Orb::init_Lmax orb_num error"); - break; - } - - assert(Lmax_used >= 1); -} - -// Peize Lin update 2016-01-26 -void Center2_Orb::init_Table_Spherical_Bessel(const int orb_num, - const int mode, - int& Lmax_used, - int& Lmax, - const int& Lmax_exx, - const int lmax_orb, - const int lmax_beta, +void Center2_Orb::init_Table_Spherical_Bessel(const int Lmax_used, const double dr, const double dk, const int kmesh, @@ -114,8 +37,6 @@ void Center2_Orb::init_Table_Spherical_Bessel(const int orb_num, { ModuleBase::TITLE("Center2_Orb", "init_Table_Spherical_Bessel"); - init_Lmax(orb_num, mode, Lmax_used, Lmax, Lmax_exx, lmax_orb, lmax_beta); // Peize Lin add 2016-01-26 - for (auto& sb: ModuleBase::Sph_Bessel_Recursive_Pool::D2::sb_pool) { if (dr * dk == sb.get_dx()) @@ -132,9 +53,7 @@ void Center2_Orb::init_Table_Spherical_Bessel(const int orb_num, } psb->set_dx(dr * dk); - psb->cal_jlx(Lmax_used, Rmesh, kmesh); - - ModuleBase::Memory::record("ORB::Jl(x)", sizeof(double) * (Lmax_used + 1) * kmesh * Rmesh); + psb->cal_jlx(Lmax_used+1, Rmesh, kmesh); // +1 for drs needs psb.jlx[l+1]. Peize Lin update 2025-12-27 } // Peize Lin accelerate 2017-10-02 @@ -143,12 +62,15 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, const Numerical_Orbital_Lm& n1, const Numerical_Orbital_Lm& n2, const int& rmesh, - double* rs, - double* drs, + std::vector &rs, + std::vector &drs, const ModuleBase::Sph_Bessel_Recursive::D2* psb) { ModuleBase::timer::tick("Center2_Orb", "cal_ST_Phi12_R"); + assert(rmesh <= rs.size()); + assert(rmesh <= drs.size()); + const int kmesh = n1.getNk(); const double* kpoint = n1.getKpoint(); const double dk = n1.getDk(); @@ -202,15 +124,14 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, // double* integrated_func = new double[kmesh]; - int ll = 0; - if (l != 0) - { - ll = l - 1; - } - - const std::vector>& jlm1 = psb->get_jlx()[ll]; - const std::vector>& jl = psb->get_jlx()[l]; - const std::vector>& jlp1 = psb->get_jlx()[l + 1]; + assert(psb->get_jlx().size()>=l+2); + const int lml = (l>0) ? (l-1) : 0; + const std::vector>& jlm1 = psb->get_jlx().at(lml); + const std::vector>& jl = psb->get_jlx().at(l); + const std::vector>& jlp1 = psb->get_jlx().at(l+1); + assert(jlm1.size()>=rmesh); + assert(jl.size()>=rmesh); + assert(jlp1.size()>=rmesh); #ifdef _OPENMP #pragma omp parallel for schedule(static) @@ -219,6 +140,7 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, { std::vector integrated_func(kmesh); const std::vector& jl_r = jl[ir]; + assert(jl_r.size()>=kmesh); for (int ik = 0; ik < kmesh; ++ik) { integrated_func[ik] = jl_r[ik] * k1_dot_k2[ik]; @@ -232,6 +154,8 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, // Peize Lin accelerate 2017-10-02 const std::vector& jlm1_r = jlm1[ir]; const std::vector& jlp1_r = jlp1[ir]; + assert(jlm1_r.size()>=kmesh); + assert(jlp1_r.size()>=kmesh); const double fac = l / (l + 1.0); if (l == 0) { @@ -281,8 +205,8 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, const Numerical_Orbital_Lm& n1, const Numerical_Orbital_Lm& n2, const std::set& radials, - double* rs, - double* drs, + std::vector &rs, + std::vector &drs, const ModuleBase::Sph_Bessel_Recursive::D2* psb) { // ModuleBase::TITLE("Center2_Orb","cal_ST_Phi12_R"); @@ -335,21 +259,23 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, std::vector integrated_func(kmesh); - const int lm1 = (l > 0 ? l - 1 : 0); - const std::vector>& jlm1 = psb->get_jlx()[lm1]; - const std::vector>& jl = psb->get_jlx()[l]; - const std::vector>& jlp1 = psb->get_jlx()[l + 1]; + assert(psb->get_jlx().size()>=l+2); + const int lm1 = (l>0) ? (l-1) : 0; + const std::vector>& jlm1 = psb->get_jlx().at(lm1); + const std::vector>& jl = psb->get_jlx().at(l); + const std::vector>& jlp1 = psb->get_jlx().at(l+1); for (const size_t& ir: radials) { // if(rs[ir]) => rs[ir] has been calculated // if(drs[ir]) => drs[ir] has been calculated // Actually, if(ir[ir]||dr[ir]) is enough. Double insurance for the sake of avoiding numerical errors - if (rs[ir] && drs[ir]) { + if (rs.at(ir) && drs.at(ir)) { continue; } const std::vector& jl_r = jl[ir]; + assert(jl_r.size()>=kmesh); for (int ik = 0; ik < kmesh; ++ik) { integrated_func[ik] = jl_r[ik] * k1_dot_k2[ik]; @@ -357,10 +283,12 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, double temp = 0.0; ModuleBase::Integral::Simpson_Integral(kmesh, ModuleBase::GlobalFunc::VECTOR_TO_PTR(integrated_func), dk, temp); - rs[ir] = temp * ModuleBase::FOUR_PI; + rs.at(ir) = temp * ModuleBase::FOUR_PI; - const std::vector& jlm1_r = jlm1[ir]; - const std::vector& jlp1_r = jlp1[ir]; + const std::vector& jlm1_r = jlm1.at(ir); + const std::vector& jlp1_r = jlp1.at(ir); + assert(jlm1_r.size()>=kmesh); + assert(jlp1_r.size()>=kmesh); const double fac = l / (l + 1.0); if (l == 0) { @@ -378,7 +306,7 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, } ModuleBase::Integral::Simpson_Integral(kmesh, ModuleBase::GlobalFunc::VECTOR_TO_PTR(integrated_func), dk, temp); - drs[ir] = -ModuleBase::FOUR_PI * (l + 1) / (2.0 * l + 1) * temp; + drs.at(ir) = -ModuleBase::FOUR_PI * (l + 1) / (2.0 * l + 1) * temp; } // cal rs[0] special @@ -399,7 +327,7 @@ void Center2_Orb::cal_ST_Phi12_R(const int& job, // PLEASE try to make dualfac function as input parameters // mohan note 2021-03-23 - rs[0] = ModuleBase::FOUR_PI / ModuleBase::Mathzone_Add1::dualfac(2 * l + 1) * temp; + rs.at(0) = ModuleBase::FOUR_PI / ModuleBase::Mathzone_Add1::dualfac(2 * l + 1) * temp; } } diff --git a/source/source_lcao/center2_orb.h b/source/source_lcao/center2_orb.h index a10e3dffe5..f9a7688532 100644 --- a/source/source_lcao/center2_orb.h +++ b/source/source_lcao/center2_orb.h @@ -25,21 +25,7 @@ class Center2_Orb static int get_rmesh(const double& R1, const double& R2, const double dr); - static void init_Lmax(const int orb_num, - const int mode, - int& Lmax_used, - int& Lmax, - const int& Lmax_exx, - const int lmax_orb, - const int lmax_beta); - - static void init_Table_Spherical_Bessel(const int orb_num, - const int mode, - int& Lmax_used, - int& Lmax, - const int& Lmax_exx, - const int lmax_orb, - const int lmax_beta, + static void init_Table_Spherical_Bessel(const int Lmax_used, const double dr, const double dk, const int kmesh, @@ -51,8 +37,8 @@ class Center2_Orb const Numerical_Orbital_Lm& n1, const Numerical_Orbital_Lm& n2, const int& rmesh, - double* rs, - double* drs, + std::vector &rs, + std::vector &drs, const ModuleBase::Sph_Bessel_Recursive::D2* psb); // Peize Lin add 2017-10-13 @@ -61,8 +47,8 @@ class Center2_Orb const Numerical_Orbital_Lm& n1, const Numerical_Orbital_Lm& n2, const std::set& radials, // only calculate ir in radials - double* rs, - double* drs, + std::vector &rs, + std::vector &drs, const ModuleBase::Sph_Bessel_Recursive::D2* psb); }; diff --git a/source/source_lcao/edm.cpp b/source/source_lcao/edm.cpp index 7937a503ac..7ad1b30fbe 100644 --- a/source/source_lcao/edm.cpp +++ b/source/source_lcao/edm.cpp @@ -1,5 +1,6 @@ #include "FORCE.h" #include "source_estate/module_dm/cal_dm_psi.h" +#include "source_estate/elecstate_lcao.h" #include "source_base/memory.h" #include "source_io/module_parameter/parameter.h" template<> @@ -30,10 +31,10 @@ elecstate::DensityMatrix Force_LCAO::cal_edm(const elecs #ifdef __PEXSI if (PARAM.inp.ks_solver == "pexsi") { - auto pes = dynamic_cast*>(pelec); + // auto pes = dynamic_cast*>(pelec); for (int ik = 0; ik < nspin; ik++) { - edm.set_DMK_pointer(ik, pes->get_DM()->pexsi_EDM[ik]); + edm.set_DMK_pointer(ik, dm.pexsi_EDM[ik]); } } @@ -42,11 +43,14 @@ elecstate::DensityMatrix Force_LCAO::cal_edm(const elecs { elecstate::cal_dm_psi(edm.get_paraV_pointer(), wg_ekb, psi, edm); } + edm.init_DMR(ra, &ucell); + edm.cal_DMR(); return edm; } template<> -elecstate::DensityMatrix, double> Force_LCAO>::cal_edm(const elecstate::ElecState* pelec, +elecstate::DensityMatrix, double> Force_LCAO>::cal_edm( + const elecstate::ElecState* pelec, const psi::Psi>& psi, const elecstate::DensityMatrix, double>& dm, const K_Vectors& kv, @@ -100,4 +104,4 @@ elecstate::DensityMatrix, double> Force_LCAO @@ -30,17 +29,18 @@ #include "source_hsolver/hsolver_lcao.h" #include "module_operator_lcao/dftu_lcao.h" #include "module_operator_lcao/dspin_lcao.h" -#include "module_operator_lcao/ekinetic_new.h" +#include "module_operator_lcao/ekinetic.h" #include "module_operator_lcao/meta_lcao.h" -#include "module_operator_lcao/nonlocal_new.h" +#include "module_operator_lcao/nonlocal.h" #include "module_operator_lcao/op_dftu_lcao.h" #include "module_operator_lcao/op_exx_lcao.h" -#include "module_operator_lcao/overlap_new.h" +#include "module_operator_lcao/overlap.h" #include "module_operator_lcao/td_ekinetic_lcao.h" #include "module_operator_lcao/td_nonlocal_lcao.h" #include "module_operator_lcao/td_pot_hybrid.h" #include "module_operator_lcao/veff_lcao.h" + namespace hamilt { @@ -59,7 +59,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // initialize the overlap matrix this->sR = new HContainer(paraV); - this->getOperator() = new OverlapNew>(this->hsk, + this->getOperator() = new Overlap>(this->hsk, this->kv->kvec_d, this->hR, this->sR, @@ -77,16 +77,11 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, const K_Vectors& kv_in, const TwoCenterBundle& two_center_bundle, const LCAO_Orbitals& orb, - elecstate::DensityMatrix* DM_in, - Setup_DeePKS &deepks -#ifdef __EXX - , - const int istep, - int* exx_two_level_step, - std::vector>>>* Hexxd, - std::vector>>>>* Hexxc -#endif -) + elecstate::DensityMatrix* DM_in, + Plus_U* p_dftu, // mohan add 2025-11-05 + Setup_DeePKS &deepks, + const int istep, + Exx_NAO &exx_nao) { this->classname = "HamiltLCAO"; @@ -126,6 +121,10 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, { pot_register_in.push_back("tddft"); } + if (PARAM.inp.ml_exx) // sunliang + { + pot_register_in.push_back("ml_exx"); + } } // Gamma_only case to initialize HamiltLCAO @@ -138,7 +137,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // initial operator for Gamma_only case // overlap term () is indispensable // in Gamma_only case, target SK is this->hsk->get_sk(), the target SR is this->sR - this->getOperator() = new OverlapNew>(this->hsk, + this->getOperator() = new Overlap>(this->hsk, this->kv->kvec_d, this->hR, this->sR, @@ -150,7 +149,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // kinetic term () if (PARAM.inp.t_in_h) { - Operator* ekinetic = new EkineticNew>(this->hsk, + Operator* ekinetic = new EKinetic>(this->hsk, this->kv->kvec_d, this->hR, &ucell, @@ -164,7 +163,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // in general case, target HR is this->hR, while target HK is this->hsk->get_hk() if (PARAM.inp.vnl_in_h) { - Operator* nonlocal = new NonlocalNew>(this->hsk, + Operator* nonlocal = new Nonlocal>(this->hsk, this->kv->kvec_d, this->hR, &ucell, @@ -217,26 +216,27 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // end node should be OperatorDFTU if (PARAM.inp.dft_plus_u) { - Operator* dftu = nullptr; + Operator* plus_u = nullptr; if (PARAM.inp.dft_plus_u == 2) { - dftu = new OperatorDFTU>(this->hsk, + plus_u = new OperatorDFTU>(this->hsk, this->kv->kvec_d, - this->hR, // no explicit call yet - this->kv->isk); + this->hR, // no explicit call yet + p_dftu, // mohan add 2025-11-07 + this->kv->isk); } else { - dftu = new DFTU>(this->hsk, + plus_u = new DFTU>(this->hsk, this->kv->kvec_d, this->hR, ucell, &grid_d, two_center_bundle.overlap_orb_onsite.get(), orb.cutoffs(), - &GlobalC::dftu); + p_dftu); } - this->getOperator()->add(dftu); + this->getOperator()->add(plus_u); } } // multi-k-points case to initialize HamiltLCAO, ops will be used @@ -266,7 +266,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // initial operator for multi-k case // overlap term is indispensable - Operator* overlap = new OverlapNew>(this->hsk, + Operator* overlap = new Overlap>(this->hsk, this->kv->kvec_d, this->hR, this->sR, @@ -287,7 +287,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // in general case, target HR is this->hR, while target HK is this->hsk->get_hk() if (PARAM.inp.t_in_h) { - Operator* ekinetic = new EkineticNew>(this->hsk, + Operator* ekinetic = new EKinetic>(this->hsk, this->kv->kvec_d, this->hR, &ucell, @@ -301,7 +301,7 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // in general case, target HR is this->hR, while target HK is this->hsk->get_hk() if (PARAM.inp.vnl_in_h) { - Operator* nonlocal = new NonlocalNew>(this->hsk, + Operator* nonlocal = new Nonlocal>(this->hsk, this->kv->kvec_d, this->hR, &ucell, @@ -372,26 +372,27 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, } if (PARAM.inp.dft_plus_u) { - Operator* dftu = nullptr; + Operator* plus_u = nullptr; if (PARAM.inp.dft_plus_u == 2) { - dftu = new OperatorDFTU>(this->hsk, + plus_u = new OperatorDFTU>(this->hsk, this->kv->kvec_d, - this->hR, // no explicit call yet + this->hR, // no explicit call yet + p_dftu, // mohan add 2025-11-07 this->kv->isk); } else { - dftu = new DFTU>(this->hsk, + plus_u = new DFTU>(this->hsk, this->kv->kvec_d, this->hR, ucell, &grid_d, two_center_bundle.overlap_orb_onsite.get(), orb.cutoffs(), - &GlobalC::dftu); + p_dftu); } - this->getOperator()->add(dftu); + this->getOperator()->add(plus_u); } if (PARAM.inp.sc_mag_switch) { @@ -411,20 +412,53 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, #ifdef __EXX if (GlobalC::exx_info.info_global.cal_exx) { + int* exx_two_level_step = nullptr; + std::vector>>>* Hexxd = nullptr; + std::vector>>>>* Hexxc = nullptr; + + if(GlobalC::exx_info.info_ri.real_number) + { + exx_two_level_step = &exx_nao.exd->two_level_step; + Hexxd = &exx_nao.exd->get_Hexxs(); + } + else + { + exx_two_level_step = &exx_nao.exc->two_level_step; + Hexxc = &exx_nao.exc->get_Hexxs(); + } + // Peize Lin add 2016-12-03 // set xc type before the first cal of xc in pelec->init_scf // and calculate Cs, Vs - Operator* exx = new OperatorEXX>(this->hsk, - this->hR, - ucell, - *kv, - Hexxd, - Hexxc, - Add_Hexx_Type::R, - istep, - exx_two_level_step, - !GlobalC::restart.info_load.restart_exx - && GlobalC::restart.info_load.load_H); + Operator* exx; + if (PARAM.inp.esolver_type == "tddft") + { + exx = new OperatorEXX>(this->hsk, + this->hR, + ucell, + *this->kv, + Hexxd, + Hexxc, + Add_Hexx_Type::k, + istep, + exx_two_level_step, + !GlobalC::restart.info_load.restart_exx + && GlobalC::restart.info_load.load_H); + } + else + { + exx = new OperatorEXX>(this->hsk, + this->hR, + ucell, + *kv, + Hexxd, + Hexxc, + Add_Hexx_Type::R, + istep, + exx_two_level_step, + !GlobalC::restart.info_load.restart_exx + && GlobalC::restart.info_load.load_H); + } this->getOperator()->add(exx); } #endif @@ -480,20 +514,32 @@ void HamiltLCAO::updateHk(const int ik) } template -void HamiltLCAO::refresh() +void HamiltLCAO::refresh(bool yes) { ModuleBase::TITLE("HamiltLCAO", "refresh"); - dynamic_cast*>(this->ops)->set_hr_done(false); - if (PARAM.inp.nspin == 2) + if(yes) { - this->refresh_times = 1; - this->current_spin = 0; - if (this->hR->get_nnr() != this->hRS2.size() / 2) + dynamic_cast*>(this->ops)->set_hr_done(false); + if (PARAM.inp.nspin == 2) + { + this->refresh_times = 1; + this->current_spin = 0; + if (this->hR->get_nnr() != this->hRS2.size() / 2) + { + // operator has changed, resize hRS2 + this->hRS2.resize(this->hR->get_nnr() * 2); + } + this->hR->allocate(this->hRS2.data(), 0); + } + } + else { + dynamic_cast*>(this->ops)->set_hr_done(true); + this->refresh_times = 0; + if (PARAM.inp.nspin == 2) { - // operator has changed, resize hRS2 - this->hRS2.resize(this->hR->get_nnr() * 2); + ModuleBase::WARNING_QUIT("HamiltLCAO::refresh", + "When turning off the refresh flag, the nspin==2 case is not supported yet."); } - this->hR->allocate(this->hRS2.data(), 0); } } diff --git a/source/source_lcao/hamilt_lcao.h b/source/source_lcao/hamilt_lcao.h index acd838ca2f..deca3c7c73 100644 --- a/source/source_lcao/hamilt_lcao.h +++ b/source/source_lcao/hamilt_lcao.h @@ -17,6 +17,10 @@ #ifdef __EXX #include "source_lcao/module_ri/Exx_LRI.h" #endif + +#include "source_lcao/setup_exx.h" // for exx, mohan add 20251022 +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-05 + namespace hamilt { @@ -45,15 +49,10 @@ class HamiltLCAO : public Hamilt const TwoCenterBundle& two_center_bundle, const LCAO_Orbitals& orb, elecstate::DensityMatrix* DM_in, - Setup_DeePKS &deepks -#ifdef __EXX - , - const int istep, - int* exx_two_level_step = nullptr, - std::vector>>>* Hexxd = nullptr, - std::vector>>>>* Hexxc = nullptr -#endif - ); + Plus_U* p_dftu, // mohan add 2025-11-05 + Setup_DeePKS &deepks, + const int istep, + Exx_NAO &exx_nao); /** * @brief Constructor of vacuum Operators, only HR and SR will be initialed as empty HContainer @@ -125,7 +124,7 @@ class HamiltLCAO : public Hamilt #endif /// refresh the status of HR - void refresh() override; + void refresh(bool yes) override; // for target K point, update consequence of hPsi() and matrix() virtual void updateHk(const int ik) override; diff --git a/source/source_lcao/module_deepks/LCAO_deepks.cpp b/source/source_lcao/module_deepks/LCAO_deepks.cpp index 6755c0c256..2cbc04680c 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks.cpp +++ b/source/source_lcao/module_deepks/LCAO_deepks.cpp @@ -14,13 +14,12 @@ #include "LCAO_deepks.h" #include "deepks_iterate.h" -#include "source_pw/module_pwdft/global.h" // Constructor of the class template LCAO_Deepks::LCAO_Deepks() { - inl_index = new ModuleBase::IntArray[1]; + deepks_param.inl_index = new ModuleBase::IntArray[1]; gedm = nullptr; this->phialpha.resize(1); } @@ -29,7 +28,7 @@ LCAO_Deepks::LCAO_Deepks() template LCAO_Deepks::~LCAO_Deepks() { - delete[] inl_index; + delete[] deepks_param.inl_index; //=======1. to use deepks, pdm is required========== pdm.clear(); @@ -38,7 +37,7 @@ LCAO_Deepks::~LCAO_Deepks() if (gedm) { // delete gedm** - for (int inl = 0; inl < this->inlmax; inl++) + for (int inl = 0; inl < this->deepks_param.inlmax; inl++) { delete[] gedm[inl]; } @@ -75,25 +74,25 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, tot_inl = nat; } - this->lmaxd = lm; - this->nmaxd = nm; + this->deepks_param.lmaxd = lm; + this->deepks_param.nmaxd = nm; - ofs << " lmax of descriptor = " << this->lmaxd << std::endl; - ofs << " nmax of descriptor = " << nmaxd << std::endl; + ofs << " lmax of descriptor = " << deepks_param.lmaxd << std::endl; + ofs << " nmax of descriptor = " << deepks_param.nmaxd << std::endl; int pdm_size = 0; - this->inlmax = tot_inl; - this->pdm.resize(this->inlmax); + this->deepks_param.inlmax = tot_inl; + this->pdm.resize(this->deepks_param.inlmax); // cal n(descriptor) per atom , related to Lmax, nchi(L) and m. (not total_nchi!) if (!PARAM.inp.deepks_equiv) { - this->des_per_atom = 0; // mohan add 2021-04-21 - for (int l = 0; l <= this->lmaxd; l++) + this->deepks_param.des_per_atom = 0; // mohan add 2021-04-21 + for (int l = 0; l <= deepks_param.lmaxd; l++) { - this->des_per_atom += orb.Alpha[0].getNchi(l) * (2 * l + 1); + this->deepks_param.des_per_atom += orb.Alpha[0].getNchi(l) * (2 * l + 1); } - this->n_descriptor = nat * this->des_per_atom; + this->deepks_param.n_descriptor = nat * this->deepks_param.des_per_atom; this->init_index(ntype, nat, na, tot_inl, orb, ofs); } @@ -103,21 +102,21 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, ofs << " total basis (all atoms) for descriptor = " << std::endl; // init pdm - for (int inl = 0; inl < this->inlmax; inl++) + for (int inl = 0; inl < this->deepks_param.inlmax; inl++) { - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; pdm_size += nm * nm; this->pdm[inl] = torch::zeros({nm, nm}, torch::kFloat64); } } else { - for (int il = 0; il < this->lmaxd + 1; il++) + for (int il = 0; il < this->deepks_param.lmaxd + 1; il++) { pdm_size += (2 * il + 1) * orb.Alpha[0].getNchi(il); } pdm_size = pdm_size * pdm_size; - this->des_per_atom = pdm_size; + this->deepks_param.des_per_atom = pdm_size; ofs << " Equivariant version, size of pdm matrices : " << pdm_size << std::endl; for (int iat = 0; iat < nat; iat++) { @@ -139,35 +138,35 @@ void LCAO_Deepks::init_index(const int ntype, const LCAO_Orbitals& orb, std::ofstream& ofs) { - delete[] this->inl_index; - this->inl_index = new ModuleBase::IntArray[ntype]; - this->inl2l.resize(this->inlmax, 0); + delete[] this->deepks_param.inl_index; + this->deepks_param.inl_index = new ModuleBase::IntArray[ntype]; + this->deepks_param.inl2l.resize(this->deepks_param.inlmax, 0); int inl = 0; int alpha = 0; for (int it = 0; it < ntype; it++) { - this->inl_index[it].create(na[it], this->lmaxd + 1, this->nmaxd); + this->deepks_param.inl_index[it].create(na[it], this->deepks_param.lmaxd + 1, this->deepks_param.nmaxd); ofs << " Type " << it + 1 << " number_of_atoms " << na[it] << std::endl; for (int ia = 0; ia < na[it]; ia++) { // alpha - for (int l = 0; l < this->lmaxd + 1; l++) + for (int l = 0; l < this->deepks_param.lmaxd + 1; l++) { for (int n = 0; n < orb.Alpha[0].getNchi(l); n++) { - this->inl_index[it](ia, l, n) = inl; - this->inl2l[inl] = l; + this->deepks_param.inl_index[it](ia, l, n) = inl; + this->deepks_param.inl2l[inl] = l; inl++; } } } // end ia } // end it assert(Total_nchi == inl); - ofs << " descriptors_per_atom " << this->des_per_atom << std::endl; - ofs << " total_descriptors " << this->n_descriptor << std::endl; + ofs << " descriptors_per_atom " << this->deepks_param.des_per_atom << std::endl; + ofs << " total_descriptors " << this->deepks_param.n_descriptor << std::endl; return; } @@ -189,15 +188,15 @@ void LCAO_Deepks::allocate_V_delta(const int nat, const int nks) int pdm_size = 0; if (!PARAM.inp.deepks_equiv) { - pdm_size = (this->lmaxd * 2 + 1) * (this->lmaxd * 2 + 1); + pdm_size = (this->deepks_param.lmaxd * 2 + 1) * (this->deepks_param.lmaxd * 2 + 1); } else { - pdm_size = this->des_per_atom; + pdm_size = this->deepks_param.des_per_atom; } - this->gedm = new double*[this->inlmax]; - for (int inl = 0; inl < this->inlmax; inl++) + this->gedm = new double*[this->deepks_param.inlmax]; + for (int inl = 0; inl < this->deepks_param.inlmax; inl++) { this->gedm[inl] = new double[pdm_size]; ModuleBase::GlobalFunc::ZEROS(this->gedm[inl], pdm_size); @@ -214,44 +213,41 @@ void LCAO_Deepks::init_DMR(const UnitCell& ucell, const Grid_Driver& GridD) { this->dm_r = new hamilt::HContainer(&pv); - DeePKS_domain::iterate_ad2( - ucell, - GridD, - orb, - false, // no trace_alpha - [&](const int iat, - const ModuleBase::Vector3& tau0, - const int ibt1, - const ModuleBase::Vector3& tau1, - const int start1, - const int nw1_tot, - ModuleBase::Vector3 dR1, - const int ibt2, - const ModuleBase::Vector3& tau2, - const int start2, - const int nw2_tot, - ModuleBase::Vector3 dR2) - { - auto row_indexes = pv.get_indexes_row(ibt1); - auto col_indexes = pv.get_indexes_col(ibt2); - if (row_indexes.size() * col_indexes.size() == 0) - { - return; // to next loop - } - - int dRx = 0; - int dRy = 0; - int dRz = 0; - if (std::is_same>::value) - { - dRx = (dR1 - dR2).x; - dRy = (dR1 - dR2).y; - dRz = (dR1 - dR2).z; - } - hamilt::AtomPair dm_pair(ibt1, ibt2, dRx, dRy, dRz, &pv); - this->dm_r->insert_pair(dm_pair); - } - ); + DeePKS_domain::iterate_ad2(ucell, + GridD, + orb, + false, // no trace_alpha + [&](const int iat, + const ModuleBase::Vector3& tau0, + const int ibt1, + const ModuleBase::Vector3& tau1, + const int start1, + const int nw1_tot, + ModuleBase::Vector3 dR1, + const int ibt2, + const ModuleBase::Vector3& tau2, + const int start2, + const int nw2_tot, + ModuleBase::Vector3 dR2) { + auto row_indexes = pv.get_indexes_row(ibt1); + auto col_indexes = pv.get_indexes_col(ibt2); + if (row_indexes.size() * col_indexes.size() == 0) + { + return; // to next loop + } + + int dRx = 0; + int dRy = 0; + int dRz = 0; + if (std::is_same>::value) + { + dRx = (dR1 - dR2).x; + dRy = (dR1 - dR2).y; + dRz = (dR1 - dR2).z; + } + hamilt::AtomPair dm_pair(ibt1, ibt2, dRx, dRy, dRz, &pv); + this->dm_r->insert_pair(dm_pair); + }); this->dm_r->allocate(nullptr, true); } diff --git a/source/source_lcao/module_deepks/LCAO_deepks.h b/source/source_lcao/module_deepks/LCAO_deepks.h index e3a43cd041..bb98f75a4b 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks.h +++ b/source/source_lcao/module_deepks/LCAO_deepks.h @@ -10,6 +10,7 @@ #include "deepks_fpre.h" #include "deepks_orbital.h" #include "deepks_orbpre.h" +#include "deepks_param.h" #include "deepks_pdm.h" #include "deepks_phialpha.h" #include "deepks_spre.h" @@ -67,14 +68,8 @@ class LCAO_Deepks // private variables //------------------- // private: - public: // change to public to reconstuct the code, 2024-07-22 by mohan - int lmaxd = 0; // max l of descirptors - int nmaxd = 0; //#. descriptors per l - int inlmax = 0; // tot. number {i,n,l} - atom, n, l - int n_descriptor; // natoms * des_per_atom, size of descriptor(projector) basis set - int des_per_atom; // \sum_L{Nchi(L)*(2L+1)} - std::vector inl2l; // inl2l[inl] = inl2l[nl] = l (not related to iat) of descriptor with inl_index - ModuleBase::IntArray* inl_index; // caoyu add 2021-05-07 + public: // change to public to reconstuct the code, 2024-07-22 by mohan + DeePKS_Param deepks_param; // parameters for DeePKS bool init_pdm = false; // for DeePKS NSCF calculation, set init_pdm to skip the calculation of pdm in SCF iteration diff --git a/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp b/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp index 8e30268728..1d68dbc603 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp +++ b/source/source_lcao/module_deepks/LCAO_deepks_interface.cpp @@ -2,13 +2,13 @@ #include "LCAO_deepks_interface.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 +#include "source_base/global_variable.h" +#include "source_base/tool_title.h" #include "source_estate/cal_dm.h" +#include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_lcao/module_hcontainer/output_hcontainer.h" -#include "source_io/module_parameter/parameter.h" -#include "source_base/global_variable.h" -#include "source_base/tool_title.h" #include @@ -18,15 +18,10 @@ LCAO_Deepks_Interface::LCAO_Deepks_Interface(std::shared_ptr file_type_map = { - {"etot", "energy"}, - {"ftot", "force"}, - {"stot", "stress"}, - {"otot", "orbital"}, - {"htot", "hamiltonian"} - }; + static const std::unordered_map file_type_map + = {{"etot", "energy"}, {"ftot", "force"}, {"stot", "stress"}, {"otot", "orbital"}, {"htot", "hamiltonian"}}; auto it = file_type_map.find(file_type); return it != file_type_map.end() ? it->second : file_type; @@ -37,11 +32,11 @@ std::string true_file_type(const std::string& file_type) template std::string LCAO_Deepks_Interface::get_filename(const std::string& file_type, const int& label_type, - const int& iter) + const int& iter) { std::ostringstream file_name; file_name << (iter == -1 ? PARAM.globalv.global_out_dir : PARAM.globalv.global_deepks_label_elec_dir); - if (iter == -1) + if (iter == -1) { file_name << "deepks_"; } @@ -82,16 +77,10 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, using TH = std::conditional_t::value, ModuleBase::matrix, ModuleBase::ComplexMatrix>; // These variables are frequently used in the following code - const int nlmax = orb.Alpha[0].getTotal_nchi(); - const int inlmax = nlmax * nat; - const int lmaxd = orb.get_lmax_d(); - const int nmaxd = ld->nmaxd; - - const int des_per_atom = ld->des_per_atom; - const std::vector inl2l = ld->inl2l; - const ModuleBase::IntArray* inl_index = ld->inl_index; const std::vector*> phialpha = ld->phialpha; + const DeePKS_Param& deepks_param = ld->deepks_param; + std::vector pdm = ld->pdm; bool init_pdm = ld->init_pdm; double E_delta = ld->E_delta; @@ -104,13 +93,16 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, const int nk = nks / nspin; const bool is_after_scf = (iter == -1); // called in after_scf, not in electronic steps - const bool output_base = PARAM.inp.deepks_out_labels == 1 && is_after_scf; // not output when deepks_out_labels=2 and in electronic step (output true base elsewhere) - const bool output_precalc = (PARAM.inp.deepks_out_labels == 1) && (PARAM.inp.deepks_scf || PARAM.inp.deepks_out_freq_elec); + const bool output_base + = PARAM.inp.deepks_out_labels == 1 + && is_after_scf; // not output when deepks_out_labels=2 and in electronic step (output true base elsewhere) + const bool output_precalc + = (PARAM.inp.deepks_out_labels == 1) && (PARAM.inp.deepks_scf || PARAM.inp.deepks_out_freq_elec); -//================================================================================ -// 1. Update real-space density matrix (DMR) for deepks, projected density matrix (PDM) -// and descriptor. Output descriptor if needed. -//================================================================================ + //================================================================================ + // 1. Update real-space density matrix (DMR) for deepks, projected density matrix (PDM) + // and descriptor. Output descriptor if needed. + //================================================================================ // Update DMR in any case of deepks_out_labels/deepks_scf DeePKS_domain::update_dmr(kvec_d, dm->get_DMK_vector(), ucell, orb, *ParaV, GridD, dmr); @@ -121,32 +113,21 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, { // this part is for integrated test of deepks // so it is printed no matter even if deepks_out_labels is not used - DeePKS_domain::cal_pdm< - TK>(init_pdm, inlmax, lmaxd, inl2l, inl_index, kvec_d, dmr, phialpha, ucell, orb, GridD, *ParaV, pdm); + DeePKS_domain::cal_pdm(init_pdm, deepks_param, kvec_d, dmr, phialpha, ucell, orb, GridD, *ParaV, pdm); - DeePKS_domain::check_pdm(inlmax, inl2l, pdm); // print out the projected dm for NSCF calculaiton + DeePKS_domain::check_pdm(deepks_param, pdm); // print out the projected dm for NSCF calculaiton std::vector descriptor; - DeePKS_domain::cal_descriptor(nat, inlmax, inl2l, pdm, descriptor, - des_per_atom); // final descriptor - DeePKS_domain::check_descriptor(inlmax, - des_per_atom, - inl2l, - ucell, - PARAM.globalv.global_out_dir, - descriptor, - rank); - + DeePKS_domain::cal_descriptor(nat, deepks_param, pdm, descriptor); // final descriptor + DeePKS_domain::check_descriptor(deepks_param, ucell, PARAM.globalv.global_out_dir, descriptor, rank); + const std::string file_d = get_filename("dm_eig", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_npy_d(nat, - des_per_atom, - inlmax, - inl2l, - PARAM.inp.deepks_equiv, - descriptor, - file_d, - rank); // libnpy needed - + PARAM.inp.deepks_equiv, + deepks_param, + descriptor, + file_d, + rank); // libnpy needed if (PARAM.inp.deepks_scf) { @@ -154,28 +135,11 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, // new gedm is also useful in cal_f_delta, so it should be ld->gedm if (PARAM.inp.deepks_equiv) { - DeePKS_domain::cal_edelta_gedm_equiv(nat, - lmaxd, - nmaxd, - inlmax, - des_per_atom, - inl2l, - descriptor, - ld->gedm, - E_delta, - rank); + DeePKS_domain::cal_edelta_gedm_equiv(nat, deepks_param, descriptor, ld->gedm, E_delta, rank); } else { - DeePKS_domain::cal_edelta_gedm(nat, - inlmax, - des_per_atom, - inl2l, - descriptor, - pdm, - ld->model_deepks, - ld->gedm, - E_delta); + DeePKS_domain::cal_edelta_gedm(nat, deepks_param, descriptor, pdm, ld->model_deepks, ld->gedm, E_delta); } } } @@ -185,21 +149,21 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, { // Used for deepks_scf == 1 or deepks_out_freq_elec!=0, for *precalc items, not for deepks_out_labels=2 std::vector gevdm; - if ( output_precalc ) + if (output_precalc) { - DeePKS_domain::cal_gevdm(nat, inlmax, inl2l, pdm, gevdm); + DeePKS_domain::cal_gevdm(nat, deepks_param, pdm, gevdm); } -//================================================================================ -// 2. Energy -//================================================================================ + //================================================================================ + // 2. Energy + //================================================================================ // etot const std::string file_etot = get_filename("etot", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_npy_e(etot, file_etot, rank); // ebase - if ( output_base ) + if (output_base) { const std::string file_ebase = get_filename("ebase", PARAM.inp.deepks_out_labels, iter); if (PARAM.inp.deepks_scf) @@ -214,25 +178,25 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, } } -//================================================================================ -// 3. Force and Stress -//================================================================================ + //================================================================================ + // 3. Force and Stress + //================================================================================ - if ( is_after_scf ) + if (is_after_scf) { // Force Part if (PARAM.inp.cal_force) { // these items are not related to model, so can output without deepks_scf - if (output_precalc // don't need these when deepks_out_labels == 2 + if (output_precalc // don't need these when deepks_out_labels == 2 && !PARAM.inp.deepks_equiv) // training with force label not supported by equivariant version now { torch::Tensor gdmx; DeePKS_domain::cal_gdmx< - TK>(lmaxd, inlmax, nks, kvec_d, phialpha, inl_index, dmr, ucell, orb, *ParaV, GridD, gdmx); + TK>(nks, deepks_param, kvec_d, phialpha, dmr, ucell, orb, *ParaV, GridD, gdmx); torch::Tensor gvx; - DeePKS_domain::cal_gvx(ucell.nat, inlmax, des_per_atom, inl2l, gevdm, gdmx, gvx, rank); + DeePKS_domain::cal_gvx(ucell.nat, deepks_param, gevdm, gdmx, gvx, rank); const std::string file_gradvx = get_filename("gradvx", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_tensor2npy(file_gradvx, gvx, rank); @@ -248,15 +212,15 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, if (PARAM.inp.cal_stress) { // these items are not related to model, so can output without deepks_scf - if (output_precalc // don't need these when deepks_out_labels == 2 + if (output_precalc // don't need these when deepks_out_labels == 2 && !PARAM.inp.deepks_equiv) // training with stress label not supported by equivariant version now { torch::Tensor gdmepsl; DeePKS_domain::cal_gdmepsl< - TK>(lmaxd, inlmax, nks, kvec_d, phialpha, inl_index, dmr, ucell, orb, *ParaV, GridD, gdmepsl); + TK>(nks, deepks_param, kvec_d, phialpha, dmr, ucell, orb, *ParaV, GridD, gdmepsl); torch::Tensor gvepsl; - DeePKS_domain::cal_gvepsl(ucell.nat, inlmax, des_per_atom, inl2l, gevdm, gdmepsl, gvepsl, rank); + DeePKS_domain::cal_gvepsl(ucell.nat, deepks_param, gevdm, gdmepsl, gvepsl, rank); const std::string file_gvepsl = get_filename("gvepsl", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_tensor2npy(file_gvepsl, gvepsl, rank); @@ -269,9 +233,9 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, } } -//================================================================================ -// 4. Bandgap -//================================================================================ + //================================================================================ + // 4. Bandgap + //================================================================================ if (PARAM.inp.deepks_bandgap > 0) { @@ -308,7 +272,9 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, ModuleBase::matrix o_tot(nks, range); if (nocc + PARAM.inp.deepks_band_range[0] < 0 || nocc + PARAM.inp.deepks_band_range[1] >= ekb.nc) { - ModuleBase::WARNING_QUIT("out_deepks_labels", "DeePKS band index out of range! Please check if `deepks_band_range` is reasonable!"); + ModuleBase::WARNING_QUIT( + "out_deepks_labels", + "DeePKS band index out of range! Please check if `deepks_band_range` is reasonable!"); } for (int iks = 0; iks < nks; ++iks) { @@ -316,7 +282,7 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, if (PARAM.inp.deepks_bandgap == 1 || PARAM.inp.deepks_bandgap == 3) { o_tot(iks, ib) = ekb(iks, nocc + PARAM.inp.deepks_band_range[1]) - - ekb(iks, nocc + PARAM.inp.deepks_band_range[0]); + - ekb(iks, nocc + PARAM.inp.deepks_band_range[0]); } else if (PARAM.inp.deepks_bandgap == 2) { @@ -337,7 +303,7 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, // don't need these when deepks_out_labels == 2 // not consider out_base now, because bandgap is not supported in deepks_out_freq_elec now - if ( output_precalc ) + if (output_precalc) { std::vector wg_hl_range(range); for (int ir = 0; ir < range; ++ir) @@ -379,20 +345,17 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, torch::Tensor orbital_precalc_temp; ModuleBase::matrix o_delta_temp(nks, 1); DeePKS_domain::cal_orbital_precalc(dm_bandgap, - lmaxd, - inlmax, - nat, - nks, - inl2l, - kvec_d, - phialpha, - gevdm, - inl_index, - ucell, - orb, - *ParaV, - GridD, - orbital_precalc_temp); + nat, + nks, + deepks_param, + kvec_d, + phialpha, + gevdm, + ucell, + orb, + *ParaV, + GridD, + orbital_precalc_temp); if (ir == 0) { orbital_precalc = orbital_precalc_temp; @@ -408,30 +371,30 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, for (int iks = 0; iks < nks; ++iks) { o_delta(iks, ir) = o_delta_temp(iks, 0); - } + } } } // save obase and orbital_precalc const std::string file_orbpre = get_filename("orbpre", PARAM.inp.deepks_out_labels, iter); - LCAO_deepks_io::save_tensor2npy(file_orbpre, orbital_precalc, rank); + LCAO_deepks_io::save_tensor2npy(file_orbpre, orbital_precalc, rank); if (PARAM.inp.deepks_scf) { const std::string file_obase = get_filename("obase", PARAM.inp.deepks_out_labels, iter); - LCAO_deepks_io::save_matrix2npy(file_obase, o_tot - o_delta, rank); // Unit: Hartree + LCAO_deepks_io::save_matrix2npy(file_obase, o_tot - o_delta, rank); // Unit: Hartree } else { const std::string file_obase = get_filename("obase", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_matrix2npy(file_obase, o_tot, rank); // no scf, o_tot=o_base - } - } // end out_precalc - } // end deepks_bandgap > 0 - -//================================================================================ -// 5. HR -//================================================================================ - if ( is_after_scf ) + } + } // end out_precalc + } // end deepks_bandgap > 0 + + //================================================================================ + // 5. HR + //================================================================================ + if (is_after_scf) { // not add deepks_out_labels = 2 and deepks_out_freq_elec for HR yet // H(R) matrix part, for HR, base will not be calculated since they are HContainer objects @@ -442,7 +405,7 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, const int precision = 8; const std::string file_hrtot = PARAM.globalv.global_out_dir - + (PARAM.inp.deepks_out_labels == 1 ? "deepks_hrtot.csr" : "deepks_hamiltonian_r.csr"); + + (PARAM.inp.deepks_out_labels == 1 ? "deepks_hrtot.csr" : "deepks_hamiltonian_r.csr"); hamilt::HContainer* hR_tot = (p_ham->getHR()); const int nbasis = hR_tot->get_nbasis(); @@ -494,56 +457,46 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, int R_size = DeePKS_domain::get_R_size(*h_deltaR); torch::Tensor vdr_precalc; DeePKS_domain::cal_vdr_precalc(nlocal, - lmaxd, - inlmax, - nat, - nks, - R_size, - inl2l, - kvec_d, - phialpha, - gevdm, - inl_index, - ucell, - orb, - *ParaV, - GridD, - vdr_precalc); + nat, + nks, + R_size, + deepks_param, + kvec_d, + phialpha, + gevdm, + ucell, + orb, + *ParaV, + GridD, + vdr_precalc); const std::string file_vdrpre = PARAM.globalv.global_out_dir + "deepks_vdrpre.npy"; LCAO_deepks_io::save_tensor2npy(file_vdrpre, vdr_precalc, rank); } else if (PARAM.inp.deepks_v_delta == -2) { - int R_size = DeePKS_domain::get_R_size(*h_deltaR); - torch::Tensor phialpha_r_out; - DeePKS_domain::prepare_phialpha_r(nlocal, - lmaxd, - inlmax, - nat, - R_size, - phialpha, - ucell, - orb, - *ParaV, - GridD, - phialpha_r_out); - const std::string file_phialpha_r = PARAM.globalv.global_out_dir + "deepks_phialpha_r.npy"; - LCAO_deepks_io::save_tensor2npy(file_phialpha_r, phialpha_r_out, rank); - torch::Tensor gevdm_out; - DeePKS_domain::prepare_gevdm(nat, lmaxd, inlmax, orb, gevdm, gevdm_out); + DeePKS_domain::prepare_gevdm(nat, deepks_param, orb, gevdm, gevdm_out); const std::string file_gevdm = PARAM.globalv.global_out_dir + "deepks_gevdm.npy"; LCAO_deepks_io::save_tensor2npy(file_gevdm, gevdm_out, rank); + + int R_size = DeePKS_domain::get_R_size(*h_deltaR); + torch::Tensor overlap_out; + torch::Tensor iRmat; + DeePKS_domain::prepare_phialpha_iRmat(nlocal, R_size, deepks_param, phialpha, ucell, orb, GridD, overlap_out, iRmat); + const std::string file_overlap = PARAM.globalv.global_out_dir + "deepks_phialpha_r.npy"; + LCAO_deepks_io::save_tensor2npy(file_overlap, overlap_out, rank); + const std::string file_iRmat = PARAM.globalv.global_out_dir + "deepks_iRmat.npy"; + LCAO_deepks_io::save_tensor2npy(file_iRmat, iRmat, rank); } } } - } + } } -//================================================================================ -// 6. Hk -//================================================================================ + //================================================================================ + // 6. Hk + //================================================================================ if (PARAM.inp.deepks_v_delta > 0) { @@ -553,7 +506,7 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, const std::string file_htot = get_filename("htot", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_npy_h(h_tot, file_htot, nlocal, nks, rank); - if ( output_base ) + if (output_base) { if (PARAM.inp.deepks_scf) { @@ -575,35 +528,32 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, LCAO_deepks_io::save_npy_h(h_base, file_hbase, nlocal, nks, rank); const std::string file_vdelta = get_filename("vdelta", PARAM.inp.deepks_out_labels, iter); - LCAO_deepks_io::save_npy_h(v_delta, file_vdelta, nlocal, nks, rank); + LCAO_deepks_io::save_npy_h(v_delta, file_vdelta, nlocal, nks, rank); } else // deepks_scf == 0 { const std::string file_hbase = get_filename("hbase", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_npy_h(h_tot, file_hbase, nlocal, nks, rank); - } + } } - if ( output_precalc ) + if (output_precalc) { if (PARAM.inp.deepks_v_delta == 1) // v_delta_precalc storage method 1 { torch::Tensor v_delta_precalc; DeePKS_domain::cal_v_delta_precalc(nlocal, - lmaxd, - inlmax, - nat, - nks, - inl2l, - kvec_d, - phialpha, - gevdm, - inl_index, - ucell, - orb, - *ParaV, - GridD, - v_delta_precalc); + nat, + nks, + deepks_param, + kvec_d, + phialpha, + gevdm, + ucell, + orb, + *ParaV, + GridD, + v_delta_precalc); const std::string file_vdpre = get_filename("vdpre", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_tensor2npy(file_vdpre, v_delta_precalc, rank); @@ -611,37 +561,27 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, else if (PARAM.inp.deepks_v_delta == 2) // v_delta_precalc storage method 2 { torch::Tensor phialpha_out; - DeePKS_domain::prepare_phialpha(nlocal, - lmaxd, - inlmax, - nat, - nks, - kvec_d, - phialpha, - ucell, - orb, - *ParaV, - GridD, - phialpha_out); + DeePKS_domain::prepare_phialpha< + TK>(nlocal, nat, nks, deepks_param, kvec_d, phialpha, ucell, orb, *ParaV, GridD, phialpha_out); const std::string file_phialpha = get_filename("phialpha", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_tensor2npy(file_phialpha, phialpha_out, rank); torch::Tensor gevdm_out; - DeePKS_domain::prepare_gevdm(nat, lmaxd, inlmax, orb, gevdm, gevdm_out); + DeePKS_domain::prepare_gevdm(nat, deepks_param, orb, gevdm, gevdm_out); const std::string file_gevdm = get_filename("gevdm", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_tensor2npy(file_gevdm, gevdm_out, rank); } } - } // end v_delta label + } // end v_delta label } // end deepks_out_labels -//================================================================================ -// 7. atom.npy, box.npy, overlap.npy -//================================================================================ + //================================================================================ + // 7. atom.npy, box.npy, overlap.npy + //================================================================================ - if( ((PARAM.inp.deepks_out_labels == 2) && is_after_scf ) - || ( PARAM.inp.deepks_out_freq_elec ) )// need overlap when deepks_out_freq_elec + if (((PARAM.inp.deepks_out_labels == 2) && is_after_scf) + || (PARAM.inp.deepks_out_freq_elec)) // need overlap when deepks_out_freq_elec { if (PARAM.inp.deepks_v_delta > 0) { @@ -650,15 +590,15 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, DeePKS_domain::get_h_tot(*ParaV, p_ham, s_tot, nlocal, nks, 'S'); const std::string file_stot = get_filename("overlap", PARAM.inp.deepks_out_labels, iter); LCAO_deepks_io::save_npy_h(s_tot, - file_stot, - nlocal, - nks, - rank, - 1.0); // don't need unit_scale for overlap + file_stot, + nlocal, + nks, + rank, + 1.0); // don't need unit_scale for overlap } } - if ( is_after_scf ) // don't need to output in multiple electronic steps + if (is_after_scf) // don't need to output in multiple electronic steps { if (PARAM.inp.deepks_out_labels == 2) { @@ -674,9 +614,9 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, LCAO_deepks_io::save_tensor2npy(file_box, box_out, rank); } -//================================================================================ -// 8. print, unittest -//================================================================================ + //================================================================================ + // 8. print, unittest + //================================================================================ /// print out deepks information to the screen if (PARAM.inp.deepks_scf) { @@ -686,7 +626,8 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, ofs_running << " DeePKS Energy Correction" << std::endl; ofs_running << " -----------------------------------------------" << std::endl; ofs_running << " E_delta_band = " << std::setprecision(8) << e_delta_band << " Ry" - << " = " << std::setprecision(8) << e_delta_band * ModuleBase::Ry_to_eV << " eV" << std::endl; + << " = " << std::setprecision(8) << e_delta_band * ModuleBase::Ry_to_eV << " eV" + << std::endl; ofs_running << " E_delta_NN = " << std::setprecision(8) << E_delta << " Ry" << " = " << std::setprecision(8) << E_delta * ModuleBase::Ry_to_eV << " eV" << std::endl; ofs_running << " -----------------------------------------------" << std::endl; @@ -695,7 +636,7 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, { LCAO_deepks_io::print_dm(nks, PARAM.globalv.nlocal, ParaV->nrow, dm->get_DMK_vector()); - DeePKS_domain::check_gedm(inlmax, inl2l, ld->gedm); + DeePKS_domain::check_gedm(deepks_param, ld->gedm); std::ofstream ofs("E_delta_bands.dat"); ofs << std::setprecision(10) << e_delta_band; @@ -703,8 +644,8 @@ void LCAO_Deepks_Interface::out_deepks_labels(const double& etot, std::ofstream ofs1("E_delta.dat"); ofs1 << std::setprecision(10) << E_delta; } - } - } + } + } ModuleBase::timer::tick("LCAO_Deepks_Interface", "out_deepks_labels"); } diff --git a/source/source_lcao/module_deepks/LCAO_deepks_interface.h b/source/source_lcao/module_deepks/LCAO_deepks_interface.h index a637e8839d..bc60edab04 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks_interface.h +++ b/source/source_lcao/module_deepks/LCAO_deepks_interface.h @@ -3,9 +3,9 @@ #ifdef __MLALGO #include "LCAO_deepks.h" -#include "source_lcao/hamilt_lcao.h" #include "source_base/complexmatrix.h" #include "source_base/matrix.h" +#include "source_lcao/hamilt_lcao.h" #include @@ -47,18 +47,16 @@ class LCAO_Deepks_Interface const elecstate::DensityMatrix* dm, hamilt::HamiltLCAO* p_ham, const int& iter, - const bool& conv_esolver, + const bool& conv_esolver, const int rank, std::ostream& ofs_running); - + /// @brief Get the filename for deepks output files /// @param file_type Type of the file (e.g., "etot", "ftot", etc.) /// @param label_type Type of the label (from PARAM.inp.deepks_out_labels) /// @param iter Iteration number (e.g., -1 for after_scf, or specific iteration number) /// @return The full path to the output file - std::string get_filename(const std::string& file_type, - const int& label_type, - const int& iter); + std::string get_filename(const std::string& file_type, const int& label_type, const int& iter); private: std::shared_ptr> ld; diff --git a/source/source_lcao/module_deepks/LCAO_deepks_io.cpp b/source/source_lcao/module_deepks/LCAO_deepks_io.cpp index 9ade40e34a..12c38dfcf4 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks_io.cpp +++ b/source/source_lcao/module_deepks/LCAO_deepks_io.cpp @@ -3,8 +3,8 @@ #ifdef __MLALGO #include "LCAO_deepks_io.h" -#include "source_base/tool_quit.h" #include "npy.hpp" +#include "source_base/tool_quit.h" #include @@ -75,10 +75,8 @@ void LCAO_deepks_io::load_npy_gedm(const int nat, // saves descriptor into dm_eig.npy void LCAO_deepks_io::save_npy_d(const int nat, - const int des_per_atom, - const int inlmax, - const std::vector& inl2l, const bool deepks_equiv, + const DeePKS_Param& deepks_param, const std::vector& descriptor, const std::string& dm_eig_file, const int rank) @@ -95,16 +93,17 @@ void LCAO_deepks_io::save_npy_d(const int nat, if (!deepks_equiv) { std::vector npy_des; - for (int inl = 0; inl < inlmax; ++inl) + for (int inl = 0; inl < deepks_param.inlmax; ++inl) { auto accessor = descriptor[inl].accessor(); - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; for (int im = 0; im < nm; im++) { npy_des.push_back(accessor[im]); } } - const long unsigned dshape[] = {static_cast(nat), static_cast(des_per_atom)}; + const long unsigned dshape[] + = {static_cast(nat), static_cast(deepks_param.des_per_atom)}; if (rank == 0) { npy::SaveArrayAsNumpy(dm_eig_file, false, 2, dshape, npy_des); @@ -117,12 +116,13 @@ void LCAO_deepks_io::save_npy_d(const int nat, for (int iat = 0; iat < nat; iat++) { auto accessor = descriptor[iat].accessor(); - for (int i = 0; i < des_per_atom; i++) + for (int i = 0; i < deepks_param.des_per_atom; i++) { npy_des.push_back(accessor[i]); } } - const long unsigned dshape[] = {static_cast(nat), static_cast(des_per_atom)}; + const long unsigned dshape[] + = {static_cast(nat), static_cast(deepks_param.des_per_atom)}; if (rank == 0) { npy::SaveArrayAsNumpy(dm_eig_file, false, 2, dshape, npy_des); diff --git a/source/source_lcao/module_deepks/LCAO_deepks_io.h b/source/source_lcao/module_deepks/LCAO_deepks_io.h index ba53ce6388..46e9272508 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks_io.h +++ b/source/source_lcao/module_deepks/LCAO_deepks_io.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/matrix.h" #include "source_base/tool_title.h" @@ -44,10 +45,8 @@ void load_npy_gedm(const int nat, const int des_per_atom, double** gedm, double& /// save descriptor void save_npy_d(const int nat, - const int des_per_atom, - const int inlmax, - const std::vector& inl2l, const bool deepks_equiv, + const DeePKS_Param& deepks_param, const std::vector& descriptor, const std::string& dm_eig_file, const int rank); diff --git a/source/source_lcao/module_deepks/deepks_basic.cpp b/source/source_lcao/module_deepks/deepks_basic.cpp index 844b1705d5..aa1185a23b 100644 --- a/source/source_lcao/module_deepks/deepks_basic.cpp +++ b/source/source_lcao/module_deepks/deepks_basic.cpp @@ -8,27 +8,27 @@ #include "source_base/atom_in.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" + #include // use system command // d(Descriptor) / d(projected density matrix) // Dimension is different for each inl, so there's a vector of tensors void DeePKS_domain::cal_gevdm(const int nat, - const int inlmax, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& pdm, std::vector& gevdm) { ModuleBase::TITLE("DeePKS_domain", "cal_gevdm"); ModuleBase::timer::tick("DeePKS_domain", "cal_gevdm"); // cal gevdm(d(EigenValue(D))/dD) - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; for (int nl = 0; nl < nlmax; ++nl) { std::vector avmmv; for (int iat = 0; iat < nat; ++iat) { int inl = iat * nlmax + nl; - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; // repeat each block for nm times in an additional dimension torch::Tensor tmp_x = pdm[inl].reshape({nm, nm}).unsqueeze(0).repeat({nm, 1, 1}); // torch::Tensor tmp_y = std::get<0>(torch::symeig(tmp_x, true)); @@ -85,7 +85,7 @@ void DeePKS_domain::load_model(const std::string& model_file, torch::jit::script return; } -inline void generate_py_files(const int lmaxd, const int nmaxd, const std::string& out_dir) +inline void generate_py_files(const DeePKS_Param& deepks_param, const std::string& out_dir) { std::ofstream ofs("cal_edelta_gedm.py"); ofs << "import torch" << std::endl; @@ -117,14 +117,14 @@ inline void generate_py_files(const int lmaxd, const int nmaxd, const std::strin ofs.open("basis.yaml"); ofs << "proj_basis:" << std::endl; - for (int l = 0; l < lmaxd + 1; l++) + for (int l = 0; l < deepks_param.lmaxd + 1; l++) { ofs << " - - " << l << std::endl; ofs << " - ["; - for (int i = 0; i < nmaxd + 1; i++) + for (int i = 0; i < deepks_param.nmaxd + 1; i++) { ofs << "0"; - if (i != nmaxd) + if (i != deepks_param.nmaxd) { ofs << ", "; } @@ -134,11 +134,7 @@ inline void generate_py_files(const int lmaxd, const int nmaxd, const std::strin } void DeePKS_domain::cal_edelta_gedm_equiv(const int nat, - const int lmaxd, - const int nmaxd, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& descriptor, double** gedm, double& E_delta, @@ -147,19 +143,13 @@ void DeePKS_domain::cal_edelta_gedm_equiv(const int nat, ModuleBase::TITLE("DeePKS_domain", "cal_edelta_gedm_equiv"); ModuleBase::timer::tick("DeePKS_domain", "cal_edelta_gedm_equiv"); - const std::string file_d = PARAM.globalv.global_out_dir + "deepks_dm_eig.npy";; - LCAO_deepks_io::save_npy_d(nat, - des_per_atom, - inlmax, - inl2l, - PARAM.inp.deepks_equiv, - descriptor, - file_d, + const std::string file_d = PARAM.globalv.global_out_dir + "deepks_dm_eig.npy"; + LCAO_deepks_io::save_npy_d(nat, PARAM.inp.deepks_equiv, deepks_param, descriptor, file_d, rank); // libnpy needed if (rank == 0) { - generate_py_files(lmaxd, nmaxd, PARAM.globalv.global_out_dir); + generate_py_files(deepks_param, PARAM.globalv.global_out_dir); std::string cmd = "python cal_edelta_gedm.py " + PARAM.inp.deepks_model; int stat = std::system(cmd.c_str()); assert(stat == 0); @@ -167,7 +157,7 @@ void DeePKS_domain::cal_edelta_gedm_equiv(const int nat, MPI_Barrier(MPI_COMM_WORLD); - LCAO_deepks_io::load_npy_gedm(nat, des_per_atom, gedm, E_delta, rank); + LCAO_deepks_io::load_npy_gedm(nat, deepks_param.des_per_atom, gedm, E_delta, rank); std::string cmd = "rm -f cal_edelta_gedm.py basis.yaml ec.npy gedm.npy"; std::system(cmd.c_str()); @@ -179,9 +169,7 @@ void DeePKS_domain::cal_edelta_gedm_equiv(const int nat, // obtain from the machine learning model dE_delta/dDescriptor // E_delta is also calculated here void DeePKS_domain::cal_edelta_gedm(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& descriptor, const std::vector& pdm, torch::jit::script::Module& model_deepks, @@ -195,10 +183,30 @@ void DeePKS_domain::cal_edelta_gedm(const int nat, std::vector inputs; // input_dim:(natom, des_per_atom) - inputs.push_back(torch::cat(descriptor, 0).reshape({1, nat, des_per_atom})); + inputs.push_back(torch::cat(descriptor, 0).reshape({1, nat, deepks_param.des_per_atom})); std::vector ec; - ec.push_back(model_deepks.forward(inputs).toTensor()); // Hartree - E_delta = ec[0].item() * 2; // Ry; *2 is for Hartree to Ry + try + { + ec.push_back(model_deepks.forward(inputs).toTensor()); // Hartree + } + catch (const c10::Error& e) + { + ModuleBase::WARNING_QUIT("DeePKS_domain::cal_edelta_gedm", + "Please check whether the input shape required by model file matches the descriptor!"); + throw; + } + E_delta = ec[0].item() * 2; // Ry; *2 is for Hartree to Ry + + // get d ec[0]/d inputs + // inputs: [1, nat, des_per_atom] + // ec: [1, 1] + std::vector tensor_inputs; + tensor_inputs.push_back(inputs[0].toTensor()); + ec[0].reshape({1, 1}).requires_grad_(true); + torch::Tensor derivative = torch::autograd::grad(ec, tensor_inputs, {}, true)[0]; + LCAO_deepks_io::save_tensor2npy("gev.npy", + derivative.reshape({nat, deepks_param.des_per_atom}), + 0); // dm_eig.npy is the input for gedm // cal gedm std::vector gedm_shell; @@ -211,9 +219,9 @@ void DeePKS_domain::cal_edelta_gedm(const int nat, /*allow_unused=*/true); // gedm_tensor(Hartree) to gedm(Ry) - for (int inl = 0; inl < inlmax; ++inl) + for (int inl = 0; inl < deepks_param.inlmax; ++inl) { - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; auto accessor = gedm_tensor[inl].accessor(); for (int m1 = 0; m1 < nm; ++m1) { @@ -228,13 +236,13 @@ void DeePKS_domain::cal_edelta_gedm(const int nat, return; } -void DeePKS_domain::check_gedm(const int inlmax, const std::vector& inl2l, double** gedm) +void DeePKS_domain::check_gedm(const DeePKS_Param& deepks_param, double** gedm) { std::ofstream ofs("gedm.dat"); - for (int inl = 0; inl < inlmax; inl++) + for (int inl = 0; inl < deepks_param.inlmax; inl++) { - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; for (int m1 = 0; m1 < nm; ++m1) { for (int m2 = 0; m2 < nm; ++m2) diff --git a/source/source_lcao/module_deepks/deepks_basic.h b/source/source_lcao/module_deepks/deepks_basic.h index 25b4fdb7e9..768b0aab1f 100644 --- a/source/source_lcao/module_deepks/deepks_basic.h +++ b/source/source_lcao/module_deepks/deepks_basic.h @@ -3,6 +3,7 @@ #ifdef __MLALGO #include "LCAO_deepks_io.h" +#include "deepks_param.h" #include "source_base/parallel_reduce.h" #include "source_base/tool_title.h" #include "source_cell/unitcell.h" @@ -32,28 +33,21 @@ void load_model(const std::string& model_file, torch::jit::script::Module& model // calculate gevdm void cal_gevdm(const int nat, - const int inlmax, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& pdm, std::vector& gevdm); /// calculate partial of energy correction to descriptors void cal_edelta_gedm(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& descriptor, const std::vector& pdm, torch::jit::script::Module& model_deepks, double** gedm, double& E_delta); -void check_gedm(const int inlmax, const std::vector& inl2l, double** gedm); +void check_gedm(const DeePKS_Param& deepks_param, double** gedm); void cal_edelta_gedm_equiv(const int nat, - const int lmaxd, - const int nmaxd, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& descriptor, double** gedm, double& E_delta, diff --git a/source/source_lcao/module_deepks/deepks_check.cpp b/source/source_lcao/module_deepks/deepks_check.cpp index 16a07bcabb..1dfc6dbd20 100644 --- a/source/source_lcao/module_deepks/deepks_check.cpp +++ b/source/source_lcao/module_deepks/deepks_check.cpp @@ -56,10 +56,14 @@ void DeePKS_domain::check_tensor(const torch::Tensor& tensor, const std::string& ofs.close(); } - - -template void DeePKS_domain::check_tensor(const torch::Tensor& tensor, const std::string& filename, const int rank); -template void DeePKS_domain::check_tensor(const torch::Tensor& tensor, const std::string& filename, const int rank); -template void DeePKS_domain::check_tensor>(const torch::Tensor& tensor, const std::string& filename, const int rank); +template void DeePKS_domain::check_tensor(const torch::Tensor& tensor, + const std::string& filename, + const int rank); +template void DeePKS_domain::check_tensor(const torch::Tensor& tensor, + const std::string& filename, + const int rank); +template void DeePKS_domain::check_tensor>(const torch::Tensor& tensor, + const std::string& filename, + const int rank); #endif diff --git a/source/source_lcao/module_deepks/deepks_descriptor.cpp b/source/source_lcao/module_deepks/deepks_descriptor.cpp index 48b71525c4..ae8cff433e 100644 --- a/source/source_lcao/module_deepks/deepks_descriptor.cpp +++ b/source/source_lcao/module_deepks/deepks_descriptor.cpp @@ -8,25 +8,25 @@ #include "deepks_descriptor.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 -#include "source_base/module_external/blas_connector.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/parallel_reduce.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" void DeePKS_domain::cal_descriptor_equiv(const int nat, - const int des_per_atom, + const DeePKS_Param& deepks_param, const std::vector& pdm, std::vector& descriptor) { ModuleBase::TITLE("DeePKS_domain", "cal_descriptor_equiv"); ModuleBase::timer::tick("DeePKS_domain", "cal_descriptor_equiv"); - assert(des_per_atom > 0); + assert(deepks_param.des_per_atom > 0); for (int iat = 0; iat < nat; iat++) { - auto tmp = torch::zeros(des_per_atom, torch::kFloat64); + auto tmp = torch::zeros(deepks_param.des_per_atom, torch::kFloat64); std::memcpy(tmp.data_ptr(), pdm[iat].data_ptr(), sizeof(double) * tmp.numel()); descriptor.push_back(tmp); } @@ -36,30 +36,28 @@ void DeePKS_domain::cal_descriptor_equiv(const int nat, // calculates descriptors from projected density matrices void DeePKS_domain::cal_descriptor(const int nat, - const int inlmax, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& pdm, - std::vector& descriptor, - const int des_per_atom = -1) + std::vector& descriptor) { ModuleBase::TITLE("DeePKS_domain", "cal_descriptor"); ModuleBase::timer::tick("DeePKS_domain", "cal_descriptor"); if (PARAM.inp.deepks_equiv) { - DeePKS_domain::cal_descriptor_equiv(nat, des_per_atom, pdm, descriptor); + DeePKS_domain::cal_descriptor_equiv(nat, deepks_param, pdm, descriptor); return; } - for (int inl = 0; inl < inlmax; ++inl) + for (int inl = 0; inl < deepks_param.inlmax; ++inl) { - const int nm = 2 * inl2l[inl] + 1; + const int nm = 2 * deepks_param.inl2l[inl] + 1; pdm[inl].requires_grad_(true); descriptor.push_back(torch::ones({nm}, torch::requires_grad(true))); } // cal descriptor - for (int inl = 0; inl < inlmax; ++inl) + for (int inl = 0; inl < deepks_param.inlmax; ++inl) { torch::Tensor vd; std::tuple d_v(descriptor[inl], vd); @@ -72,9 +70,7 @@ void DeePKS_domain::cal_descriptor(const int nat, return; } -void DeePKS_domain::check_descriptor(const int inlmax, - const int des_per_atom, - const std::vector& inl2l, +void DeePKS_domain::check_descriptor(const DeePKS_Param& deepks_param, const UnitCell& ucell, const std::string& out_dir, const std::vector& descriptor, @@ -99,13 +95,13 @@ void DeePKS_domain::check_descriptor(const int inlmax, for (int ia = 0; ia < ucell.atoms[it].na; ia++) { int iat = ucell.itia2iat(it, ia); - ofs << ucell.atoms[it].label << " atom_index " << ia + 1 << " n_descriptor " << des_per_atom - << std::endl; + ofs << ucell.atoms[it].label << " atom_index " << ia + 1 << " n_descriptor " + << deepks_param.des_per_atom << std::endl; int id = 0; - for (int inl = 0; inl < inlmax / ucell.nat; inl++) + for (int inl = 0; inl < deepks_param.inlmax / ucell.nat; inl++) { - int nm = 2 * inl2l[inl] + 1; - const int ind = iat * inlmax / ucell.nat + inl; + int nm = 2 * deepks_param.inl2l[inl] + 1; + const int ind = iat * deepks_param.inlmax / ucell.nat + inl; auto accessor = descriptor[ind].accessor(); for (int im = 0; im < nm; im++) { @@ -126,9 +122,10 @@ void DeePKS_domain::check_descriptor(const int inlmax, for (int iat = 0; iat < ucell.nat; iat++) { const int it = ucell.iat2it[iat]; - ofs << ucell.atoms[it].label << " atom_index " << iat + 1 << " n_descriptor " << des_per_atom << std::endl; + ofs << ucell.atoms[it].label << " atom_index " << iat + 1 << " n_descriptor " << deepks_param.des_per_atom + << std::endl; auto accessor = descriptor[iat].accessor(); - for (int i = 0; i < des_per_atom; i++) + for (int i = 0; i < deepks_param.des_per_atom; i++) { ofs << accessor[i] << " "; if (i % 8 == 7) diff --git a/source/source_lcao/module_deepks/deepks_descriptor.h b/source/source_lcao/module_deepks/deepks_descriptor.h index a91025503a..93e1e95559 100644 --- a/source/source_lcao/module_deepks/deepks_descriptor.h +++ b/source/source_lcao/module_deepks/deepks_descriptor.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/intarray.h" #include "source_base/timer.h" #include "source_cell/unitcell.h" @@ -29,22 +30,18 @@ namespace DeePKS_domain /// Calculates descriptors /// which are eigenvalues of pdm in blocks of I_n_l void cal_descriptor(const int nat, - const int inlmax, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& pdm, - std::vector& descriptor, - const int des_per_atom); + std::vector& descriptor); /// print descriptors based on LCAO basis -void check_descriptor(const int inlmax, - const int des_per_atom, - const std::vector& inl2l, +void check_descriptor(const DeePKS_Param& deepks_param, const UnitCell& ucell, const std::string& out_dir, const std::vector& descriptor, const int rank); void cal_descriptor_equiv(const int nat, - const int des_per_atom, + const DeePKS_Param& deepks_param, const std::vector& pdm, std::vector& descriptor); } // namespace DeePKS_domain diff --git a/source/source_lcao/module_deepks/deepks_force.cpp b/source/source_lcao/module_deepks/deepks_force.cpp index fecd13773a..293710f87e 100644 --- a/source/source_lcao/module_deepks/deepks_force.cpp +++ b/source/source_lcao/module_deepks/deepks_force.cpp @@ -17,10 +17,10 @@ void DeePKS_domain::cal_f_delta(const hamilt::HContainer* dmr, const Grid_Driver& GridD, const Parallel_Orbitals& pv, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, double** gedm, - ModuleBase::IntArray* inl_index, ModuleBase::matrix& f_delta, const bool isstress, ModuleBase::matrix& svnl_dalpha) @@ -139,7 +139,7 @@ void DeePKS_domain::cal_f_delta(const hamilt::HContainer* dmr, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) { @@ -269,10 +269,10 @@ template void DeePKS_domain::cal_f_delta(const hamilt::HContainer>& kvec_d, std::vector*> phialpha, double** gedm, - ModuleBase::IntArray* inl_index, ModuleBase::matrix& f_delta, const bool isstress, ModuleBase::matrix& svnl_dalpha); @@ -283,10 +283,10 @@ template void DeePKS_domain::cal_f_delta>(const hamilt::HCo const Grid_Driver& GridD, const Parallel_Orbitals& pv, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, double** gedm, - ModuleBase::IntArray* inl_index, ModuleBase::matrix& f_delta, const bool isstress, ModuleBase::matrix& svnl_dalpha); diff --git a/source/source_lcao/module_deepks/deepks_force.h b/source/source_lcao/module_deepks/deepks_force.h index a76e88e699..3837d3a6d6 100644 --- a/source/source_lcao/module_deepks/deepks_force.h +++ b/source/source_lcao/module_deepks/deepks_force.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -31,10 +32,10 @@ void cal_f_delta(const hamilt::HContainer* dmr, const Grid_Driver& GridD, const Parallel_Orbitals& pv, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, double** gedm, - ModuleBase::IntArray* inl_index, ModuleBase::matrix& f_delta, const bool isstress, ModuleBase::matrix& svnl_dalpha); diff --git a/source/source_lcao/module_deepks/deepks_fpre.cpp b/source/source_lcao/module_deepks/deepks_fpre.cpp index 33a8c005be..461fbd7599 100644 --- a/source/source_lcao/module_deepks/deepks_fpre.cpp +++ b/source/source_lcao/module_deepks/deepks_fpre.cpp @@ -8,18 +8,16 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/vector3.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" /// this subroutine calculates the gradient of projected density matrices /// gdmx_m,m = d/dX sum_{mu,nu} rho_{mu,nu} template -void DeePKS_domain::cal_gdmx(const int lmaxd, - const int inlmax, - const int nks, +void DeePKS_domain::cal_gdmx(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, @@ -32,11 +30,11 @@ void DeePKS_domain::cal_gdmx(const int lmaxd, // get DS_alpha_mu and S_nu_beta int nrow = pv.nrow; - const int nm = 2 * lmaxd + 1; + const int nm = 2 * deepks_param.lmaxd + 1; // gdmx: dD/dX // \sum_{mu,nu} 2*c_mu*c_nu * // size: [3][natom][tot_Inl][2l+1][2l+1] - gdmx = torch::zeros({3, ucell.nat, inlmax, nm, nm}, torch::dtype(torch::kFloat64)); + gdmx = torch::zeros({3, ucell.nat, deepks_param.inlmax, nm, nm}, torch::dtype(torch::kFloat64)); auto accessor = gdmx.accessor(); DeePKS_domain::iterate_ad2( @@ -99,7 +97,7 @@ void DeePKS_domain::cal_gdmx(const int lmaxd, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[ucell.iat2it[iat]](ucell.iat2ia[iat], L0, N0); + const int inl = deepks_param.inl_index[ucell.iat2it[iat]](ucell.iat2ia[iat], L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) { @@ -136,7 +134,7 @@ void DeePKS_domain::cal_gdmx(const int lmaxd, ); #ifdef __MPI - Parallel_Reduce::reduce_all(gdmx.data_ptr(), 3 * ucell.nat * inlmax * nm * nm); + Parallel_Reduce::reduce_all(gdmx.data_ptr(), 3 * ucell.nat * deepks_param.inlmax * nm * nm); #endif ModuleBase::timer::tick("DeePKS_domain", "cal_gdmx"); return; @@ -144,9 +142,7 @@ void DeePKS_domain::cal_gdmx(const int lmaxd, // calculates gradient of descriptors from gradient of projected density matrices void DeePKS_domain::cal_gvx(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& gevdm, const torch::Tensor& gdmx, torch::Tensor& gvx, @@ -161,12 +157,14 @@ void DeePKS_domain::cal_gvx(const int nat, if (rank == 0) { // make gdmx as tensor - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; for (int nl = 0; nl < nlmax; ++nl) { - int nm = 2 * inl2l[nl] + 1; - torch::Tensor gdmx_sliced - = gdmx.slice(2, nl, inlmax, nlmax).slice(3, 0, nm, 1).slice(4, 0, nm, 1).permute({1, 0, 2, 3, 4}); + int nm = 2 * deepks_param.inl2l[nl] + 1; + torch::Tensor gdmx_sliced = gdmx.slice(2, nl, deepks_param.inlmax, nlmax) + .slice(3, 0, nm, 1) + .slice(4, 0, nm, 1) + .permute({1, 0, 2, 3, 4}); gdmr.push_back(gdmx_sliced); } @@ -190,18 +188,16 @@ void DeePKS_domain::cal_gvx(const int nat, assert(gvx.size(0) == nat); assert(gvx.size(1) == 3); assert(gvx.size(2) == nat); - assert(gvx.size(3) == des_per_atom); + assert(gvx.size(3) == deepks_param.des_per_atom); } ModuleBase::timer::tick("DeePKS_domain", "cal_gvx"); return; } -template void DeePKS_domain::cal_gdmx(const int lmaxd, - const int inlmax, - const int nks, +template void DeePKS_domain::cal_gdmx(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, @@ -209,12 +205,10 @@ template void DeePKS_domain::cal_gdmx(const int lmaxd, const Grid_Driver& GridD, torch::Tensor& gdmx); -template void DeePKS_domain::cal_gdmx>(const int lmaxd, - const int inlmax, - const int nks, +template void DeePKS_domain::cal_gdmx>(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, diff --git a/source/source_lcao/module_deepks/deepks_fpre.h b/source/source_lcao/module_deepks/deepks_fpre.h index 3ae94435b5..64c0531a2f 100644 --- a/source/source_lcao/module_deepks/deepks_fpre.h +++ b/source/source_lcao/module_deepks/deepks_fpre.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -30,12 +31,10 @@ namespace DeePKS_domain // calculate the gradient of pdm with regard to atomic positions // d/dX D_{Inl,mm'} template -void cal_gdmx(const int lmaxd, - const int inlmax, - const int nks, +void cal_gdmx(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, @@ -53,9 +52,7 @@ void cal_gdmx(const int lmaxd, /// gevdm*gdmx->gvx ///---------------------------------------------------- void cal_gvx(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& gevdm, const torch::Tensor& gdmx, torch::Tensor& gvx, diff --git a/source/source_lcao/module_deepks/deepks_orbital.cpp b/source/source_lcao/module_deepks/deepks_orbital.cpp index a43ff25ec3..7f16b6fec1 100644 --- a/source/source_lcao/module_deepks/deepks_orbital.cpp +++ b/source/source_lcao/module_deepks/deepks_orbital.cpp @@ -9,7 +9,6 @@ template void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, const std::vector>& h_delta, - // std::vector& o_delta, ModuleBase::matrix& o_delta, const Parallel_Orbitals& pv, const int nks, @@ -30,7 +29,7 @@ void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, if (mu >= 0 && nu >= 0) { - int iic; + int iic = 0; if (PARAM.inp.ks_solver == "genelpa" || PARAM.inp.ks_solver == "scalapack_gvx" || PARAM.inp.ks_solver == "pexsi") // save the matrix as column major format { @@ -48,7 +47,7 @@ void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, } } Parallel_Reduce::reduce_all(o_delta_tmp); - + const double* o_delta_ptr = reinterpret_cast(&o_delta_tmp); o_delta(ik, 0) = o_delta_ptr[0]; // real part in complex case } @@ -58,7 +57,6 @@ void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, template void DeePKS_domain::cal_o_delta(const std::vector& dm_hl, const std::vector>& h_delta, - // std::vector& o_delta, ModuleBase::matrix& o_delta, const Parallel_Orbitals& pv, const int nks, @@ -67,7 +65,6 @@ template void DeePKS_domain::cal_o_delta(const std:: template void DeePKS_domain::cal_o_delta, ModuleBase::ComplexMatrix>( const std::vector& dm_hl, const std::vector>>& h_delta, - // std::vector& o_delta, ModuleBase::matrix& o_delta, const Parallel_Orbitals& pv, const int nks, diff --git a/source/source_lcao/module_deepks/deepks_orbital.h b/source/source_lcao/module_deepks/deepks_orbital.h index 93bb3421f0..8f77e58fb1 100644 --- a/source/source_lcao/module_deepks/deepks_orbital.h +++ b/source/source_lcao/module_deepks/deepks_orbital.h @@ -26,7 +26,6 @@ namespace DeePKS_domain template void cal_o_delta(const std::vector& dm_hl, const std::vector>& h_delta, - // std::vector& o_delta, ModuleBase::matrix& o_delta, const Parallel_Orbitals& pv, const int nks, diff --git a/source/source_lcao/module_deepks/deepks_orbpre.cpp b/source/source_lcao/module_deepks/deepks_orbpre.cpp index 90cb40ea95..282ef92c64 100644 --- a/source/source_lcao/module_deepks/deepks_orbpre.cpp +++ b/source/source_lcao/module_deepks/deepks_orbpre.cpp @@ -7,26 +7,23 @@ #include "deepks_orbpre.h" #include "LCAO_deepks_io.h" // mohan add 2024-07-22 -#include "source_base/module_external/blas_connector.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/parallel_reduce.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" // calculates orbital_precalc[nks,NAt,NDscrpt] = gevdm * orbital_pdm; // orbital_pdm[nks,Inl,nm,nm] = dm_hl * overlap * overlap; template void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -39,7 +36,8 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, const double Rcut_Alpha = orb.Alpha[0].getRcut(); torch::Tensor orbital_pdm - = torch::zeros({nks, inlmax, (2 * lmaxd + 1), (2 * lmaxd + 1)}, torch::dtype(torch::kFloat64)); + = torch::zeros({nks, deepks_param.inlmax, (2 * deepks_param.lmaxd + 1), (2 * deepks_param.lmaxd + 1)}, + torch::dtype(torch::kFloat64)); auto accessor = orbital_pdm.accessor(); for (int T0 = 0; T0 < ucell.ntype; T0++) @@ -60,7 +58,7 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) // m1 = 1 for s, 3 for p, 5 for d @@ -215,19 +213,19 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, gemm_alpha = 2.0; } - dgemm_(&transa, - &transb, - &row_size_nks, - &trace_alpha_size, - &col_size, - &gemm_alpha, - dm_array.data(), - &col_size, + BlasConnector::gemm(transb, + transa, + trace_alpha_size, + row_size_nks, + col_size, + gemm_alpha, s_2t.data(), - &col_size, - &gemm_beta, + col_size, + dm_array.data(), + col_size, + gemm_beta, g_1dmt.data(), - &row_size_nks); + row_size_nks); } // ad2 for (int ik = 0; ik < nks; ik++) @@ -242,18 +240,18 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) // m1 = 1 for s, 3 for p, 5 for d { for (int m2 = 0; m2 < nm; ++m2) // m1 = 1 for s, 3 for p, 5 for d { - accessor[ik][inl][m1][m2] += ddot_(&row_size, + accessor[ik][inl][m1][m2] += BlasConnector::dot(row_size, p_g1dmt + index * row_size * nks, - &inc, + inc, s_1t.data() + index * row_size, - &inc); + inc); index++; } } @@ -265,19 +263,19 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, } } #ifdef __MPI - const int size = nks * inlmax * (2 * lmaxd + 1) * (2 * lmaxd + 1); + const int size = nks * deepks_param.inlmax * (2 * deepks_param.lmaxd + 1) * (2 * deepks_param.lmaxd + 1); Parallel_Reduce::reduce_all(orbital_pdm.data_ptr(), size); #endif // transfer orbital_pdm [nks,inl,nm,nm] to orbital_pdm_vector [nl,[nks,nat,nm,nm]] - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; std::vector orbital_pdm_vector; for (int nl = 0; nl < nlmax; ++nl) { - int nm = 2 * inl2l[nl] + 1; + int nm = 2 * deepks_param.inl2l[nl] + 1; torch::Tensor orbital_pdm_sliced - = orbital_pdm.slice(1, nl, inlmax, nlmax).slice(2, 0, nm, 1).slice(3, 0, nm, 1); + = orbital_pdm.slice(1, nl, deepks_param.inlmax, nlmax).slice(2, 0, nm, 1).slice(3, 0, nm, 1); orbital_pdm_vector.push_back(orbital_pdm_sliced); } @@ -297,15 +295,12 @@ void DeePKS_domain::cal_orbital_precalc(const std::vector& dm_hl, template void DeePKS_domain::cal_orbital_precalc( const std::vector& dm_hl, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -314,15 +309,12 @@ template void DeePKS_domain::cal_orbital_precalc( template void DeePKS_domain::cal_orbital_precalc, ModuleBase::ComplexMatrix>( const std::vector& dm_hl, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, diff --git a/source/source_lcao/module_deepks/deepks_orbpre.h b/source/source_lcao/module_deepks/deepks_orbpre.h index e9ddfeb95d..ec9dc1a123 100644 --- a/source/source_lcao/module_deepks/deepks_orbpre.h +++ b/source/source_lcao/module_deepks/deepks_orbpre.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -27,15 +28,12 @@ namespace DeePKS_domain template void cal_orbital_precalc(const std::vector& dm_hl, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, diff --git a/source/source_lcao/module_deepks/deepks_param.h b/source/source_lcao/module_deepks/deepks_param.h new file mode 100644 index 0000000000..75e161b9da --- /dev/null +++ b/source/source_lcao/module_deepks/deepks_param.h @@ -0,0 +1,21 @@ +#ifndef LCAO_DEEPKS_PARAM +#define LCAO_DEEPKS_PARAM + +#include +namespace ModuleBase +{ +struct IntArray; +} + +struct DeePKS_Param +{ + int lmaxd = 0; + int nmaxd = 0; + int inlmax = 0; + int n_descriptor = 0; + int des_per_atom = 0; + std::vector inl2l; + ModuleBase::IntArray* inl_index = nullptr; +}; + +#endif \ No newline at end of file diff --git a/source/source_lcao/module_deepks/deepks_pdm.cpp b/source/source_lcao/module_deepks/deepks_pdm.cpp index ffc0efc8fb..fdc838f45a 100644 --- a/source/source_lcao/module_deepks/deepks_pdm.cpp +++ b/source/source_lcao/module_deepks/deepks_pdm.cpp @@ -19,6 +19,7 @@ #include "deepks_pdm.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/timer.h" #include "source_lcao/module_hcontainer/atom_pair.h" #ifdef __MPI @@ -29,15 +30,13 @@ void DeePKS_domain::read_pdm(bool read_pdm_file, bool is_equiv, bool& init_pdm, const int nat, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const Numerical_Orbital& alpha, std::vector& pdm) { if (read_pdm_file && !init_pdm) // for DeePKS NSCF calculation { - const std::string file_projdm = PARAM.globalv.global_out_dir + "deepks_projdm.dat"; + const std::string file_projdm = PARAM.globalv.global_readin_dir + "deepks_projdm.dat"; std::ifstream ifs(file_projdm.c_str()); if (!ifs) @@ -46,15 +45,15 @@ void DeePKS_domain::read_pdm(bool read_pdm_file, } if (!is_equiv) { - for (int inl = 0; inl < inlmax; inl++) + for (int inl = 0; inl < deepks_param.inlmax; inl++) { - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; auto accessor = pdm[inl].accessor(); for (int m1 = 0; m1 < nm; m1++) { for (int m2 = 0; m2 < nm; m2++) { - double c; + double c = 0.0; ifs >> c; accessor[m1][m2] = c; } @@ -65,7 +64,7 @@ void DeePKS_domain::read_pdm(bool read_pdm_file, { int pdm_size = 0; int nproj = 0; - for (int il = 0; il < lmaxd + 1; il++) + for (int il = 0; il < deepks_param.lmaxd + 1; il++) { nproj += (2 * il + 1) * alpha.getNchi(il); } @@ -75,7 +74,7 @@ void DeePKS_domain::read_pdm(bool read_pdm_file, auto accessor = pdm[iat].accessor(); for (int ind = 0; ind < pdm_size; ind++) { - double c; + double c = 0.0; ifs >> c; accessor[ind] = c; } @@ -177,10 +176,7 @@ void DeePKS_domain::update_dmr(const std::vector>& k // pdm_m,m'=\sum_{mu,nu} rho_{mu,nu} template void DeePKS_domain::cal_pdm(bool& init_pdm, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, - const ModuleBase::IntArray* inl_index, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const hamilt::HContainer* dmr, const std::vector*> phialpha, @@ -203,9 +199,9 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, if (!PARAM.inp.deepks_equiv) { - for (int inl = 0; inl < inlmax; inl++) + for (int inl = 0; inl < deepks_param.inlmax; inl++) { - int nm = 2 * inl2l[inl] + 1; + int nm = 2 * deepks_param.inl2l[inl] + 1; pdm[inl] = torch::zeros({nm, nm}, torch::kFloat64); } } @@ -213,7 +209,7 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, { int pdm_size = 0; int nproj = 0; - for (int il = 0; il < lmaxd + 1; il++) + for (int il = 0; il < deepks_param.lmaxd + 1; il++) { nproj += (2 * il + 1) * orb.Alpha[0].getNchi(il); } @@ -246,7 +242,7 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) // m1 = 1 for s, 3 for p, 5 for d @@ -264,7 +260,7 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, else { int nproj = 0; - for (int il = 0; il < lmaxd + 1; il++) + for (int il = 0; il < deepks_param.lmaxd + 1; il++) { nproj += (2 * il + 1) * orb.Alpha[0].getNchi(il); } @@ -378,19 +374,19 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, // all the input should be data pointer constexpr char transa = 'T', transb = 'N'; const double gemm_alpha = 1.0, gemm_beta = 1.0; - dgemm_(&transa, - &transb, - &row_size, - &trace_alpha_size, - &col_size, - &gemm_alpha, - dm_current, - &col_size, + BlasConnector::gemm(transb, + transa, + trace_alpha_size, + row_size, + col_size, + gemm_alpha, s_2t.data(), - &col_size, - &gemm_beta, + col_size, + dm_current, + col_size, + gemm_beta, g_1dmt.data(), - &row_size); + row_size); } // ad2 if (!PARAM.inp.deepks_equiv) { @@ -399,7 +395,7 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; auto accessor = pdm[inl].accessor(); @@ -407,11 +403,11 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, { for (int m2 = 0; m2 < nm; ++m2) // m1 = 1 for s, 3 for p, 5 for d { - accessor[m1][m2] += ddot_(&row_size, - g_1dmt.data() + index * row_size, - &inc, - s_1t.data() + index * row_size, - &inc); + accessor[m1][m2] += BlasConnector::dot(row_size, + g_1dmt.data() + index * row_size, + inc, + s_1t.data() + index * row_size, + inc); index++; } } @@ -423,7 +419,7 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, auto accessor = pdm[iat].accessor(); int index = 0, inc = 1; int nproj = 0; - for (int il = 0; il < lmaxd + 1; il++) + for (int il = 0; il < deepks_param.lmaxd + 1; il++) { nproj += (2 * il + 1) * orb.Alpha[0].getNchi(il); } @@ -433,11 +429,11 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, { // ddot_: dot product of two vectors // inc means the increment of the index - accessor[iproj * nproj + jproj] += ddot_(&row_size, - g_1dmt.data() + index * row_size, - &inc, - s_1t.data() + index * row_size, - &inc); + accessor[iproj * nproj + jproj] += BlasConnector::dot(row_size, + g_1dmt.data() + index * row_size, + inc, + s_1t.data() + index * row_size, + inc); index++; } } @@ -446,9 +442,9 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, } // iat #ifdef __MPI - for (int inl = 0; inl < inlmax; inl++) + for (int inl = 0; inl < deepks_param.inlmax; inl++) { - int pdm_size = (2 * inl2l[inl] + 1) * (2 * inl2l[inl] + 1); + int pdm_size = (2 * deepks_param.inl2l[inl] + 1) * (2 * deepks_param.inl2l[inl] + 1); Parallel_Reduce::reduce_all(pdm[inl].data_ptr(), pdm_size); } #endif @@ -456,15 +452,15 @@ void DeePKS_domain::cal_pdm(bool& init_pdm, return; } -void DeePKS_domain::check_pdm(const int inlmax, const std::vector& inl2l, const std::vector& pdm) +void DeePKS_domain::check_pdm(const DeePKS_Param& deepks_param, const std::vector& pdm) { const std::string file_projdm = PARAM.globalv.global_out_dir + "deepks_projdm.dat"; std::ofstream ofs(file_projdm.c_str()); ofs << std::setprecision(10); - for (int inl = 0; inl < inlmax; inl++) + for (int inl = 0; inl < deepks_param.inlmax; inl++) { - const int nm = 2 * inl2l[inl] + 1; + const int nm = 2 * deepks_param.inl2l[inl] + 1; auto accessor = pdm[inl].accessor(); for (int m1 = 0; m1 < nm; m1++) { @@ -494,10 +490,7 @@ template void DeePKS_domain::update_dmr>(const std::vector< hamilt::HContainer* dmr_deepks); template void DeePKS_domain::cal_pdm(bool& init_pdm, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, - const ModuleBase::IntArray* inl_index, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const hamilt::HContainer* dmr, const std::vector*> phialpha, @@ -508,10 +501,7 @@ template void DeePKS_domain::cal_pdm(bool& init_pdm, std::vector& pdm); template void DeePKS_domain::cal_pdm>(bool& init_pdm, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, - const ModuleBase::IntArray* inl_index, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const hamilt::HContainer* dmr, const std::vector*> phialpha, diff --git a/source/source_lcao/module_deepks/deepks_pdm.h b/source/source_lcao/module_deepks/deepks_pdm.h index f7b90b50c1..4b39547576 100644 --- a/source/source_lcao/module_deepks/deepks_pdm.h +++ b/source/source_lcao/module_deepks/deepks_pdm.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/matrix.h" #include "source_base/timer.h" @@ -33,9 +34,7 @@ void read_pdm(bool read_pdm_file, bool is_equiv, bool& init_pdm, const int nat, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const Numerical_Orbital& alpha, std::vector& pdm); @@ -55,10 +54,7 @@ void update_dmr(const std::vector>& kvec_d, // - Relax/Cell-Relax/MD calculation, non-first step will use the convergence pdm from the last step as initial pdm template void cal_pdm(bool& init_pdm, - const int inlmax, - const int lmaxd, - const std::vector& inl2l, - const ModuleBase::IntArray* inl_index, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const hamilt::HContainer* dmr, const std::vector*> phialpha, @@ -68,7 +64,7 @@ void cal_pdm(bool& init_pdm, const Parallel_Orbitals& pv, std::vector& pdm); -void check_pdm(const int inlmax, const std::vector& inl2l, const std::vector& pdm); +void check_pdm(const DeePKS_Param& deepks_param, const std::vector& pdm); } // namespace DeePKS_domain #endif diff --git a/source/source_lcao/module_deepks/deepks_spre.cpp b/source/source_lcao/module_deepks/deepks_spre.cpp index eb0281146c..82fd8a5303 100644 --- a/source/source_lcao/module_deepks/deepks_spre.cpp +++ b/source/source_lcao/module_deepks/deepks_spre.cpp @@ -8,19 +8,17 @@ #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_base/vector3.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" /// this subroutine calculates the gradient of PDM wrt strain tensor: /// gdmepsl = d/d\epsilon_{ab} * /// sum_{mu,nu} rho_{mu,nu} template -void DeePKS_domain::cal_gdmepsl(const int lmaxd, - const int inlmax, - const int nks, +void DeePKS_domain::cal_gdmepsl(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, @@ -33,10 +31,10 @@ void DeePKS_domain::cal_gdmepsl(const int lmaxd, // get DS_alpha_mu and S_nu_beta int nrow = pv.nrow; - const int nm = 2 * lmaxd + 1; + const int nm = 2 * deepks_param.lmaxd + 1; // gdmepsl: dD/d\epsilon_{\alpha\beta} // size: [6][tot_Inl][2l+1][2l+1] - gdmepsl = torch::zeros({6, inlmax, nm, nm}, torch::dtype(torch::kFloat64)); + gdmepsl = torch::zeros({6, deepks_param.inlmax, nm, nm}, torch::dtype(torch::kFloat64)); auto accessor = gdmepsl.accessor(); DeePKS_domain::iterate_ad2( @@ -111,7 +109,7 @@ void DeePKS_domain::cal_gdmepsl(const int lmaxd, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[ucell.iat2it[iat]](ucell.iat2ia[iat], L0, N0); + const int inl = deepks_param.inl_index[ucell.iat2it[iat]](ucell.iat2ia[iat], L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) { @@ -147,7 +145,7 @@ void DeePKS_domain::cal_gdmepsl(const int lmaxd, ); #ifdef __MPI - Parallel_Reduce::reduce_all(gdmepsl.data_ptr(), 6 * inlmax * nm * nm); + Parallel_Reduce::reduce_all(gdmepsl.data_ptr(), 6 * deepks_param.inlmax * nm * nm); #endif ModuleBase::timer::tick("DeePKS_domain", "cal_gdmepsl"); return; @@ -156,9 +154,7 @@ void DeePKS_domain::cal_gdmepsl(const int lmaxd, // calculates stress of descriptors from gradient of projected density matrices // gv_epsl:d(d)/d\epsilon_{\alpha\beta}, [natom][6][des_per_atom] void DeePKS_domain::cal_gvepsl(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& gevdm, const torch::Tensor& gdmepsl, torch::Tensor& gvepsl, @@ -172,11 +168,12 @@ void DeePKS_domain::cal_gvepsl(const int nat, if (rank == 0) { // make gdmepsl as tensor - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; for (int nl = 0; nl < nlmax; ++nl) { - int nm = 2 * inl2l[nl] + 1; - torch::Tensor gdmepsl_sliced = gdmepsl.slice(1, nl, inlmax, nlmax).slice(2, 0, nm, 1).slice(3, 0, nm, 1); + int nm = 2 * deepks_param.inl2l[nl] + 1; + torch::Tensor gdmepsl_sliced + = gdmepsl.slice(1, nl, deepks_param.inlmax, nlmax).slice(2, 0, nm, 1).slice(3, 0, nm, 1); gdmepsl_vector.push_back(gdmepsl_sliced); } assert(gdmepsl_vector.size() == nlmax); @@ -197,19 +194,17 @@ void DeePKS_domain::cal_gvepsl(const int nat, gvepsl = torch::cat(gvepsl_vector, -1); assert(gvepsl.size(0) == 6); assert(gvepsl.size(1) == nat); - assert(gvepsl.size(2) == des_per_atom); + assert(gvepsl.size(2) == deepks_param.des_per_atom); } ModuleBase::timer::tick("DeePKS_domain", "cal_gvepsl"); return; } -template void DeePKS_domain::cal_gdmepsl(const int lmaxd, - const int inlmax, - const int nks, +template void DeePKS_domain::cal_gdmepsl(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, @@ -217,12 +212,10 @@ template void DeePKS_domain::cal_gdmepsl(const int lmaxd, const Grid_Driver& GridD, torch::Tensor& gdmepsl); -template void DeePKS_domain::cal_gdmepsl>(const int lmaxd, - const int inlmax, - const int nks, +template void DeePKS_domain::cal_gdmepsl>(const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, const hamilt::HContainer* dmr, const UnitCell& ucell, const LCAO_Orbitals& orb, diff --git a/source/source_lcao/module_deepks/deepks_spre.h b/source/source_lcao/module_deepks/deepks_spre.h index 54d9f6b05e..759af70209 100644 --- a/source/source_lcao/module_deepks/deepks_spre.h +++ b/source/source_lcao/module_deepks/deepks_spre.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -31,24 +32,19 @@ namespace DeePKS_domain // calculate the gradient of pdm with regard to atomic virial stress tensor // d/d\epsilon D_{Inl,mm'} template -void cal_gdmepsl( // const ModuleBase::matrix& dm, - const int lmaxd, - const int inlmax, - const int nks, - const std::vector>& kvec_d, - std::vector*> phialpha, - const ModuleBase::IntArray* inl_index, - const hamilt::HContainer* dmr, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const Grid_Driver& GridD, - torch::Tensor& gdmepsl); +void cal_gdmepsl(const int nks, + const DeePKS_Param& deepks_param, + const std::vector>& kvec_d, + std::vector*> phialpha, + const hamilt::HContainer* dmr, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, + const Grid_Driver& GridD, + torch::Tensor& gdmepsl); void cal_gvepsl(const int nat, - const int inlmax, - const int des_per_atom, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector& gevdm, const torch::Tensor& gdmepsl, torch::Tensor& gvepsl, diff --git a/source/source_lcao/module_deepks/deepks_vdelta.cpp b/source/source_lcao/module_deepks/deepks_vdelta.cpp index ba9f35f9fc..ab0f94c3a4 100644 --- a/source/source_lcao/module_deepks/deepks_vdelta.cpp +++ b/source/source_lcao/module_deepks/deepks_vdelta.cpp @@ -38,7 +38,7 @@ void DeePKS_domain::cal_e_delta_band(const std::vector>& dm, if (mu >= 0 && nu >= 0) { - int iic; + int iic = 0; if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) { iic = mu + nu * pv->nrow; diff --git a/source/source_lcao/module_deepks/deepks_vdpre.cpp b/source/source_lcao/module_deepks/deepks_vdpre.cpp index 0dad1c0bef..20ee69a499 100644 --- a/source/source_lcao/module_deepks/deepks_vdpre.cpp +++ b/source/source_lcao/module_deepks/deepks_vdpre.cpp @@ -10,27 +10,24 @@ #include "LCAO_deepks_io.h" // mohan add 2024-07-22 #include "deepks_iterate.h" -#include "source_base/module_external/blas_connector.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/parallel_reduce.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" // calculates v_delta_precalc[nks,nlocal,nlocal,NAt,NDscrpt] = gevdm * v_delta_pdm; // v_delta_pdm[nks,nlocal,nlocal,Inl,nm,nm] = overlap * overlap; // for deepks_v_delta = 1 template void DeePKS_domain::cal_v_delta_precalc(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -46,8 +43,9 @@ void DeePKS_domain::cal_v_delta_precalc(const int nlocal, using TK_tensor = typename std::conditional>::value, c10::complex, TK>::type; - torch::Tensor v_delta_pdm - = torch::zeros({nks, nlocal, nlocal, inlmax, (2 * lmaxd + 1), (2 * lmaxd + 1)}, torch::dtype(dtype)); + torch::Tensor v_delta_pdm = torch::zeros( + {nks, nlocal, nlocal, deepks_param.inlmax, (2 * deepks_param.lmaxd + 1), (2 * deepks_param.lmaxd + 1)}, + torch::dtype(dtype)); auto accessor = v_delta_pdm.accessor(); DeePKS_domain::iterate_ad2( @@ -112,14 +110,14 @@ void DeePKS_domain::cal_v_delta_precalc(const int nlocal, { for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) { - const int inl = inl_index[T0](I0, L0, N0); + const int inl = deepks_param.inl_index[T0](I0, L0, N0); const int nm = 2 * L0 + 1; for (int m1 = 0; m1 < nm; ++m1) // nm = 1 for s, 3 for p, 5 for d { for (int m2 = 0; m2 < nm; ++m2) // nm = 1 for s, 3 for p, 5 for d { - TK tmp = overlap_1->get_value(iw1, ib + m1) - * overlap_2->get_value(iw2, ib + m2) * *kpase_ptr; + TK tmp = overlap_1->get_value(iw1, ib + m1) * overlap_2->get_value(iw2, ib + m2) + * *kpase_ptr; TK_tensor tmp_tensor = TK_tensor(tmp); accessor[ik][iw1_all][iw2_all][inl][m1][m2] += tmp_tensor; } @@ -133,20 +131,21 @@ void DeePKS_domain::cal_v_delta_precalc(const int nlocal, } ); #ifdef __MPI - const int size = nks * nlocal * nlocal * inlmax * (2 * lmaxd + 1) * (2 * lmaxd + 1); + const int size + = nks * nlocal * nlocal * deepks_param.inlmax * (2 * deepks_param.lmaxd + 1) * (2 * deepks_param.lmaxd + 1); TK_tensor* data_tensor_ptr = v_delta_pdm.data_ptr(); TK* data_ptr = reinterpret_cast(data_tensor_ptr); Parallel_Reduce::reduce_all(data_ptr, size); #endif // transfer v_delta_pdm to v_delta_pdm_vector - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; std::vector v_delta_pdm_vector; for (int nl = 0; nl < nlmax; ++nl) { - int nm = 2 * inl2l[nl] + 1; + int nm = 2 * deepks_param.inl2l[nl] + 1; torch::Tensor v_delta_pdm_sliced - = v_delta_pdm.slice(3, nl, inlmax, nlmax).slice(4, 0, nm, 1).slice(5, 0, nm, 1); + = v_delta_pdm.slice(3, nl, deepks_param.inlmax, nlmax).slice(4, 0, nm, 1).slice(5, 0, nm, 1); v_delta_pdm_vector.push_back(v_delta_pdm_sliced); } @@ -173,10 +172,9 @@ void DeePKS_domain::cal_v_delta_precalc(const int nlocal, // prepare_phialpha and prepare_gevdm for deepks_v_delta = 2 template void DeePKS_domain::prepare_phialpha(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const UnitCell& ucell, @@ -190,8 +188,8 @@ void DeePKS_domain::prepare_phialpha(const int nlocal, constexpr torch::Dtype dtype = std::is_same::value ? torch::kFloat64 : torch::kComplexDouble; using TK_tensor = typename std::conditional>::value, c10::complex, TK>::type; - int nlmax = inlmax / nat; - int mmax = 2 * lmaxd + 1; + int nlmax = deepks_param.inlmax / nat; + int mmax = 2 * deepks_param.lmaxd + 1; phialpha_out = torch::zeros({nat, nlmax, nks, nlocal, mmax}, dtype); auto accessor = phialpha_out.accessor(); @@ -268,16 +266,15 @@ void DeePKS_domain::prepare_phialpha(const int nlocal, } void DeePKS_domain::prepare_gevdm(const int nat, - const int lmaxd, - const int inlmax, + const DeePKS_Param& deepks_param, const LCAO_Orbitals& orb, const std::vector& gevdm_in, torch::Tensor& gevdm_out) { ModuleBase::TITLE("DeePKS_domain", "prepare_gevdm"); ModuleBase::timer::tick("DeePKS_domain", "prepare_gevdm"); - int nlmax = inlmax / nat; - int mmax = 2 * lmaxd + 1; + int nlmax = deepks_param.inlmax / nat; + int mmax = 2 * deepks_param.lmaxd + 1; gevdm_out = torch::zeros({nat, nlmax, mmax, mmax, mmax}, torch::TensorOptions().dtype(torch::kFloat64)); std::vector gevdm_out_vector; @@ -295,15 +292,12 @@ void DeePKS_domain::prepare_gevdm(const int nat, } template void DeePKS_domain::cal_v_delta_precalc(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -311,15 +305,12 @@ template void DeePKS_domain::cal_v_delta_precalc(const int nlocal, torch::Tensor& v_delta_precalc); template void DeePKS_domain::cal_v_delta_precalc>( const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -327,10 +318,9 @@ template void DeePKS_domain::cal_v_delta_precalc>( torch::Tensor& v_delta_precalc); template void DeePKS_domain::prepare_phialpha(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const UnitCell& ucell, @@ -341,10 +331,9 @@ template void DeePKS_domain::prepare_phialpha(const int nlocal, template void DeePKS_domain::prepare_phialpha>( const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const UnitCell& ucell, diff --git a/source/source_lcao/module_deepks/deepks_vdpre.h b/source/source_lcao/module_deepks/deepks_vdpre.h index 90d2e887f6..bf096a4267 100644 --- a/source/source_lcao/module_deepks/deepks_vdpre.h +++ b/source/source_lcao/module_deepks/deepks_vdpre.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -32,15 +33,12 @@ namespace DeePKS_domain // calculates v_delta_precalc template void cal_v_delta_precalc(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -51,10 +49,9 @@ void cal_v_delta_precalc(const int nlocal, // prepare phialpha for outputting npy file template void prepare_phialpha(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const UnitCell& ucell, @@ -65,8 +62,7 @@ void prepare_phialpha(const int nlocal, // prepare gevdm for outputting npy file void prepare_gevdm(const int nat, - const int lmaxd, - const int inlmax, + const DeePKS_Param& deepks_param, const LCAO_Orbitals& orb, const std::vector& gevdm_in, torch::Tensor& gevdm_out); diff --git a/source/source_lcao/module_deepks/deepks_vdrpre.cpp b/source/source_lcao/module_deepks/deepks_vdrpre.cpp index 6a550158ae..e58f10b2e2 100644 --- a/source/source_lcao/module_deepks/deepks_vdrpre.cpp +++ b/source/source_lcao/module_deepks/deepks_vdrpre.cpp @@ -1,4 +1,4 @@ -// prepare_phialpha_r : prepare phialpha_r for outputting npy file +// prepare_phialpha_iRmat : prepare phialpha_r and iR_mat for outputting npy file #ifdef __MLALGO @@ -6,34 +6,29 @@ #include "LCAO_deepks_io.h" // mohan add 2024-07-22 #include "deepks_iterate.h" -#include "source_base/module_external/blas_connector.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" +#include "source_base/module_external/blas_connector.h" #include "source_base/parallel_reduce.h" -#include "source_lcao/module_hcontainer/atom_pair.h" #include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/atom_pair.h" -void DeePKS_domain::prepare_phialpha_r(const int nlocal, - const int lmaxd, - const int inlmax, - const int nat, - const int R_size, - const std::vector*> phialpha, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const Grid_Driver& GridD, - torch::Tensor& phialpha_r_out) +void DeePKS_domain::prepare_phialpha_iRmat(const int nlocal, + const int R_size, + const DeePKS_Param& deepks_param, + const std::vector*> phialpha, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Grid_Driver& GridD, + torch::Tensor& overlap, + torch::Tensor& iRmat) { - ModuleBase::TITLE("DeePKS_domain", "prepare_phialpha_r"); - ModuleBase::timer::tick("DeePKS_domain", "prepare_phialpha_r"); + ModuleBase::TITLE("DeePKS_domain", "prepare_phialpha_iRmat"); + ModuleBase::timer::tick("DeePKS_domain", "prepare_phialpha_iRmat"); constexpr torch::Dtype dtype = torch::kFloat64; - int nlmax = inlmax / nat; - int mmax = 2 * lmaxd + 1; - - phialpha_r_out = torch::zeros({R_size, R_size, R_size, nat, nlmax, nlocal, mmax}, dtype); - auto accessor = phialpha_r_out.accessor(); + // get the maximum nnmax + std::vector nnmax_vec(ucell.nat, 0); DeePKS_domain::iterate_ad1( ucell, GridD, @@ -42,7 +37,7 @@ void DeePKS_domain::prepare_phialpha_r(const int nlocal, [&](const int iat, const ModuleBase::Vector3& tau0, const int ibt, - const ModuleBase::Vector3& tau, + const ModuleBase::Vector3& tau1, const int start, const int nw_tot, ModuleBase::Vector3 dR) @@ -51,65 +46,62 @@ void DeePKS_domain::prepare_phialpha_r(const int nlocal, { return; // to next loop } + nnmax_vec[iat]++; + } + ); + + int nnmax = *std::max_element(nnmax_vec.begin(), nnmax_vec.end()); + overlap = torch::zeros({ucell.nat, nnmax, nlocal, deepks_param.des_per_atom}, dtype); + torch::Tensor dRmat_tmp = torch::zeros({ucell.nat, nnmax, 3}, torch::kInt32); + auto overlap_accessor = overlap.accessor(); + auto dRmat_accessor = dRmat_tmp.accessor(); - // middle loop : all atomic basis on the adjacent atom ad - for (int iw1 = 0; iw1 < nw_tot; ++iw1) + std::fill(nnmax_vec.begin(), nnmax_vec.end(), 0); + DeePKS_domain::iterate_ad1( + ucell, + GridD, + orb, + false, // no trace_alpha + [&](const int iat, + const ModuleBase::Vector3& tau0, + const int ibt, + const ModuleBase::Vector3& tau1, + const int start, + const int nw_tot, + ModuleBase::Vector3 dR) + { + hamilt::BaseMatrix* overlap_mat = phialpha[0]->find_matrix(iat, ibt, dR); + if (overlap_mat == nullptr) { - const int iw1_all = start + iw1; - const int iw1_local = pv.global2local_row(iw1_all); - const int iw2_local = pv.global2local_col(iw1_all); - if (iw1_local < 0 || iw2_local < 0) - { - continue; - } - hamilt::BaseMatrix* overlap = phialpha[0]->find_matrix(iat, ibt, dR); - const int iR = phialpha[0]->find_R(dR); + return; // to next loop + } + dRmat_accessor[iat][nnmax_vec[iat]][0] = dR.x; + dRmat_accessor[iat][nnmax_vec[iat]][1] = dR.y; + dRmat_accessor[iat][nnmax_vec[iat]][2] = dR.z; - int ib = 0; - int nl = 0; - for (int L0 = 0; L0 <= orb.Alpha[0].getLmax(); ++L0) + for (int ix = 0; ix < nw_tot; ix++) + { + for (int iy = 0; iy < deepks_param.des_per_atom; iy++) { - for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) - { - const int nm = 2 * L0 + 1; - for (int m1 = 0; m1 < nm; ++m1) // nm = 1 for s, 3 for p, 5 for d - { - int iRx = DeePKS_domain::mapping_R(dR.x); - int iRy = DeePKS_domain::mapping_R(dR.y); - int iRz = DeePKS_domain::mapping_R(dR.z); - accessor[iRx][iRy][iRz][iat][nl][iw1_all][m1] - += overlap->get_value(iw1, ib + m1); - } - ib += nm; - nl++; - } + overlap_accessor[iat][nnmax_vec[iat]][start + ix][iy] = overlap_mat->get_value(ix, iy); } - } // end iw + } + nnmax_vec[iat]++; } ); - -#ifdef __MPI - int size = R_size * R_size * R_size * nat * nlmax * nlocal * mmax; - double* data_ptr = phialpha_r_out.data_ptr(); - Parallel_Reduce::reduce_all(data_ptr, size); - -#endif - - ModuleBase::timer::tick("DeePKS_domain", "prepare_phialpha_r"); + iRmat = mapping_R(dRmat_tmp.unsqueeze(1) - dRmat_tmp.unsqueeze(2)); + ModuleBase::timer::tick("DeePKS_domain", "prepare_phialpha_iRmat"); return; } void DeePKS_domain::cal_vdr_precalc(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, const int R_size, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -119,106 +111,111 @@ void DeePKS_domain::cal_vdr_precalc(const int nlocal, ModuleBase::TITLE("DeePKS_domain", "calc_vdr_precalc"); ModuleBase::timer::tick("DeePKS_domain", "calc_vdr_precalc"); - torch::Tensor vdr_pdm - = torch::zeros({R_size, R_size, R_size, nlocal, nlocal, inlmax, (2 * lmaxd + 1), (2 * lmaxd + 1)}, - torch::TensorOptions().dtype(torch::kFloat64)); + torch::Tensor vdr_pdm = torch::zeros({R_size, + R_size, + R_size, + nlocal, + nlocal, + deepks_param.inlmax, + (2 * deepks_param.lmaxd + 1), + (2 * deepks_param.lmaxd + 1)}, + torch::TensorOptions().dtype(torch::kFloat64)); auto accessor = vdr_pdm.accessor(); - DeePKS_domain::iterate_ad2( - ucell, - GridD, - orb, - false, // no trace_alpha - [&](const int iat, - const ModuleBase::Vector3& tau0, - const int ibt1, - const ModuleBase::Vector3& tau1, - const int start1, - const int nw1_tot, - ModuleBase::Vector3 dR1, - const int ibt2, - const ModuleBase::Vector3& tau2, - const int start2, - const int nw2_tot, - ModuleBase::Vector3 dR2) - { - const int T0 = ucell.iat2it[iat]; - const int I0 = ucell.iat2ia[iat]; - if (phialpha[0]->find_matrix(iat, ibt1, dR1.x, dR1.y, dR1.z) == nullptr - || phialpha[0]->find_matrix(iat, ibt2, dR2.x, dR2.y, dR2.z) == nullptr) - { - return; // to next loop - } + DeePKS_domain::iterate_ad2(ucell, + GridD, + orb, + false, // no trace_alpha + [&](const int iat, + const ModuleBase::Vector3& tau0, + const int ibt1, + const ModuleBase::Vector3& tau1, + const int start1, + const int nw1_tot, + ModuleBase::Vector3 dR1, + const int ibt2, + const ModuleBase::Vector3& tau2, + const int start2, + const int nw2_tot, + ModuleBase::Vector3 dR2) { + const int T0 = ucell.iat2it[iat]; + const int I0 = ucell.iat2ia[iat]; + if (phialpha[0]->find_matrix(iat, ibt1, dR1.x, dR1.y, dR1.z) == nullptr + || phialpha[0]->find_matrix(iat, ibt2, dR2.x, dR2.y, dR2.z) == nullptr) + { + return; // to next loop + } - hamilt::BaseMatrix* overlap_1 = phialpha[0]->find_matrix(iat, ibt1, dR1); - hamilt::BaseMatrix* overlap_2 = phialpha[0]->find_matrix(iat, ibt2, dR2); - assert(overlap_1->get_col_size() == overlap_2->get_col_size()); - ModuleBase::Vector3 dR = dR2 - dR1; - int iRx = DeePKS_domain::mapping_R(dR.x); - int iRy = DeePKS_domain::mapping_R(dR.y); - int iRz = DeePKS_domain::mapping_R(dR.z); - // Make sure the index is in range we need to save - if (iRx >= R_size || iRy >= R_size || iRz >= R_size) - { - return; // to next loop - } + hamilt::BaseMatrix* overlap_1 = phialpha[0]->find_matrix(iat, ibt1, dR1); + hamilt::BaseMatrix* overlap_2 = phialpha[0]->find_matrix(iat, ibt2, dR2); + assert(overlap_1->get_col_size() == overlap_2->get_col_size()); + ModuleBase::Vector3 dR = dR2 - dR1; + int iRx = DeePKS_domain::mapping_R(dR.x); + int iRy = DeePKS_domain::mapping_R(dR.y); + int iRz = DeePKS_domain::mapping_R(dR.z); + // Make sure the index is in range we need to save + if (iRx >= R_size || iRy >= R_size || iRz >= R_size) + { + return; // to next loop + } - for (int iw1 = 0; iw1 < nw1_tot; ++iw1) - { - const int iw1_all = start1 + iw1; // this is \mu - const int iw1_local = pv.global2local_row(iw1_all); - if (iw1_local < 0) - { - continue; - } - for (int iw2 = 0; iw2 < nw2_tot; ++iw2) - { - const int iw2_all = start2 + iw2; // this is \nu - const int iw2_local = pv.global2local_col(iw2_all); - if (iw2_local < 0) - { - continue; - } + for (int iw1 = 0; iw1 < nw1_tot; ++iw1) + { + const int iw1_all = start1 + iw1; // this is \mu + const int iw1_local = pv.global2local_row(iw1_all); + if (iw1_local < 0) + { + continue; + } + for (int iw2 = 0; iw2 < nw2_tot; ++iw2) + { + const int iw2_all = start2 + iw2; // this is \nu + const int iw2_local = pv.global2local_col(iw2_all); + if (iw2_local < 0) + { + continue; + } - int ib = 0; - for (int L0 = 0; L0 <= orb.Alpha[0].getLmax(); ++L0) - { - for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) - { - const int inl = inl_index[T0](I0, L0, N0); - const int nm = 2 * L0 + 1; + int ib = 0; + for (int L0 = 0; L0 <= orb.Alpha[0].getLmax(); ++L0) + { + for (int N0 = 0; N0 < orb.Alpha[0].getNchi(L0); ++N0) + { + const int inl = deepks_param.inl_index[T0](I0, L0, N0); + const int nm = 2 * L0 + 1; - for (int m1 = 0; m1 < nm; ++m1) // nm = 1 for s, 3 for p, 5 for d - { - for (int m2 = 0; m2 < nm; ++m2) // nm = 1 for s, 3 for p, 5 for d - { - double tmp = overlap_1->get_value(iw1, ib + m1) - * overlap_2->get_value(iw2, ib + m2); - accessor[iRx][iRy][iRz][iw1_all][iw2_all][inl][m1][m2] - += tmp; - } - } - ib += nm; - } - } - } // iw2 - } // iw1 - } - ); + for (int m1 = 0; m1 < nm; ++m1) // nm = 1 for s, 3 for p, 5 for d + { + for (int m2 = 0; m2 < nm; ++m2) // nm = 1 for s, 3 for p, 5 for d + { + double tmp = overlap_1->get_value(iw1, ib + m1) + * overlap_2->get_value(iw2, ib + m2); + accessor[iRx][iRy][iRz][iw1_all][iw2_all][inl][m1][m2] + += tmp; + } + } + ib += nm; + } + } + } // iw2 + } // iw1 + }); #ifdef __MPI - const int size = R_size * R_size * R_size * nlocal * nlocal * inlmax * (2 * lmaxd + 1) * (2 * lmaxd + 1); + const int size = R_size * R_size * R_size * nlocal * nlocal * deepks_param.inlmax * (2 * deepks_param.lmaxd + 1) + * (2 * deepks_param.lmaxd + 1); double* data_ptr = vdr_pdm.data_ptr(); Parallel_Reduce::reduce_all(data_ptr, size); #endif // transfer v_delta_pdm to v_delta_pdm_vector - int nlmax = inlmax / nat; + int nlmax = deepks_param.inlmax / nat; std::vector vdr_pdm_vector; for (int nl = 0; nl < nlmax; ++nl) { - int nm = 2 * inl2l[nl] + 1; - torch::Tensor vdr_pdm_sliced = vdr_pdm.slice(5, nl, inlmax, nlmax).slice(6, 0, nm, 1).slice(7, 0, nm, 1); + int nm = 2 * deepks_param.inl2l[nl] + 1; + torch::Tensor vdr_pdm_sliced + = vdr_pdm.slice(5, nl, deepks_param.inlmax, nlmax).slice(6, 0, nm, 1).slice(7, 0, nm, 1); vdr_pdm_vector.push_back(vdr_pdm_sliced); } @@ -255,6 +252,15 @@ int DeePKS_domain::mapping_R(int R) return R_index; } +torch::Tensor DeePKS_domain::mapping_R(const torch::Tensor& R_tensor) +{ + auto R = R_tensor.to(torch::kInt32); + auto pos = R > 0; + auto twoR_minus1 = R * 2 - 1; + auto neg_minus2R = -2 * R; + return at::where(pos, twoR_minus1, neg_minus2R); +} + template int DeePKS_domain::get_R_size(const hamilt::HContainer& hcontainer) { diff --git a/source/source_lcao/module_deepks/deepks_vdrpre.h b/source/source_lcao/module_deepks/deepks_vdrpre.h index cf1a4a1b61..fc7975ce49 100644 --- a/source/source_lcao/module_deepks/deepks_vdrpre.h +++ b/source/source_lcao/module_deepks/deepks_vdrpre.h @@ -3,6 +3,7 @@ #ifdef __MLALGO +#include "deepks_param.h" #include "source_base/complexmatrix.h" #include "source_base/intarray.h" #include "source_base/matrix.h" @@ -28,29 +29,25 @@ namespace DeePKS_domain // for deepks_v_delta = -1 // calculates v_delta_r_precalc -void prepare_phialpha_r(const int nlocal, - const int lmaxd, - const int inlmax, - const int nat, - const int R_size, - const std::vector*> phialpha, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const Parallel_Orbitals& pv, - const Grid_Driver& GridD, - torch::Tensor& phialpha_r_out); + +void prepare_phialpha_iRmat(const int nlocal, + const int R_size, + const DeePKS_Param& deepks_param, + const std::vector*> phialpha, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Grid_Driver& GridD, + torch::Tensor& overlap, + torch::Tensor& iRmat); void cal_vdr_precalc(const int nlocal, - const int lmaxd, - const int inlmax, const int nat, const int nks, const int R_size, - const std::vector& inl2l, + const DeePKS_Param& deepks_param, const std::vector>& kvec_d, const std::vector*> phialpha, const std::vector gevdm, - const ModuleBase::IntArray* inl_index, const UnitCell& ucell, const LCAO_Orbitals& orb, const Parallel_Orbitals& pv, @@ -58,6 +55,7 @@ void cal_vdr_precalc(const int nlocal, torch::Tensor& vdr_precalc); int mapping_R(int R); +torch::Tensor mapping_R(const torch::Tensor& R_tensor); template int get_R_size(const hamilt::HContainer& hcontainer); diff --git a/source/source_lcao/module_deepks/test/CMakeLists.txt b/source/source_lcao/module_deepks/test/CMakeLists.txt index 93574f4106..2a1dae6e6d 100644 --- a/source/source_lcao/module_deepks/test/CMakeLists.txt +++ b/source/source_lcao/module_deepks/test/CMakeLists.txt @@ -7,6 +7,7 @@ add_executable( ../../../source_cell/atom_spec.cpp ../../../source_cell/atom_pseudo.cpp ../../../source_cell/read_atoms.cpp + ../../../source_cell/read_atoms_helper.cpp ../../../source_cell/read_stru.cpp ../../../source_cell/print_cell.cpp ../../../source_cell/read_atom_species.cpp @@ -21,27 +22,26 @@ add_executable( ../../../source_cell/sep.cpp ../../../source_cell/sep_cell.cpp ../../../source_pw/module_pwdft/soc.cpp - ../../../source_io/output.cpp - ../../../source_io/sparse_matrix.cpp + ../../../source_io/module_output/output.cpp + ../../../source_io/module_output/sparse_matrix.cpp ../../../source_estate/read_pseudo.cpp ../../../source_estate/cal_wfc.cpp ../../../source_estate/read_orb.cpp ../../../source_estate/cal_nelec_nband.cpp ../../../source_estate/module_dm/density_matrix.cpp ../../../source_estate/module_dm/density_matrix_io.cpp - ../../../source_lcao/module_hcontainer/base_matrix.cpp - ../../../source_lcao/module_hcontainer/hcontainer.cpp - ../../../source_lcao/module_hcontainer/atom_pair.cpp - ../../../source_lcao/module_hcontainer/func_transfer.cpp - ../../../source_lcao/module_hcontainer/func_folding.cpp - ../../../source_lcao/module_hcontainer/transfer.cpp - ../../../source_lcao/module_hcontainer/output_hcontainer.cpp - ../../../source_lcao/module_operator_lcao/deepks_lcao.cpp - ../../../source_lcao/module_operator_lcao/operator_lcao.cpp + ../../module_hcontainer/base_matrix.cpp + ../../module_hcontainer/hcontainer.cpp + ../../module_hcontainer/atom_pair.cpp + ../../module_hcontainer/func_transfer.cpp + ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/transfer.cpp + ../../module_hcontainer/output_hcontainer.cpp + ../../module_operator_lcao/deepks_lcao.cpp + ../../module_operator_lcao/operator_lcao.cpp ../../../source_hamilt/operator.cpp - ../../../source_lcao/module_rt/td_info.cpp - ../../../source_lcao/module_rt/td_folding.cpp - ../../../source_estate/module_pot/H_TDDFT_pw.cpp + ../../module_rt/td_folding.cpp + mock_tdinfo.cpp ) target_link_libraries( diff --git a/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp b/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp index 81b14f25bd..68718bd9b6 100644 --- a/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp +++ b/source/source_lcao/module_deepks/test/LCAO_deepks_test.cpp @@ -146,10 +146,7 @@ void test_deepks::check_pdm() Test_Deepks::GridD, this->ld.dm_r); DeePKS_domain::cal_pdm(this->ld.init_pdm, - this->ld.inlmax, - this->ld.lmaxd, - this->ld.inl2l, - this->ld.inl_index, + this->ld.deepks_param, kv.kvec_d, this->ld.dm_r, this->ld.phialpha, @@ -158,32 +155,25 @@ void test_deepks::check_pdm() Test_Deepks::GridD, ParaO, this->ld.pdm); - DeePKS_domain::check_pdm(this->ld.inlmax, this->ld.inl2l, this->ld.pdm); + DeePKS_domain::check_pdm(this->ld.deepks_param, this->ld.pdm); this->compare_with_ref("deepks_projdm.dat", "pdm_ref.dat"); } template void test_deepks::check_descriptor(std::vector& descriptor) { - DeePKS_domain::cal_descriptor(ucell.nat, - this->ld.inlmax, - this->ld.inl2l, - this->ld.pdm, - descriptor, - this->ld.des_per_atom); - DeePKS_domain::check_descriptor(this->ld.inlmax, this->ld.des_per_atom, this->ld.inl2l, ucell, "./", descriptor, 0); + DeePKS_domain::cal_descriptor(ucell.nat, this->ld.deepks_param, this->ld.pdm, descriptor); + DeePKS_domain::check_descriptor(this->ld.deepks_param, ucell, "./", descriptor, 0); this->compare_with_ref("deepks_desc.dat", "descriptor_ref.dat"); } template void test_deepks::check_gdmx(torch::Tensor& gdmx) { - DeePKS_domain::cal_gdmx(this->ld.lmaxd, - this->ld.inlmax, - kv.nkstot, + DeePKS_domain::cal_gdmx(kv.nkstot, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, - this->ld.inl_index, this->ld.dm_r, ucell, ORB, @@ -198,9 +188,9 @@ template void test_deepks::check_gvx(torch::Tensor& gdmx) { std::vector gevdm; - DeePKS_domain::cal_gevdm(ucell.nat, this->ld.inlmax, this->ld.inl2l, this->ld.pdm, gevdm); + DeePKS_domain::cal_gevdm(ucell.nat, this->ld.deepks_param, this->ld.pdm, gevdm); torch::Tensor gvx; - DeePKS_domain::cal_gvx(ucell.nat, this->ld.inlmax, this->ld.des_per_atom, this->ld.inl2l, gevdm, gdmx, gvx, 0); + DeePKS_domain::cal_gvx(ucell.nat, this->ld.deepks_param, gevdm, gdmx, gvx, 0); DeePKS_domain::check_tensor(gvx, "gvx.dat", 0); // 0 for rank this->compare_with_ref("gvx.dat", "gvx_ref.dat"); } @@ -208,12 +198,10 @@ void test_deepks::check_gvx(torch::Tensor& gdmx) template void test_deepks::check_gdmepsl(torch::Tensor& gdmepsl) { - DeePKS_domain::cal_gdmepsl(this->ld.lmaxd, - this->ld.inlmax, - kv.nkstot, + DeePKS_domain::cal_gdmepsl(kv.nkstot, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, - this->ld.inl_index, this->ld.dm_r, ucell, ORB, @@ -228,16 +216,9 @@ template void test_deepks::check_gvepsl(torch::Tensor& gdmepsl) { std::vector gevdm; - DeePKS_domain::cal_gevdm(ucell.nat, this->ld.inlmax, this->ld.inl2l, this->ld.pdm, gevdm); + DeePKS_domain::cal_gevdm(ucell.nat, this->ld.deepks_param, this->ld.pdm, gevdm); torch::Tensor gvepsl; - DeePKS_domain::cal_gvepsl(ucell.nat, - this->ld.inlmax, - this->ld.des_per_atom, - this->ld.inl2l, - gevdm, - gdmepsl, - gvepsl, - 0); + DeePKS_domain::cal_gvepsl(ucell.nat, this->ld.deepks_param, gevdm, gdmepsl, gvepsl, 0); DeePKS_domain::check_tensor(gvepsl, "gvepsl.dat", 0); // 0 for rank this->compare_with_ref("gvepsl.dat", "gvepsl_ref.dat"); } @@ -248,17 +229,14 @@ void test_deepks::check_orbpre() using TH = std::conditional_t::value, ModuleBase::matrix, ModuleBase::ComplexMatrix>; std::vector gevdm; torch::Tensor orbpre; - DeePKS_domain::cal_gevdm(ucell.nat, this->ld.inlmax, this->ld.inl2l, this->ld.pdm, gevdm); + DeePKS_domain::cal_gevdm(ucell.nat, this->ld.deepks_param, this->ld.pdm, gevdm); DeePKS_domain::cal_orbital_precalc(dm, - this->ld.lmaxd, - this->ld.inlmax, ucell.nat, kv.nkstot, - this->ld.inl2l, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, gevdm, - this->ld.inl_index, ucell, ORB, ParaO, @@ -273,17 +251,14 @@ void test_deepks::check_vdpre() { std::vector gevdm; torch::Tensor vdpre; - DeePKS_domain::cal_gevdm(ucell.nat, this->ld.inlmax, this->ld.inl2l, this->ld.pdm, gevdm); + DeePKS_domain::cal_gevdm(ucell.nat, this->ld.deepks_param, this->ld.pdm, gevdm); DeePKS_domain::cal_v_delta_precalc(PARAM.sys.nlocal, - this->ld.lmaxd, - this->ld.inlmax, ucell.nat, kv.nkstot, - this->ld.inl2l, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, gevdm, - this->ld.inl_index, ucell, ORB, ParaO, @@ -298,29 +273,41 @@ void test_deepks::check_vdrpre() { std::vector gevdm; torch::Tensor vdrpre; - DeePKS_domain::cal_gevdm(ucell.nat, this->ld.inlmax, this->ld.inl2l, this->ld.pdm, gevdm); + torch::Tensor overlap_out; + torch::Tensor iRmat; + DeePKS_domain::cal_gevdm(ucell.nat, this->ld.deepks_param, this->ld.pdm, gevdm); // normally use hR to get R_size, here use 3 instead for Bravo lattice R in [-1,0,1] int R_size = 3; DeePKS_domain::cal_vdr_precalc(PARAM.sys.nlocal, - this->ld.lmaxd, - this->ld.inlmax, ucell.nat, kv.nkstot, R_size, - this->ld.inl2l, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, gevdm, - this->ld.inl_index, ucell, ORB, ParaO, Test_Deepks::GridD, vdrpre); + DeePKS_domain::prepare_phialpha_iRmat(PARAM.sys.nlocal, + R_size, + this->ld.deepks_param, + this->ld.phialpha, + ucell, + ORB, + Test_Deepks::GridD, + overlap_out, + iRmat); // vdrpre is large, we only check the main element in Bravo lattice vector (0, 0, 0) and (1, 0, 0) torch::Tensor vdrpre_sliced = vdrpre.slice(0, 0, 2, 1).slice(1, 0, 1, 1).slice(2, 0, 1, 1); DeePKS_domain::check_tensor(vdrpre_sliced, "vdr_precalc.dat", 0); // 0 for rank + DeePKS_domain::check_tensor(overlap_out, "phialpha_r.dat", 0); // 0 for rank + DeePKS_domain::check_tensor(iRmat, "iRmat.dat", 0); // 0 for rank this->compare_with_ref("vdr_precalc.dat", "vdrpre_ref.dat"); + this->compare_with_ref("phialpha_r.dat", "phialpha_r_ref.dat"); + this->compare_with_ref("iRmat.dat", "iRmat_ref.dat"); } template @@ -331,11 +318,7 @@ void test_deepks::check_edelta(std::vector& descriptor) if (PARAM.inp.deepks_equiv) { DeePKS_domain::cal_edelta_gedm_equiv(ucell.nat, - this->ld.lmaxd, - this->ld.nmaxd, - this->ld.inlmax, - this->ld.des_per_atom, - this->ld.inl2l, + this->ld.deepks_param, descriptor, this->ld.gedm, this->ld.E_delta, @@ -344,9 +327,7 @@ void test_deepks::check_edelta(std::vector& descriptor) else { DeePKS_domain::cal_edelta_gedm(ucell.nat, - this->ld.inlmax, - this->ld.des_per_atom, - this->ld.inl2l, + this->ld.deepks_param, descriptor, this->ld.pdm, this->ld.model_deepks, @@ -359,7 +340,7 @@ void test_deepks::check_edelta(std::vector& descriptor) ofs.close(); this->compare_with_ref("E_delta.dat", "E_delta_ref.dat"); - // DeePKS_domain::check_gedm(this->ld.inlmax, this->ld.inl2l, this->ld.gedm); + // DeePKS_domain::check_gedm(this->ld.deepks_param, this->ld.gedm); // this->compare_with_ref("gedm.dat", "gedm_ref.dat"); } @@ -412,10 +393,10 @@ void test_deepks::check_f_delta_and_stress_delta() Test_Deepks::GridD, ParaO, nks, + this->ld.deepks_param, kv.kvec_d, this->ld.phialpha, this->ld.gedm, - this->ld.inl_index, fvnl_dalpha, cal_stress, svnl_dalpha); diff --git a/source/source_lcao/module_deepks/test/Makefile.Objects b/source/source_lcao/module_deepks/test/Makefile.Objects index 42b0143270..31b32cef5a 100644 --- a/source/source_lcao/module_deepks/test/Makefile.Objects +++ b/source/source_lcao/module_deepks/test/Makefile.Objects @@ -57,6 +57,7 @@ read_pp_blps.o\ unitcell.o\ check_atomic_stru.o\ read_atoms.o\ +read_atoms_helper.o\ read_cell_pseudopots.o\ setup_nonlocal.o diff --git a/source/source_lcao/module_deepks/test/klist.h b/source/source_lcao/module_deepks/test/klist.h index 12e0e4d40e..7400d82c45 100644 --- a/source/source_lcao/module_deepks/test/klist.h +++ b/source/source_lcao/module_deepks/test/klist.h @@ -1,72 +1,69 @@ -///klist : adapted from klist from source_pw/module_pwdft -///deals with k point sampling +/// klist : adapted from klist from source_pw/module_pwdft +/// deals with k point sampling -#include "source_base/vector3.h" +#include "source_base/global_function.h" #include "source_base/matrix3.h" #include "source_base/memory.h" -#include "source_base/global_function.h" -#include +#include "source_base/vector3.h" + #include +#include namespace Test_Deepks { class K_Vectors { -public: - - ModuleBase::Vector3 *kvec_c; // Cartesian coordinates of k points - std::vector> kvec_d; // Direct coordinates of k points + public: + ModuleBase::Vector3* kvec_c; // Cartesian coordinates of k points + std::vector> kvec_d; // Direct coordinates of k points - double *wk; // wk, weight of k points + double* wk; // wk, weight of k points - int *isk; // distinguish spin up and down k points + int* isk; // distinguish spin up and down k points - int nkstot; // total number of k points + int nkstot; // total number of k points - int nmp[3]; // Number of Monhorst-Pack + int nmp[3]; // Number of Monhorst-Pack K_Vectors(); ~K_Vectors(); - void set( - const std::string &k_file_name, - const int& nspin, - const ModuleBase::Matrix3 &reciprocal_vec, - const ModuleBase::Matrix3 &latvec, - bool &GAMMA_ONLY_LOCAL, - std::ofstream &ofs_running, - std::ofstream &ofs_warning); + void set(const std::string& k_file_name, + const int& nspin, + const ModuleBase::Matrix3& reciprocal_vec, + const ModuleBase::Matrix3& latvec, + bool& GAMMA_ONLY_LOCAL, + std::ofstream& ofs_running, + std::ofstream& ofs_warning); -private: + private: int nspin; bool kc_done; bool kd_done; - double koffset[3]; // used only in automatic k-points. - std::string k_kword; //LiuXh add 20180619 - int k_nkstot; //LiuXh add 20180619 + double koffset[3]; // used only in automatic k-points. + std::string k_kword; // LiuXh add 20180619 + int k_nkstot; // LiuXh add 20180619 // step 1 : generate kpoints - bool read_kpoints( - const std::string &fn, - bool &GAMMA_ONLY_LOCAL, - std::ofstream &ofs_warning, - std::ofstream &ofs_running); - void Monkhorst_Pack(const int *nmp_in,const double *koffset_in,const int tipo); - double Monkhorst_Pack_formula( const int &k_type, const double &offset, - const int& n, const int &dim); + bool read_kpoints(const std::string& fn, + bool& GAMMA_ONLY_LOCAL, + std::ofstream& ofs_warning, + std::ofstream& ofs_running); + void Monkhorst_Pack(const int* nmp_in, const double* koffset_in, const int tipo); + double Monkhorst_Pack_formula(const int& k_type, const double& offset, const int& n, const int& dim); // step 2 : set both kvec and kved; normalize weight - void set_both_kvec(const ModuleBase::Matrix3 &G,const ModuleBase::Matrix3 &Rm, std::ofstream &ofs_running); - void renew(const int &kpoint_number); - void normalize_wk( const int °spin ); + void set_both_kvec(const ModuleBase::Matrix3& G, const ModuleBase::Matrix3& Rm, std::ofstream& ofs_running); + void renew(const int& kpoint_number); + void normalize_wk(const int& degspin); // step 3 : *2 or *4 kpoints. // *2 for LSDA // *4 for non-collinear - void set_kup_and_kdw(std::ofstream &ofs_running); + void set_kup_and_kdw(std::ofstream& ofs_running); // step 4 // print k lists. - void print_klists(std::ofstream &fn_running); + void print_klists(std::ofstream& fn_running); }; -} +} // namespace Test_Deepks diff --git a/source/source_lcao/module_deepks/test/klist_1.cpp b/source/source_lcao/module_deepks/test/klist_1.cpp index b4e9fdea81..709a193ece 100644 --- a/source/source_lcao/module_deepks/test/klist_1.cpp +++ b/source/source_lcao/module_deepks/test/klist_1.cpp @@ -1,605 +1,589 @@ #include "klist.h" - #include "source_io/module_parameter/parameter.h" namespace Test_Deepks { - K_Vectors::K_Vectors() - { - nspin = 0; // default spin. - kc_done = false; - kd_done = false; - - kvec_c = new ModuleBase::Vector3[1]; - kvec_d.resize(1); - - wk = nullptr; - isk = nullptr; - - nkstot = 0; - } - - K_Vectors::~K_Vectors() - { - delete[] kvec_c; - kvec_d.clear(); - delete[] wk; - delete[] isk; - } - - void K_Vectors::set( - const std::string &k_file_name, - const int& nspin_in, - const ModuleBase::Matrix3 &reciprocal_vec, - const ModuleBase::Matrix3 &latvec, - bool &GAMMA_ONLY_LOCAL, - std::ofstream &ofs_running, - std::ofstream &ofs_warning) - { - - ofs_running << "\n\n\n\n"; - ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - ofs_running << " | |" << std::endl; - ofs_running << " | Setup K-points |" << std::endl; - ofs_running << " | We setup the k-points according to input parameters. |" << std::endl; - ofs_running << " | The reduced k-points are set according to symmetry operations. |" << std::endl; - ofs_running << " | We treat the spin as another set of k-points. |" << std::endl; - ofs_running << " | |" << std::endl; - ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; - ofs_running << "\n\n\n\n"; - - ofs_running << "\n SETUP K-POINTS" << std::endl; - - // (1) set nspin, read kpoints. - this->nspin = nspin_in; - ModuleBase::GlobalFunc::OUT(ofs_running,"nspin",nspin); - - bool read_succesfully = this->read_kpoints( - k_file_name, - GAMMA_ONLY_LOCAL, - ofs_warning, - ofs_running); - if(!read_succesfully) - { - ofs_warning << "in K_Vectors::set, something wrong while reading KPOINTS." << std::endl; - exit(1); - } - - // (2) - this->set_both_kvec(reciprocal_vec, latvec, ofs_running); - - int deg = 0; - if(PARAM.inp.nspin == 1) - { - deg = 2; - } - else if(PARAM.inp.nspin == 2||PARAM.inp.nspin==4) - { - deg = 1; - } - else - { - ofs_warning << "In K_Vectors::set, Only available for nspin = 1 or 2 or 4" << std::endl; - exit(1); - } - this->normalize_wk(deg); - - // It's very important in parallel case, - // firstly do the mpi_k() and then - // do set_kup_and_kdw() - - this->set_kup_and_kdw(ofs_running); - - this->print_klists(ofs_running); - //std::cout << " NUMBER OF K-POINTS : " << nkstot << std::endl; - - return; - } - - void K_Vectors::renew(const int &kpoint_number) - { - delete[] kvec_c; - delete[] wk; - delete[] isk; - - kvec_c = new ModuleBase::Vector3[kpoint_number]; - kvec_d.resize(kpoint_number); - wk = new double[kpoint_number]; - isk = new int[kpoint_number]; - - ModuleBase::Memory::record("KV::kvec_c",sizeof(double) * kpoint_number*3); - ModuleBase::Memory::record("KV::kvec_d",sizeof(double) * kpoint_number*3); - ModuleBase::Memory::record("KV::wk",sizeof(double) * kpoint_number*3); - ModuleBase::Memory::record("KV::isk",sizeof(int) * kpoint_number*3); - - return; - } - - bool K_Vectors::read_kpoints(const std::string &fn, bool &GAMMA_ONLY_LOCAL, std::ofstream &ofs_warning, std::ofstream &ofs_running) - { - - std::ifstream ifk(fn.c_str()); - ifk >> std::setiosflags(std::ios::uppercase); - - ifk.clear(); - ifk.seekg(0); - - std::string word; - std::string kword; - - int ierr = 0; - - ifk.rdstate(); - - while (ifk.good()) - { - ifk >> word; - ifk.ignore(150, '\n'); //LiuXh add 20180416, fix bug in k-point file when the first line with comments - if (word == "K_POINTS" || word == "KPOINTS" || word == "K" ) - { - ierr = 1; - break; - } - - ifk.rdstate(); - } - - if (ierr == 0) - { - ofs_warning << " symbol K_POINTS not found." << std::endl; - return 0; - } - - //input k-points are in 2pi/a units - ModuleBase::GlobalFunc::READ_VALUE(ifk, nkstot); - - //std::cout << " nkstot = " << nkstot << std::endl; - ModuleBase::GlobalFunc::READ_VALUE(ifk, kword); - - // mohan update 2021-02-22 - int max_kpoints = 100000; - if (nkstot > 100000) - { - ofs_warning << " nkstot > MAX_KPOINTS" << std::endl; - return 0; - } - - int k_type = 0; - if (nkstot == 0) // nkstot==0, use monkhorst_pack. add by dwan - { - if (kword == "Gamma") - { - k_type = 0; - ModuleBase::GlobalFunc::OUT(ofs_running,"Input type of k points","Monkhorst-Pack(Gamma)"); - } - else if (kword == "Monkhorst-Pack" || kword == "MP" || kword == "mp") - { - k_type = 1; - ModuleBase::GlobalFunc::OUT(ofs_running,"Input type of k points","Monkhorst-Pack"); - } - else - { - ofs_warning << " Error: neither Gamma nor Monkhorst-Pack." << std::endl; - return 0; - } - - ifk >> nmp[0] >> nmp[1] >> nmp[2]; - - ifk >> koffset[0] >> koffset[1] >> koffset[2]; - this->Monkhorst_Pack(nmp, koffset, k_type); - } - else if (nkstot > 0) - { - if (kword == "Cartesian" || kword == "C") - { - this->renew(nkstot * nspin);//mohan fix bug 2009-09-01 - for (int i = 0;i < nkstot;i++) - { - ifk >> kvec_c[i].x >> kvec_c[i].y >> kvec_c[i].z; - ModuleBase::GlobalFunc::READ_VALUE(ifk, wk[i]); - } - - this->kc_done = true; - } - else if (kword == "Direct" || kword == "D") - { - this->renew(nkstot * nspin);//mohan fix bug 2009-09-01 - for (int i = 0;i < nkstot;i++) - { - ifk >> kvec_d[i].x >> kvec_d[i].y >> kvec_d[i].z; - ModuleBase::GlobalFunc::READ_VALUE(ifk, wk[i]); - } - this->kd_done = true; - } - else if (kword == "Line_Cartesian" ) - { - //std::cout << " kword = " << kword << std::endl; - - // how many special points. - int nks_special = this->nkstot; - //std::cout << " nks_special = " << nks_special << std::endl; - - //------------------------------------------ - // number of points to the next k points - //------------------------------------------ - int* nkl = new int[nks_special]; - - //------------------------------------------ - // cartesian coordinates of special points. - //------------------------------------------ - double *ksx = new double[nks_special]; - double *ksy = new double[nks_special]; - double *ksz = new double[nks_special]; - std::vector kposx; - std::vector kposy; - std::vector kposz; - ModuleBase::GlobalFunc::ZEROS(nkl, nks_special); - - //recalculate nkstot. - nkstot = 0; - for(int iks=0; iks> ksx[iks]; - ifk >> ksy[iks]; - ifk >> ksz[iks]; - ModuleBase::GlobalFunc::READ_VALUE( ifk, nkl[iks] ); - //std::cout << " nkl[" << iks << "]=" << nkl[iks] << std::endl; - assert(nkl[iks] >= 0); - nkstot += nkl[iks]; - } - assert( nkl[nks_special-1] == 1); - - //std::cout << " nkstot = " << nkstot << std::endl; - this->renew(nkstot * nspin);//mohan fix bug 2009-09-01 - - int count = 0; - for(int iks=1; ikskc_done = true; - - } - - else if (kword == "Line_Direct" || kword == "L" || kword == "Line" ) - { - //std::cout << " kword = " << kword << std::endl; - - // how many special points. - int nks_special = this->nkstot; - //std::cout << " nks_special = " << nks_special << std::endl; - - //------------------------------------------ - // number of points to the next k points - //------------------------------------------ - int* nkl = new int[nks_special]; - - //------------------------------------------ - // cartesian coordinates of special points. - //------------------------------------------ - double *ksx = new double[nks_special]; - double *ksy = new double[nks_special]; - double *ksz = new double[nks_special]; - std::vector kposx; - std::vector kposy; - std::vector kposz; - ModuleBase::GlobalFunc::ZEROS(nkl, nks_special); - - //recalculate nkstot. - nkstot = 0; - for(int iks=0; iks> ksx[iks]; - ifk >> ksy[iks]; - ifk >> ksz[iks]; - ModuleBase::GlobalFunc::READ_VALUE( ifk, nkl[iks] ); - //std::cout << " nkl[" << iks << "]=" << nkl[iks] << std::endl; - assert(nkl[iks] >= 0); - nkstot += nkl[iks]; - } - assert( nkl[nks_special-1] == 1); - - //std::cout << " nkstot = " << nkstot << std::endl; - this->renew(nkstot * nspin);//mohan fix bug 2009-09-01 - - int count = 0; - for(int iks=1; ikskd_done = true; - - } - - else - { - ofs_warning << " Error : neither Cartesian nor Direct kpoint." << std::endl; - return 0; - } - } - - ModuleBase::GlobalFunc::OUT(ofs_running,"nkstot",nkstot); - return 1; - } // END SUBROUTINE - - - double K_Vectors::Monkhorst_Pack_formula( const int &k_type, const double &offset, - const int& n, const int &dim) - { - double coordinate; - if (k_type==1) coordinate = (offset + 2.0 * (double)n - (double)dim - 1.0) / (2.0 * (double)dim); - else coordinate = (offset + (double)n - 1.0) / (double)dim; - - return coordinate; - } - - //add by dwan - void K_Vectors::Monkhorst_Pack(const int *nmp_in, const double *koffset_in, const int k_type) - { - const int mpnx = nmp_in[0]; - const int mpny = nmp_in[1]; - const int mpnz = nmp_in[2]; - - this->nkstot = mpnx * mpny * mpnz; - // only can renew after nkstot is estimated. - this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 - for (int x = 1;x <= mpnx;x++) - { - double v1 = Monkhorst_Pack_formula( k_type, koffset_in[0], x, mpnx); - if( std::abs(v1) < 1.0e-10 ) v1 = 0.0; //mohan update 2012-06-10 - for (int y = 1;y <= mpny;y++) - { - double v2 = Monkhorst_Pack_formula( k_type, koffset_in[1], y, mpny); - if( std::abs(v2) < 1.0e-10 ) v2 = 0.0; - for (int z = 1;z <= mpnz;z++) - { - double v3 = Monkhorst_Pack_formula( k_type, koffset_in[2], z, mpnz); - if( std::abs(v3) < 1.0e-10 ) v3 = 0.0; - // index of nks kpoint - const int i = mpnx * mpny * (z - 1) + mpnx * (y - 1) + (x - 1); - kvec_d[i].set(v1, v2, v3); - } - } - } - - const double weight = 1.0 / static_cast(nkstot); - for (int ik=0; ikkd_done = true; - - return; - } - - void K_Vectors::set_both_kvec(const ModuleBase::Matrix3 &G, const ModuleBase::Matrix3 &R, std::ofstream &ofs_running) - { - // set cartesian k vectors. - if (!kc_done && kd_done) - { - for (int i = 0;i < nkstot;i++) - { - //wrong!! kvec_c[i] = G * kvec_d[i]; - // mohan fixed bug 2010-1-10 - if( std::abs(kvec_d[i].x) < 1.0e-10 ) kvec_d[i].x = 0.0; - if( std::abs(kvec_d[i].y) < 1.0e-10 ) kvec_d[i].y = 0.0; - if( std::abs(kvec_d[i].z) < 1.0e-10 ) kvec_d[i].z = 0.0; - - // mohan add2012-06-10 - if( std::abs(kvec_c[i].x) < 1.0e-10 ) kvec_c[i].x = 0.0; - if( std::abs(kvec_c[i].y) < 1.0e-10 ) kvec_c[i].y = 0.0; - if( std::abs(kvec_c[i].z) < 1.0e-10 ) kvec_c[i].z = 0.0; - } - kc_done = true; - } - - // set direct k vectors - else if (kc_done && !kd_done) - { - ModuleBase::Matrix3 RT = R.Transpose(); - for (int i = 0;i < nkstot;i++) - { - // std::cout << " ik=" << i - // << " kvec.x=" << kvec_c[i].x - // << " kvec.y=" << kvec_c[i].y - // << " kvec.z=" << kvec_c[i].z << std::endl; - //wrong! kvec_d[i] = RT * kvec_c[i]; - // mohan fixed bug 2011-03-07 - kvec_d[i] = kvec_c[i] * RT; - } - kd_done = true; - } - - ofs_running << "\n " << std::setw(8) << "KPOINTS" - << std::setw(20) << "DIRECT_X" - << std::setw(20) << "DIRECT_Y" - << std::setw(20) << "DIRECT_Z" - << std::setw(20) << "WEIGHT" << std::endl; - - for(int i=0; ikvec_d[i].x - << std::setw(20) << this->kvec_d[i].y - << std::setw(20) << this->kvec_d[i].z - << std::setw(20) << this->wk[i] << std::endl; - } - - return; - } - - - void K_Vectors::normalize_wk(const int °spin) - { - double sum = 0.0; - - for (int ik = 0;ik < nkstot;ik++) - { - sum += this->wk[ik]; - } - assert(sum>0.0); - - for (int ik = 0;ik < nkstot;ik++) - { - this->wk[ik] /= sum; - } - - for (int ik = 0;ik < nkstot;ik++) - { - this->wk[ik] *= degspin; - } - - return; - } - - //---------------------------------------------------------- - // This routine sets the k vectors for the up and down spin - //---------------------------------------------------------- - // from set_kup_and_kdw.f90 - void K_Vectors::set_kup_and_kdw(std::ofstream &ofs_running) - { - //========================================================================= - // on output: the number of points is doubled and xk and wk in the - // first (nks/2) positions correspond to up spin - // those in the second (nks/2) ones correspond to down spin - //========================================================================= - switch (nspin) - { - case 1: - - for (int ik = 0; ik < nkstot; ik++) - { - this->isk[ik] = 0; - } - - break; - - case 2: - - for (int ik = 0; ik < nkstot; ik++) - { - this->kvec_c[ik+nkstot] = kvec_c[ik]; - this->kvec_d[ik+nkstot] = kvec_d[ik]; - this->wk[ik+nkstot] = wk[ik]; - this->isk[ik] = 0; - this->isk[ik+nkstot] = 1; - } - - this->nkstot *= 2; - - ModuleBase::GlobalFunc::OUT(ofs_running,"nkstot(nspin=2)",nkstot); - break; - case 4: - - for (int ik = 0; ik < nkstot; ik++) - { - this->isk[ik] = 0; - } - - break; - } - - return; - } // end subroutine set_kup_and_kdw - - - void K_Vectors::print_klists(std::ofstream &ofs_running) - { - ofs_running << "\n " << std::setw(8) << "KPOINTS" - << std::setw(20) << "CARTESIAN_X" - << std::setw(20) << "CARTESIAN_Y" - << std::setw(20) << "CARTESIAN_Z" - << std::setw(20) << "WEIGHT" << std::endl; - for(int i=0; ikvec_c[i].x - << std::setw(20) << this->kvec_c[i].y - << std::setw(20) << this->kvec_c[i].z - << std::setw(20) << this->wk[i] << std::endl; - } - - ofs_running << "\n " << std::setw(8) << "KPOINTS" - << std::setw(20) << "DIRECT_X" - << std::setw(20) << "DIRECT_Y" - << std::setw(20) << "DIRECT_Z" - << std::setw(20) << "WEIGHT" << std::endl; - for(int i=0; ikvec_d[i].x - << std::setw(20) << this->kvec_d[i].y - << std::setw(20) << this->kvec_d[i].z - << std::setw(20) << this->wk[i] << std::endl; - } - - return; - } +K_Vectors::K_Vectors() +{ + nspin = 0; // default spin. + kc_done = false; + kd_done = false; + + kvec_c = new ModuleBase::Vector3[1]; + kvec_d.resize(1); + + wk = nullptr; + isk = nullptr; + + nkstot = 0; +} + +K_Vectors::~K_Vectors() +{ + delete[] kvec_c; + kvec_d.clear(); + delete[] wk; + delete[] isk; +} + +void K_Vectors::set(const std::string& k_file_name, + const int& nspin_in, + const ModuleBase::Matrix3& reciprocal_vec, + const ModuleBase::Matrix3& latvec, + bool& GAMMA_ONLY_LOCAL, + std::ofstream& ofs_running, + std::ofstream& ofs_warning) +{ + ofs_running << "\n\n\n\n"; + ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + ofs_running << " | |" << std::endl; + ofs_running << " | Setup K-points |" << std::endl; + ofs_running << " | We setup the k-points according to input parameters. |" << std::endl; + ofs_running << " | The reduced k-points are set according to symmetry operations. |" << std::endl; + ofs_running << " | We treat the spin as another set of k-points. |" << std::endl; + ofs_running << " | |" << std::endl; + ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; + ofs_running << "\n\n\n\n"; + + ofs_running << "\n SETUP K-POINTS" << std::endl; + + // (1) set nspin, read kpoints. + this->nspin = nspin_in; + ModuleBase::GlobalFunc::OUT(ofs_running, "nspin", nspin); + + bool read_succesfully = this->read_kpoints(k_file_name, GAMMA_ONLY_LOCAL, ofs_warning, ofs_running); + if (!read_succesfully) + { + ofs_warning << "in K_Vectors::set, something wrong while reading KPOINTS." << std::endl; + exit(1); + } + + // (2) + this->set_both_kvec(reciprocal_vec, latvec, ofs_running); + + int deg = 0; + if (PARAM.inp.nspin == 1) + { + deg = 2; + } + else if (PARAM.inp.nspin == 2 || PARAM.inp.nspin == 4) + { + deg = 1; + } + else + { + ofs_warning << "In K_Vectors::set, Only available for nspin = 1 or 2 or 4" << std::endl; + exit(1); + } + this->normalize_wk(deg); + + // It's very important in parallel case, + // firstly do the mpi_k() and then + // do set_kup_and_kdw() + + this->set_kup_and_kdw(ofs_running); + + this->print_klists(ofs_running); + // std::cout << " NUMBER OF K-POINTS : " << nkstot << std::endl; + + return; } + +void K_Vectors::renew(const int& kpoint_number) +{ + delete[] kvec_c; + delete[] wk; + delete[] isk; + + kvec_c = new ModuleBase::Vector3[kpoint_number]; + kvec_d.resize(kpoint_number); + wk = new double[kpoint_number]; + isk = new int[kpoint_number]; + + ModuleBase::Memory::record("KV::kvec_c", sizeof(double) * kpoint_number * 3); + ModuleBase::Memory::record("KV::kvec_d", sizeof(double) * kpoint_number * 3); + ModuleBase::Memory::record("KV::wk", sizeof(double) * kpoint_number * 3); + ModuleBase::Memory::record("KV::isk", sizeof(int) * kpoint_number * 3); + + return; +} + +bool K_Vectors::read_kpoints(const std::string& fn, + bool& GAMMA_ONLY_LOCAL, + std::ofstream& ofs_warning, + std::ofstream& ofs_running) +{ + + std::ifstream ifk(fn.c_str()); + ifk >> std::setiosflags(std::ios::uppercase); + + ifk.clear(); + ifk.seekg(0); + + std::string word; + std::string kword; + + int ierr = 0; + + ifk.rdstate(); + + while (ifk.good()) + { + ifk >> word; + ifk.ignore(150, '\n'); // LiuXh add 20180416, fix bug in k-point file when the first line with comments + if (word == "K_POINTS" || word == "KPOINTS" || word == "K") + { + ierr = 1; + break; + } + + ifk.rdstate(); + } + + if (ierr == 0) + { + ofs_warning << " symbol K_POINTS not found." << std::endl; + return 0; + } + + // input k-points are in 2pi/a units + ModuleBase::GlobalFunc::READ_VALUE(ifk, nkstot); + + // std::cout << " nkstot = " << nkstot << std::endl; + ModuleBase::GlobalFunc::READ_VALUE(ifk, kword); + + // mohan update 2021-02-22 + int max_kpoints = 100000; + if (nkstot > 100000) + { + ofs_warning << " nkstot > MAX_KPOINTS" << std::endl; + return 0; + } + + int k_type = 0; + if (nkstot == 0) // nkstot==0, use monkhorst_pack. add by dwan + { + if (kword == "Gamma") + { + k_type = 0; + ModuleBase::GlobalFunc::OUT(ofs_running, "Input type of k points", "Monkhorst-Pack(Gamma)"); + } + else if (kword == "Monkhorst-Pack" || kword == "MP" || kword == "mp") + { + k_type = 1; + ModuleBase::GlobalFunc::OUT(ofs_running, "Input type of k points", "Monkhorst-Pack"); + } + else + { + ofs_warning << " Error: neither Gamma nor Monkhorst-Pack." << std::endl; + return 0; + } + + ifk >> nmp[0] >> nmp[1] >> nmp[2]; + + ifk >> koffset[0] >> koffset[1] >> koffset[2]; + this->Monkhorst_Pack(nmp, koffset, k_type); + } + else if (nkstot > 0) + { + if (kword == "Cartesian" || kword == "C") + { + this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 + for (int i = 0; i < nkstot; i++) + { + ifk >> kvec_c[i].x >> kvec_c[i].y >> kvec_c[i].z; + ModuleBase::GlobalFunc::READ_VALUE(ifk, wk[i]); + } + + this->kc_done = true; + } + else if (kword == "Direct" || kword == "D") + { + this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 + for (int i = 0; i < nkstot; i++) + { + ifk >> kvec_d[i].x >> kvec_d[i].y >> kvec_d[i].z; + ModuleBase::GlobalFunc::READ_VALUE(ifk, wk[i]); + } + this->kd_done = true; + } + else if (kword == "Line_Cartesian") + { + // std::cout << " kword = " << kword << std::endl; + + // how many special points. + int nks_special = this->nkstot; + // std::cout << " nks_special = " << nks_special << std::endl; + + //------------------------------------------ + // number of points to the next k points + //------------------------------------------ + int* nkl = new int[nks_special]; + + //------------------------------------------ + // cartesian coordinates of special points. + //------------------------------------------ + double* ksx = new double[nks_special]; + double* ksy = new double[nks_special]; + double* ksz = new double[nks_special]; + std::vector kposx; + std::vector kposy; + std::vector kposz; + ModuleBase::GlobalFunc::ZEROS(nkl, nks_special); + + // recalculate nkstot. + nkstot = 0; + for (int iks = 0; iks < nks_special; iks++) + { + ifk >> ksx[iks]; + ifk >> ksy[iks]; + ifk >> ksz[iks]; + ModuleBase::GlobalFunc::READ_VALUE(ifk, nkl[iks]); + // std::cout << " nkl[" << iks << "]=" << nkl[iks] << std::endl; + assert(nkl[iks] >= 0); + nkstot += nkl[iks]; + } + assert(nkl[nks_special - 1] == 1); + + // std::cout << " nkstot = " << nkstot << std::endl; + this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 + + int count = 0; + for (int iks = 1; iks < nks_special; iks++) + { + double dx = (ksx[iks] - ksx[iks - 1]) / nkl[iks - 1]; + double dy = (ksy[iks] - ksy[iks - 1]) / nkl[iks - 1]; + double dz = (ksz[iks] - ksz[iks - 1]) / nkl[iks - 1]; + // GlobalV::ofs_running << " dx=" << dx << " dy=" << dy << " dz=" << dz << std::endl; + for (int is = 0; is < nkl[iks - 1]; is++) + { + kvec_c[count].x = ksx[iks - 1] + is * dx; + kvec_c[count].y = ksy[iks - 1] + is * dy; + kvec_c[count].z = ksz[iks - 1] + is * dz; + ++count; + } + } + + // deal with the last special k point. + kvec_c[count].x = ksx[nks_special - 1]; + kvec_c[count].y = ksy[nks_special - 1]; + kvec_c[count].z = ksz[nks_special - 1]; + ++count; + + // std::cout << " count = " << count << std::endl; + assert(count == nkstot); + + for (int ik = 0; ik < nkstot; ik++) + { + wk[ik] = 1.0; + } + + ofs_warning << " Error : nkstot == -1, not implemented yet." << std::endl; + + delete[] nkl; + delete[] ksx; + delete[] ksy; + delete[] ksz; + + this->kc_done = true; + } + + else if (kword == "Line_Direct" || kword == "L" || kword == "Line") + { + // std::cout << " kword = " << kword << std::endl; + + // how many special points. + int nks_special = this->nkstot; + // std::cout << " nks_special = " << nks_special << std::endl; + + //------------------------------------------ + // number of points to the next k points + //------------------------------------------ + int* nkl = new int[nks_special]; + + //------------------------------------------ + // cartesian coordinates of special points. + //------------------------------------------ + double* ksx = new double[nks_special]; + double* ksy = new double[nks_special]; + double* ksz = new double[nks_special]; + std::vector kposx; + std::vector kposy; + std::vector kposz; + ModuleBase::GlobalFunc::ZEROS(nkl, nks_special); + + // recalculate nkstot. + nkstot = 0; + for (int iks = 0; iks < nks_special; iks++) + { + ifk >> ksx[iks]; + ifk >> ksy[iks]; + ifk >> ksz[iks]; + ModuleBase::GlobalFunc::READ_VALUE(ifk, nkl[iks]); + // std::cout << " nkl[" << iks << "]=" << nkl[iks] << std::endl; + assert(nkl[iks] >= 0); + nkstot += nkl[iks]; + } + assert(nkl[nks_special - 1] == 1); + + // std::cout << " nkstot = " << nkstot << std::endl; + this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 + + int count = 0; + for (int iks = 1; iks < nks_special; iks++) + { + double dx = (ksx[iks] - ksx[iks - 1]) / nkl[iks - 1]; + double dy = (ksy[iks] - ksy[iks - 1]) / nkl[iks - 1]; + double dz = (ksz[iks] - ksz[iks - 1]) / nkl[iks - 1]; + // GlobalV::ofs_running << " dx=" << dx << " dy=" << dy << " dz=" << dz << std::endl; + for (int is = 0; is < nkl[iks - 1]; is++) + { + kvec_d[count].x = ksx[iks - 1] + is * dx; + kvec_d[count].y = ksy[iks - 1] + is * dy; + kvec_d[count].z = ksz[iks - 1] + is * dz; + ++count; + } + } + + // deal with the last special k point. + kvec_d[count].x = ksx[nks_special - 1]; + kvec_d[count].y = ksy[nks_special - 1]; + kvec_d[count].z = ksz[nks_special - 1]; + ++count; + + // std::cout << " count = " << count << std::endl; + assert(count == nkstot); + + for (int ik = 0; ik < nkstot; ik++) + { + wk[ik] = 1.0; + } + + ofs_warning << " Error : nkstot == -1, not implemented yet." << std::endl; + + delete[] nkl; + delete[] ksx; + delete[] ksy; + delete[] ksz; + + this->kd_done = true; + } + + else + { + ofs_warning << " Error : neither Cartesian nor Direct kpoint." << std::endl; + return 0; + } + } + + ModuleBase::GlobalFunc::OUT(ofs_running, "nkstot", nkstot); + return 1; +} // END SUBROUTINE + +double K_Vectors::Monkhorst_Pack_formula(const int& k_type, const double& offset, const int& n, const int& dim) +{ + double coordinate; + if (k_type == 1) + coordinate = (offset + 2.0 * (double)n - (double)dim - 1.0) / (2.0 * (double)dim); + else + coordinate = (offset + (double)n - 1.0) / (double)dim; + + return coordinate; +} + +// add by dwan +void K_Vectors::Monkhorst_Pack(const int* nmp_in, const double* koffset_in, const int k_type) +{ + const int mpnx = nmp_in[0]; + const int mpny = nmp_in[1]; + const int mpnz = nmp_in[2]; + + this->nkstot = mpnx * mpny * mpnz; + // only can renew after nkstot is estimated. + this->renew(nkstot * nspin); // mohan fix bug 2009-09-01 + for (int x = 1; x <= mpnx; x++) + { + double v1 = Monkhorst_Pack_formula(k_type, koffset_in[0], x, mpnx); + if (std::abs(v1) < 1.0e-10) + v1 = 0.0; // mohan update 2012-06-10 + for (int y = 1; y <= mpny; y++) + { + double v2 = Monkhorst_Pack_formula(k_type, koffset_in[1], y, mpny); + if (std::abs(v2) < 1.0e-10) + v2 = 0.0; + for (int z = 1; z <= mpnz; z++) + { + double v3 = Monkhorst_Pack_formula(k_type, koffset_in[2], z, mpnz); + if (std::abs(v3) < 1.0e-10) + v3 = 0.0; + // index of nks kpoint + const int i = mpnx * mpny * (z - 1) + mpnx * (y - 1) + (x - 1); + kvec_d[i].set(v1, v2, v3); + } + } + } + + const double weight = 1.0 / static_cast(nkstot); + for (int ik = 0; ik < nkstot; ik++) + { + wk[ik] = weight; + } + this->kd_done = true; + + return; +} + +void K_Vectors::set_both_kvec(const ModuleBase::Matrix3& G, const ModuleBase::Matrix3& R, std::ofstream& ofs_running) +{ + // set cartesian k vectors. + if (!kc_done && kd_done) + { + for (int i = 0; i < nkstot; i++) + { + // wrong!! kvec_c[i] = G * kvec_d[i]; + // mohan fixed bug 2010-1-10 + if (std::abs(kvec_d[i].x) < 1.0e-10) + kvec_d[i].x = 0.0; + if (std::abs(kvec_d[i].y) < 1.0e-10) + kvec_d[i].y = 0.0; + if (std::abs(kvec_d[i].z) < 1.0e-10) + kvec_d[i].z = 0.0; + + // mohan add2012-06-10 + if (std::abs(kvec_c[i].x) < 1.0e-10) + kvec_c[i].x = 0.0; + if (std::abs(kvec_c[i].y) < 1.0e-10) + kvec_c[i].y = 0.0; + if (std::abs(kvec_c[i].z) < 1.0e-10) + kvec_c[i].z = 0.0; + } + kc_done = true; + } + + // set direct k vectors + else if (kc_done && !kd_done) + { + ModuleBase::Matrix3 RT = R.Transpose(); + for (int i = 0; i < nkstot; i++) + { + // std::cout << " ik=" << i + // << " kvec.x=" << kvec_c[i].x + // << " kvec.y=" << kvec_c[i].y + // << " kvec.z=" << kvec_c[i].z << std::endl; + // wrong! kvec_d[i] = RT * kvec_c[i]; + // mohan fixed bug 2011-03-07 + kvec_d[i] = kvec_c[i] * RT; + } + kd_done = true; + } + + ofs_running << "\n " << std::setw(8) << "KPOINTS" << std::setw(20) << "DIRECT_X" << std::setw(20) << "DIRECT_Y" + << std::setw(20) << "DIRECT_Z" << std::setw(20) << "WEIGHT" << std::endl; + + for (int i = 0; i < nkstot; i++) + { + ofs_running << " " << std::setw(8) << i + 1 << std::setw(20) << this->kvec_d[i].x << std::setw(20) + << this->kvec_d[i].y << std::setw(20) << this->kvec_d[i].z << std::setw(20) << this->wk[i] + << std::endl; + } + + return; +} + +void K_Vectors::normalize_wk(const int& degspin) +{ + double sum = 0.0; + + for (int ik = 0; ik < nkstot; ik++) + { + sum += this->wk[ik]; + } + assert(sum > 0.0); + + for (int ik = 0; ik < nkstot; ik++) + { + this->wk[ik] /= sum; + } + + for (int ik = 0; ik < nkstot; ik++) + { + this->wk[ik] *= degspin; + } + + return; +} + +//---------------------------------------------------------- +// This routine sets the k vectors for the up and down spin +//---------------------------------------------------------- +// from set_kup_and_kdw.f90 +void K_Vectors::set_kup_and_kdw(std::ofstream& ofs_running) +{ + //========================================================================= + // on output: the number of points is doubled and xk and wk in the + // first (nks/2) positions correspond to up spin + // those in the second (nks/2) ones correspond to down spin + //========================================================================= + switch (nspin) + { + case 1: + + for (int ik = 0; ik < nkstot; ik++) + { + this->isk[ik] = 0; + } + + break; + + case 2: + + for (int ik = 0; ik < nkstot; ik++) + { + this->kvec_c[ik + nkstot] = kvec_c[ik]; + this->kvec_d[ik + nkstot] = kvec_d[ik]; + this->wk[ik + nkstot] = wk[ik]; + this->isk[ik] = 0; + this->isk[ik + nkstot] = 1; + } + + this->nkstot *= 2; + + ModuleBase::GlobalFunc::OUT(ofs_running, "nkstot(nspin=2)", nkstot); + break; + case 4: + + for (int ik = 0; ik < nkstot; ik++) + { + this->isk[ik] = 0; + } + + break; + } + + return; +} // end subroutine set_kup_and_kdw + +void K_Vectors::print_klists(std::ofstream& ofs_running) +{ + ofs_running << "\n " << std::setw(8) << "KPOINTS" << std::setw(20) << "CARTESIAN_X" << std::setw(20) + << "CARTESIAN_Y" << std::setw(20) << "CARTESIAN_Z" << std::setw(20) << "WEIGHT" << std::endl; + for (int i = 0; i < nkstot; i++) + { + ofs_running << " " << std::setw(8) << i + 1 << std::setw(20) << this->kvec_c[i].x << std::setw(20) + << this->kvec_c[i].y << std::setw(20) << this->kvec_c[i].z << std::setw(20) << this->wk[i] + << std::endl; + } + + ofs_running << "\n " << std::setw(8) << "KPOINTS" << std::setw(20) << "DIRECT_X" << std::setw(20) << "DIRECT_Y" + << std::setw(20) << "DIRECT_Z" << std::setw(20) << "WEIGHT" << std::endl; + for (int i = 0; i < nkstot; i++) + { + ofs_running << " " << std::setw(8) << i + 1 << std::setw(20) << this->kvec_d[i].x << std::setw(20) + << this->kvec_d[i].y << std::setw(20) << this->kvec_d[i].z << std::setw(20) << this->wk[i] + << std::endl; + } + + return; +} + +} // namespace Test_Deepks diff --git a/source/source_lcao/module_deepks/test/mock_tdinfo.cpp b/source/source_lcao/module_deepks/test/mock_tdinfo.cpp new file mode 100644 index 0000000000..5c1af5ed8f --- /dev/null +++ b/source/source_lcao/module_deepks/test/mock_tdinfo.cpp @@ -0,0 +1,17 @@ +#include "source_base/vector3.h" +#include "source_cell/unitcell.h" +// mock of TD_info +class TD_info { +public: + TD_info() {} + ~TD_info() {} + const UnitCell* get_ucell() + { + return nullptr; + } + static ModuleBase::Vector3 cart_At; + static TD_info* td_vel_op; +}; +TD_info td_info; +TD_info* TD_info::td_vel_op = &td_info; +ModuleBase::Vector3 TD_info::cart_At(0.0, 0.0, 0.0); \ No newline at end of file diff --git a/source/source_lcao/module_deepks/test/parallel_orbitals.h b/source/source_lcao/module_deepks/test/parallel_orbitals.h index b9371d9a23..5445ff87ab 100644 --- a/source/source_lcao/module_deepks/test/parallel_orbitals.h +++ b/source/source_lcao/module_deepks/test/parallel_orbitals.h @@ -1,5 +1,5 @@ -///adapted from parallel_orbitals from source_basis/module_ao -///deals with the parallelization of atomic basis +/// adapted from parallel_orbitals from source_basis/module_ao +/// deals with the parallelization of atomic basis #include "source_base/global_function.h" #include "source_base/global_variable.h" @@ -7,19 +7,18 @@ namespace Test_Deepks { - class Parallel_Orbitals - { - public: - - Parallel_Orbitals(); - ~Parallel_Orbitals(); +class Parallel_Orbitals +{ + public: + Parallel_Orbitals(); + ~Parallel_Orbitals(); - int* global2local_row; - int* global2local_col; - void set_global2local(void); + int* global2local_row; + int* global2local_col; + void set_global2local(void); - int ncol; - int nrow; - int nloc; - }; -} + int ncol; + int nrow; + int nloc; +}; +} // namespace Test_Deepks diff --git a/source/source_lcao/module_deltaspin/cal_mw.cpp b/source/source_lcao/module_deltaspin/cal_mw.cpp index 7f6a49e207..becdd82e7c 100644 --- a/source/source_lcao/module_deltaspin/cal_mw.cpp +++ b/source/source_lcao/module_deltaspin/cal_mw.cpp @@ -19,14 +19,16 @@ void spinconstrain::SpinConstrain>::cal_mi_lcao(const int& ModuleBase::timer::tick("spinconstrain::SpinConstrain", "cal_mi_lcao"); // calculate MW from lambda in real space projection method this->zero_Mi(); - const hamilt::HContainer* dmr - = static_cast>*>(this->pelec)->get_DM()->get_DMR_pointer(1); + const hamilt::HContainer* dmr = this->dm_->get_DMR_pointer(1); std::vector moments; if(PARAM.inp.nspin==2) { - static_cast>*>(this->pelec)->get_DM()->switch_dmr(2); + this->dm_->switch_dmr(2); + moments = static_cast, double>>*>(this->p_operator)->cal_moment(dmr, this->get_constrain()); - static_cast>*>(this->pelec)->get_DM()->switch_dmr(0); + + this->dm_->switch_dmr(0); + for(int iat=0;iatMi_.size();iat++) { this->Mi_[iat].x = 0.0; @@ -167,4 +169,4 @@ void spinconstrain::SpinConstrain::set_operator( hamilt::Operator* op_in) { this->p_operator = op_in; -} \ No newline at end of file +} diff --git a/source/source_lcao/module_deltaspin/cal_mw_from_lambda.cpp b/source/source_lcao/module_deltaspin/cal_mw_from_lambda.cpp index 3a83289cb7..e8bb81db23 100644 --- a/source/source_lcao/module_deltaspin/cal_mw_from_lambda.cpp +++ b/source/source_lcao/module_deltaspin/cal_mw_from_lambda.cpp @@ -128,7 +128,9 @@ void spinconstrain::SpinConstrain>::calculate_delta_hcc(std } template <> -void spinconstrain::SpinConstrain>::cal_mw_from_lambda(int i_step, const ModuleBase::Vector3* delta_lambda) +void spinconstrain::SpinConstrain>::cal_mw_from_lambda( + int i_step, + const ModuleBase::Vector3* delta_lambda) { ModuleBase::TITLE("spinconstrain::SpinConstrain", "cal_mw_from_lambda"); ModuleBase::timer::tick("spinconstrain::SpinConstrain", "cal_mw_from_lambda"); @@ -151,7 +153,8 @@ void spinconstrain::SpinConstrain>::cal_mw_from_lambda(int ->update_lambda(); } // diagonalization without update charge - hsolver_t.solve(hamilt_t, psi_t[0], this->pelec, true); + // mohan add two parameters charge and nspin, 2025-10-24 + hsolver_t.solve(hamilt_t, psi_t[0], this->pelec, *this->dm_, *this->pelec->charge, PARAM.inp.nspin, true); elecstate::calculate_weights(this->pelec->ekb, this->pelec->wg, this->pelec->klist, @@ -160,10 +163,11 @@ void spinconstrain::SpinConstrain>::cal_mw_from_lambda(int this->pelec->nelec_spin, this->pelec->skip_weights); elecstate::calEBand(this->pelec->ekb,this->pelec->wg,this->pelec->f_en); - elecstate::ElecStateLCAO>* pelec_lcao - = dynamic_cast>*>(this->pelec); - elecstate::cal_dm_psi(this->ParaV, pelec_lcao->wg, *psi_t, *(pelec_lcao->get_DM())); - pelec_lcao->get_DM()->cal_DMR(); + + elecstate::cal_dm_psi(this->ParaV, this->pelec->wg, *psi_t, *this->dm_); + + this->dm_->cal_DMR(); + this->cal_mi_lcao(i_step); } else @@ -430,27 +434,27 @@ void spinconstrain::SpinConstrain>::update_psi_charge(const if(pw_solve) { - hsolver::HSolverPW, base_device::DEVICE_CPU> hsolver_pw_obj(this->pw_wfc_, - PARAM.inp.calculation, - PARAM.inp.basis_type, - PARAM.inp.ks_solver, - false, - PARAM.globalv.use_uspp, - PARAM.inp.nspin, - hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::SCF_ITER, - hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::PW_DIAG_NMAX, - hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::PW_DIAG_THR, - hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::need_subspace); + hsolver::HSolverPW, base_device::DEVICE_CPU> hsolver_pw_obj(this->pw_wfc_, + PARAM.inp.calculation, + PARAM.inp.basis_type, + PARAM.inp.ks_solver, + false, + PARAM.globalv.use_uspp, + PARAM.inp.nspin, + hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::SCF_ITER, + hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::PW_DIAG_NMAX, + hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::PW_DIAG_THR, + hsolver::DiagoIterAssist, base_device::DEVICE_CPU>::need_subspace); - hsolver_pw_obj.solve(hamilt_t, - psi_t[0], - this->pelec, - this->pelec->ekb.c, - GlobalV::RANK_IN_POOL, - GlobalV::NPROC_IN_POOL, - false, - this->tpiba, - this->get_nat()); + hsolver_pw_obj.solve(hamilt_t, + psi_t[0], + this->pelec, + this->pelec->ekb.c, + GlobalV::RANK_IN_POOL, + GlobalV::NPROC_IN_POOL, + false, + this->tpiba, + this->get_nat()); } else {// update charge density only @@ -460,17 +464,17 @@ void spinconstrain::SpinConstrain>::update_psi_charge(const #if ((defined __CUDA) || (defined __ROCM)) else { - base_device::DEVICE_GPU* ctx = {}; - base_device::DEVICE_CPU* cpu_ctx = {}; - psi::Psi, base_device::DEVICE_GPU>* psi_t = static_cast, base_device::DEVICE_GPU>*>(this->psi); - hamilt::Hamilt, base_device::DEVICE_GPU>* hamilt_t = static_cast, base_device::DEVICE_GPU>*>(this->p_hamilt); - auto* onsite_p = projectors::OnsiteProjector::get_instance(); - nbands = psi_t->get_nbands(); - npol = psi_t->get_npol(); - nkb = onsite_p->get_tot_nproj(); - nk = psi_t->get_nk(); - nh_iat = &onsite_p->get_nh(0); - size_becp = nbands * nkb * npol; + base_device::DEVICE_GPU* ctx = {}; + base_device::DEVICE_CPU* cpu_ctx = {}; + psi::Psi, base_device::DEVICE_GPU>* psi_t = static_cast, base_device::DEVICE_GPU>*>(this->psi); + hamilt::Hamilt, base_device::DEVICE_GPU>* hamilt_t = static_cast, base_device::DEVICE_GPU>*>(this->p_hamilt); + auto* onsite_p = projectors::OnsiteProjector::get_instance(); + nbands = psi_t->get_nbands(); + npol = psi_t->get_npol(); + nkb = onsite_p->get_tot_nproj(); + nk = psi_t->get_nk(); + nh_iat = &onsite_p->get_nh(0); + size_becp = nbands * nkb * npol; std::complex* h_tmp = nullptr; std::complex* s_tmp = nullptr; diff --git a/source/source_lcao/module_deltaspin/init_sc.cpp b/source/source_lcao/module_deltaspin/init_sc.cpp index ab192fe133..ac56047173 100644 --- a/source/source_lcao/module_deltaspin/init_sc.cpp +++ b/source/source_lcao/module_deltaspin/init_sc.cpp @@ -1,21 +1,24 @@ #include "spin_constrain.h" // init sc -template -void spinconstrain::SpinConstrain::init_sc(double sc_thr_in, - int nsc_in, - int nsc_min_in, - double alpha_trial_in, - double sccut_in, - double sc_drop_thr_in, - const UnitCell& ucell, - Parallel_Orbitals* ParaV_in, - int nspin_in, - const K_Vectors& kv_in, - void* p_hamilt_in, - void* psi_in, - elecstate::ElecState* pelec_in, - ModulePW::PW_Basis_K* pw_wfc_in) +template +void spinconstrain::SpinConstrain::init_sc(double sc_thr_in, + int nsc_in, + int nsc_min_in, + double alpha_trial_in, + double sccut_in, + double sc_drop_thr_in, + const UnitCell& ucell, + Parallel_Orbitals* ParaV_in, + int nspin_in, + const K_Vectors& kv_in, + void* p_hamilt_in, + void* psi_in, +#ifdef __LCAO + elecstate::DensityMatrix* dm_in, // mohan add 2025-11-03 +#endif + elecstate::ElecState* pelec_in, + ModulePW::PW_Basis_K* pw_wfc_in) { this->set_input_parameters(sc_thr_in, nsc_in, nsc_min_in, alpha_trial_in, sccut_in, sc_drop_thr_in); this->set_atomCounts(ucell.get_atom_Counts()); @@ -31,6 +34,9 @@ void spinconstrain::SpinConstrain::init_sc(double sc_thr_in, this->set_decay_grad(); if(ParaV_in != nullptr) this->set_ParaV(ParaV_in); this->set_solver_parameters(kv_in, p_hamilt_in, psi_in, pelec_in); +#ifdef __LCAO + this->dm_ = dm_in; // mohan add 2025-11-03 +#endif } template class spinconstrain::SpinConstrain>; diff --git a/source/source_lcao/module_deltaspin/lambda_loop.cpp b/source/source_lcao/module_deltaspin/lambda_loop.cpp index ac4fe88c9a..5d38c5d261 100644 --- a/source/source_lcao/module_deltaspin/lambda_loop.cpp +++ b/source/source_lcao/module_deltaspin/lambda_loop.cpp @@ -99,7 +99,9 @@ void spinconstrain::SpinConstrain>::run_lambda_loop(int out template <> -void spinconstrain::SpinConstrain>::run_lambda_loop(int outer_step, bool rerun) +void spinconstrain::SpinConstrain>::run_lambda_loop( + int outer_step, + bool rerun) { // init controlling parameters int nat = this->get_nat(); @@ -115,9 +117,7 @@ void spinconstrain::SpinConstrain>::run_lambda_loop(int out std::vector> new_spin(nat, 0.0), spin_plus(nat, 0.0); double alpha_opt, alpha_plus; - double beta; - double mean_error, mean_error_old, rms_error; - double g; + double beta = 0.0, g = 0.0, mean_error = 0.0, mean_error_old = 0.0, rms_error = 0.0; double alpha_trial = this->alpha_trial_; @@ -139,6 +139,7 @@ void spinconstrain::SpinConstrain>::run_lambda_loop(int out double duration = 0.0; if (i_step == -1) { + this->cal_mw_from_lambda(i_step); spin = this->Mi_; where_fill_scalar_else_2d(this->constrain_, 0, zero, this->lambda_, initial_lambda); @@ -151,7 +152,9 @@ void spinconstrain::SpinConstrain>::run_lambda_loop(int out { where_fill_scalar_else_2d(this->constrain_, 0, zero, delta_lambda, delta_lambda); add_scalar_multiply_2d(initial_lambda, delta_lambda, one, this->lambda_); - this->cal_mw_from_lambda(i_step, delta_lambda.data()); + + this->cal_mw_from_lambda(i_step); + new_spin = this->Mi_; bool GradLessThanBound = this->check_gradient_decay(new_spin, spin, delta_lambda, dnu_last_step); if (i_step >= this->nsc_min_ && GradLessThanBound) @@ -246,6 +249,7 @@ void spinconstrain::SpinConstrain>::run_lambda_loop(int out where_fill_scalar_else_2d(this->constrain_, 0, zero, delta_lambda, delta_lambda); add_scalar_multiply_2d(initial_lambda, delta_lambda, one, this->lambda_); + this->cal_mw_from_lambda(i_step, delta_lambda.data()); spin_plus = this->Mi_; diff --git a/source/source_lcao/module_deltaspin/spin_constrain.cpp b/source/source_lcao/module_deltaspin/spin_constrain.cpp index 6213f528f7..6b49487975 100644 --- a/source/source_lcao/module_deltaspin/spin_constrain.cpp +++ b/source/source_lcao/module_deltaspin/spin_constrain.cpp @@ -8,15 +8,15 @@ namespace spinconstrain { -template -SpinConstrain& SpinConstrain::getScInstance() +template +SpinConstrain& SpinConstrain::getScInstance() { - static SpinConstrain instance; // Guaranteed to be created and destroyed only once + static SpinConstrain instance; // Guaranteed to be created and destroyed only once return instance; } -template -double SpinConstrain::cal_escon() +template +double SpinConstrain::cal_escon() { this->escon_ = 0.0; if (!this->is_Mi_converged) @@ -33,30 +33,30 @@ double SpinConstrain::cal_escon() return this->escon_; } -template -double SpinConstrain::get_escon() +template +double SpinConstrain::get_escon() { return this->escon_; } // set atomCounts -template -void SpinConstrain::set_atomCounts(const std::map& atomCounts_in) +template +void SpinConstrain::set_atomCounts(const std::map& atomCounts_in) { this->atomCounts.clear(); this->atomCounts = atomCounts_in; } // get atomCounts -template -const std::map& SpinConstrain::get_atomCounts() const +template +const std::map& SpinConstrain::get_atomCounts() const { return this->atomCounts; } /// set nspin -template -void SpinConstrain::set_nspin(int nspin_in) +template +void SpinConstrain::set_nspin(int nspin_in) { if (nspin_in != 4 && nspin_in != 2) { @@ -66,14 +66,14 @@ void SpinConstrain::set_nspin(int nspin_in) } /// get nspin -template -int SpinConstrain::get_nspin() +template +int SpinConstrain::get_nspin() { return this->nspin_; } -template -int SpinConstrain::get_nat() +template +int SpinConstrain::get_nat() { int nat = 0; for (std::map::iterator it = this->atomCounts.begin(); it != this->atomCounts.end(); ++it) @@ -83,14 +83,14 @@ int SpinConstrain::get_nat() return nat; } -template -int SpinConstrain::get_ntype() +template +int SpinConstrain::get_ntype() { return this->atomCounts.size(); } -template -void SpinConstrain::check_atomCounts() +template +void SpinConstrain::check_atomCounts() { if (!this->atomCounts.size()) { @@ -116,8 +116,8 @@ void SpinConstrain::check_atomCounts() } // get iat -template -int SpinConstrain::get_iat(int itype, int atom_index) +template +int SpinConstrain::get_iat(int itype, int atom_index) { if (itype < 0 || itype >= this->get_ntype()) { @@ -141,38 +141,38 @@ int SpinConstrain::get_iat(int itype, int atom_index) } // set orbitalCounts -template -void SpinConstrain::set_orbitalCounts(const std::map& orbitalCounts_in) +template +void SpinConstrain::set_orbitalCounts(const std::map& orbitalCounts_in) { this->orbitalCounts.clear(); this->orbitalCounts = orbitalCounts_in; } // get orbitalCounts -template -const std::map& SpinConstrain::get_orbitalCounts() const +template +const std::map& SpinConstrain::get_orbitalCounts() const { return this->orbitalCounts; } // set lnchiCounts -template -void SpinConstrain::set_lnchiCounts(const std::map>& lnchiCounts_in) +template +void SpinConstrain::set_lnchiCounts(const std::map>& lnchiCounts_in) { this->lnchiCounts.clear(); this->lnchiCounts = lnchiCounts_in; } // get lnchiCounts -template -const std::map>& SpinConstrain::get_lnchiCounts() const +template +const std::map>& SpinConstrain::get_lnchiCounts() const { return this->lnchiCounts; } // set sc_lambda from ScData -template -void SpinConstrain::set_sc_lambda() +template +void SpinConstrain::set_sc_lambda() { this->check_atomCounts(); int nat = this->get_nat(); @@ -194,8 +194,8 @@ void SpinConstrain::set_sc_lambda() } // set target_mag from ScData -template -void SpinConstrain::set_target_mag() +template +void SpinConstrain::set_target_mag() { this->check_atomCounts(); int nat = this->get_nat(); @@ -234,8 +234,8 @@ void SpinConstrain::set_target_mag() } // set constrain from ScData -template -void SpinConstrain::set_constrain() +template +void SpinConstrain::set_constrain() { this->check_atomCounts(); int nat = this->get_nat(); @@ -266,8 +266,8 @@ void SpinConstrain::set_constrain() } // set sc_lambda from variable -template -void SpinConstrain::set_sc_lambda(const ModuleBase::Vector3* lambda_in, int nat_in) +template +void SpinConstrain::set_sc_lambda(const ModuleBase::Vector3* lambda_in, int nat_in) { this->check_atomCounts(); int nat = this->get_nat(); @@ -283,8 +283,8 @@ void SpinConstrain::set_sc_lambda(const ModuleBase::Vector3* lam } // set target_mag from variable -template -void SpinConstrain::set_target_mag(const ModuleBase::Vector3* target_mag_in, int nat_in) +template +void SpinConstrain::set_target_mag(const ModuleBase::Vector3* target_mag_in, int nat_in) { this->check_atomCounts(); int nat = this->get_nat(); @@ -299,8 +299,8 @@ void SpinConstrain::set_target_mag(const ModuleBase::Vector3* ta } } -template -void SpinConstrain::set_target_mag(const std::vector>& target_mag_in) +template +void SpinConstrain::set_target_mag(const std::vector>& target_mag_in) { int nat = this->get_nat(); assert(target_mag_in.size() == nat); @@ -324,8 +324,8 @@ void SpinConstrain::set_target_mag(const std::vector -void SpinConstrain::set_constrain(const ModuleBase::Vector3* constrain_in, int nat_in) +template +void SpinConstrain::set_constrain(const ModuleBase::Vector3* constrain_in, int nat_in) { this->check_atomCounts(); int nat = this->get_nat(); @@ -340,28 +340,28 @@ void SpinConstrain::set_constrain(const ModuleBase::Vector3* constr } } -template -const std::vector>& SpinConstrain::get_sc_lambda() const +template +const std::vector>& SpinConstrain::get_sc_lambda() const { return this->lambda_; } -template -const std::vector>& SpinConstrain::get_target_mag() const +template +const std::vector>& SpinConstrain::get_target_mag() const { return this->target_mag_; } /// get_constrain -template -const std::vector>& SpinConstrain::get_constrain() const +template +const std::vector>& SpinConstrain::get_constrain() const { return this->constrain_; } /// zero atomic magnetic moment -template -void SpinConstrain::zero_Mi() +template +void SpinConstrain::zero_Mi() { this->check_atomCounts(); int nat = this->get_nat(); @@ -377,15 +377,15 @@ void SpinConstrain::zero_Mi() /// get grad_decay /// this function can only be called by the root process because only /// root process reads the ScDecayGrad from json file -template -double SpinConstrain::get_decay_grad(int itype) +template +double SpinConstrain::get_decay_grad(int itype) { return this->ScDecayGrad[itype]; } /// set grad_decy -template -void SpinConstrain::set_decay_grad() +template +void SpinConstrain::set_decay_grad() { this->check_atomCounts(); int ntype = this->get_ntype(); @@ -397,15 +397,15 @@ void SpinConstrain::set_decay_grad() } /// get decay_grad -template -const std::vector& SpinConstrain::get_decay_grad() +template +const std::vector& SpinConstrain::get_decay_grad() { return this->decay_grad_; } /// set grad_decy from variable -template -void SpinConstrain::set_decay_grad(const double* decay_grad_in, int ntype_in) +template +void SpinConstrain::set_decay_grad(const double* decay_grad_in, int ntype_in) { this->check_atomCounts(); int ntype = this->get_ntype(); @@ -421,8 +421,8 @@ void SpinConstrain::set_decay_grad(const double* decay_grad_in, int ntyp } /// @brief set input parameters -template -void SpinConstrain::set_input_parameters(double sc_thr_in, +template +void SpinConstrain::set_input_parameters(double sc_thr_in, int nsc_in, int nsc_min_in, double alpha_trial_in, @@ -438,56 +438,56 @@ void SpinConstrain::set_input_parameters(double sc_thr_in, } /// get sc_thr -template -double SpinConstrain::get_sc_thr() +template +double SpinConstrain::get_sc_thr() { return this->sc_thr_; } /// get nsc -template -int SpinConstrain::get_nsc() +template +int SpinConstrain::get_nsc() { return this->nsc_; } /// get nsc_min -template -int SpinConstrain::get_nsc_min() +template +int SpinConstrain::get_nsc_min() { return this->nsc_min_; } /// get alpha_trial -template -double SpinConstrain::get_alpha_trial() +template +double SpinConstrain::get_alpha_trial() { return this->alpha_trial_; } /// get sccut -template -double SpinConstrain::get_sccut() +template +double SpinConstrain::get_sccut() { return this->restrict_current_; } /// set sc_drop_thr -template -void SpinConstrain::set_sc_drop_thr(double sc_drop_thr_in) +template +void SpinConstrain::set_sc_drop_thr(double sc_drop_thr_in) { this->sc_drop_thr_ = sc_drop_thr_in; } /// get sc_drop_thr -template -double SpinConstrain::get_sc_drop_thr() +template +double SpinConstrain::get_sc_drop_thr() { return this->sc_drop_thr_; } -template -void SpinConstrain::set_solver_parameters(const K_Vectors& kv_in, +template +void SpinConstrain::set_solver_parameters(const K_Vectors& kv_in, void* p_hamilt_in, void* psi_in, elecstate::ElecState* pelec_in) @@ -499,8 +499,8 @@ void SpinConstrain::set_solver_parameters(const K_Vectors& kv_in, } /// @brief set ParaV -template -void SpinConstrain::set_ParaV(Parallel_Orbitals* ParaV_in) +template +void SpinConstrain::set_ParaV(Parallel_Orbitals* ParaV_in) { this->ParaV = ParaV_in; int nloc = this->ParaV->nloc; @@ -511,8 +511,8 @@ void SpinConstrain::set_ParaV(Parallel_Orbitals* ParaV_in) } /// print Mi -template -void SpinConstrain::print_Mi(std::ofstream& ofs_running) +template +void SpinConstrain::print_Mi(std::ofstream& ofs_running) { this->check_atomCounts(); int nat = this->get_nat(); @@ -556,8 +556,8 @@ void SpinConstrain::print_Mi(std::ofstream& ofs_running) } /// print magnetic force (defined as \frac{\delta{L}}/{\delta{Mi}} = -lambda[iat]) -template -void SpinConstrain::print_Mag_Force(std::ofstream& ofs_running) +template +void SpinConstrain::print_Mag_Force(std::ofstream& ofs_running) { this->check_atomCounts(); int nat = this->get_nat(); diff --git a/source/source_lcao/module_deltaspin/spin_constrain.h b/source/source_lcao/module_deltaspin/spin_constrain.h index bcc4ed9ec1..f4868aa93a 100644 --- a/source/source_lcao/module_deltaspin/spin_constrain.h +++ b/source/source_lcao/module_deltaspin/spin_constrain.h @@ -14,12 +14,16 @@ #include "source_hamilt/operator.h" #include "source_estate/elecstate.h" +#ifdef __LCAO +#include "source_estate/module_dm/density_matrix.h" // mohan add 2025-11-02 +#endif + namespace spinconstrain { struct ScAtomData; -template +template class SpinConstrain { public: @@ -39,7 +43,10 @@ class SpinConstrain const K_Vectors& kv_in, void* p_hamilt_in, void* psi_in, - elecstate::ElecState* pelec_in, +#ifdef __LCAO + elecstate::DensityMatrix *dm_in, // mohan add 2025-11-02 +#endif + elecstate::ElecState* pelec_in, ModulePW::PW_Basis_K* pw_wfc_in = nullptr); /// @brief calculate the magnetization of each atom with real space projection method for LCAO base @@ -49,7 +56,8 @@ class SpinConstrain void cal_mi_pw(); - void cal_mw_from_lambda(int i_step, const ModuleBase::Vector3* delta_lambda = nullptr); + void cal_mw_from_lambda(int i_step, + const ModuleBase::Vector3* delta_lambda = nullptr); /** * @brief calculate the energy of \sum_i \lambda_i * Mi @@ -60,13 +68,17 @@ class SpinConstrain double get_escon(); - void run_lambda_loop(int outer_step, bool rerun = true); + void run_lambda_loop(int outer_step, + bool rerun = true); /// @brief update the charge density for LCAO base with new lambda /// update the charge density and psi for PW base with new lambda void update_psi_charge(const ModuleBase::Vector3* delta_lambda, bool pw_solve = true); - void calculate_delta_hcc(std::complex* h_tmp, const std::complex* becp_k, const ModuleBase::Vector3* delta_lambda, const int nbands, const int nkb, const int* nh_iat); + void calculate_delta_hcc(std::complex* h_tmp, + const std::complex* becp_k, + const ModuleBase::Vector3* delta_lambda, + const int nbands, const int nkb, const int* nh_iat); /// lambda loop helper functions bool check_rms_stop(int outer_step, int i_step, double rms_error, double duration, double total_duration); @@ -109,6 +121,9 @@ class SpinConstrain void* psi = nullptr; elecstate::ElecState* pelec = nullptr; ModulePW::PW_Basis_K* pw_wfc_ = nullptr; +#ifdef __LCAO + elecstate::DensityMatrix* dm_; +#endif double tpiba = 0.0; /// save ucell.tpiba const double meV_to_Ry = 7.349864435130999e-05; K_Vectors kv_; @@ -240,20 +255,20 @@ class SpinConstrain public: /// @brief save operator for spin-constrained DFT /// @param op_in the base pointer of operator, actual type should be DeltaSpin>* - void set_operator(hamilt::Operator* op_in); + void set_operator(hamilt::Operator* op_in); /// @brief set is_Mi_converged void set_mag_converged(bool is_Mi_converged_in){this->is_Mi_converged = is_Mi_converged_in;} /// @brief get is_Mi_converged bool mag_converged() const {return this->is_Mi_converged;} private: /// operator for spin-constrained DFT, used for calculating current atomic magnetic moment - hamilt::Operator* p_operator = nullptr; + hamilt::Operator* p_operator = nullptr; /// @brief if atomic magnetic moment is converged bool is_Mi_converged = false; - FPTYPE* sub_h_save; - FPTYPE* sub_s_save; - FPTYPE* becp_save; + TK* sub_h_save; + TK* sub_s_save; + TK* becp_save; }; diff --git a/source/source_lcao/module_deltaspin/template_helpers.cpp b/source/source_lcao/module_deltaspin/template_helpers.cpp index 437ecec662..83e5f17f75 100644 --- a/source/source_lcao/module_deltaspin/template_helpers.cpp +++ b/source/source_lcao/module_deltaspin/template_helpers.cpp @@ -1,7 +1,8 @@ #include "spin_constrain.h" template <> -void spinconstrain::SpinConstrain::cal_mw_from_lambda(int i_step, const ModuleBase::Vector3* delta_lambda) +void spinconstrain::SpinConstrain::cal_mw_from_lambda(int i_step, + const ModuleBase::Vector3* delta_lambda) { } @@ -11,7 +12,8 @@ void spinconstrain::SpinConstrain::cal_mi_lcao(const int& step, bool pri } template <> -void spinconstrain::SpinConstrain::run_lambda_loop(int outer_step, bool rerun) +void spinconstrain::SpinConstrain::run_lambda_loop(int outer_step, + bool rerun) { } @@ -60,4 +62,4 @@ bool spinconstrain::SpinConstrain::check_gradient_decay( bool print) { return false; -} \ No newline at end of file +} diff --git a/source/source_lcao/module_dftu/CMakeLists.txt b/source/source_lcao/module_dftu/CMakeLists.txt index d412154970..42a58af7ba 100644 --- a/source/source_lcao/module_dftu/CMakeLists.txt +++ b/source/source_lcao/module_dftu/CMakeLists.txt @@ -18,4 +18,4 @@ add_library( if(ENABLE_COVERAGE) add_coverage(dftu) -endif() \ No newline at end of file +endif() diff --git a/source/source_lcao/module_dftu/dftu.cpp b/source/source_lcao/module_dftu/dftu.cpp index 1bf05e98d9..92686ce4e3 100644 --- a/source/source_lcao/module_dftu/dftu.cpp +++ b/source/source_lcao/module_dftu/dftu.cpp @@ -8,7 +8,6 @@ #include "source_base/timer.h" #include "source_estate/magnetism.h" #include "source_estate/module_charge/charge.h" -#include "source_pw/module_pwdft/global.h" #include #include @@ -20,22 +19,30 @@ #include #include -namespace GlobalC -{ -ModuleDFTU::DFTU dftu; -} + // mohan add 2025-11-06 +double Plus_U::energy_u = 0.0; -namespace ModuleDFTU -{ -DFTU::DFTU() -{ -} +std::vector Plus_U::U = {}; // U (Hubbard parameter U) -DFTU::~DFTU() -{ -} +std::vector Plus_U::U0 = {}; // U0 (target Hubbard parameter U0) + +std::vector Plus_U::orbital_corr = {}; // + +double Plus_U::uramping = 0.0; // increase U by uramping, default is -1.0 -void DFTU::init(UnitCell& cell, // unitcell class +int Plus_U::omc=0; // occupation matrix control + +int Plus_U::mixing_dftu=0; //whether to mix locale + +bool Plus_U::Yukawa=false; // whether to use Yukawa potential + +Plus_U::Plus_U() +{} + +Plus_U::~Plus_U() +{} + +void Plus_U::init(UnitCell& cell, // unitcell class const Parallel_Orbitals* pv, const int nks #ifdef __LCAO @@ -43,7 +50,7 @@ void DFTU::init(UnitCell& cell, // unitcell class #endif ) { - ModuleBase::TITLE("DFTU", "init"); + ModuleBase::TITLE("Plus_U", "init"); #ifndef __MPI std::cout << "DFT+U module is only accessible in mpi versioin" << std::endl; @@ -67,7 +74,8 @@ void DFTU::init(UnitCell& cell, // unitcell class const int nlocal = PARAM.globalv.nlocal; // number of total local orbitals const int nspin = PARAM.inp.nspin; // number of spins - this->EU = 0.0; + // mohan update 2025-11-06 + Plus_U::energy_u = 0.0; this->locale.resize(cell.nat); this->locale_save.resize(cell.nat); @@ -221,24 +229,27 @@ void DFTU::init(UnitCell& cell, // unitcell class } } - ModuleBase::Memory::record("DFTU::locale", sizeof(double) * num_locale); + ModuleBase::Memory::record("Plus_U::locale", sizeof(double) * num_locale); return; } #ifdef __LCAO -void DFTU::cal_energy_correction(const UnitCell& ucell, +void Plus_U::cal_energy_correction(const UnitCell& ucell, const int istep) { - ModuleBase::TITLE("DFTU", "cal_energy_correction"); - ModuleBase::timer::tick("DFTU", "cal_energy_correction"); + ModuleBase::TITLE("Plus_U", "cal_energy_correction"); + ModuleBase::timer::tick("Plus_U", "cal_energy_correction"); if (!initialed_locale) { - ModuleBase::timer::tick("DFTU", "cal_energy_correction"); + ModuleBase::timer::tick("Plus_U", "cal_energy_correction"); return; } - this->EU = 0.0; - double EU_dc = 0.0; + + // mohan update 20251106 + Plus_U::energy_u = 0.0; + + double energy_dc = 0.0; for (int T = 0; T < ucell.ntype; T++) { @@ -291,12 +302,12 @@ void DFTU::cal_energy_correction(const UnitCell& ucell, } if (Yukawa) { - this->EU += 0.5 * (this->U_Yukawa[T][l][n] - this->J_Yukawa[T][l][n]) + Plus_U::energy_u += 0.5 * (this->U_Yukawa[T][l][n] - this->J_Yukawa[T][l][n]) * (nm_trace - nm2_trace); } else { - this->EU += 0.5 * this->U[T] * (nm_trace - nm2_trace); + Plus_U::energy_u += 0.5 * this->U[T] * (nm_trace - nm2_trace); } } } @@ -326,12 +337,12 @@ void DFTU::cal_energy_correction(const UnitCell& ucell, } if (Yukawa) { - this->EU - += 0.5 * (this->U_Yukawa[T][l][n] - this->J_Yukawa[T][l][n]) * (nm_trace - nm2_trace); + Plus_U::energy_u += 0.5 * (this->U_Yukawa[T][l][n] - this->J_Yukawa[T][l][n]) + * (nm_trace - nm2_trace); } else { - this->EU += 0.5 * this->U[T] * (nm_trace - nm2_trace); + Plus_U::energy_u += 0.5 * this->U[T] * (nm_trace - nm2_trace); } } @@ -353,14 +364,14 @@ void DFTU::cal_energy_correction(const UnitCell& ucell, { double VU = 0.0; VU = get_onebody_eff_pot(T, iat, l, n, is, m1_all, m2_all, false); - EU_dc += VU * this->locale[iat][l][n][is](m1_all, m2_all); + energy_dc += VU * this->locale[iat][l][n][is](m1_all, m2_all); } } else if (PARAM.inp.nspin == 4) // SOC { double VU = 0.0; VU = get_onebody_eff_pot(T, iat, l, n, 0, m1_all, m2_all, false); - EU_dc += VU * this->locale[iat][l][n][0](m1_all, m2_all); + energy_dc += VU * this->locale[iat][l][n][0](m1_all, m2_all); } } } @@ -371,16 +382,16 @@ void DFTU::cal_energy_correction(const UnitCell& ucell, } // end I } // end T - // substract the double counting EU_dc included in band energy eband - this->EU -= EU_dc; + // substract the double counting energy_dc included in band energy eband + Plus_U::energy_u -= energy_dc; - ModuleBase::timer::tick("DFTU", "cal_energy_correction"); + ModuleBase::timer::tick("Plus_U", "cal_energy_correction"); return; } #endif -void DFTU::uramping_update() +void Plus_U::uramping_update() { // if uramping < 0.1, use the original U if (this->uramping < 0.01) { @@ -400,7 +411,7 @@ void DFTU::uramping_update() } } -bool DFTU::u_converged() +bool Plus_U::u_converged() { for (int i = 0; i < this->U0.size(); i++) { @@ -414,19 +425,19 @@ bool DFTU::u_converged() #ifdef __LCAO -void DFTU::set_dmr(const elecstate::DensityMatrix, double>* dmr) +void Plus_U::set_dmr(const elecstate::DensityMatrix, double>* dmr) { this->dm_in_dftu_cd = dmr; return; } -void DFTU::set_dmr(const elecstate::DensityMatrix* dmr) +void Plus_U::set_dmr(const elecstate::DensityMatrix* dmr) { this->dm_in_dftu_d = dmr; return; } -const hamilt::HContainer* DFTU::get_dmr(int ispin) const +const hamilt::HContainer* Plus_U::get_dmr(int ispin) const { if (this->dm_in_dftu_d != nullptr) { @@ -449,9 +460,10 @@ void dftu_cal_occup_m(const int iter, const std::vector>& dm, const K_Vectors& kv, const double& mixing_beta, - hamilt::Hamilt* p_ham) + hamilt::Hamilt* p_ham, + Plus_U &dftu) { - GlobalC::dftu.cal_occup_m_gamma(iter, ucell ,dm, mixing_beta, p_ham); + dftu.cal_occup_m_gamma(iter, ucell ,dm, mixing_beta, p_ham); } //! dftu occupation matrix for multiple k-points using dm(complex) @@ -461,11 +473,10 @@ void dftu_cal_occup_m(const int iter, const std::vector>>& dm, const K_Vectors& kv, const double& mixing_beta, - hamilt::Hamilt>* p_ham) + hamilt::Hamilt>* p_ham, + Plus_U &dftu) { - GlobalC::dftu.cal_occup_m_k(iter,ucell, dm, kv, mixing_beta, p_ham); + dftu.cal_occup_m_k(iter,ucell, dm, kv, mixing_beta, p_ham); } #endif - -} // namespace ModuleDFTU diff --git a/source/source_lcao/module_dftu/dftu.h b/source/source_lcao/module_dftu/dftu.h index b269acc665..56d213386d 100644 --- a/source/source_lcao/module_dftu/dftu.h +++ b/source/source_lcao/module_dftu/dftu.h @@ -7,7 +7,6 @@ #ifdef __LCAO #include "source_estate/module_charge/charge_mixing.h" #include "source_hamilt/hamilt.h" -#include "source_estate/elecstate.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_estate/module_dm/density_matrix.h" #include "source_lcao/force_stress_arrays.h" // mohan add 2024-06-15 @@ -16,24 +15,14 @@ #include #include -//========================================================== -// CLASS : -// NAME : DTFU (DFT+U) -//========================================================== -namespace ModuleDFTU -{ -class DFTU +class Plus_U { public: - DFTU(); // constructor - ~DFTU(); // deconstructor + Plus_U(); + ~Plus_U(); - //============================================================= - // In dftu.cpp - // Initialization & Calculating energy - //============================================================= public: // allocate relevant data strcutures void init(UnitCell& cell, // unitcell class @@ -44,23 +33,41 @@ class DFTU #endif ); - static DFTU* get_instance(); - // calculate the energy correction void cal_energy_correction(const UnitCell& ucell, const int istep); - double get_energy(){return EU;} + + // mohan change the function to static, 20251106 + static double get_energy() + { + return Plus_U::energy_u; + } + + static void set_energy(const double &e) + { + Plus_U::energy_u = e; + } + + static void set_double_energy() // mohan add 20251107 + { + Plus_U::energy_u *= 2.0; + } + void uramping_update(); // update U by uramping bool u_converged(); // check if U is converged - std::vector U = {}; // U (Hubbard parameter U) - std::vector U0; // U0 (target Hubbard parameter U0) - std::vector orbital_corr = {}; // - double uramping; // increase U by uramping, default is -1.0 - int omc; // occupation matrix control - int mixing_dftu; //whether to mix locale + // mohan change these parameters to static, 2025-11-07 + static std::vector U; // U (Hubbard parameter U) + static std::vector U0; // U0 (target Hubbard parameter U0) + static std::vector orbital_corr; // + static double uramping; // increase U by uramping, default is -1.0 + static int omc; // occupation matrix control + static int mixing_dftu; //whether to mix locale - double EU; //+U energy private: + + // mohan change the variable to static, 20251106 + static double energy_u; //+U energy, mohan update 2025-11-06, change this to private + const Parallel_Orbitals* paraV = nullptr; int cal_type = 3; // 1:dftu_tpye=1, dc=1; 2:dftu_type=1, dc=2; 3:dftu_tpye=2, dc=1; 4:dftu_tpye=2, dc=2; @@ -82,10 +89,21 @@ class DFTU // For calculating contribution to Hamiltonian matrices //============================================================= public: - void cal_eff_pot_mat_complex(const int ik, std::complex* eff_pot, const std::vector& isk, const std::complex* sk); - void cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector& isk, const double* sk); + void cal_eff_pot_mat_complex(const int ik, + std::complex* eff_pot, + const std::vector& isk, + const std::complex* sk); + + void cal_eff_pot_mat_real(const int ik, + double* eff_pot, + const std::vector& isk, + const double* sk); + void cal_eff_pot_mat_R_double(const int ispin, double* SR, double* HR); - void cal_eff_pot_mat_R_complex_double(const int ispin, std::complex* SR, std::complex* HR); + + void cal_eff_pot_mat_R_complex_double(const int ispin, + std::complex* SR, + std::complex* HR); #endif //============================================================= @@ -95,13 +113,26 @@ class DFTU //============================================================= public: /// interface for PW base - /// calculate the local occupation number matrix for PW based wave functions - void cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matrix& wg_in, const UnitCell& cell, const double& mixing_beta); + /// calculate the local occupation number matrix for PW based wave functions + void cal_occ_pw(const int iter, + const void* psi_in, + const ModuleBase::matrix& wg_in, + const UnitCell& cell, + const double& mixing_beta); + /// calculate the local DFT+U effective potential matrix for PW base. void cal_VU_pot_pw(const int spin); + /// get effective potential matrix for PW base - const std::complex* get_eff_pot_pw(const int iat) const { return &(eff_pot_pw[this->eff_pot_pw_index[iat]]); } - int get_size_eff_pot_pw() const { return eff_pot_pw.size(); } + const std::complex* get_eff_pot_pw(const int iat) const + { + return &(eff_pot_pw[this->eff_pot_pw_index[iat]]); + } + + int get_size_eff_pot_pw() const + { + return eff_pot_pw.size(); + } #ifdef __LCAO // calculate the local occupation number matrix @@ -111,6 +142,7 @@ class DFTU const K_Vectors& kv, const double& mixing_beta, hamilt::Hamilt>* p_ham); + void cal_occup_m_gamma(const int iter, const UnitCell& ucell, const std::vector>& dm_gamma, @@ -122,6 +154,7 @@ class DFTU bool initialed_locale = false; private: + void copy_locale(const UnitCell& ucell); void zero_locale(const UnitCell& ucell); void mix_locale(const UnitCell& ucell,const double& mixing_beta); @@ -129,12 +162,13 @@ class DFTU std::vector> eff_pot_pw; std::vector eff_pot_pw_index; -public: - // local occupancy matrix of the correlated subspace + public: + // local occupancy matrix of the correlated subspace // locale: the out put local occupation number matrix of correlated electrons in the current electronic step // locale_save: the input local occupation number matrix of correlated electrons in the current electronic step std::vector>>> locale; // locale[iat][l][n][spin](m1,m2) std::vector>>> locale_save; // locale_save[iat][l][n][spin](m1,m2) + #ifdef __LCAO private: //============================================================= @@ -200,8 +234,9 @@ class DFTU public: void force_stress(const UnitCell& ucell, const Grid_Driver& gd, - const elecstate::ElecState* pelec, - const Parallel_Orbitals& pv, + std::vector>* dmk_d, // mohan modify 2025-11-02 + std::vector>>* dmk_c, // dmat.get_dm()->get_DMK_vector(); + const Parallel_Orbitals& pv, ForceStressArrays& fsr, ModuleBase::matrix& force_dftu, ModuleBase::matrix& stress_dftu, @@ -266,7 +301,7 @@ class DFTU //============================================================= public: - bool Yukawa; // 1:use Yukawa potential; 0: do not use Yukawa potential + static bool Yukawa; // 1:use Yukawa potential; 0: do not use Yukawa potential void cal_slater_UJ(const UnitCell& ucell, double** rho, const int& nrxx); private: @@ -303,6 +338,7 @@ class DFTU #endif }; + #ifdef __LCAO template void dftu_cal_occup_m(const int iter, @@ -310,13 +346,9 @@ void dftu_cal_occup_m(const int iter, const std::vector>& dm, const K_Vectors& kv, const double& mixing_beta, - hamilt::Hamilt* p_ham); + hamilt::Hamilt* p_ham, + Plus_U &dftu); #endif -} // namespace ModuleDFTU -namespace GlobalC -{ - extern ModuleDFTU::DFTU dftu; -} #endif diff --git a/source/source_lcao/module_dftu/dftu_folding.cpp b/source/source_lcao/module_dftu/dftu_folding.cpp index 26e70d0d55..cba6b33991 100644 --- a/source/source_lcao/module_dftu/dftu_folding.cpp +++ b/source/source_lcao/module_dftu/dftu_folding.cpp @@ -2,16 +2,12 @@ #include "dftu.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" -namespace ModuleDFTU -{ - -void DFTU::fold_dSR_gamma(const UnitCell& ucell, +void Plus_U::fold_dSR_gamma(const UnitCell& ucell, const Parallel_Orbitals& pv, const Grid_Driver* gd, double* dsloc_x, @@ -22,7 +18,7 @@ void DFTU::fold_dSR_gamma(const UnitCell& ucell, const int dim2, double* dSR_gamma) { - ModuleBase::TITLE("DFTU", "fold_dSR_gamma"); + ModuleBase::TITLE("Plus_U", "fold_dSR_gamma"); ModuleBase::GlobalFunc::ZEROS(dSR_gamma, pv.nloc); @@ -125,7 +121,7 @@ void DFTU::fold_dSR_gamma(const UnitCell& ucell, return; } -void DFTU::folding_matrix_k(const UnitCell& ucell, +void Plus_U::folding_matrix_k(const UnitCell& ucell, const Grid_Driver& gd, ForceStressArrays& fsr, const Parallel_Orbitals& pv, @@ -135,11 +131,11 @@ void DFTU::folding_matrix_k(const UnitCell& ucell, std::complex* mat_k, const ModuleBase::Vector3& kvec_d) { - ModuleBase::TITLE("DFTU", "folding_matrix_k"); - ModuleBase::timer::tick("DFTU", "folding_matrix_k"); + ModuleBase::TITLE("Plus_U", "folding_matrix_k"); + ModuleBase::timer::tick("Plus_U", "folding_matrix_k"); ModuleBase::GlobalFunc::ZEROS(mat_k, pv.nloc); - double* mat_ptr; + double* mat_ptr = nullptr; if (dim1 == 1 || dim1 == 4) { mat_ptr = fsr.DSloc_Rx; @@ -250,7 +246,7 @@ void DFTU::folding_matrix_k(const UnitCell& ucell, continue; } - int iic; + int iic = 0; if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) { iic = mu + nu * pv.nrow; @@ -277,16 +273,16 @@ void DFTU::folding_matrix_k(const UnitCell& ucell, } // ad } // I1 } // T1 - ModuleBase::timer::tick("DFTU", "folding_matrix_k"); + ModuleBase::timer::tick("Plus_U", "folding_matrix_k"); return; } -void DFTU::folding_matrix_k_new(const int ik, +void Plus_U::folding_matrix_k_new(const int ik, hamilt::Hamilt>* p_ham) { - ModuleBase::TITLE("DFTU", "folding_matrix_k_new"); - ModuleBase::timer::tick("DFTU", "folding_matrix_k_new"); + ModuleBase::TITLE("Plus_U", "folding_matrix_k_new"); + ModuleBase::timer::tick("Plus_U", "folding_matrix_k_new"); int hk_type = 0; if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) @@ -313,7 +309,8 @@ void DFTU::folding_matrix_k_new(const int ik, ->updateSk(ik, hk_type); } } + + ModuleBase::timer::tick("Plus_U", "folding_matrix_k_new"); } -} // namespace ModuleDFTU #endif // __LCAO diff --git a/source/source_lcao/module_dftu/dftu_force.cpp b/source/source_lcao/module_dftu/dftu_force.cpp index 5f08b8b545..ae588ae15a 100644 --- a/source/source_lcao/module_dftu/dftu_force.cpp +++ b/source/source_lcao/module_dftu/dftu_force.cpp @@ -1,19 +1,16 @@ -//========================================================== -// Author:Xin Qu #include "source_io/module_parameter/parameter.h" -// DATE : 2019-12-10 -//========================================================== + #ifdef __LCAO #include "dftu.h" #include "source_base/constants.h" #include "source_base/global_function.h" #include "source_base/inverse_matrix.h" +#include "source_base/module_external/scalapack_connector.h" #include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_estate/elecstate_lcao.h" #include "source_estate/magnetism.h" #include "source_estate/module_charge/charge.h" -#include "source_pw/module_pwdft/global.h" #include #include @@ -24,65 +21,19 @@ #include #include -extern "C" -{ - // I'm not sure what's happenig here, but the interface in scalapack_connecter.h - // does not seem to work, so I'll use this one here - void pzgemm_(const char* transa, - const char* transb, - const int* M, - const int* N, - const int* K, - const std::complex* alpha, - const std::complex* A, - const int* IA, - const int* JA, - const int* DESCA, - const std::complex* B, - const int* IB, - const int* JB, - const int* DESCB, - const std::complex* beta, - std::complex* C, - const int* IC, - const int* JC, - const int* DESCC); - - void pdgemm_(const char* transa, - const char* transb, - const int* M, - const int* N, - const int* K, - const double* alpha, - const double* A, - const int* IA, - const int* JA, - const int* DESCA, - const double* B, - const int* IB, - const int* JB, - const int* DESCB, - const double* beta, - double* C, - const int* IC, - const int* JC, - const int* DESCC); -} - -namespace ModuleDFTU -{ -void DFTU::force_stress(const UnitCell& ucell, +void Plus_U::force_stress(const UnitCell& ucell, const Grid_Driver& gd, - const elecstate::ElecState* pelec, + std::vector>* dmk_d, // mohan modify 2025-11-02 + std::vector>>* dmk_c, // dmat.get_dm()->get_DMK_vector(); const Parallel_Orbitals& pv, ForceStressArrays& fsr, // mohan add 2024-06-16 ModuleBase::matrix& force_dftu, ModuleBase::matrix& stress_dftu, const K_Vectors& kv) { - ModuleBase::TITLE("DFTU", "force_stress"); - ModuleBase::timer::tick("DFTU", "force_stress"); + ModuleBase::TITLE("Plus_U", "force_stress"); + ModuleBase::timer::tick("Plus_U", "force_stress"); const int nlocal = PARAM.globalv.nlocal; @@ -114,29 +65,12 @@ void DFTU::force_stress(const UnitCell& ucell, this->cal_VU_pot_mat_real(spin, false, VU); - const std::vector>& dmk - = dynamic_cast*>(pelec)->get_DM()->get_DMK_vector(); - #ifdef __MPI - pdgemm_(&transT, - &transN, - &nlocal, - &nlocal, - &nlocal, - &alpha, - dmk[spin].data(), - &one_int, - &one_int, - pv.desc, - VU, - &one_int, - &one_int, - pv.desc, - &beta, - &rho_VU[0], - &one_int, - &one_int, - pv.desc); + ScalapackConnector::gemm(transT, transN, nlocal, nlocal, nlocal, + alpha, (*dmk_d)[spin].data(), 1, 1, + pv.desc, VU, 1, 1, + pv.desc, beta, &rho_VU[0], + 1, 1, pv.desc); #endif delete[] VU; @@ -178,31 +112,12 @@ void DFTU::force_stress(const UnitCell& ucell, this->cal_VU_pot_mat_complex(spin, false, VU); - const std::vector>>& dmk - = dynamic_cast>*>(pelec) - ->get_DM() - ->get_DMK_vector(); #ifdef __MPI - pzgemm_(&transT, - &transN, - &nlocal, - &nlocal, - &nlocal, - &alpha, - dmk[ik].data(), - &one_int, - &one_int, - pv.desc, - VU, - &one_int, - &one_int, - pv.desc, - &beta, - &rho_VU[0], - &one_int, - &one_int, - pv.desc); + ScalapackConnector::gemm(transT, transN, nlocal, nlocal, nlocal, + alpha, (*dmk_c)[ik].data(), one_int, one_int, + pv.desc, VU, one_int, one_int, pv.desc, beta, + &rho_VU[0], one_int, one_int, pv.desc); #endif delete[] VU; @@ -244,12 +159,12 @@ void DFTU::force_stress(const UnitCell& ucell, } } } - ModuleBase::timer::tick("DFTU", "force_stress"); + ModuleBase::timer::tick("Plus_U", "force_stress"); return; } -void DFTU::cal_force_k(const UnitCell& ucell, +void Plus_U::cal_force_k(const UnitCell& ucell, const Grid_Driver& gd, ForceStressArrays& fsr, const Parallel_Orbitals& pv, @@ -258,8 +173,8 @@ void DFTU::cal_force_k(const UnitCell& ucell, ModuleBase::matrix& force_dftu, const ModuleBase::Vector3& kvec_d) { - ModuleBase::TITLE("DFTU", "cal_force_k"); - ModuleBase::timer::tick("DFTU", "cal_force_k"); + ModuleBase::TITLE("Plus_U", "cal_force_k"); + ModuleBase::timer::tick("Plus_U", "cal_force_k"); const char transN = 'N'; const char transC = 'C'; @@ -275,24 +190,24 @@ void DFTU::cal_force_k(const UnitCell& ucell, this->folding_matrix_k(ucell, gd, fsr, pv, ik, dim + 1, 0, &dSm_k[0], kvec_d); #ifdef __MPI - pzgemm_(&transN, - &transC, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &one, + ScalapackConnector::gemm(transN, + transC, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + one, &dSm_k[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc, rho_VU, - &one_int, - &one_int, + one_int, + one_int, pv.desc, - &zero, + zero, &dm_VU_dSm[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc); #endif @@ -313,24 +228,24 @@ void DFTU::cal_force_k(const UnitCell& ucell, } // end ir #ifdef __MPI - pzgemm_(&transN, - &transN, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &one, + ScalapackConnector::gemm(transN, + transN, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + one, &dSm_k[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc, rho_VU, - &one_int, - &one_int, + one_int, + one_int, pv.desc, - &zero, + zero, &dm_VU_dSm[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc); #endif @@ -374,12 +289,12 @@ void DFTU::cal_force_k(const UnitCell& ucell, } // ia } // it } // end dim - ModuleBase::timer::tick("DFTU", "cal_force_k"); + ModuleBase::timer::tick("Plus_U", "cal_force_k"); return; } -void DFTU::cal_stress_k(const UnitCell& ucell, +void Plus_U::cal_stress_k(const UnitCell& ucell, const Grid_Driver& gd, ForceStressArrays& fsr, const Parallel_Orbitals& pv, @@ -388,8 +303,8 @@ void DFTU::cal_stress_k(const UnitCell& ucell, ModuleBase::matrix& stress_dftu, const ModuleBase::Vector3& kvec_d) { - ModuleBase::TITLE("DFTU", "cal_stress_k"); - ModuleBase::timer::tick("DFTU", "cal_stress_k"); + ModuleBase::TITLE("Plus_U", "cal_stress_k"); + ModuleBase::timer::tick("Plus_U", "cal_stress_k"); const int nlocal = PARAM.globalv.nlocal; @@ -409,24 +324,24 @@ void DFTU::cal_stress_k(const UnitCell& ucell, this->folding_matrix_k(ucell, gd, fsr, pv, ik, dim1 + 4, dim2, &dSR_k[0], kvec_d); #ifdef __MPI - pzgemm_(&transN, - &transN, - &nlocal, - &nlocal, - &nlocal, - &minus_half, + ScalapackConnector::gemm(transN, + transN, + nlocal, + nlocal, + nlocal, + minus_half, rho_VU, - &one_int, - &one_int, + one_int, + one_int, pv.desc, &dSR_k[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc, - &zero, + zero, &dm_VU_sover[0], - &one_int, - &one_int, + one_int, + one_int, pv.desc); #endif @@ -445,12 +360,12 @@ void DFTU::cal_stress_k(const UnitCell& ucell, } // end dim2 } // end dim1 - ModuleBase::timer::tick("DFTU", "cal_stress_k"); + ModuleBase::timer::tick("Plus_U", "cal_stress_k"); return; } -void DFTU::cal_force_gamma(const UnitCell& ucell, +void Plus_U::cal_force_gamma(const UnitCell& ucell, const double* rho_VU, const Parallel_Orbitals& pv, double* dsloc_x, @@ -458,8 +373,8 @@ void DFTU::cal_force_gamma(const UnitCell& ucell, double* dsloc_z, ModuleBase::matrix& force_dftu) { - ModuleBase::TITLE("DFTU", "cal_force_gamma"); - ModuleBase::timer::tick("DFTU", "cal_force_gamma"); + ModuleBase::TITLE("Plus_U", "cal_force_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_force_gamma"); const char transN = 'N', transT = 'T'; const int one_int = 1; const double one = 1.0, zero = 0.0, minus_one = -1.0; @@ -483,24 +398,24 @@ void DFTU::cal_force_gamma(const UnitCell& ucell, } #ifdef __MPI - pdgemm_(&transN, - &transT, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &one, + ScalapackConnector::gemm(transN, + transT, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + one, tmp_ptr, - &one_int, - &one_int, + 1, + 1, pv.desc, rho_VU, - &one_int, - &one_int, + 1, + 1, pv.desc, - &zero, + zero, &dm_VU_dSm[0], - &one_int, - &one_int, + 1, + 1, pv.desc); #endif @@ -521,24 +436,24 @@ void DFTU::cal_force_gamma(const UnitCell& ucell, } // end ir #ifdef __MPI - pdgemm_(&transN, - &transT, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &one, + ScalapackConnector::gemm(transN, + transT, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + PARAM.globalv.nlocal, + one, tmp_ptr, - &one_int, - &one_int, + 1, + 1, pv.desc, rho_VU, - &one_int, - &one_int, + 1, + 1, pv.desc, - &zero, + zero, &dm_VU_dSm[0], - &one_int, - &one_int, + 1, + 1, pv.desc); #endif @@ -585,12 +500,12 @@ void DFTU::cal_force_gamma(const UnitCell& ucell, } // it } // end dim - ModuleBase::timer::tick("DFTU", "cal_force_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_force_gamma"); return; } -void DFTU::cal_stress_gamma(const UnitCell& ucell, +void Plus_U::cal_stress_gamma(const UnitCell& ucell, const Parallel_Orbitals& pv, const Grid_Driver* gd, double* dsloc_x, @@ -600,8 +515,8 @@ void DFTU::cal_stress_gamma(const UnitCell& ucell, const double* rho_VU, ModuleBase::matrix& stress_dftu) { - ModuleBase::TITLE("DFTU", "cal_stress_gamma"); - ModuleBase::timer::tick("DFTU", "cal_stress_gamma"); + ModuleBase::TITLE("Plus_U", "cal_stress_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_stress_gamma"); const char transN = 'N'; const int one_int = 1; @@ -621,24 +536,24 @@ void DFTU::cal_stress_gamma(const UnitCell& ucell, this->fold_dSR_gamma(ucell, pv, gd, dsloc_x, dsloc_y, dsloc_z, dh_r, dim1, dim2, &dSR_gamma[0]); #ifdef __MPI - pdgemm_(&transN, - &transN, - &nlocal, - &nlocal, - &nlocal, - &minus_half, + ScalapackConnector::gemm(transN, + transN, + nlocal, + nlocal, + nlocal, + minus_half, rho_VU, - &one_int, - &one_int, + 1, + 1, pv.desc, &dSR_gamma[0], - &one_int, - &one_int, + 1, + 1, pv.desc, - &zero, + zero, &dm_VU_sover[0], - &one_int, - &one_int, + 1, + 1, pv.desc); #endif @@ -658,8 +573,7 @@ void DFTU::cal_stress_gamma(const UnitCell& ucell, } // end dim2 } // end dim1 - ModuleBase::timer::tick("DFTU", "cal_stress_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_stress_gamma"); return; } -} // namespace ModuleDFTU #endif diff --git a/source/source_lcao/module_dftu/dftu_hamilt.cpp b/source/source_lcao/module_dftu/dftu_hamilt.cpp index 9ba7fe1b14..6da3b584a1 100644 --- a/source/source_lcao/module_dftu/dftu_hamilt.cpp +++ b/source/source_lcao/module_dftu/dftu_hamilt.cpp @@ -2,22 +2,22 @@ #include "source_base/module_external/scalapack_connector.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" -namespace ModuleDFTU -{ #ifdef __LCAO -void DFTU::cal_eff_pot_mat_complex(const int ik, std::complex* eff_pot, const std::vector& isk, const std::complex* sk) +void Plus_U::cal_eff_pot_mat_complex(const int ik, + std::complex* eff_pot, + const std::vector& isk, + const std::complex* sk) { - ModuleBase::TITLE("DFTU", "cal_eff_pot_mat"); - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); + ModuleBase::TITLE("Plus_U", "cal_eff_pot_c"); if (!this->initialed_locale) { - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); return; } + ModuleBase::timer::tick("Plus_U", "cal_eff_pot_c"); + int spin = isk[ik]; ModuleBase::GlobalFunc::ZEROS(eff_pot, this->paraV->nloc); @@ -35,17 +35,19 @@ void DFTU::cal_eff_pot_mat_complex(const int ik, std::complex* eff_pot, this->cal_VU_pot_mat_complex(spin, true, &VU[0]); #ifdef __MPI - pzgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - sk, &one_int, &one_int, this->paraV->desc, - &zero, - eff_pot, &one_int, &one_int, this->paraV->desc); + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), one_int, one_int, this->paraV->desc, + sk, one_int, one_int, this->paraV->desc, + zero, + eff_pot, one_int, one_int, this->paraV->desc); #endif - for (int irc = 0; irc < this->paraV->nloc; irc++) - VU[irc] = eff_pot[irc]; + for (int irc = 0; irc < this->paraV->nloc; irc++) + { + VU[irc] = eff_pot[irc]; + } #ifdef __MPI pztranc_(&PARAM.globalv.nlocal, &PARAM.globalv.nlocal, @@ -55,19 +57,18 @@ void DFTU::cal_eff_pot_mat_complex(const int ik, std::complex* eff_pot, eff_pot, &one_int, &one_int, this->paraV->desc); #endif - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); + ModuleBase::timer::tick("Plus_U", "cal_eff_pot_c"); return; } -void DFTU::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector& isk, const double* sk) +void Plus_U::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector& isk, const double* sk) { - ModuleBase::TITLE("DFTU", "cal_eff_pot_mat"); - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); + ModuleBase::TITLE("Plus_U", "cal_eff_pot_r"); if (!this->initialed_locale) { - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); return; } + ModuleBase::timer::tick("Plus_U", "cal_eff_pot_r"); int spin = isk[ik]; @@ -84,13 +85,13 @@ void DFTU::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector this->cal_VU_pot_mat_real(spin, 1, &VU[0]); #ifdef __MPI - pdgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - sk, &one_int, &one_int, this->paraV->desc, - &beta, - eff_pot, &one_int, &one_int, this->paraV->desc); + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), 1, 1, this->paraV->desc, + sk, 1, 1, this->paraV->desc, + beta, + eff_pot, 1, 1, this->paraV->desc); #endif for (int irc = 0; irc < this->paraV->nloc; irc++) @@ -104,11 +105,11 @@ void DFTU::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector eff_pot, &one_int, &one_int, const_cast(this->paraV->desc)); #endif - ModuleBase::timer::tick("DFTU", "cal_eff_pot_mat"); + ModuleBase::timer::tick("Plus_U", "cal_eff_pot_r"); return; } -void DFTU::cal_eff_pot_mat_R_double(const int ispin, double* SR, double* HR) +void Plus_U::cal_eff_pot_mat_R_double(const int ispin, double* SR, double* HR) { const char transN = 'N', transT = 'T'; const int one_int = 1; @@ -118,27 +119,27 @@ void DFTU::cal_eff_pot_mat_R_double(const int ispin, double* SR, double* HR) this->cal_VU_pot_mat_real(ispin, 1, &VU[0]); #ifdef __MPI - pdgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - SR, &one_int, &one_int, this->paraV->desc, - &beta, - HR, &one_int, &one_int, this->paraV->desc); - - pdgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - SR, &one_int, &one_int, this->paraV->desc, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - &one, - HR, &one_int, &one_int, this->paraV->desc); + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), 1, 1, this->paraV->desc, + SR, 1, 1, this->paraV->desc, + beta, + HR, 1, 1, this->paraV->desc); + + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + SR, 1, 1, this->paraV->desc, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), 1, 1, this->paraV->desc, + one, + HR, 1, 1, this->paraV->desc); #endif return; } -void DFTU::cal_eff_pot_mat_R_complex_double(const int ispin, std::complex* SR, std::complex* HR) +void Plus_U::cal_eff_pot_mat_R_complex_double(const int ispin, std::complex* SR, std::complex* HR) { const char transN = 'N', transT = 'T'; const int one_int = 1; @@ -148,25 +149,24 @@ void DFTU::cal_eff_pot_mat_R_complex_double(const int ispin, std::complexcal_VU_pot_mat_complex(ispin, 1, &VU[0]); #ifdef __MPI - pzgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - SR, &one_int, &one_int, this->paraV->desc, - &zero, - HR, &one_int, &one_int, this->paraV->desc); - - pzgemm_(&transN, &transN, - &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, &PARAM.globalv.nlocal, - &half, - SR, &one_int, &one_int, this->paraV->desc, - ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), &one_int, &one_int, this->paraV->desc, - &one, - HR, &one_int, &one_int, this->paraV->desc); + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), one_int, one_int, this->paraV->desc, + SR, one_int, one_int, this->paraV->desc, + zero, + HR, one_int, one_int, this->paraV->desc); + + ScalapackConnector::gemm(transN, transN, + PARAM.globalv.nlocal, PARAM.globalv.nlocal, PARAM.globalv.nlocal, + half, + SR, one_int, one_int, this->paraV->desc, + ModuleBase::GlobalFunc::VECTOR_TO_PTR(VU), one_int, one_int, this->paraV->desc, + one, + HR, one_int, one_int, this->paraV->desc); #endif return; } #endif -} \ No newline at end of file diff --git a/source/source_lcao/module_dftu/dftu_io.cpp b/source/source_lcao/module_dftu/dftu_io.cpp index fc9d2a2d10..737c1c590a 100644 --- a/source/source_lcao/module_dftu/dftu_io.cpp +++ b/source/source_lcao/module_dftu/dftu_io.cpp @@ -1,14 +1,12 @@ #include "dftu.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" +#include -namespace ModuleDFTU -{ -void DFTU::output(const UnitCell &ucell) +void Plus_U::output(const UnitCell &ucell) { - ModuleBase::TITLE("DFTU", "output"); + ModuleBase::TITLE("Plus_U", "output"); GlobalV::ofs_running << "//=========================L(S)DA+U===========================//" << std::endl; @@ -22,9 +20,10 @@ void DFTU::output(const UnitCell &ucell) if (L >= orbital_corr[T] && orbital_corr[T] != -1) { - if (L != orbital_corr[T]) { - continue; -} + if (L != orbital_corr[T]) + { + continue; + } if (!Yukawa) { @@ -35,10 +34,11 @@ void DFTU::output(const UnitCell &ucell) { for (int n = 0; n < N; n++) { - if (n != 0) { - continue; -} - double Ueff = (this->U_Yukawa[T][L][n] - this->J_Yukawa[T][L][n]) * ModuleBase::Ry_to_eV; + if (n != 0) + { + continue; + } + double Ueff = (this->U_Yukawa[T][L][n] - this->J_Yukawa[T][L][n]) * ModuleBase::Ry_to_eV; GlobalV::ofs_running << "atom_type=" << T << " L=" << L << " chi=" << n << " U=" << this->U_Yukawa[T][L][n] * ModuleBase::Ry_to_eV << "eV " << "J=" << this->J_Yukawa[T][L][n] * ModuleBase::Ry_to_eV << "eV" @@ -61,7 +61,7 @@ void DFTU::output(const UnitCell &ucell) } } if(!ofdftu){ - std::cout << "DFTU::write_occup_m. Can't create file onsite.dm!" << std::endl; + std::cout << "Plus_U::write_occup_m. Can't create file onsite.dm!" << std::endl; exit(0); } this->write_occup_m(ucell,ofdftu); @@ -73,21 +73,24 @@ void DFTU::output(const UnitCell &ucell) // define the function calculate the eigenvalues of a matrix std::vector CalculateEigenvalues(std::vector>& A, int n); -void DFTU::write_occup_m(const UnitCell& ucell, +void Plus_U::write_occup_m(const UnitCell& ucell, std::ofstream &ofs, bool diag) { - ModuleBase::TITLE("DFTU", "write_occup_m"); + ModuleBase::TITLE("Plus_U", "write_occup_m"); - if(GlobalV::MY_RANK != 0) { return; -} + if(GlobalV::MY_RANK != 0) + { + return; + } for (int T = 0; T < ucell.ntype; T++) { - if (orbital_corr[T] == -1) { - continue; -} - const int NL = ucell.atoms[T].nwl + 1; + if (orbital_corr[T] == -1) + { + continue; + } + const int NL = ucell.atoms[T].nwl + 1; const int LC = orbital_corr[T]; for (int I = 0; I < ucell.atoms[T].na; I++) @@ -98,9 +101,10 @@ void DFTU::write_occup_m(const UnitCell& ucell, for (int l = 0; l < NL; l++) { - if (l != orbital_corr[T]) { - continue; -} + if (l != orbital_corr[T]) + { + continue; + } const int N = ucell.atoms[T].l_nchi[l]; ofs << "L" @@ -109,9 +113,10 @@ void DFTU::write_occup_m(const UnitCell& ucell, for (int n = 0; n < N; n++) { // if(!Yukawa && n!=0) continue; - if (n != 0) { - continue; -} + if (n != 0) + { + continue; + } ofs << "zeta" << " " << n << std::endl; @@ -158,7 +163,8 @@ void DFTU::write_occup_m(const UnitCell& ucell, } if(diag) { - ofs << std::setw(12) << std::setprecision(8) << std::fixed<< "atomic mag: "< 0) { std::cout - << "DFTU::read_occup_m. Can not find the file initial_onsite.dm . Please check your initial_onsite.dm" + << "Plus_U::read_occup_m. Can not find the file initial_onsite.dm . Please check your initial_onsite.dm" << std::endl; } else { if (PARAM.inp.init_chg == "file") { - std::cout << "DFTU::read_occup_m. Can not find the file onsite.dm . Please do scf calculation first" + std::cout << "Plus_U::read_occup_m. Can not find the file onsite.dm . Please do scf calculation first" << std::endl; } } @@ -257,16 +267,21 @@ void DFTU::read_occup_m(const UnitCell& ucell, char word[10]; - int T, iat, spin, L, zeta; + int T=0; + int iat=0; + int spin=0; + int L=0; + int zeta=0; ifdftu.rdstate(); while (ifdftu.good()) { ifdftu >> word; - if (ifdftu.eof()) { - break; -} + if (ifdftu.eof()) + { + break; + } if (strcmp("atoms", word) == 0) { @@ -279,9 +294,10 @@ void DFTU::read_occup_m(const UnitCell& ucell, for (int l = 0; l < NL; l++) { - if (l != orbital_corr[T]) { - continue; -} + if (l != orbital_corr[T]) + { + continue; + } ifdftu >> word; @@ -294,9 +310,10 @@ void DFTU::read_occup_m(const UnitCell& ucell, for (int n = 0; n < N; n++) { // if(!Yukawa && n!=0) continue; - if (n != 0) { - continue; -} + if (n != 0) + { + continue; + } ifdftu >> word; if (strcmp("zeta", word) == 0) @@ -327,7 +344,7 @@ void DFTU::read_occup_m(const UnitCell& ucell, } else { - std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM DFTU FILE" + std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM Plus_U FILE" << std::endl; exit(0); } @@ -358,21 +375,21 @@ void DFTU::read_occup_m(const UnitCell& ucell, } else { - std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM DFTU FILE" << std::endl; + std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM Plus_U FILE" << std::endl; exit(0); } } } else { - std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM DFTU FILE" << std::endl; + std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM Plus_U FILE" << std::endl; exit(0); } } } else { - std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM DFTU FILE" << std::endl; + std::cout << "WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM Plus_U FILE" << std::endl; exit(0); } @@ -387,15 +404,16 @@ void DFTU::read_occup_m(const UnitCell& ucell, return; } -void DFTU::local_occup_bcast(const UnitCell& ucell) +void Plus_U::local_occup_bcast(const UnitCell& ucell) { - ModuleBase::TITLE("DFTU", "local_occup_bcast"); + ModuleBase::TITLE("Plus_U", "local_occup_bcast"); for (int T = 0; T < ucell.ntype; T++) { - if (orbital_corr[T] == -1) { - continue; -} + if (orbital_corr[T] == -1) + { + continue; + } for (int I = 0; I < ucell.atoms[T].na; I++) { @@ -404,16 +422,18 @@ void DFTU::local_occup_bcast(const UnitCell& ucell) for (int l = 0; l <= ucell.atoms[T].nwl; l++) { - if (l != orbital_corr[T]) { - continue; -} + if (l != orbital_corr[T]) + { + continue; + } for (int n = 0; n < ucell.atoms[T].l_nchi[l]; n++) { // if(!Yukawa && n!=0) continue; - if (n != 0) { - continue; -} + if (n != 0) + { + continue; + } if (PARAM.inp.nspin == 1 || PARAM.inp.nspin == 2) { @@ -462,10 +482,12 @@ void DFTU::local_occup_bcast(const UnitCell& ucell) return; } -inline void JacobiRotate(std::vector>& A, int p, int q, int n) { - if (std::abs(A[p][q]) > 1e-10) { - double r = (A[q][q] - A[p][p]) / (2.0 * A[p][q]); - double t; +inline void JacobiRotate(std::vector>& A, int p, int q, int n) +{ + if (std::abs(A[p][q]) > 1e-10) + { + double r = (A[q][q] - A[p][p]) / (2.0 * A[p][q]); + double t = 0.0; if (r >= 0) { t = 1.0 / (r + sqrt(1.0 + r * r)); } else { @@ -489,7 +511,8 @@ inline void JacobiRotate(std::vector>& A, int p, int q, int } } -inline std::vector CalculateEigenvalues(std::vector>& A, int n) { +inline std::vector CalculateEigenvalues(std::vector>& A, int n) +{ std::vector eigenvalues(n); while (true) { int p = 0, q = 1; @@ -513,4 +536,3 @@ inline std::vector CalculateEigenvalues(std::vector> } return eigenvalues; } -} // namespace ModuleDFTU \ No newline at end of file diff --git a/source/source_lcao/module_dftu/dftu_occup.cpp b/source/source_lcao/module_dftu/dftu_occup.cpp index 1bc771d42f..d6409e86e5 100644 --- a/source/source_lcao/module_dftu/dftu_occup.cpp +++ b/source/source_lcao/module_dftu/dftu_occup.cpp @@ -1,18 +1,15 @@ #include "dftu.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #ifdef __LCAO #include "source_lcao/hamilt_lcao.h" #endif #include "source_base/module_external/scalapack_connector.h" -namespace ModuleDFTU +void Plus_U::copy_locale(const UnitCell& ucell) { -void DFTU::copy_locale(const UnitCell& ucell) -{ - ModuleBase::TITLE("DFTU", "copy_locale"); - ModuleBase::timer::tick("DFTU", "copy_locale"); + ModuleBase::TITLE("Plus_U", "copy_locale"); + ModuleBase::timer::tick("Plus_U", "copy_locale"); for (int T = 0; T < ucell.ntype; T++) { @@ -44,13 +41,13 @@ void DFTU::copy_locale(const UnitCell& ucell) } } } - ModuleBase::timer::tick("DFTU", "copy_locale"); + ModuleBase::timer::tick("Plus_U", "copy_locale"); } -void DFTU::zero_locale(const UnitCell& ucell) +void Plus_U::zero_locale(const UnitCell& ucell) { - ModuleBase::TITLE("DFTU", "zero_locale"); - ModuleBase::timer::tick("DFTU", "zero_locale"); + ModuleBase::TITLE("Plus_U", "zero_locale"); + ModuleBase::timer::tick("Plus_U", "zero_locale"); for (int T = 0; T < ucell.ntype; T++) { @@ -82,14 +79,14 @@ void DFTU::zero_locale(const UnitCell& ucell) } } } - ModuleBase::timer::tick("DFTU", "zero_locale"); + ModuleBase::timer::tick("Plus_U", "zero_locale"); } -void DFTU::mix_locale(const UnitCell& ucell, +void Plus_U::mix_locale(const UnitCell& ucell, const double& mixing_beta) { - ModuleBase::TITLE("DFTU", "mix_locale"); - ModuleBase::timer::tick("DFTU", "mix_locale"); + ModuleBase::TITLE("Plus_U", "mix_locale"); + ModuleBase::timer::tick("Plus_U", "mix_locale"); double beta = mixing_beta; @@ -123,20 +120,20 @@ void DFTU::mix_locale(const UnitCell& ucell, } } } - ModuleBase::timer::tick("DFTU", "mix_locale"); + ModuleBase::timer::tick("Plus_U", "mix_locale"); } #ifdef __LCAO -void DFTU::cal_occup_m_k(const int iter, +void Plus_U::cal_occup_m_k(const int iter, const UnitCell& ucell, const std::vector>>& dm_k, const K_Vectors& kv, const double& mixing_beta, hamilt::Hamilt>* p_ham) { - ModuleBase::TITLE("DFTU", "cal_occup_m_k"); - ModuleBase::timer::tick("DFTU", "cal_occup_m_k"); + ModuleBase::TITLE("Plus_U", "cal_occup_m_k"); + ModuleBase::timer::tick("Plus_U", "cal_occup_m_k"); this->copy_locale(ucell); this->zero_locale(ucell); @@ -380,18 +377,18 @@ void DFTU::cal_occup_m_k(const int iter, } this->initialed_locale = true; - ModuleBase::timer::tick("DFTU", "cal_occup_m_k"); + ModuleBase::timer::tick("Plus_U", "cal_occup_m_k"); return; } -void DFTU::cal_occup_m_gamma(const int iter, +void Plus_U::cal_occup_m_gamma(const int iter, const UnitCell &ucell, const std::vector> &dm_gamma, const double& mixing_beta, hamilt::Hamilt* p_ham) { - ModuleBase::TITLE("DFTU", "cal_occup_m_gamma"); - ModuleBase::timer::tick("DFTU", "cal_occup_m_gamma"); + ModuleBase::TITLE("Plus_U", "cal_occup_m_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_occup_m_gamma"); this->copy_locale(ucell); this->zero_locale(ucell); @@ -428,26 +425,6 @@ void DFTU::cal_occup_m_gamma(const int iter, one_int, one_int, &this->paraV->desc[0]); - /*pdgemm_(&transN, - &transT, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &PARAM.globalv.nlocal, - &alpha, - s_gamma_pointer, - &one_int, - &one_int, - this->paraV->desc, - dm_gamma[is].data(), - //dm_gamma[is].c, - &one_int, - &one_int, - this->paraV->desc, - &beta, - &srho[0], - &one_int, - &one_int, - this->paraV->desc);*/ #endif for (int it = 0; it < ucell.ntype; it++) @@ -558,8 +535,7 @@ void DFTU::cal_occup_m_gamma(const int iter, } this->initialed_locale = true; - ModuleBase::timer::tick("DFTU", "cal_occup_m_gamma"); + ModuleBase::timer::tick("Plus_U", "cal_occup_m_gamma"); return; } #endif -} // namespace ModuleDFTU diff --git a/source/source_lcao/module_dftu/dftu_pw.cpp b/source/source_lcao/module_dftu/dftu_pw.cpp index 03968cabee..e3107a313a 100644 --- a/source/source_lcao/module_dftu/dftu_pw.cpp +++ b/source/source_lcao/module_dftu/dftu_pw.cpp @@ -5,16 +5,14 @@ #include "source_base/timer.h" -namespace ModuleDFTU -{ -DFTU* DFTU::get_instance() -{ - return &GlobalC::dftu; -} /// calculate occupation matrix for DFT+U -void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matrix& wg_in, const UnitCell& cell, const double& mixing_beta) +void Plus_U::cal_occ_pw(const int iter, + const void* psi_in, + const ModuleBase::matrix& wg_in, + const UnitCell& cell, + const double& mixing_beta) { - ModuleBase::timer::tick("DFTU", "cal_occ_pw"); + ModuleBase::timer::tick("Plus_U", "cal_occ_pw"); this->copy_locale(cell); this->zero_locale(cell); @@ -137,7 +135,7 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr } #endif - this->EU = 0.0; + Plus_U::energy_u = 0.0; // reduce mag from all k-pools for(int iat = 0; iat < cell.nat; iat++) { @@ -148,7 +146,12 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr continue; } const int size = (2 * target_l + 1) * (2 * target_l + 1); - Parallel_Reduce::reduce_double_allpool(PARAM.inp.kpar, PARAM.globalv.nproc_in_pool, this->locale[iat][target_l][0][0].c, size * PARAM.inp.nspin); + + Parallel_Reduce::reduce_double_allpool(PARAM.inp.kpar, + PARAM.globalv.nproc_in_pool, + this->locale[iat][target_l][0][0].c, + size * PARAM.inp.nspin); + //update effective potential const double u_value = this->U[it]; std::complex* vu_iat = &(this->eff_pot_pw[this->eff_pot_pw_index[iat]]); @@ -157,8 +160,10 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr { for (int m2 = 0; m2 < m_size; m2++) { - vu_iat[m1 * m_size + m2] = u_value * (1.0 * (m1 == m2) - this->locale[iat][target_l][0][0].c[m2 * m_size + m1]); - this->EU += u_value * 0.25 * this->locale[iat][target_l][0][0].c[m2 * m_size + m1] * this->locale[iat][target_l][0][0].c[m1 * m_size + m2]; + vu_iat[m1 * m_size + m2] = u_value * + (1.0 * (m1 == m2) - this->locale[iat][target_l][0][0].c[m2 * m_size + m1]); + Plus_U::energy_u += u_value * 0.25 * this->locale[iat][target_l][0][0].c[m2 * m_size + m1] + * this->locale[iat][target_l][0][0].c[m1 * m_size + m2]; } } for (int is = 1; is < 4; ++is) @@ -168,8 +173,11 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr { for (int m2 = 0; m2 < m_size; m2++) { - vu_iat[start + m1 * m_size + m2] = u_value * (0 - this->locale[iat][target_l][0][0].c[start + m2 * m_size + m1]); - this->EU += u_value * 0.25 * this->locale[iat][target_l][0][0].c[start + m2 * m_size + m1] * this->locale[iat][target_l][0][0].c[start + m1 * m_size + m2]; + vu_iat[start + m1 * m_size + m2] = u_value * + (0 - this->locale[iat][target_l][0][0].c[start + m2 * m_size + m1]); + Plus_U::energy_u += u_value * 0.25 + * this->locale[iat][target_l][0][0].c[start + m2 * m_size + m1] + * this->locale[iat][target_l][0][0].c[start + m1 * m_size + m2]; } } } @@ -201,12 +209,11 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr this->mix_locale(cell, mixing_beta); } // update effective potential - ModuleBase::timer::tick("DFTU", "cal_occ_pw"); + ModuleBase::timer::tick("Plus_U", "cal_occ_pw"); } /// calculate the local DFT+U effective potential matrix for PW base. -void DFTU::cal_VU_pot_pw(const int spin) +void Plus_U::cal_VU_pot_pw(const int spin) { } -} // namespace ModuleDFTU \ No newline at end of file diff --git a/source/source_lcao/module_dftu/dftu_tools.cpp b/source/source_lcao/module_dftu/dftu_tools.cpp index dddb347e71..1ae144a8c2 100644 --- a/source/source_lcao/module_dftu/dftu_tools.cpp +++ b/source/source_lcao/module_dftu/dftu_tools.cpp @@ -1,15 +1,11 @@ #include "dftu.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" - -namespace ModuleDFTU -{ #ifdef __LCAO -void DFTU::cal_VU_pot_mat_complex(const int spin, const bool newlocale, std::complex* VU) +void Plus_U::cal_VU_pot_mat_complex(const int spin, const bool newlocale, std::complex* VU) { - ModuleBase::TITLE("DFTU", "cal_VU_pot_mat_complex"); + ModuleBase::TITLE("Plus_U", "cal_VU_pot_mat_complex"); ModuleBase::GlobalFunc::ZEROS(VU, this->paraV->nloc); for (int it = 0; it < this->ucell->ntype; ++it) @@ -71,9 +67,9 @@ void DFTU::cal_VU_pot_mat_complex(const int spin, const bool newlocale, std::com return; } -void DFTU::cal_VU_pot_mat_real(const int spin, const bool newlocale, double* VU) +void Plus_U::cal_VU_pot_mat_real(const int spin, const bool newlocale, double* VU) { - ModuleBase::TITLE("DFTU", "cal_VU_pot_mat_real"); + ModuleBase::TITLE("Plus_U", "cal_VU_pot_mat_real"); ModuleBase::GlobalFunc::ZEROS(VU, this->paraV->nloc); for (int it = 0; it < this->ucell->ntype; ++it) @@ -136,7 +132,7 @@ void DFTU::cal_VU_pot_mat_real(const int spin, const bool newlocale, double* VU) return; } -double DFTU::get_onebody_eff_pot(const int T, +double Plus_U::get_onebody_eff_pot(const int T, const int iat, const int L, const int N, @@ -145,7 +141,7 @@ double DFTU::get_onebody_eff_pot(const int T, const int m1, const bool newlocale) { - ModuleBase::TITLE("DFTU", "get_onebody_eff_pot"); + ModuleBase::TITLE("Plus_U", "get_onebody_eff_pot"); double VU = 0.0; @@ -213,4 +209,3 @@ double DFTU::get_onebody_eff_pot(const int T, return VU; } #endif -} // namespace ModuleDFTU \ No newline at end of file diff --git a/source/source_lcao/module_dftu/dftu_yukawa.cpp b/source/source_lcao/module_dftu/dftu_yukawa.cpp index 73a9910052..c05e8acfee 100644 --- a/source/source_lcao/module_dftu/dftu_yukawa.cpp +++ b/source/source_lcao/module_dftu/dftu_yukawa.cpp @@ -1,12 +1,7 @@ -//========================================================== -// Author:Xin Qu #ifdef __LCAO #include "source_io/module_parameter/parameter.h" -// DATE : 2019-12-10 -//========================================================== #include "source_base/constants.h" #include "source_base/global_function.h" -#include "source_pw/module_pwdft/global.h" #include "dftu.h" #include @@ -18,12 +13,10 @@ #include #include -namespace ModuleDFTU -{ -void DFTU::cal_yukawa_lambda(double** rho, const int& nrxx) +void Plus_U::cal_yukawa_lambda(double** rho, const int& nrxx) { - ModuleBase::TITLE("DFTU", "cal_yukawa_lambda"); + ModuleBase::TITLE("Plus_U", "cal_yukawa_lambda"); if (PARAM.inp.yukawa_lambda > 0) { @@ -35,8 +28,10 @@ void DFTU::cal_yukawa_lambda(double** rho, const int& nrxx) double sum_rho_lambda = 0.0; for (int is = 0; is < PARAM.inp.nspin; is++) { - if(PARAM.inp.nspin == 4 && is > 0) { continue;// for non-collinear spin case, first spin contains the charge density -} + if(PARAM.inp.nspin == 4 && is > 0) + { + continue;// for non-collinear spin case, first spin contains the charge density + } for (int ir = 0; ir < nrxx; ir++) { double rho_ir = rho[is][ir]; @@ -63,11 +58,11 @@ void DFTU::cal_yukawa_lambda(double** rho, const int& nrxx) return; } -void DFTU::cal_slater_Fk(const UnitCell& ucell, +void Plus_U::cal_slater_Fk(const UnitCell& ucell, const int L, const int T) { - ModuleBase::TITLE("DFTU", "cal_slater_Fk"); + ModuleBase::TITLE("Plus_U", "cal_slater_Fk"); if (Yukawa) { @@ -113,12 +108,13 @@ void DFTU::cal_slater_Fk(const UnitCell& ucell, return; } -void DFTU::cal_slater_UJ(const UnitCell& ucell, double** rho, const int& nrxx) +void Plus_U::cal_slater_UJ(const UnitCell& ucell, double** rho, const int& nrxx) { - ModuleBase::TITLE("DFTU", "cal_slater_UJ"); - if (!Yukawa) { - return; -} + ModuleBase::TITLE("Plus_U", "cal_slater_UJ"); + if (!Yukawa) + { + return; + } this->cal_yukawa_lambda(rho, nrxx); @@ -146,45 +142,36 @@ void DFTU::cal_slater_UJ(const UnitCell& ucell, double** rho, const int& nrxx) if (L >= PARAM.inp.orbital_corr[T] && PARAM.inp.orbital_corr[T] != -1) { - if (L != PARAM.inp.orbital_corr[T]) { - continue; -} - this->cal_slater_Fk(ucell,L, T); + if (L != PARAM.inp.orbital_corr[T]) + { + continue; + } + this->cal_slater_Fk(ucell,L, T); - for (int n = 0; n < N; n++) - { - if (n != 0) { - continue; -} - switch (L) - { - case 1: // p electrons - this->U_Yukawa[T][L][n] = this->Fk[T][L][n][0]; - this->J_Yukawa[T][L][n] = this->Fk[T][L][n][1] / 5.0; - break; - - case 2: // d electrons - this->U_Yukawa[T][L][n] = this->Fk[T][L][n][0]; - this->J_Yukawa[T][L][n] = (this->Fk[T][L][n][1] + this->Fk[T][L][n][2]) / 14.0; - break; - - case 3: // f electrons - if (Yukawa) { - this->U_Yukawa[T][L][n] = this->Fk[T][L][n][0]; -} - this->J_Yukawa[T][L][n] = (286.0 * this->Fk[T][L][n][1] + 195.0 * this->Fk[T][L][n][2] - + 250.0 * this->Fk[T][L][n][3]) - / 6435.0; - break; - } + if( L == 1) + { + this->U_Yukawa[T][L][0] = this->Fk[T][L][0][0]; + this->J_Yukawa[T][L][0] = this->Fk[T][L][0][1] / 5.0; + } + else if( L == 2) + { + this->U_Yukawa[T][L][0] = this->Fk[T][L][0][0]; + this->J_Yukawa[T][L][0] = (this->Fk[T][L][0][1] + this->Fk[T][L][0][2]) / 14.0; + } + else if( L == 3) + { + this->U_Yukawa[T][L][0] = this->Fk[T][L][0][0]; + this->J_Yukawa[T][L][0] = (286.0 * this->Fk[T][L][0][1] + 195.0 * this->Fk[T][L][0][2] + + 250.0 * this->Fk[T][L][0][3]) + / 6435.0; + } - // Hartree to Rydeberg - this->U_Yukawa[T][L][n] *= 2.0; - this->J_Yukawa[T][L][n] *= 2.0; - // update current U with calculated U-J from Slater integrals - this->U[T] = this->U_Yukawa[T][L][n] - this->J_Yukawa[T][L][n]; - } // end n + // Hartree to Rydeberg + this->U_Yukawa[T][L][0] *= 2.0; + this->J_Yukawa[T][L][0] *= 2.0; + // update current U with calculated U-J from Slater integrals + this->U[T] = this->U_Yukawa[T][L][0] - this->J_Yukawa[T][L][0]; } // end if } // end L } // end T @@ -192,9 +179,9 @@ void DFTU::cal_slater_UJ(const UnitCell& ucell, double** rho, const int& nrxx) return; } -double DFTU::spherical_Bessel(const int k, const double r, const double lambda) +double Plus_U::spherical_Bessel(const int k, const double r, const double lambda) { - ModuleBase::TITLE("DFTU", "spherical_Bessel"); + ModuleBase::TITLE("Plus_U", "spherical_Bessel"); double val=0.0; double x = r * lambda; @@ -247,9 +234,9 @@ double DFTU::spherical_Bessel(const int k, const double r, const double lambda) return val; } -double DFTU::spherical_Hankel(const int k, const double r, const double lambda) +double Plus_U::spherical_Hankel(const int k, const double r, const double lambda) { - ModuleBase::TITLE("DFTU", "spherical_Bessel"); + ModuleBase::TITLE("Plus_U", "spherical_Bessel"); double val=0.0; double x = r * lambda; @@ -305,6 +292,4 @@ double DFTU::spherical_Hankel(const int k, const double r, const double lambda) return val; } -} // namespace ModuleDFTU - -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_gint/biggrid_info.cpp b/source/source_lcao/module_gint/biggrid_info.cpp index f69a7ef0ec..52d1e9f394 100644 --- a/source/source_lcao/module_gint/biggrid_info.cpp +++ b/source/source_lcao/module_gint/biggrid_info.cpp @@ -1,6 +1,7 @@ #include "biggrid_info.h" #include "gint_helper.h" #include "gint_type.h" +#include "source_base/memory.h" namespace ModuleGint { @@ -44,6 +45,12 @@ BigGridInfo::BigGridInfo( meshgrid_coords_[index_1d] = meshgrid_info_->get_cartesian_coord(mgrid_idx_1Dto3D(index_1d)); } + ModuleBase::Memory::record("BigGridInfo::meshgrid_coords", (long long)nmxyz_ * sizeof(Vec3d), true); + } + + BigGridInfo::~BigGridInfo() + { + ModuleBase::Memory::record("BigGridInfo::meshgrid_coords", -(long long)nmxyz_ * sizeof(Vec3d), true); } Vec3i BigGridInfo::max_ext_bgrid_num(double r) const diff --git a/source/source_lcao/module_gint/biggrid_info.h b/source/source_lcao/module_gint/biggrid_info.h index c017f87a3d..65fd225240 100644 --- a/source/source_lcao/module_gint/biggrid_info.h +++ b/source/source_lcao/module_gint/biggrid_info.h @@ -21,6 +21,8 @@ class BigGridInfo Vec3d biggrid_vec2, Vec3d biggrid_vec3, int nmx, int nmy, int nmz); + + ~BigGridInfo(); Vec3d get_cartesian_coord(const Vec3d& index_3d) const { return index_3d * biggrid_latvec0_; } Vec3d get_cartesian_coord(const Vec3i& index_3d) const { return index_3d * biggrid_latvec0_; } diff --git a/source/source_lcao/module_gint/gint_common.cpp b/source/source_lcao/module_gint/gint_common.cpp index 69957f0b38..3588604f59 100644 --- a/source/source_lcao/module_gint/gint_common.cpp +++ b/source/source_lcao/module_gint/gint_common.cpp @@ -316,7 +316,7 @@ void wfc_2d_to_gint(const T* wfc_2d, MPI_Comm_rank(pv.comm(), &rank); // calculate the maximum number of nlocal over all processes in pv.comm() range - long buf_size; + long buf_size = 0; mpi_info = MPI_Reduce(&pv.nloc_wfc, &buf_size, 1, MPI_LONG, MPI_MAX, 0, pv.comm()); mpi_info = MPI_Bcast(&buf_size, 1, MPI_LONG, 0, pv.comm()); // get and then broadcast std::vector wfc_block(buf_size); diff --git a/source/source_lcao/module_gint/gint_dvlocal.cpp b/source/source_lcao/module_gint/gint_dvlocal.cpp index 78a8b91069..7910649b71 100644 --- a/source/source_lcao/module_gint/gint_dvlocal.cpp +++ b/source/source_lcao/module_gint/gint_dvlocal.cpp @@ -33,9 +33,10 @@ void Gint_dvlocal::cal_hr_gint_() std::vector dphi_y; std::vector dphi_z; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { - if(biggrid->get_atoms().empty()) + const auto& biggrid = gint_info_->get_biggrids()[i]; + if(biggrid->get_atoms().size() == 0) { continue; } @@ -71,7 +72,7 @@ void Gint_dvlocal::cal_dvlocal_R_sparseMatrix( std::map, std::map>> pvdpRy_sparseMatrix; std::map, std::map>> pvdpRz_sparseMatrix; - double temp_value_double; + double temp_value_double = 0.0; Vec3d tau1, dtau; for (int iap = 0; iap < pvdpRx.size_atom_pairs(); iap++) diff --git a/source/source_lcao/module_gint/gint_env_gamma.cpp b/source/source_lcao/module_gint/gint_env_gamma.cpp index 71fabbd703..af024edf2f 100644 --- a/source/source_lcao/module_gint/gint_env_gamma.cpp +++ b/source/source_lcao/module_gint/gint_env_gamma.cpp @@ -28,9 +28,10 @@ void Gint_env_gamma::cal_env_band(const int iband) PhiOperator phi_op; std::vector phi; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { - if(biggrid->get_atoms().empty()) + const auto& biggrid = gint_info_->get_biggrids()[i]; + if(biggrid->get_atoms().size() == 0) { continue; } diff --git a/source/source_lcao/module_gint/gint_env_k.cpp b/source/source_lcao/module_gint/gint_env_k.cpp index b92ed8ddfc..4f6ab1c0cf 100644 --- a/source/source_lcao/module_gint/gint_env_k.cpp +++ b/source/source_lcao/module_gint/gint_env_k.cpp @@ -33,9 +33,10 @@ void Gint_env_k::cal_env_band(const int iband) PhiOperator phi_op; std::vector phi; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { - if(biggrid->get_atoms().empty()) + const auto& biggrid = gint_info_->get_biggrids()[i]; + if(biggrid->get_atoms().size() == 0) { continue; } diff --git a/source/source_lcao/module_gint/gint_fvl.cpp b/source/source_lcao/module_gint/gint_fvl.cpp index 3fc9bde005..11a7e1620d 100644 --- a/source/source_lcao/module_gint/gint_fvl.cpp +++ b/source/source_lcao/module_gint/gint_fvl.cpp @@ -49,8 +49,9 @@ void Gint_fvl::cal_fvl_svl_() svl_thread->zero_out(); } #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_fvl_gpu.cpp b/source/source_lcao/module_gint/gint_fvl_gpu.cpp index 1d90304d2c..dffd7616e1 100644 --- a/source/source_lcao/module_gint/gint_fvl_gpu.cpp +++ b/source/source_lcao/module_gint/gint_fvl_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -33,10 +34,10 @@ void Gint_fvl_gpu::transfer_cpu_to_gpu_() for (int is = 0; is < nspin_; is++) { dm_gint_d_vec_[is] = CudaMemWrapper(dm_gint_vec_[is].get_nnr(), 0, false); - checkCuda(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), + CHECK_CUDA(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), dm_gint_vec_[is].get_nnr() * sizeof(double), cudaMemcpyHostToDevice)); vr_eff_d_vec_[is] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_vec_[is].get_device_ptr(), vr_eff_[is], + CHECK_CUDA(cudaMemcpy(vr_eff_d_vec_[is].get_device_ptr(), vr_eff_[is], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } if (isforce_) @@ -81,9 +82,9 @@ void Gint_fvl_gpu::cal_fvl_svl_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); @@ -93,8 +94,9 @@ void Gint_fvl_gpu::cal_fvl_svl_() CudaMemWrapper dphi_z(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -125,8 +127,8 @@ void Gint_fvl_gpu::cal_fvl_svl_() } } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_fvl_meta.cpp b/source/source_lcao/module_gint/gint_fvl_meta.cpp index 3299600c99..728cd042a4 100644 --- a/source/source_lcao/module_gint/gint_fvl_meta.cpp +++ b/source/source_lcao/module_gint/gint_fvl_meta.cpp @@ -61,8 +61,9 @@ void Gint_fvl_meta::cal_fvl_svl_() svl_thread->zero_out(); } #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_fvl_meta_gpu.cpp b/source/source_lcao/module_gint/gint_fvl_meta_gpu.cpp index fa19925d04..59ab3cb2ea 100644 --- a/source/source_lcao/module_gint/gint_fvl_meta_gpu.cpp +++ b/source/source_lcao/module_gint/gint_fvl_meta_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -34,13 +35,13 @@ void Gint_fvl_meta_gpu::transfer_cpu_to_gpu_() for (int is = 0; is < nspin_; is++) { dm_gint_d_vec_[is] = CudaMemWrapper(dm_gint_vec_[is].get_nnr(), 0, false); - checkCuda(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), + CHECK_CUDA(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), dm_gint_vec_[is].get_nnr() * sizeof(double), cudaMemcpyHostToDevice)); vr_eff_d_vec_[is] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_vec_[is].get_device_ptr(), vr_eff_[is], + CHECK_CUDA(cudaMemcpy(vr_eff_d_vec_[is].get_device_ptr(), vr_eff_[is], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); vofk_d_vec_[is] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vofk_d_vec_[is].get_device_ptr(), vofk_[is], + CHECK_CUDA(cudaMemcpy(vofk_d_vec_[is].get_device_ptr(), vofk_[is], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } if (isforce_) @@ -85,9 +86,9 @@ void Gint_fvl_meta_gpu::cal_fvl_svl_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); @@ -108,8 +109,9 @@ void Gint_fvl_meta_gpu::cal_fvl_svl_() CudaMemWrapper ddphi_yz(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper ddphi_zz(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -173,8 +175,8 @@ void Gint_fvl_meta_gpu::cal_fvl_svl_() } } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_info.cpp b/source/source_lcao/module_gint/gint_info.cpp index c21f1879cf..7117d4d63b 100644 --- a/source/source_lcao/module_gint/gint_info.cpp +++ b/source/source_lcao/module_gint/gint_info.cpp @@ -4,6 +4,7 @@ #include "source_base/timer.h" #include "gint_info.h" #include "gint_type.h" +#include "source_base/memory.h" namespace ModuleGint { @@ -62,6 +63,12 @@ GintInfo::GintInfo( #endif } +GintInfo::~GintInfo() +{ + ModuleBase::Memory::record("GintInfo::trace_lo_", -(long long)(sizeof(int) * trace_lo_.size()), true); + ModuleBase::Memory::record("GintInfo::ijr_info_", -(long long)(sizeof(int) * ijr_info_.size()), true); +} + template HContainer GintInfo::get_hr(int npol) const { @@ -194,6 +201,7 @@ void GintInfo::init_trace_lo_(const UnitCell& ucell, const int nspin) ++iat; } } + ModuleBase::Memory::record("GintInfo::trace_lo_", (long long)(sizeof(int) * trace_lo_.size()), true); } void GintInfo::init_ijr_info_(const UnitCell& ucell, Grid_Driver& gd) @@ -260,6 +268,7 @@ void GintInfo::init_ijr_info_(const UnitCell& ucell, Grid_Driver& gd) } } this->ijr_info_ = hr_gint_local.get_ijr_info(); + ModuleBase::Memory::record("GintInfo::ijr_info_", (long long)(sizeof(int) * ijr_info_.size()), true); return; } diff --git a/source/source_lcao/module_gint/gint_info.h b/source/source_lcao/module_gint/gint_info.h index a2e35b6642..2f36548a45 100644 --- a/source/source_lcao/module_gint/gint_info.h +++ b/source/source_lcao/module_gint/gint_info.h @@ -33,8 +33,11 @@ class GintInfo const Numerical_Orbital* Phi, const UnitCell& ucell, Grid_Driver& gd); + ~GintInfo(); + // getter functions const std::vector>& get_biggrids() { return biggrids_; } + int get_bgrids_num() const { return static_cast(biggrids_.size()); } const std::vector& get_trace_lo() const{ return trace_lo_; } int get_lgd() const { return lgd_; } int get_nat() const { return ucell_->nat; } // return the number of atoms in the unitcell @@ -103,6 +106,7 @@ class GintInfo #ifdef __CUDA public: std::vector>& get_bgrid_batches() { return bgrid_batches_; }; + int get_bgrid_batches_num() const { return static_cast(bgrid_batches_.size()); }; std::shared_ptr get_gpu_vars() const { return gpu_vars_; }; int get_dev_id() const { return gpu_vars_->dev_id_; }; int get_streams_num() const { return streams_num_; }; diff --git a/source/source_lcao/module_gint/gint_rho.cpp b/source/source_lcao/module_gint/gint_rho.cpp index c96b10a731..709be0507f 100644 --- a/source/source_lcao/module_gint/gint_rho.cpp +++ b/source/source_lcao/module_gint/gint_rho.cpp @@ -33,8 +33,9 @@ void Gint_rho::cal_rho_() std::vector phi; std::vector phi_dm; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_rho_gpu.cpp b/source/source_lcao/module_gint/gint_rho_gpu.cpp index ca24002579..21f19d9ac0 100644 --- a/source/source_lcao/module_gint/gint_rho_gpu.cpp +++ b/source/source_lcao/module_gint/gint_rho_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -34,7 +35,7 @@ void Gint_rho_gpu::transfer_cpu_to_gpu_() { dm_gint_d_vec_[is] = CudaMemWrapper(dm_gint_vec_[is].get_nnr(), 0, false); rho_d_vec_[is] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), + CHECK_CUDA(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), dm_gint_vec_[is].get_nnr() * sizeof(double), cudaMemcpyHostToDevice)); } } @@ -43,7 +44,7 @@ void Gint_rho_gpu::transfer_gpu_to_cpu_() { for (int is = 0; is < nspin_; is++) { - checkCuda(cudaMemcpy(rho_[is], rho_d_vec_[is].get_device_ptr(), + CHECK_CUDA(cudaMemcpy(rho_[is], rho_d_vec_[is].get_device_ptr(), gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyDeviceToHost)); } } @@ -55,15 +56,16 @@ void Gint_rho_gpu::cal_rho_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_dm(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -77,8 +79,8 @@ void Gint_rho_gpu::cal_rho_() phi_op.phi_dot_phi(phi.get_device_ptr(), phi_dm.get_device_ptr(), rho_d_vec_[is].get_device_ptr()); } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_tau.cpp b/source/source_lcao/module_gint/gint_tau.cpp index 1b5e282384..eb42b55b21 100644 --- a/source/source_lcao/module_gint/gint_tau.cpp +++ b/source/source_lcao/module_gint/gint_tau.cpp @@ -37,8 +37,9 @@ void Gint_tau::cal_tau_() std::vector dphi_y_dm; std::vector dphi_z_dm; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_tau_gpu.cpp b/source/source_lcao/module_gint/gint_tau_gpu.cpp index cbeeead322..e7a6fca781 100644 --- a/source/source_lcao/module_gint/gint_tau_gpu.cpp +++ b/source/source_lcao/module_gint/gint_tau_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -34,7 +35,7 @@ void Gint_tau_gpu::transfer_cpu_to_gpu_() { dm_gint_d_vec_[is] = CudaMemWrapper(dm_gint_vec_[is].get_nnr(), 0, false); kin_d_vec_[is] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), + CHECK_CUDA(cudaMemcpy(dm_gint_d_vec_[is].get_device_ptr(), dm_gint_vec_[is].get_wrapper(), dm_gint_vec_[is].get_nnr() * sizeof(double), cudaMemcpyHostToDevice)); } } @@ -43,7 +44,7 @@ void Gint_tau_gpu::transfer_gpu_to_cpu_() { for (int is = 0; is < nspin_; is++) { - checkCuda(cudaMemcpy(kin_[is], kin_d_vec_[is].get_device_ptr(), + CHECK_CUDA(cudaMemcpy(kin_[is], kin_d_vec_[is].get_device_ptr(), gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyDeviceToHost)); } } @@ -55,9 +56,9 @@ void Gint_tau_gpu::cal_tau_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper dphi_x(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper dphi_y(BatchBigGrid::get_max_phi_len(), stream, false); @@ -66,8 +67,9 @@ void Gint_tau_gpu::cal_tau_() CudaMemWrapper dphi_y_dm(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper dphi_z_dm(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -89,8 +91,8 @@ void Gint_tau_gpu::cal_tau_() phi_op.phi_dot_phi(dphi_z.get_device_ptr(), dphi_z_dm.get_device_ptr(), kin_d_vec_[is].get_device_ptr()); } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_vl.cpp b/source/source_lcao/module_gint/gint_vl.cpp index 3cdd3c4549..4194bc77cb 100644 --- a/source/source_lcao/module_gint/gint_vl.cpp +++ b/source/source_lcao/module_gint/gint_vl.cpp @@ -34,9 +34,10 @@ void Gint_vl::cal_hr_gint_() std::vector phi; std::vector phi_vldr3; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { - if(biggrid->get_atoms().empty()) + const auto& biggrid = gint_info_->get_biggrids()[i]; + if(biggrid->get_atoms().size() == 0) { continue; } diff --git a/source/source_lcao/module_gint/gint_vl_gpu.cpp b/source/source_lcao/module_gint/gint_vl_gpu.cpp index fe9162bc4e..3d07a080e5 100644 --- a/source/source_lcao/module_gint/gint_vl_gpu.cpp +++ b/source/source_lcao/module_gint/gint_vl_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -27,13 +28,13 @@ void Gint_vl_gpu::transfer_cpu_to_gpu_() { hr_gint_d_ = CudaMemWrapper(hr_gint_.get_nnr(), 0, false); vr_eff_d_ = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_.get_device_ptr(), vr_eff_, + CHECK_CUDA(cudaMemcpy(vr_eff_d_.get_device_ptr(), vr_eff_, gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } void Gint_vl_gpu::transfer_gpu_to_cpu_() { - checkCuda(cudaMemcpy(hr_gint_.get_wrapper(), hr_gint_d_.get_device_ptr(), + CHECK_CUDA(cudaMemcpy(hr_gint_.get_wrapper(), hr_gint_d_.get_device_ptr(), hr_gint_.get_nnr() * sizeof(double), cudaMemcpyDeviceToHost)); } @@ -44,15 +45,16 @@ void Gint_vl_gpu::cal_hr_gint_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -64,8 +66,8 @@ void Gint_vl_gpu::cal_hr_gint_() phi_op.phi_mul_phi(phi.get_device_ptr(), phi_vldr3.get_device_ptr(), hr_gint_, hr_gint_d_.get_device_ptr()); } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_vl_metagga.cpp b/source/source_lcao/module_gint/gint_vl_metagga.cpp index 56dd2ff6b0..a24fe5fe86 100644 --- a/source/source_lcao/module_gint/gint_vl_metagga.cpp +++ b/source/source_lcao/module_gint/gint_vl_metagga.cpp @@ -40,8 +40,9 @@ void Gint_vl_metagga::cal_hr_gint_() std::vector dphi_y_vldr3; std::vector dphi_z_vldr3; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_vl_metagga_gpu.cpp b/source/source_lcao/module_gint/gint_vl_metagga_gpu.cpp index 9c2dad8421..c63b361668 100644 --- a/source/source_lcao/module_gint/gint_vl_metagga_gpu.cpp +++ b/source/source_lcao/module_gint/gint_vl_metagga_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -32,15 +33,15 @@ void Gint_vl_metagga_gpu::transfer_cpu_to_gpu_() hr_gint_d_ = CudaMemWrapper(hr_gint_.get_nnr(), 0, false); vr_eff_d_ = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); vofk_d_ = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_.get_device_ptr(), vr_eff_, + CHECK_CUDA(cudaMemcpy(vr_eff_d_.get_device_ptr(), vr_eff_, gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); - checkCuda(cudaMemcpy(vofk_d_.get_device_ptr(), vofk_, + CHECK_CUDA(cudaMemcpy(vofk_d_.get_device_ptr(), vofk_, gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } void Gint_vl_metagga_gpu::transfer_gpu_to_cpu_() { - checkCuda(cudaMemcpy(hr_gint_.get_wrapper(), hr_gint_d_.get_device_ptr(), + CHECK_CUDA(cudaMemcpy(hr_gint_.get_wrapper(), hr_gint_d_.get_device_ptr(), hr_gint_.get_nnr() * sizeof(double), cudaMemcpyDeviceToHost)); } @@ -51,9 +52,9 @@ void Gint_vl_metagga_gpu::cal_hr_gint_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); @@ -64,8 +65,9 @@ void Gint_vl_metagga_gpu::cal_hr_gint_() CudaMemWrapper dphi_y_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper dphi_z_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -90,8 +92,8 @@ void Gint_vl_metagga_gpu::cal_hr_gint_() phi_op.phi_mul_phi(dphi_z.get_device_ptr(), dphi_z_vldr3.get_device_ptr(), hr_gint_, hr_gint_d_.get_device_ptr()); } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_vl_metagga_nspin4.cpp b/source/source_lcao/module_gint/gint_vl_metagga_nspin4.cpp index 5b4c45e5db..229152ea9b 100644 --- a/source/source_lcao/module_gint/gint_vl_metagga_nspin4.cpp +++ b/source/source_lcao/module_gint/gint_vl_metagga_nspin4.cpp @@ -41,8 +41,9 @@ void Gint_vl_metagga_nspin4::cal_hr_gint_() std::vector dphi_y_vldr3; std::vector dphi_z_vldr3; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_vl_metagga_nspin4_gpu.cpp b/source/source_lcao/module_gint/gint_vl_metagga_nspin4_gpu.cpp index ec8b940710..90e7119446 100644 --- a/source/source_lcao/module_gint/gint_vl_metagga_nspin4_gpu.cpp +++ b/source/source_lcao/module_gint/gint_vl_metagga_nspin4_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -36,9 +37,9 @@ void Gint_vl_metagga_nspin4_gpu::transfer_cpu_to_gpu_() hr_gint_part_d_[i] = CudaMemWrapper(hr_gint_part_[i].get_nnr(), 0, false); vr_eff_d_[i] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); vofk_d_[i] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_[i].get_device_ptr(), vr_eff_[i], + CHECK_CUDA(cudaMemcpy(vr_eff_d_[i].get_device_ptr(), vr_eff_[i], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); - checkCuda(cudaMemcpy(vofk_d_[i].get_device_ptr(), vofk_[i], + CHECK_CUDA(cudaMemcpy(vofk_d_[i].get_device_ptr(), vofk_[i], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } } @@ -47,7 +48,7 @@ void Gint_vl_metagga_nspin4_gpu::transfer_gpu_to_cpu_() { for(int i = 0; i < nspin_; i++) { - checkCuda(cudaMemcpy(hr_gint_part_[i].get_wrapper(), hr_gint_part_d_[i].get_device_ptr(), + CHECK_CUDA(cudaMemcpy(hr_gint_part_[i].get_wrapper(), hr_gint_part_d_[i].get_device_ptr(), hr_gint_part_[i].get_nnr() * sizeof(double), cudaMemcpyDeviceToHost)); } } @@ -59,9 +60,9 @@ void Gint_vl_metagga_nspin4_gpu::cal_hr_gint_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); @@ -72,8 +73,9 @@ void Gint_vl_metagga_nspin4_gpu::cal_hr_gint_() CudaMemWrapper dphi_y_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper dphi_z_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -101,8 +103,8 @@ void Gint_vl_metagga_nspin4_gpu::cal_hr_gint_() hr_gint_part_[is], hr_gint_part_d_[is].get_device_ptr()); } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/gint_vl_nspin4.cpp b/source/source_lcao/module_gint/gint_vl_nspin4.cpp index 14350eb218..576200397a 100644 --- a/source/source_lcao/module_gint/gint_vl_nspin4.cpp +++ b/source/source_lcao/module_gint/gint_vl_nspin4.cpp @@ -34,8 +34,9 @@ void Gint_vl_nspin4::cal_hr_gint_() std::vector phi; std::vector phi_vldr3; #pragma omp for schedule(dynamic) - for(const auto& biggrid: gint_info_->get_biggrids()) + for (int i = 0; i < gint_info_->get_bgrids_num(); i++) { + const auto& biggrid = gint_info_->get_biggrids()[i]; if(biggrid->get_atoms().size() == 0) { continue; diff --git a/source/source_lcao/module_gint/gint_vl_nspin4_gpu.cpp b/source/source_lcao/module_gint/gint_vl_nspin4_gpu.cpp index 4f9b86c0b4..6e4bd2b8c9 100644 --- a/source/source_lcao/module_gint/gint_vl_nspin4_gpu.cpp +++ b/source/source_lcao/module_gint/gint_vl_nspin4_gpu.cpp @@ -3,6 +3,7 @@ #include "gint_helper.h" #include "batch_biggrid.h" #include "kernel/phi_operator_gpu.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -34,7 +35,7 @@ void Gint_vl_nspin4_gpu::transfer_cpu_to_gpu_() { hr_gint_part_d_[i] = CudaMemWrapper(hr_gint_part_[i].get_nnr(), 0, false); vr_eff_d_[i] = CudaMemWrapper(gint_info_->get_local_mgrid_num(), 0, false); - checkCuda(cudaMemcpy(vr_eff_d_[i].get_device_ptr(), vr_eff_[i], + CHECK_CUDA(cudaMemcpy(vr_eff_d_[i].get_device_ptr(), vr_eff_[i], gint_info_->get_local_mgrid_num() * sizeof(double), cudaMemcpyHostToDevice)); } } @@ -43,7 +44,7 @@ void Gint_vl_nspin4_gpu::transfer_gpu_to_cpu_() { for(int i = 0; i < nspin_; i++) { - checkCuda(cudaMemcpy(hr_gint_part_[i].get_wrapper(), hr_gint_part_d_[i].get_device_ptr(), + CHECK_CUDA(cudaMemcpy(hr_gint_part_[i].get_wrapper(), hr_gint_part_d_[i].get_device_ptr(), hr_gint_part_[i].get_nnr() * sizeof(double), cudaMemcpyDeviceToHost)); } } @@ -56,15 +57,16 @@ void Gint_vl_nspin4_gpu::cal_hr_gint_() { // 20240620 Note that it must be set again here because // cuda's device is not safe in a multi-threaded environment. - checkCuda(cudaSetDevice(gint_info_->get_dev_id())); + CHECK_CUDA(cudaSetDevice(gint_info_->get_dev_id())); cudaStream_t stream; - checkCuda(cudaStreamCreate(&stream)); + CHECK_CUDA(cudaStreamCreate(&stream)); PhiOperatorGpu phi_op(gint_info_->get_gpu_vars(), stream); CudaMemWrapper phi(BatchBigGrid::get_max_phi_len(), stream, false); CudaMemWrapper phi_vldr3(BatchBigGrid::get_max_phi_len(), stream, false); #pragma omp for schedule(dynamic) - for(const auto& bgrid_batch: gint_info_->get_bgrid_batches()) + for (int i = 0; i < gint_info_->get_bgrid_batches_num(); ++i) { + const auto& bgrid_batch = gint_info_->get_bgrid_batches()[i]; if(bgrid_batch->empty()) { continue; @@ -79,8 +81,8 @@ void Gint_vl_nspin4_gpu::cal_hr_gint_() hr_gint_part_[is], hr_gint_part_d_[is].get_device_ptr()); } } - checkCuda(cudaStreamSynchronize(stream)); - checkCuda(cudaStreamDestroy(stream)); + CHECK_CUDA(cudaStreamSynchronize(stream)); + CHECK_CUDA(cudaStreamDestroy(stream)); } transfer_gpu_to_cpu_(); } diff --git a/source/source_lcao/module_gint/kernel/cuda_mem_wrapper.h b/source/source_lcao/module_gint/kernel/cuda_mem_wrapper.h index 9b7ad27e83..0da5386553 100644 --- a/source/source_lcao/module_gint/kernel/cuda_mem_wrapper.h +++ b/source/source_lcao/module_gint/kernel/cuda_mem_wrapper.h @@ -1,7 +1,7 @@ #pragma once #include #include "source_base/tool_quit.h" -#include "gint_helper.cuh" +#include "source_base/module_device/device_check.h" template class CudaMemWrapper @@ -55,14 +55,14 @@ class CudaMemWrapper if (malloc_host) { - checkCuda(cudaMallocHost((void**)&host_ptr_, size_* sizeof(T))); + CHECK_CUDA(cudaMallocHost((void**)&host_ptr_, size_* sizeof(T))); memset(host_ptr_, 0, size_ * sizeof(T)); } else { host_ptr_ = nullptr; } - checkCuda(cudaMalloc((void**)&device_ptr_, size_ * sizeof(T))); - checkCuda(cudaMemset(device_ptr_, 0, size_ * sizeof(T))); + CHECK_CUDA(cudaMalloc((void**)&device_ptr_, size_ * sizeof(T))); + CHECK_CUDA(cudaMemset(device_ptr_, 0, size_ * sizeof(T))); } ~CudaMemWrapper() @@ -74,7 +74,7 @@ class CudaMemWrapper { if (host_ptr_ == nullptr) { ModuleBase::WARNING_QUIT("cuda_mem_wrapper", "Host pointer is null, cannot copy to device."); } - checkCuda(cudaMemcpy(device_ptr_, host_ptr_, size * sizeof(T), cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemcpy(device_ptr_, host_ptr_, size * sizeof(T), cudaMemcpyHostToDevice)); } void copy_host_to_device_sync() @@ -86,7 +86,7 @@ class CudaMemWrapper { if (host_ptr_ == nullptr) { ModuleBase::WARNING_QUIT("cuda_mem_wrapper", "Host pointer is null, cannot copy to device."); } - checkCuda(cudaMemcpyAsync(device_ptr_, host_ptr_, size * sizeof(T), cudaMemcpyHostToDevice, stream_)); + CHECK_CUDA(cudaMemcpyAsync(device_ptr_, host_ptr_, size * sizeof(T), cudaMemcpyHostToDevice, stream_)); } void copy_host_to_device_async() @@ -98,7 +98,7 @@ class CudaMemWrapper { if (host_ptr_ == nullptr) { ModuleBase::WARNING_QUIT("cuda_mem_wrapper", "Host pointer is null, cannot copy to host."); } - checkCuda(cudaMemcpy(host_ptr_, device_ptr_, size * sizeof(T), cudaMemcpyDeviceToHost)); + CHECK_CUDA(cudaMemcpy(host_ptr_, device_ptr_, size * sizeof(T), cudaMemcpyDeviceToHost)); } void copy_device_to_host_sync() @@ -110,7 +110,7 @@ class CudaMemWrapper { if (host_ptr_ == nullptr) { ModuleBase::WARNING_QUIT("cuda_mem_wrapper", "Host pointer is null, cannot copy to host."); } - checkCuda(cudaMemcpyAsync(host_ptr_, device_ptr_, size * sizeof(T), cudaMemcpyDeviceToHost, stream_)); + CHECK_CUDA(cudaMemcpyAsync(host_ptr_, device_ptr_, size * sizeof(T), cudaMemcpyDeviceToHost, stream_)); } void copy_device_to_host_async() @@ -120,7 +120,7 @@ class CudaMemWrapper void memset_device_sync(const size_t size, const int value = 0) { - checkCuda(cudaMemset(device_ptr_, value, size * sizeof(T))); + CHECK_CUDA(cudaMemset(device_ptr_, value, size * sizeof(T))); } void memset_device_sync(const int value = 0) @@ -130,7 +130,7 @@ class CudaMemWrapper void memset_device_async(const size_t size, const int value = 0) { - checkCuda(cudaMemsetAsync(device_ptr_, value, size * sizeof(T), stream_)); + CHECK_CUDA(cudaMemsetAsync(device_ptr_, value, size * sizeof(T), stream_)); } void memset_device_async(const int value = 0) @@ -142,7 +142,7 @@ class CudaMemWrapper { if (host_ptr_ == nullptr) { ModuleBase::WARNING_QUIT("cuda_mem_wrapper", "Host pointer is null, cannot memset host."); } - checkCuda(cudaMemset(host_ptr_, value, size * sizeof(T))); + CHECK_CUDA(cudaMemset(host_ptr_, value, size * sizeof(T))); } void memset_host(const int value = 0) @@ -152,8 +152,8 @@ class CudaMemWrapper void free() { - checkCuda(cudaFree(device_ptr_)); - checkCuda(cudaFreeHost(host_ptr_)); + CHECK_CUDA(cudaFree(device_ptr_)); + CHECK_CUDA(cudaFreeHost(host_ptr_)); } T* get_device_ptr() { return device_ptr_; } diff --git a/source/source_lcao/module_gint/kernel/gemm_nn_vbatch.cuh b/source/source_lcao/module_gint/kernel/gemm_nn_vbatch.cuh index 02f558aabd..6af0943769 100644 --- a/source/source_lcao/module_gint/kernel/gemm_nn_vbatch.cuh +++ b/source/source_lcao/module_gint/kernel/gemm_nn_vbatch.cuh @@ -9,6 +9,8 @@ #include "gint_helper.cuh" #include #include "source_base/module_device/device.h" +#include "source_base/module_device/device_check.h" +#include "source_base/module_device/kernel_compat.h" #define sA(i, j) sA[(j)*slda + (i)] #define sB(i, j) sB[(j)*sldb + (i)] @@ -420,7 +422,7 @@ void vbatched_gemm_nn_impl(int max_m, global_A_array + i, global_lda + i, global_C_array + i, global_ldc + i, alpha_tmp); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } } diff --git a/source/source_lcao/module_gint/kernel/gemm_tn_vbatch.cuh b/source/source_lcao/module_gint/kernel/gemm_tn_vbatch.cuh index fb96a8434f..7a654cedce 100644 --- a/source/source_lcao/module_gint/kernel/gemm_tn_vbatch.cuh +++ b/source/source_lcao/module_gint/kernel/gemm_tn_vbatch.cuh @@ -9,6 +9,8 @@ #include "gint_helper.cuh" #include #include "source_base/module_device/device.h" +#include "source_base/module_device/device_check.h" +#include "source_base/module_device/kernel_compat.h" #define sA(i, j) sA[(j)*slda + (i)] #define sB(i, j) sB[(j)*sldb + (i)] @@ -445,7 +447,7 @@ void vbatched_gemm_tn_impl(int max_m, global_A_array + i, global_lda + i, global_C_array + i, global_ldc + i, alpha_tmp); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } } diff --git a/source/source_lcao/module_gint/kernel/gint_gpu_vars.cpp b/source/source_lcao/module_gint/kernel/gint_gpu_vars.cpp index f81af2779c..1b893b36c4 100644 --- a/source/source_lcao/module_gint/kernel/gint_gpu_vars.cpp +++ b/source/source_lcao/module_gint/kernel/gint_gpu_vars.cpp @@ -1,5 +1,6 @@ #include "gint_gpu_vars.h" #include "source_base/module_device/device.h" +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -8,16 +9,11 @@ GintGpuVars::GintGpuVars(std::shared_ptr biggrid_info, const UnitCell& ucell, const Numerical_Orbital* Phi) { -// set device +// GPU device is already bound by DeviceContext::init() in read_input.cpp +// Just get the device_id from DeviceContext for use in destructor #ifdef __MPI - dev_id_ = base_device::information::set_device_by_rank(); + dev_id_ = base_device::DeviceContext::instance().get_device_id(); #endif - std::vector ylmcoef_h(100); - for (int i = 0; i < 100; i++) - { - ylmcoef_h[i] = ModuleBase::Ylm::ylmcoef[i]; - } - set_ylmcoe_d(ylmcoef_h.data(), &ylmcoef_d); const int ntype = ucell.ntype; std::vector atom_nw_h(ntype); @@ -27,10 +23,10 @@ GintGpuVars::GintGpuVars(std::shared_ptr biggrid_info, atom_nw_h[i] = ucell.atoms[i].nw; ucell_atom_nwl_h[i] = ucell.atoms[i].nwl; } - checkCuda(cudaMalloc((void**)&atom_nw_d, sizeof(int) * ntype)); - checkCuda(cudaMemcpy(atom_nw_d, atom_nw_h.data(), sizeof(int) * ntype, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&ucell_atom_nwl_d, sizeof(int) * ntype)); - checkCuda(cudaMemcpy(ucell_atom_nwl_d, ucell_atom_nwl_h.data(), sizeof(int) * ntype, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&atom_nw_d, sizeof(int) * ntype)); + CHECK_CUDA(cudaMemcpy(atom_nw_d, atom_nw_h.data(), sizeof(int) * ntype, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&ucell_atom_nwl_d, sizeof(int) * ntype)); + CHECK_CUDA(cudaMemcpy(ucell_atom_nwl_d, ucell_atom_nwl_h.data(), sizeof(int) * ntype, cudaMemcpyHostToDevice)); dr_uniform = Phi[0].PhiLN(0, 0).dr_uniform; double max_rcut = 0; @@ -43,8 +39,8 @@ GintGpuVars::GintGpuVars(std::shared_ptr biggrid_info, max_rcut = rcut_h[i]; } } - checkCuda(cudaMalloc((void**)&rcut_d, sizeof(double) * ntype)); - checkCuda(cudaMemcpy(rcut_d, rcut_h.data(), sizeof(double) * ntype, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&rcut_d, sizeof(double) * ntype)); + CHECK_CUDA(cudaMemcpy(rcut_d, rcut_h.data(), sizeof(double) * ntype, cudaMemcpyHostToDevice)); nr_max = static_cast(1 / dr_uniform * max_rcut) + 10; nwmax = ucell.nwmax; @@ -75,18 +71,18 @@ GintGpuVars::GintGpuVars(std::shared_ptr biggrid_info, } } - checkCuda(cudaMalloc((void**)&atom_iw2_new_d, sizeof(bool) * ntype * nwmax)); - checkCuda(cudaMemcpy(atom_iw2_new_d, atom_iw2_new_h.data(), sizeof(bool) * ntype * nwmax, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&atom_iw2_ylm_d, sizeof(int) * ntype * nwmax)); - checkCuda(cudaMemcpy(atom_iw2_ylm_d, atom_iw2_ylm_h.data(), sizeof(int) * ntype * nwmax, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&atom_iw2_l_d, sizeof(int) * ntype * nwmax)); - checkCuda(cudaMemcpy(atom_iw2_l_d, atom_iw2_l_h.data(), sizeof(int) * ntype * nwmax, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&psi_u_d, sizeof(double) * ntype * nwmax * nr_max)); - checkCuda(cudaMemcpy(psi_u_d, psi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&dpsi_u_d, sizeof(double) * ntype * nwmax * nr_max)); - checkCuda(cudaMemcpy(dpsi_u_d, dpsi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&d2psi_u_d, sizeof(double) * ntype * nwmax * nr_max)); - checkCuda(cudaMemcpy(d2psi_u_d, d2psi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&atom_iw2_new_d, sizeof(bool) * ntype * nwmax)); + CHECK_CUDA(cudaMemcpy(atom_iw2_new_d, atom_iw2_new_h.data(), sizeof(bool) * ntype * nwmax, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&atom_iw2_ylm_d, sizeof(int) * ntype * nwmax)); + CHECK_CUDA(cudaMemcpy(atom_iw2_ylm_d, atom_iw2_ylm_h.data(), sizeof(int) * ntype * nwmax, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&atom_iw2_l_d, sizeof(int) * ntype * nwmax)); + CHECK_CUDA(cudaMemcpy(atom_iw2_l_d, atom_iw2_l_h.data(), sizeof(int) * ntype * nwmax, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&psi_u_d, sizeof(double) * ntype * nwmax * nr_max)); + CHECK_CUDA(cudaMemcpy(psi_u_d, psi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&dpsi_u_d, sizeof(double) * ntype * nwmax * nr_max)); + CHECK_CUDA(cudaMemcpy(dpsi_u_d, dpsi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&d2psi_u_d, sizeof(double) * ntype * nwmax * nr_max)); + CHECK_CUDA(cudaMemcpy(d2psi_u_d, d2psi_u_h.data(), sizeof(double) * ntype * nwmax * nr_max, cudaMemcpyHostToDevice)); const int mgrid_num = biggrid_info->get_mgrids_num(); std::vector mgrids_pos_h(mgrid_num); @@ -96,29 +92,29 @@ GintGpuVars::GintGpuVars(std::shared_ptr biggrid_info, mgrids_pos_h[i].y = biggrid_info->get_mgrid_coord(i).y; mgrids_pos_h[i].z = biggrid_info->get_mgrid_coord(i).z; } - checkCuda(cudaMalloc((void**)&mgrids_pos_d, sizeof(double3) * mgrid_num)); - checkCuda(cudaMemcpy(mgrids_pos_d, mgrids_pos_h.data(), sizeof(double3) * mgrid_num, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&mgrids_pos_d, sizeof(double3) * mgrid_num)); + CHECK_CUDA(cudaMemcpy(mgrids_pos_d, mgrids_pos_h.data(), sizeof(double3) * mgrid_num, cudaMemcpyHostToDevice)); - checkCuda(cudaMalloc((void**)&iat2it_d, sizeof(int) * ucell.nat)); - checkCuda(cudaMemcpy(iat2it_d, ucell.iat2it, sizeof(int) * ucell.nat, cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMalloc((void**)&iat2it_d, sizeof(int) * ucell.nat)); + CHECK_CUDA(cudaMemcpy(iat2it_d, ucell.iat2it, sizeof(int) * ucell.nat, cudaMemcpyHostToDevice)); } GintGpuVars::~GintGpuVars() { #ifdef __MPI - checkCuda(cudaSetDevice(dev_id_)); + CHECK_CUDA(cudaSetDevice(dev_id_)); #endif - checkCuda(cudaFree(rcut_d)); - checkCuda(cudaFree(atom_nw_d)); - checkCuda(cudaFree(ucell_atom_nwl_d)); - checkCuda(cudaFree(atom_iw2_new_d)); - checkCuda(cudaFree(atom_iw2_ylm_d)); - checkCuda(cudaFree(atom_iw2_l_d)); - checkCuda(cudaFree(psi_u_d)); - checkCuda(cudaFree(dpsi_u_d)); - checkCuda(cudaFree(d2psi_u_d)); - checkCuda(cudaFree(mgrids_pos_d)); - checkCuda(cudaFree(iat2it_d)); + CHECK_CUDA(cudaFree(rcut_d)); + CHECK_CUDA(cudaFree(atom_nw_d)); + CHECK_CUDA(cudaFree(ucell_atom_nwl_d)); + CHECK_CUDA(cudaFree(atom_iw2_new_d)); + CHECK_CUDA(cudaFree(atom_iw2_ylm_d)); + CHECK_CUDA(cudaFree(atom_iw2_l_d)); + CHECK_CUDA(cudaFree(psi_u_d)); + CHECK_CUDA(cudaFree(dpsi_u_d)); + CHECK_CUDA(cudaFree(d2psi_u_d)); + CHECK_CUDA(cudaFree(mgrids_pos_d)); + CHECK_CUDA(cudaFree(iat2it_d)); } } \ No newline at end of file diff --git a/source/source_lcao/module_gint/kernel/gint_gpu_vars.h b/source/source_lcao/module_gint/kernel/gint_gpu_vars.h index 5f711aa6a0..e37b63ffdb 100644 --- a/source/source_lcao/module_gint/kernel/gint_gpu_vars.h +++ b/source/source_lcao/module_gint/kernel/gint_gpu_vars.h @@ -22,8 +22,6 @@ class GintGpuVars int nwmax; double dr_uniform; double nr_max; - // ylmcoef_d is __constant__ memory, no need to cudaFree - double* ylmcoef_d = nullptr; double* rcut_d = nullptr; int* atom_nw_d = nullptr; int* ucell_atom_nwl_d = nullptr; diff --git a/source/source_lcao/module_gint/kernel/gint_helper.cuh b/source/source_lcao/module_gint/kernel/gint_helper.cuh index 7a6e925531..eae5953654 100644 --- a/source/source_lcao/module_gint/kernel/gint_helper.cuh +++ b/source/source_lcao/module_gint/kernel/gint_helper.cuh @@ -29,7 +29,7 @@ __forceinline__ __device__ T pow_int(const T base, const int exp) template __forceinline__ __device__ T warpReduceSum(T val) -{ +{ val += __shfl_xor_sync(0xffffffff, val, 16, 32); val += __shfl_xor_sync(0xffffffff, val, 8, 32); val += __shfl_xor_sync(0xffffffff, val, 4, 32); @@ -40,36 +40,6 @@ __forceinline__ __device__ T warpReduceSum(T val) inline int ceil_div(const int a, const int b) { - return a / b + (a % b != 0 && (a ^ b) > 0); -} - -inline void check(cudaError_t result, char const *const func, const char *const file, - int const line) { - if (result) { - fprintf(stderr, "CUDA error at %s:%d code=%d(%s) \"%s\" \n", file, line, - static_cast(result), cudaGetErrorString(result), func); - exit(EXIT_FAILURE); - } -} - -inline void __getLastCudaError(const char *file, - const int line) -{ - cudaError_t err = cudaGetLastError(); - - if (cudaSuccess != err) { - fprintf(stderr, - "%s(%i) : getLastCudaError() CUDA error :" - " (%d) %s.\n", - file, line, static_cast(err), - cudaGetErrorString(err)); - exit(EXIT_FAILURE); - } + return a / b + (a % b != 0 && (a ^ b) > 0); } -// This will output the proper CUDA error strings in the event -// that a CUDA host call returns an error -#define checkCuda(val) check((val), #val, __FILE__, __LINE__) - -// This will output the proper error string when calling cudaGetLastError -#define checkCudaLastError() __getLastCudaError(__FILE__, __LINE__) \ No newline at end of file diff --git a/source/source_lcao/module_gint/kernel/phi_operator_gpu.cu b/source/source_lcao/module_gint/kernel/phi_operator_gpu.cu index edc07959d4..2ee09938f9 100644 --- a/source/source_lcao/module_gint/kernel/phi_operator_gpu.cu +++ b/source/source_lcao/module_gint/kernel/phi_operator_gpu.cu @@ -2,6 +2,7 @@ #include "phi_operator_kernel.cuh" #include "dgemm_vbatch.h" #include +#include "source_base/module_device/device_check.h" namespace ModuleGint { @@ -27,12 +28,12 @@ gemm_B_(BatchBigGrid::get_max_atom_pairs_num(), stream_, true), gemm_C_(BatchBigGrid::get_max_atom_pairs_num(), stream_, true), gemm_alpha_(BatchBigGrid::get_max_atom_pairs_num(), stream_, true) { - checkCuda(cudaEventCreateWithFlags(&event_, cudaEventDisableTiming)); + CHECK_CUDA(cudaEventCreateWithFlags(&event_, cudaEventDisableTiming)); } PhiOperatorGpu::~PhiOperatorGpu() { - checkCuda(cudaEventDestroy(event_)); + CHECK_CUDA(cudaEventDestroy(event_)); } void PhiOperatorGpu::set_bgrid_batch(std::shared_ptr bgrid_batch) @@ -51,7 +52,7 @@ void PhiOperatorGpu::set_bgrid_batch(std::shared_ptr bgrid_batch) phi_len_ = 0; int phi_start = 0; std::vector mgrids_local_idx; - checkCuda(cudaEventSynchronize(event_)); + CHECK_CUDA(cudaEventSynchronize(event_)); for (const auto& bgrid : bgrid_batch->get_bgrids()) { atoms_num_info_h[i] = make_int2(bgrid->get_atoms_num(), atoms_accum); @@ -83,12 +84,12 @@ void PhiOperatorGpu::set_bgrid_batch(std::shared_ptr bgrid_batch) atoms_bgrids_rcoords_.copy_host_to_device_async(bgrid_batch->get_atoms_num()); atoms_phi_start_.copy_host_to_device_async(bgrid_batch->get_atoms_num()); mgrids_local_idx_batch_.copy_host_to_device_async(bgrid_batch->get_batch_size() * mgrids_num_); - checkCuda(cudaEventRecord(event_, stream_)); + CHECK_CUDA(cudaEventRecord(event_, stream_)); } void PhiOperatorGpu::set_phi(double* phi_d) const { - // checkCuda(cudaMemsetAsync(phi_d, 0, phi_len_ * sizeof(double), stream_)); + // CHECK_CUDA(cudaMemsetAsync(phi_d, 0, phi_len_ * sizeof(double), stream_)); dim3 grid_dim(mgrids_num_, bgrid_batch_->get_batch_size()); dim3 threads_per_block(64); set_phi_kernel<<>>( @@ -96,7 +97,6 @@ void PhiOperatorGpu::set_phi(double* phi_d) const mgrids_num_, gint_gpu_vars_->nr_max, gint_gpu_vars_->dr_uniform, - gint_gpu_vars_->ylmcoef_d, gint_gpu_vars_->ucell_atom_nwl_d, gint_gpu_vars_->atom_iw2_new_d, gint_gpu_vars_->atom_iw2_ylm_d, @@ -112,7 +112,7 @@ void PhiOperatorGpu::set_phi(double* phi_d) const atoms_phi_start_.get_device_ptr(), bgrids_phi_len_.get_device_ptr(), phi_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::set_phi_dphi(double* phi_d, double* dphi_x_d, double* dphi_y_d, double* dphi_z_d) const @@ -124,7 +124,6 @@ void PhiOperatorGpu::set_phi_dphi(double* phi_d, double* dphi_x_d, double* dphi_ mgrids_num_, gint_gpu_vars_->nr_max, gint_gpu_vars_->dr_uniform, - gint_gpu_vars_->ylmcoef_d, gint_gpu_vars_->ucell_atom_nwl_d, gint_gpu_vars_->atom_iw2_new_d, gint_gpu_vars_->atom_iw2_ylm_d, @@ -144,7 +143,7 @@ void PhiOperatorGpu::set_phi_dphi(double* phi_d, double* dphi_x_d, double* dphi_ dphi_x_d, dphi_y_d, dphi_z_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* ddphi_xz_d, @@ -152,12 +151,12 @@ void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* d { // Since the underlying implementation of `set_ddphi` uses `ddphi +=` instead of `ddphi =`, // the ddphi array needs to be zeroed out at the beginning of the function. - checkCuda(cudaMemsetAsync(ddphi_xx_d, 0, phi_len_ * sizeof(double), stream_)); - checkCuda(cudaMemsetAsync(ddphi_xy_d, 0, phi_len_ * sizeof(double), stream_)); - checkCuda(cudaMemsetAsync(ddphi_xz_d, 0, phi_len_ * sizeof(double), stream_)); - checkCuda(cudaMemsetAsync(ddphi_yy_d, 0, phi_len_ * sizeof(double), stream_)); - checkCuda(cudaMemsetAsync(ddphi_yz_d, 0, phi_len_ * sizeof(double), stream_)); - checkCuda(cudaMemsetAsync(ddphi_zz_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_xx_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_xy_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_xz_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_yy_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_yz_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(ddphi_zz_d, 0, phi_len_ * sizeof(double), stream_)); dim3 grid_dim(mgrids_num_, bgrid_batch_->get_batch_size()); dim3 threads_per_block(64); set_ddphi_kernel<<>>( @@ -165,7 +164,6 @@ void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* d mgrids_num_, gint_gpu_vars_->nr_max, gint_gpu_vars_->dr_uniform, - gint_gpu_vars_->ylmcoef_d, gint_gpu_vars_->ucell_atom_nwl_d, gint_gpu_vars_->atom_iw2_new_d, gint_gpu_vars_->atom_iw2_ylm_d, @@ -187,7 +185,7 @@ void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* d ddphi_yy_d, ddphi_yz_d, ddphi_zz_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::phi_mul_vldr3( @@ -207,7 +205,7 @@ void PhiOperatorGpu::phi_mul_vldr3( bgrids_phi_len_.get_device_ptr(), bgrids_phi_start_.get_device_ptr(), result_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::phi_mul_phi( @@ -221,7 +219,7 @@ void PhiOperatorGpu::phi_mul_phi( int max_m = 0; int max_n = 0; int max_k = mgrids_num_; - checkCuda(cudaEventSynchronize(event_)); + CHECK_CUDA(cudaEventSynchronize(event_)); for (int i = 0; i < bgrid_batch_->get_batch_size(); i++) { auto bgrid = bgrid_batch_->get_bgrids()[i]; @@ -278,7 +276,7 @@ void PhiOperatorGpu::phi_mul_phi( gemm_m_.copy_host_to_device_async(ap_num); gemm_n_.copy_host_to_device_async(ap_num); gemm_k_.copy_host_to_device_async(ap_num); - checkCuda(cudaEventRecord(event_, stream_)); + CHECK_CUDA(cudaEventRecord(event_, stream_)); dgemm_tn_vbatch(max_m, max_n, @@ -304,13 +302,13 @@ void PhiOperatorGpu::phi_mul_dm( const bool is_symm, double* phi_dm_d) { - checkCuda(cudaMemsetAsync(phi_dm_d, 0, phi_len_ * sizeof(double), stream_)); + CHECK_CUDA(cudaMemsetAsync(phi_dm_d, 0, phi_len_ * sizeof(double), stream_)); // ap_num means number of atom pairs int ap_num = 0; int max_m = mgrids_num_; int max_n = 0; int max_k = 0; - checkCuda(cudaEventSynchronize(event_)); + CHECK_CUDA(cudaEventSynchronize(event_)); for (int i = 0; i < bgrid_batch_->get_batch_size(); i++) { auto bgrid = bgrid_batch_->get_bgrids()[i]; @@ -371,7 +369,7 @@ void PhiOperatorGpu::phi_mul_dm( // so we don't need to copy it to device gemm_alpha_.copy_host_to_device_async(ap_num); } - checkCuda(cudaEventRecord(event_, stream_)); + CHECK_CUDA(cudaEventRecord(event_, stream_)); auto alpha_ptr = is_symm ? gemm_alpha_.get_device_ptr() : nullptr; dgemm_nn_vbatch(max_m, @@ -406,7 +404,7 @@ void PhiOperatorGpu::phi_dot_phi( bgrids_phi_len_.get_device_ptr(), bgrids_phi_start_.get_device_ptr(), rho_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::phi_dot_dphi( @@ -432,7 +430,7 @@ void PhiOperatorGpu::phi_dot_dphi( gint_gpu_vars_->iat2it_d, gint_gpu_vars_->atom_nw_d, fvl_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } void PhiOperatorGpu::phi_dot_dphi_r( @@ -460,7 +458,7 @@ void PhiOperatorGpu::phi_dot_dphi_r( gint_gpu_vars_->iat2it_d, gint_gpu_vars_->atom_nw_d, svl_d); - checkCudaLastError(); + CHECK_LAST_CUDA_ERROR("kernel launch"); } } \ No newline at end of file diff --git a/source/source_lcao/module_gint/kernel/phi_operator_kernel.cu b/source/source_lcao/module_gint/kernel/phi_operator_kernel.cu index aed0b9d8bd..3e7a130a5b 100644 --- a/source/source_lcao/module_gint/kernel/phi_operator_kernel.cu +++ b/source/source_lcao/module_gint/kernel/phi_operator_kernel.cu @@ -2,6 +2,7 @@ #include "gint_helper.cuh" #include "sph.cuh" #include "source_base/module_device/device.h" +#include "source_base/module_device/kernel_compat.h" namespace ModuleGint { @@ -11,7 +12,6 @@ __global__ void set_phi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, @@ -49,7 +49,7 @@ __global__ void set_phi_kernel( // since nwl is less or equal than 5, the size of ylma is (5+1)^2 double ylma[36]; const int nwl = ucell_atom_nwl[atom_type]; - sph_harm(nwl, ylmcoef, coord.x/dist, coord.y/dist, coord.z/dist, ylma); + sph_harm(nwl, coord.x/dist, coord.y/dist, coord.z/dist, ylma); const double pos = dist / dr_uniform; const int ip = static_cast(pos); @@ -95,7 +95,6 @@ __global__ void set_phi_dphi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, @@ -139,7 +138,7 @@ __global__ void set_phi_dphi_kernel( double rly[36]; double grly[36 * 3]; const int nwl = ucell_atom_nwl[atom_type]; - grad_rl_sph_harm(nwl, ylmcoef, coord.x, coord.y, coord.z, rly, grly); + grad_rl_sph_harm(nwl, coord.x, coord.y, coord.z, rly, grly); // interpolation const double pos = dist / dr_uniform; @@ -208,7 +207,6 @@ __global__ void set_ddphi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, @@ -260,7 +258,7 @@ __global__ void set_ddphi_kernel( double rly[36]; double grly[36 * 3]; const int nwl = ucell_atom_nwl[atom_type]; - grad_rl_sph_harm(nwl, ylmcoef, coord[0], coord[1], coord[2], rly, grly); + grad_rl_sph_harm(nwl, coord[0], coord[1], coord[2], rly, grly); // interpolation const double pos = dist / dr_uniform; diff --git a/source/source_lcao/module_gint/kernel/phi_operator_kernel.cuh b/source/source_lcao/module_gint/kernel/phi_operator_kernel.cuh index 4d32475542..091f64456e 100644 --- a/source/source_lcao/module_gint/kernel/phi_operator_kernel.cuh +++ b/source/source_lcao/module_gint/kernel/phi_operator_kernel.cuh @@ -10,7 +10,6 @@ __global__ void set_phi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, @@ -32,7 +31,6 @@ __global__ void set_phi_dphi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, @@ -58,7 +56,6 @@ __global__ void set_ddphi_kernel( const int mgrids_num, const int nrmax, const double dr_uniform, - const double* __restrict__ ylmcoef, const int* __restrict__ ucell_atom_nwl, const bool* __restrict__ atom_iw2_new, const int* __restrict__ atom_iw2_ylm, diff --git a/source/source_lcao/module_gint/kernel/set_const_mem.cu b/source/source_lcao/module_gint/kernel/set_const_mem.cu index 38fba5de00..0b627948f1 100644 --- a/source/source_lcao/module_gint/kernel/set_const_mem.cu +++ b/source/source_lcao/module_gint/kernel/set_const_mem.cu @@ -1,5 +1,5 @@ #include "set_const_mem.cuh" -#include "gint_helper.cuh" +#include "source_base/module_device/device_check.h" __constant__ double ylmcoe_d[100]; @@ -7,7 +7,7 @@ namespace ModuleGint { __host__ void set_ylmcoe_d(const double* ylmcoe_h, double** ylmcoe_d_addr) { - checkCuda(cudaMemcpyToSymbol(ylmcoe_d, ylmcoe_h, sizeof(double) * 100)); - checkCuda(cudaGetSymbolAddress((void**)ylmcoe_d_addr, ylmcoe_d)); + CHECK_CUDA(cudaMemcpyToSymbol(ylmcoe_d, ylmcoe_h, sizeof(double) * 100)); + CHECK_CUDA(cudaGetSymbolAddress((void**)ylmcoe_d_addr, ylmcoe_d)); } } \ No newline at end of file diff --git a/source/source_lcao/module_gint/kernel/sph.cuh b/source/source_lcao/module_gint/kernel/sph.cuh index b36828222b..bda5c286d7 100644 --- a/source/source_lcao/module_gint/kernel/sph.cuh +++ b/source/source_lcao/module_gint/kernel/sph.cuh @@ -1,396 +1,10 @@ #pragma once -namespace ModuleGint -{ - -static __device__ void sph_harm( - const int nwl, - const double* __restrict__ ylmcoef, - const double x, - const double y, - const double z, - double* __restrict__ ylma -) -{ - /*************************** - L = 0 - ***************************/ - ylma[0] = ylmcoef[0]; // l=0, m=0 - double tmp0; - if (nwl == 0) - return; - - /*************************** - L = 1 - ***************************/ - ylma[1] = ylmcoef[1] * z; // l=1, m=0 - ylma[2] = -ylmcoef[1] * x; // l=1, m=1 - ylma[3] = -ylmcoef[1] * y; // l=1, m=-1 - if (nwl == 1) - return; - - /*************************** - L = 2 - ***************************/ - tmp0=ylmcoef[3] * ylma[0]; - ylma[4] = ylmcoef[2] * z * ylma[1] - tmp0 ; // l=2, m=0 - tmp0 = ylmcoef[4] * z; - ylma[5] = tmp0 * ylma[2]; // l=2,m=1 - ylma[6] = tmp0 * ylma[3]; // l=2,m=-1 - - tmp0 = ylmcoef[4] * x; - ylma[7] = ylmcoef[5] * ylma[4] - ylmcoef[6] * ylma[0] - - tmp0 * ylma[2]; // l=2,m=2 - ylma[8] = -tmp0 * ylma[3]; - if (nwl == 2) - return; - - /*************************** - L = 3 - ***************************/ - tmp0=ylmcoef[8] * ylma[1]; - ylma[9] = ylmcoef[7] * z * ylma[4] - tmp0; // l=3, m=0 - - tmp0 = ylmcoef[9] * z; - ylma[10] = tmp0 * ylma[5] - ylmcoef[10] * ylma[2]; // l=3,m=1 - ylma[11] = tmp0 * ylma[6] - ylmcoef[10] * ylma[3]; // l=3,m=-1 - - tmp0 = ylmcoef[11] * z; - ylma[12] = tmp0 * ylma[7]; // l=3,m=2 - ylma[13] = tmp0 * ylma[8]; // l=3,m=-2 - - tmp0 = ylmcoef[14] * x; - ylma[14] = ylmcoef[12] * ylma[10] - ylmcoef[13] * ylma[2] - - tmp0 * ylma[7]; // l=3,m=3 - ylma[15] = ylmcoef[12] * ylma[11] - ylmcoef[13] * ylma[3] - - tmp0 * ylma[8]; // l=3,m=-3 - if (nwl == 3) - return; - - /*************************** - L = 4 - ***************************/ - tmp0=ylmcoef[16] * ylma[4]; - ylma[16] = ylmcoef[15] * z * ylma[9] - tmp0; // l=4,m=0 - - tmp0 = ylmcoef[17] * z; - ylma[17] = tmp0 * ylma[10] - ylmcoef[18] * ylma[5]; // l=4,m=1 - ylma[18] = tmp0 * ylma[11] - ylmcoef[18] * ylma[6]; // l=4,m=-1 - - tmp0 = ylmcoef[19] * z; - ylma[19] = tmp0 * ylma[12] - ylmcoef[20] * ylma[7]; // l=4,m=2 - ylma[20] = tmp0 * ylma[13] - ylmcoef[20] * ylma[8]; // l=4,m=-2 - - tmp0 = 3.0 * z; - ylma[21] = tmp0 * ylma[14]; // l=4,m=3 - ylma[22] = tmp0 * ylma[15]; // l=4,m=-3 - - tmp0 = ylmcoef[23] * x; - ylma[23] = ylmcoef[21] * ylma[19] - ylmcoef[22] * ylma[7] - - tmp0 * ylma[14]; // l=4,m=4 - ylma[24] = ylmcoef[21] * ylma[20] - ylmcoef[22] * ylma[8] - - tmp0 * ylma[15]; // l=4,m=-4 - if (nwl == 4) - return; - - /*************************** - L = 5 - ***************************/ - tmp0=ylmcoef[25] * ylma[9]; - ylma[25] - = ylmcoef[24] * z * ylma[16] - tmp0; // l=5,m=0 - - tmp0 = ylmcoef[26] * z; - ylma[26] = tmp0 * ylma[17] - ylmcoef[27] * ylma[10]; // l=5,m=1 - ylma[27] = tmp0 * ylma[18] - ylmcoef[27] * ylma[11]; // l=5,m=-1 +#include "source_base/kernels/cuda/sph_harm_gpu.cuh" - tmp0 = ylmcoef[28] * z; - ylma[28] = tmp0 * ylma[19] - ylmcoef[29] * ylma[12]; // l=5,m=2 - ylma[29] = tmp0 * ylma[20] - ylmcoef[29] * ylma[13]; // l=5,m=-2 - - tmp0 = ylmcoef[30] * z; - ylma[30] = tmp0 * ylma[21] - ylmcoef[31] * ylma[14]; // l=5,m=3 - ylma[31] = tmp0 * ylma[22] - ylmcoef[31] * ylma[15]; // l=5,m=-3 - - tmp0 = ylmcoef[32] * z; - ylma[32] = tmp0 * ylma[23]; // l=5,m=4 - ylma[33] = tmp0 * ylma[24]; // l=5,m=-4 - - tmp0 = ylmcoef[35] * x; - ylma[34] = ylmcoef[33] * ylma[30] - ylmcoef[34] * ylma[14] - - tmp0 * ylma[23]; // l=5,m=5 - ylma[35] = ylmcoef[33] * ylma[31] - ylmcoef[34] * ylma[15] - - tmp0 * ylma[24]; // l=5,m=-5 - if (nwl == 5) - return; - /* - // if nwl > 5 - for (int il = 6; il <= nwl; il++) - { - int istart = il * il; - int istart1 = (il - 1) * (il - 1); - int istart2 = (il - 2) * (il - 2); - - double fac2 = sqrt(4.0 * istart - 1.0); - double fac4 = sqrt(4.0 * istart1 - 1.0); - - for (int im = 0; im < 2 * il - 1; im++) - { - int imm = (im + 1) / 2; - ylma[istart + im] = fac2 / sqrt((double)istart - imm * imm) * (z - * ylma[istart1 + im] - sqrt((double)istart1 - imm * imm) / fac4 * - ylma[istart2 + im]); - } - - double bl1 = sqrt(2.0 * il / (2.0 * il + 1.0)); - double bl2 = sqrt((2.0 * il - 2.0) / (2.0 * il - 1.0)); - double bl3 = sqrt(2.0) / fac2; - - ylma[istart + 2 * il - 1] = (bl3 * ylma[istart + 2 * il - 5] - bl2 * - ylma[istart2 + 2 * il - 5] - 2.0 * x * ylma[istart1 + 2 * il - 3]) / - bl1; ylma[istart + 2 * il] = (bl3 * ylma[istart + 2 * il - 4] - bl2 * - ylma[istart2 + 2 * il - 4] - 2.0 * x * ylma[istart1 + 2 * il - 2]) / - bl1; - }*/ -} - -static __device__ void grad_rl_sph_harm( - const int nwl, - const double* __restrict__ ylmcoef, - const double x, - const double y, - const double z, - double* __restrict__ rly, - double* __restrict__ grly -) +namespace ModuleGint { - double r2 = x * x + y * y + z * z; - double tx = x * 2; - double ty = y * 2; - double tz = z * 2; - - //begin calculation - /*************************** - L = 0 - ***************************/ - rly[0] = ylmcoef[0]; //l=0, m=0 - grly[0] = grly[1] = grly[2] = 0.0; - if (nwl == 0) return; - - /*************************** - L = 1 - ***************************/ - rly[1] = ylmcoef[1]*z; //l=1, m=0 - grly[3] = grly[4] = 0.0; - grly[5] = ylmcoef[1]; - - rly[2] = -ylmcoef[1]*x; //l=1, m=1 - grly[7] = grly[8] = 0.0; - grly[6] = -ylmcoef[1]; - - rly[3] = -ylmcoef[1]*y; //l=1, m=-1 - grly[9] = grly[11] = 0.0; - grly[10] = -ylmcoef[1]; - - if (nwl == 1) return; - - /*************************** - L = 2 - ***************************/ - rly[4] = ylmcoef[2]*z*rly[1]-ylmcoef[3]*rly[0]*r2;//l=2, m=0 - grly[12] = ylmcoef[2]*z*grly[3]-ylmcoef[3]*(grly[0]*r2+rly[0]*tx);//l=2, m=0 - grly[13] = ylmcoef[2]*z*grly[4]-ylmcoef[3]*(grly[1]*r2+rly[0]*ty);//l=2, m=0 - grly[14] = ylmcoef[2]*(z*grly[5]+rly[1])-ylmcoef[3]*(grly[2]*r2+rly[0]*tz);//l=2, m=0 - - - double tmp0 = ylmcoef[4]*z; - rly[5] = tmp0*rly[2];//l=2,m=1 - grly[15] = tmp0*grly[6]; - grly[16] = tmp0*grly[7]; - grly[17] = ylmcoef[4]*(rly[2]+z*grly[8]); - - rly[6] = tmp0*rly[3];//l=2,m=-1 - grly[18] = tmp0*grly[9]; - grly[19] = tmp0*grly[10]; - grly[20] = ylmcoef[4]*(rly[3]+z*grly[11]); - - double tmp2 = ylmcoef[4]*x; - rly[7]= ylmcoef[5]*rly[4]-ylmcoef[6]*rly[0]*r2 - tmp2*rly[2];//l=2,m=2 - grly[21] = ylmcoef[5]*grly[12]-ylmcoef[6]*(rly[0]*tx+grly[0]*r2)-ylmcoef[4]*(x*grly[6]+rly[2]); - -// std::cout << "\np1 = "<< ylmcoef[5]*grly[12] << " p2 = " << -ylmcoef[6]*rly[0]*tx -// << " p3 = " << -ylmcoef[4]*x*grly[6] << " p4 = " << -ylmcoef[4]*rly[2] << std::endl; - - grly[22] = ylmcoef[5]*grly[13]-ylmcoef[6]*(rly[0]*ty+grly[1]*r2)-tmp2*grly[7]; - grly[23] = ylmcoef[5]*grly[14]-ylmcoef[6]*(rly[0]*tz+grly[2]*r2)-tmp2*grly[8]; - - rly[8] = -tmp2*rly[3]; - grly[24] = -ylmcoef[4]*(rly[3]+x*grly[9]); - grly[25] = -tmp2*grly[10]; - grly[26] = -tmp2*grly[11]; -// rly[8] = tmp1+tmp2*rly[3];//l=2,m=-2 - if (nwl == 2) return; - - /*************************** - L = 3 - ***************************/ - rly[9] = ylmcoef[7]*z*rly[4]-ylmcoef[8]*rly[1]*r2; //l=3, m=0 - grly[27] = ylmcoef[7]*z*grly[12]-ylmcoef[8]*(rly[1]*tx+grly[3]*r2); - grly[28] = ylmcoef[7]*z*grly[13]-ylmcoef[8]*(rly[1]*ty+grly[4]*r2); - grly[29] = ylmcoef[7]*(rly[4]+z*grly[14])-ylmcoef[8]*(rly[1]*tz+grly[5]*r2); - - double tmp3 = ylmcoef[9]*z; - rly[10] = tmp3*rly[5]-ylmcoef[10]*rly[2]*r2;//l=3,m=1 - grly[30] = tmp3*grly[15]-ylmcoef[10]*(grly[6]*r2+rly[2]*tx); - grly[31] = tmp3*grly[16]-ylmcoef[10]*(grly[7]*r2+rly[2]*ty); - grly[32] = ylmcoef[9]*(z*grly[17]+rly[5])-ylmcoef[10]*(grly[8]*r2+rly[2]*tz); - - rly[11] = tmp3*rly[6]-ylmcoef[10]*rly[3]*r2;//l=3,m=-1 - grly[33] = tmp3*grly[18]-ylmcoef[10]*(grly[9]*r2+rly[3]*tx); - grly[34] = tmp3*grly[19]-ylmcoef[10]*(grly[10]*r2+rly[3]*ty); - grly[35] = ylmcoef[9]*(z*grly[20]+rly[6])-ylmcoef[10]*(grly[11]*r2+rly[3]*tz); - - double tmp4 = ylmcoef[11]*z; - rly[12] = tmp4*rly[7];//l=3,m=2 - grly[36] = tmp4*grly[21]; - grly[37] = tmp4*grly[22]; - grly[38] = ylmcoef[11]*(z*grly[23]+rly[7]); - - rly[13] = tmp4*rly[8];//l=3,m=-2 - grly[39] = tmp4*grly[24]; - grly[40] = tmp4*grly[25]; - grly[41] = ylmcoef[11]*(z*grly[26]+rly[8]); - - double tmp5 = ylmcoef[14]*x; - rly[14] = ylmcoef[12]*rly[10]-ylmcoef[13]*rly[2]*r2-tmp5*rly[7];//l=3,m=3 - grly[42] = ylmcoef[12]*grly[30]-ylmcoef[13]*(rly[2]*tx+grly[6]*r2)-ylmcoef[14]*(rly[7]+x*grly[21]); - grly[43] = ylmcoef[12]*grly[31]-ylmcoef[13]*(rly[2]*ty+grly[7]*r2)-tmp5*grly[22]; - grly[44] = ylmcoef[12]*grly[32]-ylmcoef[13]*(rly[2]*tz+grly[8]*r2)-tmp5*grly[23]; - - rly[15] = ylmcoef[12]*rly[11]-ylmcoef[13]*rly[3]*r2-tmp5*rly[8];//l=3,m=-3 - grly[45] = ylmcoef[12]*grly[33]-ylmcoef[13]*(rly[3]*tx+grly[9]*r2)-ylmcoef[14]*(rly[8]+x*grly[24]); - grly[46] = ylmcoef[12]*grly[34]-ylmcoef[13]*(rly[3]*ty+grly[10]*r2)-tmp5*grly[25]; - grly[47] = ylmcoef[12]*grly[35]-ylmcoef[13]*(rly[3]*tz+grly[11]*r2)-tmp5*grly[26]; - if (nwl == 3) return; - - /*************************** - L = 4 - ***************************/ - rly[16] = ylmcoef[15]*z*rly[9]-ylmcoef[16]*rly[4]*r2;//l=4,m=0 - grly[48] = ylmcoef[15]*z*grly[27]-ylmcoef[16]*(rly[4]*tx+grly[12]*r2); - grly[49] = ylmcoef[15]*z*grly[28]-ylmcoef[16]*(rly[4]*ty+grly[13]*r2); - grly[50] = ylmcoef[15]*(z*grly[29]+rly[9])-ylmcoef[16]*(rly[4]*tz+grly[14]*r2); - - double tmp6 = ylmcoef[17]*z; - rly[17] = tmp6*rly[10]-ylmcoef[18]*rly[5]*r2;//l=4,m=1 - grly[51] = tmp6*grly[30]-ylmcoef[18]*(rly[5]*tx+grly[15]*r2); - grly[52] = tmp6*grly[31]-ylmcoef[18]*(rly[5]*ty+grly[16]*r2); - grly[53] = ylmcoef[17]*(z*grly[32]+rly[10])-ylmcoef[18]*(rly[5]*tz+grly[17]*r2); - - rly[18] = tmp6*rly[11]-ylmcoef[18]*rly[6]*r2;//l=4,m=-1 - grly[54] = tmp6*grly[33]-ylmcoef[18]*(rly[6]*tx+grly[18]*r2); - grly[55] = tmp6*grly[34]-ylmcoef[18]*(rly[6]*ty+grly[19]*r2); - grly[56] = ylmcoef[17]*(z*grly[35]+rly[11])-ylmcoef[18]*(rly[6]*tz+grly[20]*r2); - - double tmp7 = ylmcoef[19]*z; - rly[19] = tmp7*rly[12]-ylmcoef[20]*rly[7]*r2;//l=4,m=2 - grly[57] = tmp7*grly[36]-ylmcoef[20]*(rly[7]*tx+grly[21]*r2); - grly[58] = tmp7*grly[37]-ylmcoef[20]*(rly[7]*ty+grly[22]*r2); - grly[59] = ylmcoef[19]*(z*grly[38]+rly[12])-ylmcoef[20]*(rly[7]*tz+grly[23]*r2); - - rly[20] = tmp7*rly[13]-ylmcoef[20]*rly[8]*r2;//l=4,m=-2 - grly[60] = tmp7*grly[39]-ylmcoef[20]*(rly[8]*tx+grly[24]*r2); - grly[61] = tmp7*grly[40]-ylmcoef[20]*(rly[8]*ty+grly[25]*r2); - grly[62] = ylmcoef[19]*(z*grly[41]+rly[13])-ylmcoef[20]*(rly[8]*tz+grly[26]*r2); - - double tmp8 = 3.0*z; - rly[21] = tmp8*rly[14];//l=4,m=3 - grly[63] = tmp8*grly[42]; - grly[64] = tmp8*grly[43]; - grly[65] = 3.0*(z*grly[44]+rly[14]); - - - rly[22] = tmp8*rly[15];//l=4,m=-3 - grly[66] = tmp8*grly[45]; - grly[67] = tmp8*grly[46]; - grly[68] = 3.0*(z*grly[47]+rly[15]); - - double tmp9 = ylmcoef[23]*x; - rly[23] = ylmcoef[21]*rly[19]-ylmcoef[22]*rly[7]*r2-tmp9*rly[14];//l=4,m=4 - grly[69] = ylmcoef[21]*grly[57]-ylmcoef[22]*(rly[7]*tx+grly[21]*r2)-ylmcoef[23]*(x*grly[42]+rly[14]); - grly[70] = ylmcoef[21]*grly[58]-ylmcoef[22]*(rly[7]*ty+grly[22]*r2)-tmp9*grly[43]; - grly[71] = ylmcoef[21]*grly[59]-ylmcoef[22]*(rly[7]*tz+grly[23]*r2)-tmp9*grly[44]; - - rly[24] = ylmcoef[21]*rly[20]-ylmcoef[22]*rly[8]*r2-tmp9*rly[15];//l=4,m=-4 - grly[72] = ylmcoef[21]*grly[60]-ylmcoef[22]*(rly[8]*tx+grly[24]*r2)-ylmcoef[23]*(x*grly[45]+rly[15]); - grly[73] = ylmcoef[21]*grly[61]-ylmcoef[22]*(rly[8]*ty+grly[25]*r2)-tmp9*grly[46]; - grly[74] = ylmcoef[21]*grly[62]-ylmcoef[22]*(rly[8]*tz+grly[26]*r2)-tmp9*grly[47]; - - if (nwl == 4) return; - - /*************************** - L = 5 - ***************************/ - rly[25] = ylmcoef[24]*z*rly[16]-ylmcoef[25]*rly[9]*r2;//l=5,m=0 - grly[75] = ylmcoef[24]*z*grly[48]-ylmcoef[25]*(rly[9]*tx+grly[27]*r2); - grly[76] = ylmcoef[24]*z*grly[49]-ylmcoef[25]*(rly[9]*ty+grly[28]*r2); - grly[77] = ylmcoef[24]*(z*grly[50]+rly[16])-ylmcoef[25]*(rly[9]*tz+grly[29]*r2); - - double tmp10 = ylmcoef[26]*z; - rly[26] = tmp10*rly[17]-ylmcoef[27]*rly[10]*r2;//l=5,m=1 - grly[78] = tmp10*grly[51]-ylmcoef[27]*(rly[10]*tx+grly[30]*r2); - grly[79] = tmp10*grly[52]-ylmcoef[27]*(rly[10]*ty+grly[31]*r2); - grly[80] = ylmcoef[26]*(z*grly[53]+rly[17])-ylmcoef[27]*(rly[10]*tz+grly[32]*r2); - - rly[27] = tmp10*rly[18]-ylmcoef[27]*rly[11]*r2;//l=5,m=-1 - grly[81] = tmp10*grly[54]-ylmcoef[27]*(rly[11]*tx+grly[33]*r2); - grly[82] = tmp10*grly[55]-ylmcoef[27]*(rly[11]*ty+grly[34]*r2); - grly[83] = ylmcoef[26]*(z*grly[56]+rly[18])-ylmcoef[27]*(rly[11]*tz+grly[35]*r2); - - double tmp11 = ylmcoef[28]*z; - rly[28] = tmp11*rly[19]-ylmcoef[29]*rly[12]*r2;//l=5,m=2 - grly[84] = tmp11*grly[57]-ylmcoef[29]*(rly[12]*tx+grly[36]*r2); - grly[85] = tmp11*grly[58]-ylmcoef[29]*(rly[12]*ty+grly[37]*r2); - grly[86] = ylmcoef[28]*(z*grly[59]+rly[19])-ylmcoef[29]*(rly[12]*tz+grly[38]*r2); - - rly[29] = tmp11*rly[20]-ylmcoef[29]*rly[13]*r2;//l=5,m=-2 - grly[87] = tmp11*grly[60]-ylmcoef[29]*(rly[13]*tx+grly[39]*r2); - grly[88] = tmp11*grly[61]-ylmcoef[29]*(rly[13]*ty+grly[40]*r2); - grly[89] = ylmcoef[28]*(z*grly[62]+rly[20])-ylmcoef[29]*(rly[13]*tz+grly[41]*r2); - - double tmp12 = ylmcoef[30]*z; - rly[30] = tmp12*rly[21]-ylmcoef[31]*rly[14]*r2;//l=5,m=3 - grly[90] = tmp12*grly[63]-ylmcoef[31]*(grly[42]*r2+rly[14]*tx); - grly[91] = tmp12*grly[64]-ylmcoef[31]*(grly[43]*r2+rly[14]*ty); - grly[92] = ylmcoef[30]*(z*grly[65]+rly[21])-ylmcoef[31]*(grly[44]*r2+rly[14]*tz); - - rly[31] = tmp12*rly[22]-ylmcoef[31]*rly[15]*r2;//l=5,m=-3 - grly[93] = tmp12*grly[66]-ylmcoef[31]*(grly[45]*r2+rly[15]*tx); - grly[94] = tmp12*grly[67]-ylmcoef[31]*(grly[46]*r2+rly[15]*ty); - grly[95] = ylmcoef[30]*(z*grly[68]+rly[22])-ylmcoef[31]*(grly[47]*r2+rly[15]*tz); - - double tmp13 = ylmcoef[32]*z; - rly[32] = tmp13*rly[23];//l=5,m=4 - grly[96] = tmp13*grly[69]; - grly[97] = tmp13*grly[70]; - grly[98] = ylmcoef[32]*(rly[23]+z*grly[71]); - - rly[33] = tmp13*rly[24];//l=5,m=-4 - grly[99] = tmp13*grly[72]; - grly[100] = tmp13*grly[73]; - grly[101] = ylmcoef[32]*(rly[24]+z*grly[74]); - - double tmp14 = ylmcoef[35]*x; - rly[34] = ylmcoef[33]*rly[30]-ylmcoef[34]*rly[14]*r2-tmp14*rly[23];//l=5,m=5 - grly[102] = ylmcoef[33]*grly[90]-ylmcoef[34]*(rly[14]*tx+grly[42]*r2)-ylmcoef[35]*(x*grly[69]+rly[23]); - grly[103] = ylmcoef[33]*grly[91]-ylmcoef[34]*(rly[14]*ty+grly[43]*r2)-tmp14*grly[70]; - grly[104] = ylmcoef[33]*grly[92]-ylmcoef[34]*(rly[14]*tz+grly[44]*r2)-tmp14*grly[71]; - - rly[35] = ylmcoef[33]*rly[31]-ylmcoef[34]*rly[15]*r2-tmp14*rly[24];//l=5,m=-5 - grly[105] = ylmcoef[33]*grly[93]-ylmcoef[34]*(rly[15]*tx+grly[45]*r2)-ylmcoef[35]*(x*grly[72]+rly[24]); - grly[106] = ylmcoef[33]*grly[94]-ylmcoef[34]*(rly[15]*ty+grly[46]*r2)-tmp14*grly[73]; - grly[107] = ylmcoef[33]*grly[95]-ylmcoef[34]*(rly[15]*tz+grly[47]*r2)-tmp14*grly[74]; - - if (nwl == 5) return; + // Import unified GPU sph_harm functions from ModuleBase + using ModuleBase::sph_harm; + using ModuleBase::grad_rl_sph_harm; } -} \ No newline at end of file diff --git a/source/source_lcao/module_gint/set_ddphi.cpp b/source/source_lcao/module_gint/set_ddphi.cpp index c84f087487..4e7d486fbc 100644 --- a/source/source_lcao/module_gint/set_ddphi.cpp +++ b/source/source_lcao/module_gint/set_ddphi.cpp @@ -72,7 +72,7 @@ void GintAtom::set_ddphi( const double x12 = x1 * x2 / 6; const double x03 = x0 * x3 / 2; - double tmp, dtmp; + double tmp = 0.0, dtmp = 0.0; for(int iw = 0; iw < atom_->nw; ++iw) { diff --git a/source/source_lcao/module_gint/temp_gint/kernel/gint_gpu_vars.h b/source/source_lcao/module_gint/temp_gint/kernel/gint_gpu_vars.h deleted file mode 100644 index 5f711aa6a0..0000000000 --- a/source/source_lcao/module_gint/temp_gint/kernel/gint_gpu_vars.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include -#include "set_const_mem.cuh" -#include "source_base/ylm.h" -#include "source_cell/unitcell.h" -#include "source_cell/atom_spec.h" -#include "source_lcao/module_gint/biggrid_info.h" -#include "gint_helper.cuh" - -namespace ModuleGint -{ - -class GintGpuVars -{ - public: - GintGpuVars(std::shared_ptr bgrid_info, - const UnitCell& ucell, - const Numerical_Orbital* Phi); - ~GintGpuVars(); - - int nwmax; - double dr_uniform; - double nr_max; - // ylmcoef_d is __constant__ memory, no need to cudaFree - double* ylmcoef_d = nullptr; - double* rcut_d = nullptr; - int* atom_nw_d = nullptr; - int* ucell_atom_nwl_d = nullptr; - bool* atom_iw2_new_d = nullptr; - int* atom_iw2_ylm_d = nullptr; - int* atom_iw2_l_d = nullptr; - double* psi_u_d = nullptr; - double* dpsi_u_d = nullptr; - double* d2psi_u_d = nullptr; - double3* mgrids_pos_d = nullptr; - int* iat2it_d = nullptr; - - // the index of gpu device - int dev_id_ = 0; - -}; - -} \ No newline at end of file diff --git a/source/source_lcao/module_hcontainer/CMakeLists.txt b/source/source_lcao/module_hcontainer/CMakeLists.txt index 65db746a84..7082861c27 100644 --- a/source/source_lcao/module_hcontainer/CMakeLists.txt +++ b/source/source_lcao/module_hcontainer/CMakeLists.txt @@ -5,6 +5,7 @@ list(APPEND objects atom_pair.cpp hcontainer.cpp output_hcontainer.cpp + read_hcontainer.cpp func_folding.cpp transfer.cpp func_transfer.cpp diff --git a/source/source_lcao/module_hcontainer/func_folding.cpp b/source/source_lcao/module_hcontainer/func_folding.cpp index 58ba3d267a..4b276846d6 100644 --- a/source/source_lcao/module_hcontainer/func_folding.cpp +++ b/source/source_lcao/module_hcontainer/func_folding.cpp @@ -40,7 +40,7 @@ void folding_HR(const hamilt::HContainer& hR, // if TK==std::complex, kphase is e^{ikR} const ModuleBase::Vector3 dR(r_index.x, r_index.y, r_index.z); const double arg = (kvec_d_in * dR) * ModuleBase::TWO_PI; - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); std::complex kphase = std::complex(cosp, sinp); @@ -86,7 +86,7 @@ void folding_HR(const hamilt::HContainer& hR, // if TK==std::complex, kphase is e^{ikR} const ModuleBase::Vector3 dR(rx, ry, rz); const double arg = (kvec_d_in * dR) * ModuleBase::TWO_PI; - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); std::complex kphase = std::complex(cosp, sinp); diff --git a/source/source_lcao/module_hcontainer/func_transfer.cpp b/source/source_lcao/module_hcontainer/func_transfer.cpp index 1da0c524a1..14566ac01d 100644 --- a/source/source_lcao/module_hcontainer/func_transfer.cpp +++ b/source/source_lcao/module_hcontainer/func_transfer.cpp @@ -169,7 +169,7 @@ void transferParallels2Serial(const hamilt::HContainer& hR_p, hamilt::HConta // send data std::vector receive_values; - long max_size; + long max_size = 0; if (my_rank == serial_rank) { max_size = trans_s->get_max_size(); diff --git a/source/source_lcao/module_hcontainer/hcontainer.cpp b/source/source_lcao/module_hcontainer/hcontainer.cpp index 9571fe40c8..621e9f1da7 100644 --- a/source/source_lcao/module_hcontainer/hcontainer.cpp +++ b/source/source_lcao/module_hcontainer/hcontainer.cpp @@ -1,4 +1,5 @@ #include "hcontainer.h" +#include "source_base/memory.h" namespace hamilt { @@ -12,12 +13,16 @@ HContainer::~HContainer() { if(this->allocated) { + if(this->allocated_size > 0) + { + ModuleBase::Memory::record("HContainer", -(long long)this->allocated_size, true); + } delete[] this->wrapper_pointer; } } template -HContainer::HContainer() {} +HContainer::HContainer() : allocated_size(0) {} // copy constructor template @@ -30,6 +35,7 @@ HContainer::HContainer(const HContainer& HR_in, T* data_array) this->current_R = -1; this->wrapper_pointer = data_array; this->allocated = false; + this->allocated_size = 0; this->atom_pairs = HR_in.atom_pairs; // data of HR_in will not be copied, please call add() after this constructor to copy data. this->allocate(this->wrapper_pointer, true); @@ -47,8 +53,11 @@ HContainer::HContainer(HContainer&& HR_in) noexcept this->gamma_only = HR_in.gamma_only; this->paraV = HR_in.paraV; this->allocated = HR_in.allocated; + this->allocated_size = HR_in.allocated_size; this->current_R = -1; HR_in.wrapper_pointer = nullptr; + HR_in.allocated = false; + HR_in.allocated_size = 0; // tmp terms not moved } @@ -65,9 +74,12 @@ HContainer& HContainer::operator=(HContainer&& HR_in) noexcept this->gamma_only = HR_in.gamma_only; this->paraV = HR_in.paraV; this->allocated = HR_in.allocated; + this->allocated_size = HR_in.allocated_size; this->current_R = -1; HR_in.wrapper_pointer = nullptr; + HR_in.allocated = false; + HR_in.allocated_size = 0; } return *this; } @@ -80,6 +92,7 @@ HContainer::HContainer(int natom) this->current_R = -1; this->sparse_ap.resize(natom); this->sparse_ap_index.resize(natom); + this->allocated_size = 0; } // use unitcell to initialize atom_pairs @@ -88,6 +101,7 @@ HContainer::HContainer(const UnitCell& ucell_, const Parallel_Orbitals* paraV { this->gamma_only = false; this->current_R = -1; + this->allocated_size = 0; std::vector atom_begin_row(ucell_.nat+1, 0); std::vector atom_begin_col(ucell_.nat+1, 0); int begin = 0; @@ -148,6 +162,7 @@ template HContainer::HContainer(const Parallel_Orbitals* paraV_in, T* data_pointer, const std::vector* ijr_info) { this->current_R = -1; + this->allocated_size = 0; // use HContainer as a wrapper(!nullptr) or container(nullptr) this->wrapper_pointer = data_pointer; @@ -177,13 +192,23 @@ void HContainer::allocate(T* data_array, bool is_zero) size_t nnr = this->get_nnr(); if(this->allocated) {// delete existed memory of this->wrapper_pointer + if(this->allocated_size > 0) + { + ModuleBase::Memory::record("HContainer", -(long long)this->allocated_size, true); + } delete[] this->wrapper_pointer; this->allocated = false; + this->allocated_size = 0; } if(data_array == nullptr) { // use this->wrapper_pointer as data_array this->allocated = true; + this->allocated_size = nnr * sizeof(T); + if(this->allocated_size > 0) + { + ModuleBase::Memory::record("HContainer", (long long)this->allocated_size, true); + } this->wrapper_pointer = new T[nnr]; ModuleBase::GlobalFunc::ZEROS(this->wrapper_pointer, nnr); data_array = this->wrapper_pointer; diff --git a/source/source_lcao/module_hcontainer/hcontainer.h b/source/source_lcao/module_hcontainer/hcontainer.h index 7592273fdb..74e640b83d 100644 --- a/source/source_lcao/module_hcontainer/hcontainer.h +++ b/source/source_lcao/module_hcontainer/hcontainer.h @@ -1,5 +1,5 @@ -#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_MODULE_HCONTAINER_HCONTAINER_H -#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_MODULE_HCONTAINER_HCONTAINER_H +#ifndef HCONTAINER_H +#define HCONTAINER_H #include "atom_pair.h" #include "source_base/vector3.h" @@ -475,6 +475,9 @@ class HContainer // sparse table for (atom_i, atom_j)->index of atom_pairs std::vector> sparse_ap; std::vector> sparse_ap_index; + + // record allocated memory size + size_t allocated_size = 0; /** * @brief temporary atom-pair lists to loop selected R index @@ -507,4 +510,4 @@ class HContainer } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_hcontainer/output_hcontainer.cpp b/source/source_lcao/module_hcontainer/output_hcontainer.cpp index 10d21bd2ca..6b89302e1c 100644 --- a/source/source_lcao/module_hcontainer/output_hcontainer.cpp +++ b/source/source_lcao/module_hcontainer/output_hcontainer.cpp @@ -1,6 +1,6 @@ #include "output_hcontainer.h" -#include "source_io/sparse_matrix.h" +#include "source_io/module_output/sparse_matrix.h" #include diff --git a/source/source_lcao/module_hcontainer/read_hcontainer.cpp b/source/source_lcao/module_hcontainer/read_hcontainer.cpp new file mode 100644 index 0000000000..4db9dcf895 --- /dev/null +++ b/source/source_lcao/module_hcontainer/read_hcontainer.cpp @@ -0,0 +1,169 @@ +#include "read_hcontainer.h" + +#include "source_io/module_output/sparse_matrix.h" +#include "source_io/module_output/csr_reader.h" +#include "hcontainer_funcs.h" + +#include + +namespace hamilt +{ + +/** + * @brief Constructor of Read_HContainer + * @attention ifs should be open outside of this interface + */ +template +Read_HContainer::Read_HContainer(hamilt::HContainer* hcontainer, + const std::string& filename, + const int nlocal, + const UnitCell* ucell) + : _hcontainer(hcontainer), _filename(filename), _nlocal(nlocal), _ucell(ucell) +{ +} + +template +void Read_HContainer::read() +{ + // build atom index of col and row + std::vector atom_index_row; + std::vector atom_index_col; + int natom = this->_ucell->nat; + Parallel_Orbitals pv_serial; + pv_serial.set_serial(this->_nlocal, this->_nlocal); + pv_serial.set_atomic_trace(this->_ucell->get_iat2iwt(), this->_ucell->nat, this->_nlocal); + for (int iat = 0; iat < natom; ++iat) + { + int row_size = pv_serial.get_row_size(iat); + int col_size = pv_serial.get_col_size(iat); + for (int i = 0; i < row_size; ++i) + { + atom_index_row.push_back(iat); + } + for (int j = 0; j < col_size; ++j) + { + atom_index_col.push_back(iat); + } + } + // + hamilt::HContainer hcontainer_serial(&pv_serial); + +#ifdef __MPI + if(GlobalV::MY_RANK == 0) + { +#endif + ModuleIO::csrFileReader csr(this->_filename); + int step = csr.getStep(); + int matrix_dimension = csr.getMatrixDimension(); + int r_number = csr.getNumberOfR(); + + //construct serial hcontainer firstly + // prepare atom index mapping from csr row/col to atom index + for (int i = 0; i < r_number; i++) + { + std::vector RCoord = csr.getRCoordinate(i); + ModuleIO::SparseMatrix sparse_matrix = csr.getMatrix(i); + for (const auto& element: sparse_matrix.getElements()) + { + int row = element.first.first; + int col = element.first.second; + T value = element.second; + + + //insert into hcontainer + int atom_i = atom_index_row[row]; + int atom_j = atom_index_col[col]; + auto* ij_pair = hcontainer_serial.find_pair(atom_i, atom_j); + if(ij_pair == nullptr) + { + //insert new pair + hamilt::AtomPair new_pair(atom_i, atom_j, RCoord[0], RCoord[1], RCoord[2], &pv_serial); + hcontainer_serial.insert_pair(new_pair); + } + else + { + if(ij_pair->find_R(RCoord[0], RCoord[1], RCoord[2]) == -1) + { + //insert new R + hamilt::AtomPair new_pair(atom_i, atom_j, RCoord[0], RCoord[1], RCoord[2], &pv_serial); + hcontainer_serial.insert_pair(new_pair); + } + } + } + } + hcontainer_serial.allocate(nullptr, true); + // second loop, add values into hcontainer + for (int i = 0; i < r_number; i++) + { + std::vector RCoord = csr.getRCoordinate(i); + ModuleIO::SparseMatrix sparse_matrix = csr.getMatrix(i); + for (const auto& element: sparse_matrix.getElements()) + { + int row = element.first.first; + int col = element.first.second; + T value = element.second; + + //insert into hcontainer + int atom_i = atom_index_row[row]; + int atom_j = atom_index_col[col]; + auto* matrix = hcontainer_serial.find_matrix(atom_i, atom_j, RCoord[0], RCoord[1], RCoord[2]); + matrix->add_element(row - pv_serial.atom_begin_row[atom_i], + col - pv_serial.atom_begin_col[atom_j], + value); + } + } +#ifdef __MPI +} + // thirdly, distribute hcontainer_serial to parallel hcontainer + // send s from serial_rank to all ranks + int my_rank, size; + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + std::vector para_ijrs; + if (my_rank == 0) + { + para_ijrs = hcontainer_serial.get_ijr_info(); + this->_hcontainer->insert_ijrs(¶_ijrs); + this->_hcontainer->allocate(); + } + if (my_rank != 0) + { + std::vector tmp_ijrs; + MPI_Status status; + long tmp_size = 0; + MPI_Recv(&tmp_size, 1, MPI_LONG, 0, 0, MPI_COMM_WORLD, &status); + tmp_ijrs.resize(tmp_size); + MPI_Recv(tmp_ijrs.data(), + tmp_ijrs.size(), + MPI_INT, + 0, + 1, + MPI_COMM_WORLD, + &status); + this->_hcontainer->insert_ijrs(&tmp_ijrs); + this->_hcontainer->allocate(); + } + else + { + for (int i = 1; i < size; ++i) + { + long tmp_size = para_ijrs.size(); + MPI_Send(&tmp_size, 1, MPI_LONG, i, 0, MPI_COMM_WORLD); + MPI_Send(para_ijrs.data(), para_ijrs.size(), MPI_INT, i, 1, MPI_COMM_WORLD); + } + } + // gather values from serial_rank to Parallels + transferSerial2Parallels(hcontainer_serial, this->_hcontainer, 0); +#else + std::vector para_ijrs = hcontainer_serial.get_ijr_info(); + this->_hcontainer->insert_ijrs(¶_ijrs); + this->_hcontainer->allocate(); + this->_hcontainer->add(hcontainer_serial); +#endif + +} + +template class Read_HContainer; +template class Read_HContainer>; + +} // namespace hamilt diff --git a/source/source_lcao/module_hcontainer/read_hcontainer.h b/source/source_lcao/module_hcontainer/read_hcontainer.h new file mode 100644 index 0000000000..2a0ca9d466 --- /dev/null +++ b/source/source_lcao/module_hcontainer/read_hcontainer.h @@ -0,0 +1,47 @@ +#ifndef READ_HCONTAINER_H +#define READ_HCONTAINER_H + +#include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_cell/unitcell.h" + +namespace hamilt +{ + +/** + * @brief A class to read the HContainer + */ +template +class Read_HContainer +{ + public: + Read_HContainer( + hamilt::HContainer* hcontainer, + const std::string& filename, + const int nlocal, + const UnitCell* ucell + ); + // read the matrices of all R vectors to the read stream + void read(); + + /** + * read the matrix of a single R vector to the output stream + * rx_in, ry_in, rz_in: the R vector from the input + */ + void read(int rx_in, int ry_in, int rz_in); + + /** + * read the matrix of a single R vector to the output stream + * rx, ry, rz: the R vector from the HContainer + */ + void read_single_R(int rx, int ry, int rz); + + private: + hamilt::HContainer* _hcontainer; + std::string _filename; + int _nlocal; + const UnitCell* _ucell; +}; + +} // namespace hamilt + +#endif // OUTPUT_HCONTAINER_H \ No newline at end of file diff --git a/source/source_lcao/module_hcontainer/test/CMakeLists.txt b/source/source_lcao/module_hcontainer/test/CMakeLists.txt index 2e2dc8859a..980f65e3b2 100644 --- a/source/source_lcao/module_hcontainer/test/CMakeLists.txt +++ b/source/source_lcao/module_hcontainer/test/CMakeLists.txt @@ -52,7 +52,7 @@ AddTest( ../hcontainer.cpp ../atom_pair.cpp ../../../source_basis/module_ao/parallel_orbitals.cpp - ../../../source_io/sparse_matrix.cpp + ../../../source_io/module_output/sparse_matrix.cpp ) install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -66,9 +66,9 @@ AddTest( ../atom_pair.cpp ../output_hcontainer.cpp ../../../source_basis/module_ao/parallel_orbitals.cpp - ../../../source_io/sparse_matrix.cpp - ../../../source_io/csr_reader.cpp - ../../../source_io/file_reader.cpp - ../../../source_io/output.cpp + ../../../source_io/module_output/sparse_matrix.cpp + ../../../source_io/module_output/csr_reader.cpp + ../../../source_io/module_output/file_reader.cpp + ../../../source_io/module_output/output.cpp ) endif() \ No newline at end of file diff --git a/source/source_lcao/module_hcontainer/test/test_hcontainer.cpp b/source/source_lcao/module_hcontainer/test/test_hcontainer.cpp index 536eb8744e..ef948f87d8 100644 --- a/source/source_lcao/module_hcontainer/test/test_hcontainer.cpp +++ b/source/source_lcao/module_hcontainer/test/test_hcontainer.cpp @@ -542,8 +542,8 @@ TEST_F(HContainerTest, atompair_funcs) } HR.unfix_R(); // check hr_array and hr_array2 are correct - std::complex correct1; - double correct2; + std::complex correct1 = 0.0; + double correct2 = 0.0; double correct_array[16] = { 1, 2, 3, 4, 5, 6, 7, 8, diff --git a/source/source_lcao/module_hcontainer/test/test_hcontainer_readCSR.cpp b/source/source_lcao/module_hcontainer/test/test_hcontainer_readCSR.cpp index c75df807ac..3ce249e025 100644 --- a/source/source_lcao/module_hcontainer/test/test_hcontainer_readCSR.cpp +++ b/source/source_lcao/module_hcontainer/test/test_hcontainer_readCSR.cpp @@ -1,6 +1,6 @@ #include "../hcontainer.h" #include "../output_hcontainer.h" -#include "source_io/csr_reader.h" +#include "source_io/module_output/csr_reader.h" #include "prepare_unitcell.h" #include "gmock/gmock.h" diff --git a/source/source_lcao/module_lr/CMakeLists.txt b/source/source_lcao/module_lr/CMakeLists.txt index 3278252c84..331e7dc22e 100644 --- a/source/source_lcao/module_lr/CMakeLists.txt +++ b/source/source_lcao/module_lr/CMakeLists.txt @@ -11,7 +11,6 @@ if(ENABLE_LCAO) ao_to_mo_transformer/ao_to_mo_serial.cpp dm_trans/dm_trans_parallel.cpp dm_trans/dm_trans_serial.cpp - dm_trans/dmr_complex.cpp operator_casida/operator_lr_hxc.cpp operator_casida/operator_lr_exx.cpp potentials/pot_hxc_lrtd.cpp diff --git a/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp b/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp index 7e614619db..7d936365ce 100644 --- a/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp +++ b/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_parallel.cpp @@ -51,18 +51,18 @@ namespace LR char transb = 'N'; const double alpha = 1.0; const double beta = add_on ? 1.0 : 0.0; - pdgemm_(&transa, &transb, &naos, &nmo1, &naos, - &alpha, mat_ao[isk].data(), &i1, &i1, pmat_ao.desc, - coeff.get_pointer(), &i1, &imo1, pcoeff.desc, - &beta, Vc.data(), &i1, &i1, pVc.desc); + ScalapackConnector::gemm(transa, transb, naos, nmo1, naos, + alpha, mat_ao[isk].data(), i1, i1, pmat_ao.desc, + coeff.get_pointer(), i1, imo1, pcoeff.desc, + beta, Vc.data(), i1, i1, pVc.desc); transa = 'T'; // mat_mo = c ^ TVc // descC puts M(nvirt) to row - pdgemm_(&transa, &transb, &nmo2, &nmo1, &naos, - &alpha, coeff.get_pointer(), &i1, &imo2, pcoeff.desc, - Vc.data(), &i1, &i1, pVc.desc, - &beta, mat_mo + start, &i1, &i1, pmat_mo.desc); + ScalapackConnector::gemm(transa, transb, nmo2, nmo1, naos, + alpha, coeff.get_pointer(), i1, imo2, pcoeff.desc, + Vc.data(), i1, i1, pVc.desc, + beta, mat_mo + start, i1, i1, pmat_mo.desc); } } @@ -109,18 +109,18 @@ namespace LR char transb = 'N'; const std::complex alpha(1.0, 0.0); const std::complex beta = add_on ? std::complex(1.0, 0.0) : std::complex(0.0, 0.0); - pzgemm_(&transa, &transb, &naos, &nmo1, &naos, - &alpha, mat_ao[isk].data>(), &i1, &i1, pmat_ao.desc, - coeff.get_pointer(), &i1, &imo1, pcoeff.desc, - &beta, Vc.data>(), &i1, &i1, pVc.desc); + ScalapackConnector::gemm(transa, transb, naos, nmo1, naos, + alpha, mat_ao[isk].data>(), i1, i1, pmat_ao.desc, + coeff.get_pointer(), i1, imo1, pcoeff.desc, + beta, Vc.data>(), i1, i1, pVc.desc); transa = 'C'; // mat_mo = c ^ TVc // descC puts M(nvirt) to row - pzgemm_(&transa, &transb, &nmo2, &nmo1, &naos, - &alpha, coeff.get_pointer(), &i1, &imo2, pcoeff.desc, - Vc.data>(), &i1, &i1, pVc.desc, - &beta, mat_mo + start, &i1, &i1, pmat_mo.desc); + ScalapackConnector::gemm(transa, transb, nmo2, nmo1, naos, + alpha, coeff.get_pointer(), i1, imo2, pcoeff.desc, + Vc.data>(), i1, i1, pVc.desc, + beta, mat_mo + start, i1, i1, pmat_mo.desc); } } } diff --git a/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp b/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp index 1ddec7f8da..b65f871f32 100644 --- a/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp +++ b/source/source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo_serial.cpp @@ -110,15 +110,15 @@ namespace LR char transb = 'N'; //coeff is col major const double alpha = 1.0; const double beta = add_on ? 1.0 : 0.0; - dgemm_(&transa, &transb, &naos, &nmo1, &naos, &alpha, - mat_ao[isk].data(), &naos, coeff.get_pointer(imo1), &naos, &beta, - Vc.data(), &naos); + BlasConnector::gemm(transb, transa, nmo1, naos, naos, alpha, + coeff.get_pointer(imo1), naos, mat_ao[isk].data(), naos, beta, + Vc.data(), naos); transa = 'T'; //mat_mo=coeff^TVc (nvirt major) - dgemm_(&transa, &transb, &nmo2, &nmo1, &naos, &alpha, - coeff.get_pointer(imo2), &naos, Vc.data(), &naos, &beta, - mat_mo + start, &nmo2); + BlasConnector::gemm(transb, transa, nmo1, nmo2, naos, alpha, + Vc.data(), naos, coeff.get_pointer(imo2), naos, beta, + mat_mo + start, nmo2); } } template<> @@ -151,15 +151,15 @@ namespace LR char transb = 'N'; //coeff is col major const std::complex alpha(1.0, 0.0); const std::complex beta = add_on ? std::complex(1.0, 0.0) : std::complex(0.0, 0.0); - zgemm_(&transa, &transb, &naos, &nmo1, &naos, &alpha, - mat_ao[isk].data>(), &naos, coeff.get_pointer(imo1), &naos, &beta, - Vc.data>(), &naos); + BlasConnector::gemm(transb, transa, nmo1, naos, naos, alpha, + coeff.get_pointer(imo1), naos, mat_ao[isk].data>(), naos, beta, + Vc.data>(), naos); transa = 'C'; //mat_mo=coeff^\dagger Vc (nvirt major) - zgemm_(&transa, &transb, &nmo2, &nmo1, &naos, &alpha, - coeff.get_pointer(imo2), &naos, Vc.data>(), &naos, &beta, - mat_mo + start, &nmo2); + BlasConnector::gemm(transb, transa, nmo1, nmo2, naos, alpha, + Vc.data>(), naos, coeff.get_pointer(imo2), naos, beta, + mat_mo + start, nmo2); } } } \ No newline at end of file diff --git a/source/source_lcao/module_lr/dm_trans/dm_trans_parallel.cpp b/source/source_lcao/module_lr/dm_trans/dm_trans_parallel.cpp index ebc8f2c697..5b36f798b2 100644 --- a/source/source_lcao/module_lr/dm_trans/dm_trans_parallel.cpp +++ b/source/source_lcao/module_lr/dm_trans/dm_trans_parallel.cpp @@ -53,16 +53,16 @@ std::vector cal_dm_trans_pblas(const double* const X_istate, DEV::CpuDevice, {pXc.get_col_size(), pXc.get_row_size()}); // row is "inside"(memory contiguity) for pblas Xc.zero(); - pdgemm_(&transa, &transb, &naos, &nmo2, &nmo1, - &alpha, c.get_pointer(), &i1, &imo1, pc.desc, - X_istate + x_start, &i1, &i1, px.desc, - &beta, Xc.data(), &i1, &i1, pXc.desc); + ScalapackConnector::gemm(transa, transb, naos, nmo2, nmo1, + alpha, c.get_pointer(), 1, imo1, pc.desc, + X_istate + x_start, 1, 1, px.desc, + beta, Xc.data(), 1, 1, pXc.desc); // 2. C_virt*[X*C_occ^T] - pdgemm_(&transa, &transb, &naos, &naos, &nmo2, - &factor, c.get_pointer(), &i1, &imo2, pc.desc, - Xc.data(), &i1, &i1, pXc.desc, - &beta, dm_trans[isk].data(), &i1, &i1, pmat.desc); + ScalapackConnector::gemm(transa, transb, naos, naos, nmo2, + factor, c.get_pointer(), 1, imo2, pc.desc, + Xc.data(), 1, 1, pXc.desc, + beta, dm_trans[isk].data(), 1, 1, pmat.desc); } return dm_trans; } @@ -130,17 +130,17 @@ std::vector cal_dm_trans_pblas(const std::complex* co Xc.zero(); const std::complex alpha(1.0, 0.0); const std::complex beta(0.0, 0.0); - pzgemm_(&transa, &transb, &nmo2, &naos, &nmo1, &alpha, - X_istate + x_start, &i1, &i1, px.desc, - c.get_pointer(), &i1, &imo1, pc.desc, - &beta, Xc.data>(), &i1, &i1, pXc.desc); + ScalapackConnector::gemm(transa, transb, nmo2, naos, nmo1, alpha, + X_istate + x_start, i1, i1, px.desc, + c.get_pointer(), i1, imo1, pc.desc, + beta, Xc.data>(), i1, i1, pXc.desc); // 2. [X*C_occ^\dagger]^TC_virt^T transa = transb = 'T'; - pzgemm_(&transa, &transb, &naos, &naos, &nmo2, - &factor, Xc.data>(), &i1, &i1, pXc.desc, - c.get_pointer(), &i1, &imo2, pc.desc, - &beta, dm_trans[isk].data>(), &i1, &i1, pmat.desc); + ScalapackConnector::gemm(transa, transb, naos, naos, nmo2, + factor, Xc.data>(), i1, i1, pXc.desc, + c.get_pointer(), i1, imo2, pc.desc, + beta, dm_trans[isk].data>(), i1, i1, pmat.desc); } return dm_trans; } diff --git a/source/source_lcao/module_lr/dm_trans/dm_trans_serial.cpp b/source/source_lcao/module_lr/dm_trans/dm_trans_serial.cpp index 7509760345..3a4553e0b4 100644 --- a/source/source_lcao/module_lr/dm_trans/dm_trans_serial.cpp +++ b/source/source_lcao/module_lr/dm_trans/dm_trans_serial.cpp @@ -112,13 +112,13 @@ namespace LR const double alpha = 1.0; const double beta = 0.0; container::Tensor Xc(DAT::DT_DOUBLE, DEV::CpuDevice, { nmo2, naos }); - dgemm_(&transa, &transb, &naos, &nmo2, &nmo1, &alpha, - c.get_pointer(imo1), &naos, X_istate + x_start, &nmo2, - &beta, Xc.data(), &naos); + BlasConnector::gemm(transb, transa, nmo2, naos, nmo1, alpha, + X_istate + x_start, nmo2, c.get_pointer(imo1), naos, + beta, Xc.data(), naos); // 2. C_virt*[X*C_occ^T] - dgemm_(&transa, &transb, &naos, &naos, &nmo2, &factor, - c.get_pointer(imo2), &naos, Xc.data(), &naos, &beta, - dm_trans[isk].data(), &naos); + BlasConnector::gemm(transb, transa, naos, naos, nmo2, factor, + Xc.data(), naos, c.get_pointer(imo2), naos, beta, + dm_trans[isk].data(), naos); } return dm_trans; } @@ -166,14 +166,14 @@ namespace LR // ============== = [C_occ^* * X^T * C_virt^T]^T============= // 1. X*C_occ^\dagger container::Tensor Xc(DAT::DT_COMPLEX_DOUBLE, DEV::CpuDevice, { naos, nmo2 }); - zgemm_(&transa, &transb, &nmo2, &naos, &nmo1, &alpha, - X_istate + x_start, &nmo2, c.get_pointer(imo1), &naos, - &beta, Xc.data>(), &nmo2); + BlasConnector::gemm_cm(transa, transb, nmo2, naos, nmo1, alpha, + X_istate + x_start, nmo2, c.get_pointer(imo1), naos, + beta, Xc.data>(), nmo2); // 2. [X*C_occ^\dagger]^TC_virt^T transa = transb = 'T'; - zgemm_(&transa, &transb, &naos, &naos, &nmo2, &factor, - Xc.data>(), &nmo2, c.get_pointer(imo2), &naos, &beta, - dm_trans[isk].data>(), &naos); + BlasConnector::gemm_cm(transa, transb, naos, naos, nmo2, factor, + Xc.data>(), nmo2, c.get_pointer(imo2), naos, beta, + dm_trans[isk].data>(), naos); } return dm_trans; } diff --git a/source/source_lcao/module_lr/dm_trans/dmr_complex.cpp b/source/source_lcao/module_lr/dm_trans/dmr_complex.cpp index 8009409d5d..4f62aa2a43 100644 --- a/source/source_lcao/module_lr/dm_trans/dmr_complex.cpp +++ b/source/source_lcao/module_lr/dm_trans/dmr_complex.cpp @@ -11,8 +11,8 @@ namespace elecstate ModuleBase::timer::tick("DensityMatrix", "cal_DMR"); for (int is = 1; is <= this->_nspin; ++is) { - int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 - hamilt::HContainer>* tmp_DMR = this->_DMR[is - 1]; + const int ik_begin = this->_nk * (is - 1); // jump this->_nk for spin_down if nspin==2 + hamilt::HContainer>*const tmp_DMR = this->_DMR[is - 1]; // set zero since this function is called in every scf step tmp_DMR->set_zero(); #ifdef _OPENMP @@ -21,19 +21,16 @@ namespace elecstate for (int i = 0; i < tmp_DMR->size_atom_pairs(); ++i) { hamilt::AtomPair>& tmp_ap = tmp_DMR->get_atom_pair(i); - int iat1 = tmp_ap.get_atom_i(); - int iat2 = tmp_ap.get_atom_j(); + const int iat1 = tmp_ap.get_atom_i(); + const int iat2 = tmp_ap.get_atom_j(); // get global indexes of whole matrix for each atom in this process - int row_ap = this->_paraV->atom_begin_row[iat1]; - int col_ap = this->_paraV->atom_begin_col[iat2]; - if (row_ap == -1 || col_ap == -1) - { - throw std::string("Atom-pair not belong this process"); - } + const int row_ap = this->_paraV->atom_begin_row[iat1]; + const int col_ap = this->_paraV->atom_begin_col[iat2]; + assert(row_ap != -1 && col_ap != -1 && "Atom-pair not belong this process"); for (int ir = 0; ir < tmp_ap.get_R_size(); ++ir) { const ModuleBase::Vector3 r_index = tmp_ap.get_R_index(ir); - hamilt::BaseMatrix>* tmp_matrix = tmp_ap.find_matrix(r_index); + hamilt::BaseMatrix>*const tmp_matrix = tmp_ap.find_matrix(r_index); #ifdef __DEBUG if (tmp_matrix == nullptr) { @@ -50,15 +47,16 @@ namespace elecstate // if TK==std::complex, kphase is e^{ikR} const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI; - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); - std::complex kphase = std::complex(cosp, sinp); + const std::complex kphase = std::complex(cosp, sinp); // set DMR element std::complex* tmp_DMR_pointer = tmp_matrix->get_pointer(); - std::complex* tmp_DMK_pointer = this->_DMK[ik + ik_begin].data(); + const std::complex* tmp_DMK_pointer + = this->_DMK[ik + ik_begin].data() + + col_ap * this->_paraV->nrow + row_ap; // jump DMK to fill DMR // DMR is row-major, DMK is column-major - tmp_DMK_pointer += col_ap * this->_paraV->nrow + row_ap; for (int mu = 0; mu < this->_paraV->get_row_size(iat1); ++mu) { BlasConnector::axpy(this->_paraV->get_col_size(iat2), @@ -71,11 +69,10 @@ namespace elecstate tmp_DMR_pointer += this->_paraV->get_col_size(iat2); } } -} + } // treat DMR as pauli matrix when NSPIN=4 - if (PARAM.inp.nspin == 4) { - throw std::runtime_error("complex DM(R) with NSPIN=4 is not implemented yet"); -} + if (PARAM.inp.nspin == 4) + { throw std::runtime_error("complex DM(R) with NSPIN=4 is not implemented yet"); } } } } diff --git a/source/source_lcao/module_lr/esolver_lrtd_lcao.cpp b/source/source_lcao/module_lr/esolver_lrtd_lcao.cpp index f8cafe4902..b8848e6bcd 100644 --- a/source/source_lcao/module_lr/esolver_lrtd_lcao.cpp +++ b/source/source_lcao/module_lr/esolver_lrtd_lcao.cpp @@ -7,9 +7,9 @@ #include "source_lcao/module_lr/lr_spectrum.h" #include #include "source_lcao/hamilt_lcao.h" -#include "source_io/read_wfc_nao.h" -#include "source_io/cube_io.h" -#include "source_io/print_info.h" +#include "source_io/module_wf/read_wfc_nao.h" +#include "source_io/module_output/cube_io.h" +#include "source_io/module_output/print_info.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_lcao/module_lr/utils/lr_util_print.h" #include "source_base/module_external/scalapack_connector.h" @@ -684,14 +684,15 @@ template void LR::ESolver_LR::read_ks_chg(Charge& chg_gs) { chg_gs.set_rhopw(this->pw_rho); - chg_gs.allocate(this->nspin); + const bool kin_den = chg_gs.kin_density(); // mohan add 20251202 + chg_gs.allocate(this->nspin, kin_den); GlobalV::ofs_running << " try to read charge from file : "; for (int is = 0; is < this->nspin; ++is) { std::stringstream ssc; ssc << PARAM.globalv.global_readin_dir << "SPIN" << is + 1 << "_CHG.cube"; GlobalV::ofs_running << ssc.str() << std::endl; - double ef; + double ef = 0.0; if (ModuleIO::read_vdata_palgrid(Pgrid, GlobalV::MY_RANK, GlobalV::ofs_running, diff --git a/source/source_lcao/module_lr/operator_casida/operator_lr_hxc.cpp b/source/source_lcao/module_lr/operator_casida/operator_lr_hxc.cpp index 4aed4244f4..5b008589e1 100644 --- a/source/source_lcao/module_lr/operator_casida/operator_lr_hxc.cpp +++ b/source/source_lcao/module_lr/operator_casida/operator_lr_hxc.cpp @@ -8,7 +8,6 @@ // #include "source_lcao/DM_gamma_2d_to_grid.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" #include "source_lcao/module_lr/ao_to_mo_transformer/ao_to_mo.h" -#include "source_pw/module_pwdft/global.h" #include "source_lcao/module_gint/gint_interface.h" inline double conj(double a) { return a; } @@ -120,4 +119,4 @@ namespace LR template class OperatorLRHxc; template class OperatorLRHxc>; -} \ No newline at end of file +} diff --git a/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.cpp b/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.cpp index 58febe316e..d4b04ad3ff 100644 --- a/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.cpp +++ b/source/source_lcao/module_lr/potentials/pot_hxc_lrtd.cpp @@ -6,7 +6,6 @@ #include #include "source_lcao/module_lr/utils/lr_util.h" #include "source_lcao/module_lr/utils/lr_util_xc.hpp" -#include "source_pw/module_pwdft/global.h" // tmp, for pgrid #define FXC_PARA_TYPE const double* const rho, ModuleBase::matrix& v_eff, const std::vector& ispin_op = { 0,0 } namespace LR { diff --git a/source/source_lcao/module_lr/potentials/xc_kernel.cpp b/source/source_lcao/module_lr/potentials/xc_kernel.cpp index 69c37b8de2..b28d44a0c6 100644 --- a/source/source_lcao/module_lr/potentials/xc_kernel.cpp +++ b/source/source_lcao/module_lr/potentials/xc_kernel.cpp @@ -6,7 +6,7 @@ #include "source_lcao/module_lr/utils/lr_util_xc.hpp" #include #include -#include "source_io/cube_io.h" +#include "source_io/module_output/cube_io.h" #ifdef USE_LIBXC #include #include "source_hamilt/module_xc/xc_functional_libxc.h" diff --git a/source/source_lcao/module_lr/utils/lr_util.cpp b/source/source_lcao/module_lr/utils/lr_util.cpp index ae2f00ffa3..f720012413 100644 --- a/source/source_lcao/module_lr/utils/lr_util.cpp +++ b/source/source_lcao/module_lr/utils/lr_util.cpp @@ -120,7 +120,7 @@ namespace LR_Util ModuleBase::TITLE("LR_Util", "diag_lapack"); int info = 0; char jobz = 'V', uplo = 'U'; - double work_tmp; + double work_tmp = 0.0; const int minus_one = -1; dsyev_(&jobz, &uplo, &n, mat, &n, eig, &work_tmp, &minus_one, &info); // get best lwork const int lwork = work_tmp; @@ -149,7 +149,7 @@ namespace LR_Util ModuleBase::TITLE("LR_Util", "diag_lapack_nh"); int info = 0; char jobvl = 'N', jobvr = 'V'; //calculate right eigenvectors - double work_tmp; + double work_tmp = 0.0; const int minus_one = -1; std::vector eig_real(n); std::vector eig_imag(n); diff --git a/source/source_lcao/module_lr/utils/test/CMakeLists.txt b/source/source_lcao/module_lr/utils/test/CMakeLists.txt index 4b4589a5c9..2ecf21011d 100644 --- a/source/source_lcao/module_lr/utils/test/CMakeLists.txt +++ b/source/source_lcao/module_lr/utils/test/CMakeLists.txt @@ -3,7 +3,7 @@ AddTest( TARGET lr_util_phys_test LIBS parameter base ${math_libs} device container planewave #for FFT SOURCES lr_util_physics_test.cpp ../lr_util.cpp - ../../../../source_io/orb_io.cpp + ../../../../source_io/module_output/orb_io.cpp ) AddTest( diff --git a/source/source_lcao/module_operator_lcao/CMakeLists.txt b/source/source_lcao/module_operator_lcao/CMakeLists.txt index 0e49a9dc43..e9dbbe381b 100644 --- a/source/source_lcao/module_operator_lcao/CMakeLists.txt +++ b/source/source_lcao/module_operator_lcao/CMakeLists.txt @@ -6,14 +6,15 @@ add_library( meta_lcao.cpp veff_lcao.cpp deepks_lcao.cpp - overlap_new.cpp - ekinetic_new.cpp - nonlocal_new.cpp + overlap.cpp + ekinetic.cpp + nonlocal.cpp td_ekinetic_lcao.cpp td_nonlocal_lcao.cpp td_pot_hybrid.cpp dspin_lcao.cpp dftu_lcao.cpp + operator_force_stress_utils.cpp ) if(ENABLE_COVERAGE) diff --git a/source/source_lcao/module_operator_lcao/deepks_lcao.cpp b/source/source_lcao/module_operator_lcao/deepks_lcao.cpp index 5e75cc9b40..67a77a0e4a 100644 --- a/source/source_lcao/module_operator_lcao/deepks_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/deepks_lcao.cpp @@ -152,13 +152,8 @@ void hamilt::DeePKS>::contributeHR() { ModuleBase::timer::tick("DeePKS", "contributeHR"); - const int inlmax = ptr_orb_->Alpha[0].getTotal_nchi() * this->ucell->nat; - DeePKS_domain::cal_pdm(this->ld->init_pdm, - inlmax, - this->ld->lmaxd, - this->ld->inl2l, - this->ld->inl_index, + this->ld->deepks_param, this->kvec_d, this->ld->dm_r, this->ld->phialpha, @@ -170,19 +165,13 @@ void hamilt::DeePKS>::contributeHR() std::vector descriptor; DeePKS_domain::cal_descriptor(this->ucell->nat, - inlmax, - this->ld->inl2l, + this->ld->deepks_param, this->ld->pdm, - descriptor, - this->ld->des_per_atom); + descriptor); if (PARAM.inp.deepks_equiv) { DeePKS_domain::cal_edelta_gedm_equiv(this->ucell->nat, - this->ld->lmaxd, - this->ld->nmaxd, - inlmax, - this->ld->des_per_atom, - this->ld->inl2l, + this->ld->deepks_param, descriptor, this->ld->gedm, this->ld->E_delta, @@ -191,9 +180,7 @@ void hamilt::DeePKS>::contributeHR() else { DeePKS_domain::cal_edelta_gedm(this->ucell->nat, - inlmax, - this->ld->des_per_atom, - this->ld->inl2l, + this->ld->deepks_param, descriptor, this->ld->pdm, this->ld->model_deepks, @@ -253,7 +240,7 @@ void hamilt::DeePKS>::calculate_HR() { for (int N0 = 0; N0 < ptr_orb_->Alpha[0].getNchi(L0); ++N0) { - const int inl = this->ld->inl_index[T0](I0, L0, N0); + const int inl = this->ld->deepks_param.inl_index[T0](I0, L0, N0); const double* pgedm = this->ld->gedm[inl]; const int nm = 2 * L0 + 1; @@ -274,7 +261,7 @@ void hamilt::DeePKS>::calculate_HR() { const double* pgedm = this->ld->gedm[iat0]; int nproj = 0; - for (int il = 0; il < this->ld->lmaxd + 1; il++) + for (int il = 0; il < this->ld->deepks_param.lmaxd + 1; il++) { nproj += (2 * il + 1) * ptr_orb_->Alpha[0].getNchi(il); } @@ -364,19 +351,19 @@ void hamilt::DeePKS>::calculate_HR() constexpr char transa = 'T', transb = 'N'; const double gemm_alpha = 1.0, gemm_beta = 1.0; - dgemm_(&transa, - &transb, - &col_size, - &row_size, - &trace_alpha_size, - &gemm_alpha, - s_2t.data(), - &trace_alpha_size, + BlasConnector::gemm(transb, + transa, + row_size, + col_size, + trace_alpha_size, + gemm_alpha, s_1t.data(), - &trace_alpha_size, - &gemm_beta, + trace_alpha_size, + s_2t.data(), + trace_alpha_size, + gemm_beta, hr_current.data(), - &col_size); + col_size); // add data of HR to target BaseMatrix #pragma omp critical diff --git a/source/source_lcao/module_operator_lcao/dftu_force_stress.hpp b/source/source_lcao/module_operator_lcao/dftu_force_stress.hpp index 2ce46854a4..8175d1009f 100644 --- a/source/source_lcao/module_operator_lcao/dftu_force_stress.hpp +++ b/source/source_lcao/module_operator_lcao/dftu_force_stress.hpp @@ -324,7 +324,7 @@ void DFTU>::cal_force_IJR(const int& iat1, step_trace[3] = col_indexes.size() + 1; } - double tmp[3]; + double tmp[3] = {0.0}; // calculate the local matrix for (int is = 0; is < nspin; is++) { diff --git a/source/source_lcao/module_operator_lcao/dftu_lcao.cpp b/source/source_lcao/module_operator_lcao/dftu_lcao.cpp index c35aa51bef..327076fab5 100644 --- a/source/source_lcao/module_operator_lcao/dftu_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/dftu_lcao.cpp @@ -19,12 +19,12 @@ hamilt::DFTU>::DFTU(HS_Matrix_K* hsk_in, const Grid_Driver* GridD_in, const TwoCenterIntegrator* intor, const std::vector& orb_cutoff, - ModuleDFTU::DFTU* dftu_in) + Plus_U* p_dftu) : hamilt::OperatorLCAO(hsk_in, kvec_d_in, hR_in), intor_(intor), orb_cutoff_(orb_cutoff) { this->cal_type = calculation_type::lcao_dftu; this->ucell = &ucell_in; - this->dftu = dftu_in; + this->dftu = p_dftu; #ifdef __DEBUG assert(this->ucell != nullptr); #endif @@ -186,7 +186,7 @@ void hamilt::DFTU>::contributeHR() // will update this->dftu->locale and this->dftu->EU if (this->current_spin == 0) { - this->dftu->EU = 0.0; + this->dftu->set_energy(0.0); } } ModuleBase::timer::tick("DFTU", "contributeHR"); @@ -272,7 +272,12 @@ void hamilt::DFTU>::contributeHR() ModuleBase::timer::tick("DFTU", "cal_vu"); const double u_value = this->dftu->U[T0]; std::vector VU_tmp(occ.size()); - this->cal_v_of_u(occ, tlp1, u_value, VU_tmp.data(), this->dftu->EU); + + // mohan add 2025-11-08 + double u_energy = Plus_U::get_energy(); + this->cal_v_of_u(occ, tlp1, u_value, VU_tmp.data(), u_energy); + Plus_U::set_energy(u_energy); + // transfer occ from pauli matrix format to normal format std::vector VU(occ.size()); this->transfer_vu(VU_tmp, VU); @@ -311,7 +316,7 @@ void hamilt::DFTU>::contributeHR() // energy correction for NSPIN=1 if (this->nspin == 1) { - this->dftu->EU *= 2.0; + this->dftu->set_double_energy(); } // for readin onsite_dm, set initialed_locale to false to avoid using readin locale in next iteration if (this->current_spin == this->nspin - 1 || this->nspin == 4) diff --git a/source/source_lcao/module_operator_lcao/dftu_lcao.h b/source/source_lcao/module_operator_lcao/dftu_lcao.h index 4ef1890f76..d24c03bd8d 100644 --- a/source/source_lcao/module_operator_lcao/dftu_lcao.h +++ b/source/source_lcao/module_operator_lcao/dftu_lcao.h @@ -33,7 +33,7 @@ class DFTU> : public OperatorLCAO const Grid_Driver* gridD_in, const TwoCenterIntegrator* intor, const std::vector& orb_cutoff, - ModuleDFTU::DFTU* dftu_in); + Plus_U* p_dftu); ~DFTU>(); /** @@ -51,7 +51,7 @@ class DFTU> : public OperatorLCAO private: const UnitCell* ucell = nullptr; - ModuleDFTU::DFTU* dftu = nullptr; + Plus_U* dftu = nullptr; hamilt::HContainer* HR = nullptr; diff --git a/source/source_lcao/module_operator_lcao/dspin_force_stress.hpp b/source/source_lcao/module_operator_lcao/dspin_force_stress.hpp index ff14029e25..449d73c050 100644 --- a/source/source_lcao/module_operator_lcao/dspin_force_stress.hpp +++ b/source/source_lcao/module_operator_lcao/dspin_force_stress.hpp @@ -272,7 +272,7 @@ void DeltaSpin>::cal_force_IJR(const int& iat1, step_trace[2] = col_indexes.size(); step_trace[3] = col_indexes.size() + 1; } - double tmp[3]; + double tmp[3] = {0.0}; // calculate the local matrix for (int is = 1; is < nspin; is++) { diff --git a/source/source_lcao/module_operator_lcao/ekinetic_new.cpp b/source/source_lcao/module_operator_lcao/ekinetic.cpp similarity index 79% rename from source/source_lcao/module_operator_lcao/ekinetic_new.cpp rename to source/source_lcao/module_operator_lcao/ekinetic.cpp index d276e7cd56..77d751cb67 100644 --- a/source/source_lcao/module_operator_lcao/ekinetic_new.cpp +++ b/source/source_lcao/module_operator_lcao/ekinetic.cpp @@ -1,4 +1,4 @@ -#include "ekinetic_new.h" +#include "ekinetic.h" #include "source_base/timer.h" #include "source_base/tool_title.h" @@ -8,7 +8,7 @@ // Constructor template -hamilt::EkineticNew>::EkineticNew( +hamilt::EKinetic>::EKinetic( HS_Matrix_K* hsk_in, const std::vector>& kvec_d_in, hamilt::HContainer* hR_in, @@ -16,7 +16,7 @@ hamilt::EkineticNew>::EkineticNew( const std::vector& orb_cutoff, const Grid_Driver* GridD_in, const TwoCenterIntegrator* intor) - : hamilt::OperatorLCAO(hsk_in, kvec_d_in, hR_in), orb_cutoff_(orb_cutoff), intor_(intor) + : hamilt::OperatorLCAO(hsk_in, kvec_d_in, hR_in), orb_cutoff_(orb_cutoff), intor_(intor), gridD(GridD_in) { this->cal_type = calculation_type::lcao_fixed; this->ucell = ucell_in; @@ -25,12 +25,16 @@ hamilt::EkineticNew>::EkineticNew( assert(this->hsk != nullptr); #endif // initialize HR to allocate sparse Ekinetic matrix memory - this->initialize_HR(GridD_in); + // Only initialize if hR_in is not nullptr (for force calculation, hR_in can be nullptr) + if (hR_in != nullptr) + { + this->initialize_HR(GridD_in); + } } // destructor template -hamilt::EkineticNew>::~EkineticNew() +hamilt::EKinetic>::~EKinetic() { if (this->allocated) { @@ -40,10 +44,10 @@ hamilt::EkineticNew>::~EkineticNew() // initialize_HR() template -void hamilt::EkineticNew>::initialize_HR(const Grid_Driver* GridD) +void hamilt::EKinetic>::initialize_HR(const Grid_Driver* GridD) { - ModuleBase::TITLE("EkineticNew", "initialize_HR"); - ModuleBase::timer::tick("EkineticNew", "initialize_HR"); + ModuleBase::TITLE("EKinetic", "initialize_HR"); + ModuleBase::timer::tick("EKinetic", "initialize_HR"); auto* paraV = this->hR->get_paraV();// get parallel orbitals from HR // TODO: if paraV is nullptr, AtomPair can not use paraV for constructor, I will repair it in the future. @@ -92,18 +96,20 @@ void hamilt::EkineticNew>::initialize_HR(const Grid // allocate the memory of BaseMatrix in HR, and set the new values to zero this->hR->allocate(nullptr, true); - ModuleBase::timer::tick("EkineticNew", "initialize_HR"); + ModuleBase::timer::tick("EKinetic", "initialize_HR"); } template -void hamilt::EkineticNew>::calculate_HR() +void hamilt::EKinetic>::calculate_HR() { - ModuleBase::TITLE("EkineticNew", "calculate_HR"); + ModuleBase::TITLE("EKinetic", "calculate_HR"); if (this->HR_fixed == nullptr || this->HR_fixed->size_atom_pairs() <= 0) { - ModuleBase::WARNING_QUIT("hamilt::EkineticNew::calculate_HR", "HR_fixed is nullptr or empty"); + // Skip calculation if HR_fixed is empty (e.g., zero cutoff case) + // This is not an error, just means there are no atom pairs to calculate + return; } - ModuleBase::timer::tick("EkineticNew", "calculate_HR"); + ModuleBase::timer::tick("EKinetic", "calculate_HR"); const Parallel_Orbitals* paraV = this->HR_fixed->get_atom_pair(0).get_paraV(); #ifdef _OPENMP @@ -131,17 +137,17 @@ void hamilt::EkineticNew>::calculate_HR() } else { - ModuleBase::WARNING_QUIT("hamilt::EkineticNew::calculate_HR", "R_index not found in HR"); + ModuleBase::WARNING_QUIT("hamilt::EKinetic::calculate_HR", "R_index not found in HR"); } } } - ModuleBase::timer::tick("EkineticNew", "calculate_HR"); + ModuleBase::timer::tick("EKinetic", "calculate_HR"); } // cal_HR_IJR() template -void hamilt::EkineticNew>::cal_HR_IJR(const int& iat1, +void hamilt::EKinetic>::cal_HR_IJR(const int& iat1, const int& iat2, const Parallel_Orbitals* paraV, const ModuleBase::Vector3& dtau, @@ -210,7 +216,7 @@ void hamilt::EkineticNew>::cal_HR_IJR(const int& ia // set_HR_fixed() template -void hamilt::EkineticNew>::set_HR_fixed(void* HR_fixed_in) +void hamilt::EKinetic>::set_HR_fixed(void* HR_fixed_in) { this->HR_fixed = static_cast*>(HR_fixed_in); this->allocated = false; @@ -218,10 +224,10 @@ void hamilt::EkineticNew>::set_HR_fixed(void* HR_fi // contributeHR() template -void hamilt::EkineticNew>::contributeHR() +void hamilt::EKinetic>::contributeHR() { - ModuleBase::TITLE("EkineticNew", "contributeHR"); - ModuleBase::timer::tick("EkineticNew", "contributeHR"); + ModuleBase::TITLE("EKinetic", "contributeHR"); + ModuleBase::timer::tick("EKinetic", "contributeHR"); if (!this->HR_fixed_done) { @@ -242,15 +248,19 @@ void hamilt::EkineticNew>::contributeHR() this->HR_fixed_done = true; } // last node of sub-chain, add HR_fixed into HR - if (this->next_sub_op == nullptr) + // skip if HR_fixed is nullptr or empty + if (this->next_sub_op == nullptr && this->HR_fixed != nullptr && this->HR_fixed->size_atom_pairs() > 0) { this->hR->add(*(this->HR_fixed)); } - ModuleBase::timer::tick("EkineticNew", "contributeHR"); + ModuleBase::timer::tick("EKinetic", "contributeHR"); return; } -template class hamilt::EkineticNew>; -template class hamilt::EkineticNew, double>>; -template class hamilt::EkineticNew, std::complex>>; +// Include force/stress implementation +#include "ekinetic_force_stress.hpp" + +template class hamilt::EKinetic>; +template class hamilt::EKinetic, double>>; +template class hamilt::EKinetic, std::complex>>; diff --git a/source/source_lcao/module_operator_lcao/ekinetic_new.h b/source/source_lcao/module_operator_lcao/ekinetic.h similarity index 55% rename from source/source_lcao/module_operator_lcao/ekinetic_new.h rename to source/source_lcao/module_operator_lcao/ekinetic.h index 7b8879b78c..916c384a09 100644 --- a/source/source_lcao/module_operator_lcao/ekinetic_new.h +++ b/source/source_lcao/module_operator_lcao/ekinetic.h @@ -1,5 +1,5 @@ -#ifndef EKINETICNEW_H -#define EKINETICNEW_H +#ifndef EKINETIC_H +#define EKINETIC_H #include "source_basis/module_ao/parallel_orbitals.h" #include "source_basis/module_nao/two_center_integrator.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" @@ -11,22 +11,22 @@ namespace hamilt { -#ifndef __EKINETICNEWTEMPLATE -#define __EKINETICNEWTEMPLATE +#ifndef __EKINETICTEMPLATE +#define __EKINETICTEMPLATE -/// The EkineticNew class template inherits from class T +/// The EKinetic class template inherits from class T /// it is used to calculate the electronic kinetic /// Template parameters: /// - T: base class, it would be OperatorLCAO or OperatorPW /// - TR: data type of real space Hamiltonian, it would be double or std::complex template -class EkineticNew : public T +class EKinetic : public T { }; #endif -/// EkineticNew class template specialization for OperatorLCAO base class +/// EKinetic class template specialization for OperatorLCAO base class /// It is used to calculate the electronic kinetic matrix in real space and fold it to k-space /// HR = /// HK = = \sum_{R} e^{ikR} HR @@ -34,13 +34,13 @@ class EkineticNew : public T /// - TK: data type of k-space Hamiltonian /// - TR: data type of real space Hamiltonian template -class EkineticNew> : public OperatorLCAO +class EKinetic> : public OperatorLCAO { public: /** - * @brief Construct a new EkineticNew object + * @brief Construct a new EKinetic object */ - EkineticNew>(HS_Matrix_K* hsk_in, + EKinetic>(HS_Matrix_K* hsk_in, const std::vector>& kvec_d_in, HContainer* hR_in, const UnitCell* ucell_in, @@ -49,9 +49,9 @@ class EkineticNew> : public OperatorLCAO const TwoCenterIntegrator* intor); /** - * @brief Destroy the EkineticNew object + * @brief Destroy the EKinetic object */ - ~EkineticNew>(); + ~EKinetic>(); /** * @brief contributeHR() is used to calculate the HR matrix @@ -61,6 +61,20 @@ class EkineticNew> : public OperatorLCAO virtual void set_HR_fixed(void*) override; + /** + * @brief calculate force and stress for kinetic operator + * @param cal_force whether to calculate force + * @param cal_stress whether to calculate stress + * @param dmR density matrix in real space + * @param force output force matrix (nat x 3) + * @param stress output stress matrix (3 x 3) + */ + void cal_force_stress(const bool cal_force, + const bool cal_stress, + const HContainer* dmR, + ModuleBase::matrix& force, + ModuleBase::matrix& stress); + private: const UnitCell* ucell = nullptr; std::vector orb_cutoff_; @@ -69,6 +83,8 @@ class EkineticNew> : public OperatorLCAO const TwoCenterIntegrator* intor_ = nullptr; + const Grid_Driver* gridD = nullptr; + bool allocated = false; bool HR_fixed_done = false; @@ -95,6 +111,31 @@ class EkineticNew> : public OperatorLCAO const ModuleBase::Vector3& dtau, TR* data_pointer); + /** + * @brief calculate force contribution for atom pair + */ + void cal_force_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + double* force1, + double* force2); + + /** + * @brief calculate stress contribution for atom pair + */ + void cal_stress_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress); + /// @brief exact the nearest neighbor atoms from all adjacent atoms std::vector adjs_all; }; diff --git a/source/source_lcao/module_operator_lcao/ekinetic_force_stress.hpp b/source/source_lcao/module_operator_lcao/ekinetic_force_stress.hpp new file mode 100644 index 0000000000..b7427f69c1 --- /dev/null +++ b/source/source_lcao/module_operator_lcao/ekinetic_force_stress.hpp @@ -0,0 +1,67 @@ +#pragma once +#include "ekinetic.h" +#include "operator_force_stress_utils.hpp" +#include "source_base/timer.h" + +namespace hamilt +{ + +template +void EKinetic>::cal_force_stress(const bool cal_force, + const bool cal_stress, + const HContainer* dmR, + ModuleBase::matrix& force, + ModuleBase::matrix& stress) +{ + ModuleBase::TITLE("EKinetic", "cal_force_stress"); + ModuleBase::timer::tick("EKinetic", "cal_force_stress"); + + // Lambda function to calculate kinetic integral and its gradient + auto integral_calc = [this](int T1, int L1, int N1, int M1, + int T2, int L2, int N2, int M2, + const ModuleBase::Vector3& dtau, + double* olm) { + this->intor_->calculate(T1, L1, N1, M1, T2, L2, N2, M2, + dtau * this->ucell->lat0, &olm[0], &olm[1]); + }; + + // Use unified template with ForceSign=+1, StressSign=-1 for kinetic operator + OperatorForceStress::cal_force_stress_2center( + cal_force, cal_stress, dmR, this->ucell, this->gridD, + this->orb_cutoff_, dmR->get_paraV(), integral_calc, force, stress); + + ModuleBase::timer::tick("EKinetic", "cal_force_stress"); +} + +// Dummy implementations for cal_force_IJR and cal_stress_IJR +// These are not used in the simplified approach above +template +void EKinetic>::cal_force_IJR( + const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + double* force1, + double* force2) +{ + // Not used in current implementation +} + +template +void EKinetic>::cal_stress_IJR( + const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress) +{ + // Not used in current implementation +} + +} // namespace hamilt diff --git a/source/source_lcao/module_operator_lcao/meta_lcao.cpp b/source/source_lcao/module_operator_lcao/meta_lcao.cpp index f5db5e939a..c6384af94f 100644 --- a/source/source_lcao/module_operator_lcao/meta_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/meta_lcao.cpp @@ -1,7 +1,6 @@ #include "meta_lcao.h" #include "source_base/timer.h" #include "source_base/tool_title.h" -#include "source_pw/module_pwdft/global.h" namespace hamilt { diff --git a/source/source_lcao/module_operator_lcao/nonlocal_new.cpp b/source/source_lcao/module_operator_lcao/nonlocal.cpp similarity index 89% rename from source/source_lcao/module_operator_lcao/nonlocal_new.cpp rename to source/source_lcao/module_operator_lcao/nonlocal.cpp index c4161114db..bf7a5ccd99 100644 --- a/source/source_lcao/module_operator_lcao/nonlocal_new.cpp +++ b/source/source_lcao/module_operator_lcao/nonlocal.cpp @@ -1,4 +1,4 @@ -#include "nonlocal_new.h" +#include "nonlocal.h" #include "source_base/timer.h" #include "source_base/tool_title.h" @@ -10,7 +10,7 @@ #endif template -hamilt::NonlocalNew>::NonlocalNew( +hamilt::Nonlocal>::Nonlocal( HS_Matrix_K* hsk_in, const std::vector>& kvec_d_in, hamilt::HContainer* hR_in, @@ -35,7 +35,7 @@ hamilt::NonlocalNew>::NonlocalNew( // destructor template -hamilt::NonlocalNew>::~NonlocalNew() +hamilt::Nonlocal>::~Nonlocal() { if (this->allocated) { @@ -45,10 +45,10 @@ hamilt::NonlocalNew>::~NonlocalNew() // initialize_HR() template -void hamilt::NonlocalNew>::initialize_HR(const Grid_Driver* GridD) +void hamilt::Nonlocal>::initialize_HR(const Grid_Driver* GridD) { - ModuleBase::TITLE("NonlocalNew", "initialize_HR"); - ModuleBase::timer::tick("NonlocalNew", "initialize_HR"); + ModuleBase::TITLE("Nonlocal", "initialize_HR"); + ModuleBase::timer::tick("Nonlocal", "initialize_HR"); auto* paraV = this->hR->get_paraV();// get parallel orbitals from HR // TODO: if paraV is nullptr, AtomPair can not use paraV for constructor, I will repair it in the future. @@ -111,14 +111,14 @@ void hamilt::NonlocalNew>::initialize_HR(const Grid // allocate the memory of BaseMatrix in HR, and set the new values to zero this->hR->allocate(nullptr, true); - ModuleBase::timer::tick("NonlocalNew", "initialize_HR"); + ModuleBase::timer::tick("Nonlocal", "initialize_HR"); } template -void hamilt::NonlocalNew>::calculate_HR() +void hamilt::Nonlocal>::calculate_HR() { - ModuleBase::TITLE("NonlocalNew", "calculate_HR"); - ModuleBase::timer::tick("NonlocalNew", "calculate_HR"); + ModuleBase::TITLE("Nonlocal", "calculate_HR"); + ModuleBase::timer::tick("Nonlocal", "calculate_HR"); const Parallel_Orbitals* paraV = this->HR_fixed->get_atom_pair(0).get_paraV(); const int npol = this->ucell->get_npol(); @@ -219,12 +219,12 @@ void hamilt::NonlocalNew>::calculate_HR() } #endif - ModuleBase::timer::tick("NonlocalNew", "calculate_HR"); + ModuleBase::timer::tick("Nonlocal", "calculate_HR"); } // cal_HR_IJR() template -void hamilt::NonlocalNew>::cal_HR_IJR( +void hamilt::Nonlocal>::cal_HR_IJR( const int& iat1, const int& iat2, const int& T0, @@ -284,7 +284,7 @@ void hamilt::NonlocalNew>::cal_HR_IJR( // set_HR_fixed() template -void hamilt::NonlocalNew>::set_HR_fixed(void* HR_fixed_in) +void hamilt::Nonlocal>::set_HR_fixed(void* HR_fixed_in) { this->HR_fixed = static_cast*>(HR_fixed_in); this->allocated = false; @@ -292,10 +292,10 @@ void hamilt::NonlocalNew>::set_HR_fixed(void* HR_fi // contributeHR() template -void hamilt::NonlocalNew>::contributeHR() +void hamilt::Nonlocal>::contributeHR() { - ModuleBase::TITLE("NonlocalNew", "contributeHR"); - ModuleBase::timer::tick("NonlocalNew", "contributeHR"); + ModuleBase::TITLE("Nonlocal", "contributeHR"); + ModuleBase::timer::tick("Nonlocal", "contributeHR"); if (!this->HR_fixed_done) { // if this Operator is the first node of the sub_chain, then HR_fixed is nullptr @@ -319,12 +319,12 @@ void hamilt::NonlocalNew>::contributeHR() { this->hR->add(*(this->HR_fixed)); } - ModuleBase::timer::tick("NonlocalNew", "contributeHR"); + ModuleBase::timer::tick("Nonlocal", "contributeHR"); return; } #include "nonlocal_force_stress.hpp" -template class hamilt::NonlocalNew>; -template class hamilt::NonlocalNew, double>>; -template class hamilt::NonlocalNew, std::complex>>; +template class hamilt::Nonlocal>; +template class hamilt::Nonlocal, double>>; +template class hamilt::Nonlocal, std::complex>>; diff --git a/source/source_lcao/module_operator_lcao/nonlocal_new.h b/source/source_lcao/module_operator_lcao/nonlocal.h similarity index 93% rename from source/source_lcao/module_operator_lcao/nonlocal_new.h rename to source/source_lcao/module_operator_lcao/nonlocal.h index 9bc19aa348..9da556b8e3 100644 --- a/source/source_lcao/module_operator_lcao/nonlocal_new.h +++ b/source/source_lcao/module_operator_lcao/nonlocal.h @@ -16,19 +16,19 @@ namespace hamilt #ifndef __NONLOCALNEWTEMPLATE #define __NONLOCALNEWTEMPLATE -/// The NonlocalNew class template inherits from class T +/// The Nonlocal class template inherits from class T /// it is used to calculate the non-local pseudopotential of wavefunction basis /// Template parameters: /// - T: base class, it would be OperatorLCAO or OperatorPW /// - TR: data type of real space Hamiltonian, it would be double or std::complex template -class NonlocalNew : public T +class Nonlocal : public T { }; #endif -/// NonlocalNew class template specialization for OperatorLCAO base class +/// Nonlocal class template specialization for OperatorLCAO base class /// It is used to calculate the non-local pseudopotential matrix in real space and fold it to k-space /// HR = D_{p1, p2} /// HK = D_{p1, p2} = \sum_{R} e^{ikR} HR @@ -36,17 +36,17 @@ class NonlocalNew : public T /// - TK: data type of k-space Hamiltonian /// - TR: data type of real space Hamiltonian template -class NonlocalNew> : public OperatorLCAO +class Nonlocal> : public OperatorLCAO { public: - NonlocalNew>(HS_Matrix_K* hsk_in, + Nonlocal>(HS_Matrix_K* hsk_in, const std::vector>& kvec_d_in, hamilt::HContainer* hR_in, const UnitCell* ucell_in, const std::vector& orb_cutoff, const Grid_Driver* GridD_in, const TwoCenterIntegrator* intor); - ~NonlocalNew>(); + ~Nonlocal>(); /** * @brief contributeHR() is used to calculate the HR matrix diff --git a/source/source_lcao/module_operator_lcao/nonlocal_force_stress.hpp b/source/source_lcao/module_operator_lcao/nonlocal_force_stress.hpp index 284842ae4d..55c9ec6b42 100644 --- a/source/source_lcao/module_operator_lcao/nonlocal_force_stress.hpp +++ b/source/source_lcao/module_operator_lcao/nonlocal_force_stress.hpp @@ -1,5 +1,6 @@ #pragma once -#include "nonlocal_new.h" +#include "nonlocal.h" +#include "operator_force_stress_utils.h" #include "source_base/parallel_reduce.h" #include "source_base/timer.h" @@ -7,16 +8,16 @@ namespace hamilt { template -void NonlocalNew>::cal_force_stress(const bool cal_force, +void Nonlocal>::cal_force_stress(const bool cal_force, const bool cal_stress, const HContainer* dmR, ModuleBase::matrix& force, ModuleBase::matrix& stress) { - ModuleBase::TITLE("NonlocalNew", "cal_force_stress"); + ModuleBase::TITLE("Nonlocal", "cal_force_stress"); // begin the calculation of force and stress - ModuleBase::timer::tick("NonlocalNew", "cal_force_stress"); + ModuleBase::timer::tick("Nonlocal", "cal_force_stress"); const Parallel_Orbitals* paraV = dmR->get_paraV(); const int npol = this->ucell->get_npol(); @@ -86,15 +87,10 @@ void NonlocalNew>::cal_force_stress(const bool cal_force, // If we are calculating force, we need also to store the gradient // and size of outer vector is then 4 // inner loop : all projectors (L0,M0) - int L1 = atom1->iw2l[iw1]; - int N1 = atom1->iw2n[iw1]; - int m1 = atom1->iw2m[iw1]; - - // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) - int M1 = (m1 % 2 == 0) ? -m1 / 2 : (m1 + 1) / 2; + auto qn1 = OperatorForceStress::get_orbital_qn(*atom1, iw1); ModuleBase::Vector3 dtau = tau0 - tau1; - intor_->snap(T1, L1, N1, M1, T0, dtau * this->ucell->lat0, true /*cal_deri*/, nlm); + intor_->snap(T1, qn1.L, qn1.N, qn1.M, T0, dtau * this->ucell->lat0, true /*cal_deri*/, nlm); // select the elements of nlm with target_L const int length = nlm[0].size(); std::vector nlm_target(length * 4); @@ -219,11 +215,11 @@ void NonlocalNew>::cal_force_stress(const bool cal_force, stress.c[3] = stress.c[1]; // stress(1,0) } - ModuleBase::timer::tick("NonlocalNew", "cal_force_stress"); + ModuleBase::timer::tick("Nonlocal", "cal_force_stress"); } template <> -void NonlocalNew, std::complex>>::cal_force_IJR(const int& iat1, +void Nonlocal, std::complex>>::cal_force_IJR(const int& iat1, const int& iat2, const int& T0, const Parallel_Orbitals* paraV, @@ -243,12 +239,8 @@ void NonlocalNew, std::complex>>::cal_ auto row_indexes = paraV->get_indexes_row(iat1); auto col_indexes = paraV->get_indexes_col(iat2); // step_trace = 0 for NSPIN=2; ={0, 1, local_col, local_col+1} for NSPIN=4 - std::vector step_trace(npol * npol, 0); - if (npol == 2) { - step_trace[1] = 1; - step_trace[2] = col_indexes.size(); - step_trace[3] = col_indexes.size() + 1; - } + std::vector step_trace; + OperatorForceStress::setup_step_trace(npol, col_indexes.size(), step_trace); // calculate the local matrix const std::complex* tmp_d = nullptr; const std::complex* dm_pointer = dmR_pointer->get_pointer(); @@ -292,7 +284,7 @@ void NonlocalNew, std::complex>>::cal_ } template <> -void NonlocalNew, std::complex>>::cal_stress_IJR(const int& iat1, +void Nonlocal, std::complex>>::cal_stress_IJR(const int& iat1, const int& iat2, const int& T0, const Parallel_Orbitals* paraV, @@ -314,12 +306,8 @@ void NonlocalNew, std::complex>>::cal_ auto row_indexes = paraV->get_indexes_row(iat1); auto col_indexes = paraV->get_indexes_col(iat2); // step_trace = 0 for NSPIN=2; ={0, 1, local_col, local_col+1} for NSPIN=4 - std::vector step_trace(npol2, 0); - if (npol == 2) { - step_trace[1] = 1; - step_trace[2] = col_indexes.size(); - step_trace[3] = col_indexes.size() + 1; - } + std::vector step_trace; + OperatorForceStress::setup_step_trace(npol, col_indexes.size(), step_trace); // calculate the local matrix const std::complex* tmp_d = nullptr; const std::complex* dm_pointer = dmR_pointer->get_pointer(); @@ -364,7 +352,7 @@ void NonlocalNew, std::complex>>::cal_ } template -void NonlocalNew>::cal_force_IJR(const int& iat1, +void Nonlocal>::cal_force_IJR(const int& iat1, const int& iat2, const int& T0, const Parallel_Orbitals* paraV, @@ -414,7 +402,7 @@ void NonlocalNew>::cal_force_IJR(const int& iat1, } template -void NonlocalNew>::cal_stress_IJR(const int& iat1, +void Nonlocal>::cal_stress_IJR(const int& iat1, const int& iat2, const int& T0, const Parallel_Orbitals* paraV, diff --git a/source/source_lcao/module_operator_lcao/op_dftu_lcao.cpp b/source/source_lcao/module_operator_lcao/op_dftu_lcao.cpp index 9fc4418bb2..ab3d482f67 100644 --- a/source/source_lcao/module_operator_lcao/op_dftu_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/op_dftu_lcao.cpp @@ -2,7 +2,6 @@ #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_lcao/module_dftu/dftu.h" -#include "source_pw/module_pwdft/global.h" namespace hamilt { @@ -27,7 +26,9 @@ void OperatorDFTU>::contributeHk(int ik) ModuleBase::timer::tick("OperatorDFTU", "contributeHk"); // Effective potential of DFT+U is added to total Hamiltonian here; Quxin adds on 20201029 std::vector eff_pot(this->hsk->get_pv()->nloc); - GlobalC::dftu.cal_eff_pot_mat_real(ik, &eff_pot[0], isk, this->hsk->get_sk()); + + this->dftu->cal_eff_pot_mat_real(ik, &eff_pot[0], isk, this->hsk->get_sk()); + double* hk = this->hsk->get_hk(); for (int irc = 0; irc < this->hsk->get_pv()->nloc; irc++) @@ -43,9 +44,12 @@ void OperatorDFTU, double>>::contributeHk(int { ModuleBase::TITLE("OperatorDFTU", "contributeHk"); ModuleBase::timer::tick("OperatorDFTU", "contributeHk"); + // Effective potential of DFT+U is added to total Hamiltonian here; Quxin adds on 20201029 std::vector> eff_pot(this->hsk->get_pv()->nloc); - GlobalC::dftu.cal_eff_pot_mat_complex(ik, &eff_pot[0], isk, this->hsk->get_sk()); + + this->dftu->cal_eff_pot_mat_complex(ik, &eff_pot[0], isk, this->hsk->get_sk()); + std::complex* hk = this->hsk->get_hk(); for (int irc = 0; irc < this->hsk->get_pv()->nloc; irc++) @@ -63,7 +67,8 @@ void OperatorDFTU, std::complex>>::con ModuleBase::timer::tick("OperatorDFTU", "contributeHk"); // Effective potential of DFT+U is added to total Hamiltonian here; Quxin adds on 20201029 std::vector> eff_pot(this->hsk->get_pv()->nloc); - GlobalC::dftu.cal_eff_pot_mat_complex(ik, &eff_pot[0], isk, this->hsk->get_sk()); + + this->dftu->cal_eff_pot_mat_complex(ik, &eff_pot[0], isk, this->hsk->get_sk()); std::complex* hk = this->hsk->get_hk(); for (int irc = 0; irc < this->hsk->get_pv()->nloc; irc++) @@ -74,4 +79,4 @@ void OperatorDFTU, std::complex>>::con ModuleBase::timer::tick("OperatorDFTU", "contributeHk"); } -} \ No newline at end of file +} diff --git a/source/source_lcao/module_operator_lcao/op_dftu_lcao.h b/source/source_lcao/module_operator_lcao/op_dftu_lcao.h index e15f4ae9dd..a8b275f045 100644 --- a/source/source_lcao/module_operator_lcao/op_dftu_lcao.h +++ b/source/source_lcao/module_operator_lcao/op_dftu_lcao.h @@ -1,7 +1,9 @@ #ifndef OPDFTULCAO_H #define OPDFTULCAO_H + #include "source_base/timer.h" #include "operator_lcao.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 namespace hamilt { @@ -22,11 +24,13 @@ class OperatorDFTU> : public OperatorLCAO public: OperatorDFTU>(HS_Matrix_K* hsk_in, const std::vector>& kvec_d_in, - hamilt::HContainer* hR_in, - const std::vector& isk_in) + hamilt::HContainer* hR_in, + Plus_U* dftu_in, // mohan add 2025-11-05 + const std::vector& isk_in) : isk(isk_in), OperatorLCAO(hsk_in, kvec_d_in, hR_in) { this->cal_type = calculation_type::lcao_dftu; + this->dftu = dftu_in; // mohan add 2025-11-07 } virtual void contributeHR() override; @@ -35,9 +39,11 @@ class OperatorDFTU> : public OperatorLCAO private: + Plus_U *dftu; // mohan add 20251107 + bool HR_fixed_done = false; const std::vector& isk; }; } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_operator_lcao/op_exx_lcao.hpp b/source/source_lcao/module_operator_lcao/op_exx_lcao.hpp index 80f0c422a2..21cf55176b 100644 --- a/source/source_lcao/module_operator_lcao/op_exx_lcao.hpp +++ b/source/source_lcao/module_operator_lcao/op_exx_lcao.hpp @@ -3,11 +3,13 @@ #ifdef __EXX #include "op_exx_lcao.h" +#include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" #include "source_lcao/module_ri/RI_2D_Comm.h" -#include "source_pw/module_pwdft/global.h" #include "source_hamilt/module_xc/xc_functional.h" -#include "source_io/restart_exx_csr.h" +#include "source_io/module_restart/restart_exx_csr.h" +#include "source_lcao/module_rt/td_info.h" +#include "source_io/module_restart/restart.h" namespace hamilt { @@ -243,10 +245,9 @@ OperatorEXX>::OperatorEXX(HS_Matrix_K* hsk_in, if (!ifs) { all_exist = 0; break; } } // Add MPI communication to synchronize all_exist across processes -#ifdef __MPI - // don't read in any files if one of the processes doesn't have it - MPI_Allreduce(MPI_IN_PLACE, &all_exist, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD); -#endif + #ifdef __MPI + Parallel_Reduce::reduce_min(all_exist); + #endif if (all_exist) { // Read HexxR in CSR format @@ -263,9 +264,9 @@ OperatorEXX>::OperatorEXX(HS_Matrix_K* hsk_in, const std::string restart_HR_path_cereal = GlobalC::restart.folder + "HexxR_" + std::to_string(PARAM.globalv.myrank); std::ifstream ifs(restart_HR_path_cereal, std::ios::binary); int all_exist_cereal = ifs ? 1 : 0; -#ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &all_exist_cereal, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD); -#endif + #ifdef __MPI + Parallel_Reduce::reduce_min(all_exist_cereal); + #endif if (!all_exist_cereal) { //no HexxR file in CSR or binary format @@ -339,7 +340,7 @@ void OperatorEXX>::contributeHR() template void OperatorEXX>::contributeHk(int ik) { - ModuleBase::TITLE("OperatorEXX", "constributeHR"); + ModuleBase::TITLE("OperatorEXX", "constributeHk"); // Peize Lin add 2016-12-03 if (PARAM.inp.calculation != "nscf" && this->two_level_step != nullptr && *this->two_level_step == 0 && !this->restart) { return; } //in the non-exx loop, do nothing @@ -369,29 +370,43 @@ void OperatorEXX>::contributeHk(int ik) } } // cal H(k) from H(R) normally - - if (GlobalC::exx_info.info_ri.real_number) { - RI_2D_Comm::add_Hexx( - ucell, - this->kv, - ik, - GlobalC::exx_info.info_global.hybrid_alpha, - *this->Hexxd, - *this->hR->get_paraV(), - this->hsk->get_hk()); - } else { - RI_2D_Comm::add_Hexx( + if(PARAM.inp.esolver_type == "tddft" && PARAM.inp.td_stype == 2) + { + RI_2D_Comm::add_Hexx_td( ucell, this->kv, ik, GlobalC::exx_info.info_global.hybrid_alpha, *this->Hexxc, *this->hR->get_paraV(), + TD_info::td_vel_op->cart_At, this->hsk->get_hk()); -} + } + else + { + if (GlobalC::exx_info.info_ri.real_number) { + RI_2D_Comm::add_Hexx( + ucell, + this->kv, + ik, + GlobalC::exx_info.info_global.hybrid_alpha, + *this->Hexxd, + *this->hR->get_paraV(), + this->hsk->get_hk()); + } else { + RI_2D_Comm::add_Hexx( + ucell, + this->kv, + ik, + GlobalC::exx_info.info_global.hybrid_alpha, + *this->Hexxc, + *this->hR->get_paraV(), + this->hsk->get_hk()); + } + } } } } // namespace hamilt #endif // __EXX -#endif // OPEXXLCAO_HPP \ No newline at end of file +#endif // OPEXXLCAO_HPP diff --git a/source/source_lcao/module_operator_lcao/operator_force_stress_utils.cpp b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.cpp new file mode 100644 index 0000000000..c485727868 --- /dev/null +++ b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.cpp @@ -0,0 +1,43 @@ +#include "operator_force_stress_utils.h" +#include "source_base/parallel_reduce.h" + +namespace OperatorForceStress { + +void finalize_force_stress( + bool cal_force, + bool cal_stress, + const UnitCell* ucell, + const std::vector& stress_tmp, + ModuleBase::matrix& force, + ModuleBase::matrix& stress, + double force_factor, + double stress_factor) +{ + if (cal_force) + { +#ifdef __MPI + Parallel_Reduce::reduce_all(force.c, force.nr * force.nc); +#endif + // Apply factor of 2 for Hermitian matrix + for (int i = 0; i < force.nr * force.nc; i++) + { + force.c[i] *= force_factor; + } + } + + if (cal_stress) + { +#ifdef __MPI + Parallel_Reduce::reduce_all(const_cast(stress_tmp.data()), 6); +#endif + const double weight = ucell->lat0 / ucell->omega; + for (int i = 0; i < 6; i++) + { + stress.c[i] = stress_tmp[i] * weight * stress_factor; + } + // Rearrange to 3x3 matrix format + rearrange_stress_matrix(stress); + } +} + +} // namespace OperatorForceStress diff --git a/source/source_lcao/module_operator_lcao/operator_force_stress_utils.h b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.h new file mode 100644 index 0000000000..26ec0245fb --- /dev/null +++ b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.h @@ -0,0 +1,124 @@ +#ifndef OPERATOR_FORCE_STRESS_UTILS_H +#define OPERATOR_FORCE_STRESS_UTILS_H + +#include "source_base/matrix.h" +#include "source_cell/unitcell.h" +#include + +namespace OperatorForceStress { + +/** + * @brief Setup step_trace array for handling npol (spin polarization) + * + * For npol=1 (non-spin-polarized): step_trace = {0} + * For npol=2 (spin-polarized): step_trace = {0, 1, col_size, col_size+1} + * + * @param npol Number of spin polarizations (1 or 2) + * @param col_size Number of columns in the density matrix block + * @param step_trace Output vector to store step trace values + */ +inline void setup_step_trace(int npol, int col_size, std::vector& step_trace) +{ + step_trace.resize(npol * npol, 0); + if (npol == 2) + { + step_trace[1] = 1; + step_trace[2] = col_size; + step_trace[3] = col_size + 1; + } +} + +/** + * @brief Structure to hold orbital quantum numbers + */ +struct OrbitalQuantumNumbers +{ + int L; ///< Angular momentum quantum number + int N; ///< Principal quantum number + int m; ///< Magnetic quantum number (internal indexing) + int M; ///< Magnetic quantum number (standard convention) +}; + +/** + * @brief Extract orbital quantum numbers from atom and orbital index + * + * @param atom Atom object containing orbital information + * @param iw Orbital index within the atom + * @return OrbitalQuantumNumbers structure with L, N, m, M values + */ +inline OrbitalQuantumNumbers get_orbital_qn(const Atom& atom, int iw) +{ + OrbitalQuantumNumbers qn; + qn.L = atom.iw2l[iw]; + qn.N = atom.iw2n[iw]; + qn.m = atom.iw2m[iw]; + qn.M = (qn.m % 2 == 0) ? -qn.m / 2 : (qn.m + 1) / 2; + return qn; +} + +/** + * @brief Helper function to extract real part from complex or real values + * + * Template specialization handles both std::complex and double types + */ +template +inline double get_real_part(const T& val) +{ + return val.real(); +} + +template <> +inline double get_real_part(const double& val) +{ + return val; +} + +/** + * @brief Rearrange stress from 6-component vector to 3x3 matrix format + * + * Input format: [xx, xy, xz, yy, yz, zz] + * Output format: 3x3 matrix with proper indexing + * + * @param stress Matrix to rearrange (must be at least 3x3) + */ +inline void rearrange_stress_matrix(ModuleBase::matrix& stress) +{ + stress.c[8] = stress.c[5]; // stress(2,2) + stress.c[7] = stress.c[4]; // stress(2,1) + stress.c[6] = stress.c[2]; // stress(2,0) + stress.c[5] = stress.c[4]; // stress(1,2) + stress.c[4] = stress.c[3]; // stress(1,1) + stress.c[3] = stress.c[1]; // stress(1,0) +} + +/** + * @brief Finalize force and stress calculations with MPI reduction and post-processing + * + * Performs: + * 1. MPI reduction of force and stress across all processes + * 2. Apply force_factor (typically 2.0 for Hermitian matrices) + * 3. Apply stress weight (lat0/omega) and stress_factor + * 4. Rearrange stress matrix to 3x3 format + * + * @param cal_force Whether force calculation is enabled + * @param cal_stress Whether stress calculation is enabled + * @param ucell Unit cell containing lattice parameters + * @param stress_tmp Temporary 6-component stress vector + * @param force Force matrix to finalize + * @param stress Stress matrix to finalize + * @param force_factor Multiplicative factor for force (default: 2.0 for Hermitian) + * @param stress_factor Multiplicative factor for stress (default: 2.0 for Hermitian) + */ +void finalize_force_stress( + bool cal_force, + bool cal_stress, + const UnitCell* ucell, + const std::vector& stress_tmp, + ModuleBase::matrix& force, + ModuleBase::matrix& stress, + double force_factor = 2.0, + double stress_factor = 2.0); + +} // namespace OperatorForceStress + +#endif // OPERATOR_FORCE_STRESS_UTILS_H diff --git a/source/source_lcao/module_operator_lcao/operator_force_stress_utils.hpp b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.hpp new file mode 100644 index 0000000000..572d117a7e --- /dev/null +++ b/source/source_lcao/module_operator_lcao/operator_force_stress_utils.hpp @@ -0,0 +1,196 @@ +#ifndef OPERATOR_FORCE_STRESS_UTILS_HPP +#define OPERATOR_FORCE_STRESS_UTILS_HPP + +#include "operator_force_stress_utils.h" +#include "source_base/parallel_reduce.h" +#include "source_base/timer.h" +#include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_basis/module_ao/parallel_orbitals.h" + +namespace OperatorForceStress { + +/** + * @brief Template function for calculating force and stress from 2-center integrals + * + * This template unifies the force/stress calculation pattern for operators that use + * 2-center integrals (e.g., overlap, kinetic energy). The sign conventions for force + * and stress are controlled by template parameters to avoid runtime overhead. + * + * @tparam TK Type for k-space matrices (double or std::complex) + * @tparam TR Type for real-space matrices (typically double) + * @tparam IntegralFunc Functor type for calculating integrals + * @tparam ForceSign Sign convention for force (+1 or -1) + * @tparam StressSign Sign convention for stress (+1 or -1) + * + * @param cal_force Whether to calculate forces + * @param cal_stress Whether to calculate stress + * @param dmR Density matrix in real space + * @param ucell Unit cell containing atomic structure + * @param gridD Grid driver for finding adjacent atoms + * @param orb_cutoff Orbital cutoff radii for each atom type + * @param paraV Parallel orbital distribution information + * @param integral_calculator Functor that calculates integral and its derivatives + * @param force Output force matrix (natom x 3) + * @param stress Output stress matrix (3 x 3) + */ +template +void cal_force_stress_2center( + const bool cal_force, + const bool cal_stress, + const hamilt::HContainer* dmR, + const UnitCell* ucell, + const Grid_Driver* gridD, + const std::vector& orb_cutoff, + const Parallel_Orbitals* paraV, + IntegralFunc& integral_calculator, + ModuleBase::matrix& force, + ModuleBase::matrix& stress) +{ + const int npol = ucell->get_npol(); + std::vector stress_tmp(6, 0); + + if (cal_force) + { + force.zero_out(); + } + + // Loop over all atom pairs and calculate force/stress contributions + #pragma omp parallel + { + std::vector stress_local(6, 0); + ModuleBase::matrix force_local(force.nr, force.nc); + + #pragma omp for schedule(dynamic) + for (int iat1 = 0; iat1 < ucell->nat; iat1++) + { + auto tau1 = ucell->get_tau(iat1); + int T1 = 0, I1 = 0; + ucell->iat2iait(iat1, &I1, &T1); + Atom& atom1 = ucell->atoms[T1]; + + // Find adjacent atoms + AdjacentAtomInfo adjs; + gridD->Find_atom(*ucell, tau1, T1, I1, &adjs); + + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T2 = adjs.ntype[ad]; + const int I2 = adjs.natom[ad]; + const int iat2 = ucell->itia2iat(T2, I2); + const ModuleBase::Vector3& R_index = adjs.box[ad]; + + // Check cutoff + ModuleBase::Vector3 dtau = ucell->cal_dtau(iat1, iat2, R_index); + if (dtau.norm() * ucell->lat0 >= orb_cutoff[T1] + orb_cutoff[T2]) + { + continue; + } + + // Find density matrix for this atom pair + const hamilt::BaseMatrix* dm_matrix = dmR->find_matrix(iat1, iat2, R_index[0], R_index[1], R_index[2]); + if (dm_matrix == nullptr) + { + continue; + } + + // Calculate force and stress for this atom pair + double* force_tmp1 = (cal_force) ? &force_local(iat1, 0) : nullptr; + double* force_tmp2 = (cal_force) ? &force_local(iat2, 0) : nullptr; + + Atom& atom2 = ucell->atoms[T2]; + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + + if (row_indexes.size() == 0 || col_indexes.size() == 0) + { + continue; + } + + const double* dm_pointer = dm_matrix->get_pointer(); + double olm[4] = {0, 0, 0, 0}; // value, dx, dy, dz + + // step_trace = 0 for npol=1; ={0, 1, col_size, col_size+1} for npol=2 + std::vector step_trace(npol * npol, 0); + if (npol == 2) + { + step_trace[1] = 1; + step_trace[2] = col_indexes.size(); + step_trace[3] = col_indexes.size() + 1; + } + + // Loop over orbital pairs + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const int iw1 = row_indexes[iw1l] / npol; + const int L1 = atom1.iw2l[iw1]; + const int N1 = atom1.iw2n[iw1]; + const int m1 = atom1.iw2m[iw1]; + const int M1 = (m1 % 2 == 0) ? -m1 / 2 : (m1 + 1) / 2; + + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const int iw2 = col_indexes[iw2l] / npol; + const int L2 = atom2.iw2l[iw2]; + const int N2 = atom2.iw2n[iw2]; + const int m2 = atom2.iw2m[iw2]; + const int M2 = (m2 % 2 == 0) ? -m2 / 2 : (m2 + 1) / 2; + + // Calculate integral and its gradient using provided functor + integral_calculator(T1, L1, N1, M1, T2, L2, N2, M2, dtau, olm); + + // only charge should be considered + const double dm_current = dm_pointer[0]; + + // Calculate force contribution with compile-time sign + if (cal_force) + { + // Factor of 2 for Hermitian matrix will be applied later + for (int i = 0; i < 3; i++) + { + force_tmp1[i] += ForceSign * dm_current * olm[i + 1]; + force_tmp2[i] -= ForceSign * dm_current * olm[i + 1]; + } + } + + // Calculate stress contribution with compile-time sign + if (cal_stress) + { + stress_local[0] += StressSign * dm_current * olm[1] * dtau.x; // xx + stress_local[1] += StressSign * dm_current * olm[1] * dtau.y; // xy + stress_local[2] += StressSign * dm_current * olm[1] * dtau.z; // xz + stress_local[3] += StressSign * dm_current * olm[2] * dtau.y; // yy + stress_local[4] += StressSign * dm_current * olm[2] * dtau.z; // yz + stress_local[5] += StressSign * dm_current * olm[3] * dtau.z; // zz + } + + dm_pointer += npol; + } + dm_pointer += (npol - 1) * col_indexes.size(); + } + } + } + + #pragma omp critical + { + if (cal_force) + { + force += force_local; + } + if (cal_stress) + { + for (int i = 0; i < 6; i++) + { + stress_tmp[i] += stress_local[i]; + } + } + } + } + + // Finalize with MPI reduction and post-processing + finalize_force_stress(cal_force, cal_stress, ucell, stress_tmp, force, stress, 1.0, 1.0); +} + +} // namespace OperatorForceStress + +#endif // OPERATOR_FORCE_STRESS_UTILS_HPP diff --git a/source/source_lcao/module_operator_lcao/operator_lcao.cpp b/source/source_lcao/module_operator_lcao/operator_lcao.cpp index 785b214e08..ec86d103e5 100644 --- a/source/source_lcao/module_operator_lcao/operator_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/operator_lcao.cpp @@ -98,7 +98,7 @@ void OperatorLCAO::init(const int ik_in) { // cal_type=lcao_overlap refer to overlap matrix operators, which are // only rely on stucture, and not changed during SCF - if (!this->hr_done) { + { // update SR first // in cal_type=lcao_overlap, SR should be updated by each sub-chain // nodes @@ -194,10 +194,14 @@ void OperatorLCAO::init(const int ik_in) { case calculation_type::lcao_exx: { //update HR first - if (!this->hr_done) + if (!this->hr_done && PARAM.inp.esolver_type != "tddft") { this->contributeHR(); } + else if(PARAM.inp.esolver_type == "tddft") + { + this->contributeHk(ik_in); + } //update HK next //in cal_type=lcao_exx, HK only need to update from one node @@ -228,7 +232,7 @@ void OperatorLCAO::init(const int ik_in) { != nullptr) { // it is not the last node, loop next init() function // pass HR status to next node and than set HR status of this node to // done - if (!this->hr_done) { + { dynamic_cast*>(this->next_op)->hr_done = this->hr_done; } @@ -271,7 +275,7 @@ void OperatorLCAO::contributeHk(int ik) { const int nrow = this->hsk->get_pv()->get_row_size(); if(PARAM.inp.td_stype == 2) { - module_rt::folding_HR_td(*this->hR, this->hsk->get_hk(), this->kvec_d[ik], nrow, 1, TD_info::td_vel_op->get_ucell(), TD_info::cart_At); + module_rt::folding_HR_td(*(TD_info::td_vel_op->get_ucell()), *this->hR, this->hsk->get_hk(), this->kvec_d[ik], TD_info::cart_At, nrow, 1); } else { @@ -283,7 +287,7 @@ void OperatorLCAO::contributeHk(int ik) { const int ncol = this->hsk->get_pv()->get_col_size(); if(PARAM.inp.td_stype == 2) { - module_rt::folding_HR_td(*this->hR, this->hsk->get_hk(), this->kvec_d[ik], ncol, 0, TD_info::td_vel_op->get_ucell(), TD_info::cart_At); + module_rt::folding_HR_td(*(TD_info::td_vel_op->get_ucell()), *this->hR, this->hsk->get_hk(), this->kvec_d[ik], TD_info::cart_At, ncol, 0); } else { diff --git a/source/source_lcao/module_operator_lcao/overlap.cpp b/source/source_lcao/module_operator_lcao/overlap.cpp new file mode 100644 index 0000000000..9c151884c8 --- /dev/null +++ b/source/source_lcao/module_operator_lcao/overlap.cpp @@ -0,0 +1,468 @@ +#include "overlap.h" + +#include "source_base/timer.h" +#include "source_base/tool_title.h" +#include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_hcontainer/hcontainer_funcs.h" +#include "source_lcao/module_hcontainer/output_hcontainer.h" +#include "source_lcao/module_operator_lcao/operator_lcao.h" +#include "source_lcao/module_rt/td_folding.h" +#include "source_lcao/module_rt/td_info.h" + +#include +#include + +namespace +{ + +/// @brief Populate an HContainer with atom pairs based on neighbor search +/// @details Searches for adjacent atoms within orbital cutoff distance and inserts +/// valid atom pairs into the container. This is the common logic shared between +/// SR (overlap matrix) and SR_async (asynchronous overlap for Hefei-NAMD). +/// @tparam TR Data type for real-space matrix elements (double or complex) +/// @param container Target HContainer to populate with atom pairs +/// @param ucell Unit cell containing atomic structure +/// @param grid_driver Grid driver for neighbor searching +/// @param orb_cutoff Orbital cutoff radii for each atom type +/// @param dtau_modifier Optional function to modify dtau before cutoff check (for velocity shifts in NAMD) +/// Signature: void(int iat1, int I1, int T1, ModuleBase::Vector3& dtau) +template +void populate_atom_pairs(hamilt::HContainer* container, + const UnitCell* ucell, + const Grid_Driver* grid_driver, + const std::vector& orb_cutoff, + std::function&)> dtau_modifier = nullptr) +{ + const Parallel_Orbitals* paraV = container->get_paraV(); + + for (int iat1 = 0; iat1 < ucell->nat; iat1++) + { + const auto tau1 = ucell->get_tau(iat1); + int T1 = 0; + int I1 = 0; + ucell->iat2iait(iat1, &I1, &T1); + + AdjacentAtomInfo adjs; + grid_driver->Find_atom(*ucell, tau1, T1, I1, &adjs); + + // Loop over adjacent atoms (including self: ad=0 corresponds to iat1 itself) + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T2 = adjs.ntype[ad]; + const int I2 = adjs.natom[ad]; + const int iat2 = ucell->itia2iat(T2, I2); + + // Skip if atom pair has no local orbitals in parallel distribution + if (paraV->get_row_size(iat1) <= 0 || paraV->get_col_size(iat2) <= 0) + { + continue; + } + + const ModuleBase::Vector3& R_index = adjs.box[ad]; + ModuleBase::Vector3 dtau = ucell->cal_dtau(iat1, iat2, R_index); + + // Apply optional dtau modification (e.g., velocity shift for NAMD) + if (dtau_modifier) + { + dtau_modifier(iat1, I1, T1, dtau); + } + + // Skip atoms beyond orbital cutoff distance + // Note: Use strict inequality (<) because at exactly the cutoff distance, + // the theoretical matrix element is zero, but numerical errors can produce + // non-zero values that affect reproducibility. + const double distance = dtau.norm() * ucell->lat0; + const double cutoff_sum = orb_cutoff[T1] + orb_cutoff[T2]; + if (distance >= cutoff_sum) + { + continue; + } + + hamilt::AtomPair atom_pair(iat1, iat2, R_index, paraV); + container->insert_pair(atom_pair); + } + } + + // Allocate memory for matrix elements and initialize to zero + container->allocate(nullptr, true); +} + +} // anonymous namespace + +template +hamilt::Overlap>::Overlap(HS_Matrix_K* hsk_in, + const std::vector>& kvec_d_in, + hamilt::HContainer* hR_in, + hamilt::HContainer* SR_in, + const UnitCell* ucell_in, + const std::vector& orb_cutoff, + const Grid_Driver* GridD_in, + const TwoCenterIntegrator* intor) + : hamilt::OperatorLCAO(hsk_in, kvec_d_in, hR_in), orb_cutoff_(orb_cutoff), intor_(intor), gridD(GridD_in) +{ + this->cal_type = calculation_type::lcao_overlap; + this->ucell = ucell_in; + this->SR = SR_in; +#ifdef __DEBUG + assert(this->ucell != nullptr); + assert(this->SR != nullptr); +#endif + // Initialize SR to allocate sparse overlap matrix memory. + // Only initialize if SR_in is not nullptr (for force calculation, SR_in can be nullptr). + if (SR_in != nullptr) + { + this->initialize_SR(GridD_in); + } +} + +template +hamilt::Overlap>::~Overlap() +{ +} + +template +void hamilt::Overlap>::initialize_SR(const Grid_Driver* GridD) +{ + ModuleBase::TITLE("OverlapNew", "initialize_SR"); + ModuleBase::timer::tick("OverlapNew", "initialize_SR"); + + populate_atom_pairs(this->SR, this->ucell, GridD, this->orb_cutoff_); + + ModuleBase::timer::tick("OverlapNew", "initialize_SR"); +} + +template +void hamilt::Overlap>::calculate_SR() +{ + ModuleBase::TITLE("Overlap", "calculate_SR"); + ModuleBase::timer::tick("Overlap", "calculate_SR"); +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int iap = 0; iap < this->SR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = this->SR->get_atom_pair(iap); + const int iat1 = tmp.get_atom_i(); + const int iat2 = tmp.get_atom_j(); + const Parallel_Orbitals* paraV = tmp.get_paraV(); + + for (int iR = 0; iR < tmp.get_R_size(); ++iR) + { + const ModuleBase::Vector3 R_index = tmp.get_R_index(iR); + auto dtau = ucell->cal_dtau(iat1, iat2, R_index); + TR* data_pointer = tmp.get_pointer(iR); + this->cal_SR_IJR(iat1, iat2, paraV, dtau, data_pointer); + } + } + // if TK == double, then SR should be fixed to gamma case + // judge type of TK equal to double + if (std::is_same::value) + { + this->SR->fix_gamma(); + } + ModuleBase::timer::tick("Overlap", "calculate_SR"); +} + +// cal_SR_IJR() +template +void hamilt::Overlap>::cal_SR_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const ModuleBase::Vector3& dtau, + TR* data_pointer) +{ + // --------------------------------------------- + // get info of orbitals of atom1 and atom2 from ucell + // --------------------------------------------- + int T1=0; + int I1=0; + this->ucell->iat2iait(iat1, &I1, &T1); + int T2=0; + int I2=0; + this->ucell->iat2iait(iat2, &I2, &T2); + Atom& atom1 = this->ucell->atoms[T1]; + Atom& atom2 = this->ucell->atoms[T2]; + + // npol is the number of polarizations, + // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), + // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) + const int npol = this->ucell->get_npol(); + + const int* iw2l1 = atom1.iw2l.data(); + const int* iw2n1 = atom1.iw2n.data(); + const int* iw2m1 = atom1.iw2m.data(); + const int* iw2l2 = atom2.iw2l.data(); + const int* iw2n2 = atom2.iw2n.data(); + const int* iw2m2 = atom2.iw2m.data(); + + // --------------------------------------------- + // calculate the overlap matrix for each pair of orbitals + // --------------------------------------------- + double olm[3] = {0, 0, 0}; + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + const int step_trace = col_indexes.size() + 1; + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const int iw1 = row_indexes[iw1l] / npol; + const int L1 = iw2l1[iw1]; + const int N1 = iw2n1[iw1]; + const int m1 = iw2m1[iw1]; + + // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) + int M1 = (m1 % 2 == 0) ? -m1 / 2 : (m1 + 1) / 2; + + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const int iw2 = col_indexes[iw2l] / npol; + const int L2 = iw2l2[iw2]; + const int N2 = iw2n2[iw2]; + const int m2 = iw2m2[iw2]; + + // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) + int M2 = (m2 % 2 == 0) ? -m2 / 2 : (m2 + 1) / 2; + intor_->calculate(T1, L1, N1, M1, T2, L2, N2, M2, dtau * this->ucell->lat0, olm); + for (int ipol = 0; ipol < npol; ipol++) + { + data_pointer[ipol * step_trace] += olm[0]; + } + data_pointer += npol; + } + data_pointer += (npol - 1) * col_indexes.size(); + } +} + +// contributeHR() +template +void hamilt::Overlap>::contributeHR() +{ + if (this->SR_fixed_done) + { + return; + } + this->calculate_SR(); + this->SR_fixed_done = true; +} + +// contributeHk() +template <> +void hamilt::Overlap>::contributeHk(int ik) +{ + //! if k vector is not changed, then do nothing and return, only for gamma_only case + if (this->kvec_d[ik] == this->kvec_d_old) + { + return; + } + ModuleBase::TITLE("Overlap", "contributeHk"); + ModuleBase::timer::tick("Overlap", "contributeHk"); + + //! set SK to zero and then calculate SK for each k vector + this->hsk->set_zero_sk(); + if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) + { + const int nrow = this->SR->get_atom_pair(0).get_paraV()->get_row_size(); + hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], nrow, 1); + } + else + { + const int ncol = this->SR->get_atom_pair(0).get_paraV()->get_col_size(); + hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], ncol, 0); + } + + // update kvec_d_old + this->kvec_d_old = this->kvec_d[ik]; + + ModuleBase::timer::tick("Overlap", "contributeHk"); +} +template +void hamilt::Overlap>::contributeHk(int ik) +{ + ModuleBase::TITLE("Overlap", "contributeHk"); + ModuleBase::timer::tick("Overlap", "contributeHk"); + + //! set SK to zero and then calculate SK for each k vector + this->hsk->set_zero_sk(); + if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) + { + const int nrow = this->SR->get_atom_pair(0).get_paraV()->get_row_size(); + if(PARAM.inp.td_stype == 2) + { + module_rt::folding_HR_td(*ucell, *this->SR, this->hsk->get_sk(), this->kvec_d[ik], TD_info::cart_At, nrow, 1); + } + else + { + hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], nrow, 1); + } + } + else + { + const int ncol = this->SR->get_atom_pair(0).get_paraV()->get_col_size(); + if(PARAM.inp.td_stype == 2) + { + module_rt::folding_HR_td(*ucell, *this->SR, this->hsk->get_sk(), this->kvec_d[ik], TD_info::cart_At, ncol, 0); + } + else + { + hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], ncol, 0); + } + } + + // update kvec_d_old + this->kvec_d_old = this->kvec_d[ik]; + + ModuleBase::timer::tick("Overlap", "contributeHk"); +} +template +TK* hamilt::Overlap>::getSk() +{ + if (this->hsk != nullptr) + { + return this->hsk->get_sk(); + } + return nullptr; +} + +//============================================================================== +// Asynchronous overlap matrix methods for Hefei-NAMD interface +// These methods calculate by shifting atom positions backward +// using atomic velocities, enabling non-adiabatic molecular dynamics calculations. +//============================================================================== + +template +hamilt::HContainer* hamilt::Overlap>::calculate_SR_async(const UnitCell& ucell_in, + const double md_dt, + const Parallel_Orbitals* paraV) +{ + ModuleBase::TITLE("OverlapNew", "calculate_SR_async"); + ModuleBase::timer::tick("OverlapNew", "calculate_SR_async"); + + // Initialize SR_async for Hefei-NAMD asynchronous overlap calculation + // This is done here to use the exact dtau with velocity shifts + hamilt::HContainer* SR_async = new hamilt::HContainer(paraV); + + // Define velocity shift modifier for dtau + // This shifts atom1 backward to its position at (t - dt), + // giving the overlap needed for NAMD. + const double vel_to_dtau = md_dt / ModuleBase::AU_to_FS / ucell_in.lat0; + auto velocity_shift = [&ucell_in, vel_to_dtau](int iat1, int I1, int T1, ModuleBase::Vector3& dtau) { + const Atom* atom1 = &ucell_in.atoms[T1]; + for (int dim = 0; dim < 3; dim++) + { + dtau[dim] += atom1->vel[I1][dim] * vel_to_dtau; + } + }; + + // Populate atom pairs with velocity-shifted dtau for cutoff checking + populate_atom_pairs(SR_async, &ucell_in, this->gridD, this->orb_cutoff_, velocity_shift); + + // Calculate overlap matrix elements with velocity-shifted dtau +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int iap = 0; iap < SR_async->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& atom_pair = SR_async->get_atom_pair(iap); + const int iat1 = atom_pair.get_atom_i(); + const int iat2 = atom_pair.get_atom_j(); + const Parallel_Orbitals* paraV_local = atom_pair.get_paraV(); + + // Get atom type and index for velocity lookup + int T1 = 0; + int I1 = 0; + ucell_in.iat2iait(iat1, &I1, &T1); + const Atom* atom1 = &ucell_in.atoms[T1]; + + for (int iR = 0; iR < atom_pair.get_R_size(); ++iR) + { + const ModuleBase::Vector3 R_index = atom_pair.get_R_index(iR); + ModuleBase::Vector3 dtau = ucell_in.cal_dtau(iat1, iat2, R_index); + + // Apply velocity shift to dtau + for (int dim = 0; dim < 3; dim++) + { + dtau[dim] += atom1->vel[I1][dim] * vel_to_dtau; + } + + TR* data_pointer = atom_pair.get_pointer(iR); + this->cal_SR_IJR(iat1, iat2, paraV_local, dtau, data_pointer); + } + } + + // For gamma-only calculations, apply symmetry constraint + if (std::is_same::value) + { + SR_async->fix_gamma(); + } + + ModuleBase::timer::tick("OverlapNew", "calculate_SR_async"); + return SR_async; +} + +template +void hamilt::Overlap>::output_SR_async_csr(const int istep, + hamilt::HContainer* SR_async, + const int precision) +{ + if (SR_async == nullptr) + { + return; + } + + ModuleBase::TITLE("OverlapNew", "output_SR_async_csr"); + ModuleBase::timer::tick("OverlapNew", "output_SR_async_csr"); + +#ifdef __MPI + // Gather distributed SR_async to rank 0 for serial output + const Parallel_Orbitals* paraV = SR_async->get_paraV(); + const int nbasis = SR_async->get_nbasis(); + + Parallel_Orbitals serial_paraV; + serial_paraV.init(nbasis, nbasis, nbasis, paraV->comm()); + serial_paraV.set_serial(nbasis, nbasis); + serial_paraV.set_atomic_trace(this->ucell->get_iat2iwt(), this->ucell->nat, nbasis); + + hamilt::HContainer SR_async_serial(&serial_paraV); + hamilt::gatherParallels(*SR_async, &SR_async_serial, 0); +#else + hamilt::HContainer& SR_async_serial = *SR_async; +#endif + + // Only rank 0 writes the output file + if (GlobalV::MY_RANK == 0) + { + const std::string filename = PARAM.globalv.global_out_dir + "syns_nao.csr"; + std::ofstream ofs; + + // First step creates new file, subsequent steps append + if (istep <= 0) + { + ofs.open(filename); + } + else + { + ofs.open(filename, std::ios::app); + } + + // Write header information + ofs << "IONIC_STEP: " << istep + 1 << std::endl; + ofs << "Matrix Dimension of S_async(R): " << SR_async_serial.get_nbasis() << std::endl; + ofs << "Matrix number of S_async(R): " << SR_async_serial.size_R_loop() << std::endl; + + // Write matrix data in CSR format + const double sparse_threshold = 1e-10; + hamilt::Output_HContainer output_handler(&SR_async_serial, ofs, sparse_threshold, precision); + output_handler.write(); + + ofs.close(); + } + + ModuleBase::timer::tick("OverlapNew", "output_SR_async_csr"); +} + +// Include force/stress implementation +#include "overlap_force_stress.hpp" + +template class hamilt::Overlap>; +template class hamilt::Overlap, double>>; +template class hamilt::Overlap, std::complex>>; diff --git a/source/source_lcao/module_operator_lcao/overlap.h b/source/source_lcao/module_operator_lcao/overlap.h new file mode 100644 index 0000000000..d29387221f --- /dev/null +++ b/source/source_lcao/module_operator_lcao/overlap.h @@ -0,0 +1,157 @@ +#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_OPERATOR_LCAO_OVERLAP_H +#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_OPERATOR_LCAO_OVERLAP_H +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_basis/module_nao/two_center_integrator.h" +#include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_cell/unitcell.h" +#include "source_lcao/module_operator_lcao/operator_lcao.h" +#include "source_lcao/module_hcontainer/hcontainer.h" +#include + +namespace hamilt +{ + +#ifndef __OVERLAPTEMPLATE +#define __OVERLAPTEMPLATE + +/// The Overlap class template inherits from class T +/// it is used to calculate the overlap of wavefunction basis +/// Template parameters: +/// - T: base class, it would be OperatorLCAO or OperatorPW +/// - TR: data type of real space Hamiltonian, it would be double or std::complex +template +class Overlap : public T +{ +}; + +#endif + +/// Overlap class template specialization for OperatorLCAO base class +/// It is used to calculate the overlap matrix in real space and fold it to k-space +/// SR = +/// SK = = \sum_{R} e^{ikR} SR +/// Template parameters: +/// - TK: data type of k-space Hamiltonian +/// - TR: data type of real space Hamiltonian +template +class Overlap> : public OperatorLCAO +{ + public: + Overlap>(HS_Matrix_K* hsk_in, + const std::vector>& kvec_d_in, + hamilt::HContainer* hR_in, + hamilt::HContainer* SR_in, + const UnitCell* ucell_in, + const std::vector& orb_cutoff, + const Grid_Driver* GridD_in, + const TwoCenterIntegrator* intor); + + ~Overlap(); + + virtual void contributeHR() override; + + virtual void contributeHk(int ik) override; + + TK* getSk(); + + /** + * @brief calculate force and stress for overlap operator + * @param cal_force whether to calculate force + * @param cal_stress whether to calculate stress + * @param dmR density matrix in real space + * @param force output force matrix (nat x 3) + * @param stress output stress matrix (3 x 3) + */ + void cal_force_stress(const bool cal_force, + const bool cal_stress, + const HContainer* dmR, + ModuleBase::matrix& force, + ModuleBase::matrix& stress); + + private: + const UnitCell* ucell = nullptr; + + std::vector orb_cutoff_; + + hamilt::HContainer* SR = nullptr; + + const TwoCenterIntegrator* intor_ = nullptr; + + const Grid_Driver* gridD = nullptr; + + bool SR_fixed_done = false; + + /** + * @brief initialize SR, search the nearest neighbor atoms + * HContainer is used to store the overlap matrix with specific atom-pairs + * the size of SR will be fixed after initialization + */ + void initialize_SR(const Grid_Driver* GridD_in); + + /** + * @brief calculate the overlap matrix with specific atom-pairs + * nearest neighbor atoms don't need to be calculated again + * loop the atom-pairs in SR and calculate the overlap matrix + */ + void calculate_SR(); + + /** + * @brief calculate the SR local matrix of atom pair + */ + void cal_SR_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const ModuleBase::Vector3& dtau, + TR* data_pointer); + + /** + * @brief calculate force contribution for atom pair + */ + void cal_force_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + double* force1, + double* force2); + + /** + * @brief calculate stress contribution for atom pair + */ + void cal_stress_IJR(const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress); + + // if k vector is not changed, then do nothing and return + // default of kvec_d_old is (-10,-10,-10), which is not a valid k vector + ModuleBase::Vector3 kvec_d_old = ModuleBase::Vector3(-10, -10, -10); + + public: + /** + * @brief calculate asynchronous overlap matrix for Hefei-NAMD + * Calculates by shifting atom positions backward + * @param ucell unit cell with current atomic positions and velocities + * @param md_dt molecular dynamics time step (in fs) + * @param paraV parallel orbitals object for matrix distribution + * @return pointer to the created SR_async container (caller must delete) + */ + hamilt::HContainer* calculate_SR_async(const UnitCell& ucell, const double md_dt, const Parallel_Orbitals* paraV); + + /** + * @brief output asynchronous overlap matrix in CSR format + * @param istep current ionic step number + * @param SR_async pointer to the asynchronous overlap matrix container + * @param precision output precision for floating point numbers + */ + void output_SR_async_csr(const int istep, hamilt::HContainer* SR_async, const int precision = 8); +}; + +} // namespace hamilt +#endif diff --git a/source/source_lcao/module_operator_lcao/overlap_force_stress.hpp b/source/source_lcao/module_operator_lcao/overlap_force_stress.hpp new file mode 100644 index 0000000000..679ebb544b --- /dev/null +++ b/source/source_lcao/module_operator_lcao/overlap_force_stress.hpp @@ -0,0 +1,67 @@ +#pragma once +#include "overlap.h" +#include "operator_force_stress_utils.hpp" +#include "source_base/timer.h" + +namespace hamilt +{ + +template +void Overlap>::cal_force_stress(const bool cal_force, + const bool cal_stress, + const HContainer* dmR, + ModuleBase::matrix& force, + ModuleBase::matrix& stress) +{ + ModuleBase::TITLE("Overlap", "cal_force_stress"); + ModuleBase::timer::tick("Overlap", "cal_force_stress"); + + // Lambda function to calculate overlap integral and its gradient + auto integral_calc = [this](int T1, int L1, int N1, int M1, + int T2, int L2, int N2, int M2, + const ModuleBase::Vector3& dtau, + double* olm) { + this->intor_->calculate(T1, L1, N1, M1, T2, L2, N2, M2, + dtau * this->ucell->lat0, &olm[0], &olm[1]); + }; + + // Use unified template with ForceSign=-1, StressSign=+1 for overlap operator + OperatorForceStress::cal_force_stress_2center( + cal_force, cal_stress, dmR, this->ucell, this->gridD, + this->orb_cutoff_, dmR->get_paraV(), integral_calc, force, stress); + + ModuleBase::timer::tick("Overlap", "cal_force_stress"); +} + +// Dummy implementations for cal_force_IJR and cal_stress_IJR +// These are not used in the simplified approach above +template +void Overlap>::cal_force_IJR( + const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + double* force1, + double* force2) +{ + // Not used in current implementation +} + +template +void Overlap>::cal_stress_IJR( + const int& iat1, + const int& iat2, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const hamilt::BaseMatrix* dmR_pointer, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress) +{ + // Not used in current implementation +} + +} // namespace hamilt diff --git a/source/source_lcao/module_operator_lcao/overlap_new.cpp b/source/source_lcao/module_operator_lcao/overlap_new.cpp deleted file mode 100644 index 1200400151..0000000000 --- a/source/source_lcao/module_operator_lcao/overlap_new.cpp +++ /dev/null @@ -1,272 +0,0 @@ -#include "overlap_new.h" - -#include "source_io/module_parameter/parameter.h" -#include "source_base/timer.h" -#include "source_base/tool_title.h" -#include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_lcao/module_operator_lcao/operator_lcao.h" -#include "source_lcao/module_hcontainer/hcontainer_funcs.h" -#include -#include "source_lcao/module_rt/td_info.h" -#include "source_lcao/module_rt/td_folding.h" - -template -hamilt::OverlapNew>::OverlapNew(HS_Matrix_K* hsk_in, - const std::vector>& kvec_d_in, - hamilt::HContainer* hR_in, - hamilt::HContainer* SR_in, - const UnitCell* ucell_in, - const std::vector& orb_cutoff, - const Grid_Driver* GridD_in, - const TwoCenterIntegrator* intor) - : hamilt::OperatorLCAO(hsk_in, kvec_d_in, hR_in), orb_cutoff_(orb_cutoff), intor_(intor) -{ - this->cal_type = calculation_type::lcao_overlap; - this->ucell = ucell_in; - this->SR = SR_in; -#ifdef __DEBUG - assert(this->ucell != nullptr); - assert(this->SR != nullptr); -#endif - // initialize SR to allocate sparse overlap matrix memory - this->initialize_SR(GridD_in); -} - -// initialize_SR() -template -void hamilt::OverlapNew>::initialize_SR(const Grid_Driver* GridD) -{ - ModuleBase::TITLE("OverlapNew", "initialize_SR"); - ModuleBase::timer::tick("OverlapNew", "initialize_SR"); - auto* paraV = this->SR->get_paraV(); // get parallel orbitals from HR - // TODO: if paraV is nullptr, AtomPair can not use paraV for constructor, I will repair it in the future. - for (int iat1 = 0; iat1 < ucell->nat; iat1++) - { - auto tau1 = ucell->get_tau(iat1); - int T1=0; - int I1=0; - ucell->iat2iait(iat1, &I1, &T1); - AdjacentAtomInfo adjs; - GridD->Find_atom(*ucell, tau1, T1, I1, &adjs); - for (int ad = 0; ad < adjs.adj_num + 1; ++ad) - { - const int T2 = adjs.ntype[ad]; - const int I2 = adjs.natom[ad]; - int iat2 = ucell->itia2iat(T2, I2); - if (paraV->get_row_size(iat1) <= 0 || paraV->get_col_size(iat2) <= 0) - { - continue; - } - const ModuleBase::Vector3& R_index = adjs.box[ad]; - // choose the real adjacent atoms - // Note: the distance of atoms should less than the cutoff radius, - // When equal, the theoretical value of matrix element is zero, - // but the calculated value is not zero due to the numerical error, which would lead to result changes. - if (this->ucell->cal_dtau(iat1, iat2, R_index).norm() * this->ucell->lat0 - >= orb_cutoff_[T1] + orb_cutoff_[T2]) - { - continue; - } - hamilt::AtomPair tmp(iat1, iat2, R_index, paraV); - SR->insert_pair(tmp); - } - } - // allocate the memory of BaseMatrix in SR, and set the new values to zero - SR->allocate(nullptr, true); - ModuleBase::timer::tick("OverlapNew", "initialize_SR"); -} - -template -void hamilt::OverlapNew>::calculate_SR() -{ - ModuleBase::TITLE("OverlapNew", "calculate_SR"); - ModuleBase::timer::tick("OverlapNew", "calculate_SR"); -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int iap = 0; iap < this->SR->size_atom_pairs(); ++iap) - { - hamilt::AtomPair& tmp = this->SR->get_atom_pair(iap); - const int iat1 = tmp.get_atom_i(); - const int iat2 = tmp.get_atom_j(); - const Parallel_Orbitals* paraV = tmp.get_paraV(); - - for (int iR = 0; iR < tmp.get_R_size(); ++iR) - { - const ModuleBase::Vector3 R_index = tmp.get_R_index(iR); - auto dtau = ucell->cal_dtau(iat1, iat2, R_index); - TR* data_pointer = tmp.get_pointer(iR); - this->cal_SR_IJR(iat1, iat2, paraV, dtau, data_pointer); - } - } - // if TK == double, then SR should be fixed to gamma case - // judge type of TK equal to double - if (std::is_same::value) - { - this->SR->fix_gamma(); - } - ModuleBase::timer::tick("OverlapNew", "calculate_SR"); -} - -// cal_SR_IJR() -template -void hamilt::OverlapNew>::cal_SR_IJR(const int& iat1, - const int& iat2, - const Parallel_Orbitals* paraV, - const ModuleBase::Vector3& dtau, - TR* data_pointer) -{ - // --------------------------------------------- - // get info of orbitals of atom1 and atom2 from ucell - // --------------------------------------------- - int T1=0; - int I1=0; - this->ucell->iat2iait(iat1, &I1, &T1); - int T2=0; - int I2=0; - this->ucell->iat2iait(iat2, &I2, &T2); - Atom& atom1 = this->ucell->atoms[T1]; - Atom& atom2 = this->ucell->atoms[T2]; - - // npol is the number of polarizations, - // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), - // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) - const int npol = this->ucell->get_npol(); - - const int* iw2l1 = atom1.iw2l.data(); - const int* iw2n1 = atom1.iw2n.data(); - const int* iw2m1 = atom1.iw2m.data(); - const int* iw2l2 = atom2.iw2l.data(); - const int* iw2n2 = atom2.iw2n.data(); - const int* iw2m2 = atom2.iw2m.data(); - - // --------------------------------------------- - // calculate the overlap matrix for each pair of orbitals - // --------------------------------------------- - double olm[3] = {0, 0, 0}; - auto row_indexes = paraV->get_indexes_row(iat1); - auto col_indexes = paraV->get_indexes_col(iat2); - const int step_trace = col_indexes.size() + 1; - for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) - { - const int iw1 = row_indexes[iw1l] / npol; - const int L1 = iw2l1[iw1]; - const int N1 = iw2n1[iw1]; - const int m1 = iw2m1[iw1]; - - // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) - int M1 = (m1 % 2 == 0) ? -m1 / 2 : (m1 + 1) / 2; - - for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) - { - const int iw2 = col_indexes[iw2l] / npol; - const int L2 = iw2l2[iw2]; - const int N2 = iw2n2[iw2]; - const int m2 = iw2m2[iw2]; - - // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) - int M2 = (m2 % 2 == 0) ? -m2 / 2 : (m2 + 1) / 2; - intor_->calculate(T1, L1, N1, M1, T2, L2, N2, M2, dtau * this->ucell->lat0, olm); - for (int ipol = 0; ipol < npol; ipol++) - { - data_pointer[ipol * step_trace] += olm[0]; - } - data_pointer += npol; - } - data_pointer += (npol - 1) * col_indexes.size(); - } -} - -// contributeHR() -template -void hamilt::OverlapNew>::contributeHR() -{ - if (this->SR_fixed_done) - { - return; - } - this->calculate_SR(); - this->SR_fixed_done = true; -} - -// contributeHk() -template <> -void hamilt::OverlapNew>::contributeHk(int ik) -{ - //! if k vector is not changed, then do nothing and return, only for gamma_only case - if (this->kvec_d[ik] == this->kvec_d_old) - { - return; - } - ModuleBase::TITLE("OverlapNew", "contributeHk"); - ModuleBase::timer::tick("OverlapNew", "contributeHk"); - - //! set SK to zero and then calculate SK for each k vector - this->hsk->set_zero_sk(); - if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) - { - const int nrow = this->SR->get_atom_pair(0).get_paraV()->get_row_size(); - hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], nrow, 1); - } - else - { - const int ncol = this->SR->get_atom_pair(0).get_paraV()->get_col_size(); - hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], ncol, 0); - } - - // update kvec_d_old - this->kvec_d_old = this->kvec_d[ik]; - - ModuleBase::timer::tick("OverlapNew", "contributeHk"); -} -template -void hamilt::OverlapNew>::contributeHk(int ik) -{ - ModuleBase::TITLE("OverlapNew", "contributeHk"); - ModuleBase::timer::tick("OverlapNew", "contributeHk"); - - //! set SK to zero and then calculate SK for each k vector - this->hsk->set_zero_sk(); - if (ModuleBase::GlobalFunc::IS_COLUMN_MAJOR_KS_SOLVER(PARAM.inp.ks_solver)) - { - const int nrow = this->SR->get_atom_pair(0).get_paraV()->get_row_size(); - if(PARAM.inp.td_stype == 2) - { - module_rt::folding_HR_td(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], nrow, 1, ucell, TD_info::cart_At); - } - else - { - hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], nrow, 1); - } - } - else - { - const int ncol = this->SR->get_atom_pair(0).get_paraV()->get_col_size(); - if(PARAM.inp.td_stype == 2) - { - module_rt::folding_HR_td(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], ncol, 0, ucell, TD_info::cart_At); - } - else - { - hamilt::folding_HR(*this->SR, this->hsk->get_sk(), this->kvec_d[ik], ncol, 0); - } - } - - // update kvec_d_old - this->kvec_d_old = this->kvec_d[ik]; - - ModuleBase::timer::tick("OverlapNew", "contributeHk"); -} -template -TK* hamilt::OverlapNew>::getSk() -{ - if (this->hsk != nullptr) - { - return this->hsk->get_sk(); - } - return nullptr; -} - -template class hamilt::OverlapNew>; -template class hamilt::OverlapNew, double>>; -template class hamilt::OverlapNew, std::complex>>; diff --git a/source/source_lcao/module_operator_lcao/overlap_new.h b/source/source_lcao/module_operator_lcao/overlap_new.h deleted file mode 100644 index a92da60834..0000000000 --- a/source/source_lcao/module_operator_lcao/overlap_new.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_OPERATOR_LCAO_OVERLAP_NEW_H -#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_HAMILT_LCAO_HAMILT_LCAODFT_OPERATOR_LCAO_OVERLAP_NEW_H -#include "source_basis/module_ao/parallel_orbitals.h" -#include "source_basis/module_nao/two_center_integrator.h" -#include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_cell/unitcell.h" -#include "source_lcao/module_operator_lcao/operator_lcao.h" -#include "source_lcao/module_hcontainer/hcontainer.h" -#include - -namespace hamilt -{ - -#ifndef __OVERLAPNEWTEMPLATE -#define __OVERLAPNEWTEMPLATE - -/// The OverlapNew class template inherits from class T -/// it is used to calculate the overlap of wavefunction basis -/// Template parameters: -/// - T: base class, it would be OperatorLCAO or OperatorPW -/// - TR: data type of real space Hamiltonian, it would be double or std::complex -template -class OverlapNew : public T -{ -}; - -#endif - -/// OverlapNew class template specialization for OperatorLCAO base class -/// It is used to calculate the overlap matrix in real space and fold it to k-space -/// SR = -/// SK = = \sum_{R} e^{ikR} SR -/// Template parameters: -/// - TK: data type of k-space Hamiltonian -/// - TR: data type of real space Hamiltonian -template -class OverlapNew> : public OperatorLCAO -{ - public: - OverlapNew>(HS_Matrix_K* hsk_in, - const std::vector>& kvec_d_in, - hamilt::HContainer* hR_in, - hamilt::HContainer* SR_in, - const UnitCell* ucell_in, - const std::vector& orb_cutoff, - const Grid_Driver* GridD_in, - const TwoCenterIntegrator* intor); - - virtual void contributeHR() override; - - virtual void contributeHk(int ik) override; - - TK* getSk(); - - private: - const UnitCell* ucell = nullptr; - - std::vector orb_cutoff_; - - hamilt::HContainer* SR = nullptr; - - const TwoCenterIntegrator* intor_ = nullptr; - - bool SR_fixed_done = false; - - /** - * @brief initialize SR, search the nearest neighbor atoms - * HContainer is used to store the overlap matrix with specific atom-pairs - * the size of SR will be fixed after initialization - */ - void initialize_SR(const Grid_Driver* GridD_in); - - /** - * @brief calculate the overlap matrix with specific atom-pairs - * nearest neighbor atoms don't need to be calculated again - * loop the atom-pairs in SR and calculate the overlap matrix - */ - void calculate_SR(); - - /** - * @brief calculate the SR local matrix of atom pair - */ - void cal_SR_IJR(const int& iat1, - const int& iat2, - const Parallel_Orbitals* paraV, - const ModuleBase::Vector3& dtau, - TR* data_pointer); - - // if k vector is not changed, then do nothing and return - // default of kvec_d_old is (-10,-10,-10), which is not a valid k vector - ModuleBase::Vector3 kvec_d_old = ModuleBase::Vector3(-10, -10, -10); -}; - -} // namespace hamilt -#endif diff --git a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp index e81aafade2..c8e3f8d307 100644 --- a/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/td_ekinetic_lcao.cpp @@ -10,7 +10,6 @@ #include "source_lcao/center2_orb-orb11.h" #include "source_lcao/spar_hsr.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" -#include "source_pw/module_pwdft/global.h" namespace hamilt { @@ -95,7 +94,7 @@ void TDEkinetic>::calculate_HR() hamilt::BaseMatrix>* tmp = this->hR_tmp->find_matrix(iat1, iat2, R_index2); if (tmp != nullptr) { - if (TD_info::out_current) + if (TD_info::out_current == 1) { std::complex* tmp_c[3] = {nullptr, nullptr, nullptr}; for (int i = 0; i < 3; i++) @@ -342,10 +341,14 @@ void TDEkinetic>::contributeHR() static_cast*>(this->next_sub_op)->set_HR_fixed(this->hR_tmp); } // initialize current term if needed - if (TD_info::out_current) + if (TD_info::out_current == 1) { TD_info::td_vel_op->initialize_current_term(this->hR_tmp, paraV); } + if (TD_info::out_current==2) + { + TD_info::td_vel_op->set_velocity_HR(this->hR_tmp); + } // calculate the values in hR_tmp this->update_td(); this->hR_tmp->set_zero(); @@ -375,11 +378,8 @@ void TDEkinetic>::contributeHk(int ik) { for (int spin_now = 0; spin_now < spin_tot; spin_now++) { - sparse_format::cal_HContainer_cd(*(paraV), - spin_now, - 1e-10, - *hR_tmp, - TD_info::td_vel_op->HR_sparse_td_vel[spin_now]); + sparse_format::cal_HContainer>( + *(paraV), 1e-10, *hR_tmp, TD_info::td_vel_op->HR_sparse_td_vel[spin_now]); } output_hR_done = true; } diff --git a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp index a5eba57688..278b270410 100644 --- a/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/td_nonlocal_lcao.cpp @@ -1,16 +1,20 @@ #include "td_nonlocal_lcao.h" -#include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" #include "source_base/tool_title.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_lcao/module_operator_lcao/operator_lcao.h" +#include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" +#include "source_lcao/module_operator_lcao/operator_lcao.h" #include "source_lcao/module_rt/snap_psibeta_half_tddft.h" -#include "source_pw/module_pwdft/global.h" +#ifdef __CUDA +#include "source_base/module_device/device.h" +#include "source_lcao/module_rt/kernels/snap_psibeta_gpu.h" +#endif + #ifdef _OPENMP -#include #include +#include #endif template @@ -127,9 +131,27 @@ void hamilt::TDNonlocal>::calculate_HR() ModuleBase::TITLE("TDNonlocal", "calculate_HR"); ModuleBase::timer::tick("TDNonlocal", "calculate_HR"); + // Determine whether to use GPU path: + // GPU is only used when both __CUDA is defined AND device is set to "gpu" +#ifdef __CUDA + const bool use_gpu = (PARAM.inp.device == "gpu"); +#else + const bool use_gpu = false; +#endif + + // Initialize GPU resources if using GPU + if (use_gpu) + { +#ifdef __CUDA + // GPU device is already bound by DeviceContext::init() in read_input.cpp + // Just initialize the GPU resources for this module + module_rt::gpu::init_snap_psibeta_gpu(); +#endif + } + const Parallel_Orbitals* paraV = this->hR_tmp->get_atom_pair(0).get_paraV(); const int npol = this->ucell->get_npol(); - const int nlm_dim = TD_info::out_current ? 4 : 1; + const int nlm_dim = TD_info::out_current==1 ? 4 : 1; // 1. calculate for each pair of atoms for (int iat0 = 0; iat0 < this->ucell->nat; iat0++) @@ -145,9 +167,27 @@ void hamilt::TDNonlocal>::calculate_HR() nlm_tot[i].resize(nlm_dim); } - #pragma omp parallel + if (use_gpu) { - #pragma omp for schedule(dynamic) +#ifdef __CUDA + // GPU path: Atom-level GPU batch processing + module_rt::gpu::snap_psibeta_atom_batch_gpu(orb_, + this->ucell->infoNL, + T0, + tau0 * this->ucell->lat0, + cart_At, + adjs, + this->ucell, + paraV, + npol, + nlm_dim, + nlm_tot); +#endif + } + else + { + // CPU path: OpenMP parallel over neighbors to compute nlm_tot +#pragma omp parallel for schedule(dynamic) for (int ad = 0; ad < adjs.adj_num + 1; ++ad) { const int T1 = adjs.ntype[ad]; @@ -160,35 +200,36 @@ void hamilt::TDNonlocal>::calculate_HR() all_indexes.insert(all_indexes.end(), col_indexes.begin(), col_indexes.end()); std::sort(all_indexes.begin(), all_indexes.end()); all_indexes.erase(std::unique(all_indexes.begin(), all_indexes.end()), all_indexes.end()); - for (int iw1l = 0; iw1l < all_indexes.size(); iw1l += npol) + + // CPU path: loop over orbitals + for (size_t iw1l = 0; iw1l < all_indexes.size(); iw1l += npol) { const int iw1 = all_indexes[iw1l] / npol; std::vector>> nlm; - // nlm is a vector of vectors, but size of outer vector is only 1 when out_current is false - // and size of outer vector is 4 when out_current is true (3 for , 1 for - // ) inner loop : all projectors (L0,M0) - - // snap_psibeta_half_tddft() are used to calculate - // and as well if current are needed module_rt::snap_psibeta_half_tddft(orb_, - this->ucell->infoNL, - nlm, - tau1 * this->ucell->lat0, - T1, - atom1->iw2l[iw1], - atom1->iw2m[iw1], - atom1->iw2n[iw1], - tau0 * this->ucell->lat0, - T0, - cart_At, - TD_info::out_current); + this->ucell->infoNL, + nlm, + tau1 * this->ucell->lat0, + T1, + atom1->iw2l[iw1], + atom1->iw2m[iw1], + atom1->iw2n[iw1], + tau0 * this->ucell->lat0, + T0, + cart_At, + TD_info::out_current==1); for (int dir = 0; dir < nlm_dim; dir++) { nlm_tot[ad][dir].insert({all_indexes[iw1l], nlm[dir]}); } } } + } + // 2. calculate D for each pair of atoms + // This runs for BOTH GPU and CPU paths +#pragma omp parallel + { #ifdef _OPENMP // record the iat number of the adjacent atoms std::set ad_atom_set; @@ -205,7 +246,7 @@ void hamilt::TDNonlocal>::calculate_HR() const int thread_id = omp_get_thread_num(); std::set ad_atom_set_thread; int i = 0; - for(const auto iat1 : ad_atom_set) + for (const auto iat1: ad_atom_set) { if (i % num_threads == thread_id) { @@ -215,7 +256,6 @@ void hamilt::TDNonlocal>::calculate_HR() } #endif - // 2. calculate D for each pair of atoms for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) { const int T1 = adjs.ntype[ad1]; @@ -228,7 +268,7 @@ void hamilt::TDNonlocal>::calculate_HR() continue; } #endif - + const ModuleBase::Vector3& R_index1 = adjs.box[ad1]; for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) { @@ -244,12 +284,12 @@ void hamilt::TDNonlocal>::calculate_HR() // if not found , skip this pair of atoms if (tmp != nullptr) { - if (TD_info::out_current) + if (TD_info::out_current==1) { std::complex* tmp_c[3] = {nullptr, nullptr, nullptr}; - for (int i = 0; i < 3; i++) + for (int ii = 0; ii < 3; ii++) { - tmp_c[i] = TD_info::td_vel_op->get_current_term_pointer(i) + tmp_c[ii] = TD_info::td_vel_op->get_current_term_pointer(ii) ->find_matrix(iat1, iat2, R_vector[0], R_vector[1], R_vector[2]) ->get_pointer(); } @@ -276,13 +316,13 @@ void hamilt::TDNonlocal>::calculate_HR() } } } - } - } - + } // end omp parallel for matrix assembly + } // end for iat0 ModuleBase::timer::tick("TDNonlocal", "calculate_HR"); } // cal_HR_IJR() + template void hamilt::TDNonlocal>::cal_HR_IJR( const int& iat1, @@ -294,7 +334,7 @@ void hamilt::TDNonlocal>::cal_HR_IJR( std::complex* data_pointer, std::complex** data_pointer_c) { - const int nlm_dim = TD_info::out_current ? 4 : 1; + const int nlm_dim = TD_info::out_current==1 ? 4 : 1; // npol is the number of polarizations, // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) @@ -396,7 +436,6 @@ void hamilt::TDNonlocal>::set_HR_fixed(void* hR_tmp this->allocated = false; } - // contributeHR() template void hamilt::TDNonlocal>::contributeHR() @@ -436,7 +475,6 @@ void hamilt::TDNonlocal>::contributeHR() return; } - template void hamilt::TDNonlocal>::contributeHk(int ik) { diff --git a/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp b/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp index f024c6fbff..72f59490d7 100644 --- a/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp +++ b/source/source_lcao/module_operator_lcao/td_pot_hybrid.cpp @@ -5,11 +5,6 @@ #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/module_operator_lcao/operator_lcao.h" #include "source_lcao/module_hcontainer/hcontainer_funcs.h" -#include "source_pw/module_pwdft/global.h" - -// Constructor -template -cal_r_overlap_R hamilt::TD_pot_hybrid>::r_calculator; template hamilt::TD_pot_hybrid>::TD_pot_hybrid( @@ -207,7 +202,7 @@ void hamilt::TD_pot_hybrid>::cal_HR_IJR(const int& const int N2 = iw2n2[iw2]; const int m2 = iw2m2[iw2]; - ModuleBase::Vector3 tmp_r = r_calculator.get_psi_r_psi(tau1 * this->ucell->lat0, T1, L1, m1, N1, tau2 * this->ucell->lat0, T2, L2, m2, N2); + ModuleBase::Vector3 tmp_r = r_calculator->get_psi_r_psi(tau1 * this->ucell->lat0, T1, L1, m1, N1, tau2 * this->ucell->lat0, T2, L2, m2, N2); // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) int M2 = (m2 % 2 == 0) ? -m2 / 2 : (m2 + 1) / 2; @@ -228,12 +223,7 @@ template void hamilt::TD_pot_hybrid>::init_td() { // initialize the r_calculator - if(TD_info::td_vel_op->get_istep()==(TD_info::estep_shift-1)) - { - //std::cout << "init_r_overlap" <hR->get_paraV(), orb_); - } - //hk_hybrid.resize(this->hR->get_paraV()->nloc); + this->r_calculator = &TD_info::td_vel_op->r_calculator; } template void hamilt::TD_pot_hybrid>::update_td() diff --git a/source/source_lcao/module_operator_lcao/td_pot_hybrid.h b/source/source_lcao/module_operator_lcao/td_pot_hybrid.h index 82f17b6fed..bdb53f3480 100644 --- a/source/source_lcao/module_operator_lcao/td_pot_hybrid.h +++ b/source/source_lcao/module_operator_lcao/td_pot_hybrid.h @@ -8,7 +8,7 @@ #include "source_lcao/module_operator_lcao/operator_lcao.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include -#include "source_io/cal_r_overlap_R.h" +#include "source_io/module_hs/cal_r_overlap_R.h" #include "source_lcao/module_rt/td_info.h" #include "source_estate/module_pot/H_TDDFT_pw.h" @@ -18,8 +18,8 @@ namespace hamilt #ifndef __TD_POT_HYBRIDTEMPLATE #define __TD_POT_HYBRIDTEMPLATE -/// The EkineticNew class template inherits from class T -/// it is used to calculate the electronic kinetic +/// The TD_pot_hybrid class template inherits from class T +/// it is used to calculate the time-dependent hybrid potential /// Template parameters: /// - T: base class, it would be OperatorLCAO or OperatorPW /// - TR: data type of real space Hamiltonian, it would be double or std::complex @@ -30,10 +30,8 @@ class TD_pot_hybrid : public T #endif -/// EkineticNew class template specialization for OperatorLCAO base class -/// It is used to calculate the electronic kinetic matrix in real space and fold it to k-space -/// HR = -/// HK = = \sum_{R} e^{ikR} HR +/// TD_pot_hybrid class template specialization for OperatorLCAO base class +/// It is used to calculate the time-dependent hybrid potential matrix in real space and fold it to k-space /// Template parameters: /// - TK: data type of k-space Hamiltonian /// - TR: data type of real space Hamiltonian @@ -42,7 +40,7 @@ class TD_pot_hybrid> : public OperatorLCAO { public: /** - * @brief Construct a new EkineticNew object + * @brief Construct a new TD_pot_hybrid object */ TD_pot_hybrid>(HS_Matrix_K* hsk_in, const K_Vectors* kv_in, @@ -55,7 +53,7 @@ class TD_pot_hybrid> : public OperatorLCAO const TwoCenterIntegrator* intor); /** - * @brief Destroy the EkineticNew object + * @brief Destroy the TD_pot_hybrid object */ ~TD_pot_hybrid>(); @@ -86,7 +84,7 @@ class TD_pot_hybrid> : public OperatorLCAO bool HR_fixed_done = false; //tddft part - static cal_r_overlap_R r_calculator; + cal_r_overlap_R* r_calculator; //ETD //std::vector> hk_hybrid; //ETD diff --git a/source/source_lcao/module_operator_lcao/test/CMakeLists.txt b/source/source_lcao/module_operator_lcao/test/CMakeLists.txt index e39a3dac19..39df2b9b90 100644 --- a/source/source_lcao/module_operator_lcao/test/CMakeLists.txt +++ b/source/source_lcao/module_operator_lcao/test/CMakeLists.txt @@ -4,35 +4,58 @@ remove_definitions(-DUSE_NEW_TWO_CENTER) AddTest( TARGET operator_overlap_test LIBS parameter ${math_libs} psi base device container - SOURCES test_overlapnew.cpp ../overlap_new.cpp ../../module_hcontainer/func_folding.cpp - ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp - ../../../source_basis/module_ao/parallel_orbitals.cpp + SOURCES test_overlap.cpp ../overlap.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../module_hcontainer/func_transfer.cpp ../../module_hcontainer/output_hcontainer.cpp ../../module_hcontainer/transfer.cpp + ../../../source_io/module_output/sparse_matrix.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp + ../../../source_basis/module_ao/ORB_atomic_lm.cpp + tmp_mocks.cpp ../../../source_hamilt/operator.cpp + ../../module_rt/td_folding.cpp +) + +AddTest( + TARGET operator_overlap_serial_test + LIBS parameter ${math_libs} psi base device container + SOURCES test_overlap_serial.cpp ../overlap.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../module_hcontainer/func_transfer.cpp ../../module_hcontainer/output_hcontainer.cpp ../../module_hcontainer/transfer.cpp + ../../../source_io/module_output/sparse_matrix.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp ../../../source_basis/module_ao/ORB_atomic_lm.cpp tmp_mocks.cpp ../../../source_hamilt/operator.cpp - ../../../source_lcao/module_rt/td_info.cpp - ../../../source_lcao/module_rt/td_folding.cpp - ../../../source_estate/module_pot/H_TDDFT_pw.cpp + ../../module_rt/td_folding.cpp ) AddTest( TARGET operator_overlap_cd_test LIBS parameter ${math_libs} psi base device container - SOURCES test_overlapnew_cd.cpp ../overlap_new.cpp ../../module_hcontainer/func_folding.cpp - ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp - ../../../source_basis/module_ao/parallel_orbitals.cpp + SOURCES test_overlap_cd.cpp ../overlap.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../module_hcontainer/func_transfer.cpp ../../module_hcontainer/output_hcontainer.cpp ../../module_hcontainer/transfer.cpp + ../../../source_io/module_output/sparse_matrix.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp ../../../source_basis/module_ao/ORB_atomic_lm.cpp tmp_mocks.cpp ../../../source_hamilt/operator.cpp - ../../../source_lcao/module_rt/td_info.cpp - ../../../source_lcao/module_rt/td_folding.cpp - ../../../source_estate/module_pot/H_TDDFT_pw.cpp + ../../module_rt/td_folding.cpp ) AddTest( TARGET operator_ekinetic_test LIBS parameter ${math_libs} psi base device container - SOURCES test_ekineticnew.cpp ../ekinetic_new.cpp ../../module_hcontainer/func_folding.cpp - ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp - ../../../source_basis/module_ao/parallel_orbitals.cpp + SOURCES test_ekinetic.cpp ../ekinetic.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp + ../../../source_basis/module_ao/ORB_atomic_lm.cpp + tmp_mocks.cpp ../../../source_hamilt/operator.cpp +) + +AddTest( + TARGET operator_ekinetic_serial_test + LIBS parameter ${math_libs} psi base device container + SOURCES test_ekinetic_serial.cpp ../ekinetic.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp ../../../source_basis/module_ao/ORB_atomic_lm.cpp tmp_mocks.cpp ../../../source_hamilt/operator.cpp ) @@ -40,19 +63,19 @@ AddTest( AddTest( TARGET operator_nonlocal_test LIBS parameter ${math_libs} psi base device container - SOURCES test_nonlocalnew.cpp ../nonlocal_new.cpp ../../module_hcontainer/func_folding.cpp - ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp - ../../../source_basis/module_ao/parallel_orbitals.cpp + SOURCES test_nonlocal.cpp ../nonlocal.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp ../../../source_basis/module_ao/ORB_atomic_lm.cpp tmp_mocks.cpp ../../../source_hamilt/operator.cpp ) AddTest( TARGET operator_T_NL_cd_test - LIBS parameter ${math_libs} psi base device container - SOURCES test_T_NL_cd.cpp ../nonlocal_new.cpp ../ekinetic_new.cpp ../../module_hcontainer/func_folding.cpp - ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp - ../../../source_basis/module_ao/parallel_orbitals.cpp + LIBS parameter ${math_libs} psi base device container + SOURCES test_T_NL_cd.cpp ../nonlocal.cpp ../ekinetic.cpp ../operator_force_stress_utils.cpp ../../module_hcontainer/func_folding.cpp + ../../module_hcontainer/base_matrix.cpp ../../module_hcontainer/hcontainer.cpp ../../module_hcontainer/atom_pair.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp ../../../source_basis/module_ao/ORB_atomic_lm.cpp tmp_mocks.cpp ../../../source_hamilt/operator.cpp ) diff --git a/source/source_lcao/module_operator_lcao/test/parallel_operator_tests.sh b/source/source_lcao/module_operator_lcao/test/parallel_operator_tests.sh index b30c22e774..2ca1f7e13d 100644 --- a/source/source_lcao/module_operator_lcao/test/parallel_operator_tests.sh +++ b/source/source_lcao/module_operator_lcao/test/parallel_operator_tests.sh @@ -8,15 +8,15 @@ for i in 2 3 4; do continue fi echo "TEST in parallel, nprocs=$i" - mpirun -np $i ./operator_overlap_cd_test + mpirun --allow-run-as-root -np $i ./operator_overlap_cd_test e1=$? - mpirun -np $i ./operator_overlap_test + mpirun --allow-run-as-root -np $i ./operator_overlap_test e2=$? - mpirun -np $i ./operator_ekinetic_test + mpirun --allow-run-as-root -np $i ./operator_ekinetic_test e3=$? - mpirun -np $i ./operator_nonlocal_test + mpirun --allow-run-as-root -np $i ./operator_nonlocal_test e4=$? - mpirun -np $i ./operator_T_NL_cd_test + mpirun --allow-run-as-root -np $i ./operator_T_NL_cd_test e5=$? if [[ $e1 -ne 0 || $e2 -ne 0 || $e3 -ne 0 || $e4 -ne 0 || $e5 -ne 0 ]]; then echo -e "\e[1;33m [ FAILED ] \e[0m"\ diff --git a/source/source_lcao/module_operator_lcao/test/test_T_NL_cd.cpp b/source/source_lcao/module_operator_lcao/test/test_T_NL_cd.cpp index 5f3aa117ec..7ab72fa2c8 100644 --- a/source/source_lcao/module_operator_lcao/test/test_T_NL_cd.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_T_NL_cd.cpp @@ -1,12 +1,12 @@ -#include "../ekinetic_new.h" -#include "../nonlocal_new.h" +#include "../ekinetic.h" +#include "../nonlocal.h" #include "gtest/gtest.h" #include //--------------------------------------- -// Unit test of EkineticNew + NonlocalNew class -// EkineticNew and NonlocalNew are derivative classes of Operator, used to calculate the T+VNL matrix +// Unit test of EKinetic + Nonlocal class +// EKinetic and Nonlocal are derivative classes of Operator, used to calculate the T+VNL matrix // It use HContainer to store the real space HR matrix // In this test, we test the correctness and time consuming of 6 functions in T+VNL class // - initialize_HR() called in two constructors @@ -57,7 +57,7 @@ class TNLTest : public ::testing::Test ucell.atoms[0].iw2n[iw] = 0; } ucell.set_iat2iwt(2); - // for NonlocalNew + // for Nonlocal ucell.infoNL.Beta = new Numerical_Nonlocal[ucell.ntype]; ucell.atoms[0].ncpp.d_real.create(5, 5); ucell.atoms[0].ncpp.d_real.zero_out(); @@ -131,7 +131,7 @@ TEST_F(TNLTest, testTVNLcd2cd) Grid_Driver gd(0, 0); std::chrono::high_resolution_clock::time_point start_time = std::chrono::high_resolution_clock::now(); hamilt::Operator>* op - = new hamilt::EkineticNew, std::complex>>(&hsk, + = new hamilt::EKinetic, std::complex>>(&hsk, kvec_d_in, HR, &ucell, @@ -139,7 +139,7 @@ TEST_F(TNLTest, testTVNLcd2cd) &gd, &intor_); hamilt::Operator>* op1 - = new hamilt::NonlocalNew, std::complex>>(&hsk, + = new hamilt::Nonlocal, std::complex>>(&hsk, kvec_d_in, HR, &ucell, diff --git a/source/source_lcao/module_operator_lcao/test/test_dftu.cpp b/source/source_lcao/module_operator_lcao/test/test_dftu.cpp index 12be312278..31adb426ad 100644 --- a/source/source_lcao/module_operator_lcao/test/test_dftu.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_dftu.cpp @@ -7,23 +7,27 @@ #undef private #include "../dftu_lcao.h" #include "source_lcao/module_dftu/dftu.h" -ModuleDFTU::DFTU::DFTU(){}; -ModuleDFTU::DFTU::~DFTU(){}; -namespace GlobalC -{ -ModuleDFTU::DFTU dftu; -} + +Plus_U::Plus_U(){}; +Plus_U::~Plus_U(){}; + +Plus_U dftu; +double Plus_U::energy_u = 0.0; +std::vector Plus_U::U = {}; // U (Hubbard parameter U) +std::vector Plus_U::orbital_corr = {}; + const hamilt::HContainer* tmp_DMR; -const hamilt::HContainer* ModuleDFTU::DFTU::get_dmr(int ispin) const + +const hamilt::HContainer* Plus_U::get_dmr(int ispin) const { return tmp_DMR; } //--------------------------------------- -// Unit test of DFTU class -// DFTU is a derivative class of Operator, it is used to calculate the kinetic matrix +// Unit test of Plus_U class +// Plus_U is a derivative class of Operator, it is used to calculate the kinetic matrix // It use HContainer to store the real space HR matrix -// In this test, we test the correctness and time consuming of 3 functions in DFTU class +// In this test, we test the correctness and time consuming of 3 functions in Plus_U class // - initialize_HR() called in constructor // - contributeHR() // - contributeHk() @@ -35,6 +39,7 @@ const hamilt::HContainer* ModuleDFTU::DFTU::get_dmr(int ispin) const // modify test_size to test different size of unitcell int test_size = 10; int test_nw = 10; // please larger than 5 + class DFTUTest : public ::testing::Test { protected: @@ -82,20 +87,20 @@ class DFTUTest : public ::testing::Test tmp_DMR = DMR; // setting of DFTU - GlobalC::dftu.locale.resize(test_size); + dftu.locale.resize(test_size); for (int iat = 0; iat < test_size; iat++) { - GlobalC::dftu.locale[iat].resize(3); + dftu.locale[iat].resize(3); for (int l = 0; l < 3; l++) { - GlobalC::dftu.locale[iat][l].resize(1); - GlobalC::dftu.locale[iat][l][0].resize(2); - GlobalC::dftu.locale[iat][l][0][0].create(2 * l + 1, 2 * l + 1); - GlobalC::dftu.locale[iat][l][0][1].create(2 * l + 1, 2 * l + 1); + dftu.locale[iat][l].resize(1); + dftu.locale[iat][l][0].resize(2); + dftu.locale[iat][l][0][0].create(2 * l + 1, 2 * l + 1); + dftu.locale[iat][l][0][1].create(2 * l + 1, 2 * l + 1); } } - GlobalC::dftu.U = {U_test}; - GlobalC::dftu.orbital_corr = {orbital_c_test}; + Plus_U::U = {U_test}; + Plus_U::orbital_corr = {orbital_c_test}; PARAM.input.onsite_radius = 1.0; } @@ -155,7 +160,7 @@ TEST_F(DFTUTest, constructHRd2d) } std::chrono::high_resolution_clock::time_point start_time = std::chrono::high_resolution_clock::now(); hamilt::DFTU> - op(&hsk, kvec_d_in, HR, ucell, &gd, &intor_, {1.0}, &GlobalC::dftu); + op(&hsk, kvec_d_in, HR, ucell, &gd, &intor_, {1.0}, &dftu); std::chrono::high_resolution_clock::time_point end_time = std::chrono::high_resolution_clock::now(); std::chrono::duration elapsed_time = std::chrono::duration_cast>(end_time - start_time); @@ -169,7 +174,7 @@ TEST_F(DFTUTest, constructHRd2d) { for (int icc = 0; icc < 25; icc++) { - EXPECT_NEAR(GlobalC::dftu.locale[iat][2][0][0].c[icc], 0.5, 1e-10); + EXPECT_NEAR(dftu.locale[iat][2][0][0].c[icc], 0.5, 1e-10); } } // check the value of HR @@ -220,14 +225,14 @@ TEST_F(DFTUTest, constructHRd2cd) HR->get_wrapper()[i] = 0.0; } hamilt::DFTU, double>> - op(&hsk, kvec_d_in, HR, ucell, &gd, &intor_, {1.0}, &GlobalC::dftu); + op(&hsk, kvec_d_in, HR, ucell, &gd, &intor_, {1.0}, &dftu); op.contributeHR(); // check the occupations of dftu for spin-up for (int iat = 0; iat < test_size; iat++) { for (int icc = 0; icc < 25; icc++) { - EXPECT_NEAR(GlobalC::dftu.locale[iat][2][0][0].c[icc], 0.5, 1e-10); + EXPECT_NEAR(dftu.locale[iat][2][0][0].c[icc], 0.5, 1e-10); } } // check the value of HR @@ -260,7 +265,7 @@ TEST_F(DFTUTest, constructHRd2cd) { for (int icc = 0; icc < 25; icc++) { - EXPECT_NEAR(GlobalC::dftu.locale[iat][2][0][1].c[icc], 0.5, 1e-10); + EXPECT_NEAR(dftu.locale[iat][2][0][1].c[icc], 0.5, 1e-10); } } } diff --git a/source/source_lcao/module_operator_lcao/test/test_ekineticnew.cpp b/source/source_lcao/module_operator_lcao/test/test_ekinetic.cpp similarity index 92% rename from source/source_lcao/module_operator_lcao/test/test_ekineticnew.cpp rename to source/source_lcao/module_operator_lcao/test/test_ekinetic.cpp index dd81b95464..9edc265ccb 100644 --- a/source/source_lcao/module_operator_lcao/test/test_ekineticnew.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_ekinetic.cpp @@ -1,12 +1,12 @@ -#include "../ekinetic_new.h" +#include "../ekinetic.h" #include "gtest/gtest.h" //--------------------------------------- -// Unit test of EkineticNew class -// EkineticNew is a derivative class of Operator, it is used to calculate the kinetic matrix +// Unit test of EKinetic class +// EKinetic is a derivative class of Operator, it is used to calculate the kinetic matrix // It use HContainer to store the real space HR matrix -// In this test, we test the correctness and time consuming of 3 functions in EkineticNew class +// In this test, we test the correctness and time consuming of 3 functions in EKinetic class // - initialize_HR() called in constructor // - contributeHR() // - contributeHk() @@ -18,7 +18,7 @@ // modify test_size to test different size of unitcell int test_size = 10; int test_nw = 10; -class EkineticNewTest : public ::testing::Test +class EKineticTest : public ::testing::Test { protected: void SetUp() override @@ -94,14 +94,14 @@ class EkineticNewTest : public ::testing::Test int my_rank = 0; }; -// using TEST_F to test EkineticNew -TEST_F(EkineticNewTest, constructHRd2d) +// using TEST_F to test EKinetic +TEST_F(EKineticTest, constructHRd2d) { std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); hamilt::HS_Matrix_K hsk(paraV, true); hsk.set_zero_hk(); Grid_Driver gd(0, 0); - hamilt::EkineticNew> + hamilt::EKinetic> op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of HR @@ -144,14 +144,14 @@ TEST_F(EkineticNewTest, constructHRd2d) } } -TEST_F(EkineticNewTest, constructHRd2cd) +TEST_F(EKineticTest, constructHRd2cd) { std::vector> kvec_d_in(2, ModuleBase::Vector3(0.0, 0.0, 0.0)); kvec_d_in[1] = ModuleBase::Vector3(0.1, 0.2, 0.3); hamilt::HS_Matrix_K> hsk(paraV, true); hsk.set_zero_hk(); Grid_Driver gd(0, 0); - hamilt::EkineticNew, double>> + hamilt::EKinetic, double>> op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of HR diff --git a/source/source_lcao/module_operator_lcao/test/test_ekinetic_serial.cpp b/source/source_lcao/module_operator_lcao/test/test_ekinetic_serial.cpp new file mode 100644 index 0000000000..87ce65d434 --- /dev/null +++ b/source/source_lcao/module_operator_lcao/test/test_ekinetic_serial.cpp @@ -0,0 +1,851 @@ +#include "../ekinetic.h" + +#include "gtest/gtest.h" + +//--------------------------------------- +// Unit test of EKinetic class +// EKinetic is a derivative class of Operator, it is used to calculate the kinetic matrix +// It use HContainer to store the real space HR matrix +// In this test, we test the correctness and time consuming of 3 functions in EKinetic class +// - initialize_HR() called in constructor +// - contributeHR() +// - contributeHk() +// - HR(double) and SK(complex) are tested in constructHRd2cd +// - HR(double) and SK(double) are tested in constructHRd2d +//--------------------------------------- + +// test_size is the number of atoms in the unitcell +// modify test_size to test different size of unitcell +int test_size = 10; +int test_nw = 10; +class EKineticTest : public ::testing::Test +{ + protected: + void SetUp() override + { +#ifdef __MPI + // MPI parallel settings + MPI_Comm_size(MPI_COMM_WORLD, &dsize); + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); +#endif + + // set up a unitcell, with one element and test_size atoms, each atom has test_nw orbitals + ucell.ntype = 1; + ucell.nat = test_size; + ucell.atoms = new Atom[ucell.ntype]; + ucell.iat2it = new int[ucell.nat]; + ucell.iat2ia = new int[ucell.nat]; + ucell.atoms[0].tau.resize(ucell.nat); + ucell.itia2iat.create(ucell.ntype, ucell.nat); + for (int iat = 0; iat < ucell.nat; iat++) + { + ucell.iat2it[iat] = 0; + ucell.iat2ia[iat] = iat; + ucell.atoms[0].tau[iat] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell.itia2iat(0, iat) = iat; + } + ucell.atoms[0].na = test_size; + ucell.atoms[0].nw = test_nw; + ucell.atoms[0].iw2l.resize(test_nw); + ucell.atoms[0].iw2m.resize(test_nw); + ucell.atoms[0].iw2n.resize(test_nw); + for (int iw = 0; iw < test_nw; ++iw) + { + ucell.atoms[0].iw2l[iw] = 0; + ucell.atoms[0].iw2m[iw] = 0; + ucell.atoms[0].iw2n[iw] = 0; + } + ucell.set_iat2iwt(1); + init_parav(); + // set up a HContainer with ucell + HR = new hamilt::HContainer(paraV); + } + + void TearDown() override + { + delete HR; + delete paraV; + delete[] ucell.atoms; + } + +#ifdef __MPI + void init_parav() + { + int nb = 10; + int global_row = test_size * test_nw; + int global_col = test_size * test_nw; + std::ofstream ofs_running; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); + } +#else + void init_parav() + { + } +#endif + + UnitCell ucell; + hamilt::HContainer* HR; + Parallel_Orbitals* paraV; + TwoCenterIntegrator intor_; + + int dsize; + int my_rank = 0; +}; +// Test complex to complex template specialization +TEST_F(EKineticTest, constructHRcd2cd) +{ + // Create complex HR container + hamilt::HContainer>* HR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.1, 0.2, 0.3)); + hamilt::HS_Matrix_K> hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic, std::complex>> + op(&hsk, kvec_d_in, HR_complex, &ucell, {1.0}, &gd, &intor_); + op.contributeHR(); + + // Check that HR_complex has been initialized + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (HR_complex->size_atom_pairs() > 0) + { + EXPECT_GT(HR_complex->size_atom_pairs(), 0); + } + + // Calculate HK + op.contributeHk(0); + auto* hk = hsk.get_hk(); + + // Verify HK is computed (values should be non-zero for non-gamma k-point) + bool has_nonzero = false; + for (int i = 0; i < paraV->get_row_size() * paraV->get_col_size(); ++i) + { + if (std::abs(hk[i]) > 1e-10) + { + has_nonzero = true; + break; + } + } + EXPECT_TRUE(has_nonzero); + + delete HR_complex; +} + +// Test set_HR_fixed method +TEST_F(EKineticTest, setHRFixed) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + // First contributeHR - this creates and calculates HR_fixed internally + op.contributeHR(); + + // Check that HR values are 1.0 after first call + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = HR->get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + EXPECT_EQ(tmp.get_pointer(0)[i], 1.0); + } + } + + // Second contributeHR should use the already-calculated HR_fixed + // Since HR_fixed_done is true, it will just add HR_fixed to HR again + op.contributeHR(); + + // Check that HR values are now 2.0 (accumulated) + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = HR->get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + EXPECT_EQ(tmp.get_pointer(0)[i], 2.0); + } + } +} + +// Test with single atom system +TEST_F(EKineticTest, singleAtom) +{ + // Create a single atom unit cell + UnitCell ucell_single; + ucell_single.ntype = 1; + ucell_single.nat = 1; + ucell_single.atoms = new Atom[1]; + ucell_single.iat2it = new int[1]; + ucell_single.iat2ia = new int[1]; + ucell_single.atoms[0].tau.resize(1); + ucell_single.itia2iat.create(1, 1); + ucell_single.iat2it[0] = 0; + ucell_single.iat2ia[0] = 0; + ucell_single.atoms[0].tau[0] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell_single.itia2iat(0, 0) = 0; + ucell_single.atoms[0].na = 1; + ucell_single.atoms[0].nw = 5; + ucell_single.atoms[0].iw2l.resize(5); + ucell_single.atoms[0].iw2m.resize(5); + ucell_single.atoms[0].iw2n.resize(5); + for (int iw = 0; iw < 5; ++iw) + { + ucell_single.atoms[0].iw2l[iw] = 0; + ucell_single.atoms[0].iw2m[iw] = 0; + ucell_single.atoms[0].iw2n[iw] = 0; + } + ucell_single.set_iat2iwt(1); + + Parallel_Orbitals* paraV_single = nullptr; +#ifdef __MPI + int nb = 5; + paraV_single = new Parallel_Orbitals(); + paraV_single->init(5, 5, nb, MPI_COMM_WORLD); + paraV_single->set_atomic_trace(ucell_single.get_iat2iwt(), 1, 5); +#endif + + hamilt::HContainer* HR_single = new hamilt::HContainer(paraV_single); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV_single, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR_single, &ucell_single, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Should have only self-interaction (atom 0 with itself) + // Note: In MPI parallel runs, some processes may not have any atom pairs + // so we only check if this process has atom pairs + if (HR_single->size_atom_pairs() > 0) + { + EXPECT_GT(HR_single->size_atom_pairs(), 0); + } + + // Calculate HK + op.contributeHk(0); + + delete HR_single; + delete paraV_single; + delete[] ucell_single.atoms; +} + +// Test with different orbital quantum numbers (L, N, M) +TEST_F(EKineticTest, differentOrbitals) +{ + // Modify orbital quantum numbers to test different L, N, M values + ucell.atoms[0].iw2l[0] = 0; // s orbital + ucell.atoms[0].iw2l[1] = 1; // p orbital + ucell.atoms[0].iw2l[2] = 1; // p orbital + ucell.atoms[0].iw2l[3] = 1; // p orbital + ucell.atoms[0].iw2l[4] = 2; // d orbital + + ucell.atoms[0].iw2m[0] = 0; + ucell.atoms[0].iw2m[1] = -1; + ucell.atoms[0].iw2m[2] = 0; + ucell.atoms[0].iw2m[3] = 1; + ucell.atoms[0].iw2m[4] = 0; + + ucell.atoms[0].iw2n[0] = 0; + ucell.atoms[0].iw2n[1] = 0; + ucell.atoms[0].iw2n[2] = 0; + ucell.atoms[0].iw2n[3] = 0; + ucell.atoms[0].iw2n[4] = 0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Verify HR is calculated + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (HR->size_atom_pairs() > 0) + { + EXPECT_GT(HR->size_atom_pairs(), 0); + } + + op.contributeHk(0); +} + +// Test force calculation +TEST_F(EKineticTest, forceCalculation) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create a simple density matrix + hamilt::HContainer dmR(paraV); + // Initialize dmR with same structure as HR + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& hr_pair = HR->get_atom_pair(iap); + int iat1 = hr_pair.get_atom_i(); + int iat2 = hr_pair.get_atom_j(); + for (int iR = 0; iR < hr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = hr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix to identity-like values + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate force only + op.cal_force_stress(true, false, &dmR, force, stress); + + // Verify force has been calculated (should have some non-zero values) + bool has_force = false; + for (int i = 0; i < ucell.nat; ++i) + { + for (int j = 0; j < 3; ++j) + { + if (std::abs(force(i, j)) > 1e-10) + { + has_force = true; + break; + } + } + } + // Note: For atoms at same position, forces might be zero, so we just check it doesn't crash + EXPECT_TRUE(true); // Test passes if no crash occurs +} + +// Test stress calculation +TEST_F(EKineticTest, stressCalculation) +{ + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create density matrix + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& hr_pair = HR->get_atom_pair(iap); + int iat1 = hr_pair.get_atom_i(); + int iat2 = hr_pair.get_atom_j(); + for (int iR = 0; iR < hr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = hr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate stress only + op.cal_force_stress(false, true, &dmR, force, stress); + + // Verify stress tensor is symmetric (within numerical precision) + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } +} + +// Test force and stress together +TEST_F(EKineticTest, forceStressTogether) +{ + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create density matrix + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& hr_pair = HR->get_atom_pair(iap); + int iat1 = hr_pair.get_atom_i(); + int iat2 = hr_pair.get_atom_j(); + for (int iR = 0; iR < hr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = hr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate both force and stress + op.cal_force_stress(true, true, &dmR, force, stress); + + // Verify stress symmetry + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } + + // Test passes if no crash occurs + EXPECT_TRUE(true); +} + +// Test with null density matrix pointer +TEST_F(EKineticTest, nullDensityMatrix) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // This should handle null pointer gracefully or assert in debug mode + // In release mode, it might crash, so we skip this test in that case +#ifdef __DEBUG + EXPECT_DEATH(op.cal_force_stress(true, false, nullptr, force, stress), ".*"); +#else + // In release mode, just verify the test framework works + EXPECT_TRUE(true); +#endif +} + +// Test with zero orbital cutoff +TEST_F(EKineticTest, zeroOrbitalCutoff) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + // Use zero cutoff - should result in no atom pairs (except possibly self-interaction) + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {0.0}, &gd, &intor_); + + op.contributeHR(); + + // With zero cutoff, there should be no or very few atom pairs + // (implementation dependent - might include self-interaction) + EXPECT_GE(HR->size_atom_pairs(), 0); +} + +// Test with large orbital cutoff +TEST_F(EKineticTest, largeOrbitalCutoff) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + // Use very large cutoff - should include all atoms + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1000.0}, &gd, &intor_); + + op.contributeHR(); + + // With large cutoff, should have many atom pairs + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (HR->size_atom_pairs() > 0) + { + EXPECT_GT(HR->size_atom_pairs(), 0); + } + + op.contributeHk(0); +} + +// Test with atoms at cutoff boundary +TEST_F(EKineticTest, cutoffBoundary) +{ + // Set up atoms at specific distances to test cutoff boundary + ucell.lat0 = 1.0; + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + // Place two atoms at distance exactly at cutoff + ucell.atoms[0].tau[0] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell.atoms[0].tau[1] = ModuleBase::Vector3(0.5, 0.0, 0.0); // distance = 5.0 + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + // Use cutoff of 5.0 - atoms at exactly this distance should be excluded + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {2.5}, &gd, &intor_); + + op.contributeHR(); + + // Verify initialization completed + EXPECT_GE(HR->size_atom_pairs(), 0); +} + +// Test multiple contributeHR calls for accumulation +TEST_F(EKineticTest, multipleContributeHRAccumulation) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic> + op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); + + // First call + op.contributeHR(); + + // Verify first call results + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = HR->get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + EXPECT_EQ(tmp.get_pointer(0)[i], 1.0); + } + } + + // Second call - should accumulate + op.contributeHR(); + + // Verify accumulation + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = HR->get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + EXPECT_EQ(tmp.get_pointer(0)[i], 2.0); + } + } + + // Third call + op.contributeHR(); + + // Verify triple accumulation + for (int iap = 0; iap < HR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = HR->get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + EXPECT_EQ(tmp.get_pointer(0)[i], 3.0); + } + } +} + +// Test force calculation with npol=2 (nspin=4, spin-orbit coupling) +TEST_F(EKineticTest, forceCalculationNpol2) +{ + // Set up unit cell with npol=2 + ucell.set_iat2iwt(2); // npol=2 + + // Reinitialize paraV with doubled size for npol=2 + delete paraV; + paraV = nullptr; +#ifdef __MPI + int nb = 10; + int global_row = test_size * test_nw * 2; // doubled for npol=2 + int global_col = test_size * test_nw * 2; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); +#endif + + // Create complex HContainer for npol=2 + hamilt::HContainer>* HR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K> hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic, std::complex>> + op(&hsk, kvec_d_in, HR_complex, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create REAL density matrix (charge density) for force/stress calculation + // Even with npol=2, the density matrix for force/stress is real-valued + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < HR_complex->size_atom_pairs(); ++iap) + { + hamilt::AtomPair>& hr_pair = HR_complex->get_atom_pair(iap); + int iat1 = hr_pair.get_atom_i(); + int iat2 = hr_pair.get_atom_j(); + for (int iR = 0; iR < hr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = hr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix values - real values representing charge density + // For npol=2, the layout is still handled by step_trace in the implementation + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + + // Fill with real charge density values + double* dm_ptr = tmp.get_pointer(0); + for (int iw1 = 0; iw1 < indexes1.size(); iw1 += 2) + { + for (int iw2 = 0; iw2 < indexes2.size(); iw2 += 2) + { + int idx = iw1 * indexes2.size() + iw2; + // Set charge density values (diagonal of spin density matrix) + dm_ptr[idx] = 0.1; // Charge density at this orbital pair + } + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate force with npol=2 + op.cal_force_stress(true, false, &dmR, force, stress); + + // Verify force calculation completed without crash + EXPECT_TRUE(true); + + delete HR_complex; + + // Restore npol=1 for other tests + ucell.set_iat2iwt(1); +} + +// Test stress calculation with npol=2 (nspin=4, spin-orbit coupling) +TEST_F(EKineticTest, stressCalculationNpol2) +{ + // Set up unit cell with npol=2 + ucell.set_iat2iwt(2); // npol=2 + + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + // Reinitialize paraV with doubled size for npol=2 + delete paraV; + paraV = nullptr; +#ifdef __MPI + int nb = 10; + int global_row = test_size * test_nw * 2; // doubled for npol=2 + int global_col = test_size * test_nw * 2; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); +#endif + + // Create complex HContainer for npol=2 + hamilt::HContainer>* HR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K> hsk(paraV, true); + hsk.set_zero_hk(); + Grid_Driver gd(0, 0); + + hamilt::EKinetic, std::complex>> + op(&hsk, kvec_d_in, HR_complex, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create REAL density matrix (charge density) for force/stress calculation + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < HR_complex->size_atom_pairs(); ++iap) + { + hamilt::AtomPair>& hr_pair = HR_complex->get_atom_pair(iap); + int iat1 = hr_pair.get_atom_i(); + int iat2 = hr_pair.get_atom_j(); + for (int iR = 0; iR < hr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = hr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix values - real values representing charge density + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + + double* dm_ptr = tmp.get_pointer(0); + for (int iw1 = 0; iw1 < indexes1.size(); iw1 += 2) + { + for (int iw2 = 0; iw2 < indexes2.size(); iw2 += 2) + { + int idx = iw1 * indexes2.size() + iw2; + dm_ptr[idx] = 0.1; // Charge density + } + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate stress with npol=2 + op.cal_force_stress(false, true, &dmR, force, stress); + + // Verify stress tensor is symmetric + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } + + delete HR_complex; + + // Restore npol=1 for other tests + ucell.set_iat2iwt(1); +} + +int main(int argc, char** argv) +{ +#ifdef __MPI + MPI_Init(&argc, &argv); +#endif + testing::InitGoogleTest(&argc, argv); + int result = RUN_ALL_TESTS(); +#ifdef __MPI + MPI_Finalize(); +#endif + return result; +} diff --git a/source/source_lcao/module_operator_lcao/test/test_nonlocalnew.cpp b/source/source_lcao/module_operator_lcao/test/test_nonlocal.cpp similarity index 94% rename from source/source_lcao/module_operator_lcao/test/test_nonlocalnew.cpp rename to source/source_lcao/module_operator_lcao/test/test_nonlocal.cpp index e137f7ac73..1aef3dede1 100644 --- a/source/source_lcao/module_operator_lcao/test/test_nonlocalnew.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_nonlocal.cpp @@ -1,13 +1,13 @@ -#include "../nonlocal_new.h" +#include "../nonlocal.h" #include "gtest/gtest.h" #include //--------------------------------------- -// Unit test of NonlocalNew class -// NonlocalNew is a derivative class of Operator, it is used to calculate the kinetic matrix +// Unit test of Nonlocal class +// Nonlocal is a derivative class of Operator, it is used to calculate the kinetic matrix // It use HContainer to store the real space HR matrix -// In this test, we test the correctness and time consuming of 3 functions in NonlocalNew class +// In this test, we test the correctness and time consuming of 3 functions in Nonlocal class // - initialize_HR() called in constructor // - contributeHR() // - contributeHk() @@ -19,7 +19,7 @@ // modify test_size to test different size of unitcell int test_size = 10; int test_nw = 10; -class NonlocalNewTest : public ::testing::Test +class NonlocalTest : public ::testing::Test { protected: void SetUp() override @@ -119,8 +119,8 @@ class NonlocalNewTest : public ::testing::Test int my_rank = 0; }; -// using TEST_F to test NonlocalNew -TEST_F(NonlocalNewTest, constructHRd2d) +// using TEST_F to test Nonlocal +TEST_F(NonlocalTest, constructHRd2d) { std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); hamilt::HS_Matrix_K hsk(paraV, true); @@ -129,7 +129,7 @@ TEST_F(NonlocalNewTest, constructHRd2d) // check some input values EXPECT_EQ(ucell.infoNL.Beta[0].get_rcut_max(), 1.0); std::chrono::high_resolution_clock::time_point start_time = std::chrono::high_resolution_clock::now(); - hamilt::NonlocalNew> + hamilt::Nonlocal> op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); std::chrono::high_resolution_clock::time_point end_time = std::chrono::high_resolution_clock::now(); std::chrono::duration elapsed_time @@ -192,14 +192,14 @@ TEST_F(NonlocalNewTest, constructHRd2d) << std::endl; } -TEST_F(NonlocalNewTest, constructHRd2cd) +TEST_F(NonlocalTest, constructHRd2cd) { std::vector> kvec_d_in(2, ModuleBase::Vector3(0.0, 0.0, 0.0)); kvec_d_in[1] = ModuleBase::Vector3(0.1, 0.2, 0.3); hamilt::HS_Matrix_K> hsk(paraV); hsk.set_zero_hk(); Grid_Driver gd(0, 0); - hamilt::NonlocalNew, double>> + hamilt::Nonlocal, double>> op(&hsk, kvec_d_in, HR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of HR diff --git a/source/source_lcao/module_operator_lcao/test/test_overlapnew.cpp b/source/source_lcao/module_operator_lcao/test/test_overlap.cpp similarity index 91% rename from source/source_lcao/module_operator_lcao/test/test_overlapnew.cpp rename to source/source_lcao/module_operator_lcao/test/test_overlap.cpp index 19d5e57737..e3c017857b 100644 --- a/source/source_lcao/module_operator_lcao/test/test_overlapnew.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_overlap.cpp @@ -1,12 +1,12 @@ -#include "../overlap_new.h" +#include "../overlap.h" #include "gtest/gtest.h" //--------------------------------------- -// Unit test of OverlapNew class -// OverlapNew is a derivative class of Operator, it is used to calculate the overlap matrix +// Unit test of Overlap class +// Overlap is a derivative class of Operator, it is used to calculate the overlap matrix // It use HContainer to store the real space SR matrix -// In this test, we test the correctness and time consuming of 3 functions in OverlapNew class +// In this test, we test the correctness and time consuming of 3 functions in Overlap class // - initialize_SR() called in constructor // - contributeHR() // - contributeHk() @@ -18,7 +18,7 @@ // modify test_size to test different size of unitcell int test_size = 10; int test_nw = 10; -class OverlapNewTest : public ::testing::Test +class OverlapTest : public ::testing::Test { protected: void SetUp() override @@ -94,14 +94,14 @@ class OverlapNewTest : public ::testing::Test int my_rank = 0; }; -// using TEST_F to test OverlapNew -TEST_F(OverlapNewTest, constructHRd2d) +// using TEST_F to test Overlap +TEST_F(OverlapTest, constructHRd2d) { std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); hamilt::HS_Matrix_K hsk(paraV); hsk.set_zero_sk(); Grid_Driver gd(0, 0); - hamilt::OverlapNew> + hamilt::Overlap> op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of SR @@ -128,14 +128,14 @@ TEST_F(OverlapNewTest, constructHRd2d) } } -TEST_F(OverlapNewTest, constructHRd2cd) +TEST_F(OverlapTest, constructHRd2cd) { std::vector> kvec_d_in(2, ModuleBase::Vector3(0.0, 0.0, 0.0)); kvec_d_in[1] = ModuleBase::Vector3(0.1, 0.2, 0.3); hamilt::HS_Matrix_K> hsk(paraV); hsk.set_zero_sk(); Grid_Driver gd(0, 0); - hamilt::OverlapNew, double>> + hamilt::Overlap, double>> op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of SR diff --git a/source/source_lcao/module_operator_lcao/test/test_overlapnew_cd.cpp b/source/source_lcao/module_operator_lcao/test/test_overlap_cd.cpp similarity index 93% rename from source/source_lcao/module_operator_lcao/test/test_overlapnew_cd.cpp rename to source/source_lcao/module_operator_lcao/test/test_overlap_cd.cpp index d29c0cd840..ad2e8daf7e 100644 --- a/source/source_lcao/module_operator_lcao/test/test_overlapnew_cd.cpp +++ b/source/source_lcao/module_operator_lcao/test/test_overlap_cd.cpp @@ -1,12 +1,12 @@ -#include "../overlap_new.h" +#include "../overlap.h" #include "gtest/gtest.h" //--------------------------------------- -// Unit test of OverlapNew class -// OverlapNew is a derivative class of Operator, it is used to calculate the overlap matrix +// Unit test of Overlap class +// Overlap is a derivative class of Operator, it is used to calculate the overlap matrix // It use HContainer to store the real space SR matrix -// In this test, we test the correctness and time consuming of 3 functions in OverlapNew class +// In this test, we test the correctness and time consuming of 3 functions in Overlap class // - initialize_SR() called in constructor // - contributeHR() // - contributeHk() @@ -17,7 +17,7 @@ // modify test_size to test different size of unitcell int test_size = 10; int test_nw = 10; -class OverlapNewTest : public ::testing::Test +class OverlapTest : public ::testing::Test { protected: void SetUp() override @@ -93,7 +93,7 @@ class OverlapNewTest : public ::testing::Test int my_rank = 0; }; -TEST_F(OverlapNewTest, constructHRcd2cd) +TEST_F(OverlapTest, constructHRcd2cd) { int npol = ucell.get_npol(); std::vector> kvec_d_in(2, ModuleBase::Vector3(0.0, 0.0, 0.0)); @@ -101,7 +101,7 @@ TEST_F(OverlapNewTest, constructHRcd2cd) hamilt::HS_Matrix_K> hsk(paraV); hsk.set_zero_sk(); Grid_Driver gd(0, 0); - hamilt::OverlapNew, std::complex>> + hamilt::Overlap, std::complex>> op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); op.contributeHR(); // check the value of SR diff --git a/source/source_lcao/module_operator_lcao/test/test_overlap_serial.cpp b/source/source_lcao/module_operator_lcao/test/test_overlap_serial.cpp new file mode 100644 index 0000000000..98b8e4d741 --- /dev/null +++ b/source/source_lcao/module_operator_lcao/test/test_overlap_serial.cpp @@ -0,0 +1,802 @@ +#include "../overlap.h" + +#include "gtest/gtest.h" + +//--------------------------------------- +// Unit test of Overlap class +// Overlap is a derivative class of Operator, it is used to calculate the overlap matrix +// It use HContainer to store the real space SR matrix +// In this test, we test the correctness and time consuming of 3 functions in Overlap class +// - initialize_SR() called in constructor +// - contributeHR() +// - contributeHk() +// - SR(double) and SK(complex) are tested in constructHRd2cd +// - SR(double) and SK(double) are tested in constructHRd2d +//--------------------------------------- + +// test_size is the number of atoms in the unitcell +// modify test_size to test different size of unitcell +int test_size = 10; +int test_nw = 10; +class OverlapTest : public ::testing::Test +{ + protected: + void SetUp() override + { +#ifdef __MPI + // MPI parallel settings + MPI_Comm_size(MPI_COMM_WORLD, &dsize); + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); +#endif + + // set up a unitcell, with one element and test_size atoms, each atom has test_nw orbitals + ucell.ntype = 1; + ucell.nat = test_size; + ucell.atoms = new Atom[ucell.ntype]; + ucell.iat2it = new int[ucell.nat]; + ucell.iat2ia = new int[ucell.nat]; + ucell.atoms[0].tau.resize(ucell.nat); + ucell.itia2iat.create(ucell.ntype, ucell.nat); + for (int iat = 0; iat < ucell.nat; iat++) + { + ucell.iat2it[iat] = 0; + ucell.iat2ia[iat] = iat; + ucell.atoms[0].tau[iat] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell.itia2iat(0, iat) = iat; + } + ucell.atoms[0].na = test_size; + ucell.atoms[0].nw = test_nw; + ucell.atoms[0].iw2l.resize(test_nw); + ucell.atoms[0].iw2m.resize(test_nw); + ucell.atoms[0].iw2n.resize(test_nw); + for (int iw = 0; iw < test_nw; ++iw) + { + ucell.atoms[0].iw2l[iw] = 0; + ucell.atoms[0].iw2m[iw] = 0; + ucell.atoms[0].iw2n[iw] = 0; + } + ucell.set_iat2iwt(1); + init_parav(); + // set up a HContainer with ucell + SR = new hamilt::HContainer(paraV); + } + + void TearDown() override + { + delete SR; + delete paraV; + delete[] ucell.atoms; + } + +#ifdef __MPI + void init_parav() + { + int nb = 10; + int global_row = test_size * test_nw; + int global_col = test_size * test_nw; + std::ofstream ofs_running; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); + } +#else + void init_parav() + { + } +#endif + + UnitCell ucell; + hamilt::HContainer* SR; + Parallel_Orbitals* paraV; + TwoCenterIntegrator intor_; + + int dsize; + int my_rank = 0; +}; +TEST_F(OverlapTest, constructHRcd2cd) +{ + // Create complex SR container + hamilt::HContainer>* SR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.1, 0.2, 0.3)); + hamilt::HS_Matrix_K> hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap, std::complex>> + op(&hsk, kvec_d_in, nullptr, SR_complex, &ucell, {1.0}, &gd, &intor_); + op.contributeHR(); + + // Check that SR_complex has been initialized + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (SR_complex->size_atom_pairs() > 0) + { + EXPECT_GT(SR_complex->size_atom_pairs(), 0); + } + + // Calculate SK + op.contributeHk(0); + auto* sk = hsk.get_sk(); + + // Verify SK is computed (values should be non-zero for non-gamma k-point) + bool has_nonzero = false; + for (int i = 0; i < paraV->get_row_size() * paraV->get_col_size(); ++i) + { + if (std::abs(sk[i]) > 1e-10) + { + has_nonzero = true; + break; + } + } + EXPECT_TRUE(has_nonzero); + + delete SR_complex; +} + +// Test getSk method +TEST_F(OverlapTest, getSk) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + op.contributeHk(0); + + // Get SK pointer + double* sk_from_method = op.getSk(); + double* sk_from_hsk = hsk.get_sk(); + + // Verify they point to the same data + EXPECT_EQ(sk_from_method, sk_from_hsk); + + // Verify values match + for (int i = 0; i < hsk.get_size(); ++i) + { + EXPECT_EQ(sk_from_method[i], sk_from_hsk[i]); + } +} + +// Test k-vector caching optimization +TEST_F(OverlapTest, kVectorCaching) +{ + std::vector> kvec_d_in(2, ModuleBase::Vector3(0.1, 0.2, 0.3)); + kvec_d_in[1] = ModuleBase::Vector3(0.1, 0.2, 0.3); // Same k-vector + hamilt::HS_Matrix_K> hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap, double>> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // First call with k-vector index 0 + op.contributeHk(0); + auto* sk = hsk.get_sk(); + std::complex first_value = sk[0]; + + // Second call with same k-vector (index 1) + hsk.set_zero_sk(); + op.contributeHk(1); + std::complex second_value = sk[0]; + + // Values should be identical due to caching + EXPECT_NEAR(first_value.real(), second_value.real(), 1e-10); + EXPECT_NEAR(first_value.imag(), second_value.imag(), 1e-10); +} + +// Test with single atom system +TEST_F(OverlapTest, singleAtom) +{ + // Create a single atom unit cell + UnitCell ucell_single; + ucell_single.ntype = 1; + ucell_single.nat = 1; + ucell_single.atoms = new Atom[1]; + ucell_single.iat2it = new int[1]; + ucell_single.iat2ia = new int[1]; + ucell_single.atoms[0].tau.resize(1); + ucell_single.itia2iat.create(1, 1); + ucell_single.iat2it[0] = 0; + ucell_single.iat2ia[0] = 0; + ucell_single.atoms[0].tau[0] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell_single.itia2iat(0, 0) = 0; + ucell_single.atoms[0].na = 1; + ucell_single.atoms[0].nw = 5; + ucell_single.atoms[0].iw2l.resize(5); + ucell_single.atoms[0].iw2m.resize(5); + ucell_single.atoms[0].iw2n.resize(5); + for (int iw = 0; iw < 5; ++iw) + { + ucell_single.atoms[0].iw2l[iw] = 0; + ucell_single.atoms[0].iw2m[iw] = 0; + ucell_single.atoms[0].iw2n[iw] = 0; + } + ucell_single.set_iat2iwt(1); + + Parallel_Orbitals* paraV_single = nullptr; +#ifdef __MPI + int nb = 5; + paraV_single = new Parallel_Orbitals(); + paraV_single->init(5, 5, nb, MPI_COMM_WORLD); + paraV_single->set_atomic_trace(ucell_single.get_iat2iwt(), 1, 5); +#endif + + hamilt::HContainer* SR_single = new hamilt::HContainer(paraV_single); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV_single); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR_single, &ucell_single, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Should have only self-interaction (atom 0 with itself) + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (SR_single->size_atom_pairs() > 0) + { + EXPECT_GT(SR_single->size_atom_pairs(), 0); + } + + // Calculate SK + op.contributeHk(0); + + delete SR_single; + delete paraV_single; + delete[] ucell_single.atoms; +} + +// Test with different orbital quantum numbers (L, N, M) +TEST_F(OverlapTest, differentOrbitals) +{ + // Modify orbital quantum numbers to test different L, N, M values + ucell.atoms[0].iw2l[0] = 0; // s orbital + ucell.atoms[0].iw2l[1] = 1; // p orbital + ucell.atoms[0].iw2l[2] = 1; // p orbital + ucell.atoms[0].iw2l[3] = 1; // p orbital + ucell.atoms[0].iw2l[4] = 2; // d orbital + + ucell.atoms[0].iw2m[0] = 0; + ucell.atoms[0].iw2m[1] = -1; + ucell.atoms[0].iw2m[2] = 0; + ucell.atoms[0].iw2m[3] = 1; + ucell.atoms[0].iw2m[4] = 0; + + ucell.atoms[0].iw2n[0] = 0; + ucell.atoms[0].iw2n[1] = 0; + ucell.atoms[0].iw2n[2] = 0; + ucell.atoms[0].iw2n[3] = 0; + ucell.atoms[0].iw2n[4] = 0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Verify SR is calculated + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (SR->size_atom_pairs() > 0) + { + EXPECT_GT(SR->size_atom_pairs(), 0); + } + + op.contributeHk(0); +} + +// Test force calculation +TEST_F(OverlapTest, forceCalculation) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create a simple density matrix + hamilt::HContainer dmR(paraV); + // Initialize dmR with same structure as SR + for (int iap = 0; iap < SR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& sr_pair = SR->get_atom_pair(iap); + int iat1 = sr_pair.get_atom_i(); + int iat2 = sr_pair.get_atom_j(); + for (int iR = 0; iR < sr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = sr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix to identity-like values + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate force only + op.cal_force_stress(true, false, &dmR, force, stress); + + // Test passes if no crash occurs + EXPECT_TRUE(true); +} + +// Test stress calculation +TEST_F(OverlapTest, stressCalculation) +{ + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create density matrix + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < SR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& sr_pair = SR->get_atom_pair(iap); + int iat1 = sr_pair.get_atom_i(); + int iat2 = sr_pair.get_atom_j(); + for (int iR = 0; iR < sr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = sr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate stress only + op.cal_force_stress(false, true, &dmR, force, stress); + + // Verify stress tensor is symmetric (within numerical precision) + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } +} + +// Test force and stress together +TEST_F(OverlapTest, forceStressTogether) +{ + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create density matrix + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < SR->size_atom_pairs(); ++iap) + { + hamilt::AtomPair& sr_pair = SR->get_atom_pair(iap); + int iat1 = sr_pair.get_atom_i(); + int iat2 = sr_pair.get_atom_j(); + for (int iR = 0; iR < sr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = sr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + int nwt = indexes1.size() * indexes2.size(); + for (int i = 0; i < nwt; ++i) + { + tmp.get_pointer(0)[i] = 0.1; + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate both force and stress + op.cal_force_stress(true, true, &dmR, force, stress); + + // Verify stress symmetry + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } + + // Test passes if no crash occurs + EXPECT_TRUE(true); +} + +// Test with zero orbital cutoff +TEST_F(OverlapTest, zeroOrbitalCutoff) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + // Use zero cutoff - should result in no atom pairs (except possibly self-interaction) + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {0.0}, &gd, &intor_); + + op.contributeHR(); + + // With zero cutoff, there should be no or very few atom pairs + // (implementation dependent - might include self-interaction) + EXPECT_GE(SR->size_atom_pairs(), 0); +} + +// Test with large orbital cutoff +TEST_F(OverlapTest, largeOrbitalCutoff) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + // Use very large cutoff - should include all atoms + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1000.0}, &gd, &intor_); + + op.contributeHR(); + + // With large cutoff, should have many atom pairs + // Note: In MPI parallel runs, some processes may not have any atom pairs + if (SR->size_atom_pairs() > 0) + { + EXPECT_GT(SR->size_atom_pairs(), 0); + } + + op.contributeHk(0); +} + +// Test with atoms at cutoff boundary +TEST_F(OverlapTest, cutoffBoundary) +{ + // Set up atoms at specific distances to test cutoff boundary + ucell.lat0 = 1.0; + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + // Place two atoms at distance exactly at cutoff + ucell.atoms[0].tau[0] = ModuleBase::Vector3(0.0, 0.0, 0.0); + ucell.atoms[0].tau[1] = ModuleBase::Vector3(0.5, 0.0, 0.0); // distance = 5.0 + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + // Use cutoff of 5.0 - atoms at exactly this distance should be excluded + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {2.5}, &gd, &intor_); + + op.contributeHR(); + + // Verify initialization completed + EXPECT_GE(SR->size_atom_pairs(), 0); +} + +// Test Hermitian property of SK matrix +TEST_F(OverlapTest, hermitianProperty) +{ + // Use gamma point to test that diagonal elements are real + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K> hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap, double>> + op(&hsk, kvec_d_in, nullptr, SR, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + op.contributeHk(0); + + auto* sk = hsk.get_sk(); + int nrow = paraV->get_row_size(); + int ncol = paraV->get_col_size(); + + // For overlap matrix at gamma point, SK should be real and symmetric + // Diagonal elements should be real (imaginary part should be zero) + for (int i = 0; i < std::min(nrow, ncol); ++i) + { + if (i < nrow && i < ncol) + { + int idx = i * ncol + i; + if (idx < nrow * ncol) + { + EXPECT_NEAR(sk[idx].imag(), 0.0, 1e-8); + } + } + } +} + +// Test with null SR pointer (should skip initialization) +TEST_F(OverlapTest, nullSRPointer) +{ + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + // Pass nullptr for SR - should not crash during construction + hamilt::Overlap> + op(&hsk, kvec_d_in, nullptr, nullptr, &ucell, {1.0}, &gd, &intor_); + + // Test passes if no crash occurs during construction + EXPECT_TRUE(true); +} + +// Test force calculation with npol=2 (nspin=4, spin-orbit coupling) +TEST_F(OverlapTest, forceCalculationNpol2) +{ + // Set up unit cell with npol=2 + ucell.set_iat2iwt(2); // npol=2 + + // Reinitialize paraV with doubled size for npol=2 + delete paraV; + paraV = nullptr; +#ifdef __MPI + int nb = 10; + int global_row = test_size * test_nw * 2; // doubled for npol=2 + int global_col = test_size * test_nw * 2; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); +#endif + + // Create complex HContainer for npol=2 + hamilt::HContainer>* SR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K> hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap, std::complex>> + op(&hsk, kvec_d_in, nullptr, SR_complex, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create REAL density matrix (charge density) for force/stress calculation + // Even with npol=2, the density matrix for force/stress is real-valued + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < SR_complex->size_atom_pairs(); ++iap) + { + hamilt::AtomPair>& sr_pair = SR_complex->get_atom_pair(iap); + int iat1 = sr_pair.get_atom_i(); + int iat2 = sr_pair.get_atom_j(); + for (int iR = 0; iR < sr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = sr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix values - real values representing charge density + // For npol=2, the layout is still handled by step_trace in the implementation + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + + // Fill with real charge density values + double* dm_ptr = tmp.get_pointer(0); + for (int iw1 = 0; iw1 < indexes1.size(); iw1 += 2) + { + for (int iw2 = 0; iw2 < indexes2.size(); iw2 += 2) + { + int idx = iw1 * indexes2.size() + iw2; + // Set charge density values (diagonal of spin density matrix) + dm_ptr[idx] = 0.1; // Charge density at this orbital pair + } + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate force with npol=2 + op.cal_force_stress(true, false, &dmR, force, stress); + + // Verify force calculation completed without crash + EXPECT_TRUE(true); + + delete SR_complex; + + // Restore npol=1 for other tests + ucell.set_iat2iwt(1); +} + +// Test stress calculation with npol=2 (nspin=4, spin-orbit coupling) +TEST_F(OverlapTest, stressCalculationNpol2) +{ + // Set up unit cell with npol=2 + ucell.set_iat2iwt(2); // npol=2 + + // Initialize unit cell parameters for stress calculation + ucell.lat0 = 1.0; + ucell.omega = 1000.0; // Set non-zero volume to avoid division by zero + ucell.latvec.e11 = 10.0; + ucell.latvec.e22 = 10.0; + ucell.latvec.e33 = 10.0; + + // Reinitialize paraV with doubled size for npol=2 + delete paraV; + paraV = nullptr; +#ifdef __MPI + int nb = 10; + int global_row = test_size * test_nw * 2; // doubled for npol=2 + int global_col = test_size * test_nw * 2; + paraV = new Parallel_Orbitals(); + paraV->init(global_row, global_col, nb, MPI_COMM_WORLD); + paraV->set_atomic_trace(ucell.get_iat2iwt(), test_size, global_row); +#endif + + // Create complex HContainer for npol=2 + hamilt::HContainer>* SR_complex = new hamilt::HContainer>(paraV); + + std::vector> kvec_d_in(1, ModuleBase::Vector3(0.0, 0.0, 0.0)); + hamilt::HS_Matrix_K> hsk(paraV); + hsk.set_zero_sk(); + Grid_Driver gd(0, 0); + + hamilt::Overlap, std::complex>> + op(&hsk, kvec_d_in, nullptr, SR_complex, &ucell, {1.0}, &gd, &intor_); + + op.contributeHR(); + + // Create REAL density matrix (charge density) for force/stress calculation + hamilt::HContainer dmR(paraV); + for (int iap = 0; iap < SR_complex->size_atom_pairs(); ++iap) + { + hamilt::AtomPair>& sr_pair = SR_complex->get_atom_pair(iap); + int iat1 = sr_pair.get_atom_i(); + int iat2 = sr_pair.get_atom_j(); + for (int iR = 0; iR < sr_pair.get_R_size(); ++iR) + { + ModuleBase::Vector3 R_index = sr_pair.get_R_index(iR); + hamilt::AtomPair dm_pair(iat1, iat2, R_index, paraV); + dmR.insert_pair(dm_pair); + } + } + dmR.allocate(nullptr, true); + + // Set density matrix values - real values representing charge density + for (int iap = 0; iap < dmR.size_atom_pairs(); ++iap) + { + hamilt::AtomPair& tmp = dmR.get_atom_pair(iap); + int iat1 = tmp.get_atom_i(); + int iat2 = tmp.get_atom_j(); + auto indexes1 = paraV->get_indexes_row(iat1); + auto indexes2 = paraV->get_indexes_col(iat2); + + double* dm_ptr = tmp.get_pointer(0); + for (int iw1 = 0; iw1 < indexes1.size(); iw1 += 2) + { + for (int iw2 = 0; iw2 < indexes2.size(); iw2 += 2) + { + int idx = iw1 * indexes2.size() + iw2; + dm_ptr[idx] = 0.1; // Charge density + } + } + } + + ModuleBase::matrix force(ucell.nat, 3); + ModuleBase::matrix stress(3, 3); + + // Calculate stress with npol=2 + op.cal_force_stress(false, true, &dmR, force, stress); + + // Verify stress tensor is symmetric + for (int i = 0; i < 3; ++i) + { + for (int j = 0; j < 3; ++j) + { + EXPECT_NEAR(stress(i, j), stress(j, i), 1e-8); + } + } + + delete SR_complex; + + // Restore npol=1 for other tests + ucell.set_iat2iwt(1); +} + +int main(int argc, char** argv) +{ +#ifdef __MPI + MPI_Init(&argc, &argv); +#endif + testing::InitGoogleTest(&argc, argv); + int result = RUN_ALL_TESTS(); +#ifdef __MPI + MPI_Finalize(); +#endif + return result; +} diff --git a/source/source_lcao/module_operator_lcao/test/tmp_mocks.cpp b/source/source_lcao/module_operator_lcao/test/tmp_mocks.cpp index 35c319cc8d..2c27539199 100644 --- a/source/source_lcao/module_operator_lcao/test/tmp_mocks.cpp +++ b/source/source_lcao/module_operator_lcao/test/tmp_mocks.cpp @@ -131,7 +131,8 @@ void TwoCenterIntegrator::calculate( const int m2, const ModuleBase::Vector3& vR, // vR = R2 - R1 double* out, - double* grad_out) const { + double* grad_out, + double* hess_out) const { out[0] = 1.0; } @@ -208,3 +209,12 @@ void Numerical_Orbital::set_orbital_info(const int&, const int&, const int*, const int&) {} + +// mock of TD_info +class TD_info { +public: + TD_info() {} + ~TD_info() {} + static ModuleBase::Vector3 cart_At; +}; +ModuleBase::Vector3 TD_info::cart_At(0.0, 0.0, 0.0); \ No newline at end of file diff --git a/source/source_lcao/module_operator_lcao/veff_lcao.cpp b/source/source_lcao/module_operator_lcao/veff_lcao.cpp index 0df6ed33a5..f664844544 100644 --- a/source/source_lcao/module_operator_lcao/veff_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/veff_lcao.cpp @@ -65,8 +65,8 @@ void Veff>::contributeHR() //(1) prepare data for this k point. // copy the local potential from array. //----------------------------------------- - double* vr_eff1 = this->pot->get_effective_v(this->current_spin); - double* vofk_eff1 = this->pot->get_effective_vofk(this->current_spin); + double* vr_eff1 = this->pot->get_eff_v(this->current_spin); + double* vofk_eff1 = this->pot->get_eff_vofk(this->current_spin); if(XC_Functional::get_ked_flag()) { @@ -95,8 +95,8 @@ void Veff, double>>::contributeHR() //(1) prepare data for this k point. // copy the local potential from array. //----------------------------------------- - double* vr_eff1 = this->pot->get_effective_v(this->current_spin); - double* vofk_eff1 = this->pot->get_effective_vofk(this->current_spin); + double* vr_eff1 = this->pot->get_eff_v(this->current_spin); + double* vofk_eff1 = this->pot->get_eff_vofk(this->current_spin); if(XC_Functional::get_ked_flag()) { @@ -126,16 +126,17 @@ void Veff, std::complex>>::contributeH std::vector vofk_eff(4, nullptr); for (int is = 0; is < 4; is++) { - vr_eff[is] = this->pot->get_effective_v(is); + vr_eff[is] = this->pot->get_eff_v(is); if(XC_Functional::get_ked_flag()) { - vofk_eff[is] = this->pot->get_effective_vofk(is); + vofk_eff[is] = this->pot->get_eff_vofk(is); } } if(XC_Functional::get_ked_flag()) { ModuleGint::cal_gint_vl_metagga(vr_eff, vofk_eff, this->hR); - } else + } + else { ModuleGint::cal_gint_vl(vr_eff, this->hR); } @@ -150,4 +151,4 @@ template class Veff>; template class Veff, double>>; template class Veff, std::complex>>; -} \ No newline at end of file +} diff --git a/source/source_lcao/module_rdmft/rdmft.cpp b/source/source_lcao/module_rdmft/rdmft.cpp index 34549fb671..82aeeead51 100644 --- a/source/source_lcao/module_rdmft/rdmft.cpp +++ b/source/source_lcao/module_rdmft/rdmft.cpp @@ -6,11 +6,9 @@ #include "rdmft.h" #include "source_lcao/module_rdmft/rdmft_tools.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/parallel_reduce.h" #include "source_cell/module_symmetry/symmetry.h" - #include #include #include diff --git a/source/source_lcao/module_rdmft/rdmft.h b/source/source_lcao/module_rdmft/rdmft.h index 0e6b532d6e..8e9fb71ced 100644 --- a/source/source_lcao/module_rdmft/rdmft.h +++ b/source/source_lcao/module_rdmft/rdmft.h @@ -6,7 +6,6 @@ #define RDMFT_H #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "source_psi/psi.h" #include "source_base/matrix.h" @@ -26,6 +25,9 @@ // there are some operator reload to print data in different formats #endif +#include "source_estate/elecstate.h" +#include "source_cell/module_neighbor/sltk_grid_driver.h" // use Grid_Driver + #include #include #include diff --git a/source/source_lcao/module_rdmft/rdmft_pot.cpp b/source/source_lcao/module_rdmft/rdmft_pot.cpp index a962c2cac1..9c3d708fa1 100644 --- a/source/source_lcao/module_rdmft/rdmft_pot.cpp +++ b/source/source_lcao/module_rdmft/rdmft_pot.cpp @@ -12,8 +12,8 @@ #include "source_lcao/module_ri/RI_2D_Comm.h" #include "source_lcao/module_operator_lcao/op_exx_lcao.h" #endif -#include "source_lcao/module_operator_lcao/ekinetic_new.h" -#include "source_lcao/module_operator_lcao/nonlocal_new.h" +#include "source_lcao/module_operator_lcao/ekinetic.h" +#include "source_lcao/module_operator_lcao/nonlocal.h" #include "source_lcao/module_operator_lcao/veff_lcao.h" namespace rdmft @@ -51,7 +51,7 @@ void RDMFT::cal_V_TV() { HR_TV->set_zero(); - V_ekinetic_potential = new hamilt::EkineticNew>(hsk_TV, + V_ekinetic_potential = new hamilt::EKinetic>(hsk_TV, kv->kvec_d, HR_TV, this->ucell, @@ -59,7 +59,7 @@ void RDMFT::cal_V_TV() this->gd, two_center_bundle->kinetic_orb.get()); - V_nonlocal = new hamilt::NonlocalNew>(hsk_TV, + V_nonlocal = new hamilt::Nonlocal>(hsk_TV, kv->kvec_d, HR_TV, this->ucell, diff --git a/source/source_lcao/module_rdmft/rdmft_tools.cpp b/source/source_lcao/module_rdmft/rdmft_tools.cpp index f8725b204c..845ffea162 100644 --- a/source/source_lcao/module_rdmft/rdmft_tools.cpp +++ b/source/source_lcao/module_rdmft/rdmft_tools.cpp @@ -3,7 +3,6 @@ // DATE : 2024-03-11 //========================================================== #include "source_lcao/module_rdmft/rdmft_tools.h" -#include "source_pw/module_pwdft/global.h" // used by class Veff_rdmft #include "source_base/tool_title.h" #include "source_base/timer.h" @@ -44,8 +43,8 @@ void HkPsi(const Parallel_Orbitals* ParaV, const int nbands = ParaV->desc_wfc[3]; //because wfc(bands, basis'), H(basis, basis'), we do wfc*H^T(in the perspective of cpp, not in fortran). And get H_wfc(bands, basis) is correct. - pdgemm_( &C_char, &N_char, &nbasis, &nbands, &nbasis, &one_double, &HK, &one_int, &one_int, ParaV->desc, - &wfc, &one_int, &one_int, ParaV->desc_wfc, &zero_double, &H_wfc, &one_int, &one_int, ParaV->desc_wfc ); + ScalapackConnector::gemm( C_char, N_char, nbasis, nbands, nbasis, one_double, &HK, 1, 1, ParaV->desc, + &wfc, 1, 1, ParaV->desc_wfc, zero_double, &H_wfc, 1, 1, ParaV->desc_wfc ); #endif } @@ -71,8 +70,8 @@ void cal_bra_op_ket(const Parallel_Orbitals* ParaV, const int nbasis = ParaV->desc[2]; const int nbands = ParaV->desc_wfc[3]; - pdgemm_( &T_char, &N_char, &nbands, &nbands, &nbasis, &one_double, &wfc, &one_int, &one_int, ParaV->desc_wfc, - &H_wfc, &one_int, &one_int, ParaV->desc_wfc, &zero_double, &Dmn[0], &one_int, &one_int, para_Eij_in.desc ); + ScalapackConnector::gemm( T_char, N_char, nbands, nbands, nbasis, one_double, &wfc, 1, 1, ParaV->desc_wfc, + &H_wfc, 1, 1, ParaV->desc_wfc, zero_double, &Dmn[0], 1, 1, para_Eij_in.desc ); #endif } @@ -186,13 +185,6 @@ double occNum_func(const double eta, const int symbol, const std::string XC_func } - -template class Veff_rdmft; - -template class Veff_rdmft, double>; - -template class Veff_rdmft, std::complex>; - // this part of the code is copying from class Veff // initialize_HR() template @@ -399,6 +391,10 @@ void Veff_rdmft::contributeHR() } } +template class rdmft::Veff_rdmft; + +template class rdmft::Veff_rdmft, double>; +template class rdmft::Veff_rdmft, std::complex>; diff --git a/source/source_lcao/module_rdmft/rdmft_tools.h b/source/source_lcao/module_rdmft/rdmft_tools.h index 91c69fb8c4..d8a34419e7 100644 --- a/source/source_lcao/module_rdmft/rdmft_tools.h +++ b/source/source_lcao/module_rdmft/rdmft_tools.h @@ -5,6 +5,8 @@ #ifndef RDMFT_TOOLS_H #define RDMFT_TOOLS_H +#include "source_cell/klist.h" +#include "source_io/module_parameter/parameter.h" // use PARAM #include "source_psi/psi.h" #include "source_base/matrix.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" @@ -15,7 +17,6 @@ #include "source_base/parallel_2d.h" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_base/parallel_reduce.h" -#include "source_pw/module_pwdft/global.h" #include "source_estate/module_dm/cal_dm_psi.h" #include "source_estate/module_dm/density_matrix.h" @@ -77,8 +78,8 @@ void HkPsi(const Parallel_Orbitals* ParaV, const TK& HK, const TK& wfc, TK& H_wf const int nbands = ParaV->desc_wfc[3]; //because wfc(bands, basis'), H(basis, basis'), we do wfc*H^T(in the perspective of cpp, not in fortran). And get H_wfc(bands, basis) is correct. - pzgemm_( &C_char, &N_char, &nbasis, &nbands, &nbasis, &one_complex, &HK, &one_int, &one_int, ParaV->desc, - &wfc, &one_int, &one_int, ParaV->desc_wfc, &zero_complex, &H_wfc, &one_int, &one_int, ParaV->desc_wfc ); + ScalapackConnector::gemm( C_char, N_char, nbasis, nbands, nbasis, one_complex, &HK, one_int, one_int, ParaV->desc, + &wfc, one_int, one_int, ParaV->desc_wfc, zero_complex, &H_wfc, one_int, one_int, ParaV->desc_wfc ); #endif } @@ -104,8 +105,8 @@ void cal_bra_op_ket(const Parallel_Orbitals* ParaV, const Parallel_2D& para_Eij_ const int nbasis = ParaV->desc[2]; const int nbands = ParaV->desc_wfc[3]; - pzgemm_( &C_char, &N_char, &nbands, &nbands, &nbasis, &one_complex, &wfc, &one_int, &one_int, ParaV->desc_wfc, - &H_wfc, &one_int, &one_int, ParaV->desc_wfc, &zero_complex, &Dmn[0], &one_int, &one_int, para_Eij_in.desc ); + ScalapackConnector::gemm( C_char, N_char, nbands, nbands, nbasis, one_complex, &wfc, one_int, one_int, ParaV->desc_wfc, + &H_wfc, one_int, one_int, ParaV->desc_wfc, zero_complex, &Dmn[0], one_int, one_int, para_Eij_in.desc ); #endif } diff --git a/source/source_lcao/module_rdmft/update_state_rdmft.cpp b/source/source_lcao/module_rdmft/update_state_rdmft.cpp index 7a43c9be91..4f22791cf9 100644 --- a/source/source_lcao/module_rdmft/update_state_rdmft.cpp +++ b/source/source_lcao/module_rdmft/update_state_rdmft.cpp @@ -9,7 +9,7 @@ #include "source_estate/module_dm/density_matrix.h" #include "source_estate/module_charge/symmetry_rho.h" #include "source_lcao/module_gint/gint_interface.h" - +#include "source_hamilt/module_xc/xc_functional.h" namespace rdmft { diff --git a/source/source_lcao/module_ri/ABFs_Construct-PCA.cpp b/source/source_lcao/module_ri/ABFs_Construct-PCA.cpp index b96ad3169e..51019df1b0 100644 --- a/source/source_lcao/module_ri/ABFs_Construct-PCA.cpp +++ b/source/source_lcao/module_ri/ABFs_Construct-PCA.cpp @@ -14,139 +14,209 @@ namespace ABFs_Construct { namespace PCA { - void tensor_dsyev(const char jobz, const char uplo, RI::Tensor & a, double*const w, int & info) +template <> +void tensor_syev(char jobz, char uplo, RI::Tensor& a, double* w, int& info) { - // reference: dsyev in lapack_connector.h (for ModuleBase::matrix) assert(a.shape.size() == 2); assert(a.shape[0] == a.shape[1]); - const int nr = a.shape[0]; - const int nc = a.shape[1]; - double work_tmp=0.0; + const int n = a.shape[0]; + const int lda = a.shape[1]; + + double work_query = 0.0; constexpr int minus_one = -1; - dsyev_(&jobz, &uplo, &nr, a.ptr(), &nc, w, &work_tmp, &minus_one, &info); // get best lwork - const int lwork = work_tmp; + dsyev_(&jobz, &uplo, &n, a.ptr(), &lda, w, &work_query, &minus_one, &info); + + const int lwork = static_cast(work_query); std::vector work(std::max(1, lwork)); - dsyev_(&jobz, &uplo, &nr, a.ptr(), &nc, w, work.data(), &lwork, &info); + + dsyev_(&jobz, &uplo, &n, a.ptr(), &lda, w, work.data(), &lwork, &info); +} + +template <> +void tensor_syev(char jobz, char uplo, RI::Tensor& a, float* w, int& info) +{ + assert(a.shape.size() == 2); + assert(a.shape[0] == a.shape[1]); + + const int n = a.shape[0]; + const int lda = a.shape[1]; + + float work_query = 0.0f; + constexpr int minus_one = -1; + + ssyev_(&jobz, &uplo, &n, a.ptr(), &lda, w, &work_query, &minus_one, &info); + + const int lwork = static_cast(work_query); + std::vector work(std::max(1, lwork)); + + ssyev_(&jobz, &uplo, &n, a.ptr(), &lda, w, work.data(), &lwork, &info); } - RI::Tensor get_sub_matrix( - const RI::Tensor & m, // size: (lcaos, lcaos, abfs) - const std::size_t & T, - const std::size_t & L, - const ModuleBase::Element_Basis_Index::Range & range, - const ModuleBase::Element_Basis_Index::IndexLNM & index ) +template <> +void tensor_syev>(char jobz, char uplo, RI::Tensor>& a, double* w, int& info) +{ + assert(a.shape.size() == 2); + assert(a.shape[0] == a.shape[1]); + + const int n = a.shape[0]; + const int lda = a.shape[1]; + + std::complex work_query; + constexpr int minus_one = -1; + + zheev_(&jobz, &uplo, &n, a.ptr(), &lda, w, &work_query, &minus_one, nullptr, &info); + + const int lwork = static_cast(work_query.real()); + std::vector> work(std::max(1, lwork)); + std::vector rwork(std::max(1, 3 * n - 2)); + + zheev_(&jobz, &uplo, &n, a.ptr(), &lda, w, work.data(), &lwork, rwork.data(), &info); +} + +template <> +void tensor_syev>(char jobz, char uplo, RI::Tensor>& a, float* w, int& info) +{ + assert(a.shape.size() == 2); + assert(a.shape[0] == a.shape[1]); + + const int n = a.shape[0]; + const int lda = a.shape[1]; + + std::complex work_query; + constexpr int minus_one = -1; + + cheev_(&jobz, &uplo, &n, a.ptr(), &lda, w, &work_query, &minus_one, nullptr, &info); + + const int lwork = static_cast(work_query.real()); + std::vector> work(std::max(1, lwork)); + std::vector rwork(std::max(1, 3 * n - 2)); + + cheev_(&jobz, &uplo, &n, a.ptr(), &lda, w, work.data(), &lwork, rwork.data(), &info); +} +// void tensor_dsyev(const char jobz, const char uplo, RI::Tensor & a, double*const w, int & info) +// { +// // reference: dsyev in lapack_connector.h (for ModuleBase::matrix) +// assert(a.shape.size() == 2); +// assert(a.shape[0] == a.shape[1]); +// const int nr = a.shape[0]; +// const int nc = a.shape[1]; + +// double work_tmp=0.0; +// constexpr int minus_one = -1; +// dsyev_(&jobz, &uplo, &nr, a.ptr(), &nc, w, &work_tmp, &minus_one, &info); // get best lwork + +// const int lwork = work_tmp; +// std::vector work(std::max(1, lwork)); +// dsyev_(&jobz, &uplo, &nr, a.ptr(), &nc, w, work.data(), &lwork, &info); +// } + +RI::Tensor get_sub_matrix(const RI::Tensor& m, // size: (lcaos, lcaos, abfs) + const std::size_t& T, + const std::size_t& L, + const ModuleBase::Element_Basis_Index::Range& range, + const ModuleBase::Element_Basis_Index::IndexLNM& index) { ModuleBase::TITLE("ABFs_Construct::PCA::get_sub_matrix"); assert(m.shape.size() == 3); - RI::Tensor m_sub({ m.shape[0], m.shape[1], range[T][L].N }); - for (std::size_t ir=0; ir!=m.shape[0]; ++ir) { - for (std::size_t jr=0; jr!=m.shape[1]; ++jr) { - for (std::size_t N=0; N!=range[T][L].N; ++N) { + RI::Tensor m_sub({m.shape[0], m.shape[1], range[T][L].N}); + for (std::size_t ir = 0; ir != m.shape[0]; ++ir) + { + for (std::size_t jr = 0; jr != m.shape[1]; ++jr) + { + for (std::size_t N = 0; N != range[T][L].N; ++N) + { m_sub(ir, jr, N) = m(ir, jr, index[T][L][N][0]); } } } - m_sub = m_sub.reshape({ m.shape[0] * m.shape[1], range[T][L].N }); + m_sub = m_sub.reshape({m.shape[0] * m.shape[1], range[T][L].N}); return m_sub; } - RI::Tensor get_column_mean0_matrix( const RI::Tensor & m ) +RI::Tensor get_column_mean0_matrix(const RI::Tensor& m) { ModuleBase::TITLE("ABFs_Construct::PCA::get_column_mean0_matrix"); - RI::Tensor m_new( m.shape); - for( std::size_t ic=0; ic!=m.shape[1]; ++ic ) + RI::Tensor m_new(m.shape); + for (std::size_t ic = 0; ic != m.shape[1]; ++ic) { - double sum=0; - for( std::size_t ir=0; ir!=m.shape[0]; ++ir ) { - sum += m(ir,ic); + double sum = 0; + for (std::size_t ir = 0; ir != m.shape[0]; ++ir) + { + sum += m(ir, ic); } - const double mean = sum/m.shape[0]; - for( std::size_t ir=0; ir!=m.shape[0]; ++ir ) { - m_new(ir,ic) = m(ir,ic) - mean; + const double mean = sum / m.shape[0]; + for (std::size_t ir = 0; ir != m.shape[0]; ++ir) + { + m_new(ir, ic) = m(ir, ic) - mean; } } return m_new; } std::vector, RI::Tensor>>> cal_PCA( - const UnitCell &ucell, + const UnitCell& ucell, const LCAO_Orbitals& orb, - const std::vector>> &lcaos, - const std::vector>> &abfs, - const double kmesh_times ) + const std::vector>>& lcaos, + const std::vector>>& abfs, + const double kmesh_times) { ModuleBase::TITLE("ABFs_Construct::PCA::cal_PCA"); - const ModuleBase::Element_Basis_Index::Range - range_lcaos = ModuleBase::Element_Basis_Index::construct_range( lcaos ); - const ModuleBase::Element_Basis_Index::IndexLNM - index_lcaos = ModuleBase::Element_Basis_Index::construct_index( range_lcaos ); - - const ModuleBase::Element_Basis_Index::Range - range_abfs = ModuleBase::Element_Basis_Index::construct_range( abfs ); - const ModuleBase::Element_Basis_Index::IndexLNM - index_abfs = ModuleBase::Element_Basis_Index::construct_index( range_abfs ); - - const int Lmax_bak = GlobalC::exx_info.info_ri.abfs_Lmax; - GlobalC::exx_info.info_ri.abfs_Lmax = std::numeric_limits::min(); - for( std::size_t T=0; T!=abfs.size(); ++T ) { - GlobalC::exx_info.info_ri.abfs_Lmax = std::max( GlobalC::exx_info.info_ri.abfs_Lmax, static_cast(abfs[T].size())-1 ); -} + const ModuleBase::Element_Basis_Index::Range range_lcaos = ModuleBase::Element_Basis_Index::construct_range(lcaos); + const ModuleBase::Element_Basis_Index::IndexLNM index_lcaos + = ModuleBase::Element_Basis_Index::construct_index(range_lcaos); - Matrix_Orbs21 m_abfslcaos_lcaos; - ORB_gaunt_table MGT; - int Lmax; - m_abfslcaos_lcaos.init( 1, ucell , orb, kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_abfslcaos_lcaos.init_radial( abfs, lcaos, lcaos, MGT ); - - std::map>> delta_R; - for( std::size_t it=0; it!=abfs.size(); ++it ) { - delta_R[it][it] = {0.0}; -} - m_abfslcaos_lcaos.init_radial_table(delta_R); + const ModuleBase::Element_Basis_Index::Range range_abfs = ModuleBase::Element_Basis_Index::construct_range(abfs); + const ModuleBase::Element_Basis_Index::IndexLNM index_abfs + = ModuleBase::Element_Basis_Index::construct_index(range_abfs); + + Matrix_Orbs21 m_abfslcaos_lcaos; + m_abfslcaos_lcaos.init(abfs, lcaos, lcaos, ucell, orb, kmesh_times); - GlobalC::exx_info.info_ri.abfs_Lmax = Lmax_bak; + std::map>> delta_R; + for (std::size_t it = 0; it != abfs.size(); ++it) + { delta_R[it][it] = {0.0}; } + m_abfslcaos_lcaos.init_radial_table(delta_R); - std::vector,RI::Tensor>>> eig(abfs.size()); - for( std::size_t T=0; T!=abfs.size(); ++T ) + std::vector, RI::Tensor>>> eig(abfs.size()); + for (std::size_t T = 0; T != abfs.size(); ++T) { - const RI::Tensor A = m_abfslcaos_lcaos.cal_overlap_matrix( - T, + const RI::Tensor A = m_abfslcaos_lcaos.cal_overlap_matrix(T, T, - ModuleBase::Vector3{0,0,0}, - ModuleBase::Vector3{0,0,0}, + ModuleBase::Vector3{0, 0, 0}, + ModuleBase::Vector3{0, 0, 0}, index_abfs, index_lcaos, index_lcaos, Matrix_Orbs21::Matrix_Order::A2BA1); eig[T].resize(abfs[T].size()); - for( std::size_t L=0; L!=abfs[T].size(); ++L ) + for (std::size_t L = 0; L != abfs[T].size(); ++L) { - const RI::Tensor A_sub = get_sub_matrix( A, T, L, range_abfs, index_abfs ); + const RI::Tensor A_sub = get_sub_matrix(A, T, L, range_abfs, index_abfs); RI::Tensor mm = A_sub.transpose() * A_sub; std::vector eig_value(mm.shape[0]); - int info=1; + int info = 1; - tensor_dsyev('V', 'L', mm, eig_value.data(), info); + tensor_syev('V', 'L', mm, eig_value.data(), info); - if( info ) + if (info) { std::cout << std::endl << "info_dsyev = " << info << std::endl; - auto tensor_print = [](RI::Tensor& m, std::ostream& os, const double threshold) - { + auto tensor_print = [](RI::Tensor& m, std::ostream& os, const double threshold) { for (int ir = 0; ir != m.shape[0]; ++ir) { for (int ic = 0; ic != m.shape[1]; ++ic) { - if (std::abs(m(ir, ic)) > threshold) { + if (std::abs(m(ir, ic)) > threshold) + { os << m(ir, ic) << "\t"; - } else { + } + else + { os << 0 << "\t"; } } @@ -155,15 +225,15 @@ namespace PCA os << std::endl; }; tensor_print(mm, GlobalV::ofs_warning, 0.0); - std::cout<<"in file "<<__FILE__<<" line "<<__LINE__<,RI::Tensor>>> cal_PCA( +extern std::vector, RI::Tensor>>> cal_PCA( const UnitCell& ucell, - const LCAO_Orbitals &orb, - const std::vector>> &lcaos, - const std::vector>> &abfs, // abfs must be orthonormal - const double kmesh_times ); -} -} + const LCAO_Orbitals& orb, + const std::vector>>& lcaos, + const std::vector>>& abfs, // abfs must be orthonormal + const double kmesh_times); -#endif // ABFS_CONSTRUCT_PCA_H +template +void tensor_syev(char jobz, char uplo, RI::Tensor& a, RI::Global_Func::To_Real_t* w, int& info); +} // namespace PCA +} // namespace ABFs_Construct + +#endif // ABFS_CONSTRUCT_PCA_H diff --git a/source/source_lcao/module_ri/Exx_LRI.h b/source/source_lcao/module_ri/Exx_LRI.h index 0ca4aff9b6..6f94f1a32b 100644 --- a/source/source_lcao/module_ri/Exx_LRI.h +++ b/source/source_lcao/module_ri/Exx_LRI.h @@ -90,7 +90,6 @@ class Exx_LRI const Exx_Info::Exx_Info_RI &info; MPI_Comm mpi_comm; const K_Vectors *p_kv = nullptr; - ORB_gaunt_table MGT; std::vector orb_cutoff_; std::vector>> lcaos; diff --git a/source/source_lcao/module_ri/Exx_LRI.hpp b/source/source_lcao/module_ri/Exx_LRI.hpp index 5cf3a0072a..ee8c62a718 100644 --- a/source/source_lcao/module_ri/Exx_LRI.hpp +++ b/source/source_lcao/module_ri/Exx_LRI.hpp @@ -39,6 +39,7 @@ void Exx_LRI::init(const MPI_Comm &mpi_comm_in, this->orb_cutoff_ = orb.cutoffs(); this->lcaos = Exx_Abfs::Construct_Orbs::change_orbs( orb, this->info.kmesh_times ); + Exx_Abfs::Construct_Orbs::filter_empty_orbs(this->lcaos); const std::vector>> abfs_same_atom = Exx_Abfs::Construct_Orbs::abfs_same_atom(ucell, orb, this->lcaos, this->info.kmesh_times, this->info.pca_threshold ); @@ -46,21 +47,18 @@ void Exx_LRI::init(const MPI_Comm &mpi_comm_in, { this->abfs = abfs_same_atom;} else { this->abfs = Exx_Abfs::IO::construct_abfs( abfs_same_atom, orb, this->info.files_abfs, this->info.kmesh_times ); } + Exx_Abfs::Construct_Orbs::filter_empty_orbs(this->abfs); Exx_Abfs::Construct_Orbs::print_orbs_size(ucell, this->abfs, GlobalV::ofs_running); - for( size_t T=0; T!=this->abfs.size(); ++T ) - { GlobalC::exx_info.info_ri.abfs_Lmax = std::max( GlobalC::exx_info.info_ri.abfs_Lmax, static_cast(this->abfs[T].size())-1 ); } - this->coulomb_settings = RI_Util::update_coulomb_settings(this->info.coulomb_param, ucell, this->p_kv); - bool init_MGT = true; + std::shared_ptr MGT = std::make_shared(); for(const auto &settings_list : this->coulomb_settings) { this->exx_objs[settings_list.first].abfs_ccp = Conv_Coulomb_Pot_K::cal_orbs_ccp(this->abfs, settings_list.second.second, this->info.ccp_rmesh_times); this->exx_objs[settings_list.first].cv.set_orbitals(ucell, orb, this->lcaos, this->abfs, this->exx_objs[settings_list.first].abfs_ccp, - this->info.kmesh_times, this->MGT, init_MGT, settings_list.second.first ); - init_MGT = false; // only init once + this->info.kmesh_times, MGT, settings_list.second.first ); } ModuleBase::timer::tick("Exx_LRI", "init"); @@ -73,11 +71,6 @@ void Exx_LRI::cal_exx_ions(const UnitCell& ucell, ModuleBase::TITLE("Exx_LRI","cal_exx_ions"); ModuleBase::timer::tick("Exx_LRI", "cal_exx_ions"); - // init_radial_table_ions( cal_atom_centres_core(atom_pairs_core_origin), atom_pairs_core_origin ); - - // this->m_abfsabfs.init_radial_table(Rradial); - // this->m_abfslcaos_lcaos.init_radial_table(Rradial); - std::vector atoms(ucell.nat); for(int iat=0; iat class LCAO_Matrix; @@ -96,7 +98,8 @@ class Exx_LRI_Interface void exx_iter_finish(const K_Vectors& kv, const UnitCell& ucell, hamilt::Hamilt& hamilt, - elecstate::ElecState& elec, + elecstate::ElecState& elec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 Charge_Mixing& chgmix, const double& scf_ene_thr, int& iter, diff --git a/source/source_lcao/module_ri/Exx_LRI_interface.hpp b/source/source_lcao/module_ri/Exx_LRI_interface.hpp index f7807b8ef6..5272cb7b10 100644 --- a/source/source_lcao/module_ri/Exx_LRI_interface.hpp +++ b/source/source_lcao/module_ri/Exx_LRI_interface.hpp @@ -4,46 +4,20 @@ #include "Exx_LRI_interface.h" #include "source_lcao/module_ri/exx_abfs-jle.h" -#include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_operator_lcao/op_exx_lcao.h" #include "source_base/parallel_common.h" #include "source_base/formatter.h" -#include "source_io/csr_reader.h" -#include "source_io/write_HS_sparse.h" +#include "source_io/module_output/csr_reader.h" +#include "source_io/module_hs/write_HS_sparse.h" #include "source_estate/elecstate_lcao.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info +#include "source_io/module_restart/restart.h" #include #include #include -/* -template -void Exx_LRI_Interface::write_Hexxs_cereal(const std::string& file_name) const -{ - ModuleBase::TITLE("Exx_LRI_Interface", "write_Hexxs_cereal"); - ModuleBase::timer::tick("Exx_LRI_Interface", "write_Hexxs_cereal"); - std::ofstream ofs(file_name + "_" + std::to_string(GlobalV::MY_RANK), std::ofstream::binary); - cereal::BinaryOutputArchive oar(ofs); - oar(this->exx_ptr->Hexxs); - ModuleBase::timer::tick("Exx_LRI_Interface", "write_Hexxs_cereal"); -} - -template -void Exx_LRI_Interface::read_Hexxs_cereal(const std::string& file_name) -{ - ModuleBase::TITLE("Exx_LRI_Interface", "read_Hexxs_cereal"); - ModuleBase::timer::tick("Exx_LRI_Interface", "read_Hexxs_cereal"); - const std::string file_name_rank = file_name + "_" + std::to_string(GlobalV::MY_RANK); - std::ifstream ifs(file_name_rank, std::ofstream::binary); - if(!ifs.is_open()) - { ModuleBase::WARNING_QUIT("Exx_LRI_Interface", file_name_rank+" not found."); } - cereal::BinaryInputArchive iar(ifs); - iar(this->exx_ptr->Hexxs); - ModuleBase::timer::tick("Exx_LRI_Interface", "read_Hexxs_cereal"); -} -*/ - template void Exx_LRI_Interface::init(const MPI_Comm &mpi_comm, const UnitCell &ucell, @@ -139,7 +113,7 @@ void Exx_LRI_Interface::exx_before_all_runners( this->symrot_.find_irreducible_sector( ucell.symm, ucell.atoms, ucell.st, RI_Util::get_Born_von_Karmen_cells(period), period, ucell.lat); - this->symrot_.set_abfs_Lmax(GlobalC::exx_info.info_ri.abfs_Lmax); + this->symrot_.set_abfs_Lmax(Exx_Abfs::Construct_Orbs::get_Lmax(this->exx_ptr->abfs)); this->symrot_.cal_Ms(kv, ucell, pv); } } @@ -163,20 +137,7 @@ void Exx_LRI_Interface::exx_beforescf(const int istep, } else { - if (ucell.atoms[0].ncpp.xc_func == "HF" || ucell.atoms[0].ncpp.xc_func == "PBE0" || ucell.atoms[0].ncpp.xc_func == "HSE") - { - XC_Functional::set_xc_type("pbe"); - } - else if (ucell.atoms[0].ncpp.xc_func == "SCAN0") - { - XC_Functional::set_xc_type("scan"); - } - // added by jghan, 2024-07-07 - else if ( ucell.atoms[0].ncpp.xc_func == "MULLER" || ucell.atoms[0].ncpp.xc_func == "POWER" - || ucell.atoms[0].ncpp.xc_func == "WP22" || ucell.atoms[0].ncpp.xc_func == "CWP22" ) - { - XC_Functional::set_xc_type("pbe"); - } + XC_Functional::set_xc_first_loop(ucell); } this->cal_exx_ions(ucell,PARAM.inp.out_ri_cv); @@ -290,14 +251,15 @@ void Exx_LRI_Interface::exx_hamilt2rho(elecstate::ElecState& elec, con template void Exx_LRI_Interface::exx_iter_finish(const K_Vectors& kv, - const UnitCell& ucell, - hamilt::Hamilt& hamilt, - elecstate::ElecState& elec, - Charge_Mixing& chgmix, - const double& scf_ene_thr, - int& iter, - const int istep, - bool& conv_esolver) + const UnitCell& ucell, + hamilt::Hamilt& hamilt, + elecstate::ElecState& elec, + elecstate::DensityMatrix* dm, // mohan add 2025-11-04 + Charge_Mixing& chgmix, + const double& scf_ene_thr, + int& iter, + const int istep, + bool& conv_esolver) { ModuleBase::TITLE("Exx_LRI_Interface","exx_iter_finish"); if (GlobalC::restart.info_save.save_H && (this->two_level_step > 0 || istep > 0) @@ -340,11 +302,12 @@ void Exx_LRI_Interface::exx_iter_finish(const K_Vectors& kv, { chgmix.close_kerker_gg0(); } - this->dm_last_step = dynamic_cast*>(&elec)->get_DM(); + // mohan update 2025-11-04 + this->dm_last_step = dm; conv_esolver = this->exx_after_converge( ucell, hamilt, - *dynamic_cast*>(&elec)->get_DM(), + *dm, kv, PARAM.inp.nspin, iter, diff --git a/source/source_lcao/module_ri/Inverse_Matrix.h b/source/source_lcao/module_ri/Inverse_Matrix.h index 48c65db627..141a09b39e 100644 --- a/source/source_lcao/module_ri/Inverse_Matrix.h +++ b/source/source_lcao/module_ri/Inverse_Matrix.h @@ -5,25 +5,33 @@ #pragma once +#include "ABFs_Construct-PCA.h" + #include #include -template +template class Inverse_Matrix { -public: - enum class Method{potrf}; //, syev}; - void cal_inverse(const Method &method); + public: + enum class Method + { + potrf, + syev + }; + void cal_inverse(const Method& method, const double& threshold_condition_number = 0.); - void input(const RI::Tensor &m); - void input(const std::vector>> &ms); - RI::Tensor output() const; - std::vector>> output(const std::vector &n0, const std::vector &n1) const; + void input(const RI::Tensor& m); + void input(const std::vector>>& ms); + RI::Tensor output() const; + std::vector>> output(const std::vector& n0, + const std::vector& n1) const; -private: - void using_potrf(); - void copy_down_triangle(); - RI::Tensor A; + private: + void using_potrf(); + void using_syev(const double& threshold_condition_number); + void copy_down_triangle(); + RI::Tensor A; }; #include "Inverse_Matrix.hpp" \ No newline at end of file diff --git a/source/source_lcao/module_ri/Inverse_Matrix.hpp b/source/source_lcao/module_ri/Inverse_Matrix.hpp index 20ef034239..b632d1a40c 100644 --- a/source/source_lcao/module_ri/Inverse_Matrix.hpp +++ b/source/source_lcao/module_ri/Inverse_Matrix.hpp @@ -8,152 +8,251 @@ #include "Inverse_Matrix.h" #include "source_base/module_external/lapack_connector.h" +#include "source_hamilt/module_xc/exx_info.h" #include -template -void Inverse_Matrix::cal_inverse( const Method &method ) +template +void Inverse_Matrix::cal_inverse(const Method& method, const double& threshold_condition_number) { - switch(method) - { - case Method::potrf: using_potrf(); break; -// case Method::syev: using_syev(1E-6); break; - } + switch (method) + { + case Method::potrf: + using_potrf(); + break; + case Method::syev: + using_syev(threshold_condition_number); + break; + } } -template +template void Inverse_Matrix::using_potrf() { - int info; - LapackConnector::potrf('U', A.shape[0], A.ptr(), A.shape[0], info); - if(info) - throw std::range_error("info="+std::to_string(info)+"\n"+std::string(__FILE__)+" line "+std::to_string(__LINE__)); + int info; + LapackConnector::potrf('U', A.shape[0], A.ptr(), A.shape[0], info); + if (info) + throw std::range_error("info=" + std::to_string(info) + "\n" + std::string(__FILE__) + " line " + + std::to_string(__LINE__)); - LapackConnector::potri('U', A.shape[0], A.ptr(), A.shape[0], info); - if(info) - throw std::range_error("info="+std::to_string(info)+"\n"+std::string(__FILE__)+" line "+std::to_string(__LINE__)); + LapackConnector::potri('U', A.shape[0], A.ptr(), A.shape[0], info); + if (info) + throw std::range_error("info=" + std::to_string(info) + "\n" + std::string(__FILE__) + " line " + + std::to_string(__LINE__)); - copy_down_triangle(); + copy_down_triangle(); +} + +template +struct InverseMatrixTraits; + +// double +template <> +struct InverseMatrixTraits +{ + using matrix_type = ModuleBase::matrix; + using value_type = double; + static void syev(RI::Tensor& A, value_type* w, int& info) + { + ABFs_Construct::PCA::tensor_syev('V', 'U', A, w, info); + } + static constexpr char gemm_trans = 'T'; +}; + +// complex +template <> +struct InverseMatrixTraits> +{ + using matrix_type = ModuleBase::ComplexMatrix; + using value_type = double; // eigenvalues are always real + static void syev(RI::Tensor>& A, value_type* w, int& info) + { + ABFs_Construct::PCA::tensor_syev('V', 'U', A, w, info); + } + static constexpr char gemm_trans = 'C'; +}; + +// float +template <> +struct InverseMatrixTraits +{ + using matrix_type = ModuleBase::matrix; + using value_type = float; + static void syev(RI::Tensor& A, value_type* w, int& info) + { + ABFs_Construct::PCA::tensor_syev('V', 'U', A, w, info); + } + static constexpr char gemm_trans = 'T'; +}; + +// complex +template <> +struct InverseMatrixTraits> +{ + using matrix_type = ModuleBase::ComplexMatrix; + using value_type = float; + static void syev(RI::Tensor>& A, value_type* w, int& info) + { + ABFs_Construct::PCA::tensor_syev('V', 'U', A, w, info); + } + static constexpr char gemm_trans = 'C'; +}; + +template +inline void Inverse_Matrix::using_syev(const double& threshold_condition_number) +{ + using traits = InverseMatrixTraits; + using val_t = typename traits::value_type; + + int info; + std::vector eigen_value(A.shape[0]); + + traits::syev(A, eigen_value.data(), info); + if (info) + throw std::range_error("info=" + std::to_string(info) + "\n" + std::string(__FILE__) + " line " + + std::to_string(__LINE__)); + + val_t eigen_value_max = 0; + for (const val_t& val: eigen_value) + eigen_value_max = std::max(val, eigen_value_max); + + const double threshold = eigen_value_max * threshold_condition_number; + + typename traits::matrix_type eA(A.shape[0], A.shape[1]); + + int ie = 0; + for (int i = 0; i != A.shape[0]; ++i) + { + if (eigen_value[i] > threshold) + { + BlasConnector::axpy(A.shape[1], + sqrt(1.0 / eigen_value[i]), + A.ptr() + i * A.shape[1], + 1, + eA.c + ie * eA.nc, + 1); + ++ie; + } + } + // std::cout << "No. of singularity: " << A.shape[0] - ie << std::endl; + + BlasConnector::gemm(traits::gemm_trans, 'N', eA.nc, eA.nc, ie, 1, eA.c, eA.nc, eA.c, eA.nc, 0, A.ptr(), A.shape[1]); } /* void Inverse_Matrix::using_syev( const double &threshold_condition_number ) { - std::vector eigen_value(A.nr); - LapackConnector::dsyev('V','U',A,eigen_value.data(),info); - - double eigen_value_max = 0; - for( const double &ie : eigen_value ) - eigen_value_max = std::max( ie, eigen_value_max ); - const double threshold = eigen_value_max * threshold_condition_number; - - ModuleBase::matrix eA( A.nr, A.nc ); - int ie=0; - for( int i=0; i!=A.nr; ++i ) - if( eigen_value[i] > threshold ) - { - BlasConnector::axpy( A.nc, sqrt(1.0/eigen_value[i]), A.c+i*A.nc,1, eA.c+ie*eA.nc,1 ); - ++ie; - } - BlasConnector::gemm( 'T','N', eA.nc,eA.nc,ie, 1, eA.c,eA.nc, eA.c,eA.nc, 0, A.c,A.nc ); + std::vector eigen_value(A.nr); + LapackConnector::dsyev('V','U',A,eigen_value.data(),info); + + double eigen_value_max = 0; + for( const double &ie : eigen_value ) + eigen_value_max = std::max( ie, eigen_value_max ); + const double threshold = eigen_value_max * threshold_condition_number; + + ModuleBase::matrix eA( A.nr, A.nc ); + int ie=0; + for( int i=0; i!=A.nr; ++i ) + if( eigen_value[i] > threshold ) + { + BlasConnector::axpy( A.nc, sqrt(1.0/eigen_value[i]), A.c+i*A.nc,1, eA.c+ie*eA.nc,1 ); + ++ie; + } + BlasConnector::gemm( 'T','N', eA.nc,eA.nc,ie, 1, eA.c,eA.nc, eA.c,eA.nc, 0, A.c,A.nc ); } */ -template -void Inverse_Matrix::input( const RI::Tensor &m ) +template +void Inverse_Matrix::input(const RI::Tensor& m) { - assert(m.shape.size()==2); - assert(m.shape[0]==m.shape[1]); - this->A = m.copy(); + assert(m.shape.size() == 2); + assert(m.shape[0] == m.shape[1]); + this->A = m.copy(); } - -template -void Inverse_Matrix::input(const std::vector>> &ms) +template +void Inverse_Matrix::input(const std::vector>>& ms) { - const size_t N0 = ms.size(); - assert(N0>0); - const size_t N1 = ms[0].size(); - assert(N1>0); - for(size_t Im0=0; Im0 n0(N0); - for(size_t Im0=0; Im0 n1(N1); - for(size_t Im1=0; Im1A = RI::Tensor({n_all, n_all}); - - std::vector n0_partial(N0+1); - std::partial_sum(n0.begin(), n0.end(), n0_partial.begin()+1); - std::vector n1_partial(N1+1); - std::partial_sum(n1.begin(), n1.end(), n1_partial.begin()+1); - - for(size_t Im0=0; Im0 &m_tmp = ms.at(Im0).at(Im1); - for(size_t im0=0; im0A(im0+n0_partial[Im0], im1+n1_partial[Im1]) = m_tmp(im0,im1); - } -} + const size_t N0 = ms.size(); + assert(N0 > 0); + const size_t N1 = ms[0].size(); + assert(N1 > 0); + for (size_t Im0 = 0; Im0 < N0; ++Im0) + assert(ms[Im0].size() == N1); + + for (size_t Im0 = 0; Im0 < N0; ++Im0) + for (size_t Im1 = 0; Im1 < N1; ++Im1) + assert(ms[Im0][Im1].shape.size() == 2); + + std::vector n0(N0); + for (size_t Im0 = 0; Im0 < N0; ++Im0) + n0[Im0] = ms[Im0][0].shape[0]; + std::vector n1(N1); + for (size_t Im1 = 0; Im1 < N1; ++Im1) + n1[Im1] = ms[0][Im1].shape[1]; + + for (size_t Im0 = 0; Im0 < N0; ++Im0) + for (size_t Im1 = 0; Im1 < N1; ++Im1) + assert((ms[Im0][Im1].shape[0] == n0[Im0]) && (ms[Im0][Im1].shape[1] == n1[Im1])); + const size_t n_all = std::accumulate(n0.begin(), n0.end(), 0); + assert(n_all == std::accumulate(n1.begin(), n1.end(), 0)); + this->A = RI::Tensor({n_all, n_all}); -template + std::vector n0_partial(N0 + 1); + std::partial_sum(n0.begin(), n0.end(), n0_partial.begin() + 1); + std::vector n1_partial(N1 + 1); + std::partial_sum(n1.begin(), n1.end(), n1_partial.begin() + 1); + + for (size_t Im0 = 0; Im0 < N0; ++Im0) + for (size_t Im1 = 0; Im1 < N1; ++Im1) + { + const RI::Tensor& m_tmp = ms.at(Im0).at(Im1); + for (size_t im0 = 0; im0 < m_tmp.shape[0]; ++im0) + for (size_t im1 = 0; im1 < m_tmp.shape[1]; ++im1) + this->A(im0 + n0_partial[Im0], im1 + n1_partial[Im1]) = m_tmp(im0, im1); + } +} + +template RI::Tensor Inverse_Matrix::output() const { - return this->A.copy(); + return this->A.copy(); } - -template -std::vector>> -Inverse_Matrix::output(const std::vector &n0, const std::vector &n1) const +template +std::vector>> Inverse_Matrix::output(const std::vector& n0, + const std::vector& n1) const { - assert( std::accumulate(n0.begin(), n0.end(), 0) == this->A.shape[0] ); - assert( std::accumulate(n1.begin(), n1.end(), 0) == this->A.shape[1] ); - - const size_t N0 = n0.size(); - const size_t N1 = n1.size(); - - std::vector n0_partial(N0+1); - std::partial_sum(n0.begin(), n0.end(), n0_partial.begin()+1); - std::vector n1_partial(N1+1); - std::partial_sum(n1.begin(), n1.end(), n1_partial.begin()+1); - - std::vector>> ms(N0, std::vector>(N1)); - for(size_t Im0=0; Im0 &m_tmp = ms[Im0][Im1] = RI::Tensor({n0[Im0], n1[Im1]}); - for(size_t im0=0; im0A(im0+n0_partial[Im0], im1+n1_partial[Im1]); - } - return ms; -} + assert(std::accumulate(n0.begin(), n0.end(), 0) == this->A.shape[0]); + assert(std::accumulate(n1.begin(), n1.end(), 0) == this->A.shape[1]); + + const size_t N0 = n0.size(); + const size_t N1 = n1.size(); + std::vector n0_partial(N0 + 1); + std::partial_sum(n0.begin(), n0.end(), n0_partial.begin() + 1); + std::vector n1_partial(N1 + 1); + std::partial_sum(n1.begin(), n1.end(), n1_partial.begin() + 1); + + std::vector>> ms(N0, std::vector>(N1)); + for (size_t Im0 = 0; Im0 < N0; ++Im0) + for (size_t Im1 = 0; Im1 < N1; ++Im1) + { + RI::Tensor& m_tmp = ms[Im0][Im1] = RI::Tensor({n0[Im0], n1[Im1]}); + for (size_t im0 = 0; im0 < n0[Im0]; ++im0) + for (size_t im1 = 0; im1 < n1[Im1]; ++im1) + m_tmp(im0, im1) = this->A(im0 + n0_partial[Im0], im1 + n1_partial[Im1]); + } + return ms; +} -template +template void Inverse_Matrix::copy_down_triangle() { - for( size_t i0=0; i0>> &abfs_in, const std::vector>> &abfs_ccp_in, const double &kmesh_times, - ORB_gaunt_table& MGT, - const bool& init_MGT, + std::shared_ptr MGT, const bool& init_C); inline std::map>> cal_Vs( diff --git a/source/source_lcao/module_ri/LRI_CV.hpp b/source/source_lcao/module_ri/LRI_CV.hpp index c3a7177147..b07ad881d2 100644 --- a/source/source_lcao/module_ri/LRI_CV.hpp +++ b/source/source_lcao/module_ri/LRI_CV.hpp @@ -13,7 +13,7 @@ #include "../../source_basis/module_ao/element_basis_index-ORB.h" #include "../../source_base/tool_title.h" #include "../../source_base/timer.h" -#include "../../source_pw/module_pwdft/global.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info #include #include @@ -44,8 +44,7 @@ void LRI_CV::set_orbitals( const std::vector>> &abfs_in, const std::vector>> &abfs_ccp_in, const double &kmesh_times, - ORB_gaunt_table& MGT, - const bool& init_MGT, + std::shared_ptr MGT, const bool& init_C) { ModuleBase::TITLE("LRI_CV", "set_orbitals"); @@ -57,9 +56,6 @@ void LRI_CV::set_orbitals( this->lcaos_rcut = Exx_Abfs::Construct_Orbs::get_Rcut(this->lcaos); this->abfs_ccp_rcut = Exx_Abfs::Construct_Orbs::get_Rcut(this->abfs_ccp); - const double lcaos_rmax = Exx_Abfs::Construct_Orbs::get_Rmax(this->lcaos); - const double abfs_ccp_rmax - = Exx_Abfs::Construct_Orbs::get_Rmax(this->abfs_ccp); const ModuleBase::Element_Basis_Index::Range range_lcaos = ModuleBase::Element_Basis_Index::construct_range( lcaos ); @@ -69,25 +65,17 @@ void LRI_CV::set_orbitals( range_abfs = ModuleBase::Element_Basis_Index::construct_range( abfs ); this->index_abfs = ModuleBase::Element_Basis_Index::construct_index( range_abfs ); - int Lmax_v = std::numeric_limits::min(); - this->m_abfs_abfs.init(2, ucell, orb, kmesh_times, lcaos_rmax + abfs_ccp_rmax, Lmax_v); - int Lmax_c = std::numeric_limits::min(); + this->m_abfs_abfs.MGT = this->m_abfslcaos_lcaos.MGT = MGT; + this->m_abfs_abfs.init( + this->abfs_ccp, this->abfs, + ucell, orb, kmesh_times); if (init_C) - this->m_abfslcaos_lcaos.init(1, ucell, orb, kmesh_times, lcaos_rmax, Lmax_c); - int Lmax = std::max(Lmax_v, Lmax_c); + this->m_abfslcaos_lcaos.init( + this->abfs_ccp, this->lcaos, this->lcaos, + ucell, orb, kmesh_times); - if (init_MGT) { - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - } - - this->m_abfs_abfs.init_radial(this->abfs_ccp, this->abfs, MGT); this->m_abfs_abfs.init_radial_table(); if (init_C) { - this->m_abfslcaos_lcaos.init_radial(this->abfs_ccp, - this->lcaos, - this->lcaos, - MGT); this->m_abfslcaos_lcaos.init_radial_table(); } @@ -363,8 +351,12 @@ LRI_CV::DPcal_C_dC( it0, it1, {0,0,0}, {0,0,0}, this->index_abfs, this->index_lcaos, this->index_lcaos, Matrix_Orbs21::Matrix_Order::A1A2B); - const RI::Tensor V = this->DPcal_V( it0, it0, {0,0,0}, {{"writable_Vws",true}}); - const RI::Tensor L = LRI_CV_Tools::cal_I(V); + const RI::Tensor V = this->DPcal_V(it0, it0, {0, 0, 0}, {{"writable_Vws", true}}); + RI::Tensor L; + if (GlobalC::exx_info.info_ri.Cs_inv_thr > 0) + L = LRI_CV_Tools::cal_I(V, Inverse_Matrix::Method::syev, GlobalC::exx_info.info_ri.Cs_inv_thr); + else + L = LRI_CV_Tools::cal_I(V); const RI::Tensor C = RI::Global_Func::convert(0.5) * LRI_CV_Tools::mul1(L,A); // Attention 0.5! if(flags.at("writable_Cws")) @@ -412,7 +404,10 @@ LRI_CV::DPcal_C_dC( {DPcal_V(it1, it0, Rm, flags), DPcal_V(it1, it1, {0,0,0}, {{"writable_Vws",true}})}}; - const std::vector>> + std::vector>> L; + if (GlobalC::exx_info.info_ri.Cs_inv_thr > 0) + L = LRI_CV_Tools::cal_I(V, Inverse_Matrix::Method::syev, GlobalC::exx_info.info_ri.Cs_inv_thr); + else L = LRI_CV_Tools::cal_I(V); const std::vector> C = LRI_CV_Tools::mul2(L,A); diff --git a/source/source_lcao/module_ri/LRI_CV_Tools.h b/source/source_lcao/module_ri/LRI_CV_Tools.h index 21e94cbfa5..a87320a2ea 100644 --- a/source/source_lcao/module_ri/LRI_CV_Tools.h +++ b/source/source_lcao/module_ri/LRI_CV_Tools.h @@ -6,6 +6,7 @@ #ifndef LRI_CV_TOOLS_H #define LRI_CV_TOOLS_H +#include "Inverse_Matrix.h" #include "source_base/abfs-vector3_order.h" #include "source_lcao/module_ri/abfs.h" @@ -19,9 +20,15 @@ namespace LRI_CV_Tools { template -extern RI::Tensor cal_I(const RI::Tensor& m); +extern RI::Tensor cal_I(const RI::Tensor& m, + const typename Inverse_Matrix::Method method + = Inverse_Matrix::Method::potrf, + const double& threshold_condition_number = 0.); template -extern std::vector>> cal_I(const std::vector>>& ms); +extern std::vector>> cal_I(const std::vector>>& ms, + const typename Inverse_Matrix::Method method + = Inverse_Matrix::Method::potrf, + const double& threshold_condition_number = 0.); template inline RI::Tensor transform_Rm(const RI::Tensor& V); diff --git a/source/source_lcao/module_ri/LRI_CV_Tools.hpp b/source/source_lcao/module_ri/LRI_CV_Tools.hpp index 2f7951d94e..110db1bf80 100644 --- a/source/source_lcao/module_ri/LRI_CV_Tools.hpp +++ b/source/source_lcao/module_ri/LRI_CV_Tools.hpp @@ -13,24 +13,27 @@ #include #include -#include "../../source_pw/module_pwdft/global.h" template -RI::Tensor LRI_CV_Tools::cal_I(const RI::Tensor& m) { +RI::Tensor LRI_CV_Tools::cal_I(const RI::Tensor& m, + const typename Inverse_Matrix::Method method, + const double& threshold_condition_number) +{ Inverse_Matrix I; I.input(m); - I.cal_inverse(Inverse_Matrix::Method::potrf); + I.cal_inverse(method, threshold_condition_number); return I.output(); } template -std::vector>> - LRI_CV_Tools::cal_I(const std::vector>>& ms) { +std::vector>> LRI_CV_Tools::cal_I(const std::vector>>& ms, + const typename Inverse_Matrix::Method method, + const double& threshold_condition_number) +{ Inverse_Matrix I; I.input(ms); - I.cal_inverse(Inverse_Matrix::Method::potrf); - return I.output({ms[0][0].shape[0], ms[1][0].shape[0]}, - {ms[0][0].shape[1], ms[0][1].shape[1]}); + I.cal_inverse(method, threshold_condition_number); + return I.output({ms[0][0].shape[0], ms[1][0].shape[0]}, {ms[0][0].shape[1], ms[0][1].shape[1]}); } template diff --git a/source/source_lcao/module_ri/Matrix_Orbs11.cpp b/source/source_lcao/module_ri/Matrix_Orbs11.cpp index 021eb6e5b0..7f3a5ad63a 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs11.cpp +++ b/source/source_lcao/module_ri/Matrix_Orbs11.cpp @@ -5,63 +5,50 @@ #include "Matrix_Orbs11.h" +#include "exx_abfs-construct_orbs.h" #include "source_base/timer.h" #include "source_base/tool_title.h" -#include "source_pw/module_pwdft/global.h" -void Matrix_Orbs11::init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, - const double rmax, - int& Lmax) +void Matrix_Orbs11::init( + const std::vector>>& orb_A, + const std::vector>>& orb_B, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times) { ModuleBase::TITLE("Matrix_Orbs11", "init"); ModuleBase::timer::tick("Matrix_Orbs11", "init"); - int Lmax_used; this->lat0 = &ucell.lat0; - const int ntype = orb.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; - for (int it = 0; it < ntype; it++) - { - lmax_orb = std::max(lmax_orb, orb.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); - } + + const int Lmax = std::max({ Exx_Abfs::Construct_Orbs::get_Lmax(orb_A), Exx_Abfs::Construct_Orbs::get_Lmax(orb_B) }); + const int Lmax_used = Exx_Abfs::Construct_Orbs::get_Lmax(orb_A) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B); + + //========================================= + // (3) make Gaunt coefficients table + //========================================= + if(!this->MGT) + { this->MGT = std::make_shared(); } + if(this->MGT->get_Lmax_Gaunt_CH() < Lmax) + { this->MGT->init_Gaunt_CH(Lmax); } + if(this->MGT->get_Lmax_Gaunt_Coefficients() < Lmax) + { this->MGT->init_Gaunt(Lmax); } + const double dr = orb.get_dR(); const double dk = orb.get_dk(); const int kmesh = orb.get_kmesh() * kmesh_times + 1; - int Rmesh = static_cast(rmax / dr) + 4; + const double rmax + = Exx_Abfs::Construct_Orbs::get_Rmax(orb_A) + + Exx_Abfs::Construct_Orbs::get_Rmax(orb_B); + int Rmesh = static_cast(rmax / dr) + 4; // extend Rcut, keep dR Rmesh += 1 - Rmesh % 2; - - Center2_Orb::init_Table_Spherical_Bessel(2, - mode, - Lmax_used, - Lmax, - GlobalC::exx_info.info_ri.abfs_Lmax, - lmax_orb, - lmax_beta, + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, Rmesh, psb_); - //========================================= - // (3) make Gaunt coefficients table - //========================================= - // this->MGT.init_Gaunt_CH(Lmax); - // this->MGT.init_Gaunt(Lmax); - - ModuleBase::timer::tick("Matrix_Orbs11", "init"); -} - -void Matrix_Orbs11::init_radial(const std::vector>>& orb_A, - const std::vector>>& orb_B, - const ORB_gaunt_table& MGT) -{ - ModuleBase::TITLE("Matrix_Orbs11", "init_radial"); - ModuleBase::timer::tick("Matrix_Orbs11", "init_radial"); for (size_t TA = 0; TA != orb_A.size(); ++TA) { for (size_t TB = 0; TB != orb_B.size(); ++TB) { for (int LA = 0; LA != orb_A[TA].size(); ++LA) { @@ -70,17 +57,14 @@ void Matrix_Orbs11::init_radial(const std::vectorMGT))); + }}}}}} + + ModuleBase::timer::tick("Matrix_Orbs11", "init"); } -void Matrix_Orbs11::init_radial(const LCAO_Orbitals& orb_A, const LCAO_Orbitals& orb_B, const ORB_gaunt_table& MGT) +/* +void Matrix_Orbs11::init_radial(const LCAO_Orbitals& orb_A, const LCAO_Orbitals& orb_B) { ModuleBase::TITLE("Matrix_Orbs11", "init_radial"); ModuleBase::timer::tick("Matrix_Orbs11", "init_radial"); @@ -95,7 +79,7 @@ void Matrix_Orbs11::init_radial(const LCAO_Orbitals& orb_A, const LCAO_Orbitals& Center2_Orb::Orb11(orb_A.Phi[TA].PhiLN(LA, NA), orb_B.Phi[TB].PhiLN(LB, NB), psb_, - MGT))); + *this->MGT))); } } } @@ -104,6 +88,7 @@ void Matrix_Orbs11::init_radial(const LCAO_Orbitals& orb_A, const LCAO_Orbitals& } ModuleBase::timer::tick("Matrix_Orbs11", "init_radial"); } +*/ void Matrix_Orbs11::init_radial_table() { diff --git a/source/source_lcao/module_ri/Matrix_Orbs11.h b/source/source_lcao/module_ri/Matrix_Orbs11.h index 04b1bd8600..7b520fe0f6 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs11.h +++ b/source/source_lcao/module_ri/Matrix_Orbs11.h @@ -21,20 +21,12 @@ class Matrix_Orbs11 { public: - // mode: - // 1: - // 2: - void init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, // extend Kcut, keep dK - const double rmax, - int& Lmax); - - void init_radial(const std::vector>>& orb_A, - const std::vector>>& orb_B, - const ORB_gaunt_table& MGT); - void init_radial(const LCAO_Orbitals& orb_A, const LCAO_Orbitals& orb_B, const ORB_gaunt_table& MGT); + void init( + const std::vector>>& orb_A, + const std::vector>>& orb_B, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times); // extend Kcut, keep dK void init_radial_table(); void init_radial_table(const std::map>>& Rs); // unit: ucell.lat0 @@ -68,6 +60,8 @@ class Matrix_Orbs11 const UnitCell &ucell, const ModuleBase::Element_Basis_Index::IndexLNM& index_r, const ModuleBase::Element_Basis_Index::IndexLNM& index_c) const; + + std::shared_ptr MGT; private: ModuleBase::Sph_Bessel_Recursive::D2* psb_ = nullptr; diff --git a/source/source_lcao/module_ri/Matrix_Orbs11.hpp b/source/source_lcao/module_ri/Matrix_Orbs11.hpp index 0d5ab1ba91..7b139203a1 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs11.hpp +++ b/source/source_lcao/module_ri/Matrix_Orbs11.hpp @@ -8,7 +8,6 @@ #include "Matrix_Orbs11.h" #include "RI_Util.h" -#include "source_pw/module_pwdft/global.h" template RI::Tensor Matrix_Orbs11::cal_overlap_matrix( diff --git a/source/source_lcao/module_ri/Matrix_Orbs21.cpp b/source/source_lcao/module_ri/Matrix_Orbs21.cpp index 170dc9b548..1bbade7e4c 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs21.cpp +++ b/source/source_lcao/module_ri/Matrix_Orbs21.cpp @@ -5,104 +5,78 @@ #include "Matrix_Orbs21.h" +#include "exx_abfs-construct_orbs.h" #include "source_base/timer.h" #include "source_base/tool_title.h" -#include "source_pw/module_pwdft/global.h" -void Matrix_Orbs21::init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, - const double rmax, - int& Lmax) +void Matrix_Orbs21::init( + const std::vector>>& orb_A1, + const std::vector>>& orb_A2, + const std::vector>>& orb_B, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times) { ModuleBase::TITLE("Matrix_Orbs21", "init"); ModuleBase::timer::tick("Matrix_Orbs21", "init"); - int Lmax_used; + this->lat0 = &ucell.lat0; - const int ntype = orb.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; - this->lat0 = &ucell.lat0; - for (int it = 0; it < ntype; it++) - { - lmax_orb = std::max(lmax_orb, orb.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); - } + const int Lmax = std::max({ + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A2), + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B) }); + const int Lmax_used = Exx_Abfs::Construct_Orbs::get_Lmax(orb_A1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A2) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B); + + //========================================= + // (3) make Gaunt coefficients table + //========================================= + if(!this->MGT) + { this->MGT = std::make_shared(); } + if(this->MGT->get_Lmax_Gaunt_CH() < Lmax) + { this->MGT->init_Gaunt_CH(Lmax); } + if(this->MGT->get_Lmax_Gaunt_Coefficients() < Lmax) + { this->MGT->init_Gaunt(Lmax); } + const double dr = orb.get_dR(); const double dk = orb.get_dk(); const int kmesh = orb.get_kmesh() * kmesh_times + 1; - int Rmesh = static_cast(rmax / dr) + 4; + const double rmax + = std::min({Exx_Abfs::Construct_Orbs::get_Rmax(orb_A1), Exx_Abfs::Construct_Orbs::get_Rmax(orb_A2)}) + + Exx_Abfs::Construct_Orbs::get_Rmax(orb_B); + int Rmesh = static_cast(rmax / dr) + 4; // extend Rcut, keep dR Rmesh += 1 - Rmesh % 2; - - Center2_Orb::init_Table_Spherical_Bessel(3, - mode, - Lmax_used, - Lmax, - GlobalC::exx_info.info_ri.abfs_Lmax, - lmax_orb, - lmax_beta, + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, Rmesh, psb_); - //========================================= - // (3) make Gaunt coefficients table - //========================================= - // this->MGT.init_Gaunt_CH(2 * Lmax + 1); // why +1 - // this->MGT.init_Gaunt(2 * Lmax + 1); - Lmax = 2 * Lmax + 1; - - ModuleBase::timer::tick("Matrix_Orbs21", "init"); -} - -void Matrix_Orbs21::init_radial(const std::vector>>& orb_A1, - const std::vector>>& orb_A2, - const std::vector>>& orb_B, - const ORB_gaunt_table& MGT) -{ - ModuleBase::TITLE("Matrix_Orbs21", "init_radial"); - ModuleBase::timer::tick("Matrix_Orbs21", "init_radial"); assert(orb_A1.size() == orb_A2.size()); - for (size_t TA = 0; TA != orb_A1.size(); ++TA) - { - for (size_t TB = 0; TB != orb_B.size(); ++TB) - { - for (int LA1 = 0; LA1 != orb_A1[TA].size(); ++LA1) - { - for (size_t NA1 = 0; NA1 != orb_A1[TA][LA1].size(); ++NA1) - { - for (int LA2 = 0; LA2 != orb_A2[TA].size(); ++LA2) - { - for (size_t NA2 = 0; NA2 != orb_A2[TA][LA2].size(); ++NA2) - { - for (int LB = 0; LB != orb_B[TB].size(); ++LB) - { - for (size_t NB = 0; NB != orb_B[TB][LB].size(); ++NB) - { + for (size_t TA = 0; TA != orb_A1.size(); ++TA) { + for (size_t TB = 0; TB != orb_B.size(); ++TB) { + for (int LA1 = 0; LA1 != orb_A1[TA].size(); ++LA1) { + for (size_t NA1 = 0; NA1 != orb_A1[TA][LA1].size(); ++NA1) { + for (int LA2 = 0; LA2 != orb_A2[TA].size(); ++LA2) { + for (size_t NA2 = 0; NA2 != orb_A2[TA][LA2].size(); ++NA2) { + for (int LB = 0; LB != orb_B[TB].size(); ++LB) { + for (size_t NB = 0; NB != orb_B[TB][LB].size(); ++NB) { center2_orb21_s[TA][TB][LA1][NA1][LA2][NA2][LB].insert( - std::make_pair(NB, - Center2_Orb::Orb21(orb_A1[TA][LA1][NA1], - orb_A2[TA][LA2][NA2], - orb_B[TB][LB][NB], - psb_, - MGT))); - } - } - } - } - } - } - } - } - ModuleBase::timer::tick("Matrix_Orbs21", "init_radial"); + std::make_pair( + NB, + Center2_Orb::Orb21( + orb_A1[TA][LA1][NA1], + orb_A2[TA][LA2][NA2], + orb_B[TB][LB][NB], + psb_, + *this->MGT))); + }}}}}}}} + ModuleBase::timer::tick("Matrix_Orbs21", "init"); } +/* void Matrix_Orbs21::init_radial(const std::vector>>& orb_A1, const LCAO_Orbitals& orb_A2, - const LCAO_Orbitals& orb_B, - const ORB_gaunt_table& MGT) + const LCAO_Orbitals& orb_B) { ModuleBase::TITLE("Matrix_Orbs21", "init_radial"); ModuleBase::timer::tick("Matrix_Orbs21", "init_radial"); @@ -129,7 +103,7 @@ void Matrix_Orbs21::init_radial(const std::vectorMGT))); } } } @@ -140,6 +114,7 @@ void Matrix_Orbs21::init_radial(const std::vector - void init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, // extend Kcut, keep dK - const double rmax, - int& Lmax); // extend Rcut, keep dR - - void init_radial(const std::vector>>& orb_A1, - const std::vector>>& orb_A2, - const std::vector>>& orb_B, - const ORB_gaunt_table& MGT); - void init_radial(const std::vector>>& orb_A1, - const LCAO_Orbitals& orb_A2, - const LCAO_Orbitals& orb_B, - const ORB_gaunt_table& MGT); + void init( + const std::vector>>& orb_A1, + const std::vector>>& orb_A2, + const std::vector>>& orb_B, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times); // extend Kcut, keep dK void init_radial_table(); void init_radial_table(const std::map>>& Rs); // unit: ucell.lat0 @@ -77,6 +67,8 @@ class Matrix_Orbs21 const ModuleBase::Element_Basis_Index::IndexLNM& index_A1, const ModuleBase::Element_Basis_Index::IndexLNM& index_A2, const ModuleBase::Element_Basis_Index::IndexLNM& index_B) const; + + std::shared_ptr MGT; private: ModuleBase::Sph_Bessel_Recursive::D2* psb_ = nullptr; diff --git a/source/source_lcao/module_ri/Matrix_Orbs21.hpp b/source/source_lcao/module_ri/Matrix_Orbs21.hpp index 28766ad2f2..af92d7aedd 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs21.hpp +++ b/source/source_lcao/module_ri/Matrix_Orbs21.hpp @@ -8,7 +8,6 @@ #include "Matrix_Orbs21.h" #include "RI_Util.h" -#include "source_pw/module_pwdft/global.h" template RI::Tensor Matrix_Orbs21::cal_overlap_matrix( diff --git a/source/source_lcao/module_ri/Matrix_Orbs22.cpp b/source/source_lcao/module_ri/Matrix_Orbs22.cpp index 01d0330406..23b782a781 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs22.cpp +++ b/source/source_lcao/module_ri/Matrix_Orbs22.cpp @@ -5,94 +5,85 @@ #include "Matrix_Orbs22.h" +#include "exx_abfs-construct_orbs.h" #include "source_base/timer.h" #include "source_base/tool_title.h" -#include "source_pw/module_pwdft/global.h" -void Matrix_Orbs22::init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, - const double rmax, - int& Lmax) +void Matrix_Orbs22::init( + const std::vector>>& orb_A1, + const std::vector>>& orb_A2, + const std::vector>>& orb_B1, + const std::vector>>& orb_B2, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times) { ModuleBase::TITLE("Matrix_Orbs22", "init"); ModuleBase::timer::tick("Matrix_Orbs22", "init"); - int Lmax_used; - this->lat0 = &ucell.lat0; - const int ntype = orb.get_ntype(); - int lmax_orb = -1, lmax_beta = -1; - for (int it = 0; it < ntype; it++) - { - lmax_orb = std::max(lmax_orb, orb.Phi[it].getLmax()); - lmax_beta = std::max(lmax_beta, ucell.infoNL.Beta[it].getLmax()); - } + this->lat0 = &ucell.lat0; + + const int Lmax = std::max({ + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A2), + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B2) }); + const int Lmax_used = Exx_Abfs::Construct_Orbs::get_Lmax(orb_A1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_A2) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B1) + Exx_Abfs::Construct_Orbs::get_Lmax(orb_B2); + + //========================================= + // (3) make Gaunt coefficients table + //========================================= + if(!this->MGT) + { this->MGT = std::make_shared(); } + if(this->MGT->get_Lmax_Gaunt_CH() < Lmax) + { this->MGT->init_Gaunt_CH(Lmax); } + if(this->MGT->get_Lmax_Gaunt_Coefficients() < Lmax) + { this->MGT->init_Gaunt(Lmax); } + const double dr = orb.get_dR(); const double dk = orb.get_dk(); const int kmesh = orb.get_kmesh() * kmesh_times + 1; - int Rmesh = static_cast(rmax / dr) + 4; + const double rmax + = std::min({Exx_Abfs::Construct_Orbs::get_Rmax(orb_A1), Exx_Abfs::Construct_Orbs::get_Rmax(orb_A2)}) + + std::min({Exx_Abfs::Construct_Orbs::get_Rmax(orb_B1), Exx_Abfs::Construct_Orbs::get_Rmax(orb_B2)}); + int Rmesh = static_cast(rmax / dr) + 4; // extend Rcut, keep dR Rmesh += 1 - Rmesh % 2; - - Center2_Orb::init_Table_Spherical_Bessel(4, - mode, - Lmax_used, - Lmax, - GlobalC::exx_info.info_ri.abfs_Lmax, - lmax_orb, - lmax_beta, + Center2_Orb::init_Table_Spherical_Bessel(Lmax_used, dr, dk, kmesh, Rmesh, psb_); - //========================================= - // (3) make Gaunt coefficients table - //========================================= - // this->MGT.init_Gaunt_CH(2 * Lmax + 1); // why +1 - // this->MGT.init_Gaunt(2 * Lmax + 1); - Lmax = 2 * Lmax + 1; - - ModuleBase::timer::tick("Matrix_Orbs22", "init"); -} - -void Matrix_Orbs22::init_radial(const std::vector>>& orb_A1, - const std::vector>>& orb_A2, - const std::vector>>& orb_B1, - const std::vector>>& orb_B2, - const ORB_gaunt_table& MGT) -{ - ModuleBase::TITLE("Matrix_Orbs22", "init_radial"); - ModuleBase::timer::tick("Matrix_Orbs22", "init_radial"); assert(orb_A1.size() == orb_A2.size()); assert(orb_B1.size() == orb_B2.size()); - for (size_t TA = 0; TA != orb_A1.size(); ++TA) - for (size_t TB = 0; TB != orb_B1.size(); ++TB) - for (int LA1 = 0; LA1 != orb_A1[TA].size(); ++LA1) - for (size_t NA1 = 0; NA1 != orb_A1[TA][LA1].size(); ++NA1) - for (int LA2 = 0; LA2 != orb_A2[TA].size(); ++LA2) - for (size_t NA2 = 0; NA2 != orb_A2[TA][LA2].size(); ++NA2) - for (int LB1 = 0; LB1 != orb_B1[TB].size(); ++LB1) - for (size_t NB1 = 0; NB1 != orb_B1[TB][LB1].size(); ++NB1) - for (int LB2 = 0; LB2 != orb_B2[TB].size(); ++LB2) - for (size_t NB2 = 0; NB2 != orb_B2[TB][LB2].size(); ++NB2) + for (size_t TA = 0; TA != orb_A1.size(); ++TA) { + for (size_t TB = 0; TB != orb_B1.size(); ++TB) { + for (int LA1 = 0; LA1 != orb_A1[TA].size(); ++LA1) { + for (size_t NA1 = 0; NA1 != orb_A1[TA][LA1].size(); ++NA1) { + for (int LA2 = 0; LA2 != orb_A2[TA].size(); ++LA2) { + for (size_t NA2 = 0; NA2 != orb_A2[TA][LA2].size(); ++NA2) { + for (int LB1 = 0; LB1 != orb_B1[TB].size(); ++LB1) { + for (size_t NB1 = 0; NB1 != orb_B1[TB][LB1].size(); ++NB1) { + for (int LB2 = 0; LB2 != orb_B2[TB].size(); ++LB2) { + for (size_t NB2 = 0; NB2 != orb_B2[TB][LB2].size(); ++NB2) { center2_orb22_s[TA][TB][LA1][NA1][LA2][NA2][LB1][NB1][LB2].insert( - std::make_pair(NB2, - Center2_Orb::Orb22(orb_A1[TA][LA1][NA1], - orb_A2[TA][LA2][NA2], - orb_B1[TB][LB1][NB1], - orb_B2[TB][LB2][NB2], - psb_, - MGT))); - ModuleBase::timer::tick("Matrix_Orbs22", "init_radial"); + std::make_pair( + NB2, + Center2_Orb::Orb22( + orb_A1[TA][LA1][NA1], + orb_A2[TA][LA2][NA2], + orb_B1[TB][LB1][NB1], + orb_B2[TB][LB2][NB2], + psb_, + *this->MGT))); + }}}}}}}}}} + ModuleBase::timer::tick("Matrix_Orbs22", "init"); } +/* void Matrix_Orbs22::init_radial(const LCAO_Orbitals& orb_A1, const LCAO_Orbitals& orb_A2, const LCAO_Orbitals& orb_B1, - const LCAO_Orbitals& orb_B2, - const ORB_gaunt_table& MGT) + const LCAO_Orbitals& orb_B2) { ModuleBase::TITLE("Matrix_Orbs22", "init_radial"); ModuleBase::timer::tick("Matrix_Orbs22", "init_radial"); @@ -115,9 +106,10 @@ void Matrix_Orbs22::init_radial(const LCAO_Orbitals& orb_A1, orb_B1.Phi[TB].PhiLN(LB1, NB1), orb_B2.Phi[TB].PhiLN(LB2, NB2), psb_, - MGT))); + *this->MGT))); ModuleBase::timer::tick("Matrix_Orbs22", "init_radial"); } +*/ void Matrix_Orbs22::init_radial_table() { diff --git a/source/source_lcao/module_ri/Matrix_Orbs22.h b/source/source_lcao/module_ri/Matrix_Orbs22.h index a7db572176..7451f80ed6 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs22.h +++ b/source/source_lcao/module_ri/Matrix_Orbs22.h @@ -21,25 +21,14 @@ class Matrix_Orbs22 { public: - // mode: - // 1: - void init(const int mode, - const UnitCell& ucell, - const LCAO_Orbitals& orb, - const double kmesh_times, // extend Kcut, keep dK - const double rmax, - int& Lmax); // extend Rcut, keep dR - - void init_radial(const std::vector>>& orb_A1, - const std::vector>>& orb_A2, - const std::vector>>& orb_B1, - const std::vector>>& , - const ORB_gaunt_table& MGT); - void init_radial(const LCAO_Orbitals& orb_A1, - const LCAO_Orbitals& orb_A2, - const LCAO_Orbitals& orb_B1, - const LCAO_Orbitals& orb_B2, - const ORB_gaunt_table& MGT); + void init( + const std::vector>>& orb_A1, + const std::vector>>& orb_A2, + const std::vector>>& orb_B1, + const std::vector>>& orb_B2, + const UnitCell& ucell, + const LCAO_Orbitals& orb, + const double kmesh_times); // extend Kcut, keep dK void init_radial_table(); void init_radial_table(const std::map>>& Rs); // unit: ucell.lat0 @@ -101,6 +90,8 @@ class Matrix_Orbs22 const ModuleBase::Element_Basis_Index::IndexLNM& index_A2, const ModuleBase::Element_Basis_Index::IndexLNM& index_B1, const ModuleBase::Element_Basis_Index::IndexLNM& index_B2) const; + + std::shared_ptr MGT; private: ModuleBase::Sph_Bessel_Recursive::D2* psb_ = nullptr; diff --git a/source/source_lcao/module_ri/Matrix_Orbs22.hpp b/source/source_lcao/module_ri/Matrix_Orbs22.hpp index 502597ba46..ed4b58d83f 100644 --- a/source/source_lcao/module_ri/Matrix_Orbs22.hpp +++ b/source/source_lcao/module_ri/Matrix_Orbs22.hpp @@ -8,7 +8,6 @@ #include "Matrix_Orbs22.h" #include "RI_Util.h" -#include "source_pw/module_pwdft/global.h" template RI::Tensor Matrix_Orbs22::cal_overlap_matrix( diff --git a/source/source_lcao/module_ri/RI_2D_Comm.cpp b/source/source_lcao/module_ri/RI_2D_Comm.cpp index fdb3d52a8d..90c016f51d 100644 --- a/source/source_lcao/module_ri/RI_2D_Comm.cpp +++ b/source/source_lcao/module_ri/RI_2D_Comm.cpp @@ -1,11 +1,10 @@ //======================= // AUTHOR : Peize Lin -#include "source_io/module_parameter/parameter.h" // DATE : 2022-08-17 //======================= +#include "source_io/module_parameter/parameter.h" #include "RI_2D_Comm.h" -#include "source_pw/module_pwdft/global.h" #include "source_cell/klist.h" #include diff --git a/source/source_lcao/module_ri/RI_2D_Comm.h b/source/source_lcao/module_ri/RI_2D_Comm.h index 63cbbe8e68..9b90c8a3ae 100644 --- a/source/source_lcao/module_ri/RI_2D_Comm.h +++ b/source/source_lcao/module_ri/RI_2D_Comm.h @@ -51,6 +51,18 @@ namespace RI_2D_Comm const std::vector>>>& Hs, const Parallel_Orbitals& pv, TK* hk); + + + template + extern void add_Hexx_td( + const UnitCell& ucell, + const K_Vectors& kv, + const int ik, + const double alpha, + const std::vector>>>& Hs, + const Parallel_Orbitals& pv, + const ModuleBase::Vector3& At, + TK* hk); template extern void add_HexxR( diff --git a/source/source_lcao/module_ri/RI_2D_Comm.hpp b/source/source_lcao/module_ri/RI_2D_Comm.hpp index 78eedf56c4..dfd1162104 100644 --- a/source/source_lcao/module_ri/RI_2D_Comm.hpp +++ b/source/source_lcao/module_ri/RI_2D_Comm.hpp @@ -8,7 +8,6 @@ #include "RI_2D_Comm.h" #include "RI_Util.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/tool_title.h" #include "source_base/timer.h" #include "source_lcao/LCAO_domain.h" @@ -169,7 +168,70 @@ void RI_2D_Comm::add_Hexx( } ModuleBase::timer::tick("RI_2D_Comm", "add_Hexx"); } +template +void RI_2D_Comm::add_Hexx_td( + const UnitCell &ucell, + const K_Vectors& kv, + const int ik, + const double alpha, + const std::vector>>>& Hs, + const Parallel_Orbitals& pv, + const ModuleBase::Vector3& At, + TK* hk) +{ + ModuleBase::TITLE("RI_2D_Comm", "add_Hexx_td"); + ModuleBase::timer::tick("RI_2D_Comm", "add_Hexx_td"); + + const std::map> is_list = {{1, {0}}, {2, {kv.isk[ik]}}, {4, {0, 1, 2, 3}}}; + for (const int is_b: is_list.at(PARAM.inp.nspin)) + { + int is0_b, is1_b; + std::tie(is0_b, is1_b) = RI_2D_Comm::split_is_block(is_b); + for (const auto& Hs_tmpA: Hs[is_b]) + { + const TA& iat0 = Hs_tmpA.first; + for (const auto& Hs_tmpB: Hs_tmpA.second) + { + const TA& iat1 = Hs_tmpB.first.first; + const TC& cell1 = Hs_tmpB.first.second; + const ModuleBase::Vector3 r_index = RI_Util::array3_to_Vector3(cell1); + // cal tddft phase for hybrid gauge + ModuleBase::Vector3 dtau = ucell.cal_dtau(iat0, iat1, r_index); + const double arg_td = At * dtau * ucell.lat0; + + const std::complex frac + = alpha + * std::exp(ModuleBase::IMAG_UNIT + * ((ModuleBase::TWO_PI * kv.kvec_c[ik] * (r_index * ucell.latvec)) + arg_td)); + const RI::Tensor& H = Hs_tmpB.second; + for (size_t iw0_b = 0; iw0_b < H.shape[0]; ++iw0_b) + { + const int iwt0 = RI_2D_Comm::get_iwt(ucell, iat0, iw0_b, is0_b); + if (pv.global2local_row(iwt0) < 0) + { + continue; + } + for (size_t iw1_b = 0; iw1_b < H.shape[1]; ++iw1_b) + { + const int iwt1 = RI_2D_Comm::get_iwt(ucell, iat1, iw1_b, is1_b); + if (pv.global2local_col(iwt1) < 0) + { + continue; + } + LCAO_domain::set_mat2d(iwt0, + iwt1, + RI::Global_Func::convert(H(iw0_b, iw1_b)) + * RI::Global_Func::convert(frac), + pv, + hk); + } + } + } + } + } + ModuleBase::timer::tick("RI_2D_Comm", "add_Hexx_td"); +} std::tuple RI_2D_Comm::get_iat_iw_is_block(const UnitCell& ucell,const int& iwt) { @@ -284,4 +346,4 @@ void RI_2D_Comm::add_HexxR( ModuleBase::timer::tick("RI_2D_Comm", "add_HexxR"); } -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_ri/RI_Util.hpp b/source/source_lcao/module_ri/RI_Util.hpp index 3ff9cb4cf5..7e0fd61d6c 100644 --- a/source/source_lcao/module_ri/RI_Util.hpp +++ b/source/source_lcao/module_ri/RI_Util.hpp @@ -6,9 +6,9 @@ #ifndef RI_UTIL_HPP #define RI_UTIL_HPP -#include "RI_Util.h" -#include "source_pw/module_pwdft/global.h" -#include "source_base/global_function.h" +#include "RI_Util.h" +#include "source_base/global_function.h" +#include "source_io/module_parameter/parameter.h" namespace RI_Util { @@ -147,4 +147,4 @@ namespace RI_Util } } -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_ri/RPA_LRI.h b/source/source_lcao/module_ri/RPA_LRI.h index 75161a21a4..ae5754069f 100644 --- a/source/source_lcao/module_ri/RPA_LRI.h +++ b/source/source_lcao/module_ri/RPA_LRI.h @@ -11,6 +11,7 @@ // #include "module_xc/exx_info.h" // #include "source_basis/module_ao/ORB_atomic_lm.h" #include "source_base/matrix.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info // #include "source_lcao/module_ri/Exx_LRI.h" // #include #include diff --git a/source/source_lcao/module_ri/RPA_LRI.hpp b/source/source_lcao/module_ri/RPA_LRI.hpp index d17479b239..2580a75424 100644 --- a/source/source_lcao/module_ri/RPA_LRI.hpp +++ b/source/source_lcao/module_ri/RPA_LRI.hpp @@ -13,6 +13,7 @@ #include "RPA_LRI.h" #include "source_io/module_parameter/parameter.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info template void RPA_LRI::init(const MPI_Comm& mpi_comm_in, const K_Vectors& kv_in, const std::vector& orb_cutoff) @@ -95,7 +96,7 @@ void RPA_LRI::cal_postSCF_exx(const elecstate::DensityMatrix symrot.find_irreducible_sector(ucell.symm, ucell.atoms, ucell.st, Rs, period, ucell.lat); // set Lmax of the rotation matrices to max(l_ao, l_abf), to support rotation under ABF - symrot.set_abfs_Lmax(GlobalC::exx_info.info_ri.abfs_Lmax); + symrot.set_abfs_Lmax(Exx_Abfs::Construct_Orbs::get_Lmax(exx_lri_rpa.abfs)); symrot.cal_Ms(kv, ucell, *dm.get_paraV_pointer()); // output Ts (symrot_R.txt) and Ms (symrot_k.txt) ModuleSymmetry::print_symrot_info_R(symrot, ucell.symm, ucell.lmax, Rs); diff --git a/source/source_lcao/module_ri/conv_coulomb_pot_k.cpp b/source/source_lcao/module_ri/conv_coulomb_pot_k.cpp index bb50800b13..1719810107 100644 --- a/source/source_lcao/module_ri/conv_coulomb_pot_k.cpp +++ b/source/source_lcao/module_ri/conv_coulomb_pot_k.cpp @@ -2,7 +2,6 @@ #include "../../source_base/constants.h" #include "source_io/module_parameter/parameter.h" #include "../../source_basis/module_ao/ORB_atomic_lm.h" -#include "../../source_pw/module_pwdft/global.h" namespace Conv_Coulomb_Pot_K { diff --git a/source/source_lcao/module_ri/exx_abfs-construct_orbs.cpp b/source/source_lcao/module_ri/exx_abfs-construct_orbs.cpp index 1556335572..fc80551ad6 100644 --- a/source/source_lcao/module_ri/exx_abfs-construct_orbs.cpp +++ b/source/source_lcao/module_ri/exx_abfs-construct_orbs.cpp @@ -5,7 +5,6 @@ #include "source_base/gram_schmidt_orth-inl.h" #include "source_base/gram_schmidt_orth.h" #include "source_basis/module_ao/ORB_read.h" -#include "source_pw/module_pwdft/global.h" //for ucell #include "source_lcao/module_ri/test_code/exx_abfs-construct_orbs-test.h" // Peize Lin test std::vector>> Exx_Abfs::Construct_Orbs::change_orbs( @@ -86,6 +85,8 @@ std::vector>> Exx_Abfs::Construct_ const double times_threshold ) { ModuleBase::TITLE("Exx_Abfs::Construct_Orbs::abfs_same_atom"); + if(times_threshold>1) + { return std::vector>>(orb.get_ntype()); } const std::vector>>> abfs_same_atom_psi = psi_mult_psi( orbs ); diff --git a/source/source_lcao/module_ri/exx_abfs-construct_orbs.h b/source/source_lcao/module_ri/exx_abfs-construct_orbs.h index ae698b33bd..01b2dc36a9 100644 --- a/source/source_lcao/module_ri/exx_abfs-construct_orbs.h +++ b/source/source_lcao/module_ri/exx_abfs-construct_orbs.h @@ -22,7 +22,7 @@ class Exx_Abfs::Construct_Orbs static std::vector>> abfs_same_atom( const UnitCell &ucell, - const LCAO_Orbitals& orb, + const LCAO_Orbitals& orb, const std::vector>> &lcaos, const double kmesh_times_mot, const double times_threshold=0); @@ -32,30 +32,36 @@ class Exx_Abfs::Construct_Orbs const std::vector>> &orbs, std::ostream &os); - // get the max number of orbitals among all elements - // static int get_nmax_total(const - // std::vector>> &orb_in); get - // number of orbitals for each element static std::map - // get_nw(const std::vector>> - // &orb_in); + // get the max number of orbitals among all elements + // static int get_nmax_total(const + // std::vector>> &orb_in); get + // number of orbitals for each element static std::map + // get_nw(const std::vector>> + // &orb_in); - // get multipole of orbitals for each element and angular moment - static std::vector>> get_multipole( - const std::vector>>& - orb_in); + // get multipole of orbitals for each element and angular moment + static std::vector>> get_multipole( + const std::vector>> &orb_in); - static std::vector get_Rcut( - const std::vector>>& - orb_in); - static inline double get_Rmax(const std::vector& rcut) { - return *std::max_element(rcut.begin(), rcut.end()); - } - static inline double get_Rmax( - const std::vector>>& - orb_in) { - std::vector rcut = get_Rcut(orb_in); - return get_Rmax(rcut); - } + static std::vector get_Rcut( + const std::vector>> &orb_in); + static inline double get_Rmax(const std::vector& rcut) + { + return *std::max_element(rcut.begin(), rcut.end()); + } + static inline double get_Rmax( + const std::vector>> &orb_in) + { + std::vector rcut = get_Rcut(orb_in); + return get_Rmax(rcut); + } + template + static int get_Lmax(const std::vector> &orb) + { + return max_element(orb.begin(), orb.end(), + [](const std::vector &orb_A, const std::vector &orb_B){ return orb_A.size() < orb_B.size(); }) + ->size() - 1; + } static void filter_empty_orbs( std::vector>> &orbs); @@ -74,7 +80,7 @@ class Exx_Abfs::Construct_Orbs static std::vector>>> pca( const UnitCell &ucell, - const LCAO_Orbitals& orb, + const LCAO_Orbitals& orb, const std::vector>> &abfs, const std::vector>> &orbs, const double kmesh_times_mot, diff --git a/source/source_lcao/module_ri/exx_abfs-io.cpp b/source/source_lcao/module_ri/exx_abfs-io.cpp index 3a8de0f1b3..bbdda73897 100644 --- a/source/source_lcao/module_ri/exx_abfs-io.cpp +++ b/source/source_lcao/module_ri/exx_abfs-io.cpp @@ -4,7 +4,6 @@ #include "exx_abfs-io.h" #include "exx_abfs-jle.h" -#include "../../source_pw/module_pwdft/global.h" #include "../../source_basis/module_ao/ORB_read.h" #include "../../source_base/global_function.h" #include "../../source_base/math_integral.h" // mohan add 2021-04-03 @@ -15,6 +14,7 @@ std::vector>> Exx_Abfs::IO::constr const std::vector &files_abfs, const double kmesh_times ) { + ModuleBase::TITLE("Exx_Abfs::IO::construct_abfs"); std::vector>> abfs( files_abfs.size() ); for( size_t T=0; T!=files_abfs.size(); ++T ) abfs[T] = construct_abfs_T( @@ -62,7 +62,7 @@ std::vector> Exx_Abfs::IO::construct_abfs_T( size_t L_size; std::map N_size; size_t meshr; - double dr; + double dr = 0.0; std::map>> psis; /*---------------------- diff --git a/source/source_lcao/module_ri/exx_abfs.h b/source/source_lcao/module_ri/exx_abfs.h index f08462c94e..8a78307b36 100644 --- a/source/source_lcao/module_ri/exx_abfs.h +++ b/source/source_lcao/module_ri/exx_abfs.h @@ -22,7 +22,6 @@ class Exx_Abfs int rmesh_times = 5; // Peize Lin test int kmesh_times = 1; // Peize Lin test - }; #endif diff --git a/source/source_lcao/module_ri/exx_lip.hpp b/source/source_lcao/module_ri/exx_lip.hpp index aad7b3494c..07b39c6a7a 100644 --- a/source/source_lcao/module_ri/exx_lip.hpp +++ b/source/source_lcao/module_ri/exx_lip.hpp @@ -11,7 +11,6 @@ #include "source_base/vector3.h" #include "source_base/global_function.h" #include "source_base/vector3.h" -#include "source_pw/module_pwdft/global.h" #include "source_cell/klist.h" #include "source_lcao/wavefunc_in_pw.h" #include "source_base/module_external/lapack_connector.h" @@ -20,12 +19,17 @@ #include "source_estate/elecstate.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/module_symmetry/symmetry.h" -#include "source_psi/psi_init.h" +#include "source_psi/psi_initializer.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_base/tool_title.h" #include "source_base/timer.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info #include +#include +#include +#include +#include template void Exx_Lip::cal_exx() @@ -487,12 +491,20 @@ void Exx_Lip::write_q_pack() const if (!GlobalV::RANK_IN_POOL) { const std::string exx_q_pack = "exx_q_pack/"; + const std::string dir_path = PARAM.globalv.global_out_dir + exx_q_pack; - const std::string command_mkdir = "test -d " + PARAM.globalv.global_out_dir + exx_q_pack + " || mkdir " + PARAM.globalv.global_out_dir + exx_q_pack; - assert( system(command_mkdir.c_str()) == 0); + int ret = mkdir(dir_path.c_str(), 0755); + assert(ret == 0 || errno == EEXIST); - const std::string command_kpoint = "test -f " + PARAM.globalv.global_out_dir + exx_q_pack + PARAM.inp.kpoint_file + " || cp " + PARAM.inp.kpoint_file + " " + PARAM.globalv.global_out_dir + exx_q_pack + PARAM.inp.kpoint_file; - assert( system(command_kpoint.c_str()) == 0); + const std::string kpoint_dest = dir_path + PARAM.inp.kpoint_file; + struct stat st; + if (stat(kpoint_dest.c_str(), &st) != 0) + { + std::ifstream src(PARAM.inp.kpoint_file, std::ios::binary); + std::ofstream dst(kpoint_dest, std::ios::binary); + dst << src.rdbuf(); + assert(dst.good()); + } std::stringstream ss_wf_wg; ss_wf_wg << PARAM.globalv.global_out_dir << exx_q_pack << "wf_wg_" << GlobalV::MY_POOL; @@ -610,4 +622,4 @@ void Exx_Lip::read_q_pack(const ModuleSymmetry::Symmetry& symm, } */ -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_ri/exx_opt_orb-print.cpp b/source/source_lcao/module_ri/exx_opt_orb-print.cpp index bf19815cfc..2418fdd996 100644 --- a/source/source_lcao/module_ri/exx_opt_orb-print.cpp +++ b/source/source_lcao/module_ri/exx_opt_orb-print.cpp @@ -1,5 +1,4 @@ #include "exx_opt_orb.h" -#include "../../source_pw/module_pwdft/global.h" #include "exx_abfs-jle.h" #include "source_base/tool_title.h" #include diff --git a/source/source_lcao/module_ri/exx_opt_orb.cpp b/source/source_lcao/module_ri/exx_opt_orb.cpp index f36d65249d..49faad5d78 100644 --- a/source/source_lcao/module_ri/exx_opt_orb.cpp +++ b/source/source_lcao/module_ri/exx_opt_orb.cpp @@ -1,5 +1,4 @@ #include "exx_opt_orb.h" -#include "source_pw/module_pwdft/global.h" #include "source_basis/module_ao/ORB_atomic_lm.h" #include "exx_abfs.h" #include "exx_abfs-construct_orbs.h" @@ -47,12 +46,6 @@ void Exx_Opt_Orb::generate_matrix( { jle = Exx_Abfs::IO::construct_abfs( jle, orb, info.files_jles, info.kmesh_times ); } Exx_Abfs::Construct_Orbs::filter_empty_orbs(jle); - // GlobalC::exx_info.info_ri.abfs_Lmax is used for Center2 temporarily - for(const auto &orb_T : abfs) - { GlobalC::exx_info.info_ri.abfs_Lmax = std::max( GlobalC::exx_info.info_ri.abfs_Lmax, static_cast(orb_T.size())-1 ); } - for(const auto &orb_T : jle) - { GlobalC::exx_info.info_ri.abfs_Lmax = std::max( GlobalC::exx_info.info_ri.abfs_Lmax, static_cast(orb_T.size())-1 ); } - const ModuleBase::Element_Basis_Index::Range range_lcaos = ModuleBase::Element_Basis_Index::construct_range( lcaos ); const ModuleBase::Element_Basis_Index::IndexLNM index_lcaos = ModuleBase::Element_Basis_Index::construct_index( range_lcaos ); @@ -72,12 +65,7 @@ void Exx_Opt_Orb::generate_matrix( { if(judge_orbs_empty(lcaos)) { return {}; } Matrix_Orbs22 m_lcaoslcaos_lcaoslcaos; - ORB_gaunt_table MGT; - int Lmax; - m_lcaoslcaos_lcaoslcaos.init( 1, ucell,orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_lcaoslcaos_lcaoslcaos.init_radial( lcaos, lcaos, lcaos, lcaos, MGT ); + m_lcaoslcaos_lcaoslcaos.init( lcaos, lcaos, lcaos, lcaos, ucell,orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_lcaoslcaos_lcaoslcaos.init_radial_table(radial_R); #else @@ -92,12 +80,7 @@ void Exx_Opt_Orb::generate_matrix( if(judge_orbs_empty(lcaos)) { return {}; } if(judge_orbs_empty(jle)) { return {}; } Matrix_Orbs21 m_jyslcaos_lcaos; - ORB_gaunt_table MGT; - int Lmax; - m_jyslcaos_lcaos.init( 1, ucell , orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_jyslcaos_lcaos.init_radial( jle, lcaos, lcaos, MGT); + m_jyslcaos_lcaos.init( jle, lcaos, lcaos, ucell , orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_jyslcaos_lcaos.init_radial_table( radial_R); #else @@ -111,12 +94,7 @@ void Exx_Opt_Orb::generate_matrix( { if(judge_orbs_empty(jle)) { return {}; } Matrix_Orbs11 m_jys_jys; - ORB_gaunt_table MGT; - int Lmax; - m_jys_jys.init( 2,ucell,orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_jys_jys.init_radial( jle, jle, MGT ); + m_jys_jys.init( jle, jle, ucell,orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_jys_jys.init_radial_table(radial_R); #else @@ -130,12 +108,7 @@ void Exx_Opt_Orb::generate_matrix( { if(judge_orbs_empty(abfs)) { return {}; } Matrix_Orbs11 m_abfs_abfs; - ORB_gaunt_table MGT; - int Lmax; - m_abfs_abfs.init( 2, ucell, orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_abfs_abfs.init_radial( abfs, abfs, MGT ); + m_abfs_abfs.init( abfs, abfs, ucell, orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_abfs_abfs.init_radial_table(radial_R); #else @@ -150,12 +123,7 @@ void Exx_Opt_Orb::generate_matrix( if(judge_orbs_empty(lcaos)) { return {}; } if(judge_orbs_empty(abfs)) { return {}; } Matrix_Orbs21 m_abfslcaos_lcaos; - ORB_gaunt_table MGT; - int Lmax; - m_abfslcaos_lcaos.init( 1, ucell , orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_abfslcaos_lcaos.init_radial( abfs, lcaos, lcaos, MGT ); + m_abfslcaos_lcaos.init( abfs, lcaos, lcaos, ucell , orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_abfslcaos_lcaos.init_radial_table(radial_R); #else @@ -170,12 +138,7 @@ void Exx_Opt_Orb::generate_matrix( if(judge_orbs_empty(jle)) { return {}; } if(judge_orbs_empty(abfs)) { return {}; } Matrix_Orbs11 m_jys_abfs; - ORB_gaunt_table MGT; - int Lmax; - m_jys_abfs.init( 2, ucell,orb, info.kmesh_times, orb.get_Rmax(), Lmax ); - MGT.init_Gaunt_CH(Lmax); - MGT.init_Gaunt(Lmax); - m_jys_abfs.init_radial( jle, abfs, MGT ); + m_jys_abfs.init( jle, abfs, ucell,orb, info.kmesh_times ); #if TEST_EXX_RADIAL>=1 m_jys_abfs.init_radial_table(radial_R); #else diff --git a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.cpp b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.cpp index b79bfcfc20..f93b8aa040 100644 --- a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.cpp +++ b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector.cpp @@ -235,4 +235,4 @@ namespace ModuleSymmetry // this->output_sector_star(); this->write_irreducible_sector(); } -} \ No newline at end of file +} diff --git a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp index 50df31b360..8b8879ee1d 100644 --- a/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp +++ b/source/source_lcao/module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp @@ -102,8 +102,8 @@ namespace ModuleSymmetry } // analyze bravis and generate optimized lattice for minimal BvK lattice - double cel_const[6]; - double pre_const[6]; + double cel_const[6] = {0.0}; + double pre_const[6] = {0.0}; int bvk_brav = 0; std::string bvk_latname=""; // bvk_brav = symm.standard_lat(s1, s2, s3, cel_const); //not enough, optimal lattice may change after cell-extension @@ -126,10 +126,10 @@ namespace ModuleSymmetry // generate symmetry operation of the BvK lattice using the original optlat-direct coordinates std::vector bvk_op(48); - int bvk_nop; + int bvk_nop = 0; symm.setgroup(bvk_op.data(), bvk_nop, bvk_brav); bvk_op.resize(bvk_nop); - int bvk_npg, bvk_nsg, bvk_pgnum, bvk_sgnum; + int bvk_npg = 0, bvk_nsg = 0, bvk_pgnum = 0, bvk_sgnum = 0; std::string bvk_pgname, bvk_sgname; std::vector bvk_gmatrix(48); std::vector> bvk_gtrans(48); diff --git a/source/source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.cpp b/source/source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.cpp index 60d27afbf2..27929737f6 100644 --- a/source/source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.cpp +++ b/source/source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.cpp @@ -8,8 +8,6 @@ #include "source_base/timer.h" #include "source_base/mathzone.h" -#include "source_pw/module_pwdft/global.h" - namespace ModuleSymmetry { void Symmetry_rotation::set_Cs_rotation(const std::vector>& abfs_l_nchi) @@ -205,7 +203,7 @@ namespace ModuleSymmetry TCdouble Symmetry_rotation::get_euler_angle(const ModuleBase::Matrix3& gmatc) const { double threshold = this->eps_; - double alpha, beta, gamma; + double alpha = 0.0, beta = 0.0, gamma = 0.0; if (std::fabs(gmatc.e32) > threshold || std::fabs(gmatc.e31) > threshold) // sin(beta) is not zero { // use the 2-angle elements to get alpha and gamma @@ -417,24 +415,24 @@ namespace ModuleSymmetry if (TRS_conj) { // D^T* = M^T [M^T (D^T)^T]^\dagger - pzgemm_(&transpose, &transpose, &nbasis, &nbasis, &nbasis, - &alpha, this->Ms_[ik_ibz].at(isym).data(), &i1, &i1, pv.desc, DMkibz.data(), &i1, &i1, pv.desc, - &beta, DMkibz_M.data(), &i1, &i1, pv.desc); + ScalapackConnector::gemm(transpose, transpose, nbasis, nbasis, nbasis, + alpha, this->Ms_[ik_ibz].at(isym).data(), i1, i1, pv.desc, DMkibz.data(), i1, i1, pv.desc, + beta, DMkibz_M.data(), i1, i1, pv.desc); alpha.real(1.0 / static_cast(kstar_size)); - pzgemm_(&transpose, &dagger, &nbasis, &nbasis, &nbasis, - &alpha, this->Ms_[ik_ibz].at(isym).data(), &i1, &i1, pv.desc, DMkibz_M.data(), &i1, &i1, pv.desc, - &beta, DMk.data(), &i1, &i1, pv.desc); + ScalapackConnector::gemm(transpose, dagger, nbasis, nbasis, nbasis, + alpha, this->Ms_[ik_ibz].at(isym).data(), i1, i1, pv.desc, DMkibz_M.data(), i1, i1, pv.desc, + beta, DMk.data(), i1, i1, pv.desc); } else { // D^T = M^\daggger D^T M - pzgemm_(&dagger, ¬rans, &nbasis, &nbasis, &nbasis, - &alpha, this->Ms_[ik_ibz].at(isym).data(), &i1, &i1, pv.desc, DMkibz.data(), &i1, &i1, pv.desc, - &beta, DMkibz_M.data(), &i1, &i1, pv.desc); + ScalapackConnector::gemm(dagger, notrans, nbasis, nbasis, nbasis, + alpha, this->Ms_[ik_ibz].at(isym).data(), i1, i1, pv.desc, DMkibz.data(), i1, i1, pv.desc, + beta, DMkibz_M.data(), i1, i1, pv.desc); alpha.real(1.0 / static_cast(kstar_size)); - pzgemm_(¬rans, ¬rans, &nbasis, &nbasis, &nbasis, - &alpha, DMkibz_M.data(), &i1, &i1, pv.desc, this->Ms_[ik_ibz].at(isym).data(), &i1, &i1, pv.desc, - &beta, DMk.data(), &i1, &i1, pv.desc); + ScalapackConnector::gemm(notrans, notrans, nbasis, nbasis, nbasis, + alpha, DMkibz_M.data(), i1, i1, pv.desc, this->Ms_[ik_ibz].at(isym).data(), i1, i1, pv.desc, + beta, DMk.data(), i1, i1, pv.desc); } return DMk; } @@ -479,4 +477,4 @@ namespace ModuleSymmetry return RI_Util::get_Born_von_Karmen_cells(period); } -} \ No newline at end of file +} diff --git a/source/source_lcao/module_ri/module_exx_symmetry/test/CMakeLists.txt b/source/source_lcao/module_ri/module_exx_symmetry/test/CMakeLists.txt index b282f3360e..822bd6afde 100644 --- a/source/source_lcao/module_ri/module_exx_symmetry/test/CMakeLists.txt +++ b/source/source_lcao/module_ri/module_exx_symmetry/test/CMakeLists.txt @@ -6,5 +6,5 @@ AddTest( LIBS base ${math_libs} device symmetry neighbor parameter SOURCES symmetry_rotation_test.cpp ../symmetry_rotation.cpp ../symmetry_rotation_output.cpp ../irreducible_sector.cpp ../irreducible_sector_bvk.cpp ../../../../source_basis/module_ao/parallel_orbitals.cpp - ../../../../source_io/output.cpp + ../../../../source_io/module_output/output.cpp ) \ No newline at end of file diff --git a/source/source_lcao/module_rt/CMakeLists.txt b/source/source_lcao/module_rt/CMakeLists.txt index 58bc834a5f..35a65a5aa7 100644 --- a/source/source_lcao/module_rt/CMakeLists.txt +++ b/source/source_lcao/module_rt/CMakeLists.txt @@ -15,8 +15,16 @@ if(ENABLE_LCAO) snap_psibeta_half_tddft.cpp td_folding.cpp solve_propagation.cpp + boundary_fix.cpp ) + if(USE_CUDA) + list(APPEND objects + kernels/cuda/snap_psibeta_kernel.cu + kernels/cuda/snap_psibeta_gpu.cu + ) + endif() + add_library( tddft OBJECT diff --git a/source/source_lcao/module_rt/boundary_fix.cpp b/source/source_lcao/module_rt/boundary_fix.cpp new file mode 100644 index 0000000000..dcdb436153 --- /dev/null +++ b/source/source_lcao/module_rt/boundary_fix.cpp @@ -0,0 +1,99 @@ +#include "boundary_fix.h" +#include "source_base/libm/libm.h" +#include "source_base/constants.h" +#include "source_base/vector3.h" + +namespace module_rt{ + +void reset_matrix_boundary(const UnitCell& ucell, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + ct::Tensor& hk_last, + ct::Tensor& sk_last, + psi::Psi>* psi_last, + const size_t len_hs) +{ + ModuleBase::TITLE("module_rt", "reset_matrix_boundary"); + ModuleBase::timer::tick("module_rt", "reset_matrix_boundary"); + const ModuleBase::Vector3 zero = {0, 0, 0}; + for(size_t iat = 0; iat < ucell.nat; iat++) + { + const size_t it = ucell.iat2it[iat]; + const size_t ia = ucell.iat2ia[iat]; + if(ucell.atoms[it].boundary_shift[ia]!=zero) + { + const auto& rshift = ucell.atoms[it].boundary_shift[ia]; +#ifdef _OPENMP +#pragma omp parallel for schedule(dynamic) +#endif + for(int ik = 0; ik < kv.get_nks(); ik++) + { + const ModuleBase::Vector3 tmp_rshift(rshift.x, rshift.y, rshift.z); + const double arg = -kv.kvec_d[ik] * tmp_rshift * ModuleBase::TWO_PI; + //skip unrelevent ik + if(arg==0)continue; + //calculate correction phase + double sinp = 0.0, cosp = 0.0; + ModuleBase::libm::sincos(arg, &sinp, &cosp); + const std::complex phase = std::complex(cosp, sinp); + //phase correction for Hamiltionian, overlap matrix and c vec. + module_rt::boundary_shift_mat(phase, hk_last.template data>() + ik * len_hs, pv, iat); + module_rt::boundary_shift_mat(phase, sk_last.template data>() + ik * len_hs, pv, iat); + psi_last->fix_k(ik); + module_rt::boundary_shift_c(phase, psi_last[0].get_pointer(), pv, iat); + } + } + } + ModuleBase::timer::tick("module_rt", "reset_matrix_boundary"); + return; +} + +void boundary_shift_mat(const std::complex& phase, + std::complex* matk, + const Parallel_Orbitals* pv, + const size_t iat) +{ + const std::complex phase_conj = std::conj(phase); + size_t row0 = pv->atom_begin_row[iat]; + size_t col0 = pv->atom_begin_col[iat]; + std::complex* p_matkc = matk + col0 * pv->get_row_size(); + for(size_t nu = 0; nu < pv->get_col_size(iat); ++nu) + { + + BlasConnector::scal(pv->get_row_size(), + phase, + p_matkc, + 1); + p_matkc += pv->get_row_size(); + } + std::complex* p_matkr = matk + row0; + for(size_t mu = 0; mu < pv->get_row_size(iat); ++mu) + { + BlasConnector::scal(pv->get_col_size(), + phase_conj, + p_matkr, + pv->get_row_size()); + p_matkr += 1; + } + return; +} + +void boundary_shift_c(const std::complex& phase, + std::complex* psi_k_last, + const Parallel_Orbitals* pv, + const size_t iat) +{ + const std::complex phase_conj = std::conj(phase); + size_t row0 = pv->atom_begin_row[iat]; + std::complex* p_ck = psi_k_last + row0; + for(size_t nu = 0; nu < pv->get_row_size(iat); ++nu) + { + BlasConnector::scal(pv->ncol_bands, + phase_conj, + p_ck, + pv->get_row_size()); + p_ck+=1; + } + return; +} +} //namespace module_rt \ No newline at end of file diff --git a/source/source_lcao/module_rt/boundary_fix.h b/source/source_lcao/module_rt/boundary_fix.h new file mode 100644 index 0000000000..14127cf6a1 --- /dev/null +++ b/source/source_lcao/module_rt/boundary_fix.h @@ -0,0 +1,64 @@ +/** + * @file boundary_fix.h + * @brief Correct the discontinuity that occurs when crossing periodic boundary conditions + */ +#ifndef BOUNDARY_FIX_H +#define BOUNDARY_FIX_H + +#include "source_cell/unitcell.h" +#include "source_cell/klist.h" +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_psi/psi.h" +#include "source_base/module_container/ATen/core/tensor.h" +namespace module_rt{ + +/** +* @brief Add phases to the matrix and coefficient from the previous step to correct the boundary discontinuity. +* +* @param[in] ucell Unitcell information +* @param[in] kv K-point vectors +* @param[in] pv information of parallel +* @param[in] hk_last Hamiltonian matrix from last step +* @param[in] sk_last Overlap matrix from last step +* @param[in] psi_last Wavefunctions from last step +* @param[in] len_hs size of matrix element in this processor +* @param[out] hk_last the fixed hk matrix +* @param[out] sk_last the fixed sk matrix +* @param[out] sk_last the fixed wavefunctions +*/ +void reset_matrix_boundary(const UnitCell& ucell, + const K_Vectors& kv, + const Parallel_Orbitals* pv, + ct::Tensor& hk_last, + ct::Tensor& sk_last, + psi::Psi>* psi_last, + const size_t len_hs); + +/** +* @brief Add extra phase to the matrix element belong to iat +* +* @param[in] phase extra phase +* @param[in] matk the matrix need to be fixed +* @param[in] pv information of parallel +* @param[in] iat atom index +* @param[out] matk the fixed matrix +*/ +void boundary_shift_mat(const std::complex& phase, + std::complex* matk, + const Parallel_Orbitals* pv, + const size_t iat); +/** +* @brief Add extra phase to the wfc coefficient belong to iat +* +* @param[in] phase extra phase +* @param[in] psi_k_last psi of last step +* @param[in] pv information of parallel +* @param[in] iat atom index +* @param[out] psi_k_last fixed psi of last step +*/ +void boundary_shift_c(const std::complex& phase, + std::complex* psi_k_last, + const Parallel_Orbitals* pv, + const size_t iat); +}// namespace module_rt +#endif // BOUNDARY_FIX_H \ No newline at end of file diff --git a/source/source_lcao/module_rt/evolve_elec.cpp b/source/source_lcao/module_rt/evolve_elec.cpp index 833e6b4186..b957d193ea 100644 --- a/source/source_lcao/module_rt/evolve_elec.cpp +++ b/source/source_lcao/module_rt/evolve_elec.cpp @@ -6,7 +6,6 @@ #include "source_estate/module_charge/symmetry_rho.h" #include "source_lcao/hamilt_lcao.h" #include "source_lcao/module_dftu/dftu.h" -#include "source_pw/module_pwdft/global.h" namespace module_rt { @@ -28,11 +27,10 @@ void Evolve_elec::solve_psi(const int& istep, Parallel_Orbitals& para_orb, psi::Psi>* psi, psi::Psi>* psi_laststep, - std::complex** Hk_laststep, - std::complex** Sk_laststep, + ct::Tensor& Hk_laststep, + ct::Tensor& Sk_laststep, ModuleBase::matrix& ekb, std::ofstream& ofs_running, - const int htype, const int propagator, const bool use_tensor, const bool use_lapack) @@ -47,180 +45,165 @@ void Evolve_elec::solve_psi(const int& istep, { phm->updateHk(ik); - ModuleBase::timer::tick("Efficiency", "evolve_k"); + ModuleBase::timer::tick("TD_Efficiency", "evolve_k"); psi->fix_k(ik); psi_laststep->fix_k(ik); - if (htype == 0) + + if (!use_tensor) { + const int len_HS_laststep = use_lapack ? nlocal * nlocal : para_orb.nloc; evolve_psi(nband, nlocal, &(para_orb), phm, psi[0].get_pointer(), psi_laststep[0].get_pointer(), - nullptr, - nullptr, + Hk_laststep.data>() + ik * len_HS_laststep, + Sk_laststep.data>() + ik * len_HS_laststep, &(ekb(ik, 0)), - htype, propagator, ofs_running, print_matrix); + // GlobalV::ofs_running << "Print ekb: " << std::endl; + // ekb.print(GlobalV::ofs_running); } - else if (htype == 1) + else { - if (!use_tensor) + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + + const int len_psi_k_1 = use_lapack ? nband : psi->get_nbands(); + const int len_psi_k_2 = use_lapack ? nlocal : psi->get_nbasis(); + const int len_HS_laststep = use_lapack ? nlocal * nlocal : para_orb.nloc; + + // Create Tensor for psi_k, psi_k_laststep, H_laststep, S_laststep, ekb + ct::Tensor psi_k_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({len_psi_k_1, len_psi_k_2})); + ct::Tensor psi_k_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({len_psi_k_1, len_psi_k_2})); + ct::Tensor H_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({len_HS_laststep})); + ct::Tensor S_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, + ct_device_type, + ct::TensorShape({len_HS_laststep})); + ct::Tensor ekb_tensor(ct::DataType::DT_DOUBLE, ct_device_type, ct::TensorShape({nband})); + + // Global psi + module_rt::Matrix_g> psi_g; + module_rt::Matrix_g> psi_laststep_g; + + if (use_lapack) { - evolve_psi(nband, - nlocal, - &(para_orb), - phm, - psi[0].get_pointer(), - psi_laststep[0].get_pointer(), - Hk_laststep[ik], - Sk_laststep[ik], - &(ekb(ik, 0)), - htype, - propagator, - ofs_running, - print_matrix); - // GlobalV::ofs_running << "Print ekb: " << std::endl; - // ekb.print(GlobalV::ofs_running); + // Need to gather the psi to the root process on CPU + // H_laststep and S_laststep are already gathered in esolver_ks_lcao_tddft.cpp +#ifdef __MPI + // Access the rank of the calling process in the communicator + int myid = 0; + const int root_proc = 0; + MPI_Comm_rank(MPI_COMM_WORLD, &myid); + + // Gather psi to the root process + gatherPsi(myid, root_proc, psi[0].get_pointer(), para_orb, psi_g); + gatherPsi(myid, root_proc, psi_laststep[0].get_pointer(), para_orb, psi_laststep_g); + + // Syncronize data from CPU to Device + syncmem_complex_h2d_op()(psi_k_tensor.data>(), + psi_g.p.get(), + len_psi_k_1 * len_psi_k_2); + syncmem_complex_h2d_op()(psi_k_laststep_tensor.data>(), + psi_laststep_g.p.get(), + len_psi_k_1 * len_psi_k_2); +#endif } else { - const int len_psi_k_1 = use_lapack ? nband : psi->get_nbands(); - const int len_psi_k_2 = use_lapack ? nlocal : psi->get_nbasis(); - const int len_HS_laststep = use_lapack ? nlocal * nlocal : para_orb.nloc; - - // Create Tensor for psi_k, psi_k_laststep, H_laststep, S_laststep, ekb - ct::Tensor psi_k_tensor(ct::DataType::DT_COMPLEX_DOUBLE, - ct_device_type, - ct::TensorShape({len_psi_k_1, len_psi_k_2})); - ct::Tensor psi_k_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, - ct_device_type, - ct::TensorShape({len_psi_k_1, len_psi_k_2})); - ct::Tensor H_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, - ct_device_type, - ct::TensorShape({len_HS_laststep})); - ct::Tensor S_laststep_tensor(ct::DataType::DT_COMPLEX_DOUBLE, - ct_device_type, - ct::TensorShape({len_HS_laststep})); - ct::Tensor ekb_tensor(ct::DataType::DT_DOUBLE, ct_device_type, ct::TensorShape({nband})); - - // Global psi - ModuleESolver::Matrix_g> psi_g; - ModuleESolver::Matrix_g> psi_laststep_g; + // Syncronize data from CPU to Device + syncmem_complex_h2d_op()(psi_k_tensor.data>(), + psi[0].get_pointer(), + len_psi_k_1 * len_psi_k_2); + syncmem_complex_h2d_op()(psi_k_laststep_tensor.data>(), + psi_laststep[0].get_pointer(), + len_psi_k_1 * len_psi_k_2); + } - if (use_lapack) - { - // Need to gather the psi to the root process on CPU - // H_laststep and S_laststep are already gathered in esolver_ks_lcao_tddft.cpp -#ifdef __MPI - // Access the rank of the calling process in the communicator - int myid = 0; - const int root_proc = 0; - MPI_Comm_rank(MPI_COMM_WORLD, &myid); - - // Gather psi to the root process - gatherPsi(myid, root_proc, psi[0].get_pointer(), para_orb, psi_g); - gatherPsi(myid, root_proc, psi_laststep[0].get_pointer(), para_orb, psi_laststep_g); - - // Syncronize data from CPU to Device - syncmem_complex_h2d_op()(psi_k_tensor.data>(), - psi_g.p.get(), - len_psi_k_1 * len_psi_k_2); - syncmem_complex_h2d_op()(psi_k_laststep_tensor.data>(), - psi_laststep_g.p.get(), - len_psi_k_1 * len_psi_k_2); -#endif - } - else - { - // Syncronize data from CPU to Device - syncmem_complex_h2d_op()(psi_k_tensor.data>(), - psi[0].get_pointer(), - len_psi_k_1 * len_psi_k_2); - syncmem_complex_h2d_op()(psi_k_laststep_tensor.data>(), - psi_laststep[0].get_pointer(), - len_psi_k_1 * len_psi_k_2); - } - - syncmem_complex_h2d_op()(H_laststep_tensor.data>(), - Hk_laststep[ik], - len_HS_laststep); - syncmem_complex_h2d_op()(S_laststep_tensor.data>(), - Sk_laststep[ik], - len_HS_laststep); - syncmem_double_h2d_op()(ekb_tensor.data(), &(ekb(ik, 0)), nband); - - evolve_psi_tensor(nband, - nlocal, - &(para_orb), - phm, - psi_k_tensor, - psi_k_laststep_tensor, - H_laststep_tensor, - S_laststep_tensor, - ekb_tensor, - htype, - propagator, - ofs_running, - print_matrix, - use_lapack); - - // Need to distribute global psi back to all processes - if (use_lapack) - { + syncmem_complex_h2d_op()(H_laststep_tensor.data>(), + Hk_laststep.data>() + ik * len_HS_laststep, + len_HS_laststep); + syncmem_complex_h2d_op()(S_laststep_tensor.data>(), + Sk_laststep.data>() + ik * len_HS_laststep, + len_HS_laststep); + syncmem_double_h2d_op()(ekb_tensor.data(), &(ekb(ik, 0)), nband); + + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + + evolve_psi_tensor(nband, + nlocal, + &(para_orb), + phm, + psi_k_tensor, + psi_k_laststep_tensor, + H_laststep_tensor, + S_laststep_tensor, + ekb_tensor, + propagator, + ofs_running, + print_matrix, + use_lapack); + + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + // Need to distribute global psi back to all processes + if (use_lapack) + { #ifdef __MPI - // Syncronize data from Device to CPU - syncmem_complex_d2h_op()(psi_g.p.get(), - psi_k_tensor.data>(), - len_psi_k_1 * len_psi_k_2); - syncmem_complex_d2h_op()(psi_laststep_g.p.get(), - psi_k_laststep_tensor.data>(), - len_psi_k_1 * len_psi_k_2); - - // Distribute psi to all processes - distributePsi(para_orb, psi[0].get_pointer(), psi_g); - distributePsi(para_orb, psi_laststep[0].get_pointer(), psi_laststep_g); + // Syncronize data from Device to CPU + syncmem_complex_d2h_op()(psi_g.p.get(), + psi_k_tensor.data>(), + len_psi_k_1 * len_psi_k_2); + syncmem_complex_d2h_op()(psi_laststep_g.p.get(), + psi_k_laststep_tensor.data>(), + len_psi_k_1 * len_psi_k_2); + + // Distribute psi to all processes + distributePsi(para_orb, psi[0].get_pointer(), psi_g); + distributePsi(para_orb, psi_laststep[0].get_pointer(), psi_laststep_g); #endif - } - else - { - // Syncronize data from Device to CPU - syncmem_complex_d2h_op()(psi[0].get_pointer(), - psi_k_tensor.data>(), - len_psi_k_1 * len_psi_k_2); - syncmem_complex_d2h_op()(psi_laststep[0].get_pointer(), - psi_k_laststep_tensor.data>(), - len_psi_k_1 * len_psi_k_2); - } - syncmem_complex_d2h_op()(Hk_laststep[ik], - H_laststep_tensor.data>(), - len_HS_laststep); - syncmem_complex_d2h_op()(Sk_laststep[ik], - S_laststep_tensor.data>(), - len_HS_laststep); - syncmem_double_d2h_op()(&(ekb(ik, 0)), ekb_tensor.data(), nband); + } + else + { + // Syncronize data from Device to CPU + syncmem_complex_d2h_op()(psi[0].get_pointer(), + psi_k_tensor.data>(), + len_psi_k_1 * len_psi_k_2); + syncmem_complex_d2h_op()(psi_laststep[0].get_pointer(), + psi_k_laststep_tensor.data>(), + len_psi_k_1 * len_psi_k_2); + } + syncmem_complex_d2h_op()(Hk_laststep.data>() + ik * len_HS_laststep, + H_laststep_tensor.data>(), + len_HS_laststep); + syncmem_complex_d2h_op()(Sk_laststep.data>() + ik * len_HS_laststep, + S_laststep_tensor.data>(), + len_HS_laststep); + syncmem_double_d2h_op()(&(ekb(ik, 0)), ekb_tensor.data(), nband); #ifdef __MPI - const int root_proc = 0; - if (use_lapack) - { - // Synchronize ekb to all MPI processes - MPI_Bcast(&(ekb(ik, 0)), nband, MPI_DOUBLE, root_proc, MPI_COMM_WORLD); - } -#endif - // GlobalV::ofs_running << "Print ekb: " << std::endl; - // ekb.print(GlobalV::ofs_running); + const int root_proc = 0; + if (use_lapack) + { + // Synchronize ekb to all MPI processes + MPI_Bcast(&(ekb(ik, 0)), nband, MPI_DOUBLE, root_proc, MPI_COMM_WORLD); } - } - else - { - std::cout << "method of htype is wrong" << std::endl; +#endif + + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + + // GlobalV::ofs_running << "Print ekb: " << std::endl; + // ekb.print(GlobalV::ofs_running); } - ModuleBase::timer::tick("Efficiency", "evolve_k"); + ModuleBase::timer::tick("TD_Efficiency", "evolve_k"); } // end k ModuleBase::timer::tick("Evolve_elec", "solve_psi"); @@ -231,4 +214,4 @@ template class Evolve_elec; #if ((defined __CUDA) /* || (defined __ROCM) */) template class Evolve_elec; #endif -} // namespace module_rt \ No newline at end of file +} // namespace module_rt diff --git a/source/source_lcao/module_rt/evolve_elec.h b/source/source_lcao/module_rt/evolve_elec.h index 7c9fc968b4..5d0a8e5455 100644 --- a/source/source_lcao/module_rt/evolve_elec.h +++ b/source/source_lcao/module_rt/evolve_elec.h @@ -7,10 +7,11 @@ #include "source_base/module_container/ATen/core/tensor_map.h" // TensorMap #include "source_base/module_device/device.h" // base_device #include "source_base/module_device/memory_op.h" // memory operations -#include "source_base/module_external/scalapack_connector.h" // Cpxgemr2d +#include "source_base/module_external/scalapack_connector.h" // Cpxgemr2d #include "source_esolver/esolver_ks_lcao.h" #include "source_esolver/esolver_ks_lcao_tddft.h" #include "source_lcao/hamilt_lcao.h" +#include "source_lcao/module_rt/gather_mat.h" // MPI gathering and distributing functions #include "source_psi/psi.h" //----------------------------------------------------------- @@ -91,52 +92,6 @@ inline void print_tensor_data>(const ct::Tensor& tensor, co namespace module_rt { -#ifdef __MPI -//------------------------ MPI gathering and distributing functions ------------------------// -template -void gatherPsi(const int myid, - const int root_proc, - T* psi_l, - const Parallel_Orbitals& para_orb, - ModuleESolver::Matrix_g& psi_g) -{ - const int* desc_psi = para_orb.desc_wfc; // Obtain the descriptor from Parallel_Orbitals - int ctxt = desc_psi[1]; // BLACS context - int nrows = desc_psi[2]; // Global matrix row number - int ncols = desc_psi[3]; // Global matrix column number - - if (myid == root_proc) - { - psi_g.p.reset(new T[nrows * ncols]); // No need to delete[] since it is a shared_ptr - } - else - { - psi_g.p.reset(new T[nrows * ncols]); // Placeholder for non-root processes - } - - // Set the descriptor of the global psi - psi_g.desc.reset(new int[9]{1, ctxt, nrows, ncols, nrows, ncols, 0, 0, nrows}); - psi_g.row = nrows; - psi_g.col = ncols; - - // Call the Cpxgemr2d function in ScaLAPACK to collect the matrix data - Cpxgemr2d(nrows, ncols, psi_l, 1, 1, const_cast(desc_psi), psi_g.p.get(), 1, 1, psi_g.desc.get(), ctxt); -} - -template -void distributePsi(const Parallel_Orbitals& para_orb, T* psi_l, const ModuleESolver::Matrix_g& psi_g) -{ - const int* desc_psi = para_orb.desc_wfc; // Obtain the descriptor from Parallel_Orbitals - int ctxt = desc_psi[1]; // BLACS context - int nrows = desc_psi[2]; // Global matrix row number - int ncols = desc_psi[3]; // Global matrix column number - - // Call the Cpxgemr2d function in ScaLAPACK to distribute the matrix data - Cpxgemr2d(nrows, ncols, psi_g.p.get(), 1, 1, psi_g.desc.get(), psi_l, 1, 1, const_cast(desc_psi), ctxt); -} -//------------------------ MPI gathering and distributing functions ------------------------// -#endif // __MPI - template class Evolve_elec { @@ -159,11 +114,10 @@ class Evolve_elec Parallel_Orbitals& para_orb, psi::Psi>* psi, psi::Psi>* psi_laststep, - std::complex** Hk_laststep, - std::complex** Sk_laststep, + ct::Tensor& Hk_laststep, + ct::Tensor& Sk_laststep, ModuleBase::matrix& ekb, std::ofstream& ofs_running, - const int htype, const int propagator, const bool use_tensor, const bool use_lapack); diff --git a/source/source_lcao/module_rt/evolve_psi.cpp b/source/source_lcao/module_rt/evolve_psi.cpp index 65ff5dfde0..bd6eaef793 100644 --- a/source/source_lcao/module_rt/evolve_psi.cpp +++ b/source/source_lcao/module_rt/evolve_psi.cpp @@ -7,10 +7,9 @@ #include "solve_propagation.h" #include "source_base/module_container/ATen/kernels/blas.h" // cuBLAS handle #include "source_base/module_container/ATen/kernels/lapack.h" // cuSOLVER handle -#include "source_esolver/esolver_ks_lcao_tddft.h" // use gatherMatrix +#include "source_esolver/esolver_ks_lcao_tddft.h" // use gatherMatrix #include "source_io/module_parameter/parameter.h" #include "source_lcao/hamilt_lcao.h" -#include "source_pw/module_pwdft/global.h" #include "upsi.h" #include @@ -26,16 +25,12 @@ void evolve_psi(const int nband, std::complex* H_laststep, std::complex* S_laststep, double* ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix) { - ModuleBase::TITLE("Evolve_psi", "evolve_psi"); - // ofs_running << " Evolving electronic wave functions begins" << std::endl; - + ModuleBase::TITLE("module_rt", "evolve_psi"); time_t time_start = time(nullptr); - // ofs_running << " Start Time : " << ctime(&time_start); #ifdef __MPI @@ -63,7 +58,7 @@ void evolve_psi(const int nband, /// @brief compute H(t+dt/2) /// @input H_laststep, Htmp, print_matrix /// @output Htmp - if (htype == 1 && propagator != 2) + if (propagator != 2) { half_Hmatrix(pv, nband, nlocal, Htmp, Stmp, H_laststep, S_laststep, ofs_running, print_matrix); } @@ -113,12 +108,10 @@ void evolve_psi(const int nband, delete[] Hold; delete[] U_operator; -#endif +#endif // __MPI time_t time_end = time(nullptr); - ModuleBase::GlobalFunc::OUT_TIME("evolve(std::complex)", time_start, time_end); - - // ofs_running << " Evolving electronic wave functions ends" << std::endl; + ModuleBase::GlobalFunc::OUT_TIME("evolve_psi", time_start, time_end); return; } @@ -133,12 +126,14 @@ void evolve_psi_tensor(const int nband, ct::Tensor& H_laststep, ct::Tensor& S_laststep, ct::Tensor& ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix, const bool use_lapack) { + ModuleBase::TITLE("module_rt", "evolve_psi_tensor"); + time_t time_start = time(nullptr); + // ct_device_type = ct::DeviceType::CpuDevice or ct::DeviceType::GpuDevice ct::DeviceType ct_device_type = ct::DeviceTypeToEnum::value; // ct_Device = ct::DEVICE_CPU or ct::DEVICE_GPU @@ -148,22 +143,20 @@ void evolve_psi_tensor(const int nband, = base_device::memory::synchronize_memory_op, Device, base_device::DEVICE_CPU>; #if ((defined __CUDA) /* || (defined __ROCM) */) - // Initialize cuBLAS & cuSOLVER handle - ct::kernels::createGpuSolverHandle(); - ct::kernels::createGpuBlasHandle(); + if (ct_device_type == ct::DeviceType::GpuDevice) + { + // Initialize cuBLAS & cuSOLVER handle + ct::kernels::createGpuSolverHandle(); + ct::kernels::createGpuBlasHandle(); + } #endif // __CUDA - // ofs_running << " evolve_psi_tensor::start " << std::endl; - - ModuleBase::TITLE("Evolve_psi", "evolve_psi"); - time_t time_start = time(nullptr); - // ofs_running << " Start Time : " << ctime(&time_start); - #ifdef __MPI - hamilt::MatrixBlock> h_mat, s_mat; p_hamilt->matrix(h_mat, s_mat); + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + // Create Tensor objects for temporary data and sync from host to device const int len_HS = use_lapack ? nlocal * nlocal : pv->nloc; ct::Tensor Stmp(ct::DataType::DT_COMPLEX_DOUBLE, ct_device_type, ct::TensorShape({len_HS})); @@ -178,15 +171,15 @@ void evolve_psi_tensor(const int nband, MPI_Comm_rank(MPI_COMM_WORLD, &myid); MPI_Comm_size(MPI_COMM_WORLD, &num_procs); - ModuleESolver::Matrix_g> h_mat_g, s_mat_g; // Global matrix structure + module_rt::Matrix_g> h_mat_g, s_mat_g; // Global matrix structure // Collect H matrix - ModuleESolver::gatherMatrix(myid, 0, h_mat, h_mat_g); + module_rt::gatherMatrix(myid, 0, h_mat, h_mat_g); syncmem_complex_h2d_op()(Htmp.data>(), h_mat_g.p.get(), len_HS); syncmem_complex_h2d_op()(Hold.data>(), h_mat_g.p.get(), len_HS); // Collect S matrix - ModuleESolver::gatherMatrix(myid, 0, s_mat, s_mat_g); + module_rt::gatherMatrix(myid, 0, s_mat, s_mat_g); syncmem_complex_h2d_op()(Stmp.data>(), s_mat_g.p.get(), len_HS); } else @@ -197,6 +190,8 @@ void evolve_psi_tensor(const int nband, syncmem_complex_h2d_op()(Hold.data>(), h_mat.p, len_HS); } + ModuleBase::timer::tick("TD_Efficiency", "host_device_comm"); + ct::Tensor U_operator(ct::DataType::DT_COMPLEX_DOUBLE, ct_device_type, ct::TensorShape({len_HS})); U_operator.zero(); @@ -209,7 +204,7 @@ void evolve_psi_tensor(const int nband, /// @brief compute H(t+dt/2) /// @input H_laststep, Htmp, print_matrix /// @output Htmp - if (htype == 1 && propagator != 2) + if (propagator != 2) { if (!use_lapack) { @@ -237,7 +232,7 @@ void evolve_psi_tensor(const int nband, /// @brief compute U_operator /// @input Stmp, Htmp, print_matrix /// @output U_operator - Propagator prop(propagator, pv, PARAM.mdp.md_dt); + Propagator prop(propagator, pv, PARAM.inp.td_dt); prop.compute_propagator_tensor(nlocal, Stmp, Htmp, @@ -297,20 +292,20 @@ void evolve_psi_tensor(const int nband, compute_ekb_tensor_lapack(pv, nband, nlocal, Hold, psi_k, ekb, ofs_running); } } - #endif // __MPI - time_t time_end = time(nullptr); - ModuleBase::GlobalFunc::OUT_TIME("evolve(std::complex)", time_start, time_end); - - // ofs_running << " evolve_psi_tensor::end " << std::endl; - #if ((defined __CUDA) /* || (defined __ROCM) */) - // Destroy cuBLAS & cuSOLVER handle - ct::kernels::destroyGpuSolverHandle(); - ct::kernels::destroyGpuBlasHandle(); + if (ct_device_type == ct::DeviceType::GpuDevice) + { + // Destroy cuBLAS & cuSOLVER handle + ct::kernels::destroyGpuSolverHandle(); + ct::kernels::destroyGpuBlasHandle(); + } #endif // __CUDA + time_t time_end = time(nullptr); + ModuleBase::GlobalFunc::OUT_TIME("evolve_psi", time_start, time_end); + return; } @@ -324,7 +319,6 @@ template void evolve_psi_tensor(const int nband, ct::Tensor& H_laststep, ct::Tensor& S_laststep, ct::Tensor& ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix, @@ -340,7 +334,6 @@ template void evolve_psi_tensor(const int nband, ct::Tensor& H_laststep, ct::Tensor& S_laststep, ct::Tensor& ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix, diff --git a/source/source_lcao/module_rt/evolve_psi.h b/source/source_lcao/module_rt/evolve_psi.h index ed8cf9b538..413b115a0f 100644 --- a/source/source_lcao/module_rt/evolve_psi.h +++ b/source/source_lcao/module_rt/evolve_psi.h @@ -22,7 +22,6 @@ void evolve_psi(const int nband, std::complex* H_laststep, std::complex* S_laststep, double* ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix); @@ -37,7 +36,6 @@ void evolve_psi_tensor(const int nband, ct::Tensor& H_laststep, ct::Tensor& S_laststep, ct::Tensor& ekb, - int htype, int propagator, std::ofstream& ofs_running, const int print_matrix, diff --git a/source/source_lcao/module_rt/gather_mat.h b/source/source_lcao/module_rt/gather_mat.h new file mode 100644 index 0000000000..00df8620ad --- /dev/null +++ b/source/source_lcao/module_rt/gather_mat.h @@ -0,0 +1,111 @@ +#ifndef GATHER_MAT_H +#define GATHER_MAT_H + +#include "source_base/module_external/scalapack_connector.h" // Cpxgemr2d +#include "source_hamilt/matrixblock.h" + +namespace module_rt +{ +//------------------------ MPI gathering and distributing functions ------------------------// +// This struct is used for collecting matrices from all processes to root process +template +struct Matrix_g +{ + std::shared_ptr p; + size_t row; + size_t col; + std::shared_ptr desc; +}; + +#ifdef __MPI +// Collect matrices from all processes to root process +template +void gatherMatrix(const int myid, const int root_proc, const hamilt::MatrixBlock& mat_l, Matrix_g& mat_g) +{ + const int* desca = mat_l.desc; // Obtain the descriptor of the local matrix + int ctxt = desca[1]; // BLACS context + int nrows = desca[2]; // Global matrix row number + int ncols = desca[3]; // Global matrix column number + + if (myid == root_proc) + { + mat_g.p.reset(new T[nrows * ncols]); // No need to delete[] since it is a shared_ptr + } + else + { + mat_g.p.reset(new T[nrows * ncols]); // Placeholder for non-root processes + } + + // Set the descriptor of the global matrix + mat_g.desc.reset(new int[9]{1, ctxt, nrows, ncols, nrows, ncols, 0, 0, nrows}); + mat_g.row = nrows; + mat_g.col = ncols; + + // Call the Cpxgemr2d function in ScaLAPACK to collect the matrix data + Cpxgemr2d(nrows, ncols, mat_l.p, 1, 1, const_cast(desca), mat_g.p.get(), 1, 1, mat_g.desc.get(), ctxt); +} + +template +void distributeMatrix(hamilt::MatrixBlock& mat_l, const module_rt::Matrix_g& mat_g) +{ + const int* desc_local = mat_l.desc; // Obtain the descriptor from Parallel_Orbitals + int ctxt = desc_local[1]; // BLACS context + int nrows = desc_local[2]; // Global matrix row number + int ncols = desc_local[3]; // Global matrix column number + + // Check matrix size consistency + if (mat_g.row != static_cast(nrows) || mat_g.col != static_cast(ncols)) + { + throw std::invalid_argument("module_rt::distributeMatrix: Global matrix size mismatch."); + } + + // Call the Cpxgemr2d function in ScaLAPACK to distribute the matrix data + Cpxgemr2d(nrows, ncols, mat_g.p.get(), 1, 1, mat_g.desc.get(), mat_l.p, 1, 1, const_cast(desc_local), ctxt); +} + +template +void gatherPsi(const int myid, + const int root_proc, + T* psi_l, + const Parallel_Orbitals& para_orb, + module_rt::Matrix_g& psi_g) +{ + const int* desc_psi = para_orb.desc_wfc; // Obtain the descriptor from Parallel_Orbitals + int ctxt = desc_psi[1]; // BLACS context + int nrows = desc_psi[2]; // Global matrix row number + int ncols = desc_psi[3]; // Global matrix column number + + if (myid == root_proc) + { + psi_g.p.reset(new T[nrows * ncols]); // No need to delete[] since it is a shared_ptr + } + else + { + psi_g.p.reset(new T[nrows * ncols]); // Placeholder for non-root processes + } + + // Set the descriptor of the global psi + psi_g.desc.reset(new int[9]{1, ctxt, nrows, ncols, nrows, ncols, 0, 0, nrows}); + psi_g.row = nrows; + psi_g.col = ncols; + + // Call the Cpxgemr2d function in ScaLAPACK to collect the matrix data + Cpxgemr2d(nrows, ncols, psi_l, 1, 1, const_cast(desc_psi), psi_g.p.get(), 1, 1, psi_g.desc.get(), ctxt); +} + +template +void distributePsi(const Parallel_Orbitals& para_orb, T* psi_l, const module_rt::Matrix_g& psi_g) +{ + const int* desc_psi = para_orb.desc_wfc; // Obtain the descriptor from Parallel_Orbitals + int ctxt = desc_psi[1]; // BLACS context + int nrows = desc_psi[2]; // Global matrix row number + int ncols = desc_psi[3]; // Global matrix column number + + // Call the Cpxgemr2d function in ScaLAPACK to distribute the matrix data + Cpxgemr2d(nrows, ncols, psi_g.p.get(), 1, 1, psi_g.desc.get(), psi_l, 1, 1, const_cast(desc_psi), ctxt); +} +//------------------------ MPI gathering and distributing functions ------------------------// + +#endif // __MPI +} // namespace module_rt +#endif // GATHER_MAT_H \ No newline at end of file diff --git a/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_gpu.cu b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_gpu.cu new file mode 100644 index 0000000000..2517eb23fe --- /dev/null +++ b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_gpu.cu @@ -0,0 +1,375 @@ +/** + * @file snap_psibeta_gpu.cu + * @brief Host-side GPU interface for overlap computation + * + * This file provides the high-level interface for GPU-accelerated computation + * of overlap integrals between atomic orbitals (psi) and non-local projectors + * (beta). It handles: + * - GPU resource initialization and cleanup + * - Data marshalling from ABACUS structures to GPU-friendly formats + * - Kernel launch configuration + * - Result unpacking back to ABACUS data structures + */ + +#include "../snap_psibeta_gpu.h" +#include "snap_psibeta_kernel.cuh" +#include "source_base/timer.h" +#include "source_base/tool_quit.h" + +#include +#include +#include +#include + +namespace module_rt +{ +namespace gpu +{ + +//============================================================================= +// GPU Resource Management +//============================================================================= + +/** + * @brief Initialize module-specific GPU resources for snap_psibeta computation + * + * Copies integration grids (Lebedev-Laikov angular and Gauss-Legendre radial) + * to constant memory. + * + * @note Call this once at the start of a calculation session before any + * snap_psibeta_atom_batch_gpu calls. + */ +void init_snap_psibeta_gpu() +{ + // GPU device availability is already verified and initialized by DeviceContext::init() + // at the startup of the application. + + // Initialize integration grids in constant memory + copy_grids_to_device(); + + // Synchronize to ensure initialization is complete + cudaDeviceSynchronize(); +} + +//============================================================================= +// Internal Helper Structures +//============================================================================= + +/** + * @brief Mapping structure for reconstructing output data + * + * Associates each orbital in the flattened GPU array with its original + * neighbor and orbital indices for proper result placement. + */ +struct OrbitalMapping +{ + int neighbor_idx; ///< Index of neighbor atom in adjacency list + int iw_index; ///< Global orbital index for output mapping +}; + +//============================================================================= +// Main GPU Interface Function +//============================================================================= + +/** + * @brief Compute overlap integrals on GPU + * + * This function processes ALL neighbor atoms for a single center atom (where + * the projectors are located) in a single kernel launch, providing significant + * performance improvement over per-neighbor processing. + * + * Workflow: + * 1. Collect all (neighbor, orbital) pairs into flattened arrays + * 2. Prepare projector data for the center atom + * 3. Transfer data to GPU and launch kernel + * 4. Retrieve results and reconstruct nlm_tot structure + * + * @param orb LCAO orbital information + * @param infoNL_ Non-local projector information + * @param T0 Atom type of center atom (projector location) + * @param R0 Position of center atom + * @param A Vector potential for phase factor + * @param adjs Adjacent atom information + * @param ucell Unit cell information + * @param paraV Parallel orbital distribution + * @param npol Number of spin polarizations + * @param nlm_dim Output dimension (1 for overlap only, 4 for overlap + current) + * @param nlm_tot Output: overlap integrals indexed as [neighbor][direction][orbital] + */ +void snap_psibeta_atom_batch_gpu( + const LCAO_Orbitals& orb, + const InfoNonlocal& infoNL_, + const int T0, + const ModuleBase::Vector3& R0, + const ModuleBase::Vector3& A, + const AdjacentAtomInfo& adjs, + const UnitCell* ucell, + const Parallel_Orbitals* paraV, + const int npol, + const int nlm_dim, + std::vector>>>>& nlm_tot) +{ + ModuleBase::timer::tick("module_rt", "snap_psibeta_gpu"); + + //========================================================================= + // Early exit if no projectors on center atom + //========================================================================= + + const int nproj = infoNL_.nproj[T0]; + if (nproj == 0) + { + ModuleBase::timer::tick("module_rt", "snap_psibeta_gpu"); + return; + } + + //========================================================================= + // Compute projector output indices + //========================================================================= + + int natomwfc = 0; // Total number of projector components + std::vector proj_m0_offset_h(nproj); + + for (int ip = 0; ip < nproj; ip++) + { + proj_m0_offset_h[ip] = natomwfc; + int L0 = infoNL_.Beta[T0].Proj[ip].getL(); + + // Validate angular momentum + if (L0 > MAX_L) + { + ModuleBase::WARNING_QUIT("snap_psibeta_gpu", + "L0=" + std::to_string(L0) + " exceeds MAX_L=" + std::to_string(MAX_L)); + } + natomwfc += 2 * L0 + 1; + } + + //========================================================================= + // Collect all (neighbor, orbital) pairs + //========================================================================= + + std::vector neighbor_orbitals_h; + std::vector psi_radial_h; + std::vector orbital_mappings; + + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T1 = adjs.ntype[ad]; + const int I1 = adjs.natom[ad]; + const int iat1 = ucell->itia2iat(T1, I1); + const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad]; + const Atom* atom1 = &ucell->atoms[T1]; + + // Get unique orbital indices (union of row and column indices) + auto all_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat1); + all_indexes.insert(all_indexes.end(), col_indexes.begin(), col_indexes.end()); + std::sort(all_indexes.begin(), all_indexes.end()); + all_indexes.erase(std::unique(all_indexes.begin(), all_indexes.end()), all_indexes.end()); + + // Process each orbital + for (size_t iw1l = 0; iw1l < all_indexes.size(); iw1l += npol) + { + const int iw1 = all_indexes[iw1l] / npol; + const int L1 = atom1->iw2l[iw1]; + const int m1 = atom1->iw2m[iw1]; + const int N1 = atom1->iw2n[iw1]; + + // Skip orbitals with angular momentum beyond supported limit + if (L1 > MAX_L) + { + continue; + } + + // Get orbital radial function (use getPsi(), not getPsi_r()) + const double* phi_psi = orb.Phi[T1].PhiLN(L1, N1).getPsi(); + int mesh = orb.Phi[T1].PhiLN(L1, N1).getNr(); + double dk = orb.Phi[T1].PhiLN(L1, N1).getDk(); + double rcut = orb.Phi[T1].getRcut(); + + // Append to flattened psi array + size_t psi_offset = psi_radial_h.size(); + psi_radial_h.insert(psi_radial_h.end(), phi_psi, phi_psi + mesh); + + // Create neighbor-orbital data + NeighborOrbitalData norb; + norb.neighbor_idx = ad; + norb.R1 = make_double3(tau1.x * ucell->lat0, tau1.y * ucell->lat0, tau1.z * ucell->lat0); + norb.L1 = L1; + norb.m1 = m1; + norb.N1 = N1; + norb.iw_index = all_indexes[iw1l]; + norb.psi_offset = static_cast(psi_offset); + norb.psi_mesh = mesh; + norb.psi_dk = dk; + norb.psi_rcut = rcut; + + neighbor_orbitals_h.push_back(norb); + + // Track mapping for result reconstruction + OrbitalMapping mapping; + mapping.neighbor_idx = ad; + mapping.iw_index = all_indexes[iw1l]; + orbital_mappings.push_back(mapping); + } + } + + int total_neighbor_orbitals = static_cast(neighbor_orbitals_h.size()); + if (total_neighbor_orbitals == 0) + { + ModuleBase::timer::tick("module_rt", "snap_psibeta_gpu"); + return; + } + + //========================================================================= + // Prepare projector data + //========================================================================= + + std::vector projectors_h(nproj); + std::vector beta_radial_h; + + for (int ip = 0; ip < nproj; ip++) + { + const auto& proj = infoNL_.Beta[T0].Proj[ip]; + int L0 = proj.getL(); + int mesh = proj.getNr(); + double dk = proj.getDk(); + double rcut = proj.getRcut(); + const double* beta_r = proj.getBeta_r(); + const double* radial = proj.getRadial(); + + projectors_h[ip].L0 = L0; + projectors_h[ip].beta_offset = static_cast(beta_radial_h.size()); + projectors_h[ip].beta_mesh = mesh; + projectors_h[ip].beta_dk = dk; + projectors_h[ip].beta_rcut = rcut; + projectors_h[ip].r_min = radial[0]; + projectors_h[ip].r_max = radial[mesh - 1]; + + beta_radial_h.insert(beta_radial_h.end(), beta_r, beta_r + mesh); + } + + //========================================================================= + // Allocate GPU memory + //========================================================================= + + NeighborOrbitalData* neighbor_orbitals_d = nullptr; + ProjectorData* projectors_d = nullptr; + double* psi_radial_d = nullptr; + double* beta_radial_d = nullptr; + int* proj_m0_offset_d = nullptr; + cuDoubleComplex* nlm_out_d = nullptr; + + size_t output_size = total_neighbor_orbitals * nlm_dim * natomwfc; + + CHECK_CUDA(cudaMalloc(&neighbor_orbitals_d, total_neighbor_orbitals * sizeof(NeighborOrbitalData))); + CHECK_CUDA(cudaMalloc(&projectors_d, nproj * sizeof(ProjectorData))); + CHECK_CUDA(cudaMalloc(&psi_radial_d, psi_radial_h.size() * sizeof(double))); + CHECK_CUDA(cudaMalloc(&beta_radial_d, beta_radial_h.size() * sizeof(double))); + CHECK_CUDA(cudaMalloc(&proj_m0_offset_d, nproj * sizeof(int))); + CHECK_CUDA(cudaMalloc(&nlm_out_d, output_size * sizeof(cuDoubleComplex))); + + //========================================================================= + // Transfer data to GPU + //========================================================================= + + CHECK_CUDA(cudaMemcpy(neighbor_orbitals_d, + neighbor_orbitals_h.data(), + total_neighbor_orbitals * sizeof(NeighborOrbitalData), + cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemcpy(projectors_d, projectors_h.data(), nproj * sizeof(ProjectorData), cudaMemcpyHostToDevice)); + CHECK_CUDA( + cudaMemcpy(psi_radial_d, psi_radial_h.data(), psi_radial_h.size() * sizeof(double), cudaMemcpyHostToDevice)); + CHECK_CUDA( + cudaMemcpy(beta_radial_d, beta_radial_h.data(), beta_radial_h.size() * sizeof(double), cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemcpy(proj_m0_offset_d, proj_m0_offset_h.data(), nproj * sizeof(int), cudaMemcpyHostToDevice)); + CHECK_CUDA(cudaMemset(nlm_out_d, 0, output_size * sizeof(cuDoubleComplex))); + + //========================================================================= + // Launch kernel + //========================================================================= + + double3 R0_d3 = make_double3(R0.x, R0.y, R0.z); + double3 A_d3 = make_double3(A.x, A.y, A.z); + + dim3 grid(total_neighbor_orbitals, nproj, 1); + dim3 block(BLOCK_SIZE, 1, 1); + + snap_psibeta_atom_batch_kernel<<>>(R0_d3, + A_d3, + neighbor_orbitals_d, + projectors_d, + psi_radial_d, + beta_radial_d, + proj_m0_offset_d, + total_neighbor_orbitals, + nproj, + natomwfc, + nlm_dim, + nlm_out_d); + + // Check for launch errors + cudaError_t err = cudaGetLastError(); + if (err != cudaSuccess) + { + cudaFree(neighbor_orbitals_d); + cudaFree(projectors_d); + cudaFree(psi_radial_d); + cudaFree(beta_radial_d); + cudaFree(proj_m0_offset_d); + cudaFree(nlm_out_d); + ModuleBase::WARNING_QUIT("snap_psibeta_gpu", + std::string("Atom batch kernel launch error: ") + cudaGetErrorString(err)); + } + + CHECK_CUDA(cudaDeviceSynchronize()); + + //========================================================================= + // Retrieve results + //========================================================================= + + std::vector nlm_out_h(output_size); + CHECK_CUDA(cudaMemcpy(nlm_out_h.data(), nlm_out_d, output_size * sizeof(cuDoubleComplex), cudaMemcpyDeviceToHost)); + + //========================================================================= + // Reconstruct output structure + //========================================================================= + + for (int i = 0; i < total_neighbor_orbitals; i++) + { + int ad = orbital_mappings[i].neighbor_idx; + int iw_index = orbital_mappings[i].iw_index; + + std::vector>> nlm(nlm_dim); + for (int d = 0; d < nlm_dim; d++) + { + nlm[d].resize(natomwfc); + for (int k = 0; k < natomwfc; k++) + { + size_t idx = i * nlm_dim * natomwfc + d * natomwfc + k; + nlm[d][k] = std::complex(nlm_out_h[idx].x, nlm_out_h[idx].y); + } + } + + // Insert into nlm_tot[neighbor][direction][orbital] + for (int dir = 0; dir < nlm_dim; dir++) + { + nlm_tot[ad][dir].insert({iw_index, nlm[dir]}); + } + } + + //========================================================================= + // Cleanup GPU memory + //========================================================================= + + cudaFree(neighbor_orbitals_d); + cudaFree(projectors_d); + cudaFree(psi_radial_d); + cudaFree(beta_radial_d); + cudaFree(proj_m0_offset_d); + cudaFree(nlm_out_d); + + ModuleBase::timer::tick("module_rt", "snap_psibeta_gpu"); +} + +} // namespace gpu +} // namespace module_rt diff --git a/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cu b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cu new file mode 100644 index 0000000000..9c3a8e1a01 --- /dev/null +++ b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cu @@ -0,0 +1,390 @@ +/** + * @file snap_psibeta_kernel.cu + * @brief CUDA kernel implementation for overlap integrals + * + * This file implements the GPU-accelerated numerical integration for computing + * overlap integrals between atomic orbitals (psi) and non-local projectors (beta). + * The implementation uses: + * - Lebedev-Laikov quadrature (110 points) for angular integration + * - Gauss-Legendre quadrature (140 points) for radial integration + * - Templated spherical harmonics with compile-time L for optimization + * - Warp-level shuffle reduction for efficient parallel summation + */ + +#include "snap_psibeta_kernel.cuh" +#include "source_base/constants.h" +#include "source_base/math_integral.h" + +#include +#include + +namespace module_rt +{ +namespace gpu +{ + +//============================================================================= +// Constant Memory - Integration Grids +//============================================================================= + +// Lebedev-Laikov angular quadrature grid (110 points) +__constant__ double d_lebedev_x[ANGULAR_GRID_NUM]; ///< x-direction cosines +__constant__ double d_lebedev_y[ANGULAR_GRID_NUM]; ///< y-direction cosines +__constant__ double d_lebedev_z[ANGULAR_GRID_NUM]; ///< z-direction cosines +__constant__ double d_lebedev_w[ANGULAR_GRID_NUM]; ///< Angular integration weights + +// Gauss-Legendre radial quadrature grid (140 points) +__constant__ double d_gl_x[RADIAL_GRID_NUM]; ///< Quadrature abscissae on [-1, 1] +__constant__ double d_gl_w[RADIAL_GRID_NUM]; ///< Quadrature weights + +//============================================================================= +// Warp-Level Reduction +//============================================================================= + +/** + * @brief Warp-level sum reduction using shuffle instructions + * + * Performs a parallel reduction within a warp (32 threads) using __shfl_down_sync. + * After this function, lane 0 contains the sum of all input values in the warp. + * + * @param val Input value from each thread + * @return Sum across all threads in the warp (valid only in lane 0) + */ +__device__ __forceinline__ double warp_reduce_sum(double val) +{ + for (int offset = 16; offset > 0; offset /= 2) + { + val += __shfl_down_sync(0xffffffff, val, offset); + } + return val; +} + +//============================================================================= +// Main Kernel Implementation +//============================================================================= + +/** + * @brief Atom-level batch kernel for overlap integrals + * + * Integration is performed using restructured loops for efficiency: + * - Outer loop: angular points (each thread handles different angles) + * - Inner loop: radial points (each thread accumulates all radii) + * + * This structure exploits the fact that Y_lm for the projector (ylm0) only + * depends on the angular direction, not the radial distance, saving + * RADIAL_GRID_NUM redundant ylm0 computations per angular point. + */ +__global__ void snap_psibeta_atom_batch_kernel(double3 R0, + double3 A, + const NeighborOrbitalData* __restrict__ neighbor_orbitals, + const ProjectorData* __restrict__ projectors, + const double* __restrict__ psi_radial, + const double* __restrict__ beta_radial, + const int* __restrict__ proj_m0_offset, + int total_neighbor_orbitals, + int nproj, + int natomwfc, + int nlm_dim, + cuDoubleComplex* __restrict__ nlm_out) +{ + // Thread/block indices + const int norb_idx = blockIdx.x; // Which (neighbor, orbital) pair + const int proj_idx = blockIdx.y; // Which projector + const int tid = threadIdx.x; + + // Early exit for out-of-bounds blocks + if (norb_idx >= total_neighbor_orbitals || proj_idx >= nproj) + { + return; + } + + //------------------------------------------------------------------------- + // Load input data + //------------------------------------------------------------------------- + + const NeighborOrbitalData& norb = neighbor_orbitals[norb_idx]; + const ProjectorData& proj = projectors[proj_idx]; + + const double3 R1 = norb.R1; + const int L1 = norb.L1; + const int m1 = norb.m1; + const int L0 = proj.L0; + const int m0_offset = proj_m0_offset[proj_idx]; + + // Skip if angular momentum exceeds supported limit + if (L1 > MAX_L || L0 > MAX_L) + { + return; + } + + //------------------------------------------------------------------------- + // Compute geometry + //------------------------------------------------------------------------- + + // Note: dR (R1 - R0) is computed inline as dRx/dRy/dRz in the integration loop + + // Orbital cutoff + const double r1_max = norb.psi_rcut; + + // Integration range from projector radial grid + const double r_min = proj.r_min; + const double r_max = proj.r_max; + const double xl = 0.5 * (r_max - r_min); // Half-range for Gauss-Legendre + const double xmean = 0.5 * (r_max + r_min); // Midpoint + + // Phase factor exp(i * A · R0) + const double AdotR0 = A.x * R0.x + A.y * R0.y + A.z * R0.z; + const cuDoubleComplex exp_iAR0 = cu_exp_i(AdotR0); + + //------------------------------------------------------------------------- + // Shared memory for warp reduction + //------------------------------------------------------------------------- + + constexpr int NUM_WARPS = BLOCK_SIZE / 32; // 128 / 32 = 4 warps + __shared__ double s_temp_re[NUM_WARPS]; + __shared__ double s_temp_im[NUM_WARPS]; + + //------------------------------------------------------------------------- + // Initialize accumulators (per-thread registers) + //------------------------------------------------------------------------- + + const int num_m0 = 2 * L0 + 1; + + double result_re[MAX_M0_SIZE]; + double result_im[MAX_M0_SIZE]; + double result_r_re[3][MAX_M0_SIZE]; // For current operator: x, y, z components + double result_r_im[3][MAX_M0_SIZE]; + + for (int m0 = 0; m0 < num_m0; m0++) + { + result_re[m0] = 0.0; + result_im[m0] = 0.0; + for (int d = 0; d < 3; d++) + { + result_r_re[d][m0] = 0.0; + result_r_im[d][m0] = 0.0; + } + } + + //------------------------------------------------------------------------- + // Main integration loop + // Outer: angular points (parallelized across threads) + // Inner: radial points (accumulated per thread) + //------------------------------------------------------------------------- + + for (int ian = tid; ian < ANGULAR_GRID_NUM; ian += BLOCK_SIZE) + { + // Load angular grid point + const double leb_x = d_lebedev_x[ian]; + const double leb_y = d_lebedev_y[ian]; + const double leb_z = d_lebedev_z[ian]; + const double w_ang = d_lebedev_w[ian]; + + // Precompute Y_lm for projector (independent of radial distance) + double ylm0[MAX_YLM_SIZE]; + ModuleBase::sph_harm(L0, leb_x, leb_y, leb_z, ylm0); + const int offset_L0 = L0 * L0; + + // Precompute A · direction (for phase factor) + const double A_dot_leb = A.x * leb_x + A.y * leb_y + A.z * leb_z; + + // Vector from R1 to R0 (for computing distance to orbital center) + const double dRx = R0.x - R1.x; + const double dRy = R0.y - R1.y; + const double dRz = R0.z - R1.z; + + // Radial integration +#pragma unroll 4 + for (int ir = 0; ir < RADIAL_GRID_NUM; ir++) + { + // Transform Gauss-Legendre point from [-1,1] to [r_min, r_max] + const double r_val = xmean + xl * d_gl_x[ir]; + const double w_rad = xl * d_gl_w[ir]; + + // Integration point position relative to R0 + const double rx = r_val * leb_x; + const double ry = r_val * leb_y; + const double rz = r_val * leb_z; + + // Vector from R1 to integration point + const double tx = rx + dRx; + const double ty = ry + dRy; + const double tz = rz + dRz; + const double tnorm = sqrt(tx * tx + ty * ty + tz * tz); + + // Check if within orbital cutoff + if (tnorm <= r1_max) + { + // Compute Y_lm for orbital (depends on direction from R1) + double ylm1[MAX_YLM_SIZE]; + if (tnorm > 1e-10) + { + const double inv_tnorm = 1.0 / tnorm; + ModuleBase::sph_harm(L1, tx * inv_tnorm, ty * inv_tnorm, tz * inv_tnorm, ylm1); + } + else + { + ModuleBase::sph_harm(L1, 0.0, 0.0, 1.0, ylm1); + } + + // Interpolate orbital radial function + const double psi_val + = interpolate_radial_gpu(psi_radial + norb.psi_offset, norb.psi_mesh, 1.0 / norb.psi_dk, tnorm); + + // Interpolate projector radial function + const double beta_val + = interpolate_radial_gpu(beta_radial + proj.beta_offset, proj.beta_mesh, 1.0 / proj.beta_dk, r_val); + + // Phase factor exp(i * A · r) + const double phase = r_val * A_dot_leb; + const cuDoubleComplex exp_iAr = cu_exp_i(phase); + + // Orbital Y_lm value + const double ylm_L1_val = ylm1[L1 * L1 + m1]; + + // Combined integration factor: Y_L1m1 * psi * beta * r * dr * dOmega + const double factor = ylm_L1_val * psi_val * beta_val * r_val * w_rad * w_ang; + const cuDoubleComplex common_factor = cu_mul_real(exp_iAr, factor); + + // Accumulate for all m0 components of projector +#pragma unroll + for (int m0 = 0; m0 < num_m0; m0++) + { + const double ylm0_val = ylm0[offset_L0 + m0]; + + result_re[m0] += common_factor.x * ylm0_val; + result_im[m0] += common_factor.y * ylm0_val; + + // Current operator contribution (if requested) + if (nlm_dim == 4) + { + const double r_op_x = rx + R0.x; + const double r_op_y = ry + R0.y; + const double r_op_z = rz + R0.z; + + result_r_re[0][m0] += common_factor.x * ylm0_val * r_op_x; + result_r_im[0][m0] += common_factor.y * ylm0_val * r_op_x; + result_r_re[1][m0] += common_factor.x * ylm0_val * r_op_y; + result_r_im[1][m0] += common_factor.y * ylm0_val * r_op_y; + result_r_re[2][m0] += common_factor.x * ylm0_val * r_op_z; + result_r_im[2][m0] += common_factor.y * ylm0_val * r_op_z; + } + } + } + } // End radial loop + } // End angular loop + + //------------------------------------------------------------------------- + // Parallel reduction and output + // Uses warp shuffle for efficiency, followed by cross-warp reduction + //------------------------------------------------------------------------- + + const int out_base = norb_idx * nlm_dim * natomwfc; + const int warp_id = tid / 32; + const int lane_id = tid % 32; + + for (int m0 = 0; m0 < num_m0; m0++) + { + // Step 1: Warp-level reduction using shuffle + double sum_re = warp_reduce_sum(result_re[m0]); + double sum_im = warp_reduce_sum(result_im[m0]); + + // Step 2: First lane of each warp writes to shared memory + if (lane_id == 0) + { + s_temp_re[warp_id] = sum_re; + s_temp_im[warp_id] = sum_im; + } + __syncthreads(); + + // Step 3: First warp reduces across all warps and writes output + if (warp_id == 0) + { + sum_re = (lane_id < NUM_WARPS) ? s_temp_re[lane_id] : 0.0; + sum_im = (lane_id < NUM_WARPS) ? s_temp_im[lane_id] : 0.0; + sum_re = warp_reduce_sum(sum_re); + sum_im = warp_reduce_sum(sum_im); + + if (lane_id == 0) + { + cuDoubleComplex result = make_cuDoubleComplex(sum_re, sum_im); + result = cu_mul(result, exp_iAR0); + result = cu_conj(result); + nlm_out[out_base + 0 * natomwfc + m0_offset + m0] = result; + } + } + __syncthreads(); + + // Process current operator components (if nlm_dim == 4) + if (nlm_dim == 4) + { + for (int d = 0; d < 3; d++) + { + double sum_r_re = warp_reduce_sum(result_r_re[d][m0]); + double sum_r_im = warp_reduce_sum(result_r_im[d][m0]); + + if (lane_id == 0) + { + s_temp_re[warp_id] = sum_r_re; + s_temp_im[warp_id] = sum_r_im; + } + __syncthreads(); + + if (warp_id == 0) + { + sum_r_re = (lane_id < NUM_WARPS) ? s_temp_re[lane_id] : 0.0; + sum_r_im = (lane_id < NUM_WARPS) ? s_temp_im[lane_id] : 0.0; + sum_r_re = warp_reduce_sum(sum_r_re); + sum_r_im = warp_reduce_sum(sum_r_im); + + if (lane_id == 0) + { + cuDoubleComplex result_r = make_cuDoubleComplex(sum_r_re, sum_r_im); + result_r = cu_mul(result_r, exp_iAR0); + result_r = cu_conj(result_r); + nlm_out[out_base + (d + 1) * natomwfc + m0_offset + m0] = result_r; + } + } + __syncthreads(); + } + } + } +} + +//============================================================================= +// Host-side Helper Functions +//============================================================================= + +/** + * @brief Copy integration grids to GPU constant memory + * + * Initializes the constant memory arrays with Lebedev-Laikov angular grid + * and Gauss-Legendre radial grid for use in kernel integration. + */ +void copy_grids_to_device() +{ + // Copy Lebedev-Laikov 110-point angular quadrature grid + CHECK_CUDA(cudaMemcpyToSymbol(d_lebedev_x, + ModuleBase::Integral::Lebedev_Laikov_grid110_x, + ANGULAR_GRID_NUM * sizeof(double))); + CHECK_CUDA(cudaMemcpyToSymbol(d_lebedev_y, + ModuleBase::Integral::Lebedev_Laikov_grid110_y, + ANGULAR_GRID_NUM * sizeof(double))); + CHECK_CUDA(cudaMemcpyToSymbol(d_lebedev_z, + ModuleBase::Integral::Lebedev_Laikov_grid110_z, + ANGULAR_GRID_NUM * sizeof(double))); + CHECK_CUDA(cudaMemcpyToSymbol(d_lebedev_w, + ModuleBase::Integral::Lebedev_Laikov_grid110_w, + ANGULAR_GRID_NUM * sizeof(double))); + + // Compute and copy Gauss-Legendre radial quadrature grid + std::vector h_gl_x(RADIAL_GRID_NUM); + std::vector h_gl_w(RADIAL_GRID_NUM); + ModuleBase::Integral::Gauss_Legendre_grid_and_weight(RADIAL_GRID_NUM, h_gl_x.data(), h_gl_w.data()); + + CHECK_CUDA(cudaMemcpyToSymbol(d_gl_x, h_gl_x.data(), RADIAL_GRID_NUM * sizeof(double))); + CHECK_CUDA(cudaMemcpyToSymbol(d_gl_w, h_gl_w.data(), RADIAL_GRID_NUM * sizeof(double))); +} + +} // namespace gpu +} // namespace module_rt diff --git a/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cuh b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cuh new file mode 100644 index 0000000000..d658378ce7 --- /dev/null +++ b/source/source_lcao/module_rt/kernels/cuda/snap_psibeta_kernel.cuh @@ -0,0 +1,259 @@ +/** + * @file snap_psibeta_kernel.cuh + * @brief CUDA kernel declarations for computing overlap integrals + * + * This file provides GPU-accelerated computation of overlap integrals between + * atomic orbitals (psi) and non-local projectors (beta) for real-time TDDFT + * calculations. The implementation uses numerical integration on a combined + * radial (Gauss-Legendre) and angular (Lebedev-Laikov) grid. + * + * Key Features: + * - Atom-level batching: processes all neighbors for a center atom in single kernel + * - Templated spherical harmonics for compile-time optimization + * - Efficient memory access via constant memory for integration grids + * - Warp-level reduction for high-performance summation + */ + +#ifndef SNAP_PSIBETA_KERNEL_CUH +#define SNAP_PSIBETA_KERNEL_CUH + +#include "source_base/tool_quit.h" +#include "source_base/kernels/cuda/sph_harm_gpu.cuh" +#include "source_base/module_device/device_check.h" + +#include +#include +#include +#include + +namespace module_rt +{ +namespace gpu +{ + +//============================================================================= +// Configuration Constants +//============================================================================= + +/// Number of points in radial Gauss-Legendre grid +constexpr int RADIAL_GRID_NUM = 140; + +/// Number of points in angular Lebedev-Laikov grid (110-point rule) +constexpr int ANGULAR_GRID_NUM = 110; + +/// Thread block size for kernel execution +constexpr int BLOCK_SIZE = 128; + +/// Maximum supported angular momentum quantum number L +constexpr int MAX_L = 4; + +/// Size of spherical harmonics array: (MAX_L + 1)^2 = 25 +constexpr int MAX_YLM_SIZE = (MAX_L + 1) * (MAX_L + 1); + +/// Maximum number of magnetic quantum numbers for a single L: 2*MAX_L + 1 = 9 +constexpr int MAX_M0_SIZE = 2 * MAX_L + 1; + +//============================================================================= +// Device Helper Functions - Complex Arithmetic +//============================================================================= + +/** + * @brief Compute exp(i * theta) = cos(theta) + i * sin(theta) + * @param theta Phase angle in radians + * @return Complex exponential as cuDoubleComplex + */ +__device__ __forceinline__ cuDoubleComplex cu_exp_i(double theta) +{ + double s, c; + sincos(theta, &s, &c); + return make_cuDoubleComplex(c, s); +} + +/** + * @brief Complex multiplication: a * b + */ +__device__ __forceinline__ cuDoubleComplex cu_mul(cuDoubleComplex a, cuDoubleComplex b) +{ + return make_cuDoubleComplex(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); +} + +/** + * @brief Complex addition: a + b + */ +__device__ __forceinline__ cuDoubleComplex cu_add(cuDoubleComplex a, cuDoubleComplex b) +{ + return make_cuDoubleComplex(a.x + b.x, a.y + b.y); +} + +/** + * @brief Complex conjugate: conj(a) + */ +__device__ __forceinline__ cuDoubleComplex cu_conj(cuDoubleComplex a) +{ + return make_cuDoubleComplex(a.x, -a.y); +} + +/** + * @brief Complex times real: a * r + */ +__device__ __forceinline__ cuDoubleComplex cu_mul_real(cuDoubleComplex a, double r) +{ + return make_cuDoubleComplex(a.x * r, a.y * r); +} + +//============================================================================= +// Device Helper Functions - Radial Interpolation +//============================================================================= + +/** + * @brief Cubic spline interpolation for radial functions + * + * Implements cubic polynomial interpolation using 4 consecutive grid points. + * This is the GPU equivalent of CPU-side PolyInt::Polynomial_Interpolation. + * + * @param psi Radial function values on uniform grid + * @param mesh Number of grid points + * @param inv_dk Inverse of grid spacing (1/dk) + * @param distance Radial distance r at which to interpolate + * @return Interpolated function value + */ +__device__ __forceinline__ double interpolate_radial_gpu(const double* __restrict__ psi, + int mesh, + double inv_dk, + double distance) +{ + double position = distance * inv_dk; + int iq = __double2int_rd(position); // floor(position) + + // Boundary checks + if (iq > mesh - 4 || iq < 0) + { + return 0.0; + } + + // Lagrange interpolation weights + double x0 = position - static_cast(iq); + double x1 = 1.0 - x0; + double x2 = 2.0 - x0; + double x3 = 3.0 - x0; + + // 4-point Lagrange interpolation formula + return x1 * x2 * (psi[iq] * x3 + psi[iq + 3] * x0) / 6.0 + x0 * x3 * (psi[iq + 1] * x2 - psi[iq + 2] * x1) / 2.0; +} + +//============================================================================= +// Device Helper Functions - Spherical Harmonics +//============================================================================= + + +//============================================================================= +// Data Structures for Kernel Input +//============================================================================= + +/** + * @brief Non-local projector (beta function) information + * + * Contains all data needed to evaluate a single projector during integration. + */ +struct ProjectorData +{ + int L0; ///< Angular momentum quantum number + int beta_offset; ///< Offset into flattened beta radial array + int beta_mesh; ///< Number of radial mesh points + double beta_dk; ///< Radial grid spacing + double beta_rcut; ///< Cutoff radius for projector + double r_min; ///< Minimum radial grid value (integration start) + double r_max; ///< Maximum radial grid value (integration end) +}; + +/** + * @brief Neighbor atom orbital information for atom-level batching + * + * Each structure represents one (neighbor_atom, orbital) pair that contributes + * to the overlap integral. This enables processing ALL neighbors for a center + * atom in a single kernel launch, minimizing launch overhead. + */ +struct NeighborOrbitalData +{ + int neighbor_idx; ///< Index of neighbor atom (ad index in adjacency list) + double3 R1; ///< Neighbor atom position in Cartesian coordinates (tau * lat0) + + // Orbital information + int L1; ///< Angular momentum of orbital + int m1; ///< Magnetic quantum number of orbital + int N1; ///< Radial quantum number of orbital + int iw_index; ///< Global orbital index for output mapping + int psi_offset; ///< Offset into flattened psi radial array + int psi_mesh; ///< Number of radial mesh points for orbital + double psi_dk; ///< Radial grid spacing for orbital + double psi_rcut; ///< Cutoff radius for orbital +}; + +//============================================================================= +// Main CUDA Kernel Declaration +//============================================================================= + +/** + * @brief Atom-level batch kernel for overlap computation + * + * This kernel processes ALL neighbor orbitals for a single center atom in one + * launch, significantly reducing kernel launch overhead. Each thread block + * handles the integration for one (neighbor_orbital, projector) pair. + * + * Grid Configuration: + * - gridDim.x = total_neighbor_orbitals (all orbitals from all neighbors) + * - gridDim.y = nproj (number of projectors on center atom) + * + * Block Configuration: + * - blockDim.x = BLOCK_SIZE threads for parallel integration + * + * Integration Strategy: + * - Angular loop (outer): each thread processes different angular points + * - Radial loop (inner): each thread accumulates over all radial points + * - Warp shuffle reduction for efficient summation + * + * @param R0 Center atom position (projector location) + * @param A Vector potential for phase factor + * @param neighbor_orbitals Array of neighbor-orbital data [total_neighbor_orbitals] + * @param projectors Array of projector data [nproj] + * @param psi_radial Flattened array of orbital radial functions + * @param beta_radial Flattened array of projector radial functions + * @param proj_m0_offset Starting index of each projector's m=0 component in output + * @param total_neighbor_orbitals Total number of (neighbor, orbital) pairs + * @param nproj Number of projectors on center atom + * @param natomwfc Total projector components: sum of (2*L0+1) for all projectors + * @param nlm_dim Output dimension: 1 for overlap only, 4 for overlap + current + * @param nlm_out Output array [total_neighbor_orbitals * nlm_dim * natomwfc] + */ +__global__ void snap_psibeta_atom_batch_kernel(double3 R0, + double3 A, + const NeighborOrbitalData* __restrict__ neighbor_orbitals, + const ProjectorData* __restrict__ projectors, + const double* __restrict__ psi_radial, + const double* __restrict__ beta_radial, + const int* __restrict__ proj_m0_offset, + int total_neighbor_orbitals, + int nproj, + int natomwfc, + int nlm_dim, + cuDoubleComplex* __restrict__ nlm_out); + +//============================================================================= +// Host-side Initialization +//============================================================================= + +/** + * @brief Copy integration grids to GPU constant memory + * + * Copies the Lebedev-Laikov angular grid (110 points) and Gauss-Legendre + * radial grid (140 points) to CUDA constant memory for fast access during + * kernel execution. + * + * @note Must be called once before any kernel launches in a calculation session. + */ +void copy_grids_to_device(); + +} // namespace gpu +} // namespace module_rt + +#endif // SNAP_PSIBETA_KERNEL_CUH diff --git a/source/source_lcao/module_rt/kernels/snap_psibeta_gpu.h b/source/source_lcao/module_rt/kernels/snap_psibeta_gpu.h new file mode 100644 index 0000000000..6e97b078f4 --- /dev/null +++ b/source/source_lcao/module_rt/kernels/snap_psibeta_gpu.h @@ -0,0 +1,64 @@ +#ifndef SNAP_PSIBETA_GPU_H +#define SNAP_PSIBETA_GPU_H + +#include "source_base/vector3.h" +#include "source_basis/module_ao/ORB_read.h" +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_cell/module_neighbor/sltk_grid_driver.h" +#include "source_cell/setup_nonlocal.h" +#include "source_cell/unitcell.h" + +#include +#include +#include + +#ifdef __CUDA +#include +#endif + +namespace module_rt +{ +namespace gpu +{ + +/** + * @brief Initialize GPU resources for snap_psibeta module (copy grids to constant memory) + * Should be called at the start of each calculate_HR + */ +void init_snap_psibeta_gpu(); + +/** + * @brief Atom-level GPU batch processing interface + * + * Processes ALL neighbors for a center atom in a SINGLE kernel launch. + * This significantly reduces kernel launch overhead compared to neighbor-level batching. + * + * @param orb Orbital information + * @param infoNL_ Non-local pseudopotential information + * @param T0 Center atom type (projector location) + * @param R0 Center atom position (already multiplied by lat0) + * @param A Vector potential + * @param adjs Adjacent atom information for this center atom + * @param ucell Unit cell pointer + * @param paraV Parallel orbitals information + * @param npol Polarization number + * @param nlm_dim 1 for no current, 4 for current calculation + * @param nlm_tot Output: nlm_tot[ad][dir][iw_index] = nlm_vector + */ +void snap_psibeta_atom_batch_gpu( + const LCAO_Orbitals& orb, + const InfoNonlocal& infoNL_, + const int T0, + const ModuleBase::Vector3& R0, + const ModuleBase::Vector3& A, + const AdjacentAtomInfo& adjs, + const UnitCell* ucell, + const Parallel_Orbitals* paraV, + const int npol, + const int nlm_dim, + std::vector>>>>& nlm_tot); + +} // namespace gpu +} // namespace module_rt + +#endif // SNAP_PSIBETA_GPU_H diff --git a/source/source_lcao/module_rt/norm_psi.cpp b/source/source_lcao/module_rt/norm_psi.cpp index 307cef9f80..d29972dce3 100644 --- a/source/source_lcao/module_rt/norm_psi.cpp +++ b/source/source_lcao/module_rt/norm_psi.cpp @@ -16,7 +16,7 @@ namespace module_rt inline int globalIndex(int localindex, int nblk, int nprocs, int myproc) { - int iblock, gIndex; + int iblock = 0, gIndex = 0; iblock = localindex / nblk; gIndex = (iblock * nprocs + myproc) * nblk + localindex % nblk; return gIndex; diff --git a/source/source_lcao/module_rt/propagator.cpp b/source/source_lcao/module_rt/propagator.cpp index c058d0eedf..2854839066 100644 --- a/source/source_lcao/module_rt/propagator.cpp +++ b/source/source_lcao/module_rt/propagator.cpp @@ -1,11 +1,11 @@ #include "propagator.h" +#include "source_base/global_function.h" #include "source_base/module_container/ATen/kernels/blas.h" #include "source_base/module_container/ATen/kernels/lapack.h" #include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) #include "source_base/module_device/memory_op.h" // memory operations #include "source_io/module_parameter/parameter.h" -#include "source_base/global_function.h" #include #include @@ -24,7 +24,7 @@ void Propagator::compute_propagator(const int nlocal, std::ofstream& ofs_running, const int print_matrix) const { - int tag; + int tag = 0; switch (ptype) { case 0: @@ -56,7 +56,7 @@ void Propagator::compute_propagator_tensor(const int nlocal, const int print_matrix, const bool use_lapack) const { - int tag; + int tag = 0; switch (ptype) { case 0: diff --git a/source/source_lcao/module_rt/propagator_cn2.cpp b/source/source_lcao/module_rt/propagator_cn2.cpp index accb578ecb..01614c9792 100644 --- a/source/source_lcao/module_rt/propagator_cn2.cpp +++ b/source/source_lcao/module_rt/propagator_cn2.cpp @@ -1,16 +1,16 @@ -#include "source_base/module_external/blas_connector.h" +#include "propagator.h" +#include "source_base/global_function.h" #include "source_base/module_container/ATen/kernels/blas.h" #include "source_base/module_container/ATen/kernels/lapack.h" #include "source_base/module_container/ATen/kernels/memory.h" // memory operations (Tensor) #include "source_base/module_device/memory_op.h" // memory operations +#include "source_base/module_external/blas_connector.h" #include "source_base/module_external/scalapack_connector.h" #include "source_io/module_parameter/parameter.h" -#include "propagator.h" -#include "source_base/global_function.h" +#include #include #include -#include namespace module_rt { diff --git a/source/source_lcao/module_rt/snap_psibeta_half_tddft.cpp b/source/source_lcao/module_rt/snap_psibeta_half_tddft.cpp index a0bb7c3548..e8adc48215 100644 --- a/source/source_lcao/module_rt/snap_psibeta_half_tddft.cpp +++ b/source/source_lcao/module_rt/snap_psibeta_half_tddft.cpp @@ -6,11 +6,58 @@ #include "source_base/timer.h" #include "source_base/ylm.h" +#include +#include +#include + namespace module_rt { -// nlm[0] : -// nlm[1, 2, 3,] : , which a = x, y, z. +/** + * @brief Initialize Gauss-Legendre grid points and weights. + * Thread-safe initialization using static local variable. + * + * @param grid_size Number of grid points (140) + * @param gl_x Output: Grid points in [-1, 1] + * @param gl_w Output: Weights + */ +static void init_gauss_legendre_grid(int grid_size, std::vector& gl_x, std::vector& gl_w) +{ + static bool init = false; +// Thread-safe initialization +#pragma omp critical(init_gauss_legendre) + { + if (!init) + { + ModuleBase::Integral::Gauss_Legendre_grid_and_weight(grid_size, gl_x.data(), gl_w.data()); + init = true; + } + } +} + +/** + * @brief Main function to calculate overlap integrals + * and its derivatives (if calc_r is true). + * + * This function integrates the overlap between a local orbital phi (at R1) + * and a non-local projector beta (at R0), modulated by a plane-wave-like phase factor + * exp^{-iAr}, where A is a vector potential. + * + * @param orb LCAO Orbitals information + * @param infoNL_ Non-local pseudopotential information + * @param nlm Output: + * nlm[0] : + * nlm[1, 2, 3] : , a = x, y, z (if calc_r=true) + * @param R1 Position of atom 1 (orbital phi) + * @param T1 Type of atom 1 + * @param L1 Angular momentum of orbital phi + * @param m1 Magnetic quantum number of orbital phi + * @param N1 Radial quantum number of orbital phi + * @param R0 Position of atom 0 (projector beta) + * @param T0 Type of atom 0 + * @param A Vector potential A (or related field vector) + * @param calc_r Whether to calculate position operator matrix elements + */ void snap_psibeta_half_tddft(const LCAO_Orbitals& orb, const InfoNonlocal& infoNL_, std::vector>>& nlm, @@ -19,229 +66,286 @@ void snap_psibeta_half_tddft(const LCAO_Orbitals& orb, const int& L1, const int& m1, const int& N1, - const ModuleBase::Vector3& R0, // The projector. + const ModuleBase::Vector3& R0, const int& T0, const ModuleBase::Vector3& A, const bool& calc_r) { ModuleBase::timer::tick("module_rt", "snap_psibeta_half_tddft"); - // find number of projectors on atom R0 + // 1. Initialization and Early Exits const int nproj = infoNL_.nproj[T0]; - if (nproj == 0) - { - if (calc_r) - { - nlm.resize(4); - } - else - { - nlm.resize(1); - } - return; - } - std::vector calproj(nproj); - std::vector rmesh1(nproj); + // Resize output vector based on whether position operator matrix elements are needed + int required_size = calc_r ? 4 : 1; + if (nlm.size() != required_size) + nlm.resize(required_size); - if (calc_r) - { - nlm.resize(4); - } - else - { - nlm.resize(1); - } + if (nproj == 0) + return; - // Count number of projectors (l,m) + // 2. Determine total number of projectors and identify active ones based on cutoff int natomwfc = 0; - for (int ip = 0; ip < nproj; ip++) - { - //============================ - // Use pseudo-atomic orbitals - //============================ - - const int L0 = infoNL_.Beta[T0].Proj[ip].getL(); // mohan add 2021-05-07 - natomwfc += 2 * L0 + 1; - } - - for (int dim = 0; dim < nlm.size(); dim++) - { - nlm[dim].resize(natomwfc); - for (auto& x: nlm[dim]) - { - x = 0.0; - } - } + std::vector calproj(nproj, false); - // rcut of orbtials and projectors - // in our calculation, we always put orbital phi at the left side of - // because = const double Rcut1 = orb.Phi[T1].getRcut(); const ModuleBase::Vector3 dRa = R0 - R1; + const double distance10 = dRa.norm(); - double distance10 = dRa.norm(); - - bool all_out = true; + bool any_active = false; for (int ip = 0; ip < nproj; ip++) { + const int L0 = infoNL_.Beta[T0].Proj[ip].getL(); + natomwfc += 2 * L0 + 1; + const double Rcut0 = infoNL_.Beta[T0].Proj[ip].getRcut(); - if (distance10 > (Rcut1 + Rcut0)) - { - calproj[ip] = false; - } - else + if (distance10 <= (Rcut1 + Rcut0)) { - all_out = false; calproj[ip] = true; + any_active = true; } } - if (all_out) + // Initialize output values to zero and resize inner vectors + for (auto& x: nlm) + { + x.assign(natomwfc, 0.0); + } + + if (!any_active) { ModuleBase::timer::tick("module_rt", "snap_psibeta_half_tddft"); return; } - const int mesh_r1 = orb.Phi[T1].PhiLN(L1, N1).getNr(); - const double* psi_1 = orb.Phi[T1].PhiLN(L1, N1).getPsi(); - const double dk_1 = orb.Phi[T1].PhiLN(L1, N1).getDk(); + // 3. Prepare Orbital Data (Phi) + const auto& phi_ln = orb.Phi[T1].PhiLN(L1, N1); + const int mesh_r1 = phi_ln.getNr(); + const double* psi_1 = phi_ln.getPsi(); + const double dk_1 = phi_ln.getDk(); - const int ridial_grid_num = 140; + // 4. Prepare Integration Grids + const int radial_grid_num = 140; const int angular_grid_num = 110; - std::vector r_ridial(ridial_grid_num); - std::vector weights_ridial(ridial_grid_num); - int index = 0; + // Cached standard Gauss-Legendre grid + static std::vector gl_x(radial_grid_num); + static std::vector gl_w(radial_grid_num); + init_gauss_legendre_grid(radial_grid_num, gl_x, gl_w); + + // Buffers for mapped radial grid + std::vector r_radial(radial_grid_num); + std::vector w_radial(radial_grid_num); + + // Precompute A dot r_angular (A * u_angle) for the Lebedev grid + std::vector A_dot_lebedev(angular_grid_num); + for (int ian = 0; ian < angular_grid_num; ++ian) + { + A_dot_lebedev[ian] = A.x * ModuleBase::Integral::Lebedev_Laikov_grid110_x[ian] + + A.y * ModuleBase::Integral::Lebedev_Laikov_grid110_y[ian] + + A.z * ModuleBase::Integral::Lebedev_Laikov_grid110_z[ian]; + } + + // Reuseable buffers for inner loops to avoid allocation + std::vector> result_angular; // Accumulator for angular integration + // Accumulators for position operator components + std::vector> res_ang_x, res_ang_y, res_ang_z; + + std::vector rly1((L1 + 1) * (L1 + 1)); // Spherical harmonics buffer for L1 + std::vector> rly0_cache(angular_grid_num); // Cache for L0 Ylm + + // 5. Loop over Projectors (Beta) + int index_offset = 0; for (int nb = 0; nb < nproj; nb++) { const int L0 = infoNL_.Beta[T0].Proj[nb].getL(); + const int num_m0 = 2 * L0 + 1; + if (!calproj[nb]) { - index += 2 * L0 + 1; + index_offset += num_m0; continue; } - const int mesh_r0 = infoNL_.Beta[T0].Proj[nb].getNr(); - const double* beta_r = infoNL_.Beta[T0].Proj[nb].getBeta_r(); - const double* radial0 = infoNL_.Beta[T0].Proj[nb].getRadial(); - const double dk_0 = infoNL_.Beta[T0].Proj[nb].getDk(); + const auto& proj = infoNL_.Beta[T0].Proj[nb]; + const int mesh_r0 = proj.getNr(); + const double* beta_r = proj.getBeta_r(); + const double* radial0 = proj.getRadial(); + const double dk_0 = proj.getDk(); + const double Rcut0 = proj.getRcut(); - const double Rcut0 = infoNL_.Beta[T0].Proj[nb].getRcut(); - ModuleBase::Integral::Gauss_Legendre_grid_and_weight(radial0[0], - radial0[mesh_r0 - 1], - ridial_grid_num, - r_ridial.data(), - weights_ridial.data()); + // 5.1 Map Gauss-Legendre grid to radial interval [r_min, r_max] + double r_min = radial0[0]; + double r_max = radial0[mesh_r0 - 1]; + double xl = (r_max - r_min) * 0.5; + double xmean = (r_max + r_min) * 0.5; + + for (int i = 0; i < radial_grid_num; ++i) + { + r_radial[i] = xmean + xl * gl_x[i]; + w_radial[i] = xl * gl_w[i]; + } const double A_phase = A * R0; const std::complex exp_iAR0 = std::exp(ModuleBase::IMAG_UNIT * A_phase); - std::vector rly0(L0); - std::vector rly1(L1); - for (int ir = 0; ir < ridial_grid_num; ir++) + // 5.2 Precompute Spherical Harmonics (Ylm) for L0 on angular grid + // Since L0 changes with projector, we compute this per projector loop. + for (int ian = 0; ian < angular_grid_num; ++ian) + { + ModuleBase::Ylm::rl_sph_harm(L0, + ModuleBase::Integral::Lebedev_Laikov_grid110_x[ian], + ModuleBase::Integral::Lebedev_Laikov_grid110_y[ian], + ModuleBase::Integral::Lebedev_Laikov_grid110_z[ian], + rly0_cache[ian]); + } + + // Resize accumulators if needed + if (result_angular.size() < num_m0) { - std::vector> result_angular(2 * L0 + 1, 0.0); - std::vector> result_angular_r_commu_x; - std::vector> result_angular_r_commu_y; - std::vector> result_angular_r_commu_z; + result_angular.resize(num_m0); if (calc_r) { - result_angular_r_commu_x.resize(2 * L0 + 1, 0.0); - result_angular_r_commu_y.resize(2 * L0 + 1, 0.0); - result_angular_r_commu_z.resize(2 * L0 + 1, 0.0); + res_ang_x.resize(num_m0); + res_ang_y.resize(num_m0); + res_ang_z.resize(num_m0); } + } + + // 5.3 Radial Integration Loop + for (int ir = 0; ir < radial_grid_num; ir++) + { + const double r_val = r_radial[ir]; + // Reset angular accumulators for this radial shell + std::fill(result_angular.begin(), result_angular.begin() + num_m0, 0.0); + if (calc_r) + { + std::fill(res_ang_x.begin(), res_ang_x.begin() + num_m0, 0.0); + std::fill(res_ang_y.begin(), res_ang_y.begin() + num_m0, 0.0); + std::fill(res_ang_z.begin(), res_ang_z.begin() + num_m0, 0.0); + } + + // 5.4 Angular Integration Loop (Lebedev Grid) for (int ian = 0; ian < angular_grid_num; ian++) { const double x = ModuleBase::Integral::Lebedev_Laikov_grid110_x[ian]; const double y = ModuleBase::Integral::Lebedev_Laikov_grid110_y[ian]; const double z = ModuleBase::Integral::Lebedev_Laikov_grid110_z[ian]; - const double weights_angular = ModuleBase::Integral::Lebedev_Laikov_grid110_w[ian]; - const ModuleBase::Vector3 r_angular_tmp(x, y, z); + const double w_ang = ModuleBase::Integral::Lebedev_Laikov_grid110_w[ian]; - const ModuleBase::Vector3 r_coor = r_ridial[ir] * r_angular_tmp; - const ModuleBase::Vector3 tmp_r_coor = r_coor + dRa; - const double tmp_r_coor_norm = tmp_r_coor.norm(); - if (tmp_r_coor_norm > Rcut1) - { + // Vector r = r_val * u_angle + double rx = r_val * x; + double ry = r_val * y; + double rz = r_val * z; + + // Vector r' = r + R0 - R1 = r + dRa + double tx = rx + dRa.x; + double ty = ry + dRa.y; + double tz = rz + dRa.z; + + double tnorm = std::sqrt(tx * tx + ty * ty + tz * tz); + + // If r' is outside the cutoff of Phi(r'), skip + if (tnorm > Rcut1) continue; - } - ModuleBase::Vector3 tmp_r_unit; - if (tmp_r_coor_norm > 1e-10) + // Compute Ylm for L1 at direction r' + if (tnorm > 1e-10) + { + double inv_tnorm = 1.0 / tnorm; + ModuleBase::Ylm::rl_sph_harm(L1, tx * inv_tnorm, ty * inv_tnorm, tz * inv_tnorm, rly1); + } + else { - tmp_r_unit = tmp_r_coor / tmp_r_coor_norm; + // At origin, only Y_00 is non-zero (if using real spherical harmonics convention) + ModuleBase::Ylm::rl_sph_harm(L1, 0.0, 0.0, 1.0, rly1); } - ModuleBase::Ylm::rl_sph_harm(L0, x, y, z, rly0); + // Calculate common phase and weight factor + // phase = A * r = r_val * (A * u_angle) + const double phase = r_val * A_dot_lebedev[ian]; + const std::complex exp_iAr = std::exp(ModuleBase::IMAG_UNIT * phase); - ModuleBase::Ylm::rl_sph_harm(L1, tmp_r_unit.x, tmp_r_unit.y, tmp_r_unit.z, rly1); + // Interpolate Psi at |r'| + double interp_psi = ModuleBase::PolyInt::Polynomial_Interpolation(psi_1, mesh_r1, dk_1, tnorm); - const double phase = A * r_coor; - const std::complex exp_iAr = std::exp(ModuleBase::IMAG_UNIT * phase); + const int offset_L1 = L1 * L1 + m1; + const double ylm_L1_val = rly1[offset_L1]; - const ModuleBase::Vector3 tmp_r_coor_r_commu = r_coor + R0; - const double interp_v = ModuleBase::PolyInt::Polynomial_Interpolation(psi_1, - mesh_r1, dk_1, tmp_r_coor_norm); + // Combined factor: exp(iAr) * Y_L1m1(r') * Psi(|r'|) * weight_angle + const std::complex common_factor = exp_iAr * ylm_L1_val * interp_psi * w_ang; - for (int m0 = 0; m0 < 2 * L0 + 1; m0++) + // Retrieve precomputed Y_L0m0(r) + const std::vector& rly0_vec = rly0_cache[ian]; + const int offset_L0 = L0 * L0; + + // Accumulate results for all m0 components + for (int m0 = 0; m0 < num_m0; m0++) { - std::complex temp = exp_iAr * rly0[L0 * L0 + m0] * rly1[L1 * L1 + m1] - * interp_v * weights_angular; - result_angular[m0] += temp; + std::complex term = common_factor * rly0_vec[offset_L0 + m0]; + result_angular[m0] += term; if (calc_r) { - result_angular_r_commu_x[m0] += temp * tmp_r_coor_r_commu.x; - result_angular_r_commu_y[m0] += temp * tmp_r_coor_r_commu.y; - result_angular_r_commu_z[m0] += temp * tmp_r_coor_r_commu.z; + // Position operator r_op = r + R0 + // Note: Term involves (r_op)_a * exp(...). + double r_op_x = rx + R0.x; + double r_op_y = ry + R0.y; + double r_op_z = rz + R0.z; + + res_ang_x[m0] += term * r_op_x; + res_ang_y[m0] += term * r_op_y; + res_ang_z[m0] += term * r_op_z; } } - } + } // End Angular Loop - int index_tmp = index; - const double temp = ModuleBase::PolyInt::Polynomial_Interpolation(beta_r, - mesh_r0, dk_0, r_ridial[ir]) * r_ridial[ir] * weights_ridial[ir]; + // 5.5 Combine Radial and Angular parts + // Interpolate Beta(|r|) + // Note: The original code implies beta_r stores values that might need scaling or are just the function + // values. Typically radial integration is \int f(r) r^2 dr. Here we have factor: beta_val * r_radial[ir] * + // w_radial[ir] w_radial includes the Jacobian for the change of variable from [-1,1] to [r_min, r_max]. The + // extra r_radial[ir] suggests either beta is stored as r*beta, or we are doing \int ... r dr (2D?), or + // Jacobian r^2 is split. Assuming original logic is correct. - if (!calc_r) - { - for (int m0 = 0; m0 < 2 * L0 + 1; m0++) - { - nlm[0][index_tmp] += temp * result_angular[m0] * exp_iAR0; - index_tmp++; - } - } - else + double beta_val = ModuleBase::PolyInt::Polynomial_Interpolation(beta_r, mesh_r0, dk_0, r_radial[ir]); + + double radial_factor = beta_val * r_radial[ir] * w_radial[ir]; + + int current_idx = index_offset; + for (int m0 = 0; m0 < num_m0; m0++) { - for (int m0 = 0; m0 < 2 * L0 + 1; m0++) + // Final accumulation into global nlm array + // Add phase exp(i A * R0) + nlm[0][current_idx] += radial_factor * result_angular[m0] * exp_iAR0; + + if (calc_r) { - nlm[0][index_tmp] += temp * result_angular[m0] * exp_iAR0; - nlm[1][index_tmp] += temp * result_angular_r_commu_x[m0] * exp_iAR0; - nlm[2][index_tmp] += temp * result_angular_r_commu_y[m0] * exp_iAR0; - nlm[3][index_tmp] += temp * result_angular_r_commu_z[m0] * exp_iAR0; - index_tmp++; + nlm[1][current_idx] += radial_factor * res_ang_x[m0] * exp_iAR0; + nlm[2][current_idx] += radial_factor * res_ang_y[m0] * exp_iAR0; + nlm[3][current_idx] += radial_factor * res_ang_z[m0] * exp_iAR0; } + current_idx++; } - } - index += 2 * L0 + 1; - } + } // End Radial Loop + + index_offset += num_m0; + } // End Projector Loop - for(int dim = 0; dim < nlm.size(); dim++) + // 6. Final Conjugation + // Apply conjugation to all elements as per convention = * + for (int dim = 0; dim < nlm.size(); dim++) { - for (auto &x : nlm[dim]) + for (auto& x: nlm[dim]) { - // nlm[0] is - // nlm[1 or 2 or 3] is , a = x, y, z - x = std::conj(x); + x = std::conj(x); } } - assert(index == natomwfc); + assert(index_offset == natomwfc); ModuleBase::timer::tick("module_rt", "snap_psibeta_half_tddft"); - - return; } -} // namespace module_rt +} // namespace module_rt \ No newline at end of file diff --git a/source/source_lcao/module_rt/solve_propagation.cpp b/source/source_lcao/module_rt/solve_propagation.cpp index 01a08e0425..298bf2eef9 100644 --- a/source/source_lcao/module_rt/solve_propagation.cpp +++ b/source/source_lcao/module_rt/solve_propagation.cpp @@ -1,10 +1,11 @@ #include "solve_propagation.h" +#include "source_base/module_external/scalapack_connector.h" +#include "source_base/module_external/blas_connector.h" +#include "source_base/constants.h" +#include "source_base/global_function.h" #include -#include "source_base/module_external/scalapack_connector.h" -#include "source_pw/module_pwdft/global.h" - namespace module_rt { #ifdef __MPI diff --git a/source/source_lcao/module_rt/td_folding.cpp b/source/source_lcao/module_rt/td_folding.cpp index 13d358c53b..ed42b7524e 100644 --- a/source/source_lcao/module_rt/td_folding.cpp +++ b/source/source_lcao/module_rt/td_folding.cpp @@ -2,13 +2,13 @@ #include "source_base/libm/libm.h" namespace module_rt{ template -void folding_HR_td(const hamilt::HContainer& hR, +void folding_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, std::complex* hk, const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& cart_At, const int ncol, - const int hk_type, - const UnitCell* ucell, - const ModuleBase::Vector3& cart_At) + const int hk_type) { #ifdef _OPENMP #pragma omp parallel for @@ -24,15 +24,15 @@ void folding_HR_td(const hamilt::HContainer& hR, //cal tddft phase for hybrid gauge const int iat1 = tmp.get_atom_i(); const int iat2 = tmp.get_atom_j(); - ModuleBase::Vector3 dtau = ucell->cal_dtau(iat1, iat2, r_index); - const double arg_td = cart_At * dtau * ucell->lat0; + ModuleBase::Vector3 dtau = ucell.cal_dtau(iat1, iat2, r_index); + const double arg_td = cart_At * dtau * ucell.lat0; //new // cal k_phase // if TK==std::complex, kphase is e^{ikR} const ModuleBase::Vector3 dR(r_index.x, r_index.y, r_index.z); const double arg = (kvec_d_in * dR) * ModuleBase::TWO_PI + arg_td; - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); std::complex kphase = std::complex(cosp, sinp); @@ -41,20 +41,128 @@ void folding_HR_td(const hamilt::HContainer& hR, } } } + +template +void folding_partial_HR(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const int ix, + const int ncol, + const int hk_type) +{ +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int i = 0; i < hR.size_atom_pairs(); ++i) + { + hamilt::AtomPair& tmp = hR.get_atom_pair(i); + for(int ir = 0;ir < tmp.get_R_size(); ++ir ) + { + const ModuleBase::Vector3 r_index = tmp.get_R_index(ir); + const ModuleBase::Vector3 dR(r_index.x, r_index.y, r_index.z); + const double arg = (kvec_d_in * dR) * ModuleBase::TWO_PI; + double sinp = 0.0, cosp = 0.0; + ModuleBase::libm::sincos(arg, &sinp, &cosp); + std::complex kphase = std::complex(cosp, sinp); + const ModuleBase::Vector3 dR_car = dR * ucell.latvec * ucell.lat0; + + tmp.find_R(r_index); + tmp.add_to_matrix(hk, ncol, kphase * ModuleBase::IMAG_UNIT * std::complex(dR_car[ix]), hk_type); + } + } +} + +template +void folding_partial_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& cart_At, + const int ix, + const int ncol, + const int hk_type) +{ +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (int i = 0; i < hR.size_atom_pairs(); ++i) + { + hamilt::AtomPair& tmp = hR.get_atom_pair(i); + for(int ir = 0;ir < tmp.get_R_size(); ++ir ) + { + const ModuleBase::Vector3 r_index = tmp.get_R_index(ir); + + //new + //cal tddft phase for mixing gague + const int iat1 = tmp.get_atom_i(); + const int iat2 = tmp.get_atom_j(); + ModuleBase::Vector3 dtau = ucell.cal_dtau(iat1, iat2, r_index); + const double arg_td = cart_At * dtau * ucell.lat0; + + //new + // cal k_phase + // if TK==std::complex, kphase is e^{ikR} + const ModuleBase::Vector3 dR(r_index.x, r_index.y, r_index.z); + const double arg = (kvec_d_in * dR) * ModuleBase::TWO_PI + arg_td; + double sinp = 0.0, cosp = 0.0; + ModuleBase::libm::sincos(arg, &sinp, &cosp); + std::complex kphase = std::complex(cosp, sinp); + const ModuleBase::Vector3 dR_car = dR * ucell.latvec * ucell.lat0; + + tmp.find_R(r_index); + tmp.add_to_matrix(hk, ncol, kphase * ModuleBase::IMAG_UNIT * std::complex(dR_car[ix]), hk_type); + } + } +} +template +void folding_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& At, + const int ncol, + const int hk_type); +template +void folding_HR_td>(const UnitCell& ucell, + const hamilt::HContainer>& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& At, + const int ncol, + const int hk_type); +template +void folding_partial_HR>(const UnitCell& ucell, + const hamilt::HContainer>& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const int ix, + const int ncol, + const int hk_type); +template +void folding_partial_HR(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const int ix, + const int ncol, + const int hk_type); template -void folding_HR_td(const hamilt::HContainer& hR, +void folding_partial_HR_td>(const UnitCell& ucell, + const hamilt::HContainer>& hR, std::complex* hk, const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& cart_At, + const int ix, const int ncol, - const int hk_type, - const UnitCell* ucell, - const ModuleBase::Vector3& At); + const int hk_type); template -void folding_HR_td>(const hamilt::HContainer>& hR, +void folding_partial_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, std::complex* hk, const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& cart_At, + const int ix, const int ncol, - const int hk_type, - const UnitCell* ucell, - const ModuleBase::Vector3& At); + const int hk_type); }// namespace module_rt \ No newline at end of file diff --git a/source/source_lcao/module_rt/td_folding.h b/source/source_lcao/module_rt/td_folding.h index 954d01d776..dae13e21af 100644 --- a/source/source_lcao/module_rt/td_folding.h +++ b/source/source_lcao/module_rt/td_folding.h @@ -6,13 +6,30 @@ namespace module_rt{ // folding HR to hk, for hybrid gauge template -void folding_HR_td(const hamilt::HContainer& hR, +void folding_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, std::complex* hk, const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& At, const int ncol, - const int hk_type, - const UnitCell* ucell, - const ModuleBase::Vector3& At); + const int hk_type); +template +void folding_partial_HR(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const int ix, + const int ncol, + const int hk_type); +template +void folding_partial_HR_td(const UnitCell& ucell, + const hamilt::HContainer& hR, + std::complex* hk, + const ModuleBase::Vector3& kvec_d_in, + const ModuleBase::Vector3& cart_At, + const int ix, + const int ncol, + const int hk_type); }// namespace module_rt #endif \ No newline at end of file diff --git a/source/source_lcao/module_rt/td_info.cpp b/source/source_lcao/module_rt/td_info.cpp index 259580d47d..974c4116d3 100644 --- a/source/source_lcao/module_rt/td_info.cpp +++ b/source/source_lcao/module_rt/td_info.cpp @@ -5,7 +5,7 @@ bool TD_info::out_mat_R = false; bool TD_info::out_vecpot = false; -bool TD_info::out_current = false; +int TD_info::out_current = 0; bool TD_info::out_current_k = false; bool TD_info::init_vecpot_file = false; bool TD_info::evolve_once = false; @@ -18,7 +18,7 @@ int TD_info::max_istep = -1; ModuleBase::Vector3 TD_info::cart_At; std::vector> TD_info::At_from_file; -TD_info::TD_info(const UnitCell* ucell_in) +TD_info::TD_info(const UnitCell* ucell_in,const Parallel_Orbitals& pv, const LCAO_Orbitals& orb) { this->ucell = ucell_in; if (init_vecpot_file && istep == -1) @@ -39,6 +39,10 @@ TD_info::TD_info(const UnitCell* ucell_in) //std::cout<<"estep_shift"<istep += estep_shift; + if(out_current==2||elecstate::H_TDDFT_pw::stype == 2) + { + r_calculator.init(*ucell, pv, orb); + } return; } TD_info::~TD_info() diff --git a/source/source_lcao/module_rt/td_info.h b/source/source_lcao/module_rt/td_info.h index 6b2f3a839e..78f0b1cc00 100644 --- a/source/source_lcao/module_rt/td_info.h +++ b/source/source_lcao/module_rt/td_info.h @@ -3,17 +3,16 @@ #include "source_base/abfs-vector3_order.h" #include "source_base/timer.h" #include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_io/module_hs/cal_r_overlap_R.h" #include // Class to store TDDFT infos, mainly for periodic system. class TD_info { public: - TD_info(const UnitCell* ucell_in); + TD_info(const UnitCell* ucell_in,const Parallel_Orbitals& pv, const LCAO_Orbitals& orb); ~TD_info(); - void init(); - /// @brief switch to control the output of HR static bool out_mat_R; @@ -24,7 +23,7 @@ class TD_info static bool out_vecpot; /// @brief switch to control the output of current - static bool out_current; + static int out_current; /// @brief switch to control the format of the output current, in total or in each k-point static bool out_current_k; @@ -56,6 +55,15 @@ class TD_info { return this->current_term[i]; } + // set velocity HR. + void set_velocity_HR(hamilt::HContainer>* HR) + { + this->velocity_HR = HR; + } + hamilt::HContainer>* get_velocity_HR_pointer() const + { + return this->velocity_HR; + } int get_istep() { @@ -70,6 +78,9 @@ class TD_info // For TDDFT velocity gauge, to fix the output of HR std::map, std::map>>> HR_sparse_td_vel[2]; + //r_calculator + cal_r_overlap_R r_calculator; + private: /// @brief pointer to the unit cell const UnitCell* ucell = nullptr; @@ -94,6 +105,9 @@ class TD_info /// @brief part of Momentum operator, -i∇ - i[r,Vnl]. Used to calculate current. std::vector>*> current_term = {nullptr, nullptr, nullptr}; + + /// @brief store kinetic hamilton + hamilt::HContainer>* velocity_HR = nullptr; }; #endif diff --git a/source/source_lcao/module_rt/velocity_op.cpp b/source/source_lcao/module_rt/velocity_op.cpp index ceec0b1b65..7114fb2495 100644 --- a/source/source_lcao/module_rt/velocity_op.cpp +++ b/source/source_lcao/module_rt/velocity_op.cpp @@ -54,7 +54,7 @@ void Velocity_op::initialize_vcomm_r(const Grid_Driver* GridD, const Paralle for (int iat0 = 0; iat0 < ucell->nat; iat0++) { auto tau0 = ucell->get_tau(iat0); - int T0, I0; + int T0 = 0, I0 = 0; ucell->iat2iait(iat0, &I0, &T0); AdjacentAtomInfo adjs; GridD->Find_atom(*ucell, tau0, T0, I0, &adjs); @@ -129,7 +129,7 @@ void Velocity_op::initialize_grad_term(const Grid_Driver* GridD, const Paral for (int iat1 = 0; iat1 < ucell->nat; iat1++) { auto tau1 = ucell->get_tau(iat1); - int T1, I1; + int T1 = 0, I1 = 0; ucell->iat2iait(iat1, &I1, &T1); AdjacentAtomInfo adjs; GridD->Find_atom(*ucell, tau1, T1, I1, &adjs); @@ -190,7 +190,7 @@ void Velocity_op::calculate_vcomm_r() for (int iat0 = 0; iat0 < this->ucell->nat; iat0++) { auto tau0 = ucell->get_tau(iat0); - int T0, I0; + int T0 = 0, I0 = 0; ucell->iat2iait(iat0, &I0, &T0); AdjacentAtomInfo& adjs = this->adjs_vcommr[iat0]; std::vector>>> nlm_tot; @@ -422,7 +422,7 @@ void Velocity_op::calculate_grad_term() for (int iat1 = 0; iat1 < this->ucell->nat; iat1++) { auto tau1 = ucell->get_tau(iat1); - int T1, I1; + int T1 = 0, I1 = 0; ucell->iat2iait(iat1, &I1, &T1); AdjacentAtomInfo& adjs = this->adjs_grad[iat1]; for (int ad = 0; ad < adjs.adj_num + 1; ++ad) @@ -464,9 +464,9 @@ void Velocity_op::cal_grad_IJR(const int& iat1, // --------------------------------------------- // get info of orbitals of atom1 and atom2 from ucell // --------------------------------------------- - int T1, I1; + int T1 = 0, I1 = 0; this->ucell->iat2iait(iat1, &I1, &T1); - int T2, I2; + int T2 = 0, I2 = 0; this->ucell->iat2iait(iat2, &I2, &T2); Atom& atom1 = this->ucell->atoms[T1]; Atom& atom2 = this->ucell->atoms[T2]; diff --git a/source/source_lcao/module_rt/velocity_op.h b/source/source_lcao/module_rt/velocity_op.h index 7c3986a431..69f184872e 100644 --- a/source/source_lcao/module_rt/velocity_op.h +++ b/source/source_lcao/module_rt/velocity_op.h @@ -7,7 +7,7 @@ #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_basis/module_nao/two_center_integrator.h" #include "source_base/vector3.h" -#include "source_io/cal_r_overlap_R.h" +#include "source_io/module_hs/cal_r_overlap_R.h" //design to calculate velocity operator template diff --git a/source/source_lcao/pulay_fs_gint.hpp b/source/source_lcao/pulay_fs_gint.hpp index 9603a28c34..46040ce340 100644 --- a/source/source_lcao/pulay_fs_gint.hpp +++ b/source/source_lcao/pulay_fs_gint.hpp @@ -24,8 +24,8 @@ namespace PulayForceStress { for (int is = 0; is < nspin; ++is) { - vr_eff[is] = pot->get_effective_v(is); - vofk_eff[is] = pot->get_effective_vofk(is); + vr_eff[is] = pot->get_eff_v(is); + vofk_eff[is] = pot->get_eff_vofk(is); } ModuleGint::cal_gint_fvl_meta(nspin, vr_eff, vofk_eff, dm.get_DMR_vector(), isforce, isstress, &f, &s); } @@ -33,7 +33,7 @@ namespace PulayForceStress { for(int is = 0; is < nspin; ++is) { - vr_eff[is] = pot->get_effective_v(is); + vr_eff[is] = pot->get_eff_v(is); } ModuleGint::cal_gint_fvl(nspin, vr_eff, dm.get_DMR_vector(), isforce, isstress, &f, &s); } diff --git a/source/source_lcao/record_adj.cpp b/source/source_lcao/record_adj.cpp index 47118496a5..9f0aee0e15 100644 --- a/source/source_lcao/record_adj.cpp +++ b/source/source_lcao/record_adj.cpp @@ -1,9 +1,8 @@ #include "record_adj.h" - #include "source_base/timer.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" + Record_adj::Record_adj() { } diff --git a/source/source_lcao/rho_tau_lcao.cpp b/source/source_lcao/rho_tau_lcao.cpp new file mode 100644 index 0000000000..9fbeb9f1c6 --- /dev/null +++ b/source/source_lcao/rho_tau_lcao.cpp @@ -0,0 +1,49 @@ +#include "rho_tau_lcao.h" +#include "source_hamilt/module_xc/xc_functional.h" +#include "source_lcao/module_gint/gint_interface.h" + +void LCAO_domain::dm2rho(std::vector*> &dmr, + const int nspin, + Charge* chr, + bool skip_normalize) +{ + ModuleBase::TITLE("LCAO_domain", "dm2rho"); + ModuleBase::timer::tick("LCAO_domain", "dm2rho"); + + for (int is = 0; is < nspin; is++) + { + ModuleBase::GlobalFunc::ZEROS(chr->rho[is], chr->nrxx); + } + + ModuleGint::cal_gint_rho(dmr, nspin, chr->rho); + + if(!skip_normalize)chr->renormalize_rho(); + + // should be moved somewhere else, mohan 20251024 + if (XC_Functional::get_ked_flag()) + { + dm2tau(dmr, nspin, chr); + } + + // symmetrize of charge density should be here, mohan 20251023 + + ModuleBase::timer::tick("LCAO_domain", "dm2rho"); + return; +} + + +void LCAO_domain::dm2tau(std::vector*> &dmr, + const int nspin, + Charge* chr) +{ + ModuleBase::TITLE("LCAO_domain", "dm2tau"); + ModuleBase::timer::tick("LCAO_domain", "dm2tau"); + + for (int is = 0; is < nspin; is++) + { + ModuleBase::GlobalFunc::ZEROS(chr->kin_r[is], chr->nrxx); + } + ModuleGint::cal_gint_tau(dmr, nspin, chr->kin_r); + + ModuleBase::timer::tick("LCAO_domain", "dm2tau"); +} diff --git a/source/source_lcao/rho_tau_lcao.h b/source/source_lcao/rho_tau_lcao.h new file mode 100644 index 0000000000..b90d23af85 --- /dev/null +++ b/source/source_lcao/rho_tau_lcao.h @@ -0,0 +1,20 @@ +#ifndef RHO_TAU_LCAO_H +#define RHO_TAU_LCAO_H + +#include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_estate/module_charge/charge.h" + +// generate charge density from different basis or methods +namespace LCAO_domain +{ + void dm2rho(std::vector*> &dmr, + const int nspin, + Charge* chr, + bool skip_normalize = false); + + void dm2tau(std::vector*> &dmr, + const int nspin, + Charge* chr); +} + +#endif diff --git a/source/source_lcao/setup_deepks.cpp b/source/source_lcao/setup_deepks.cpp index 460ce7bf76..190571661c 100644 --- a/source/source_lcao/setup_deepks.cpp +++ b/source/source_lcao/setup_deepks.cpp @@ -1,51 +1,51 @@ #include "source_lcao/setup_deepks.h" -#include "source_lcao/LCAO_domain.h" + #include "source_io/module_parameter/parameter.h" // use parameter +#include "source_lcao/LCAO_domain.h" template -Setup_DeePKS::Setup_DeePKS(){} +Setup_DeePKS::Setup_DeePKS() +{ +} template -Setup_DeePKS::~Setup_DeePKS(){} - +Setup_DeePKS::~Setup_DeePKS() +{ +} template -void Setup_DeePKS::build_overlap( - const UnitCell &ucell, - const LCAO_Orbitals &orb, - const Parallel_Orbitals &pv, - const Grid_Driver &gd, - TwoCenterIntegrator &overlap_orb_alpha, - const Input_para &inp) +void Setup_DeePKS::build_overlap(const UnitCell& ucell, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, + const Grid_Driver& gd, + TwoCenterIntegrator& overlap_orb_alpha, + const Input_para& inp) { #ifdef __MLALGO - // 9) for each ionic step, the overlap must be rebuilt - // since it depends on ionic positions - if (PARAM.globalv.deepks_setorb) - { - // allocate , phialpha is different every ion step, so it is allocated here - DeePKS_domain::allocate_phialpha(inp.cal_force, ucell, orb, gd, &pv, this->ld.phialpha); + // 9) for each ionic step, the overlap must be rebuilt + // since it depends on ionic positions + if (PARAM.globalv.deepks_setorb) + { + // allocate , phialpha is different every ion step, so it is allocated here + DeePKS_domain::allocate_phialpha(inp.cal_force, ucell, orb, gd, &pv, this->ld.phialpha); - // build and save at beginning - DeePKS_domain::build_phialpha(inp.cal_force, ucell, orb, gd, - &pv, overlap_orb_alpha, this->ld.phialpha); + // build and save at beginning + DeePKS_domain::build_phialpha(inp.cal_force, ucell, orb, gd, &pv, overlap_orb_alpha, this->ld.phialpha); - if (inp.deepks_out_unittest) - { - DeePKS_domain::check_phialpha(inp.cal_force, ucell, orb, - gd, &pv, this->ld.phialpha, GlobalV::MY_RANK); - } - } + if (inp.deepks_out_unittest) + { + DeePKS_domain::check_phialpha(inp.cal_force, ucell, orb, gd, &pv, this->ld.phialpha, GlobalV::MY_RANK); + } + } #endif } - template -void Setup_DeePKS::before_runner(const UnitCell& ucell, // unitcell - const int nks, // number of k points - const LCAO_Orbitals &orb, // orbital info - Parallel_Orbitals &pv, // parallel orbitals - const Input_para &inp) +void Setup_DeePKS::before_runner(const UnitCell& ucell, // unitcell + const int nks, // number of k points + const LCAO_Orbitals& orb, // orbital info + Parallel_Orbitals& pv, // parallel orbitals + const Input_para& inp) { #ifdef __MLALGO LCAO_domain::DeePKS_init(ucell, pv, nks, orb, this->ld, GlobalV::ofs_running); @@ -54,121 +54,136 @@ void Setup_DeePKS::before_runner(const UnitCell& ucell, // unitcell // load the DeePKS model from deep neural network DeePKS_domain::load_model(inp.deepks_model, this->ld.model_deepks); // read pdm from file for NSCF or SCF-restart, do it only once in whole calculation - DeePKS_domain::read_pdm((inp.init_chg == "file"), inp.deepks_equiv, - this->ld.init_pdm, ucell.nat, orb.Alpha[0].getTotal_nchi() * ucell.nat, - this->ld.lmaxd, this->ld.inl2l, *orb.Alpha, this->ld.pdm); + DeePKS_domain::read_pdm((inp.init_chg == "file"), + inp.deepks_equiv, + this->ld.init_pdm, + ucell.nat, + this->ld.deepks_param, + *orb.Alpha, + this->ld.pdm); } #endif } - template -void Setup_DeePKS::write_forces( - const ModuleBase::matrix &fcs, - const ModuleBase::matrix &fvnl_dalpha, - const Input_para &inp) +void Setup_DeePKS::delta_e(const UnitCell& ucell, + const K_Vectors& kv, + const LCAO_Orbitals& orb, + const Parallel_Orbitals& pv, // parallel orbitals + const Grid_Driver& gd, + const std::vector>& dm_vec, + elecstate::fenergy& f_en, + const Input_para& inp) { #ifdef __MLALGO - // DeePKS force - if (inp.deepks_out_labels) // not parallelized yet - { - if (inp.deepks_out_base == "none" - || (inp.deepks_out_base != "none" && this->dpks_out_type == "tot") ) - { - const std::string file_ftot = PARAM.globalv.global_out_dir - + (inp.deepks_out_labels == 1 ? "deepks_ftot.npy" : "deepks_force.npy"); - LCAO_deepks_io::save_matrix2npy(file_ftot, fcs, GlobalV::MY_RANK); // Hartree/Bohr, F_tot - - if (inp.deepks_out_labels == 1) - { - // this base only considers subtracting the deepks_scf part - const std::string file_fbase = PARAM.globalv.global_out_dir + "deepks_fbase.npy"; - if (inp.deepks_scf) - { - LCAO_deepks_io::save_matrix2npy(file_fbase, - fcs - fvnl_dalpha, - GlobalV::MY_RANK); // Hartree/Bohr, F_base - } - else - { - LCAO_deepks_io::save_matrix2npy(file_fbase, fcs, GlobalV::MY_RANK); // no scf, F_base=F_tot - } - } - } - if (inp.deepks_out_base != "none") - { - // output fcs as tot or base in another dir - // this base considers changing xc functional to base functional - const std::string file_f = PARAM.globalv.global_deepks_label_elec_dir + - (dpks_out_type == "tot" ? "ftot.npy" : "fbase.npy"); - LCAO_deepks_io::save_matrix2npy(file_f, fcs, GlobalV::MY_RANK); - } - } + if (inp.deepks_scf) + { + this->ld.dpks_cal_e_delta_band(dm_vec, kv.get_nks()); + DeePKS_domain::update_dmr(kv.kvec_d, dm_vec, ucell, orb, pv, gd, this->ld.dm_r); + f_en.edeepks_scf = this->ld.E_delta - this->ld.e_delta_band; + f_en.edeepks_delta = this->ld.E_delta; + } #endif - } - template -void Setup_DeePKS::write_stress( - const ModuleBase::matrix &scs, - const ModuleBase::matrix &svnl_dalpha, - const double &omega, - const Input_para &inp) +void Setup_DeePKS::write_forces(const ModuleBase::matrix& fcs, + const ModuleBase::matrix& fvnl_dalpha, + const Input_para& inp) { #ifdef __MLALGO - if (inp.deepks_out_labels == 1) - { - assert(omega>0.0); - - if (inp.deepks_out_base == "none" - || (inp.deepks_out_base != "none" && this->dpks_out_type == "tot") ) - { - const std::string file_stot = PARAM.globalv.global_out_dir + "deepks_stot.npy"; - LCAO_deepks_io::save_matrix2npy(file_stot, - scs, - GlobalV::MY_RANK, - omega, - 'U'); // change to energy unit Ry when printing, S_tot; + // DeePKS force + if (inp.deepks_out_labels) // not parallelized yet + { + if (inp.deepks_out_base == "none" || (inp.deepks_out_base != "none" && this->dpks_out_type == "tot")) + { + const std::string file_ftot + = PARAM.globalv.global_out_dir + (inp.deepks_out_labels == 1 ? "deepks_ftot.npy" : "deepks_force.npy"); + LCAO_deepks_io::save_matrix2npy(file_ftot, fcs, GlobalV::MY_RANK); // Hartree/Bohr, F_tot + + if (inp.deepks_out_labels == 1) + { + // this base only considers subtracting the deepks_scf part + const std::string file_fbase = PARAM.globalv.global_out_dir + "deepks_fbase.npy"; + if (inp.deepks_scf) + { + LCAO_deepks_io::save_matrix2npy(file_fbase, + fcs - fvnl_dalpha, + GlobalV::MY_RANK); // Hartree/Bohr, F_base + } + else + { + LCAO_deepks_io::save_matrix2npy(file_fbase, fcs, GlobalV::MY_RANK); // no scf, F_base=F_tot + } + } + } + if (inp.deepks_out_base != "none") + { + // output fcs as tot or base in another dir + // this base considers changing xc functional to base functional + const std::string file_f + = PARAM.globalv.global_deepks_label_elec_dir + (dpks_out_type == "tot" ? "ftot.npy" : "fbase.npy"); + LCAO_deepks_io::save_matrix2npy(file_f, fcs, GlobalV::MY_RANK); + } + } +#endif +} - // this base only considers subtracting the deepks_scf part - const std::string file_sbase = PARAM.globalv.global_out_dir + "deepks_sbase.npy"; - if (inp.deepks_scf) - { - LCAO_deepks_io::save_matrix2npy(file_sbase, - scs - svnl_dalpha, - GlobalV::MY_RANK, - omega, - 'U'); // change to energy unit Ry when printing, S_base; - } - else - { - LCAO_deepks_io::save_matrix2npy(file_sbase, - scs, - GlobalV::MY_RANK, - omega, - 'U'); // sbase = stot - } - } - if (inp.deepks_out_base != "none") - { - // output scs as tot or base in another dir - // this base considers changing xc functional to base functional - const std::string file_s = PARAM.globalv.global_deepks_label_elec_dir + - (this->dpks_out_type == "tot" ? "stot.npy" : "sbase.npy"); - LCAO_deepks_io::save_matrix2npy(file_s, - scs, - GlobalV::MY_RANK, - omega, - 'U'); // change to energy unit Ry when printing, S_tot; - } - } - else if (inp.deepks_out_labels == 2) - { - const std::string file_stot = PARAM.globalv.global_out_dir + "deepks_stress.npy"; - LCAO_deepks_io::save_matrix2npy(file_stot, scs, GlobalV::MY_RANK, omega, - 'F'); // flat mode - } +template +void Setup_DeePKS::write_stress(const ModuleBase::matrix& scs, + const ModuleBase::matrix& svnl_dalpha, + const double& omega, + const Input_para& inp) +{ +#ifdef __MLALGO + if (inp.deepks_out_labels == 1) + { + assert(omega > 0.0); + + if (inp.deepks_out_base == "none" || (inp.deepks_out_base != "none" && this->dpks_out_type == "tot")) + { + const std::string file_stot = PARAM.globalv.global_out_dir + "deepks_stot.npy"; + LCAO_deepks_io::save_matrix2npy(file_stot, + scs, + GlobalV::MY_RANK, + omega, + 'U'); // change to energy unit Ry when printing, S_tot; + + // this base only considers subtracting the deepks_scf part + const std::string file_sbase = PARAM.globalv.global_out_dir + "deepks_sbase.npy"; + if (inp.deepks_scf) + { + LCAO_deepks_io::save_matrix2npy(file_sbase, + scs - svnl_dalpha, + GlobalV::MY_RANK, + omega, + 'U'); // change to energy unit Ry when printing, S_base; + } + else + { + LCAO_deepks_io::save_matrix2npy(file_sbase, scs, GlobalV::MY_RANK, omega, + 'U'); // sbase = stot + } + } + if (inp.deepks_out_base != "none") + { + // output scs as tot or base in another dir + // this base considers changing xc functional to base functional + const std::string file_s = PARAM.globalv.global_deepks_label_elec_dir + + (this->dpks_out_type == "tot" ? "stot.npy" : "sbase.npy"); + LCAO_deepks_io::save_matrix2npy(file_s, + scs, + GlobalV::MY_RANK, + omega, + 'U'); // change to energy unit Ry when printing, S_tot; + } + } + else if (inp.deepks_out_labels == 2) + { + const std::string file_stot = PARAM.globalv.global_out_dir + "deepks_stress.npy"; + LCAO_deepks_io::save_matrix2npy(file_stot, scs, GlobalV::MY_RANK, omega, + 'F'); // flat mode + } #endif } diff --git a/source/source_lcao/setup_deepks.h b/source/source_lcao/setup_deepks.h index 5e9f05ee33..f4a5ad5f42 100644 --- a/source/source_lcao/setup_deepks.h +++ b/source/source_lcao/setup_deepks.h @@ -7,6 +7,11 @@ #include "source_basis/module_ao/ORB_read.h" // orb #include "source_basis/module_nao/two_center_integrator.h" // overlap_orb_alpha #include "source_cell/module_neighbor/sltk_grid_driver.h" // grid driver +#include "source_cell/klist.h" // k-points +#include "source_cell/unitcell.h" // use unitcell +#include "source_basis/module_ao/ORB_read.h" // LCAO_Orbitals +#include "source_estate/fp_energy.h" // fp energy + #ifdef __MLALGO #include "source_lcao/module_deepks/LCAO_deepks.h" // deepks @@ -42,6 +47,16 @@ class Setup_DeePKS TwoCenterIntegrator &overlap_orb_alpha, const Input_para &inp); + void delta_e( + const UnitCell& ucell, + const K_Vectors &kv, + const LCAO_Orbitals& orb, + const Parallel_Orbitals &pv, // parallel orbitals + const Grid_Driver &gd, + const std::vector>& dm_vec, + elecstate::fenergy &f_en, + const Input_para &inp); + void write_forces( const ModuleBase::matrix &fcs, const ModuleBase::matrix &fvnl_dalpha, diff --git a/source/source_lcao/setup_dm.cpp b/source/source_lcao/setup_dm.cpp new file mode 100644 index 0000000000..edb774ea58 --- /dev/null +++ b/source/source_lcao/setup_dm.cpp @@ -0,0 +1,25 @@ +#include "source_lcao/setup_dm.h" +#include "source_estate/cal_dm.h" +#include "source_base/timer.h" +#include "source_estate/module_dm/cal_dm_psi.h" +#include "source_hamilt/module_xc/xc_functional.h" +#include "source_lcao/module_deltaspin/spin_constrain.h" +#include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_gint/gint_interface.h" +#include + +namespace LCAO_domain +{ + +// change init_dm to allocate_dm, mohan 2025-10-31 +template +void Setup_DM::allocate_dm(const K_Vectors* kv, const Parallel_Orbitals* pv, const int nspin) +{ + const int nspin_dm = nspin == 2 ? 2 : 1; + this->dm = new elecstate::DensityMatrix(pv, nspin_dm, kv->kvec_d, kv->get_nks() / nspin_dm); +} + +template class Setup_DM; // Gamma_only case +template class Setup_DM>; // multi-k case + +} // namespace elecstate diff --git a/source/source_lcao/setup_dm.h b/source/source_lcao/setup_dm.h new file mode 100644 index 0000000000..672a50c878 --- /dev/null +++ b/source/source_lcao/setup_dm.h @@ -0,0 +1,39 @@ +#ifndef SETUP_DM_H +#define SETUP_DM_H + +#include "source_cell/klist.h" +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_estate/module_dm/density_matrix.h" + +#include + +namespace LCAO_domain +{ +template +class Setup_DM +{ + public: + + Setup_DM() + { + } // will be called by ElecStateLCAO_TDDFT + + ~Setup_DM() + { + if (this->dm != nullptr) + { + delete this->dm; + } + } + + // allocate density matrix + void allocate_dm(const K_Vectors* kv, const Parallel_Orbitals* pv, const int nspin); + + elecstate::DensityMatrix* dm = nullptr; + +}; + + +} // namespace elecstate + +#endif diff --git a/source/source_lcao/setup_exx.cpp b/source/source_lcao/setup_exx.cpp index aeabfaac36..f552ed06df 100644 --- a/source/source_lcao/setup_exx.cpp +++ b/source/source_lcao/setup_exx.cpp @@ -62,5 +62,34 @@ void Exx_NAO::before_runner( #endif } +template +void Exx_NAO::before_scf( + const UnitCell &ucell, // unitcell + const K_Vectors &kv, + const LCAO_Orbitals &orb, // orbital info + Charge_Mixing* p_chgmix, + const int istep, + const Input_para& inp) +{ +#ifdef __EXX + if (PARAM.inp.calculation != "nscf") + { + if (GlobalC::exx_info.info_ri.real_number) + { + this->exd->exx_beforescf(istep, kv, *p_chgmix, ucell, orb); + } + else + { + this->exc->exx_beforescf(istep, kv, *p_chgmix, ucell, orb); + } + } + else + { + // do nothing + } +#endif +} + + template class Exx_NAO; template class Exx_NAO>; diff --git a/source/source_lcao/setup_exx.h b/source/source_lcao/setup_exx.h index 33154ba8e6..9805ff8c91 100644 --- a/source/source_lcao/setup_exx.h +++ b/source/source_lcao/setup_exx.h @@ -6,6 +6,7 @@ #include "source_io/module_parameter/input_parameter.h" // Input_para #include "source_basis/module_ao/parallel_orbitals.h" // parallel orbitals #include "source_basis/module_ao/ORB_read.h" // orb +#include "source_estate/module_charge/charge_mixing.h" // use charge mixing // for EXX #ifdef __EXX @@ -35,6 +36,14 @@ class Exx_NAO const Parallel_Orbitals &pv, // parallel orbitals const Input_para& inp); + void before_scf( + const UnitCell &ucell, // unitcell + const K_Vectors &kv, + const LCAO_Orbitals &orb, // orbital info + Charge_Mixing* p_chgmix, + const int istep, + const Input_para& inp); + }; diff --git a/source/source_lcao/spar_dh.cpp b/source/source_lcao/spar_dh.cpp index 7d5d485d56..1848901eea 100644 --- a/source/source_lcao/spar_dh.cpp +++ b/source/source_lcao/spar_dh.cpp @@ -160,8 +160,8 @@ void sparse_format::cal_dSTN_R(const UnitCell& ucell, ModuleBase::Vector3 dtau, tau1, tau2; ModuleBase::Vector3 dtau1, dtau2, tau0; - double temp_value_double; - std::complex temp_value_complex; + double temp_value_double = 0.0; + std::complex temp_value_complex = 0.0; for (int T1 = 0; T1 < ucell.ntype; ++T1) { diff --git a/source/source_lcao/spar_dh.h b/source/source_lcao/spar_dh.h index 9af4fd6009..3df85fefc9 100644 --- a/source/source_lcao/spar_dh.h +++ b/source/source_lcao/spar_dh.h @@ -1,12 +1,14 @@ #ifndef SPAR_DH_H #define SPAR_DH_H +#include "source_base/matrix.h" +#include "source_basis/module_ao/parallel_orbitals.h" +#include "source_basis/module_nao/two_center_bundle.h" +#include "source_basis/module_ao/ORB_read.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" #include "source_lcao/LCAO_HS_arrays.hpp" #include "source_lcao/force_stress_arrays.h" -#include "source_lcao/hamilt_lcao.h" -#include "source_pw/module_pwdft/global.h" #include namespace sparse_format diff --git a/source/source_lcao/spar_exx.cpp b/source/source_lcao/spar_exx.cpp index 6538da7072..b19eee7c39 100644 --- a/source/source_lcao/spar_exx.cpp +++ b/source/source_lcao/spar_exx.cpp @@ -1,4 +1,174 @@ #ifdef __EXX -#include "LCAO_hamilt.hpp" -#endif + +#include "spar_exx.h" + +// -------------------------------------------------------- +// Header files needed for implementation only +// -------------------------------------------------------- + +#include +#include +#include + +#include "source_base/abfs-vector3_order.h" +#include "source_base/global_variable.h" +#include "source_base/timer.h" +#include "source_hamilt/module_xc/exx_info.h" +#include "source_io/module_parameter/parameter.h" +#include "source_lcao/module_ri/RI_2D_Comm.h" +#include "source_lcao/module_ri/RI_Util.hpp" + +// -------------------------------------------------------- +// Implementation of the cal_HR_exx function +// -------------------------------------------------------- + +namespace sparse_format +{ + +/** + * @brief Implementation of the cal_HR_exx function + */ +template +void cal_HR_exx( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const int& current_spin, + const double& sparse_threshold, + const int (&nmp)[3], + const std::vector>, RI::Tensor>>>& Hexxs) +{ + ModuleBase::TITLE("sparse_format", "cal_HR_exx"); + ModuleBase::timer::tick("sparse_format", "cal_HR_exx"); + + const Tdata frac = GlobalC::exx_info.info_global.hybrid_alpha; + + std::map> atoms_pos; + for (int iat = 0; iat < ucell.nat; ++iat) + { + atoms_pos[iat] = RI_Util::Vector3_to_array3(ucell.atoms[ucell.iat2it[iat]].tau[ucell.iat2ia[iat]]); + } + const std::array, 3> latvec + = {RI_Util::Vector3_to_array3(ucell.a1), + RI_Util::Vector3_to_array3(ucell.a2), + RI_Util::Vector3_to_array3(ucell.a3)}; + + const std::array Rs_period = {nmp[0], nmp[1], nmp[2]}; + + RI::Cell_Nearest cell_nearest; + cell_nearest.init(atoms_pos, latvec, Rs_period); + + const std::vector is_list + = (PARAM.inp.nspin != 4) ? std::vector{current_spin} : std::vector{0, 1, 2, 3}; + + for (const int is: is_list) + { + int is0_b = 0; + int is1_b = 0; + std::tie(is0_b, is1_b) = RI_2D_Comm::split_is_block(is); + + if (Hexxs.empty()) + { + break; + } + + for (const auto& HexxA: Hexxs[is]) + { + const int iat0 = HexxA.first; + for (const auto& HexxB: HexxA.second) + { + const int iat1 = HexxB.first.first; + + const Abfs::Vector3_Order R = RI_Util::array3_to_Vector3( + cell_nearest.get_cell_nearest_discrete(iat0, iat1, HexxB.first.second)); + + HS_Arrays.all_R_coor.insert(R); + + const RI::Tensor& Hexx = HexxB.second; + + for (size_t iw0 = 0; iw0 < Hexx.shape[0]; ++iw0) + { + const int iwt0 = RI_2D_Comm::get_iwt(ucell, iat0, iw0, is0_b); + const int iwt0_local = pv.global2local_row(iwt0); + + if (iwt0_local < 0) + { + continue; + } + + for (size_t iw1 = 0; iw1 < Hexx.shape[1]; ++iw1) + { + const int iwt1 = RI_2D_Comm::get_iwt(ucell, iat1, iw1, is1_b); + const int iwt1_local = pv.global2local_col(iwt1); + + if (iwt1_local < 0) + { + continue; + } + + if (std::abs(Hexx(iw0, iw1)) > sparse_threshold) + { + if (PARAM.inp.nspin == 1 || PARAM.inp.nspin == 2) + { + auto& HR_sparse_ptr = HS_Arrays.HR_sparse[current_spin][R][iwt0]; + double& HR_sparse = HR_sparse_ptr[iwt1]; + HR_sparse += RI::Global_Func::convert(frac * Hexx(iw0, iw1)); + if (std::abs(HR_sparse) <= sparse_threshold) + { + HR_sparse_ptr.erase(iwt1); + } + } + else if (PARAM.inp.nspin == 4) + { + auto& HR_sparse_ptr = HS_Arrays.HR_soc_sparse[R][iwt0]; + + std::complex& HR_sparse = HR_sparse_ptr[iwt1]; + + HR_sparse += RI::Global_Func::convert>(frac * Hexx(iw0, iw1)); + + if (std::abs(HR_sparse) <= sparse_threshold) + { + HR_sparse_ptr.erase(iwt1); + } + } + else + { + throw std::invalid_argument(std::string(__FILE__) + " line " + + std::to_string(__LINE__)); + } + } + } + } + } + } + } + + ModuleBase::timer::tick("sparse_format", "cal_HR_exx"); +} + +// -------------------------------------------------------- +// Explicit instantiations for double and complex types +// -------------------------------------------------------- + +template void cal_HR_exx( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + const std::vector>, RI::Tensor>>>& Hexxs); + +template void cal_HR_exx>( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + const std::vector>, RI::Tensor>>>>& Hexxs); + +} // namespace sparse_format + +#endif // __EXX diff --git a/source/source_lcao/spar_exx.h b/source/source_lcao/spar_exx.h index c12c4a14ce..4aca75aa5a 100644 --- a/source/source_lcao/spar_exx.h +++ b/source/source_lcao/spar_exx.h @@ -3,20 +3,44 @@ #ifdef __EXX -#include -#include +// -------------------------------------------------------- +// Header files - minimal set for declaration only +// -------------------------------------------------------- + +#include #include #include #include -#include "source_lcao/LCAO_HS_arrays.hpp" #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/unitcell.h" +#include "source_lcao/LCAO_HS_arrays.hpp" + +// -------------------------------------------------------- +// Namespace - merged into one block +// -------------------------------------------------------- + namespace sparse_format { +/** + * @brief Calculate the Hamiltonian matrix elements in real space using EXX data in sparse format + * + * This function computes the Hamiltonian matrix elements in real space (HR) from EXX data, + * which is stored in a sparse tensor format. The results are added to the HS_Arrays structure. + * + * @tparam Tdata Data type for the matrix elements (double or std::complex) + * @param ucell Unit cell information + * @param pv Parallel orbitals information for distributed computation + * @param HS_Arrays Structure to store Hamiltonian and overlap matrix arrays + * @param current_spin Current spin channel (0 or 1 for spin-polarized calculations) + * @param sparse_thr Threshold for sparse matrix construction + * @param nmp Periodic boundary conditions in reciprocal space + * @param Hexxs EXX data stored as a nested map structure of tensors + */ template -void cal_HR_exx(const UnitCell& ucell, +void cal_HR_exx( + const UnitCell& ucell, const Parallel_Orbitals& pv, LCAO_HS_Arrays& HS_Arrays, const int& current_spin, @@ -24,7 +48,26 @@ void cal_HR_exx(const UnitCell& ucell, const int (&nmp)[3], const std::vector>, RI::Tensor>>>& Hexxs); +// Explicit instantiations for double and complex types +extern template void cal_HR_exx( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + const std::vector>, RI::Tensor>>>& Hexxs); + +extern template void cal_HR_exx>( + const UnitCell& ucell, + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + const std::vector>, RI::Tensor>>>>& Hexxs); + } -#include "source_lcao/LCAO_hamilt.hpp" -#endif -#endif + +#endif // __EXX +#endif // SPARSE_FORMAT_EXX_H diff --git a/source/source_lcao/spar_hsr.cpp b/source/source_lcao/spar_hsr.cpp index 024fbfde2f..c7e26791d4 100644 --- a/source/source_lcao/spar_hsr.cpp +++ b/source/source_lcao/spar_hsr.cpp @@ -1,8 +1,9 @@ #include "spar_hsr.h" +#include "source_lcao/hamilt_lcao.h" +#include "source_io/module_parameter/parameter.h" #include "source_lcao/module_hcontainer/hcontainer.h" #include "source_lcao/module_rt/td_info.h" -#include "source_io/module_parameter/parameter.h" #include "spar_dh.h" #include "spar_exx.h" #include "spar_u.h" @@ -10,7 +11,7 @@ #ifdef __MPI void sparse_format::sync_all_R_coor(std::set>& all_R_coor, MPI_Comm comm) { - int my_rank, nproc; + int my_rank = 0, nproc = 0; MPI_Comm_rank(comm, &my_rank); MPI_Comm_size(comm, &nproc); @@ -67,20 +68,22 @@ void sparse_format::sync_all_R_coor(std::set>& all_R_co } #endif // __MPI +template void sparse_format::cal_HSR(const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, - const int& current_spin, - const double& sparse_thr, - const int (&nmp)[3], - hamilt::Hamilt>* p_ham + Plus_U &dftu, // mohan add 20251107 + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + hamilt::Hamilt* p_ham #ifdef __EXX - , - const std::vector>>>* Hexxd, - const std::vector>>>>* Hexxc + , + const std::vector>>>* Hexxd, + const std::vector>>>>* Hexxc #endif -) + ) { ModuleBase::TITLE("sparse_format", "cal_HSR"); @@ -91,30 +94,29 @@ void sparse_format::cal_HSR(const UnitCell& ucell, // cal_STN_R_sparse(current_spin, sparse_thr); if (nspin == 1 || nspin == 2) { - hamilt::HamiltLCAO, double>* p_ham_lcao - = dynamic_cast, double>*>(p_ham); + hamilt::HamiltLCAO* p_ham_lcao + = dynamic_cast*>(p_ham); HS_Arrays.all_R_coor = get_R_range(*(p_ham_lcao->getHR())); if (PARAM.inp.esolver_type == "tddft" && PARAM.inp.td_stype == 1) { - sparse_format::cal_HContainer_td(pv, - current_spin, - sparse_thr, - *(p_ham_lcao->getHR()), - TD_info::td_vel_op->HR_sparse_td_vel[current_spin]); + sparse_format::cal_HContainer>( + pv, + sparse_thr, + *(p_ham_lcao->getHR()), + TD_info::td_vel_op->HR_sparse_td_vel[current_spin]); } else { - sparse_format::cal_HContainer_d(pv, - current_spin, - sparse_thr, - *(p_ham_lcao->getHR()), - HS_Arrays.HR_sparse[current_spin]); + sparse_format::cal_HContainer(pv, + sparse_thr, + *(p_ham_lcao->getHR()), + HS_Arrays.HR_sparse[current_spin]); } - sparse_format::cal_HContainer_d(pv, current_spin, sparse_thr, *(p_ham_lcao->getSR()), HS_Arrays.SR_sparse); + sparse_format::cal_HContainer(pv, sparse_thr, *(p_ham_lcao->getSR()), HS_Arrays.SR_sparse); } else if (nspin == 4) { @@ -123,9 +125,15 @@ void sparse_format::cal_HSR(const UnitCell& ucell, HS_Arrays.all_R_coor = get_R_range(*(p_ham_lcao->getHR())); - sparse_format::cal_HContainer_cd(pv, current_spin, sparse_thr, *(p_ham_lcao->getHR()), HS_Arrays.HR_soc_sparse); + sparse_format::cal_HContainer>(pv, + sparse_thr, + *(p_ham_lcao->getHR()), + HS_Arrays.HR_soc_sparse); - sparse_format::cal_HContainer_cd(pv, current_spin, sparse_thr, *(p_ham_lcao->getSR()), HS_Arrays.SR_soc_sparse); + sparse_format::cal_HContainer>(pv, + sparse_thr, + *(p_ham_lcao->getSR()), + HS_Arrays.SR_soc_sparse); } else { @@ -137,17 +145,15 @@ void sparse_format::cal_HSR(const UnitCell& ucell, { if (nspin == 1 || nspin == 2) { - cal_HR_dftu(pv, HS_Arrays.all_R_coor, HS_Arrays.SR_sparse, HS_Arrays.HR_sparse, current_spin, sparse_thr); + cal_HR_dftu(dftu, pv, HS_Arrays.all_R_coor, + HS_Arrays.SR_sparse, HS_Arrays.HR_sparse, current_spin, sparse_thr); } else if (nspin == 4) { - cal_HR_dftu_soc(pv, - HS_Arrays.all_R_coor, - HS_Arrays.SR_soc_sparse, - HS_Arrays.HR_soc_sparse, - current_spin, - sparse_thr); - } + cal_HR_dftu_soc(dftu, pv, HS_Arrays.all_R_coor, + HS_Arrays.SR_soc_sparse, HS_Arrays.HR_soc_sparse, + current_spin, sparse_thr); + } else { ModuleBase::WARNING_QUIT("cal_HSR", "check the value of nspin."); @@ -179,14 +185,13 @@ void sparse_format::cal_HSR(const UnitCell& ucell, return; } -void sparse_format::cal_HContainer_d( - const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_thr, - const hamilt::HContainer& hR, - std::map, std::map>>& target) +template +void sparse_format::cal_HContainer(const Parallel_Orbitals& pv, + const double& sparse_thr, + const hamilt::HContainer& hR, + std::map, std::map>>& target) { - ModuleBase::TITLE("sparse_format", "cal_HContainer_d"); + ModuleBase::TITLE("sparse_format", "cal_HContainer"); auto row_indexes = pv.get_indexes_row(); auto col_indexes = pv.get_indexes_col(); @@ -209,93 +214,8 @@ void sparse_format::cal_HContainer_d( for (int j = 0; j < col_size; ++j) { int nu = col_indexes[start_j + j]; - const auto& value_tmp = matrix.get_value(i, j); - if (std::abs(value_tmp) > sparse_thr) - { - target[dR][mu][nu] = value_tmp; - } - } - } - } - } - - return; -} - -void sparse_format::cal_HContainer_cd( - const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_thr, - const hamilt::HContainer>& hR, - std::map, std::map>>>& target) -{ - ModuleBase::TITLE("sparse_format", "cal_HContainer_cd"); - - auto row_indexes = pv.get_indexes_row(); - auto col_indexes = pv.get_indexes_col(); - for (int iap = 0; iap < hR.size_atom_pairs(); ++iap) - { - int atom_i = hR.get_atom_pair(iap).get_atom_i(); - int atom_j = hR.get_atom_pair(iap).get_atom_j(); - int start_i = pv.atom_begin_row[atom_i]; - int start_j = pv.atom_begin_col[atom_j]; - int row_size = pv.get_row_size(atom_i); - int col_size = pv.get_col_size(atom_j); - for (int iR = 0; iR < hR.get_atom_pair(iap).get_R_size(); ++iR) - { - auto& matrix = hR.get_atom_pair(iap).get_HR_values(iR); - const ModuleBase::Vector3 r_index = hR.get_atom_pair(iap).get_R_index(iR); - Abfs::Vector3_Order dR(r_index.x, r_index.y, r_index.z); - for (int i = 0; i < row_size; ++i) - { - int mu = row_indexes[start_i + i]; - for (int j = 0; j < col_size; ++j) - { - int nu = col_indexes[start_j + j]; - const auto& value_tmp = matrix.get_value(i, j); - if (std::abs(value_tmp) > sparse_thr) - { - target[dR][mu][nu] = value_tmp; - } - } - } - } - } - - return; -} - -void sparse_format::cal_HContainer_td( - const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_thr, - const hamilt::HContainer& hR, - std::map, std::map>>>& target) -{ - ModuleBase::TITLE("sparse_format", "cal_HContainer_td"); - - auto row_indexes = pv.get_indexes_row(); - auto col_indexes = pv.get_indexes_col(); - for (int iap = 0; iap < hR.size_atom_pairs(); ++iap) - { - int atom_i = hR.get_atom_pair(iap).get_atom_i(); - int atom_j = hR.get_atom_pair(iap).get_atom_j(); - int start_i = pv.atom_begin_row[atom_i]; - int start_j = pv.atom_begin_col[atom_j]; - int row_size = pv.get_row_size(atom_i); - int col_size = pv.get_col_size(atom_j); - for (int iR = 0; iR < hR.get_atom_pair(iap).get_R_size(); ++iR) - { - auto& matrix = hR.get_atom_pair(iap).get_HR_values(iR); - const ModuleBase::Vector3 r_index = hR.get_atom_pair(iap).get_R_index(iR); - Abfs::Vector3_Order dR(r_index.x, r_index.y, r_index.z); - for (int i = 0; i < row_size; ++i) - { - int mu = row_indexes[start_i + i]; - for (int j = 0; j < col_size; ++j) - { - int nu = col_indexes[start_j + j]; - const auto& value_tmp = std::complex(matrix.get_value(i, j), 0.0); + // const auto& value_tmp = std::complex(matrix.get_value(i, j), 0.0); + const TO value_tmp = static_cast(matrix.get_value(i, j)); if (std::abs(value_tmp) > sparse_thr) { target[dR][mu][nu] += value_tmp; @@ -396,8 +316,8 @@ void sparse_format::clear_zero_elements(LCAO_HS_Arrays& HS_Arrays, const int& cu iter++; } } // end while iter - } // end row loop - } // end R loop + } // end row loop + } // end R loop for (auto& R_loop: HS_Arrays.SR_soc_sparse) { @@ -416,8 +336,8 @@ void sparse_format::clear_zero_elements(LCAO_HS_Arrays& HS_Arrays, const int& cu iter++; } } // end while iter - } // end row_loop - } // end R_loop + } // end row_loop + } // end R_loop } return; @@ -452,3 +372,55 @@ void sparse_format::destroy_HS_R_sparse(LCAO_HS_Arrays& HS_Arrays) return; } + +template void sparse_format::cal_HSR( + const UnitCell& ucell, + Plus_U &dftu, // mohan add 20251107 + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + hamilt::Hamilt* p_ham +#ifdef __EXX + , + const std::vector>>>* Hexxd, + const std::vector>>>>* Hexxc +#endif + ); + +template void sparse_format::cal_HSR>( + const UnitCell& ucell, + Plus_U &dftu, // mohan add 20251107 + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + hamilt::Hamilt>* p_ham +#ifdef __EXX + , + const std::vector>>>* Hexxd, + const std::vector>>>>* Hexxc +#endif + ); + +template void sparse_format::cal_HContainer( + const Parallel_Orbitals& pv, + const double& sparse_thr, + const hamilt::HContainer& hR, + std::map, std::map>>& target); + +template void sparse_format::cal_HContainer>( + const Parallel_Orbitals& pv, + const double& sparse_thr, + const hamilt::HContainer& hR, + std::map, std::map>>>& target); + +template void sparse_format::cal_HContainer>( + const Parallel_Orbitals& pv, + const double& sparse_thr, + const hamilt::HContainer>& hR, + std::map, std::map>>>& target); diff --git a/source/source_lcao/spar_hsr.h b/source/source_lcao/spar_hsr.h index df8478c4bf..b196d3be3b 100644 --- a/source/source_lcao/spar_hsr.h +++ b/source/source_lcao/spar_hsr.h @@ -1,8 +1,14 @@ #ifndef SPARSE_FORMAT_HSR_H #define SPARSE_FORMAT_HSR_H -#include "source_lcao/hamilt_lcao.h" #include "source_lcao/LCAO_HS_arrays.hpp" +#include "source_lcao/module_hcontainer/hcontainer.h" +#include "source_hamilt/hamilt.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 + +#ifdef __EXX +#include +#endif namespace sparse_format { @@ -37,40 +43,28 @@ std::set> get_R_range(const hamilt::HContainer& hR) }; using TAC = std::pair>; +template void cal_HSR(const UnitCell& ucell, - const Parallel_Orbitals& pv, - LCAO_HS_Arrays& HS_Arrays, - const Grid_Driver& grid, - const int& current_spin, - const double& sparse_thr, - const int (&nmp)[3], - hamilt::Hamilt>* p_ham + Plus_U &dftu, // mohan add 2025-11-07 + const Parallel_Orbitals& pv, + LCAO_HS_Arrays& HS_Arrays, + const Grid_Driver& grid, + const int& current_spin, + const double& sparse_thr, + const int (&nmp)[3], + hamilt::Hamilt* p_ham #ifdef __EXX - , - const std::vector>>>* Hexxd = nullptr, - const std::vector>>>>* Hexxc = nullptr + , + const std::vector>>>* Hexxd = nullptr, + const std::vector>>>>* Hexxc = nullptr #endif -); + ); -void cal_HContainer_d(const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_threshold, - const hamilt::HContainer& hR, - std::map, std::map>>& target); - -void cal_HContainer_cd( - const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_threshold, - const hamilt::HContainer>& hR, - std::map, std::map>>>& target); - -void cal_HContainer_td( - const Parallel_Orbitals& pv, - const int& current_spin, - const double& sparse_threshold, - const hamilt::HContainer& hR, - std::map, std::map>>>& target); +template +void cal_HContainer(const Parallel_Orbitals& pv, + const double& sparse_thr, + const hamilt::HContainer& hR, + std::map, std::map>>& target); void clear_zero_elements(LCAO_HS_Arrays& HS_Arrays, const int& current_spin, const double& sparse_thr); @@ -78,4 +72,4 @@ void destroy_HS_R_sparse(LCAO_HS_Arrays& HS_Arrays); } // namespace sparse_format -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/spar_st.cpp b/source/source_lcao/spar_st.cpp index 61f19b257b..b3f7b4a2f2 100644 --- a/source/source_lcao/spar_st.cpp +++ b/source/source_lcao/spar_st.cpp @@ -1,14 +1,14 @@ #include "spar_st.h" -#include "source_io/module_parameter/parameter.h" #include "force_stress_arrays.h" +#include "source_io/module_parameter/parameter.h" #include "source_lcao/LCAO_domain.h" -#include "source_pw/module_pwdft/global.h" // only for INPUT #include "spar_dh.h" #include "spar_hsr.h" #include +template void sparse_format::cal_SR( const Parallel_Orbitals& pv, std::set>& all_R_coor, @@ -16,7 +16,7 @@ void sparse_format::cal_SR( std::map, std::map>>>& SR_soc_sparse, const Grid_Driver& grid, const double& sparse_thr, - hamilt::Hamilt>* p_ham) + hamilt::Hamilt* p_ham) { ModuleBase::TITLE("sparse_format", "cal_SR"); @@ -25,27 +25,19 @@ void sparse_format::cal_SR( const int nspin = PARAM.inp.nspin; // cal_STN_R_sparse(current_spin, sparse_thr); - if (nspin == 1 || nspin == 2) { - hamilt::HamiltLCAO, double>* p_ham_lcao - = dynamic_cast, double>*>( - p_ham); + if (nspin == 1 || nspin == 2) + { + hamilt::HamiltLCAO* p_ham_lcao + = dynamic_cast*>(p_ham); const int cspin = 0; - sparse_format::cal_HContainer_d(pv, - cspin, - sparse_thr, - *(p_ham_lcao->getSR()), - SR_sparse); - } else if (nspin == 4) { - hamilt::HamiltLCAO, std::complex>* - p_ham_lcao - = dynamic_cast, - std::complex>*>(p_ham); + sparse_format::cal_HContainer(pv, sparse_thr, *(p_ham_lcao->getSR()), SR_sparse); + } + else if (nspin == 4) + { + hamilt::HamiltLCAO, std::complex>* p_ham_lcao + = dynamic_cast, std::complex>*>(p_ham); const int cspin = 0; - sparse_format::cal_HContainer_cd(pv, - cspin, - sparse_thr, - *(p_ham_lcao->getSR()), - SR_soc_sparse); + sparse_format::cal_HContainer>(pv, sparse_thr, *(p_ham_lcao->getSR()), SR_soc_sparse); } return; @@ -106,15 +98,18 @@ void sparse_format::cal_STN_R_for_T(const UnitCell& ucell, double tmp = 0.0; std::complex tmpc = std::complex(0.0, 0.0); - for (int T1 = 0; T1 < ucell.ntype; ++T1) { + for (int T1 = 0; T1 < ucell.ntype; ++T1) + { Atom* atom1 = &ucell.atoms[T1]; - for (int I1 = 0; I1 < atom1->na; ++I1) { + for (int I1 = 0; I1 < atom1->na; ++I1) + { tau1 = atom1->tau[I1]; grid.Find_atom(ucell, tau1, T1, I1); Atom* atom1 = &ucell.atoms[T1]; const int start = ucell.itiaiw2iwt(T1, I1, 0); - for (int ad = 0; ad < grid.getAdjacentNum() + 1; ++ad) { + for (int ad = 0; ad < grid.getAdjacentNum() + 1; ++ad) + { const int T2 = grid.getType(ad); const int I2 = grid.getNatom(ad); Atom* atom2 = &ucell.atoms[T2]; @@ -126,12 +121,15 @@ void sparse_format::cal_STN_R_for_T(const UnitCell& ucell, bool adj = false; - if (distance < rcut) { + if (distance < rcut) + { adj = true; } - else if (distance >= rcut) { - for (int ad0 = 0; ad0 < grid.getAdjacentNum() + 1; ++ad0) { + else if (distance >= rcut) + { + for (int ad0 = 0; ad0 < grid.getAdjacentNum() + 1; ++ad0) + { const int T0 = grid.getType(ad0); tau0 = grid.getAdjacentTau(ad0); @@ -141,46 +139,49 @@ void sparse_format::cal_STN_R_for_T(const UnitCell& ucell, double distance1 = dtau1.norm() * ucell.lat0; double distance2 = dtau2.norm() * ucell.lat0; - double rcut1 = orb_cutoff[T1] - + ucell.infoNL.Beta[T0].get_rcut_max(); - double rcut2 = orb_cutoff[T2] - + ucell.infoNL.Beta[T0].get_rcut_max(); + double rcut1 = orb_cutoff[T1] + ucell.infoNL.Beta[T0].get_rcut_max(); + double rcut2 = orb_cutoff[T2] + ucell.infoNL.Beta[T0].get_rcut_max(); - if (distance1 < rcut1 && distance2 < rcut2) { + if (distance1 < rcut1 && distance2 < rcut2) + { adj = true; break; } } } - if (adj) { + if (adj) + { const int start2 = ucell.itiaiw2iwt(T2, I2, 0); - Abfs::Vector3_Order dR(grid.getBox(ad).x, - grid.getBox(ad).y, - grid.getBox(ad).z); + Abfs::Vector3_Order dR(grid.getBox(ad).x, grid.getBox(ad).y, grid.getBox(ad).z); - for (int ii = 0; ii < atom1->nw * PARAM.globalv.npol; ii++) { + for (int ii = 0; ii < atom1->nw * PARAM.globalv.npol; ii++) + { const int iw1_all = start + ii; const int mu = pv.global2local_row(iw1_all); - if (mu < 0) { + if (mu < 0) + { continue; } - for (int jj = 0; jj < atom2->nw * PARAM.globalv.npol; jj++) { + for (int jj = 0; jj < atom2->nw * PARAM.globalv.npol; jj++) + { int iw2_all = start2 + jj; const int nu = pv.global2local_col(iw2_all); - if (nu < 0) { + if (nu < 0) + { continue; } - if (nspin == 1 || nspin == 2) { + if (nspin == 1 || nspin == 2) + { tmp = HS_arrays.Hloc_fixedR[index]; - if (std::abs(tmp) > sparse_thr) { - HS_arrays.TR_sparse[dR][iw1_all][iw2_all] - = tmp; + if (std::abs(tmp) > sparse_thr) + { + HS_arrays.TR_sparse[dR][iw1_all][iw2_all] = tmp; } } @@ -195,14 +196,31 @@ void sparse_format::cal_STN_R_for_T(const UnitCell& ucell, return; } -void sparse_format::destroy_T_R_sparse(LCAO_HS_Arrays& HS_Arrays) { +void sparse_format::destroy_T_R_sparse(LCAO_HS_Arrays& HS_Arrays) +{ ModuleBase::TITLE("sparse_format", "destroy_T_R_sparse"); - if (PARAM.inp.nspin != 4) { - std::map, - std::map>> - empty_TR_sparse; + if (PARAM.inp.nspin != 4) + { + std::map, std::map>> empty_TR_sparse; HS_Arrays.TR_sparse.swap(empty_TR_sparse); } return; } + +template void sparse_format::cal_SR( + const Parallel_Orbitals& pv, + std::set>& all_R_coor, + std::map, std::map>>& SR_sparse, + std::map, std::map>>>& SR_soc_sparse, + const Grid_Driver& grid, + const double& sparse_thr, + hamilt::Hamilt* p_ham); +template void sparse_format::cal_SR>( + const Parallel_Orbitals& pv, + std::set>& all_R_coor, + std::map, std::map>>& SR_sparse, + std::map, std::map>>>& SR_soc_sparse, + const Grid_Driver& grid, + const double& sparse_thr, + hamilt::Hamilt>* p_ham); diff --git a/source/source_lcao/spar_st.h b/source/source_lcao/spar_st.h index 1b732d4316..aa8ce29434 100644 --- a/source/source_lcao/spar_st.h +++ b/source/source_lcao/spar_st.h @@ -4,15 +4,17 @@ #include "source_lcao/LCAO_HS_arrays.hpp" #include "source_lcao/hamilt_lcao.h" -namespace sparse_format { +namespace sparse_format +{ //! calculate overlap matrix with lattice vector R +template void cal_SR(const Parallel_Orbitals& pv, std::set>& all_R_coor, std::map, std::map>>& SR_sparse, std::map, std::map>>>& SR_soc_sparse, const Grid_Driver& grid, const double& sparse_thr, - hamilt::Hamilt>* p_ham); + hamilt::Hamilt* p_ham); //! calculate kinetic matrix with lattice vector R void cal_TR(const UnitCell& ucell, diff --git a/source/source_lcao/spar_u.cpp b/source/source_lcao/spar_u.cpp index af5f4982ac..fe12fe1c60 100644 --- a/source/source_lcao/spar_u.cpp +++ b/source/source_lcao/spar_u.cpp @@ -1,11 +1,10 @@ #include "spar_u.h" #include "source_base/parallel_reduce.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/timer.h" -#include "source_lcao/module_dftu/dftu.h" void sparse_format::cal_HR_dftu( + Plus_U &dftu, // mohan add 2025-11-07 const Parallel_Orbitals &pv, std::set> &all_R_coor, std::map, std::map>> &SR_sparse, @@ -74,7 +73,7 @@ void sparse_format::cal_HR_dftu( } } - GlobalC::dftu.cal_eff_pot_mat_R_double(current_spin, SR_tmp, HR_tmp); + dftu.cal_eff_pot_mat_R_double(current_spin, SR_tmp, HR_tmp); for (int i = 0; i < PARAM.globalv.nlocal; ++i) { @@ -128,6 +127,7 @@ void sparse_format::cal_HR_dftu( void sparse_format::cal_HR_dftu_soc( + Plus_U &dftu, // mohan add 2025-11-07 const Parallel_Orbitals &pv, std::set> &all_R_coor, std::map, std::map>>> &SR_soc_sparse, @@ -194,7 +194,7 @@ void sparse_format::cal_HR_dftu_soc( } } - GlobalC::dftu.cal_eff_pot_mat_R_complex_double(current_spin, SR_soc_tmp, HR_soc_tmp); + dftu.cal_eff_pot_mat_R_complex_double(current_spin, SR_soc_tmp, HR_soc_tmp); for (int i = 0; i < PARAM.globalv.nlocal; ++i) { diff --git a/source/source_lcao/spar_u.h b/source/source_lcao/spar_u.h index ced9781d79..4940a3c5ff 100644 --- a/source/source_lcao/spar_u.h +++ b/source/source_lcao/spar_u.h @@ -1,16 +1,16 @@ #ifndef SPARSE_FORMAT_U_H #define SPARSE_FORMAT_U_H +#include "source_base/abfs-vector3_order.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" #include "source_cell/module_neighbor/sltk_grid_driver.h" -#include "source_pw/module_pwdft/global.h" -#include "source_lcao/hamilt_lcao.h" - +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251107 namespace sparse_format { void cal_HR_dftu( + Plus_U &dftu, // mohan add 2025-11-07 const Parallel_Orbitals &pv, std::set> &all_R_coor, std::map, std::map>> &SR_sparse, @@ -19,6 +19,7 @@ namespace sparse_format const double &sparse_thr); void cal_HR_dftu_soc( + Plus_U &dftu, // mohan add 2025-11-07 const Parallel_Orbitals &pv, std::set> &all_R_coor, std::map, std::map>>> &SR_soc_sparse, diff --git a/source/source_lcao/wavefunc_in_pw.cpp b/source/source_lcao/wavefunc_in_pw.cpp index 064a93c0d0..3bc3711e14 100644 --- a/source/source_lcao/wavefunc_in_pw.cpp +++ b/source/source_lcao/wavefunc_in_pw.cpp @@ -1,7 +1,6 @@ +#include // Peize Lin fix bug about strcmp 2016-08-02 #include "wavefunc_in_pw.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" -#include // Peize Lin fix bug about strcmp 2016-08-02 #include "source_base/math_integral.h" #include "source_base/math_sphbes.h" #include "source_base/math_polyint.h" @@ -126,7 +125,7 @@ void Wavefunc_in_pw::make_table_q( } else { - double no_use; + double no_use = 0.0; for(int ir=0; ir> no_use; @@ -328,7 +327,7 @@ void Wavefunc_in_pw::produce_local_basis_in_pw(const UnitCell& ucell, }//if else {//atomic_wfc_so_mag - double alpha, gamma; + double alpha = 0.0, gamma = 0.0; std::complex fup,fdown; //int nc; //This routine creates two functions only in the case j=l+1/2 or exit in the other case @@ -403,8 +402,8 @@ void Wavefunc_in_pw::produce_local_basis_in_pw(const UnitCell& ucell, } // end if ucell.atoms[it].has_so else {//atomic_wfc_nc - double alpha, gamman; - std::complex fup, fdown; + double alpha = 0.0, gamman = 0.0; + std::complex fup = 0.0, fdown = 0.0; //alpha = ucell.magnet.angle1_[it]; //gamman = -ucell.magnet.angle2_[it] + 0.5*ModuleBase::PI; alpha = ucell.atoms[it].angle1[ia]; diff --git a/source/source_main/driver.cpp b/source/source_main/driver.cpp index c15ef92057..f2b08dcf67 100644 --- a/source/source_main/driver.cpp +++ b/source/source_main/driver.cpp @@ -4,14 +4,15 @@ #include "source_base/memory.h" #include "source_base/timer.h" #include "source_esolver/esolver.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/cal_test.h" -#include "source_io/input_conv.h" -#include "source_io/para_json.h" -#include "source_io/print_info.h" -#include "source_io/read_input.h" +#include "source_io/module_output/cal_test.h" +#include "source_io/module_parameter/input_conv.h" +#include "source_io/module_json/para_json.h" +#include "source_io/module_output/print_info.h" +#include "source_io/module_parameter/read_input.h" #include "source_io/module_parameter/parameter.h" #include "source_main/version.h" +#include "source_base/parallel_global.h" + Driver::Driver() { } @@ -115,17 +116,17 @@ void Driver::reading() GlobalV::NPROC = PARAM.globalv.nproc; // (1) read the input file - ModuleIO::ReadInput read_input(PARAM.globalv.myrank); - read_input.read_parameters(PARAM, PARAM.globalv.global_in_card); + ModuleIO::ReadInput input(PARAM.globalv.myrank); + input.read_parameters(PARAM, PARAM.globalv.global_in_card); // (2) create the output directory, running_*.log and print info - read_input.create_directory(PARAM); + input.create_directory(PARAM); this->print_start_info(); // (3) write the input file std::stringstream ss1; - ss1 << PARAM.globalv.global_out_dir << PARAM.globalv.global_in_card; - read_input.write_parameters(PARAM, ss1.str()); + ss1 << PARAM.globalv.global_out_dir << PARAM.globalv.global_in_card << ".info"; + input.write_parameters(PARAM, ss1.str()); // (*temp*) copy the variables from INPUT to each class Input_Conv::Convert(); diff --git a/source/source_main/driver_run.cpp b/source/source_main/driver_run.cpp index eb04ae588a..dcdc09d217 100644 --- a/source/source_main/driver_run.cpp +++ b/source/source_main/driver_run.cpp @@ -1,10 +1,10 @@ #include "source_main/driver.h" #include "source_cell/check_atomic_stru.h" #include "source_cell/module_neighbor/sltk_atom_arrange.h" -#include "source_pw/module_pwdft/global.h" +#include "source_relax/relax_driver.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/para_json.h" -#include "source_io/print_info.h" +#include "source_io/module_json/para_json.h" +#include "source_io/module_output/print_info.h" #include "source_md/run_md.h" #include "source_base/global_variable.h" #include "source_base/module_device/device.h" @@ -87,14 +87,9 @@ void Driver::driver_run() { p_esolver->runner(ucell, 0); } - else if (cal == "get_pchg" || cal == "get_wf" || cal == "gen_bessel" || cal == "gen_opt_abfs" || + else if (cal == "get_pchg" || cal == "get_wf" || cal == "gen_bessel" || cal == "gen_opt_abfs" || cal == "test_memory" || cal == "test_neighbour") { - //! supported "other" functions: - //! get_pchg(LCAO), - //! test_memory(PW,LCAO), - //! test_neighbour(LCAO), - //! gen_bessel(PW), et al. const int istep = 0; p_esolver->others(ucell, istep); } @@ -106,7 +101,8 @@ void Driver::driver_run() //! 5: clean up esolver p_esolver->after_all_runners(ucell); - ModuleESolver::clean_esolver(p_esolver); + delete p_esolver; + this->finalize_hardware(); //! 6: output the json file @@ -128,8 +124,15 @@ void Driver::init_hardware() #endif #ifdef __DSP + if (GlobalV::NPROC > PARAM.inp.kpar) + { + ModuleBase::WARNING_QUIT( + "Driver::init_hardware", + "Number of processors must be equal to KPAR for DSP hardware initialization." + ); + } std::cout << " ** Initializing DSP Hardware..." << std::endl; - mtfunc::dspInitHandle(GlobalV::MY_RANK); + mtfunc::dspInitHandle(GlobalV::MY_RANK % PARAM.inp.dsp_count); #endif } @@ -149,4 +152,4 @@ void Driver::finalize_hardware() std::cout << " ** Closing DSP Hardware..." << std::endl; mtfunc::dspDestoryHandle(GlobalV::MY_RANK); #endif -} \ No newline at end of file +} diff --git a/source/source_main/version.h b/source/source_main/version.h index a7f8a07f6c..47fc49c8cb 100644 --- a/source/source_main/version.h +++ b/source/source_main/version.h @@ -1,3 +1,3 @@ #ifndef VERSION -#define VERSION "v3.9.0.16" +#define VERSION "v3.9.0.24" #endif diff --git a/source/source_md/fire.cpp b/source/source_md/fire.cpp index 4a58d004b2..9c0cfd6472 100644 --- a/source/source_md/fire.cpp +++ b/source/source_md/fire.cpp @@ -90,7 +90,7 @@ void FIRE::write_restart(const std::string& global_out_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_out_dir << "Restart_md.dat"; + ssc << global_out_dir << "Restart_md.txt"; std::ofstream file(ssc.str().c_str()); file << step_ + step_rst_ << std::endl; @@ -116,7 +116,7 @@ void FIRE::restart(const std::string& global_readin_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_readin_dir << "Restart_md.dat"; + ssc << global_readin_dir << "Restart_md.txt"; std::ifstream file(ssc.str().c_str()); if (!file) @@ -137,7 +137,7 @@ void FIRE::restart(const std::string& global_readin_dir) if (!ok) { - ModuleBase::WARNING_QUIT("mdrun", "no Restart_md.dat !"); + ModuleBase::WARNING_QUIT("mdrun", "no Restart_md.txt !"); } #ifdef __MPI diff --git a/source/source_md/md_base.cpp b/source/source_md/md_base.cpp index 659dea7fe2..9e5b0e7c6a 100644 --- a/source/source_md/md_base.cpp +++ b/source/source_md/md_base.cpp @@ -3,7 +3,7 @@ #ifdef __MPI #include "mpi.h" #endif -#include "source_io/print_info.h" +#include "source_io/module_output/print_info.h" #include "source_cell/update_cell.h" MD_base::MD_base(const Parameter& param_in, UnitCell& unit_in) : mdp(param_in.mdp), ucell(unit_in) @@ -60,7 +60,12 @@ void MD_base::setup(ModuleESolver::ESolver* p_esolver, const std::string& global restart(global_readin_dir); } - ModuleIO::print_screen(0, 0, step_ + step_rst_); + // mohan add 2026-01-04 + const int stress_step = 0; + const int force_step = 0; + const int istep_print = step_ + step_rst_ + 1; + + ModuleIO::print_screen(stress_step, force_step, istep_print); MD_func::force_virial(p_esolver, step_, ucell, potential, force, cal_stress, virial); MD_func::compute_stress(ucell, vel, allmass, cal_stress, virial, stress); @@ -228,7 +233,7 @@ void MD_base::write_restart(const std::string& global_out_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_out_dir << "Restart_md.dat"; + ssc << global_out_dir << "Restart_md.txt"; std::ofstream file(ssc.str().c_str()); file << step_ + step_rst_ << std::endl; diff --git a/source/source_md/md_func.cpp b/source/source_md/md_func.cpp index d3cb2f6aa0..d57815cc33 100644 --- a/source/source_md/md_func.cpp +++ b/source/source_md/md_func.cpp @@ -496,7 +496,7 @@ void current_md_info(const int& my_rank, const std::string& file_dir, int& md_st if (my_rank == 0) { std::stringstream ssc; - ssc << file_dir << "Restart_md.dat"; + ssc << file_dir << "Restart_md.txt"; std::ifstream file(ssc.str().c_str()); if (!file) @@ -517,7 +517,7 @@ void current_md_info(const int& my_rank, const std::string& file_dir, int& md_st if (!ok) { - ModuleBase::WARNING_QUIT("current_md_info", "no Restart_md.dat!"); + ModuleBase::WARNING_QUIT("current_md_info", "no Restart_md.txt!"); } #ifdef __MPI diff --git a/source/source_md/md_func.h b/source/source_md/md_func.h index 4fdd50bd0f..28ae5101b9 100644 --- a/source/source_md/md_func.h +++ b/source/source_md/md_func.h @@ -219,7 +219,7 @@ void temp_vector(const int& natom, /** * @brief determine thr current md step and temperature * - * determine thr current md step and temperature according to Restart_md.dat if md_restart is true + * determine the current md step and temperature according to Restart_md.txt if md_restart is true * * @param my_rank MPI rank of the processor * @param file_dir the directory of read-in files diff --git a/source/source_md/msst.cpp b/source/source_md/msst.cpp index 51a6c5eafd..cadea1a8f1 100644 --- a/source/source_md/msst.cpp +++ b/source/source_md/msst.cpp @@ -83,7 +83,7 @@ void MSST::first_half(std::ofstream& ofs) const int sd = mdp.msst_direction; const double dthalf = 0.5 * md_dt; - double vol; + double vol = 0.0; energy_ = potential + kinetic; /// propagate the time derivative of volume 1/2 step @@ -171,7 +171,7 @@ void MSST::write_restart(const std::string& global_out_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_out_dir << "Restart_md.dat"; + ssc << global_out_dir << "Restart_md.txt"; std::ofstream file(ssc.str().c_str()); file << step_ + step_rst_ << std::endl; @@ -199,7 +199,7 @@ void MSST::restart(const std::string& global_readin_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_readin_dir << "Restart_md.dat"; + ssc << global_readin_dir << "Restart_md.txt"; std::ifstream file(ssc.str().c_str()); if (!file) @@ -220,7 +220,7 @@ void MSST::restart(const std::string& global_readin_dir) if (!ok) { - ModuleBase::WARNING_QUIT("mdrun", "no Restart_md.dat !"); + ModuleBase::WARNING_QUIT("mdrun", "no Restart_md.txt !"); } #ifdef __MPI diff --git a/source/source_md/nhchain.cpp b/source/source_md/nhchain.cpp index 460becf56c..ac1e23570c 100644 --- a/source/source_md/nhchain.cpp +++ b/source/source_md/nhchain.cpp @@ -326,7 +326,7 @@ void Nose_Hoover::write_restart(const std::string& global_out_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_out_dir << "Restart_md.dat"; + ssc << global_out_dir << "Restart_md.txt"; std::ofstream file(ssc.str().c_str()); file << step_ + step_rst_ << std::endl; @@ -380,7 +380,7 @@ void Nose_Hoover::restart(const std::string& global_readin_dir) if (!my_rank) { std::stringstream ssc; - ssc << global_readin_dir << "Restart_md.dat"; + ssc << global_readin_dir << "Restart_md.txt"; std::ifstream file(ssc.str().c_str()); if (!file) @@ -390,7 +390,7 @@ void Nose_Hoover::restart(const std::string& global_readin_dir) if (ok) { - double Mnum; + double Mnum = 0.0; file >> step_rst_ >> md_tfirst >> Mnum; if (Mnum != mdp.md_tchain) @@ -449,7 +449,7 @@ void Nose_Hoover::restart(const std::string& global_readin_dir) if (!ok) { - ModuleBase::WARNING_QUIT("Nose_Hoover", "no Restart_md.dat !"); + ModuleBase::WARNING_QUIT("Nose_Hoover", "no Restart_md.txt !"); } if (!ok2) { @@ -494,7 +494,7 @@ void Nose_Hoover::particle_thermo() } /// integrate loop - double factor; + double factor = 0.0; double scale = 1.0; double KE = kinetic; for (int i = 0; i < nc_tchain; ++i) @@ -583,7 +583,7 @@ void Nose_Hoover::baro_thermo() g_peta[0] = (ke_omega - lkt_press) / mass_peta[0]; /// integrate loop - double factor; + double factor = 0.0; double scale = 1.0; double kecurrent = ke_omega; for (int i = 0; i < nc_pchain; ++i) @@ -662,7 +662,7 @@ void Nose_Hoover::update_baro() } term_one /= pdim * ucell.nat; - double g_omega; + double g_omega = 0.0; double term_two = 0; for (int i = 0; i < 3; ++i) { @@ -689,7 +689,7 @@ void Nose_Hoover::update_baro() void Nose_Hoover::vel_baro() { - double factor[3]; + double factor[3] = {0.0}; for (int i = 0; i < 3; ++i) { factor[i] = exp(-(v_omega[i] + mtk_term) * md_dt / 4); @@ -721,7 +721,7 @@ void Nose_Hoover::vel_baro() void Nose_Hoover::update_volume(std::ofstream& ofs) { - double factor; + double factor = 0.0; /// tri mode, off-diagonal components, first half if (pflag[4]) diff --git a/source/source_md/run_md.cpp b/source/source_md/run_md.cpp index a24eeb3ae4..bd39ffc6cc 100644 --- a/source/source_md/run_md.cpp +++ b/source/source_md/run_md.cpp @@ -6,7 +6,7 @@ #include "md_func.h" #include "source_base/global_file.h" #include "source_base/timer.h" -#include "source_io/print_info.h" +#include "source_io/module_output/print_info.h" #include "msst.h" #include "nhchain.h" #include "verlet.h" @@ -21,7 +21,7 @@ void md_line(UnitCell& unit_in, ModuleESolver::ESolver* p_esolver, const Paramet ModuleBase::timer::tick("Run_MD", "md_line"); /// determine the md_type - MD_base* mdrun; + MD_base* mdrun = nullptr; if (param_in.mdp.md_type == "fire") { mdrun = new FIRE(param_in, unit_in); @@ -47,8 +47,8 @@ void md_line(UnitCell& unit_in, ModuleESolver::ESolver* p_esolver, const Paramet ModuleBase::WARNING_QUIT("md_line", "no such md_type!"); } - /// md cycle - while ((mdrun->step_ + mdrun->step_rst_) <= param_in.mdp.md_nstep && !mdrun->stop) + /// md cycle, mohan update 2026-01-04, change '<=' to '<' + while ((mdrun->step_ + mdrun->step_rst_) < param_in.mdp.md_nstep && !mdrun->stop) { if (mdrun->step_ == 0) { @@ -56,7 +56,11 @@ void md_line(UnitCell& unit_in, ModuleESolver::ESolver* p_esolver, const Paramet } else { - ModuleIO::print_screen(0, 0, mdrun->step_ + mdrun->step_rst_); + // mohan add 2026-01-04 + const int stress_step = 0; + const int force_step = 0; + const int istep_print = mdrun->step_ + mdrun->step_rst_ + 1; + ModuleIO::print_screen(stress_step, force_step, istep_print); mdrun->first_half(GlobalV::ofs_running); /// update force and virial due to the update of atom positions @@ -130,4 +134,4 @@ void md_line(UnitCell& unit_in, ModuleESolver::ESolver* p_esolver, const Paramet return; } -} // namespace Run_MD \ No newline at end of file +} // namespace Run_MD diff --git a/source/source_md/test/CMakeLists.txt b/source/source_md/test/CMakeLists.txt index 516fc52b0c..296e9a10b7 100644 --- a/source/source_md/test/CMakeLists.txt +++ b/source/source_md/test/CMakeLists.txt @@ -12,6 +12,7 @@ list(APPEND depend_files ../../source_cell/read_atom_species.cpp ../../source_cell/atom_pseudo.cpp ../../source_cell/read_atoms.cpp + ../../source_cell/read_atoms_helper.cpp ../../source_cell/pseudo.cpp ../../source_cell/read_pp.cpp ../../source_cell/read_pp_complete.cpp @@ -44,10 +45,10 @@ list(APPEND depend_files ../../source_cell/module_neighbor/sltk_atom.cpp ../../source_cell/module_neighbor/sltk_grid.cpp ../../source_cell/module_neighbor/sltk_grid_driver.cpp - ../../source_io/output.cpp - ../../source_io/output_log.cpp - ../../source_io/print_info.cpp - ../../source_io/cif_io.cpp + ../../source_io/module_output/output.cpp + ../../source_io/module_output/output_log.cpp + ../../source_io/module_output/print_info.cpp + ../../source_io/module_output/cif_io.cpp ../../source_esolver/esolver_lj.cpp ../../source_base/parallel_reduce.cpp ../../source_base/parallel_global.cpp @@ -98,7 +99,7 @@ AddTest( SOURCES nhchain_test.cpp ../md_base.cpp ../nhchain.cpp - ../../source_io/output.cpp + ../../source_io/module_output/output.cpp ${depend_files} ) @@ -109,7 +110,7 @@ AddTest( ../md_base.cpp ../msst.cpp ../../source_cell/update_cell.cpp - ../../source_io/output.cpp + ../../source_io/module_output/output.cpp ${depend_files} ) diff --git a/source/source_md/test/fire_test.cpp b/source/source_md/test/fire_test.cpp index 61528b91c0..3b294da46a 100644 --- a/source/source_md/test/fire_test.cpp +++ b/source/source_md/test/fire_test.cpp @@ -145,7 +145,7 @@ TEST_F(FIREtest, WriteRestart) mdrun->step_rst_ = 2; mdrun->write_restart(PARAM.sys.global_out_dir); - std::ifstream ifs("Restart_md.dat"); + std::ifstream ifs("Restart_md.txt"); std::string output_str; getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("3")); @@ -165,7 +165,7 @@ TEST_F(FIREtest, WriteRestart) TEST_F(FIREtest, Restart) { mdrun->restart(PARAM.sys.global_readin_dir); - remove("Restart_md.dat"); + remove("Restart_md.txt"); FIRE* fire = dynamic_cast(mdrun); EXPECT_EQ(mdrun->step_rst_, 3); diff --git a/source/source_md/test/langevin_test.cpp b/source/source_md/test/langevin_test.cpp index 7a3254454d..69df605b15 100644 --- a/source/source_md/test/langevin_test.cpp +++ b/source/source_md/test/langevin_test.cpp @@ -146,7 +146,7 @@ TEST_F(Langevin_test, write_restart) mdrun->step_rst_ = 2; mdrun->write_restart(PARAM.sys.global_out_dir); - std::ifstream ifs("Restart_md.dat"); + std::ifstream ifs("Restart_md.txt"); std::string output_str; getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("3")); @@ -156,7 +156,7 @@ TEST_F(Langevin_test, write_restart) TEST_F(Langevin_test, restart) { mdrun->restart(PARAM.sys.global_readin_dir); - remove("Restart_md.dat"); + remove("Restart_md.txt"); EXPECT_EQ(mdrun->step_rst_, 3); } diff --git a/source/source_md/test/md_func_test.cpp b/source/source_md/test/md_func_test.cpp index 8455823885..eb9ce57a5f 100644 --- a/source/source_md/test/md_func_test.cpp +++ b/source/source_md/test/md_func_test.cpp @@ -418,9 +418,9 @@ TEST_F(MD_func_test, print_stress) TEST_F(MD_func_test, current_md_info) { - // Set up the file directory and create the Restart_md.dat file + // Set up the file directory and create the Restart_md.txt file std::string file_dir = "./"; - std::ofstream file(file_dir + "Restart_md.dat"); + std::ofstream file(file_dir + "Restart_md.txt"); file << 123; file.close(); int istep = -1; @@ -430,7 +430,7 @@ TEST_F(MD_func_test, current_md_info) // Call the function with the correct file path and check the result EXPECT_EQ(istep, 123); EXPECT_DOUBLE_EQ(temperature, 0.0); - remove("Restart_md.dat"); + remove("Restart_md.txt"); } TEST_F(MD_func_test, current_step_warning) diff --git a/source/source_md/test/msst_test.cpp b/source/source_md/test/msst_test.cpp index b59652a6fd..7d0fd8054d 100644 --- a/source/source_md/test/msst_test.cpp +++ b/source/source_md/test/msst_test.cpp @@ -184,7 +184,7 @@ TEST_F(MSST_test, write_restart) mdrun->step_rst_ = 2; mdrun->write_restart(PARAM.sys.global_out_dir); - std::ifstream ifs("Restart_md.dat"); + std::ifstream ifs("Restart_md.txt"); std::string output_str; getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("3")); @@ -206,7 +206,7 @@ TEST_F(MSST_test, write_restart) TEST_F(MSST_test, restart) { mdrun->restart(PARAM.sys.global_readin_dir); - remove("Restart_md.dat"); + remove("Restart_md.txt"); MSST* msst = dynamic_cast(mdrun); EXPECT_EQ(mdrun->step_rst_, 3); diff --git a/source/source_md/test/nhchain_test.cpp b/source/source_md/test/nhchain_test.cpp index 60e9525d97..647df0a730 100644 --- a/source/source_md/test/nhchain_test.cpp +++ b/source/source_md/test/nhchain_test.cpp @@ -150,7 +150,7 @@ TEST_F(NHC_test, write_restart) mdrun->step_rst_ = 2; mdrun->write_restart(PARAM.sys.global_out_dir); - std::ifstream ifs("Restart_md.dat"); + std::ifstream ifs("Restart_md.txt"); std::string output_str; getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("3")); @@ -177,7 +177,7 @@ TEST_F(NHC_test, write_restart) TEST_F(NHC_test, restart) { mdrun->restart(PARAM.sys.global_readin_dir); - remove("Restart_md.dat"); + remove("Restart_md.txt"); Nose_Hoover* nhc = dynamic_cast(mdrun); EXPECT_EQ(mdrun->step_rst_, 3); diff --git a/source/source_md/test/verlet_test.cpp b/source/source_md/test/verlet_test.cpp index 00013abf15..8f2c00f74f 100644 --- a/source/source_md/test/verlet_test.cpp +++ b/source/source_md/test/verlet_test.cpp @@ -287,7 +287,7 @@ TEST_F(Verlet_test, write_restart) mdrun->step_rst_ = 2; mdrun->write_restart(PARAM.sys.global_out_dir); - std::ifstream ifs("Restart_md.dat"); + std::ifstream ifs("Restart_md.txt"); std::string output_str; getline(ifs, output_str); EXPECT_THAT(output_str, testing::HasSubstr("3")); @@ -297,7 +297,7 @@ TEST_F(Verlet_test, write_restart) TEST_F(Verlet_test, restart) { mdrun->restart(PARAM.sys.global_readin_dir); - remove("Restart_md.dat"); + remove("Restart_md.txt"); EXPECT_EQ(mdrun->step_rst_, 3); } diff --git a/source/source_md/verlet.cpp b/source/source_md/verlet.cpp index 3eafb181e1..66871f8970 100644 --- a/source/source_md/verlet.cpp +++ b/source/source_md/verlet.cpp @@ -75,7 +75,7 @@ void Verlet::apply_thermostat(void) { if (my_rank == 0) { - double deviation; + double deviation = 0.0; for (int i = 0; i < ucell.nat; ++i) { if (static_cast(std::rand()) / RAND_MAX <= 1.0 / mdp.md_nraise) diff --git a/source/source_psi/CMakeLists.txt b/source/source_psi/CMakeLists.txt index 54d636728f..8be3a2ba39 100644 --- a/source/source_psi/CMakeLists.txt +++ b/source/source_psi/CMakeLists.txt @@ -9,19 +9,19 @@ add_library( OBJECT setup_psi_pw.cpp setup_psi.cpp - psi_init.cpp + psi_prepare.cpp ) add_library( psi_initializer OBJECT psi_initializer.cpp - psi_initializer_random.cpp - psi_initializer_file.cpp - psi_initializer_atomic.cpp - psi_initializer_atomic_random.cpp - psi_initializer_nao.cpp - psi_initializer_nao_random.cpp + psi_init_random.cpp + psi_init_file.cpp + psi_init_atomic.cpp + psi_init_atomic_random.cpp + psi_init_nao.cpp + psi_init_nao_random.cpp ) diff --git a/source/source_psi/psi_initializer_atomic.cpp b/source/source_psi/psi_init_atomic.cpp similarity index 95% rename from source/source_psi/psi_initializer_atomic.cpp rename to source/source_psi/psi_init_atomic.cpp index 3ab972ac4e..31666262a0 100644 --- a/source/source_psi/psi_initializer_atomic.cpp +++ b/source/source_psi/psi_init_atomic.cpp @@ -1,4 +1,4 @@ -#include "psi_initializer_atomic.h" +#include "psi_init_atomic.h" #include "source_pw/module_pwdft/soc.h" // numerical algorithm support #include "source_base/math_integral.h" // for numerical integration @@ -12,7 +12,7 @@ #include "source_base/global_variable.h" #include "source_io/module_parameter/parameter.h" // io support -#include "source_io/write_pao.h" +#include "source_io/module_output/write_pao.h" // free function, compared with common radial function normalization, it does not multiply r to function // due to pswfc is already multiplied by r @@ -27,7 +27,7 @@ // } template -void psi_initializer_atomic::allocate_ps_table() +void psi_init_atomic::allocate_ps_table() { // find correct dimension for ovlp_flzjlq int dim1 = this->p_ucell_->ntype; @@ -38,7 +38,7 @@ void psi_initializer_atomic::allocate_ps_table() } if (dim2 == 0) { - ModuleBase::WARNING_QUIT("psi_initializer_atomic::allocate_table", "there is not ANY pseudo atomic orbital read in present system, recommand other methods, quit."); + ModuleBase::WARNING_QUIT("psi_init_atomic::allocate_table", "there is not ANY pseudo atomic orbital read in present system, recommand other methods, quit."); } int dim3 = PARAM.globalv.nqx; // allocate memory for ovlp_flzjlq @@ -47,7 +47,7 @@ void psi_initializer_atomic::allocate_ps_table() } template -void psi_initializer_atomic::initialize(const Structure_Factor* sf, //< structure factor +void psi_init_atomic::initialize(const Structure_Factor* sf, //< structure factor const ModulePW::PW_Basis_K* pw_wfc, //< planewave basis const UnitCell* p_ucell, //< unit cell const K_Vectors* p_kv_in, @@ -59,7 +59,7 @@ void psi_initializer_atomic::initialize(const Structure_Factor* sf, / if(p_pspot_nl == nullptr) { - ModuleBase::WARNING_QUIT("psi_initializer_atomic::initialize", + ModuleBase::WARNING_QUIT("psi_init_atomic::initialize", "pseudopot_cell_vnl object cannot be nullptr for atomic, quit."); } // import @@ -77,7 +77,7 @@ void psi_initializer_atomic::initialize(const Structure_Factor* sf, / } template -void psi_initializer_atomic::tabulate() +void psi_init_atomic::tabulate() { ModuleBase::timer::tick("psi_init_atomic", "tabulate"); @@ -229,7 +229,7 @@ std::complex phase_factor(double arg, int mode) } template -void psi_initializer_atomic::init_psig(T* psig, const int& ik) +void psi_init_atomic::init_psig(T* psig, const int& ik) { ModuleBase::timer::tick("psi_init_atomic", "init_psig"); const int npw = this->pw_wfc_->npwk[ik]; @@ -336,17 +336,17 @@ void psi_initializer_atomic::init_psig(T* psig, const int& ik) int ipswfc_noncolin_soc=0; /* J = L - 1/2 -> continue */ /* J = L + 1/2 */ - if(fabs(j - l + 0.5) < 1e-4) - { - continue; - } - chiaux.clear(); - chiaux.resize(npw); + if(fabs(j - l + 0.5) < 1e-4) + { + continue; + } + chiaux.clear(); + chiaux.resize(npw); /* L == 0 */ - if(l == 0) - { - std::memcpy(chiaux.data(), ovlp_pswfcjlg.data(), npw * sizeof(double)); - } + if(l == 0) + { + std::memcpy(chiaux.data(), ovlp_pswfcjlg.data(), npw * sizeof(double)); + } else { /* L != 0, scan pswfcs that have the same L and satisfy J(pswfc) = L - 0.5 */ @@ -382,7 +382,7 @@ void psi_initializer_atomic::init_psig(T* psig, const int& ik) if(index+2*l+1 > this->p_ucell_->natomwfc) { std::cout<<__FILE__<<__LINE__<<" "<p_ucell_->natomwfc<::init_psig()","error: too many wfcs"); + //ModuleBase::WARNING_QUIT("psi_init_atomic::init_psig()","error: too many wfcs"); } for(int ig = 0;ig::init_psig(T* psig, const int& ik) if(index+2*l+1 > this->p_ucell_->natomwfc) { std::cout<<__FILE__<<__LINE__<<" "<p_ucell_->natomwfc<::init_psig()","error: too many wfcs"); + //ModuleBase::WARNING_QUIT("psi_init_atomic::init_psig()","error: too many wfcs"); } for(int ig = 0;ig::init_psig(T* psig, const int& ik) ModuleBase::timer::tick("psi_init_atomic", "init_psig"); } -template class psi_initializer_atomic>; -template class psi_initializer_atomic>; +template class psi_init_atomic>; +template class psi_init_atomic>; // gamma point calculation -template class psi_initializer_atomic; -template class psi_initializer_atomic; +template class psi_init_atomic; +template class psi_init_atomic; \ No newline at end of file diff --git a/source/source_psi/psi_initializer_atomic.h b/source/source_psi/psi_init_atomic.h similarity index 81% rename from source/source_psi/psi_initializer_atomic.h rename to source/source_psi/psi_init_atomic.h index 65ca8f015a..4cdfabdc6c 100644 --- a/source/source_psi/psi_initializer_atomic.h +++ b/source/source_psi/psi_init_atomic.h @@ -1,5 +1,5 @@ -#ifndef PSI_INITIALIZER_ATOMIC_H -#define PSI_INITIALIZER_ATOMIC_H +#ifndef PSI_INIT_ATOMIC_H +#define PSI_INIT_ATOMIC_H #include "source_base/realarray.h" #include "psi_initializer.h" @@ -7,19 +7,19 @@ Psi (planewave based wavefunction) initializer: atomic */ template -class psi_initializer_atomic : public psi_initializer +class psi_init_atomic : public psi_initializer { private: using Real = typename GetTypeReal::type; public: - psi_initializer_atomic() + psi_init_atomic() { this->method_ = "atomic"; } - ~psi_initializer_atomic(){}; + ~psi_init_atomic(){}; - /// @brief initialize the psi_initializer with external data and methods + /// @brief initialize the psi_init with external data and methods virtual void initialize(const Structure_Factor*, //< structure factor const ModulePW::PW_Basis_K*, //< planewave basis const UnitCell*, //< unit cell diff --git a/source/source_psi/psi_initializer_atomic_random.cpp b/source/source_psi/psi_init_atomic_random.cpp similarity index 66% rename from source/source_psi/psi_initializer_atomic_random.cpp rename to source/source_psi/psi_init_atomic_random.cpp index f9d8f5c0a4..91fd4c10bc 100644 --- a/source/source_psi/psi_initializer_atomic_random.cpp +++ b/source/source_psi/psi_init_atomic_random.cpp @@ -1,9 +1,9 @@ -#include "psi_initializer_atomic_random.h" +#include "psi_init_atomic_random.h" #include "source_io/module_parameter/parameter.h" template -void psi_initializer_atomic_random::initialize(const Structure_Factor* sf, //< structure factor +void psi_init_atomic_random::initialize(const Structure_Factor* sf, //< structure factor const ModulePW::PW_Basis_K* pw_wfc, //< planewave basis const UnitCell* p_ucell, //< unit cell const K_Vectors* p_kv_in, @@ -11,14 +11,14 @@ void psi_initializer_atomic_random::initialize(const Structure_Factor* sf, const pseudopot_cell_vnl* p_pspot_nl, const int& rank) { - psi_initializer_atomic::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); + psi_init_atomic::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); } template -void psi_initializer_atomic_random::init_psig(T* psig, const int& ik) +void psi_init_atomic_random::init_psig(T* psig, const int& ik) { double rm = this->mixing_coef_; - psi_initializer_atomic::init_psig(psig, ik); + psi_init_atomic::init_psig(psig, ik); const int npol = PARAM.globalv.npol; const int nbasis = this->pw_wfc_->npwk_max * npol; psi::Psi psi_random(1, this->nbands_start_, nbasis, nbasis, true); @@ -33,8 +33,8 @@ void psi_initializer_atomic_random::init_psig(T* psig, const int& ik) } } -template class psi_initializer_atomic_random>; -template class psi_initializer_atomic_random>; +template class psi_init_atomic_random>; +template class psi_init_atomic_random>; // gamma point calculation -template class psi_initializer_atomic_random; -template class psi_initializer_atomic_random; \ No newline at end of file +template class psi_init_atomic_random; +template class psi_init_atomic_random; \ No newline at end of file diff --git a/source/source_psi/psi_initializer_atomic_random.h b/source/source_psi/psi_init_atomic_random.h similarity index 76% rename from source/source_psi/psi_initializer_atomic_random.h rename to source/source_psi/psi_init_atomic_random.h index e37adc4c23..46a79ff0e6 100644 --- a/source/source_psi/psi_initializer_atomic_random.h +++ b/source/source_psi/psi_init_atomic_random.h @@ -1,25 +1,25 @@ -#ifndef PSI_INITIALIZER_ATOMIC_RANDOM_H -#define PSI_INITIALIZER_ATOMIC_RANDOM_H +#ifndef PSI_INIT_ATOMIC_RANDOM_H +#define PSI_INIT_ATOMIC_RANDOM_H #include "source_cell/parallel_kpoints.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" -#include "psi_initializer_atomic.h" +#include "source_pw/module_pwdft/vnl_pw.h" +#include "psi_init_atomic.h" /* Psi (planewave based wavefunction) initializer: atomic+random */ template -class psi_initializer_atomic_random : public psi_initializer_atomic +class psi_init_atomic_random : public psi_init_atomic { private: using Real = typename GetTypeReal::type; public: - psi_initializer_atomic_random() + psi_init_atomic_random() { this->method_ = "atomic+random"; this->mixing_coef_ = 0.05; } - ~psi_initializer_atomic_random(){}; + ~psi_init_atomic_random(){}; /// @brief initialize the psi_initializer with external data and methods virtual void initialize(const Structure_Factor*, //< structure factor diff --git a/source/source_psi/psi_initializer_file.cpp b/source/source_psi/psi_init_file.cpp similarity index 65% rename from source/source_psi/psi_initializer_file.cpp rename to source/source_psi/psi_init_file.cpp index 4a6d3f871e..89484906e0 100644 --- a/source/source_psi/psi_initializer_file.cpp +++ b/source/source_psi/psi_init_file.cpp @@ -1,19 +1,19 @@ -#include "psi_initializer_file.h" +#include "psi_init_file.h" #include "source_base/timer.h" #include "source_cell/klist.h" -#include "source_io/read_wfc_pw.h" -#include "source_io/filename.h" +#include "source_io/module_wf/read_wfc_pw.h" +#include "source_io/module_output/filename.h" #include "source_io/module_parameter/parameter.h" template -void psi_initializer_file::initialize(const Structure_Factor* sf, - const ModulePW::PW_Basis_K* pw_wfc, - const UnitCell* p_ucell, - const K_Vectors* p_kv_in, - const int& random_seed, - const pseudopot_cell_vnl* p_pspot_nl, - const int& rank) +void psi_init_file::initialize(const Structure_Factor* sf, + const ModulePW::PW_Basis_K* pw_wfc, + const UnitCell* p_ucell, + const K_Vectors* p_kv_in, + const int& random_seed, + const pseudopot_cell_vnl* p_pspot_nl, + const int& rank) { psi_initializer::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); this->nbands_start_ = PARAM.inp.nbands; @@ -21,7 +21,7 @@ void psi_initializer_file::initialize(const Structure_Factor* sf, } template -void psi_initializer_file::init_psig(T* psig, const int& ik) +void psi_init_file::init_psig(T* psig, const int& ik) { ModuleBase::timer::tick("psi_init_file", "init_psig"); const int npol = PARAM.globalv.npol; @@ -56,5 +56,5 @@ void psi_initializer_file::init_psig(T* psig, const int& ik) ModuleBase::timer::tick("psi_init_file", "init_psig"); } -template class psi_initializer_file>; -template class psi_initializer_file>; +template class psi_init_file>; +template class psi_init_file>; diff --git a/source/source_psi/psi_initializer_file.h b/source/source_psi/psi_init_file.h similarity index 85% rename from source/source_psi/psi_initializer_file.h rename to source/source_psi/psi_init_file.h index 115f0425c3..72fb18ed1e 100644 --- a/source/source_psi/psi_initializer_file.h +++ b/source/source_psi/psi_init_file.h @@ -1,23 +1,24 @@ -#ifndef PSI_INITIALIZER_FILE_H -#define PSI_INITIALIZER_FILE_H +#ifndef PSI_INIT_FILE_H +#define PSI_INIT_FILE_H +#include "source_pw/module_pwdft/vnl_pw.h" #include "psi_initializer.h" /* Psi (planewave based wavefunction) initializer: random method */ template -class psi_initializer_file : public psi_initializer +class psi_init_file : public psi_initializer { private: using Real = typename GetTypeReal::type; public: - psi_initializer_file() + psi_init_file() { this->method_ = "file"; }; - ~psi_initializer_file(){}; + ~psi_init_file(){}; /// @brief initialize the psi_initializer with external data and methods virtual void initialize(const Structure_Factor*, //< structure factor @@ -33,4 +34,4 @@ class psi_initializer_file : public psi_initializer /// @return initialized planewave wavefunction (psi::Psi>*) virtual void init_psig(T* psig, const int& ik) override; }; -#endif \ No newline at end of file +#endif diff --git a/source/source_psi/psi_initializer_nao.cpp b/source/source_psi/psi_init_nao.cpp similarity index 92% rename from source/source_psi/psi_initializer_nao.cpp rename to source/source_psi/psi_init_nao.cpp index ff4f5667d4..29d018f213 100644 --- a/source/source_psi/psi_initializer_nao.cpp +++ b/source/source_psi/psi_init_nao.cpp @@ -1,4 +1,4 @@ -#include "psi_initializer_nao.h" +#include "psi_init_nao.h" #include // numerical algorithm support @@ -16,7 +16,7 @@ #include "source_base/parallel_common.h" #include "source_base/parallel_reduce.h" #endif -#include "source_io/orb_io.h" +#include "source_io/module_output/orb_io.h" #include "source_io/module_parameter/parameter.h" // GlobalV::NQX and GlobalV::DQ are here #include "source_io/module_parameter/parameter.h" @@ -29,7 +29,7 @@ I don't know why some variables are distributed while others not... for example We need not only read and import, but also distribute here */ -// free function, not needed to be a member of psi_initializer_nao +// free function, not needed to be a member of psi_init_nao void normalize(const std::vector& r, std::vector& flz) { std::vector flz2r2(r.size()); @@ -43,7 +43,7 @@ void normalize(const std::vector& r, std::vector& flz) } template -void psi_initializer_nao::read_external_orbs(const std::string* orbital_files, const int& rank) +void psi_init_nao::read_external_orbs(const std::string* orbital_files, const int& rank) { ModuleBase::timer::tick("psi_init_nao", "read_external_orbs"); @@ -75,19 +75,19 @@ void psi_initializer_nao::read_external_orbs(const std::string* orbital_files #endif if (!is_open) { - GlobalV::ofs_warning << "psi_initializer_nao::read_orbital_files: cannot open orbital file: " + GlobalV::ofs_warning << "psi_init_nao::read_orbital_files: cannot open orbital file: " << this->orbital_files_[it] << std::endl; - ModuleBase::WARNING_QUIT("psi_initializer_nao::read_orbital_files", "cannot open orbital file."); + ModuleBase::WARNING_QUIT("psi_init_nao::read_orbital_files", "cannot open orbital file."); } else { - GlobalV::ofs_running << "psi_initializer_nao::read_orbital_files: reading orbital file: " + GlobalV::ofs_running << "psi_init_nao::read_orbital_files: reading orbital file: " << this->orbital_files_[it] << std::endl; } std::string elem; // garbage value, will discard - double ecut; // garbage value, will discard - int nr; - double dr; + double ecut = 0.0; // garbage value, will discard + int nr = 0; + double dr = 0.0; std::vector nzeta; std::vector> radials; ModuleIO::read_abacus_orb(ifs_it, elem, ecut, nr, dr, nzeta, radials, rank); @@ -120,7 +120,7 @@ void psi_initializer_nao::read_external_orbs(const std::string* orbital_files } template -void psi_initializer_nao::allocate_ao_table() +void psi_init_nao::allocate_ao_table() { // find correct dimension for ovlp_flzjlq int ntype = this->p_ucell_->ntype; @@ -139,7 +139,7 @@ void psi_initializer_nao::allocate_ao_table() } if (nzeta_max == 0) { - ModuleBase::WARNING_QUIT("psi_initializer_nao::psi_initializer_nao", + ModuleBase::WARNING_QUIT("psi_init_nao::psi_init_nao", "there is not ANY numerical atomic orbital read in present system, quit."); } // allocate a map (it, l, izeta) -> i, should allocate memory of ntype * lmax * nzeta_max @@ -147,7 +147,7 @@ void psi_initializer_nao::allocate_ao_table() } template -void psi_initializer_nao::initialize(const Structure_Factor* sf, +void psi_init_nao::initialize(const Structure_Factor* sf, const ModulePW::PW_Basis_K* pw_wfc, const UnitCell* p_ucell, const K_Vectors* p_kv_in, @@ -195,7 +195,7 @@ void psi_initializer_nao::initialize(const Structure_Factor* sf, } template -void psi_initializer_nao::tabulate() +void psi_init_nao::tabulate() { ModuleBase::timer::tick("psi_init_nao", "tabulate"); @@ -250,7 +250,7 @@ void psi_initializer_nao::tabulate() } template -void psi_initializer_nao::init_psig(T* psig, const int& ik) +void psi_init_nao::init_psig(T* psig, const int& ik) { ModuleBase::timer::tick("psi_init_nao", "init_psig"); assert(ik >= 0); @@ -264,7 +264,7 @@ void psi_initializer_nao::init_psig(T* psig, const int& ik) std::vector qnorm(npw); std::vector> q(npw); -#pragma omp parallel for schedule(static, 4096 / sizeof(double)) +#pragma omp parallel for schedule(static) for (int ig = 0; ig < npw; ig++) { q[ig] = this->pw_wfc_->getgpluskcar(ik, ig); @@ -382,8 +382,8 @@ void psi_initializer_nao::init_psig(T* psig, const int& ik) ModuleBase::timer::tick("psi_init_nao", "init_psig"); } -template class psi_initializer_nao>; -template class psi_initializer_nao>; +template class psi_init_nao>; +template class psi_init_nao>; // gamma point calculation -template class psi_initializer_nao; -template class psi_initializer_nao; +template class psi_init_nao; +template class psi_init_nao; \ No newline at end of file diff --git a/source/source_psi/psi_initializer_nao.h b/source/source_psi/psi_init_nao.h similarity index 95% rename from source/source_psi/psi_initializer_nao.h rename to source/source_psi/psi_init_nao.h index b6ab4df303..b965c72e3e 100644 --- a/source/source_psi/psi_initializer_nao.h +++ b/source/source_psi/psi_init_nao.h @@ -1,5 +1,5 @@ -#ifndef PSI_INITIALIZER_NAO_H -#define PSI_INITIALIZER_NAO_H +#ifndef PSI_INIT_NAO_H +#define PSI_INIT_NAO_H #include "source_base/cubic_spline.h" #include "source_base/realarray.h" #include "psi_initializer.h" @@ -9,17 +9,17 @@ Psi (planewave based wavefunction) initializer: numerical atomic orbital method */ template -class psi_initializer_nao : public psi_initializer +class psi_init_nao : public psi_initializer { private: using Real = typename GetTypeReal::type; public: - psi_initializer_nao() + psi_init_nao() { this->method_ = "nao"; }; - ~psi_initializer_nao(){}; + ~psi_init_nao(){}; virtual void init_psig(T* psig, const int& ik) override; diff --git a/source/source_psi/psi_initializer_nao_random.cpp b/source/source_psi/psi_init_nao_random.cpp similarity index 66% rename from source/source_psi/psi_initializer_nao_random.cpp rename to source/source_psi/psi_init_nao_random.cpp index 024a94ea58..e3e2b8e89c 100644 --- a/source/source_psi/psi_initializer_nao_random.cpp +++ b/source/source_psi/psi_init_nao_random.cpp @@ -1,9 +1,9 @@ -#include "psi_initializer_nao_random.h" +#include "psi_init_nao_random.h" #include "source_io/module_parameter/parameter.h" template -void psi_initializer_nao_random::initialize(const Structure_Factor* sf, +void psi_init_nao_random::initialize(const Structure_Factor* sf, const ModulePW::PW_Basis_K* pw_wfc, const UnitCell* p_ucell, const K_Vectors* p_kv_in, @@ -11,14 +11,14 @@ void psi_initializer_nao_random::initialize(const Structure_Factor* sf, const pseudopot_cell_vnl* p_pspot_nl, const int& rank) { - psi_initializer_nao::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); + psi_init_nao::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); } template -void psi_initializer_nao_random::init_psig(T* psig, const int& ik) +void psi_init_nao_random::init_psig(T* psig, const int& ik) { double rm = this->mixing_coef_; - psi_initializer_nao::init_psig(psig, ik); + psi_init_nao::init_psig(psig, ik); const int npol = PARAM.globalv.npol; const int nbasis = this->pw_wfc_->npwk_max * npol; psi::Psi psi_random(1, this->nbands_start_, nbasis, nbasis, true); @@ -33,8 +33,8 @@ void psi_initializer_nao_random::init_psig(T* psig, const int& ik) } } -template class psi_initializer_nao_random>; -template class psi_initializer_nao_random>; +template class psi_init_nao_random>; +template class psi_init_nao_random>; // gamma point calculation -template class psi_initializer_nao_random; -template class psi_initializer_nao_random; \ No newline at end of file +template class psi_init_nao_random; +template class psi_init_nao_random; \ No newline at end of file diff --git a/source/source_psi/psi_initializer_nao_random.h b/source/source_psi/psi_init_nao_random.h similarity index 72% rename from source/source_psi/psi_initializer_nao_random.h rename to source/source_psi/psi_init_nao_random.h index 0dd1853a13..dbe07d8c77 100644 --- a/source/source_psi/psi_initializer_nao_random.h +++ b/source/source_psi/psi_init_nao_random.h @@ -1,27 +1,27 @@ -#ifndef PSI_INITIALIZER_NAO_RANDOM_H -#define PSI_INITIALIZER_NAO_RANDOM_H +#ifndef PSI_INIT_NAO_RANDOM_H +#define PSI_INIT_NAO_RANDOM_H #include "source_cell/parallel_kpoints.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" -#include "psi_initializer_nao.h" +#include "source_pw/module_pwdft/vnl_pw.h" +#include "psi_init_nao.h" /* Psi (planewave based wavefunction) initializer: numerical atomic orbital + random method */ template -class psi_initializer_nao_random : public psi_initializer_nao +class psi_init_nao_random : public psi_init_nao { private: using Real = typename GetTypeReal::type; public: - psi_initializer_nao_random() + psi_init_nao_random() { this->method_ = "nao+random"; this->mixing_coef_ = 0.05; }; - ~psi_initializer_nao_random(){}; + ~psi_init_nao_random(){}; - /// @brief initialize the psi_initializer with external data and methods + /// @brief initialize the psi_init with external data and methods virtual void initialize(const Structure_Factor*, //< structure factor const ModulePW::PW_Basis_K*, //< planewave basis const UnitCell*, //< unit cell diff --git a/source/source_psi/psi_init_random.cpp b/source/source_psi/psi_init_random.cpp new file mode 100644 index 0000000000..697a4476ad --- /dev/null +++ b/source/source_psi/psi_init_random.cpp @@ -0,0 +1,31 @@ +#include "psi_init_random.h" +#include "source_io/module_parameter/parameter.h" + +template +void psi_init_random::initialize(const Structure_Factor* sf, + const ModulePW::PW_Basis_K* pw_wfc, + const UnitCell* p_ucell, + const K_Vectors* p_kv_in, + const int& random_seed, + const pseudopot_cell_vnl* p_pspot_nl, + const int& rank) +{ + psi_initializer::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); + this->nbands_start_ = PARAM.inp.nbands; + this->nbands_complem_ = 0; +} + +template +void psi_init_random::init_psig(T* psig, const int& ik) +{ + this->random_t(psig, 0, this->nbands_start_, ik); +} + +template class psi_init_random>; +template class psi_init_random>; +// gamma point calculation +template class psi_init_random; +template class psi_init_random; diff --git a/source/source_psi/psi_initializer_random.h b/source/source_psi/psi_init_random.h similarity index 77% rename from source/source_psi/psi_initializer_random.h rename to source/source_psi/psi_init_random.h index 2c9ab4a5c4..8d66035ec6 100644 --- a/source/source_psi/psi_initializer_random.h +++ b/source/source_psi/psi_init_random.h @@ -1,29 +1,29 @@ -#ifndef PSI_INITIALIZER_RANDOM_H -#define PSI_INITIALIZER_RANDOM_H +#ifndef PSI_INIT_RANDOM_H +#define PSI_INIT_RANDOM_H -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "psi_initializer.h" /* Psi (planewave based wavefunction) initializer: random method */ template -class psi_initializer_random : public psi_initializer +class psi_init_random : public psi_initializer { private: using Real = typename GetTypeReal::type; public: - psi_initializer_random() + psi_init_random() { this->method_ = "random"; }; - ~psi_initializer_random(){}; + ~psi_init_random(){}; /// @brief calculate and output planewave wavefunction /// @param ik kpoint index /// @return initialized planewave wavefunction (psi::Psi>*) virtual void init_psig(T* psig, const int& ik) override; - /// @brief initialize the psi_initializer with external data and methods + /// @brief initialize the psi_init with external data and methods virtual void initialize(const Structure_Factor*, //< structure factor const ModulePW::PW_Basis_K*, //< planewave basis const UnitCell*, //< unit cell diff --git a/source/source_psi/psi_initializer.cpp b/source/source_psi/psi_initializer.cpp index 2f1fd46f99..cc260ec90c 100644 --- a/source/source_psi/psi_initializer.cpp +++ b/source/source_psi/psi_initializer.cpp @@ -92,7 +92,7 @@ void psi_initializer::random_t(T* psi, const int iw_start, const int iw_end, } // then for each g-component, initialize the wavefunction value #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(T)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < ng; ig++) { @@ -104,7 +104,7 @@ void psi_initializer::random_t(T* psi, const int iw_start, const int iw_end, psi_slice[ig] = this->template cast_to_T(std::complex(rr * cos(arg), rr * sin(arg))); } #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(T)) +#pragma omp parallel for schedule(static) #endif for (int ig = ng; ig < npwk_max; ++ig) { @@ -151,7 +151,7 @@ void psi_initializer::random_t(T* psi, const int iw_start, const int iw_end, for (int ipol = 0; ipol < npol; ipol++) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(T)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < ng; ig++) { diff --git a/source/source_psi/psi_initializer.h b/source/source_psi/psi_initializer.h index 7f48fc7d58..a812656209 100644 --- a/source/source_psi/psi_initializer.h +++ b/source/source_psi/psi_initializer.h @@ -2,7 +2,7 @@ #define PSI_INITIALIZER_H // data structure support #include "source_basis/module_pw/pw_basis_k.h" // for kpoint related data structure -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_psi/psi.h" // for psi data structure // smart pointer for auto-memory management diff --git a/source/source_psi/psi_initializer_random.cpp b/source/source_psi/psi_initializer_random.cpp deleted file mode 100644 index 80f9a371c4..0000000000 --- a/source/source_psi/psi_initializer_random.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "psi_initializer_random.h" -#ifdef __MPI -#include -#endif -#include "source_base/parallel_global.h" -#include "source_base/timer.h" -#include "source_cell/parallel_kpoints.h" -#include "source_io/module_parameter/parameter.h" - -template -void psi_initializer_random::initialize(const Structure_Factor* sf, - const ModulePW::PW_Basis_K* pw_wfc, - const UnitCell* p_ucell, - const K_Vectors* p_kv_in, - const int& random_seed, - const pseudopot_cell_vnl* p_pspot_nl, - const int& rank) -{ - psi_initializer::initialize(sf, pw_wfc, p_ucell, p_kv_in, random_seed, p_pspot_nl, rank); - this->ixy2is_.clear(); - this->ixy2is_.resize(this->pw_wfc_->fftnxy); - this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); - this->nbands_start_ = PARAM.inp.nbands; - this->nbands_complem_ = 0; -} - -template -void psi_initializer_random::init_psig(T* psig, const int& ik) -{ - ModuleBase::timer::tick("psi_init_random", "init_psig"); - this->random_t(psig, 0, this->nbands_start_, ik); - ModuleBase::timer::tick("psi_init_random", "init_psig"); -} - -template class psi_initializer_random>; -template class psi_initializer_random>; -// gamma point calculation -template class psi_initializer_random; -template class psi_initializer_random; diff --git a/source/source_psi/psi_init.cpp b/source/source_psi/psi_prepare.cpp similarity index 73% rename from source/source_psi/psi_init.cpp rename to source/source_psi/psi_prepare.cpp index a6720b24e6..e7c881c62e 100644 --- a/source/source_psi/psi_init.cpp +++ b/source/source_psi/psi_prepare.cpp @@ -1,4 +1,4 @@ -#include "psi_init.h" +#include "psi_prepare.h" #include "source_base/macros.h" #include "source_base/memory.h" @@ -7,17 +7,17 @@ #include "source_base/tool_quit.h" #include "source_hsolver/diago_iter_assist.h" #include "source_io/module_parameter/parameter.h" -#include "source_psi/psi_initializer_atomic.h" -#include "source_psi/psi_initializer_atomic_random.h" -#include "source_psi/psi_initializer_file.h" -#include "source_psi/psi_initializer_nao.h" -#include "source_psi/psi_initializer_nao_random.h" -#include "source_psi/psi_initializer_random.h" +#include "source_psi/psi_init_atomic.h" +#include "source_psi/psi_init_atomic_random.h" +#include "source_psi/psi_init_file.h" +#include "source_psi/psi_init_nao.h" +#include "source_psi/psi_init_nao_random.h" +#include "source_psi/psi_init_random.h" namespace psi { template -PSIInit::PSIInit(const std::string& init_wfc_in, +PSIPrepare::PSIPrepare(const std::string& init_wfc_in, const std::string& ks_solver_in, const std::string& basis_type_in, const int& rank_in, @@ -34,41 +34,70 @@ PSIInit::PSIInit(const std::string& init_wfc_in, } template -void PSIInit::prepare_init(const int& random_seed) +void PSIPrepare::prepare_init(const int& random_seed) { // under restriction of C++11, std::unique_ptr can not be allocate via std::make_unique // use new instead, but will cause asymmetric allocation and deallocation, in literal aspect - ModuleBase::timer::tick("PSIInit", "prepare_init"); + ModuleBase::timer::tick("PSIPrepare", "prepare_init"); this->psi_initer.reset(); if (this->init_wfc == "random") { - this->psi_initer = std::unique_ptr>(new psi_initializer_random()); + this->psi_initer = std::unique_ptr>(new psi_init_random()); + GlobalV::ofs_running << "\n Using RANDOM starting wave functions for all " << PARAM.inp.nbands << " bands\n"; } else if (this->init_wfc == "file") { - this->psi_initer = std::unique_ptr>(new psi_initializer_file()); + this->psi_initer = std::unique_ptr>(new psi_init_file()); + GlobalV::ofs_running << "\n Using FILE starting wave functions\n"; } else if ((this->init_wfc.substr(0, 6) == "atomic") && (this->ucell.natomwfc == 0)) { - this->psi_initer = std::unique_ptr>(new psi_initializer_random()); + std::cout << " WARNING: init_wfc = " + this->init_wfc + + " requires atomic pseudo wavefunctions(PP_PSWFC),\n but none available." + " Automatically switch to random initialization." << std::endl; + GlobalV::ofs_running << "\n Using RANDOM starting wave functions for all " << PARAM.inp.nbands << " bands\n"; + GlobalV::ofs_running << "\n WARNING:\n init_wfc = " + this->init_wfc + " requires atomic pseudo wavefunctions(PP_PSWFC), but none available. \n" + " Automatically switch to random initialization.\n" + " Note: Random starting wavefunctions may slow down convergence.\n" + " For faster convergence, consider using:\n" + " 1) A pseudopotential file that includes atomic wavefunctions (with PP_PSWFC), or\n" + " 2) Numerical atomic orbitals with 'init_wfc = nao' or 'nao+random' if available.\n" + << std::endl; + this->psi_initer = std::unique_ptr>(new psi_init_random()); } else if (this->init_wfc == "atomic" || (this->init_wfc == "atomic+random" && this->ucell.natomwfc < PARAM.inp.nbands)) { - this->psi_initer = std::unique_ptr>(new psi_initializer_atomic()); + if (this->ucell.natomwfc < PARAM.inp.nbands) + { + int nrandom = PARAM.inp.nbands - this->ucell.natomwfc; + GlobalV::ofs_running << "\n Using ATOMIC starting wave functions with " << this->ucell.natomwfc << " atomic orbitals" + << " + " << nrandom << " random orbitals" + << " (total " << PARAM.inp.nbands << " bands)\n"; + } + else + { + GlobalV::ofs_running << "\n Using ATOMIC starting wave functions for all " << this->ucell.natomwfc << " atomic orbitals" + << " (covers " << PARAM.inp.nbands << " bands)\n"; + } + this->psi_initer = std::unique_ptr>(new psi_init_atomic()); } else if (this->init_wfc == "atomic+random") { - this->psi_initer = std::unique_ptr>(new psi_initializer_atomic_random()); + this->psi_initer = std::unique_ptr>(new psi_init_atomic_random()); + GlobalV::ofs_running << "\n Using ATOMIC+RANDOM starting wave functions with " + << this->ucell.natomwfc << " atomic orbitals\n"; } else if (this->init_wfc == "nao") { - this->psi_initer = std::unique_ptr>(new psi_initializer_nao()); + this->psi_initer = std::unique_ptr>(new psi_init_nao()); + GlobalV::ofs_running << "\n Using NAO starting wave functions\n"; } else if (this->init_wfc == "nao+random") { - this->psi_initer = std::unique_ptr>(new psi_initializer_nao_random()); + this->psi_initer = std::unique_ptr>(new psi_init_nao_random()); + GlobalV::ofs_running << "\n Using NAO+RANDOM starting wave functions\n"; } else { @@ -78,11 +107,11 @@ void PSIInit::prepare_init(const int& random_seed) this->psi_initer->initialize(&sf, &pw_wfc, &ucell, &kv, random_seed, &nlpp, rank); this->psi_initer->tabulate(); - ModuleBase::timer::tick("PSIInit", "prepare_init"); + ModuleBase::timer::tick("PSIPrepare", "prepare_init"); } template -void PSIInit::initialize_psi(Psi>* psi, +void PSIPrepare::initialize_psi(Psi>* psi, psi::Psi* kspw_psi, hamilt::Hamilt* p_hamilt, std::ofstream& ofs_running) @@ -95,7 +124,7 @@ void PSIInit::initialize_psi(Psi>* psi, { return; } - ModuleBase::timer::tick("PSIInit", "initialize_psi"); + ModuleBase::timer::tick("PSIPrepare", "initialize_psi"); const int nbands_start = this->psi_initer->nbands_start(); const int nbands_l = psi->get_nbands(); @@ -148,7 +177,7 @@ void PSIInit::initialize_psi(Psi>* psi, { syncmem_h2d_op()(psi_device->get_pointer(), psi_cpu->get_pointer(), nbands_start * nbasis); } - + if (this->ks_solver == "cg") { @@ -206,7 +235,7 @@ void PSIInit::initialize_psi(Psi>* psi, { MPI_Status status; Parallel_Common::recv_dev(kspw_psi->get_pointer(), nbands_l * nbasis, 0, 0, BP_WORLD, &status); - } + } } #endif } // end k-point loop @@ -227,11 +256,11 @@ void PSIInit::initialize_psi(Psi>* psi, } } - ModuleBase::timer::tick("PSIInit", "initialize_psi"); + ModuleBase::timer::tick("PSIPrepare", "initialize_psi"); } template -void PSIInit::initialize_lcao_in_pw(Psi* psi_local, std::ofstream& ofs_running) +void PSIPrepare::initialize_lcao_in_pw(Psi* psi_local, std::ofstream& ofs_running) { ofs_running << " START WAVEFUNCTION: LCAO_IN_PW, psi initialization skipped " << std::endl; assert(this->psi_initer->method() == "nao"); @@ -264,10 +293,10 @@ void allocate_psi(Psi>*& psi, ModuleBase::Memory::record("Psi_PW", memory_cost); } -template class PSIInit, base_device::DEVICE_CPU>; -template class PSIInit, base_device::DEVICE_CPU>; +template class PSIPrepare, base_device::DEVICE_CPU>; +template class PSIPrepare, base_device::DEVICE_CPU>; #if ((defined __CUDA) || (defined __ROCM)) -template class PSIInit, base_device::DEVICE_GPU>; -template class PSIInit, base_device::DEVICE_GPU>; +template class PSIPrepare, base_device::DEVICE_GPU>; +template class PSIPrepare, base_device::DEVICE_GPU>; #endif } // namespace psi diff --git a/source/source_psi/psi_init.h b/source/source_psi/psi_prepare.h similarity index 94% rename from source/source_psi/psi_init.h rename to source/source_psi/psi_prepare.h index f594009ed4..c6406a1063 100644 --- a/source/source_psi/psi_init.h +++ b/source/source_psi/psi_prepare.h @@ -1,17 +1,17 @@ -#ifndef PSI_INIT_H -#define PSI_INIT_H +#ifndef PSI_PREPARE_H +#define PSI_PREPARE_H #include "source_hamilt/hamilt.h" #include "source_psi/psi_initializer.h" namespace psi { -// This class is used to initialize the wavefunction +// This class is used to prepare the wavefunction template -class PSIInit +class PSIPrepare { public: - PSIInit(const std::string& init_wfc_in, + PSIPrepare(const std::string& init_wfc_in, const std::string& ks_solver_in, const std::string& basis_type_in, const int& rank, @@ -20,7 +20,7 @@ class PSIInit const K_Vectors& kv_in, const pseudopot_cell_vnl& nlpp, const ModulePW::PW_Basis_K& pw_wfc); - ~PSIInit(){}; + ~PSIPrepare(){}; ///@brief prepare the wavefunction initialization void prepare_init(const int& random_seed); diff --git a/source/source_psi/setup_psi.h b/source/source_psi/setup_psi.h index d73ddb0659..a4c0f11d3e 100644 --- a/source/source_psi/setup_psi.h +++ b/source/source_psi/setup_psi.h @@ -1,7 +1,7 @@ #ifndef SETUP_PSI_H #define SETUP_PSI_H -#include "source_psi/psi_init.h" +#include "source_psi/psi_prepare.h" #include "source_cell/klist.h" #include "source_io/module_parameter/input_parameter.h" #include "source_basis/module_ao/parallel_orbitals.h" // use para_orb diff --git a/source/source_psi/setup_psi_pw.cpp b/source/source_psi/setup_psi_pw.cpp index f5f0ae6005..14e564c4fb 100644 --- a/source/source_psi/setup_psi_pw.cpp +++ b/source/source_psi/setup_psi_pw.cpp @@ -17,7 +17,7 @@ void Setup_Psi_pw::before_runner( const Input_para &inp) { //! Allocate and initialize psi - this->p_psi_init = new psi::PSIInit(inp.init_wfc, + this->p_psi_init = new psi::PSIPrepare(inp.init_wfc, inp.ks_solver, inp.basis_type, GlobalV::MY_RANK, ucell, sf, kv, ppcell, pw_wfc); diff --git a/source/source_psi/setup_psi_pw.h b/source/source_psi/setup_psi_pw.h index 99407f67e1..13bf593f37 100644 --- a/source/source_psi/setup_psi_pw.h +++ b/source/source_psi/setup_psi_pw.h @@ -1,12 +1,12 @@ #ifndef SETUP_PSI_PW_H #define SETUP_PSI_PW_H -#include "source_psi/psi_init.h" +#include "source_psi/psi_prepare.h" #include "source_cell/unitcell.h" #include "source_cell/klist.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_basis/module_pw/pw_basis_k.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_io/module_parameter/input_parameter.h" #include "source_base/module_device/device.h" #include "source_hamilt/hamilt.h" @@ -38,7 +38,7 @@ class Setup_Psi_pw psi::Psi, Device>* psi_d = nullptr; // psi_initializer controller - psi::PSIInit* p_psi_init = nullptr; + psi::PSIPrepare* p_psi_init = nullptr; bool already_initpsi = false; diff --git a/source/source_psi/test/CMakeLists.txt b/source/source_psi/test/CMakeLists.txt index 196b1ed47c..0cd654d675 100644 --- a/source/source_psi/test/CMakeLists.txt +++ b/source/source_psi/test/CMakeLists.txt @@ -16,11 +16,11 @@ AddTest( ../../source_cell/atom_spec.cpp ../../source_cell/parallel_kpoints.cpp ../../source_cell/test/support/mock_unitcell.cpp - ../../source_io/orb_io.cpp - ../../source_io/write_pao.cpp - ../../source_io/read_wfc_pw.cpp - ../../source_io/binstream.cpp - ../../source_io/filename.cpp + ../../source_io/module_output/orb_io.cpp + ../../source_io/module_output/write_pao.cpp + ../../source_io/module_wf/read_wfc_pw.cpp + ../../source_io/module_output/binstream.cpp + ../../source_io/module_output/filename.cpp ) endif() diff --git a/source/source_psi/test/psi_initializer_unit_test.cpp b/source/source_psi/test/psi_initializer_unit_test.cpp index 44d3a6eb9c..3ae38cbc21 100644 --- a/source/source_psi/test/psi_initializer_unit_test.cpp +++ b/source/source_psi/test/psi_initializer_unit_test.cpp @@ -3,12 +3,12 @@ #include "source_io/module_parameter/parameter.h" #undef private #include "../psi_initializer.h" -#include "../psi_initializer_atomic.h" -#include "../psi_initializer_atomic_random.h" -#include "../psi_initializer_nao.h" -#include "../psi_initializer_nao_random.h" -#include "../psi_initializer_random.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "../psi_init_atomic.h" +#include "../psi_init_atomic_random.h" +#include "../psi_init_nao.h" +#include "../psi_init_nao_random.h" +#include "../psi_init_random.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_cell/klist.h" /* @@ -80,7 +80,7 @@ InfoNonlocal::~InfoNonlocal() {} #endif Structure_Factor::Structure_Factor() {} Structure_Factor::~Structure_Factor() {} -void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Parallel_Grid&, const ModulePW::PW_Basis* rho_basis) {} +void Structure_Factor::setup(const UnitCell* Ucell, const Parallel_Grid&, const ModulePW::PW_Basis* rho_basis) {} std::complex* Structure_Factor::get_sk(int ik, int it, int ia, ModulePW::PW_Basis_K const*wfc_basis) const { int npw = wfc_basis->npwk[ik]; @@ -272,32 +272,32 @@ class PsiIntializerUnitTest : public ::testing::Test { }; TEST_F(PsiIntializerUnitTest, ConstructorRandom) { - this->psi_init = new psi_initializer_random>(); + this->psi_init = new psi_init_random>(); EXPECT_EQ("random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorAtomic) { - this->psi_init = new psi_initializer_atomic>(); + this->psi_init = new psi_init_atomic>(); EXPECT_EQ("atomic", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorAtomicRandom) { - this->psi_init = new psi_initializer_atomic_random>(); + this->psi_init = new psi_init_atomic_random>(); EXPECT_EQ("atomic+random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorNao) { - this->psi_init = new psi_initializer_nao>(); + this->psi_init = new psi_init_nao>(); EXPECT_EQ("nao", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorNaoRandom) { - this->psi_init = new psi_initializer_nao_random>(); + this->psi_init = new psi_init_nao_random>(); EXPECT_EQ("nao+random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, CastToT) { - this->psi_init = new psi_initializer_random>(); + this->psi_init = new psi_init_random>(); std::complex cd = {1.0, 2.0}; std::complex cf = {1.0, 2.0}; double d = 1.0; @@ -310,7 +310,7 @@ TEST_F(PsiIntializerUnitTest, CastToT) { TEST_F(PsiIntializerUnitTest, CalPsigRandom) { PARAM.input.init_wfc = "random"; - this->psi_init = new psi_initializer_random>(); + this->psi_init = new psi_init_random>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -329,7 +329,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigRandom) { TEST_F(PsiIntializerUnitTest, CalPsigAtomic) { PARAM.input.init_wfc = "atomic"; - this->psi_init = new psi_initializer_atomic>(); + this->psi_init = new psi_init_atomic>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -352,7 +352,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSoc) { PARAM.sys.npol = 2; this->p_ucell->atoms[0].ncpp.has_so = false; this->p_ucell->natomwfc *= 2; - this->psi_init = new psi_initializer_atomic>(); + this->psi_init = new psi_init_atomic>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -379,7 +379,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSocHasSo) { PARAM.sys.npol = 2; this->p_ucell->atoms[0].ncpp.has_so = true; this->p_ucell->natomwfc *= 2; - this->psi_init = new psi_initializer_atomic>(); + this->psi_init = new psi_init_atomic>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -402,7 +402,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSocHasSo) { TEST_F(PsiIntializerUnitTest, CalPsigAtomicRandom) { PARAM.input.init_wfc = "atomic+random"; - this->psi_init = new psi_initializer_atomic_random>(); + this->psi_init = new psi_init_atomic_random>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -421,7 +421,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicRandom) { TEST_F(PsiIntializerUnitTest, CalPsigNao) { PARAM.input.init_wfc = "nao"; - this->psi_init = new psi_initializer_nao>(); + this->psi_init = new psi_init_nao>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -440,7 +440,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigNao) { TEST_F(PsiIntializerUnitTest, CalPsigNaoRandom) { PARAM.input.init_wfc = "nao+random"; - this->psi_init = new psi_initializer_nao_random>(); + this->psi_init = new psi_init_nao_random>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -464,7 +464,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSoc) { this->p_ucell->atoms[0].ncpp.has_so = false; PARAM.sys.domag = false; PARAM.sys.domag_z = false; - this->psi_init = new psi_initializer_nao>(); + this->psi_init = new psi_init_nao>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -488,7 +488,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSocHasSo) { this->p_ucell->atoms[0].ncpp.has_so = true; PARAM.sys.domag = false; PARAM.sys.domag_z = false; - this->psi_init = new psi_initializer_nao>(); + this->psi_init = new psi_init_nao>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -512,7 +512,7 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSocHasSoDOMAG) { this->p_ucell->atoms[0].ncpp.has_so = true; PARAM.sys.domag = true; PARAM.sys.domag_z = false; - this->psi_init = new psi_initializer_nao>(); + this->psi_init = new psi_init_nao>(); this->psi_init->initialize(this->p_sf, this->p_pw_wfc, this->p_ucell, @@ -546,4 +546,4 @@ int main(int argc, char** argv) #endif return result; -} \ No newline at end of file +} diff --git a/source/source_pw/module_ofdft/CMakeLists.txt b/source/source_pw/module_ofdft/CMakeLists.txt index 7465b47a98..8ec09bd72d 100644 --- a/source/source_pw/module_ofdft/CMakeLists.txt +++ b/source/source_pw/module_ofdft/CMakeLists.txt @@ -6,6 +6,7 @@ list(APPEND hamilt_ofdft_srcs kedf_lkt.cpp kedf_manager.cpp of_stress_pw.cpp + of_print_info.cpp evolve_ofdft.cpp ) @@ -22,8 +23,9 @@ endif() if(ENABLE_MLALGO) list(APPEND hamilt_mlkedf_srcs kedf_ml.cpp - kedf_ml_pot.cpp kedf_ml_label.cpp + ml_base.cpp + ml_base_pot.cpp ml_tools/nn_of.cpp ) @@ -36,4 +38,4 @@ if(ENABLE_MLALGO) if(ENABLE_COVERAGE) add_coverage(hamilt_mlkedf) endif() -endif() \ No newline at end of file +endif() diff --git a/source/source_pw/module_ofdft/evolve_ofdft.cpp b/source/source_pw/module_ofdft/evolve_ofdft.cpp index f4aaea2cec..e97d555273 100644 --- a/source/source_pw/module_ofdft/evolve_ofdft.cpp +++ b/source/source_pw/module_ofdft/evolve_ofdft.cpp @@ -6,11 +6,11 @@ #include "source_base/parallel_reduce.h" void Evolve_OFDFT::cal_Hpsi(elecstate::ElecState* pelec, - const Charge& chr, + Charge& chr, UnitCell& ucell, - std::vector> psi_, + std::vector>& psi_, ModulePW::PW_Basis* pw_rho, - std::vector> Hpsi) + std::vector>& Hpsi) { // update rho #ifdef _OPENMP @@ -23,12 +23,13 @@ void Evolve_OFDFT::cal_Hpsi(elecstate::ElecState* pelec, chr.rho[is][ir] = abs(psi_[is * pw_rho->nrxx + ir])*abs(psi_[is * pw_rho->nrxx + ir]); } } + this->renormalize_psi(chr, pw_rho, psi_); pelec->pot->update_from_charge(&chr, &ucell); // Hartree + XC + external - this->cal_tf_potential(chr.rho, pw_rho, pelec->pot->get_effective_v()); // TF potential + this->cal_tf_potential(chr.rho, pw_rho, pelec->pot->get_eff_v()); // TF potential if (PARAM.inp.of_cd) { - this->cal_CD_potential(psi_, pw_rho, pelec->pot->get_effective_v(), PARAM.inp.of_mCD_alpha); // CD potential + this->cal_CD_potential(psi_, pw_rho, pelec->pot->get_eff_v(), PARAM.inp.of_mCD_alpha); // CD potential } #ifdef _OPENMP @@ -36,7 +37,7 @@ void Evolve_OFDFT::cal_Hpsi(elecstate::ElecState* pelec, #endif for (int is = 0; is < PARAM.inp.nspin; ++is) { - const double* vr_eff = pelec->pot->get_effective_v(is); + const double* vr_eff = pelec->pot->get_eff_v(is); for (int ir = 0; ir < pw_rho->nrxx; ++ir) { Hpsi[is * pw_rho->nrxx + ir] = vr_eff[ir]*psi_[is * pw_rho->nrxx + ir]; @@ -45,6 +46,26 @@ void Evolve_OFDFT::cal_Hpsi(elecstate::ElecState* pelec, this->cal_vw_potential_phi(psi_, pw_rho, Hpsi); } +void Evolve_OFDFT::renormalize_psi(Charge& chr, ModulePW::PW_Basis* pw_rho, std::vector>& pphi_) +{ + const double sr = chr.sum_rho(); + const double normalize_factor = PARAM.inp.nelec / sr; + + std::cout<<"sr="<> pphi, pw_rho->recip2real(recipPhi[is], rLapPhi[is]); for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - Hpsi[is * pw_rho->nrxx + ir]+=rLapPhi[is][ir]; + Hpsi[is * pw_rho->nrxx + ir] += rLapPhi[is][ir]; } } @@ -123,7 +144,7 @@ void Evolve_OFDFT::cal_vw_potential_phi(std::vector> pphi, delete[] rLapPhi; } -void Evolve_OFDFT::cal_CD_potential(std::vector> psi_, +void Evolve_OFDFT::cal_CD_potential(std::vector>& psi_, ModulePW::PW_Basis* pw_rho, ModuleBase::matrix& rpot, double mCD_para) @@ -151,20 +172,20 @@ void Evolve_OFDFT::cal_CD_potential(std::vector> psi_, #endif for (int is = 0; is < PARAM.inp.nspin; ++is) { - std::complex *recipCurrent_x=new std::complex[pw_rho->npw]; - std::complex *recipCurrent_y=new std::complex[pw_rho->npw]; - std::complex *recipCurrent_z=new std::complex[pw_rho->npw]; - std::complex *recipCDPotential=new std::complex[pw_rho->npw]; - std::complex *rCurrent_x=new std::complex[pw_rho->nrxx]; - std::complex *rCurrent_y=new std::complex[pw_rho->nrxx]; - std::complex *rCurrent_z=new std::complex[pw_rho->nrxx]; - std::complex *kF_r=new std::complex[pw_rho->nrxx]; - std::complex *rCDPotential=new std::complex[pw_rho->nrxx]; + std::vector> recipCurrent_x(pw_rho->npw); + std::vector> recipCurrent_y(pw_rho->npw); + std::vector> recipCurrent_z(pw_rho->npw); + std::vector> recipCDPotential(pw_rho->npw); + std::vector> rCurrent_x(pw_rho->nrxx); + std::vector> rCurrent_y(pw_rho->nrxx); + std::vector> rCurrent_z(pw_rho->nrxx); + std::vector> kF_r(pw_rho->nrxx); + std::vector> rCDPotential(pw_rho->nrxx); recipPhi[is] = new std::complex[pw_rho->npw]; for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - kF_r[ir]=std::pow(3*std::pow(ModuleBase::PI*std::abs(rPhi[is][ir]),2),1/3); + kF_r[ir]=std::pow(3*std::pow(ModuleBase::PI*std::abs(rPhi[is][ir]),2),1.0/3.0); } pw_rho->real2recip(rPhi[is], recipPhi[is]); @@ -174,35 +195,41 @@ void Evolve_OFDFT::cal_CD_potential(std::vector> psi_, recipCurrent_y[ik]=imag*pw_rho->gcar[ik].y*recipPhi[is][ik]* pw_rho->tpiba; recipCurrent_z[ik]=imag*pw_rho->gcar[ik].z*recipPhi[is][ik]* pw_rho->tpiba; } - pw_rho->recip2real(recipCurrent_x,rCurrent_x); - pw_rho->recip2real(recipCurrent_y,rCurrent_y); - pw_rho->recip2real(recipCurrent_z,rCurrent_z); + pw_rho->recip2real(recipCurrent_x.data(),rCurrent_x.data()); + pw_rho->recip2real(recipCurrent_y.data(),rCurrent_y.data()); + pw_rho->recip2real(recipCurrent_z.data(),rCurrent_z.data()); for (int ir = 0; ir < pw_rho->nrxx; ++ir) { rCurrent_x[ir]=std::imag(rCurrent_x[ir]*std::conj(rPhi[is][ir])); rCurrent_y[ir]=std::imag(rCurrent_y[ir]*std::conj(rPhi[is][ir])); rCurrent_z[ir]=std::imag(rCurrent_z[ir]*std::conj(rPhi[is][ir])); } - pw_rho->real2recip(rCurrent_x,recipCurrent_x); - pw_rho->real2recip(rCurrent_y,recipCurrent_y); - pw_rho->real2recip(rCurrent_z,recipCurrent_z); + pw_rho->real2recip(rCurrent_x.data(),recipCurrent_x.data()); + pw_rho->real2recip(rCurrent_y.data(),recipCurrent_y.data()); + pw_rho->real2recip(rCurrent_z.data(),recipCurrent_z.data()); for (int ik = 0; ik < pw_rho->npw; ++ik) { recipCDPotential[ik]=recipCurrent_x[ik]*pw_rho->gcar[ik].x+recipCurrent_y[ik]*pw_rho->gcar[ik].y+recipCurrent_z[ik]*pw_rho->gcar[ik].z; - recipCDPotential[ik]*=imag/pw_rho->gg[ik]; + if (pw_rho->gg[ik]==0) + { + recipCDPotential[ik]=0.0; + } + else + { + recipCDPotential[ik]*=imag/sqrt(pw_rho->gg[ik]); + } } - pw_rho->recip2real(recipCDPotential,rCDPotential); + pw_rho->recip2real(recipCDPotential.data(),rCDPotential.data()); for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - rpot(0, ir) -= mCD_para*2.0*std::real(rCDPotential[ir])*std::pow(ModuleBase::PI,3) / (2.0*std::pow(std::real(kF_r[ir]),2)); + rpot(0, ir) -= mCD_para*2.0*std::real(rCDPotential[ir])*std::pow(ModuleBase::PI,3) + / (2.0*std::pow(std::real(kF_r[ir]),2)); + if (std::isnan(rpot(0, ir))) + { + rpot(0, ir)=0.0; + } } - delete[] recipCurrent_x; - delete[] recipCurrent_y; - delete[] recipCurrent_z; - delete[] rCurrent_x; - delete[] rCurrent_y; - delete[] rCurrent_z; } #ifdef _OPENMP @@ -217,15 +244,16 @@ void Evolve_OFDFT::cal_CD_potential(std::vector> psi_, delete[] rPhi; } -void Evolve_OFDFT::propagate_psi(elecstate::ElecState* pelec, - const Charge& chr, UnitCell& ucell, - std::vector> pphi_, +void Evolve_OFDFT::propagate_psi_RK4(elecstate::ElecState* pelec, + Charge& chr, + UnitCell& ucell, + std::vector>& pphi_, ModulePW::PW_Basis* pw_rho) { - ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagte_psi"); + ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagate_psi_RK4"); std::complex imag(0.0,1.0); - double dt=PARAM.inp.mdp.md_dt; + double dt=PARAM.inp.mdp.md_dt / ModuleBase::AU_to_FS; const int nspin = PARAM.inp.nspin; const int nrxx = pw_rho->nrxx; const int total_size = nspin * nrxx; @@ -244,7 +272,7 @@ void Evolve_OFDFT::propagate_psi(elecstate::ElecState* pelec, for (int is = 0; is < PARAM.inp.nspin; ++is){ for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - K1[is * nrxx + ir]=-1.0*K1[is * nrxx + ir]*dt*imag; + K1[is * nrxx + ir]=-0.5*K1[is * nrxx + ir]*dt*imag; // 0.5 convert Ry to Hartree psi1[is * nrxx + ir]=pphi_[is * nrxx + ir]+0.5*K1[is * nrxx + ir]; } } @@ -255,7 +283,7 @@ void Evolve_OFDFT::propagate_psi(elecstate::ElecState* pelec, for (int is = 0; is < PARAM.inp.nspin; ++is){ for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - K2[is * nrxx + ir]=-1.0*K2[is * nrxx + ir]*dt*imag; + K2[is * nrxx + ir]=-0.5*K2[is * nrxx + ir]*dt*imag; psi2[is * nrxx + ir]=pphi_[is * nrxx + ir]+0.5*K2[is * nrxx + ir]; } } @@ -266,7 +294,7 @@ void Evolve_OFDFT::propagate_psi(elecstate::ElecState* pelec, for (int is = 0; is < PARAM.inp.nspin; ++is){ for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - K3[is * nrxx + ir]=-1.0*K3[is * nrxx + ir]*dt*imag; + K3[is * nrxx + ir]=-0.5*K3[is * nrxx + ir]*dt*imag; psi3[is * nrxx + ir]=pphi_[is * nrxx + ir]+K3[is * nrxx + ir]; } } @@ -277,10 +305,80 @@ void Evolve_OFDFT::propagate_psi(elecstate::ElecState* pelec, for (int is = 0; is < PARAM.inp.nspin; ++is){ for (int ir = 0; ir < pw_rho->nrxx; ++ir) { - K4[is * nrxx + ir]=-1.0*K4[is * nrxx + ir]*dt*imag; + K4[is * nrxx + ir]=-0.5*K4[is * nrxx + ir]*dt*imag; pphi_[is * nrxx + ir]+=1.0/6.0*(K1[is * nrxx + ir]+2.0*K2[is * nrxx + ir]+2.0*K3[is * nrxx + ir]+K4[is * nrxx + ir]); } } - ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagte_psi"); -} \ No newline at end of file +#ifdef _OPENMP +#pragma omp parallel for collapse(2) +#endif + for (int is = 0; is < PARAM.inp.nspin; ++is) + { + for (int ir = 0; ir < pw_rho->nrxx; ++ir) + { + chr.rho[is][ir] = abs(pphi_[is * pw_rho->nrxx + ir])*abs(pphi_[is * pw_rho->nrxx + ir]); + } + } + this->renormalize_psi(chr, pw_rho, pphi_); + + ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagate_psi_RK4"); +} + +void Evolve_OFDFT::propagate_psi_RK2(elecstate::ElecState* pelec, + Charge& chr, + UnitCell& ucell, + std::vector>& pphi_, + ModulePW::PW_Basis* pw_rho) +{ + ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagate_psi_RK2"); + + const std::complex imag(0.0, 1.0); + double dt=PARAM.inp.mdp.md_dt / ModuleBase::AU_to_FS; + const int nspin = PARAM.inp.nspin; + const int nrxx = pw_rho->nrxx; + const int total_size = nspin * nrxx; + + std::vector> K1(total_size); + std::vector> K2(total_size); + std::vector> psi_mid(total_size); + + cal_Hpsi(pelec, chr, ucell, pphi_, pw_rho, K1); + +#ifdef _OPENMP +#pragma omp parallel for collapse(2) +#endif + for (int is = 0; is < nspin; ++is) { + for (int ir = 0; ir < nrxx; ++ir) { + const int idx = is * nrxx + ir; + K1[idx] = -0.5 * K1[idx] * dt * imag; + psi_mid[idx] = pphi_[idx] + 0.5 * K1[idx]; + } + } + + cal_Hpsi(pelec, chr, ucell, psi_mid, pw_rho, K2); + +#ifdef _OPENMP +#pragma omp parallel for collapse(2) +#endif + for (int is = 0; is < nspin; ++is) { + for (int ir = 0; ir < nrxx; ++ir) { + const int idx = is * nrxx + ir; + K2[idx] = -0.5 * K2[idx] * dt * imag; + pphi_[idx] += K2[idx]; + } + } + +#ifdef _OPENMP +#pragma omp parallel for collapse(2) +#endif + for (int is = 0; is < nspin; ++is) { + for (int ir = 0; ir < nrxx; ++ir) { + chr.rho[is][ir] = std::norm(pphi_[is * nrxx + ir]); + } + } + + this->renormalize_psi(chr, pw_rho, pphi_); + + ModuleBase::timer::tick("ESolver_OF_TDDFT", "propagate_psi_RK2"); +} diff --git a/source/source_pw/module_ofdft/evolve_ofdft.h b/source/source_pw/module_ofdft/evolve_ofdft.h index 45ffffe7ad..8d592a56a4 100644 --- a/source/source_pw/module_ofdft/evolve_ofdft.h +++ b/source/source_pw/module_ofdft/evolve_ofdft.h @@ -24,10 +24,19 @@ class Evolve_OFDFT ~Evolve_OFDFT() { } - void propagate_psi(elecstate::ElecState* pelec, - const Charge& chr, UnitCell& ucell, - std::vector> pphi_, + void propagate_psi_RK4(elecstate::ElecState* pelec, + Charge& chr, + UnitCell& ucell, + std::vector>& pphi_, ModulePW::PW_Basis* pw_rho); + + void propagate_psi_RK2(elecstate::ElecState* pelec, + Charge& chr, + UnitCell& ucell, + std::vector>& pphi_, + ModulePW::PW_Basis* pw_rho); + + void renormalize_psi(Charge& chr, ModulePW::PW_Basis* pw_rho, std::vector>& pphi_); private: const double c_tf_ @@ -35,18 +44,18 @@ class Evolve_OFDFT * 2; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) void cal_Hpsi(elecstate::ElecState* pelec, - const Charge& chr, + Charge& chr, UnitCell& ucell, - std::vector> psi_, + std::vector>& psi_, ModulePW::PW_Basis* pw_rho, - std::vector> Hpsi); + std::vector>& Hpsi); void cal_tf_potential(const double* const* prho, ModulePW::PW_Basis* pw_rho, ModuleBase::matrix& rpot); - void cal_vw_potential_phi(std::vector> pphi, + void cal_vw_potential_phi(std::vector>& pphi, ModulePW::PW_Basis* pw_rho, - std::vector> Hpsi); // -1/2 \nabla^2 \phi - void cal_CD_potential(std::vector> psi_, + std::vector>& Hpsi); // -1/2 \nabla^2 \phi + void cal_CD_potential(std::vector>& psi_, ModulePW::PW_Basis* pw_rho, ModuleBase::matrix& rpot, double mCD_para); diff --git a/source/source_pw/module_ofdft/kedf_ml.cpp b/source/source_pw/module_ofdft/kedf_ml.cpp index 02577b01ee..bf2423fb48 100644 --- a/source/source_pw/module_ofdft/kedf_ml.cpp +++ b/source/source_pw/module_ofdft/kedf_ml.cpp @@ -5,7 +5,6 @@ #include "npy.hpp" #include "source_base/parallel_reduce.h" #include "source_base/global_function.h" -#include "source_pw/module_pwdft/global.h" void KEDF_ML::set_para( const int nx, @@ -134,10 +133,10 @@ double KEDF_ML::get_energy(const double * const * prho, ModulePW::PW_Basis *pw_r double energy = 0.; for (int ir = 0; ir < this->nx; ++ir) { - energy += enhancement_cpu_ptr[ir] * std::pow(prho[0][ir], 5./3.); + energy += enhancement_cpu_ptr[ir] * std::pow(prho[0][ir], this->energy_exponent); } std::cout << "energy" << energy << std::endl; - energy *= this->dV * this->cTF; + energy *= this->dV * this->energy_prefactor; this->ml_energy = energy; Parallel_Reduce::reduce_all(this->ml_energy); return this->ml_energy; @@ -168,9 +167,9 @@ void KEDF_ML::ml_potential(const double * const * prho, ModulePW::PW_Basis *pw_r double energy = 0.; for (int ir = 0; ir < this->nx; ++ir) { - energy += enhancement_cpu_ptr[ir] * std::pow(prho[0][ir], 5./3.); + energy += enhancement_cpu_ptr[ir] * std::pow(prho[0][ir], this->energy_exponent); } - energy *= this->dV * this->cTF; + energy *= this->dV * this->energy_prefactor; this->ml_energy = energy; Parallel_Reduce::reduce_all(this->ml_energy); ModuleBase::timer::tick("KEDF_ML", "Pauli Energy"); @@ -252,267 +251,4 @@ void KEDF_ML::localTest(const double * const *pprho, ModulePW::PW_Basis *pw_rho) this->dumpMatrix("potential-abacus.npy", potential); exit(0); } - -/** - * @brief Set the device for ML KEDF - * - * @param device_inpt "cpu" or "gpu" - */ -void KEDF_ML::set_device(std::string device_inpt) -{ - if (device_inpt == "cpu") - { - std::cout << "------------------- Running NN on CPU -------------------" << std::endl; - this->device_type = torch::kCPU; - } - else if (device_inpt == "gpu") - { - if (torch::cuda::cudnn_is_available()) - { - std::cout << "------------------- Running NN on GPU -------------------" << std::endl; - this->device_type = torch::kCUDA; - } - else - { - std::cout << "--------------- Warning: GPU is unaviable ---------------" << std::endl; - std::cout << "------------------- Running NN on CPU -------------------" << std::endl; - this->device_type = torch::kCPU; - } - } - this->device = torch::Device(this->device_type); -} - -/** - * @brief Interface to Neural Network forward - * - * @param prho charge density - * @param pw_rho PW_Basis - * @param cal_grad whether to calculate the gradient - */ -void KEDF_ML::NN_forward(const double * const * prho, ModulePW::PW_Basis *pw_rho, bool cal_grad) -{ - ModuleBase::timer::tick("KEDF_ML", "Forward"); - - this->nn->zero_grad(); - this->nn->inputs.requires_grad_(false); - this->nn->set_data(this, this->descriptor_type, this->kernel_index, this->nn->inputs); - this->nn->inputs.requires_grad_(true); - - this->nn->F = this->nn->forward(this->nn->inputs); - if (this->nn->inputs.grad().numel()) - { - this->nn->inputs.grad().zero_(); // In the first step, inputs.grad() returns an undefined Tensor, so that numel() = 0. - } - - if (PARAM.inp.of_ml_feg != 3) - { - this->nn->F = torch::softplus(this->nn->F); - } - if (PARAM.inp.of_ml_feg == 1) - { - this->nn->F = this->nn->F - this->feg_net_F + 1.; - } - else if (PARAM.inp.of_ml_feg == 3) - { - this->nn->F = torch::softplus(this->nn->F - this->feg_net_F + this->feg3_correct); - } - ModuleBase::timer::tick("KEDF_ML", "Forward"); - - if (cal_grad) - { - ModuleBase::timer::tick("KEDF_ML", "Backward"); - this->nn->F.backward(torch::ones({this->nx, 1}, this->device_type)); - ModuleBase::timer::tick("KEDF_ML", "Backward"); - } -} - -void KEDF_ML::loadVector(std::string filename, std::vector &data) -{ - npy::npy_data d = npy::read_npy(filename); - data = d.data; - // ========== For old version of npy.hpp ========== - // std::vector cshape = {(long unsigned) this->cal_tool->nx}; - // bool fortran_order = false; - // npy::LoadArrayFromNumpy(filename, cshape, fortran_order, data); -} - -void KEDF_ML::dumpVector(std::string filename, const std::vector &data) -{ - npy::npy_data_ptr d; - d.data_ptr = data.data(); - d.shape = {(long unsigned) this->cal_tool->nx}; - d.fortran_order = false; // optional - npy::write_npy(filename, d); - // ========== For old version of npy.hpp ========== - // const long unsigned cshape[] = {(long unsigned) this->cal_tool->nx}; // shape - // npy::SaveArrayAsNumpy(filename, false, 1, cshape, data); -} - -/** - * @brief Dump the torch::Tensor into .npy file - * - * @param data torch::Tensor - * @param filename file name - */ -void KEDF_ML::dumpTensor(std::string filename, const torch::Tensor &data) -{ - std::cout << "Dumping " << filename << std::endl; - torch::Tensor data_cpu = data.to(this->device_CPU).contiguous(); - std::vector v(data_cpu.data_ptr(), data_cpu.data_ptr() + data_cpu.numel()); - // for (int ir = 0; ir < this->nx; ++ir) assert(v[ir] == data[ir].item()); - this->dumpVector(filename, v); -} - -/** - * @brief Dump the matrix into .npy file - * - * @param data matrix - * @param filename file name - */ -void KEDF_ML::dumpMatrix(std::string filename, const ModuleBase::matrix &data) -{ - std::cout << "Dumping " << filename << std::endl; - std::vector v(data.c, data.c + this->nx); - // for (int ir = 0; ir < this->nx; ++ir) assert(v[ir] == data[ir].item()); - this->dumpVector(filename, v); -} - -/** - * @brief Update the desciptors for ML KEDF - * - * @param prho charge density - * @param pw_rho PW_Basis - */ -void KEDF_ML::updateInput(const double * const * prho, ModulePW::PW_Basis *pw_rho) -{ - ModuleBase::timer::tick("KEDF_ML", "updateInput"); - // std::cout << "updata_input" << std::endl; - if (this->gene_data_label["gamma"][0]) - { - this->cal_tool->getGamma(prho, this->gamma); - } - if (this->gene_data_label["p"][0]) - { - this->cal_tool->getNablaRho(prho, pw_rho, this->nablaRho); - this->cal_tool->getP(prho, pw_rho, this->nablaRho, this->p); - } - if (this->gene_data_label["q"][0]) - { - this->cal_tool->getQ(prho, pw_rho, this->q); - } - if (this->gene_data_label["tanhp"][0]) - { - this->cal_tool->getTanhP(this->p, this->tanhp); - } - if (this->gene_data_label["tanhq"][0]) - { - this->cal_tool->getTanhQ(this->q, this->tanhq); - } - - for (int ik = 0; ik < nkernel; ++ik) - { - if (this->gene_data_label["gammanl"][ik]){ - this->cal_tool->getGammanl(ik, this->gamma, pw_rho, this->gammanl[ik]); - } - if (this->gene_data_label["pnl"][ik]){ - this->cal_tool->getPnl(ik, this->p, pw_rho, this->pnl[ik]); - } - if (this->gene_data_label["qnl"][ik]){ - this->cal_tool->getQnl(ik, this->q, pw_rho, this->qnl[ik]); - } - if (this->gene_data_label["xi"][ik]){ - this->cal_tool->getXi(this->gamma, this->gammanl[ik], this->xi[ik]); - } - if (this->gene_data_label["tanhxi"][ik]){ - this->cal_tool->getTanhXi(ik, this->gamma, this->gammanl[ik], this->tanhxi[ik]); - } - if (this->gene_data_label["tanhxi_nl"][ik]){ - this->cal_tool->getTanhXi_nl(ik, this->tanhxi[ik], pw_rho, this->tanhxi_nl[ik]); - } - if (this->gene_data_label["tanh_pnl"][ik]){ - this->cal_tool->getTanh_Pnl(ik, this->pnl[ik], this->tanh_pnl[ik]); - } - if (this->gene_data_label["tanh_qnl"][ik]){ - this->cal_tool->getTanh_Qnl(ik, this->qnl[ik], this->tanh_qnl[ik]); - } - if (this->gene_data_label["tanhp_nl"][ik]){ - this->cal_tool->getTanhP_nl(ik, this->tanhp, pw_rho, this->tanhp_nl[ik]); - } - if (this->gene_data_label["tanhq_nl"][ik]){ - this->cal_tool->getTanhQ_nl(ik, this->tanhq, pw_rho, this->tanhq_nl[ik]); - } - } - ModuleBase::timer::tick("KEDF_ML", "updateInput"); -} - -/** - * @brief Return the descriptors for ML KEDF - * - * @param parameter "gamma", "p", "q", "tanhp", "tanhq", "gammanl", "pnl", "qnl", "xi", "tanhxi", "tanhxi_nl", "tanh_pnl", "tanh_qnl", "tanhp_nl", "tanhq_nl" - * @param ikernel kernel index - */ -torch::Tensor KEDF_ML::get_data(std::string parameter, const int ikernel){ - - if (parameter == "gamma") - { - return torch::tensor(this->gamma, this->device_type); - } - if (parameter == "p") - { - return torch::tensor(this->p, this->device_type); - } - if (parameter == "q") - { - return torch::tensor(this->q, this->device_type); - } - if (parameter == "tanhp") - { - return torch::tensor(this->tanhp, this->device_type); - } - if (parameter == "tanhq") - { - return torch::tensor(this->tanhq, this->device_type); - } - if (parameter == "gammanl") - { - return torch::tensor(this->gammanl[ikernel], this->device_type); - } - if (parameter == "pnl") - { - return torch::tensor(this->pnl[ikernel], this->device_type); - } - if (parameter == "qnl") - { - return torch::tensor(this->qnl[ikernel], this->device_type); - } - if (parameter == "xi") - { - return torch::tensor(this->xi[ikernel], this->device_type); - } - if (parameter == "tanhxi") - { - return torch::tensor(this->tanhxi[ikernel], this->device_type); - } - if (parameter == "tanhxi_nl") - { - return torch::tensor(this->tanhxi_nl[ikernel], this->device_type); - } - if (parameter == "tanh_pnl") - { - return torch::tensor(this->tanh_pnl[ikernel], this->device_type); - } - if (parameter == "tanh_qnl") - { - return torch::tensor(this->tanh_qnl[ikernel], this->device_type); - } - if (parameter == "tanhp_nl") - { - return torch::tensor(this->tanhp_nl[ikernel], this->device_type); - } - if (parameter == "tanhq_nl") - { - return torch::tensor(this->tanhq_nl[ikernel], this->device_type); - } - return torch::zeros({}); -} -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_ofdft/kedf_ml.h b/source/source_pw/module_ofdft/kedf_ml.h index 070333b3ec..202c6958f0 100644 --- a/source/source_pw/module_ofdft/kedf_ml.h +++ b/source/source_pw/module_ofdft/kedf_ml.h @@ -3,22 +3,17 @@ #ifdef __MLALGO -#include "source_io/cal_mlkedf_descriptors.h" +#include "ml_base.h" -#include -#include "./ml_tools/nn_of.h" - -class KEDF_ML +class KEDF_ML : public ML_Base { public: KEDF_ML() { + this->energy_prefactor = 3. /10. * std::pow(3*std::pow(M_PI, 2.0), 2.0/3.0) * 2; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) + this->energy_exponent = 5. / 3.; // this->stress.create(3,3); } - ~KEDF_ML() - { - delete this->cal_tool; - } void set_para( const int nx, @@ -54,99 +49,18 @@ class KEDF_ML const std::string device_inpt, ModulePW::PW_Basis *pw_rho); - void set_device(std::string device_inpt); - double get_energy(const double * const * prho, ModulePW::PW_Basis *pw_rho); // double get_energy_density(const double * const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho); void ml_potential(const double * const * prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential); // void get_stress(double cellVol, const double * const * prho, ModulePW::PW_Basis *pw_rho, double vw_weight); - // double diffLinhard(double eta, double vw_weight); // output all parameters void generateTrainData(const double * const *prho, ModulePW::PW_Basis *pw_rho, const double *veff); void localTest(const double * const *prho, ModulePW::PW_Basis *pw_rho); - // interface to NN - void NN_forward(const double * const * prho, ModulePW::PW_Basis *pw_rho, bool cal_grad); - - void get_potential_(const double * const * prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential); - - // potentials - double potGammaTerm(int ir); - double potPTerm1(int ir); - double potQTerm1(int ir); - double potXiTerm1(int ir); - double potTanhxiTerm1(int ir); - double potTanhpTerm1(int ir); - double potTanhqTerm1(int ir); - void potGammanlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rGammanlTerm); - void potXinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rXinlTerm); - void potTanhxinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhxinlTerm); - void potTanhxi_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhxi_nlTerm); // 2023-03-20 for tanhxi_nl - void potPPnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rPPnlTerm); - void potQQnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rQQnlTerm); - void potTanhpTanh_pnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanh_pnlTerm); - void potTanhqTanh_qnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanh_qnlTerm); - void potTanhpTanhp_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanhp_nlTerm); - void potTanhqTanhq_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanhq_nlTerm); - // tools - void loadVector(std::string filename, std::vector &data); - void dumpVector(std::string filename, const std::vector &data); - void dumpTensor(std::string filename, const torch::Tensor &data); - void dumpMatrix(std::string filename, const ModuleBase::matrix &data); - void updateInput(const double * const * prho, ModulePW::PW_Basis *pw_rho); - - ModuleIO::Cal_MLKEDF_Descriptors *cal_tool = nullptr; - - int nx = 0; // number of grid points - int nx_tot = 0; // equal to nx (called by NN) - double dV = 0.; - // double weightml = 1.; - const double cTF = 3.0/10.0 * std::pow(3*std::pow(M_PI, 2.0), 2.0/3.0) * 2; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) - const double pqcoef = 1.0 / (4.0 * std::pow(3*std::pow(M_PI, 2.0), 2.0/3.0)); // coefficient of p and q double ml_energy = 0.; // ModuleBase::matrix stress; - double feg_net_F = 0.; - double feg3_correct = 0.541324854612918; // ln(e - 1) - - // Descriptors and hyperparameters - int ninput = 0; // number of descriptors - std::vector gamma = {}; - std::vector p = {}; - std::vector q = {}; - std::vector> gammanl = {}; - std::vector> pnl = {}; - std::vector> qnl = {}; - std::vector> nablaRho = {}; - // new parameters 2023-02-13 - std::vector chi_xi = {1.0}; - double chi_p = 1.; - double chi_q = 1.; - std::vector> xi = {}; // we assume ONLY ONE of them is used. - std::vector> tanhxi = {}; - std::vector> tanhxi_nl= {}; // 2023-03-20 - std::vector tanhp = {}; - std::vector tanhq = {}; - // plan 1 - std::vector chi_pnl = {1.0}; - std::vector chi_qnl = {1.0}; - std::vector> tanh_pnl = {}; - std::vector> tanh_qnl = {}; - // plan 2 - std::vector> tanhp_nl = {}; - std::vector> tanhq_nl = {}; - // GPU - torch::DeviceType device_type = torch::kCPU; - torch::Device device = torch::Device(torch::kCPU); - torch::Device device_CPU = torch::Device(torch::kCPU); - - // Nueral Network - std::shared_ptr nn; - double* enhancement_cpu_ptr = nullptr; - double* gradient_cpu_ptr = nullptr; - - int nkernel = 1; // number of kernels - + // maps void init_data( const int &nkernel, @@ -166,31 +80,6 @@ class KEDF_ML const std::vector &of_ml_tanhp_nl, const std::vector &of_ml_tanhq_nl ); - - // Whether to use corresponding descriptors - bool ml_gamma = false; - bool ml_p = false; - bool ml_q = false; - bool ml_tanhp = false; - bool ml_tanhq = false; - bool ml_gammanl = false; - bool ml_pnl = false; - bool ml_qnl = false; - bool ml_xi = false; - bool ml_tanhxi = false; - bool ml_tanhxi_nl = false; - bool ml_tanh_pnl = false; - bool ml_tanh_qnl = false; - bool ml_tanhp_nl = false; - bool ml_tanhq_nl = false; - - std::vector descriptor_type = {}; // the descriptors used - std::vector kernel_index = {}; // the index of the kernel used - std::map> descriptor2kernel = {}; // the map from descriptor to kernel index - std::map> descriptor2index = {}; // the map from descriptor to index - std::map> gene_data_label = {}; // the map from descriptor to gene label - - torch::Tensor get_data(std::string parameter, const int ikernel); // get the descriptor data for the ikernel-th kernel }; #endif diff --git a/source/source_pw/module_ofdft/ml_base.cpp b/source/source_pw/module_ofdft/ml_base.cpp new file mode 100644 index 0000000000..4297083ae4 --- /dev/null +++ b/source/source_pw/module_ofdft/ml_base.cpp @@ -0,0 +1,219 @@ +#include "ml_base.h" +#include "npy.hpp" + +#ifdef __MLALGO + +ML_Base::ML_Base(){} + +ML_Base::~ML_Base() +{ + if (this->cal_tool) delete this->cal_tool; +} + +void ML_Base::set_device(std::string device_inpt) +{ + if (device_inpt == "cpu") + { + std::cout << "------------------- Running NN on CPU -------------------" << std::endl; + this->device_type = torch::kCPU; + } + else if (device_inpt == "gpu") + { + if (torch::cuda::cudnn_is_available()) + { + std::cout << "------------------- Running NN on GPU -------------------" << std::endl; + this->device_type = torch::kCUDA; + } + else + { + std::cout << "--------------- Warning: GPU is unaviable ---------------" << std::endl; + std::cout << "------------------- Running NN on CPU -------------------" << std::endl; + this->device_type = torch::kCPU; + } + } + this->device = torch::Device(this->device_type); +} + +void ML_Base::updateInput(const double * const * prho, const ModulePW::PW_Basis *pw_rho) +{ + ModuleBase::timer::tick("ML_Base", "updateInput"); + if (this->gene_data_label["gamma"][0]) + { + this->cal_tool->getGamma(prho, this->gamma); + } + if (this->gene_data_label["p"][0]) + { + this->cal_tool->getNablaRho(prho, pw_rho, this->nablaRho); + this->cal_tool->getP(prho, pw_rho, this->nablaRho, this->p); + } + if (this->gene_data_label["q"][0]) + { + this->cal_tool->getQ(prho, pw_rho, this->q); + } + if (this->gene_data_label["tanhp"][0]) + { + this->cal_tool->getTanhP(this->p, this->tanhp); + } + if (this->gene_data_label["tanhq"][0]) + { + this->cal_tool->getTanhQ(this->q, this->tanhq); + } + + for (int ik = 0; ik < nkernel; ++ik) + { + if (this->gene_data_label["gammanl"][ik]){ + this->cal_tool->getGammanl(ik, this->gamma, pw_rho, this->gammanl[ik]); + } + if (this->gene_data_label["pnl"][ik]){ + this->cal_tool->getPnl(ik, this->p, pw_rho, this->pnl[ik]); + } + if (this->gene_data_label["qnl"][ik]){ + this->cal_tool->getQnl(ik, this->q, pw_rho, this->qnl[ik]); + } + if (this->gene_data_label["xi"][ik]){ + this->cal_tool->getXi(this->gamma, this->gammanl[ik], this->xi[ik]); + } + if (this->gene_data_label["tanhxi"][ik]){ + this->cal_tool->getTanhXi(ik, this->gamma, this->gammanl[ik], this->tanhxi[ik]); + } + if (this->gene_data_label["tanhxi_nl"][ik]){ + this->cal_tool->getTanhXi_nl(ik, this->tanhxi[ik], pw_rho, this->tanhxi_nl[ik]); + } + if (this->gene_data_label["tanh_pnl"][ik]){ + this->cal_tool->getTanh_Pnl(ik, this->pnl[ik], this->tanh_pnl[ik]); + } + if (this->gene_data_label["tanh_qnl"][ik]){ + this->cal_tool->getTanh_Qnl(ik, this->qnl[ik], this->tanh_qnl[ik]); + } + if (this->gene_data_label["tanhp_nl"][ik]){ + this->cal_tool->getTanhP_nl(ik, this->tanhp, pw_rho, this->tanhp_nl[ik]); + } + if (this->gene_data_label["tanhq_nl"][ik]){ + this->cal_tool->getTanhQ_nl(ik, this->tanhq, pw_rho, this->tanhq_nl[ik]); + } + } + ModuleBase::timer::tick("ML_Base", "updateInput"); +} + +void ML_Base::NN_forward(const double * const * prho, const ModulePW::PW_Basis *pw_rho, bool cal_grad) +{ + ModuleBase::timer::tick("ML_Base", "Forward"); + + this->nn->zero_grad(); + this->nn->inputs.requires_grad_(false); + this->nn->set_data(this, this->descriptor_type, this->kernel_index, this->nn->inputs); + this->nn->inputs.requires_grad_(true); + + this->nn->F = this->nn->forward(this->nn->inputs); + if (this->nn->inputs.grad().numel()) + { + this->nn->inputs.grad().zero_(); + } + + if (PARAM.inp.of_ml_feg != 3) + { + this->nn->F = torch::softplus(this->nn->F); + } + if (PARAM.inp.of_ml_feg == 1) + { + this->nn->F = this->nn->F - this->feg_net_F + 1.; + } + else if (PARAM.inp.of_ml_feg == 3) + { + this->nn->F = torch::softplus(this->nn->F - this->feg_net_F + this->feg3_correct); + } + ModuleBase::timer::tick("ML_Base", "Forward"); + + if (cal_grad) + { + ModuleBase::timer::tick("ML_Base", "Backward"); + this->nn->F.backward(torch::ones({this->nx, 1}, this->device_type)); + ModuleBase::timer::tick("ML_Base", "Backward"); + } +} + +torch::Tensor ML_Base::get_data(std::string parameter, const int ikernel){ + + if (parameter == "gamma") return torch::tensor(this->gamma, this->device_type); + if (parameter == "p") return torch::tensor(this->p, this->device_type); + if (parameter == "q") return torch::tensor(this->q, this->device_type); + if (parameter == "tanhp") return torch::tensor(this->tanhp, this->device_type); + if (parameter == "tanhq") return torch::tensor(this->tanhq, this->device_type); + if (parameter == "gammanl") return torch::tensor(this->gammanl[ikernel], this->device_type); + if (parameter == "pnl") return torch::tensor(this->pnl[ikernel], this->device_type); + if (parameter == "qnl") return torch::tensor(this->qnl[ikernel], this->device_type); + if (parameter == "xi") return torch::tensor(this->xi[ikernel], this->device_type); + if (parameter == "tanhxi") return torch::tensor(this->tanhxi[ikernel], this->device_type); + if (parameter == "tanhxi_nl") return torch::tensor(this->tanhxi_nl[ikernel], this->device_type); + if (parameter == "tanh_pnl") return torch::tensor(this->tanh_pnl[ikernel], this->device_type); + if (parameter == "tanh_qnl") return torch::tensor(this->tanh_qnl[ikernel], this->device_type); + if (parameter == "tanhp_nl") return torch::tensor(this->tanhp_nl[ikernel], this->device_type); + if (parameter == "tanhq_nl") return torch::tensor(this->tanhq_nl[ikernel], this->device_type); + return torch::zeros({}); +} + +void ML_Base::get_potential_(const double * const * prho, const ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential) +{ + ModuleBase::timer::tick("ML_Base", "Pauli Potential"); + + std::vector pauli_potential(this->nx, 0.); + std::vector tau_lda(this->nx, 0.); // Dummy or calculated inside + for (int ir = 0; ir < this->nx; ++ir) + { + tau_lda[ir] = this->energy_prefactor * std::pow(prho[0][ir], this->energy_exponent); + } + + if (this->ml_gammanl) this->potGammanlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_xi) this->potXinlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_tanhxi) this->potTanhxinlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_tanhxi_nl) this->potTanhxi_nlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_p || this->ml_pnl) this->potPPnlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_q || this->ml_qnl) this->potQQnlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_tanh_pnl) this->potTanhpTanh_pnlTerm(prho, tau_lda, pw_rho, pauli_potential); + if (this->ml_tanh_qnl) this->potTanhqTanh_qnlTerm(prho, tau_lda, pw_rho, pauli_potential); + if ((this->ml_tanhp || this->ml_tanhp_nl) && !this->ml_tanh_pnl) this->potTanhpTanhp_nlTerm(prho, tau_lda, pw_rho, pauli_potential); + if ((this->ml_tanhq || this->ml_tanhq_nl) && !this->ml_tanh_qnl) this->potTanhqTanhq_nlTerm(prho, tau_lda, pw_rho, pauli_potential); + + for (int ir = 0; ir < this->nx; ++ir) + { + double factor = tau_lda[ir] / prho[0][ir]; + pauli_potential[ir] += factor * + (this->energy_exponent * this->enhancement_cpu_ptr[ir] + this->potGammaTerm(ir) + this->potPTerm1(ir) + this->potQTerm1(ir) + + this->potXiTerm1(ir) + this->potTanhxiTerm1(ir) + this->potTanhpTerm1(ir) + this->potTanhqTerm1(ir)); + rpotential(0, ir) += pauli_potential[ir]; + } + ModuleBase::timer::tick("ML_Base", "Pauli Potential"); +} + +// IO tools +void ML_Base::loadVector(std::string filename, std::vector &data) +{ + npy::npy_data d = npy::read_npy(filename); + data = d.data; +} + +void ML_Base::dumpVector(std::string filename, const std::vector &data) +{ + npy::npy_data_ptr d; + d.data_ptr = data.data(); + d.shape = {(long unsigned) this->cal_tool->nx}; + d.fortran_order = false; + npy::write_npy(filename, d); +} + +void ML_Base::dumpTensor(std::string filename, const torch::Tensor &data) +{ + std::cout << "Dumping " << filename << std::endl; + torch::Tensor data_cpu = data.to(this->device_CPU).contiguous(); + std::vector v(data_cpu.data_ptr(), data_cpu.data_ptr() + data_cpu.numel()); + this->dumpVector(filename, v); +} + +void ML_Base::dumpMatrix(std::string filename, const ModuleBase::matrix &data) +{ + std::cout << "Dumping " << filename << std::endl; + std::vector v(data.c, data.c + this->nx); + this->dumpVector(filename, v); +} + +#endif diff --git a/source/source_pw/module_ofdft/ml_base.h b/source/source_pw/module_ofdft/ml_base.h new file mode 100644 index 0000000000..c0ec00c11e --- /dev/null +++ b/source/source_pw/module_ofdft/ml_base.h @@ -0,0 +1,144 @@ +#ifndef ML_BASE_H +#define ML_BASE_H + +#include +#include +#include +#include +#include + +#ifdef __MLALGO +#include "source_pw/module_ofdft/ml_tools/nn_of.h" +#include "source_io/module_ml/cal_mlkedf_descriptors.h" + +// The ML_Base class encapsulates common functionality for Machine Learning based +// constructs in OFDFT and EXX. +class ML_Base +{ +public: + ML_Base(); + ~ML_Base(); + + // Common Interface + void set_device(std::string device_inpt); + + // Tools + void loadVector(std::string filename, std::vector &data); + void dumpVector(std::string filename, const std::vector &data); + void dumpTensor(std::string filename, const torch::Tensor &data); + void dumpMatrix(std::string filename, const ModuleBase::matrix &data); + + int nx_tot = 0; // equal to nx (called by NN) + torch::Tensor get_data(std::string parameter, const int ikernel); + +protected: + void updateInput(const double * const * prho, const ModulePW::PW_Basis *pw_rho); + void NN_forward(const double * const * prho, const ModulePW::PW_Basis *pw_rho, bool cal_grad); + void get_potential_(const double * const * prho, const ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential); + + // Potential Terms - these appear identical in both classes or are intended to be shared + double potGammaTerm(int ir); + double potPTerm1(int ir); + double potQTerm1(int ir); + double potXiTerm1(int ir); + double potTanhxiTerm1(int ir); + double potTanhpTerm1(int ir); + double potTanhqTerm1(int ir); + + // Derived classes should ensure they can work with these signatures. + // Note: ML_EXX originally passed tau_lda for some of these. + // If tau_lda is needed, derived classes can override or we can add it to member variables. + // For now, keeping signatures compatible with member access. + void potGammanlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rGammanlTerm); + void potXinlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rXinlTerm); + void potTanhxinlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhxinlTerm); + void potTanhxi_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhxi_nlTerm); + void potPPnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rPPnlTerm); + void potQQnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rQQnlTerm); + void potTanhpTanh_pnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanh_pnlTerm); + void potTanhqTanh_qnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanh_qnlTerm); + void potTanhpTanhp_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanhp_nlTerm); + void potTanhqTanhq_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanhq_nlTerm); + +protected: + // --- Member Variables (Common) --- + + ModuleIO::Cal_MLKEDF_Descriptors *cal_tool = nullptr; + + int nx = 0; // number of grid points + double dV = 0.; + + // Constants + double pqcoef = 1.0 / (4.0 * std::pow(3*std::pow(M_PI, 2.0), 2.0/3.0)); // coefficient of p and q + double feg_net_F = 0.0; + double feg3_correct = 0.541324854612918; // ln(e - 1) + double energy_prefactor = 0.0; // cTF for KEDF, cDirac for EXX + double energy_exponent = 0.0; // 5/3 for KEDF, 4/3 for EXX + + // Descriptors and hyperparameters + int ninput = 0; // number of descriptors + std::vector gamma; + std::vector p; + std::vector q; + std::vector> gammanl; + std::vector> pnl; + std::vector> qnl; + std::vector> nablaRho; + + // Parameters + std::vector chi_xi; + double chi_p = 1.0; + double chi_q = 1.0; + std::vector> xi; + std::vector> tanhxi; + std::vector> tanhxi_nl; + std::vector tanhp; + std::vector tanhq; + + // plan 1 + std::vector chi_pnl; + std::vector chi_qnl; + std::vector> tanh_pnl; + std::vector> tanh_qnl; + // plan 2 + std::vector> tanhp_nl; + std::vector> tanhq_nl; + + // GPU / Device + torch::DeviceType device_type = torch::kCPU; + torch::Device device = torch::Device(torch::kCPU); + torch::Device device_CPU = torch::Device(torch::kCPU); + + // Neural Network + std::shared_ptr nn; + double* enhancement_cpu_ptr = nullptr; + double* gradient_cpu_ptr = nullptr; + int nkernel = 1; + + // Switch flags + bool ml_gamma = false; + bool ml_p = false; + bool ml_q = false; + bool ml_tanhp = false; + bool ml_tanhq = false; + bool ml_gammanl = false; + bool ml_pnl = false; + bool ml_qnl = false; + bool ml_xi = false; + bool ml_tanhxi = false; + bool ml_tanhxi_nl = false; + bool ml_tanh_pnl = false; + bool ml_tanh_qnl = false; + bool ml_tanhp_nl = false; + bool ml_tanhq_nl = false; + + // Maps + std::vector descriptor_type; + std::vector kernel_index; + std::map> descriptor2kernel; + std::map> descriptor2index; + std::map> gene_data_label; +}; + +#endif // __MLALGO +#endif // ML_BASE_H diff --git a/source/source_pw/module_ofdft/kedf_ml_pot.cpp b/source/source_pw/module_ofdft/ml_base_pot.cpp similarity index 69% rename from source/source_pw/module_ofdft/kedf_ml_pot.cpp rename to source/source_pw/module_ofdft/ml_base_pot.cpp index a371eb669f..b13e5552a7 100644 --- a/source/source_pw/module_ofdft/kedf_ml_pot.cpp +++ b/source/source_pw/module_ofdft/ml_base_pot.cpp @@ -1,82 +1,20 @@ -#ifdef __MLALGO - -#include "kedf_ml.h" - -#include "source_base/parallel_reduce.h" -#include "source_base/global_function.h" - -/** - * @brief Calculate the Pauli potential of ML KEDF - * - * @param prho charge density - * @param pw_rho PW_Basis - * @param rpotential rpotential => rpotential + V_{ML} - */ -void KEDF_ML::get_potential_(const double * const * prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential) -{ - // get potential - ModuleBase::timer::tick("KEDF_ML", "Pauli Potential"); - - std::vector pauli_potential(this->nx, 0.); - - if (this->ml_gammanl){ - this->potGammanlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_xi){ - this->potXinlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_tanhxi){ - this->potTanhxinlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_tanhxi_nl){ - this->potTanhxi_nlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_p || this->ml_pnl){ - this->potPPnlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_q || this->ml_qnl){ - this->potQQnlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_tanh_pnl){ - this->potTanhpTanh_pnlTerm(prho, pw_rho, pauli_potential); - } - if (this->ml_tanh_qnl){ - this->potTanhqTanh_qnlTerm(prho, pw_rho, pauli_potential); - } - if ((this->ml_tanhp || this->ml_tanhp_nl) && !this->ml_tanh_pnl){ - this->potTanhpTanhp_nlTerm(prho, pw_rho, pauli_potential); - } - if ((this->ml_tanhq || this->ml_tanhq_nl) && !this->ml_tanh_qnl){ - this->potTanhqTanhq_nlTerm(prho, pw_rho, pauli_potential); - } - - for (int ir = 0; ir < this->nx; ++ir) - { - pauli_potential[ir] += this->cTF * std::pow(prho[0][ir], 5./3.) / prho[0][ir] * - (5./3. * this->enhancement_cpu_ptr[ir] + this->potGammaTerm(ir) + this->potPTerm1(ir) + this->potQTerm1(ir) - + this->potXiTerm1(ir) + this->potTanhxiTerm1(ir) + this->potTanhpTerm1(ir) + this->potTanhqTerm1(ir)); - rpotential(0, ir) += pauli_potential[ir]; - } - ModuleBase::timer::tick("KEDF_ML", "Pauli Potential"); -} +#include "ml_base.h" +#ifdef __MLALGO -double KEDF_ML::potGammaTerm(int ir) +double ML_Base::potGammaTerm(int ir) { return (this->ml_gamma) ? 1./3. * gamma[ir] * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["gamma"][0]] : 0.; } - -double KEDF_ML::potPTerm1(int ir) +double ML_Base::potPTerm1(int ir) { return (this->ml_p) ? - 8./3. * p[ir] * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["p"][0]] : 0.; } - -double KEDF_ML::potQTerm1(int ir) +double ML_Base::potQTerm1(int ir) { return (this->ml_q) ? - 5./3. * q[ir] * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["q"][0]] : 0.; } - -double KEDF_ML::potXiTerm1(int ir) +double ML_Base::potXiTerm1(int ir) { double result = 0.; for (int ik = 0; ik < this->descriptor2kernel["xi"].size(); ++ik) @@ -87,8 +25,7 @@ double KEDF_ML::potXiTerm1(int ir) } return result; } - -double KEDF_ML::potTanhxiTerm1(int ir) +double ML_Base::potTanhxiTerm1(int ir) { double result = 0.; for (int ik = 0; ik < this->descriptor2kernel["tanhxi"].size(); ++ik) @@ -100,20 +37,19 @@ double KEDF_ML::potTanhxiTerm1(int ir) } return result; } - -double KEDF_ML::potTanhpTerm1(int ir) +double ML_Base::potTanhpTerm1(int ir) { return (this->ml_tanhp) ? - 8./3. * p[ir] * this->cal_tool->dtanh(this->tanhp[ir], this->chi_p) * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhp"][0]] : 0.; } - -double KEDF_ML::potTanhqTerm1(int ir) +double ML_Base::potTanhqTerm1(int ir) { return (this->ml_tanhq) ? - 5./3. * q[ir] * this->cal_tool->dtanh(this->tanhq[ir], this->chi_q) * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhq"][0]] : 0.; } -void KEDF_ML::potGammanlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rGammanlTerm) +// Implementations of nl terms using energy_prefactor/exponent logic +void ML_Base::potGammanlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rGammanlTerm) { double *dFdgammanl = new double[this->nx]; for (int ik = 0; ik < this->descriptor2kernel["gammanl"].size(); ++ik) @@ -122,7 +58,7 @@ void KEDF_ML::potGammanlTerm(const double * const *prho, ModulePW::PW_Basis *pw_ int d2i = this->descriptor2index["gammanl"][ik]; for (int ir = 0; ir < this->nx; ++ir) { - dFdgammanl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; + dFdgammanl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdgammanl, pw_rho, dFdgammanl); for (int ir = 0; ir < this->nx; ++ir) @@ -133,7 +69,7 @@ void KEDF_ML::potGammanlTerm(const double * const *prho, ModulePW::PW_Basis *pw_ delete[] dFdgammanl; } -void KEDF_ML::potXinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rXinlTerm) +void ML_Base::potXinlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rXinlTerm) { double *dFdxi = new double[this->nx]; for (int ik = 0; ik < this->descriptor2kernel["xi"].size(); ++ik) @@ -142,7 +78,7 @@ void KEDF_ML::potXinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho int d2i = this->descriptor2index["xi"][ik]; for (int ir = 0; ir < this->nx; ++ir) { - dFdxi[ir] = this->cTF * std::pow(prho[0][ir], 4./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; + dFdxi[ir] = tau_lda[ir] / std::pow(prho[0][ir], 1./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdxi, pw_rho, dFdxi); for (int ir = 0; ir < this->nx; ++ir) @@ -153,7 +89,7 @@ void KEDF_ML::potXinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho delete[] dFdxi; } -void KEDF_ML::potTanhxinlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhxinlTerm) +void ML_Base::potTanhxinlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhxinlTerm) { double *dFdtanhxi = new double[this->nx]; for (int ik = 0; ik < this->descriptor2kernel["tanhxi"].size(); ++ik) @@ -162,7 +98,7 @@ void KEDF_ML::potTanhxinlTerm(const double * const *prho, ModulePW::PW_Basis *pw int d2i = this->descriptor2index["tanhxi"][ik]; for (int ir = 0; ir < this->nx; ++ir) { - dFdtanhxi[ir] = this->cTF * std::pow(prho[0][ir], 4./3.) * this->cal_tool->dtanh(this->tanhxi[d2k][ir], this->chi_xi[d2k]) + dFdtanhxi[ir] = tau_lda[ir] / std::pow(prho[0][ir], 1./3.) * this->cal_tool->dtanh(this->tanhxi[d2k][ir], this->chi_xi[d2k]) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdtanhxi, pw_rho, dFdtanhxi); @@ -174,7 +110,7 @@ void KEDF_ML::potTanhxinlTerm(const double * const *prho, ModulePW::PW_Basis *pw delete[] dFdtanhxi; } -void KEDF_ML::potTanhxi_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhxi_nlTerm) +void ML_Base::potTanhxi_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhxi_nlTerm) { double *dFdtanhxi_nl = new double[this->nx]; double *dFdtanhxi_nl_nl = new double[this->nx]; @@ -185,7 +121,7 @@ void KEDF_ML::potTanhxi_nlTerm(const double * const *prho, ModulePW::PW_Basis *p int d2i = this->descriptor2index["tanhxi_nl"][ik]; for (int ir = 0; ir < this->nx; ++ir) { - dFdtanhxi_nl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; + dFdtanhxi_nl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdtanhxi_nl, pw_rho, dFdtanhxi_nl); for (int ir = 0; ir < this->nx; ++ir) @@ -207,7 +143,7 @@ void KEDF_ML::potTanhxi_nlTerm(const double * const *prho, ModulePW::PW_Basis *p } // get contribution of p and pnl -void KEDF_ML::potPPnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rPPnlTerm) +void ML_Base::potPPnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rPPnlTerm) { double *dFdpnl = new double[this->nx]; std::vector dFdpnl_tot(this->nx, 0.); @@ -219,7 +155,7 @@ void KEDF_ML::potPPnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho for (int ir = 0; ir < this->nx; ++ir) { - dFdpnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; + dFdpnl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdpnl, pw_rho, dFdpnl); for (int ir = 0; ir < this->nx; ++ir) @@ -235,7 +171,7 @@ void KEDF_ML::potPPnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho tempP[i] = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempP[i][ir] = (this->ml_p)? - 3./20. * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["p"][0]] * nablaRho[i][ir] / prho[0][ir] * /*Ha2Ry*/ 2. : 0.; + tempP[i][ir] = (this->ml_p)? - this->pqcoef * 2. * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["p"][0]] * this->nablaRho[i][ir] * tau_lda[ir] / std::pow(prho[0][ir], 8./3.): 0.; if (this->ml_pnl) { tempP[i][ir] += - this->pqcoef * 2. * this->nablaRho[i][ir] / std::pow(prho[0][ir], 8./3.) * dFdpnl_tot[ir]; @@ -264,7 +200,8 @@ void KEDF_ML::potPPnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho delete[] tempP; } -void KEDF_ML::potQQnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rQQnlTerm) + +void ML_Base::potQQnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rQQnlTerm) { double *dFdqnl = new double[this->nx]; std::vector dFdqnl_tot(this->nx, 0.); @@ -276,7 +213,7 @@ void KEDF_ML::potQQnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho for (int ir = 0; ir < this->nx; ++ir) { - dFdqnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; + dFdqnl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdqnl, pw_rho, dFdqnl); for (int ir = 0; ir < this->nx; ++ir) @@ -289,14 +226,13 @@ void KEDF_ML::potQQnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho double * tempQ = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempQ[ir] = (this->ml_q)? 3./40. * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["q"][0]] * /*Ha2Ry*/ 2. : 0.; + tempQ[ir] = (this->ml_q)? this->pqcoef * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["q"][0]] * tau_lda[ir] / std::pow(prho[0][ir], 5./3.) : 0.; if (this->ml_qnl) { tempQ[ir] += this->pqcoef / std::pow(prho[0][ir], 5./3.) * dFdqnl_tot[ir]; } } this->cal_tool->Laplacian(tempQ, pw_rho, result.data()); - if (this->ml_qnl) { for (int ir = 0; ir < this->nx; ++ir) @@ -312,7 +248,8 @@ void KEDF_ML::potQQnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho delete[] tempQ; } -void KEDF_ML::potTanhpTanh_pnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanh_pnlTerm) + +void ML_Base::potTanhpTanh_pnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanh_pnlTerm) { // Note we assume that tanhp_nl and tanh_pnl will NOT be used together. double *dFdpnl = new double[this->nx]; @@ -325,7 +262,7 @@ void KEDF_ML::potTanhpTanh_pnlTerm(const double * const *prho, ModulePW::PW_Basi for (int ir = 0; ir < this->nx; ++ir) { - dFdpnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->cal_tool->dtanh(this->tanh_pnl[d2k][ir], this->chi_pnl[d2k]) + dFdpnl[ir] = tau_lda[ir] * this->cal_tool->dtanh(this->tanh_pnl[d2k][ir], this->chi_pnl[d2k]) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdpnl, pw_rho, dFdpnl); @@ -342,8 +279,8 @@ void KEDF_ML::potTanhpTanh_pnlTerm(const double * const *prho, ModulePW::PW_Basi tempP[i] = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempP[i][ir] = (this->ml_tanhp)? - 3./20. * this->cal_tool->dtanh(this->tanhp[ir], this->chi_p) - * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhp"][0]] * nablaRho[i][ir] / prho[0][ir] * /*Ha2Ry*/ 2. : 0.; + tempP[i][ir] = (this->ml_tanhp)? - this->pqcoef * 2. * this->cal_tool->dtanh(this->tanhp[ir], this->chi_p) + * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhp"][0]] * this->nablaRho[i][ir] * tau_lda[ir] / std::pow(prho[0][ir], 8./3.) : 0.; if (this->ml_tanh_pnl) { tempP[i][ir] += - this->pqcoef * 2. * this->nablaRho[i][ir] / std::pow(prho[0][ir], 8./3.) * dFdpnl_tot[ir]; @@ -371,7 +308,7 @@ void KEDF_ML::potTanhpTanh_pnlTerm(const double * const *prho, ModulePW::PW_Basi delete[] tempP; } -void KEDF_ML::potTanhqTanh_qnlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanh_qnlTerm) +void ML_Base::potTanhqTanh_qnlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanh_qnlTerm) { // Note we assume that tanhq_nl and tanh_qnl will NOT be used together. double *dFdqnl = new double[this->nx]; @@ -384,7 +321,7 @@ void KEDF_ML::potTanhqTanh_qnlTerm(const double * const *prho, ModulePW::PW_Basi for (int ir = 0; ir < this->nx; ++ir) { - dFdqnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) * this->cal_tool->dtanh(this->tanh_qnl[d2k][ir], this->chi_qnl[d2k]) + dFdqnl[ir] = tau_lda[ir] * this->cal_tool->dtanh(this->tanh_qnl[d2k][ir], this->chi_qnl[d2k]) * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdqnl, pw_rho, dFdqnl); @@ -398,15 +335,14 @@ void KEDF_ML::potTanhqTanh_qnlTerm(const double * const *prho, ModulePW::PW_Basi double * tempQ = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempQ[ir] = (this->ml_tanhq)? 3./40. * this->cal_tool->dtanh(this->tanhq[ir], this->chi_q) - * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhq"][0]] * /*Ha2Ry*/ 2. : 0.; + tempQ[ir] = (this->ml_tanhq)? this->pqcoef * this->cal_tool->dtanh(this->tanhq[ir], this->chi_q) + * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhq"][0]] * tau_lda[ir] / std::pow(prho[0][ir], 5./3.) : 0.; if (this->ml_tanh_qnl) { tempQ[ir] += this->pqcoef / std::pow(prho[0][ir], 5./3.) * dFdqnl_tot[ir]; } } this->cal_tool->Laplacian(tempQ, pw_rho, result.data()); - if (this->ml_tanh_qnl) { for (int ir = 0; ir < this->nx; ++ir) @@ -423,7 +359,7 @@ void KEDF_ML::potTanhqTanh_qnlTerm(const double * const *prho, ModulePW::PW_Basi } // Note we assume that tanhp_nl and tanh_pnl will NOT be used together. -void KEDF_ML::potTanhpTanhp_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanhp_nlTerm) +void ML_Base::potTanhpTanhp_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhpTanhp_nlTerm) { double *dFdpnl = new double[this->nx]; std::vector dFdpnl_tot(this->nx, 0.); @@ -435,7 +371,7 @@ void KEDF_ML::potTanhpTanhp_nlTerm(const double * const *prho, ModulePW::PW_Basi for (int ir = 0; ir < this->nx; ++ir) { - dFdpnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) + dFdpnl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdpnl, pw_rho, dFdpnl); @@ -452,8 +388,8 @@ void KEDF_ML::potTanhpTanhp_nlTerm(const double * const *prho, ModulePW::PW_Basi tempP[i] = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempP[i][ir] = (this->ml_tanhp)? - 3./20. * this->cal_tool->dtanh(this->tanhp[ir], this->chi_p) - * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhp"][0]] * nablaRho[i][ir] / prho[0][ir] * /*Ha2Ry*/ 2. : 0.; + tempP[i][ir] = (this->ml_tanhp)? - this->pqcoef * 2. * this->cal_tool->dtanh(this->tanhp[ir], this->chi_p) + * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhp"][0]] * this->nablaRho[i][ir] * tau_lda[ir] / std::pow(prho[0][ir], 8./3.) : 0.; if (this->ml_tanhp_nl) { tempP[i][ir] += - this->pqcoef * 2. * this->nablaRho[i][ir] / std::pow(prho[0][ir], 8./3.) * dFdpnl_tot[ir]; @@ -481,7 +417,7 @@ void KEDF_ML::potTanhpTanhp_nlTerm(const double * const *prho, ModulePW::PW_Basi delete[] tempP; } -void KEDF_ML::potTanhqTanhq_nlTerm(const double * const *prho, ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanhq_nlTerm) +void ML_Base::potTanhqTanhq_nlTerm(const double * const *prho, const std::vector &tau_lda, const ModulePW::PW_Basis *pw_rho, std::vector &rTanhqTanhq_nlTerm) { double *dFdqnl = new double[this->nx]; std::vector dFdqnl_tot(this->nx, 0.); @@ -493,7 +429,7 @@ void KEDF_ML::potTanhqTanhq_nlTerm(const double * const *prho, ModulePW::PW_Basi for (int ir = 0; ir < this->nx; ++ir) { - dFdqnl[ir] = this->cTF * std::pow(prho[0][ir], 5./3.) + dFdqnl[ir] = tau_lda[ir] * this->gradient_cpu_ptr[ir * this->ninput + d2i]; } this->cal_tool->multiKernel(d2k, dFdqnl, pw_rho, dFdqnl); @@ -507,8 +443,8 @@ void KEDF_ML::potTanhqTanhq_nlTerm(const double * const *prho, ModulePW::PW_Basi double * tempQ = new double[this->nx]; for (int ir = 0; ir < this->nx; ++ir) { - tempQ[ir] = (this->ml_tanhq)? 3./40. * this->cal_tool->dtanh(this->tanhq[ir], this->chi_q) - * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhq"][0]] * /*Ha2Ry*/ 2. : 0.; + tempQ[ir] = (this->ml_tanhq)? this->pqcoef * this->cal_tool->dtanh(this->tanhq[ir], this->chi_q) + * this->gradient_cpu_ptr[ir * this->ninput + this->descriptor2index["tanhq"][0]] * tau_lda[ir] / std::pow(prho[0][ir], 5./3.) : 0.; if (this->ml_tanhq_nl) { dFdqnl_tot[ir] *= this->cal_tool->dtanh(this->tanhq[ir], this->chi_q); diff --git a/source/source_pw/module_ofdft/ml_tools/data.cpp b/source/source_pw/module_ofdft/ml_tools/data.cpp index ed3e570b8c..75ac968f0f 100644 --- a/source/source_pw/module_ofdft/ml_tools/data.cpp +++ b/source/source_pw/module_ofdft/ml_tools/data.cpp @@ -246,27 +246,28 @@ void Data::load_data_( for (int idata = 0; idata < ndata; ++idata) { - this->loadTensor(dir[idata] + "/rho.npy", cshape, fortran_order, container, idata, fftdim, rho); + this->loadTensor(dir[idata] + "/rho.npy", idata, fftdim, rho); if (this->load_gamma){ - this->loadTensor(dir[idata] + "/gamma.npy", cshape, fortran_order, container, idata, fftdim, gamma); + this->loadTensor(dir[idata] + "/gamma.npy", idata, fftdim, gamma); } if (this->load_p){ - this->loadTensor(dir[idata] + "/p.npy", cshape, fortran_order, container, idata, fftdim, p); - npy::LoadArrayFromNumpy(dir[idata] + "/nablaRhox.npy", cshape, fortran_order, container); + this->loadTensor(dir[idata] + "/p.npy", idata, fftdim, p); + this->loadVector(dir[idata] + "/nablaRhox.npy", container); + // npy::LoadArrayFromNumpy(dir[idata] + "/nablaRhox.npy", cshape, fortran_order, container); nablaRho[idata][0] = torch::tensor(container).reshape({fftdim, fftdim, fftdim}); - npy::LoadArrayFromNumpy(dir[idata] + "/nablaRhoy.npy", cshape, fortran_order, container); + this->loadVector(dir[idata] + "/nablaRhoy.npy", container); nablaRho[idata][1] = torch::tensor(container).reshape({fftdim, fftdim, fftdim}); - npy::LoadArrayFromNumpy(dir[idata] + "/nablaRhoz.npy", cshape, fortran_order, container); + this->loadVector(dir[idata] + "/nablaRhoz.npy", container); nablaRho[idata][2] = torch::tensor(container).reshape({fftdim, fftdim, fftdim}); } if (this->load_q){ - this->loadTensor(dir[idata] + "/q.npy", cshape, fortran_order, container, idata, fftdim, q); + this->loadTensor(dir[idata] + "/q.npy", idata, fftdim, q); } if (this->load_tanhp){ - this->loadTensor(dir[idata] + "/tanhp.npy", cshape, fortran_order, container, idata, fftdim, tanhp); + this->loadTensor(dir[idata] + "/tanhp.npy", idata, fftdim, tanhp); } if (this->load_tanhq){ - this->loadTensor(dir[idata] + "/tanhq.npy", cshape, fortran_order, container, idata, fftdim, tanhq); + this->loadTensor(dir[idata] + "/tanhq.npy", idata, fftdim, tanhq); } for (int ik = 0; ik < input.nkernel; ++ik) @@ -275,44 +276,44 @@ void Data::load_data_( double kscaling = input.kernel_scaling[ik]; if (this->load_gammanl[ik]){ - this->loadTensor(dir[idata] + this->file_name("gammanl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, gammanl[ik]); + this->loadTensor(dir[idata] + this->file_name("gammanl", ktype, kscaling), idata, fftdim, gammanl[ik]); } if (this->load_pnl[ik]){ - this->loadTensor(dir[idata] + this->file_name("pnl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, pnl[ik]); + this->loadTensor(dir[idata] + this->file_name("pnl", ktype, kscaling), idata, fftdim, pnl[ik]); } if (this->load_qnl[ik]){ - this->loadTensor(dir[idata] + this->file_name("qnl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, qnl[ik]); + this->loadTensor(dir[idata] + this->file_name("qnl", ktype, kscaling), idata, fftdim, qnl[ik]); } if (this->load_xi[ik]){ - this->loadTensor(dir[idata] + this->file_name("xi", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, xi[ik]); + this->loadTensor(dir[idata] + this->file_name("xi", ktype, kscaling), idata, fftdim, xi[ik]); } if (this->load_tanhxi[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanhxi", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanhxi[ik]); + this->loadTensor(dir[idata] + this->file_name("tanhxi", ktype, kscaling), idata, fftdim, tanhxi[ik]); } if (this->load_tanhxi_nl[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanhxi_nl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanhxi_nl[ik]); + this->loadTensor(dir[idata] + this->file_name("tanhxi_nl", ktype, kscaling), idata, fftdim, tanhxi_nl[ik]); } if (this->load_tanh_pnl[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanh_pnl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanh_pnl[ik]); + this->loadTensor(dir[idata] + this->file_name("tanh_pnl", ktype, kscaling), idata, fftdim, tanh_pnl[ik]); } if (this->load_tanh_qnl[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanh_qnl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanh_qnl[ik]); + this->loadTensor(dir[idata] + this->file_name("tanh_qnl", ktype, kscaling), idata, fftdim, tanh_qnl[ik]); } if (this->load_tanhp_nl[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanhp_nl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanhp_nl[ik]); + this->loadTensor(dir[idata] + this->file_name("tanhp_nl", ktype, kscaling), idata, fftdim, tanhp_nl[ik]); } if (this->load_tanhq_nl[ik]){ - this->loadTensor(dir[idata] + this->file_name("tanhq_nl", ktype, kscaling), cshape, fortran_order, container, idata, fftdim, tanhq_nl[ik]); + this->loadTensor(dir[idata] + this->file_name("tanhq_nl", ktype, kscaling), idata, fftdim, tanhq_nl[ik]); } } - this->loadTensor(dir[idata] + "/enhancement.npy", cshape, fortran_order, container, idata, fftdim, enhancement); + this->loadTensor(dir[idata] + "/enhancement.npy", idata, fftdim, enhancement); enhancement_mean[idata] = torch::mean(enhancement[idata]); tau_mean[idata] = torch::mean(torch::pow(rho[idata], input.exponent/3.) * enhancement[idata]); if (input.loss == "potential" || input.loss == "both" || input.loss == "both_new") { - this->loadTensor(dir[idata] + "/pauli.npy", cshape, fortran_order, container, idata, fftdim, pauli); + this->loadTensor(dir[idata] + "/pauli.npy", idata, fftdim, pauli); pauli_mean[idata] = torch::mean(pauli[idata]); } } @@ -334,16 +335,20 @@ void Data::load_data_( void Data::loadTensor( std::string file, - std::vector cshape, - bool fortran_order, - std::vector &container, const int index, const int fftdim, torch::Tensor &data ) { - npy::LoadArrayFromNumpy(file, cshape, fortran_order, container); - data[index] = torch::tensor(container).reshape({fftdim, fftdim, fftdim}); + npy::npy_data d = npy::read_npy(file); + data[index] = torch::tensor(d.data).reshape({fftdim, fftdim, fftdim}); +} + +void Data::loadVector(std::string file, + std::vector &data) +{ + npy::npy_data d = npy::read_npy(file); + data = d.data; } void Data::dumpTensor(const torch::Tensor &data, std::string filename, int nx) @@ -352,9 +357,11 @@ void Data::dumpTensor(const torch::Tensor &data, std::string filename, int nx) for (int ir = 0; ir < nx; ++ir){ v[ir] = data[ir].item(); } - // std::vector v(data.data_ptr(), data.data_ptr() + data.numel()); // this works, but only supports float tensor - const long unsigned cshape[] = {(long unsigned) nx}; // shape - npy::SaveArrayAsNumpy(filename, false, 1, cshape, v); + npy::npy_data_ptr d; + d.data_ptr = v.data(); + d.shape = {(long unsigned) nx}; + d.fortran_order = false; + npy::write_npy(filename, d); std::cout << "Dumping " << filename << " done" << std::endl; } diff --git a/source/source_pw/module_ofdft/ml_tools/data.h b/source/source_pw/module_ofdft/ml_tools/data.h index cf3797ab86..2116709fd3 100644 --- a/source/source_pw/module_ofdft/ml_tools/data.h +++ b/source/source_pw/module_ofdft/ml_tools/data.h @@ -67,18 +67,17 @@ class Data void init_data(const int nkernel, const int ndata, const int fftdim, const torch::Device device); void load_data_(Input &input, const int ndata, const int fftdim, std::string *dir); - const double cTF = 3. /10. * std::pow(3. * std::pow(M_PI, 2.), 2. / 3.) * 2.; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) - const double cDirac = - 3. /4. * std::pow(3. / M_PI, 1./3.) * 2.; // -3/4*(3/pi)^{1/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) + const double cTF = 3. / 10. * std::pow(3. * std::pow(M_PI, 2.), 2. / 3.) * 2.; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) + const double cDirac = - 3. / 4. * std::pow(3. / M_PI, 1./3.) * 2.; // -3/4*(3/pi)^{1/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2) double tau_exp = 5. / 3.; // 5/3 for TF KEDF, and 4/3 for Dirac term public: void loadTensor(std::string file, - std::vector cshape, - bool fortran_order, - std::vector &container, const int index, const int fftdim, torch::Tensor &data); + void loadVector(std::string file, + std::vector &data); // -------- dump Tensor into .npy files --------- void dumpTensor(const torch::Tensor &data, std::string filename, int nx); std::string file_name(std::string parameter, const int kernel_type, const double kernel_scaling); diff --git a/source/source_pw/module_ofdft/of_print_info.cpp b/source/source_pw/module_ofdft/of_print_info.cpp new file mode 100644 index 0000000000..fa19083dcd --- /dev/null +++ b/source/source_pw/module_ofdft/of_print_info.cpp @@ -0,0 +1,135 @@ +#include "source_pw/module_ofdft/of_print_info.h" +#include "source_estate/module_pot/efield.h" +#include "source_estate/module_pot/gatefield.h" +#include "source_base/formatter.h" + +/** + * @brief Print nessecary information to the screen, + * and write the components of the total energy into running_log. + */ +void OFDFT::print_info(const int iter, + ModuleBase::TimePoint &iter_time, + const double &energy_current, + const double &energy_last, + const double &normdLdphi, + const elecstate::ElecState *pelec, + KEDF_Manager *kedf_manager, + const bool conv_esolver) +{ + if (iter == 0) + { + std::cout << " ============================= Running OFDFT " + "==============================" + << std::endl; + std::cout << " ITER ETOT/eV EDIFF/eV EFERMI/eV POTNORM TIME/s" + << std::endl; + } + + std::map prefix_map = { + {"cg1", "CG"}, + {"cg2", "CG"}, + {"tn", "TN"} + }; + std::string iteration = prefix_map[PARAM.inp.of_method] + std::to_string(iter); + double duration = ModuleBase::get_duration(iter_time, ModuleBase::get_time()); + std::cout << " " << std::setw(8) << iteration + << std::setw(18) << std::scientific << std::setprecision(8) << energy_current * ModuleBase::Ry_to_eV + << std::setw(18) << (energy_current - energy_last) * ModuleBase::Ry_to_eV + << std::setw(13) << std::setprecision(4) << pelec->eferm.get_efval(0) * ModuleBase::Ry_to_eV + << std::setw(13) << std::setprecision(4) << normdLdphi + << std::setw(6) << std::fixed << std::setprecision(2) << duration << std::endl; + + GlobalV::ofs_running << std::setprecision(12); + GlobalV::ofs_running << std::setiosflags(std::ios::right); + + GlobalV::ofs_running << "\nIter" << iter << ": the norm of potential is " << normdLdphi << std::endl; + + std::vector titles; + std::vector energies_Ry; + std::vector energies_eV; + if ((PARAM.inp.out_band[0] > 0 && + ((iter + 1) % PARAM.inp.out_band[0] == 0 || + conv_esolver || + iter == PARAM.inp.scf_nmax)) || + PARAM.inp.init_chg == "file") + { + titles.push_back("E_Total"); + energies_Ry.push_back(pelec->f_en.etot); + titles.push_back("E_Kinetic"); + energies_Ry.push_back(pelec->f_en.ekinetic); + titles.push_back("E_Hartree"); + energies_Ry.push_back(pelec->f_en.hartree_energy); + titles.push_back("E_xc"); + energies_Ry.push_back(pelec->f_en.etxc - pelec->f_en.etxcc); + titles.push_back("E_LocalPP"); + energies_Ry.push_back(pelec->f_en.e_local_pp); + titles.push_back("E_Ewald"); + energies_Ry.push_back(pelec->f_en.ewald_energy); + + kedf_manager->record_energy(titles, energies_Ry); + + std::string vdw_method = PARAM.inp.vdw_method; + if (vdw_method == "d2") // Peize Lin add 2014-04, update 2021-03-09 + { + titles.push_back("E_vdwD2"); + energies_Ry.push_back(pelec->f_en.evdw); + } + else if (vdw_method == "d3_0" || vdw_method == "d3_bj") // jiyy add 2019-05, update 2021-05-02 + { + titles.push_back("E_vdwD3"); + energies_Ry.push_back(pelec->f_en.evdw); + } + if (PARAM.inp.imp_sol) + { + titles.push_back("E_sol_el"); + energies_Ry.push_back(pelec->f_en.esol_el); + titles.push_back("E_sol_cav"); + energies_Ry.push_back(pelec->f_en.esol_cav); + } + if (PARAM.inp.efield_flag) + { + titles.push_back("E_efield"); + energies_Ry.push_back(elecstate::Efield::etotefield); + } + if (PARAM.inp.gate_flag) + { + titles.push_back("E_gatefield"); + energies_Ry.push_back(elecstate::Gatefield::etotgatefield); + } + if (PARAM.inp.ml_exx) + { + titles.push_back("E_ML-EXX"); + energies_Ry.push_back(pelec->f_en.ml_exx); + } + } + else + { + titles.push_back("E_Total"); + energies_Ry.push_back(pelec->f_en.etot); + } + + if (PARAM.globalv.two_fermi) + { + titles.push_back("E_Fermi_up"); + energies_Ry.push_back(pelec->eferm.get_efval(0)); + titles.push_back("E_Fermi_dw"); + energies_Ry.push_back(pelec->eferm.get_efval(1)); + } + else + { + titles.push_back("E_Fermi"); + energies_Ry.push_back(pelec->eferm.get_efval(0)); + } + energies_eV.resize(energies_Ry.size()); + std::transform(energies_Ry.begin(), energies_Ry.end(), energies_eV.begin(), [](double energy) { + return energy * ModuleBase::Ry_to_eV; + }); + FmtTable table(/*titles=*/{"Energy", "Rydberg", "eV"}, + /*nrows=*/titles.size(), + /*formats=*/{"%20s", "%20.12f", "%20.12f"}, 0); + table << titles << energies_Ry << energies_eV; + GlobalV::ofs_running << table.str() << std::endl; + + // reset the iter_time for the next iteration + iter_time = ModuleBase::get_time(); +} diff --git a/source/source_pw/module_ofdft/of_print_info.h b/source/source_pw/module_ofdft/of_print_info.h new file mode 100644 index 0000000000..dd45e6bbc6 --- /dev/null +++ b/source/source_pw/module_ofdft/of_print_info.h @@ -0,0 +1,26 @@ +#ifndef OF_PRINT_INFO_H +#define OF_PRINT_INFO_H + +#include "source_estate/elecstate.h" // electronic states +#include "source_pw/module_ofdft/kedf_manager.h" + +#include "source_base/timer_wrapper.h" + + +namespace OFDFT +{ + +void print_info(const int iter, + ModuleBase::TimePoint &iter_time, + const double &energy_current, + const double &energy_last, + const double &normdLdphi, + const elecstate::ElecState *pelec, + KEDF_Manager *kedf_manager, + const bool conv_esolver); + +} + +#endif + + diff --git a/source/source_pw/module_ofdft/of_stress_pw.cpp b/source/source_pw/module_ofdft/of_stress_pw.cpp index 02011e4284..479b078e04 100644 --- a/source/source_pw/module_ofdft/of_stress_pw.cpp +++ b/source/source_pw/module_ofdft/of_stress_pw.cpp @@ -2,8 +2,7 @@ #include "source_base/timer.h" #include "source_hamilt/module_vdw/vdw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" // Since the kinetic stress of OFDFT is calculated by kinetic functionals in esolver_of.cpp, here we regard it as an // input variable. diff --git a/source/source_pw/module_ofdft/of_stress_pw.h b/source/source_pw/module_ofdft/of_stress_pw.h index e6efdca212..d5d5d5feb1 100644 --- a/source/source_pw/module_ofdft/of_stress_pw.h +++ b/source/source_pw/module_ofdft/of_stress_pw.h @@ -2,7 +2,7 @@ #define OF_STRESS_PW_H #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_pw/module_pwdft/stress_func.h" class OF_Stress_PW : public Stress_Func diff --git a/source/source_pw/module_pwdft/CMakeLists.txt b/source/source_pw/module_pwdft/CMakeLists.txt index f958fdc75e..3c525240ea 100644 --- a/source/source_pw/module_pwdft/CMakeLists.txt +++ b/source/source_pw/module_pwdft/CMakeLists.txt @@ -1,17 +1,17 @@ -add_subdirectory(operator_pw) + list(APPEND objects hamilt_pw.cpp - operator_pw/ekinetic_pw.cpp - operator_pw/veff_pw.cpp - operator_pw/nonlocal_pw.cpp - operator_pw/meta_pw.cpp - operator_pw/velocity_pw.cpp - operator_pw/operator_pw.cpp - operator_pw/onsite_proj_pw.cpp - operator_pw/op_exx_pw.cpp - operator_pw/exx_pw_ace.cpp - operator_pw/exx_pw_pot.cpp + op_pw_ekin.cpp + op_pw_veff.cpp + op_pw_nl.cpp + op_pw_meta.cpp + op_pw_vel.cpp + op_pw.cpp + op_pw_proj.cpp + op_pw_exx.cpp + op_pw_exx_ace.cpp + op_pw_exx_pot.cpp setup_pot.cpp setup_pwrho.cpp setup_pwwfc.cpp @@ -21,25 +21,24 @@ list(APPEND objects forces.cpp forces_us.cpp forces_onsite.cpp - stress_func_cc.cpp - stress_func_ewa.cpp - stress_func_gga.cpp - stress_func_mgga.cpp - stress_func_har.cpp - stress_func_kin.cpp - stress_func_loc.cpp - stress_func_nl.cpp - stress_func_us.cpp - stress_func_onsite.cpp - stress_func_exx.cpp + stress_cc.cpp + stress_ewa.cpp + stress_gga.cpp + stress_mgga.cpp + stress_har.cpp + stress_kin.cpp + stress_loc.cpp + stress_nl.cpp + stress_us.cpp + stress_onsite.cpp + stress_exx.cpp stress_pw.cpp - VL_in_pw.cpp - VNL_in_pw.cpp - VNL_grad_pw.cpp + vl_pw.cpp + vnl_pw.cpp + vnl_pw_grad.cpp structure_factor.cpp structure_factor_k.cpp soc.cpp - global.cpp parallel_grid.cpp elecond.cpp fs_nonlocal_tools.cpp @@ -47,7 +46,7 @@ list(APPEND objects radial_proj.cpp onsite_projector.cpp onsite_proj_tools.cpp - VSep_in_pw.cpp + vsep_pw.cpp ) add_library( diff --git a/source/source_pw/module_pwdft/elecond.cpp b/source/source_pw/module_pwdft/elecond.cpp index 068ca01067..e7862538ab 100644 --- a/source/source_pw/module_pwdft/elecond.cpp +++ b/source/source_pw/module_pwdft/elecond.cpp @@ -5,7 +5,7 @@ #include "source_base/kernels/math_kernel_op.h" #include "source_base/parallel_device.h" #include "source_estate/occupy.h" -#include "source_io/binstream.h" +#include "source_io/module_output/binstream.h" #include "source_io/module_parameter/parameter.h" #include @@ -61,7 +61,7 @@ void EleCond::KG(const int& smear_type, const double gamma = fwhmin / 2.0 / ModuleBase::Ry_to_eV; double dt = dt_in; // unit in a.u., 1 a.u. = 4.837771834548454e-17 s const double expfactor = 23; // exp(-23) = 1e-10 - int nt; // set nt empirically + int nt = 0; // set nt empirically if (smear_type == 1) { nt = ceil(sqrt(2 * expfactor) / sigma / dt); @@ -93,9 +93,9 @@ void EleCond::KG(const int& smear_type, jjresponse_ks(ik, nt, dt, decut, wg, velop, ct11.data(), ct12.data(), ct22.data()); } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, ct11.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, ct12.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, ct22.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(ct11.data(), nt); + Parallel_Reduce::reduce_all(ct12.data(), nt); + Parallel_Reduce::reduce_all(ct22.data(), nt); #endif //------------------------------------------------------------------ // Output diff --git a/source/source_pw/module_pwdft/elecond.h b/source/source_pw/module_pwdft/elecond.h index 13bc48bea3..83a4a85d25 100644 --- a/source/source_pw/module_pwdft/elecond.h +++ b/source/source_pw/module_pwdft/elecond.h @@ -6,8 +6,8 @@ #include "source_cell/klist.h" #include "source_cell/unitcell.h" #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" -#include "source_pw/module_pwdft/operator_pw/velocity_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" +#include "source_pw/module_pwdft/op_pw_vel.h" template class EleCond diff --git a/source/source_pw/module_pwdft/module_exx_helper/exx_helper.cpp b/source/source_pw/module_pwdft/exx_helper.cpp similarity index 89% rename from source/source_pw/module_pwdft/module_exx_helper/exx_helper.cpp rename to source/source_pw/module_pwdft/exx_helper.cpp index 1b41163967..89c32d1584 100644 --- a/source/source_pw/module_pwdft/module_exx_helper/exx_helper.cpp +++ b/source/source_pw/module_pwdft/exx_helper.cpp @@ -1,4 +1,6 @@ #include "exx_helper.h" +#include "source_io/module_parameter/parameter.h" // use PARAM +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info template double Exx_Helper::cal_exx_energy(psi::Psi *psi_) @@ -26,7 +28,7 @@ bool Exx_Helper::exx_after_converge(int &iter, bool ene_conv) { return true; } - else if (iter >= PARAM.inp.exx_hybrid_step) + else if (exx_iter >= PARAM.inp.exx_hybrid_step) { GlobalV::ofs_running << " !!EXX IS NOT CONVERGED!!" << std::endl; std::cout << " !!EXX IS NOT CONVERGED!!" << std::endl; @@ -57,10 +59,3 @@ template class Exx_Helper, base_device::DEVICE_GPU>; template class Exx_Helper, base_device::DEVICE_GPU>; #endif -#ifndef __EXX -#include "source_hamilt/module_xc/exx_info.h" -namespace GlobalC -{ - Exx_Info exx_info; -} -#endif \ No newline at end of file diff --git a/source/source_pw/module_pwdft/module_exx_helper/exx_helper.h b/source/source_pw/module_pwdft/exx_helper.h similarity index 88% rename from source/source_pw/module_pwdft/module_exx_helper/exx_helper.h rename to source/source_pw/module_pwdft/exx_helper.h index 77c6c84295..283b035760 100644 --- a/source/source_pw/module_pwdft/module_exx_helper/exx_helper.h +++ b/source/source_pw/module_pwdft/exx_helper.h @@ -1,10 +1,6 @@ -// -// For EXX in PW. -// #include "source_psi/psi.h" #include "source_base/matrix.h" -#include "source_pw/module_pwdft/global.h" -#include "source_pw/module_pwdft/operator_pw/op_exx_pw.h" +#include "source_pw/module_pwdft/op_pw_exx.h" #ifndef EXX_HELPER_H #define EXX_HELPER_H diff --git a/source/source_pw/module_pwdft/forces.cpp b/source/source_pw/module_pwdft/forces.cpp index 113217657f..a6894c49ca 100644 --- a/source/source_pw/module_pwdft/forces.cpp +++ b/source/source_pw/module_pwdft/forces.cpp @@ -1,11 +1,11 @@ #include "forces.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" // new #include "source_base/complexmatrix.h" #include "source_base/libm/libm.h" +#include "source_base/truncated_func.h" #include "source_base/math_integral.h" #include "source_base/mathzone.h" #include "source_base/timer.h" @@ -29,6 +29,7 @@ void Forces::cal_force(UnitCell& ucell, ModuleSymmetry::Symmetry* p_symm, Structure_Factor* p_sf, surchem& solvent, + const Plus_U *p_dftu, //mohan add 2025-11-06 const pseudopot_cell_vl* locpp, const pseudopot_cell_vnl* p_nlpp, K_Vectors* pkv, @@ -70,9 +71,10 @@ void Forces::cal_force(UnitCell& ucell, } // DFT+U and DeltaSpin + // here maybe a bug when OFDFT calls +U, mohan add 20251107 if(PARAM.inp.dft_plus_u || PARAM.inp.sc_mag_switch) { - this->cal_force_onsite(forceonsite, wg, wfc_basis, ucell, psi_in); + this->cal_force_onsite(forceonsite, wg, wfc_basis, ucell, *p_dftu, psi_in); } } @@ -196,7 +198,7 @@ void Forces::cal_force(UnitCell& ucell, if (ModuleSymmetry::Symmetry::symm_flag == 1) { - double d1, d2, d3; + double d1 = 0.0, d2 = 0.0, d3 = 0.0; for (int iat = 0; iat < this->nat; iat++) { ModuleBase::Mathzone::Cartesian_to_Direct(force(iat, 0), @@ -448,7 +450,7 @@ void Forces::cal_force_loc(const UnitCell& ucell, for (int ig = 0; ig < rho_basis->npw; ig++) { const double phase = ModuleBase::TWO_PI * (rho_basis->gcar[ig] * ucell.atoms[it].tau[ia]); - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(phase, &sinp, &cosp); const double factor = vloc(it, rho_basis->ig2igg[ig]) * (cosp * aux[ig].imag() + sinp * aux[ig].real()); @@ -502,7 +504,7 @@ void Forces::cal_force_ew(const UnitCell& ucell, { if (ucell.atoms[it].na != 0) { - double dzv; + double dzv = 0.0; { dzv = ucell.atoms[it].ncpp.zv; } @@ -525,7 +527,7 @@ void Forces::cal_force_ew(const UnitCell& ucell, } double alpha = 1.1; - double upperbound; + double upperbound = 0.0; do { alpha -= 0.10; @@ -536,8 +538,7 @@ void Forces::cal_force_ew(const UnitCell& ucell, { ModuleBase::WARNING_QUIT("ewald", "Can't find optimal alpha."); } - upperbound = 2.0 * charge * charge * sqrt(2.0 * alpha / ModuleBase::TWO_PI) - * erfc(sqrt(ucell.tpiba2 * rho_basis->ggecut / 4.0 / alpha)); + upperbound = 2.0 * charge * charge * sqrt(2.0 * alpha / ModuleBase::TWO_PI)* ModuleBase::truncated_erfc(sqrt( ucell.tpiba2 * rho_basis->ggecut / 4.0 / alpha)); } while (upperbound > 1.0e-6); const int ig0 = rho_basis->ig_gge0; #pragma omp parallel for @@ -547,7 +548,8 @@ void Forces::cal_force_ew(const UnitCell& ucell, { continue; // skip G=0 } - aux[ig] *= ModuleBase::libm::exp(-1.0 * rho_basis->gg[ig] * ucell.tpiba2 / alpha / 4.0) + aux[ig] *= ModuleBase::truncated_exp + (-1.0 * rho_basis->gg[ig] * ucell.tpiba2 / alpha / 4.0) / (rho_basis->gg[ig] * ucell.tpiba2); } @@ -633,7 +635,7 @@ void Forces::cal_force_ew(const UnitCell& ucell, { const ModuleBase::Vector3 gcar = rho_basis->gcar[ig]; const double arg = ModuleBase::TWO_PI * (gcar * ucell.atoms[it].tau[ia]); - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); double sumnb = -cosp * aux[ig].imag() + sinp * aux[ig].real(); forceion(iat, 0) += gcar[0] * sumnb; @@ -685,7 +687,7 @@ void Forces::cal_force_ew(const UnitCell& ucell, { const double rr = sqrt(r2[n]) * ucell.lat0; - double factor; + double factor = 0.0; { factor = ucell.atoms[T1].ncpp.zv * ucell.atoms[T2].ncpp.zv * ModuleBase::e2 / (rr * rr) diff --git a/source/source_pw/module_pwdft/forces.h b/source/source_pw/module_pwdft/forces.h index e67cac0f24..9730109071 100644 --- a/source/source_pw/module_pwdft/forces.h +++ b/source/source_pw/module_pwdft/forces.h @@ -9,11 +9,12 @@ #include "source_cell/klist.h" #include "source_cell/module_symmetry/symmetry.h" #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_pw/module_pwdft/kernels/force_op.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" #include "structure_factor.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 template class Forces @@ -40,8 +41,9 @@ class Forces const ModulePW::PW_Basis* const rho_basis, ModuleSymmetry::Symmetry* p_symm, Structure_Factor* p_sf, - surchem& solvent, - const pseudopot_cell_vl* locpp, + surchem& solvent, + const Plus_U *p_dftu, //mohan add 2025-11-06 + const pseudopot_cell_vl* locpp, const pseudopot_cell_vnl* nlpp = nullptr, K_Vectors* pkv = nullptr, ModulePW::PW_Basis_K* psi_basis = nullptr, @@ -94,7 +96,9 @@ class Forces const ModuleBase::matrix& wg, const ModulePW::PW_Basis_K* wfc_basis, const UnitCell& ucell_in, - const psi::Psi , Device>* psi_in = nullptr); + const Plus_U &dftu, // mohan add 2025-11-06 + const psi::Psi , Device>* psi_in = nullptr); + void cal_force_scc(ModuleBase::matrix& forcescc, const ModulePW::PW_Basis* const rho_basis, const ModuleBase::matrix& v_current, diff --git a/source/source_pw/module_pwdft/forces_cc.cpp b/source/source_pw/module_pwdft/forces_cc.cpp index a03d49964b..7788ed2af5 100644 --- a/source/source_pw/module_pwdft/forces_cc.cpp +++ b/source/source_pw/module_pwdft/forces_cc.cpp @@ -1,7 +1,7 @@ #include "forces.h" #include "stress_func.h" #include "source_io/module_parameter/parameter.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" // new #include "source_base/complexmatrix.h" #include "source_base/libm/libm.h" @@ -254,7 +254,7 @@ void Forces::deriv_drhoc const UnitCell& ucell_in ) { - int igl0; + int igl0 = 0; double gx = 0, rhocg1 = 0; //double *aux = new double[mesh]; std::vector aux(mesh); diff --git a/source/source_pw/module_pwdft/forces_onsite.cpp b/source/source_pw/module_pwdft/forces_onsite.cpp index e0650ccc36..9d93e9ef54 100644 --- a/source/source_pw/module_pwdft/forces_onsite.cpp +++ b/source/source_pw/module_pwdft/forces_onsite.cpp @@ -11,8 +11,9 @@ template void Forces::cal_force_onsite(ModuleBase::matrix& force_onsite, const ModuleBase::matrix& wg, const ModulePW::PW_Basis_K* wfc_basis, - const UnitCell& ucell_in, - const psi::Psi , Device>* psi_in) + const UnitCell& ucell_in, + const Plus_U &dftu, // mohan add 2025-11-06 + const psi::Psi , Device>* psi_in) { ModuleBase::TITLE("Forces", "cal_force_onsite"); if(psi_in == nullptr || wfc_basis == nullptr) @@ -53,12 +54,13 @@ void Forces::cal_force_onsite(ModuleBase::matrix& force_onsite, // force for DFT+U if(PARAM.inp.dft_plus_u) { - auto* dftu = ModuleDFTU::DFTU::get_instance(); - onsite_p->get_fs_tools()->cal_force_dftu(ik, npm, force, dftu->orbital_corr.data(), dftu->get_eff_pot_pw(0), dftu->get_size_eff_pot_pw(), wg.c); + onsite_p->get_fs_tools()->cal_force_dftu(ik, npm, force, + dftu.orbital_corr.data(), dftu.get_eff_pot_pw(0), dftu.get_size_eff_pot_pw(), wg.c); } if(PARAM.inp.sc_mag_switch) { - spinconstrain::SpinConstrain>& sc = spinconstrain::SpinConstrain>::getScInstance(); + spinconstrain::SpinConstrain>& sc = + spinconstrain::SpinConstrain>::getScInstance(); const std::vector>& lambda = sc.get_sc_lambda(); onsite_p->get_fs_tools()->cal_force_dspin(ik, npm, force, lambda.data(), wg.c); } @@ -76,4 +78,4 @@ void Forces::cal_force_onsite(ModuleBase::matrix& force_onsite, template class Forces; #if ((defined __CUDA) || (defined __ROCM)) template class Forces; -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/forces_scc.cpp b/source/source_pw/module_pwdft/forces_scc.cpp index 1484166b4e..7134232416 100644 --- a/source/source_pw/module_pwdft/forces_scc.cpp +++ b/source/source_pw/module_pwdft/forces_scc.cpp @@ -1,5 +1,5 @@ #include "forces.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" #include "stress_func.h" // new #include "source_base/complexmatrix.h" @@ -114,7 +114,7 @@ void Forces::cal_force_scc(ModuleBase::matrix& forcescc, const double rhocgntigg = rhocgnt[rho_basis->ig2igg[ig]]; const double arg = ModuleBase::TWO_PI * (gv * pos); - double sinp, cosp; + double sinp = 0.0, cosp = 0.0; ModuleBase::libm::sincos(arg, &sinp, &cosp); const std::complex cpm = std::complex(sinp, cosp) * conj(psic[ig]); @@ -246,6 +246,7 @@ void Forces::deriv_drhoc_scc(const bool& numeric, delmem_var_op()(r_d); delmem_var_op()(rhoc_d); delmem_var_op()(rab_d); + delmem_var_op()(aux_d); delmem_var_op()(gx_arr_d); delmem_var_op()(drhocg_d); return; diff --git a/source/source_pw/module_pwdft/forces_us.cpp b/source/source_pw/module_pwdft/forces_us.cpp index dd2fbc5f8d..908212ca02 100644 --- a/source/source_pw/module_pwdft/forces_us.cpp +++ b/source/source_pw/module_pwdft/forces_us.cpp @@ -31,7 +31,7 @@ void Forces::cal_force_us(ModuleBase::matrix& forcenl, ModuleBase::matrix forceq(ucell.nat, 3); - ModuleBase::matrix veff = elec.pot->get_effective_v(); + ModuleBase::matrix veff = elec.pot->get_eff_v(); ModuleBase::ComplexMatrix vg(PARAM.inp.nspin, npw); // fourier transform of the total effective potential for (int is = 0; is < PARAM.inp.nspin; is++) @@ -98,19 +98,19 @@ void Forces::cal_force_us(ModuleBase::matrix& forcenl, const double zero = 0; for (int ipol = 0; ipol < 3; ipol++) { - dgemm_(&transa, - &transb, - &nij, - &atom->na, - &dim, - &(ucell.omega), - qgm_data, - &dim, + BlasConnector::gemm(transb, + transa, + atom->na, + nij, + dim, + ucell.omega, &aux1_data[ipol * dim * atom->na], - &dim, - &zero, + dim, + qgm_data, + dim, + zero, &ddeeq(is, ipol, 0, 0), - &nij); + nij); } } @@ -143,4 +143,4 @@ void Forces::cal_force_us(ModuleBase::matrix& forcenl, template class Forces; #if ((defined __CUDA) || (defined __ROCM)) template class Forces; -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/fs_nonlocal_tools.h b/source/source_pw/module_pwdft/fs_nonlocal_tools.h index ffe745f07e..a5307dbace 100644 --- a/source/source_pw/module_pwdft/fs_nonlocal_tools.h +++ b/source/source_pw/module_pwdft/fs_nonlocal_tools.h @@ -5,7 +5,7 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/kernels/stress_op.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" @@ -154,13 +154,13 @@ class FS_Nonlocal_tools Device* ctx = {}; base_device::DEVICE_CPU* cpu_ctx = {}; base_device::AbacusDevice_t device = {}; - int nkb; - int nbands; + int nkb = 0; + int nbands = 0; int max_nh = 0; int max_npw = 0; - int ntype; - bool nondiagonal; + int ntype = 0; + bool nondiagonal = false; int pre_ik_s = -1; int pre_ik_f = -1; diff --git a/source/source_pw/module_pwdft/global.h b/source/source_pw/module_pwdft/global.h deleted file mode 100644 index 5080ddc24d..0000000000 --- a/source/source_pw/module_pwdft/global.h +++ /dev/null @@ -1,272 +0,0 @@ -#ifndef GLOBAL_H -#define GLOBAL_H - -#include "source_base/global_function.h" -#include "source_base/global_variable.h" -#include "source_estate/module_charge/charge_mixing.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" -#include "source_io/restart.h" -#include "source_relax/relax_driver.h" -#ifdef __EXX -#include "source_hamilt/module_xc/exx_info.h" -#include "source_lcao/module_ri/exx_lip.h" -#endif -#include "source_estate/magnetism.h" -#include "source_hamilt/module_xc/xc_functional.h" -#ifdef __CUDA -#include "cublas_v2.h" -#include "cufft.h" - -static const char* _cublasGetErrorString(cublasStatus_t error) -{ - switch (error) - { - case CUBLAS_STATUS_SUCCESS: - return "CUBLAS_STATUS_SUCCESS"; - case CUBLAS_STATUS_NOT_INITIALIZED: - return "CUBLAS_STATUS_NOT_INITIALIZED"; - case CUBLAS_STATUS_ALLOC_FAILED: - return "CUBLAS_STATUS_ALLOC_FAILED"; - case CUBLAS_STATUS_INVALID_VALUE: - return "CUBLAS_STATUS_INVALID_VALUE"; - case CUBLAS_STATUS_ARCH_MISMATCH: - return "CUBLAS_STATUS_ARCH_MISMATCH"; - case CUBLAS_STATUS_MAPPING_ERROR: - return "CUBLAS_STATUS_MAPPING_ERROR"; - case CUBLAS_STATUS_EXECUTION_FAILED: - return "CUBLAS_STATUS_EXECUTION_FAILED"; - case CUBLAS_STATUS_INTERNAL_ERROR: - return "CUBLAS_STATUS_INTERNAL_ERROR"; - } - return ""; -} - -static const char* _cufftGetErrorString(cufftResult_t error) -{ - switch (error) - { - case CUFFT_SUCCESS: - return "CUFFT_SUCCESS"; - case CUFFT_INVALID_PLAN: - return "CUFFT_INVALID_PLAN"; - case CUFFT_ALLOC_FAILED: - return "CUFFT_ALLOC_FAILED"; - case CUFFT_INVALID_TYPE: - return "CUFFT_INVALID_TYPE"; - case CUFFT_INVALID_VALUE: - return "CUFFT_INVALID_VALUE"; - case CUFFT_INTERNAL_ERROR: - return "CUFFT_INTERNAL_ERROR"; - case CUFFT_EXEC_FAILED: - return "CUFFT_EXEC_FAILED"; - case CUFFT_SETUP_FAILED: - return "CUFFT_SETUP_FAILED"; - case CUFFT_INVALID_SIZE: - return "CUFFT_INVALID_SIZE"; - case CUFFT_UNALIGNED_DATA: - return "CUFFT_UNALIGNED_DATA"; - case CUFFT_INCOMPLETE_PARAMETER_LIST: - return "CUFFT_INCOMPLETE_PARAMETER_LIST"; - case CUFFT_INVALID_DEVICE: - return "CUFFT_INVALID_DEVICE"; - case CUFFT_PARSE_ERROR: - return "CUFFT_PARSE_ERROR"; - case CUFFT_NO_WORKSPACE: - return "CUFFT_NO_WORKSPACE"; - case CUFFT_NOT_IMPLEMENTED: - return "CUFFT_NOT_IMPLEMENTED"; - case CUFFT_LICENSE_ERROR: - return "CUFFT_LICENSE_ERROR"; - case CUFFT_NOT_SUPPORTED: - return "CUFFT_NOT_SUPPORTED"; - } - return ""; -} - -#define CHECK_CUDA(func) \ - { \ - cudaError_t status = (func); \ - if (status != cudaSuccess) \ - { \ - printf("In File %s : CUDA API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - cudaGetErrorString(status), status); \ - } \ - } - -#define CHECK_CUBLAS(func) \ - { \ - cublasStatus_t status = (func); \ - if (status != CUBLAS_STATUS_SUCCESS) \ - { \ - printf("In File %s : CUBLAS API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - _cublasGetErrorString(status), status); \ - } \ - } - -#define CHECK_CUSOLVER(func) \ - { \ - cusolverStatus_t status = (func); \ - if (status != CUSOLVER_STATUS_SUCCESS) \ - { \ - printf("In File %s : CUSOLVER API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - _cusolverGetErrorString(status), status); \ - } \ - } - -#define CHECK_CUFFT(func) \ - { \ - cufftResult_t status = (func); \ - if (status != CUFFT_SUCCESS) \ - { \ - printf("In File %s : CUFFT API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - _cufftGetErrorString(status), status); \ - } \ - } -#endif // __CUDA - -#ifdef __ROCM -#include -#include -#include - -static const char* _hipblasGetErrorString(hipblasStatus_t error) -{ - switch (error) - { - case HIPBLAS_STATUS_SUCCESS: - return "HIPBLAS_STATUS_SUCCESS"; - case HIPBLAS_STATUS_NOT_INITIALIZED: - return "HIPBLAS_STATUS_NOT_INITIALIZED"; - case HIPBLAS_STATUS_ALLOC_FAILED: - return "HIPBLAS_STATUS_ALLOC_FAILED"; - case HIPBLAS_STATUS_INVALID_VALUE: - return "HIPBLAS_STATUS_INVALID_VALUE"; - case HIPBLAS_STATUS_ARCH_MISMATCH: - return "HIPBLAS_STATUS_ARCH_MISMATCH"; - case HIPBLAS_STATUS_MAPPING_ERROR: - return "HIPBLAS_STATUS_MAPPING_ERROR"; - case HIPBLAS_STATUS_EXECUTION_FAILED: - return "HIPBLAS_STATUS_EXECUTION_FAILED"; - case HIPBLAS_STATUS_INTERNAL_ERROR: - return "HIPBLAS_STATUS_INTERNAL_ERROR"; - case HIPBLAS_STATUS_NOT_SUPPORTED: - return "HIPBLAS_STATUS_NOT_SUPPORTED"; - case HIPBLAS_STATUS_HANDLE_IS_NULLPTR: - return "HIPBLAS_STATUS_HANDLE_IS_NULLPTR"; - default: - return ""; - } - return ""; -} - -// static const char *_rocsolverGetErrorString(rocsolver_status error) -// { -// switch (error) -// { -// // case ROCSOLVER_STATUS_SUCCESS: -// // return "CUSOLVER_STATUS_SUCCESS"; -// } -// return ""; -// } - -static const char* _hipfftGetErrorString(hipfftResult_t error) -{ - switch (error) - { - case HIPFFT_SUCCESS: - return "HIPFFT_SUCCESS"; - case HIPFFT_INVALID_PLAN: - return "HIPFFT_INVALID_PLAN"; - case HIPFFT_ALLOC_FAILED: - return "HIPFFT_ALLOC_FAILED"; - case HIPFFT_INVALID_TYPE: - return "HIPFFT_INVALID_TYPE"; - case HIPFFT_INVALID_VALUE: - return "HIPFFT_INVALID_VALUE"; - case HIPFFT_INTERNAL_ERROR: - return "HIPFFT_INTERNAL_ERROR"; - case HIPFFT_EXEC_FAILED: - return "HIPFFT_EXEC_FAILED"; - case HIPFFT_SETUP_FAILED: - return "HIPFFT_SETUP_FAILED"; - case HIPFFT_INVALID_SIZE: - return "HIPFFT_INVALID_SIZE"; - case HIPFFT_UNALIGNED_DATA: - return "HIPFFT_UNALIGNED_DATA"; - case HIPFFT_INCOMPLETE_PARAMETER_LIST: - return "HIPFFT_INCOMPLETE_PARAMETER_LIST"; - case HIPFFT_INVALID_DEVICE: - return "HIPFFT_INVALID_DEVICE"; - case HIPFFT_PARSE_ERROR: - return "HIPFFT_PARSE_ERROR"; - case HIPFFT_NO_WORKSPACE: - return "HIPFFT_NO_WORKSPACE"; - case HIPFFT_NOT_IMPLEMENTED: - return "HIPFFT_NOT_IMPLEMENTED"; - case HIPFFT_NOT_SUPPORTED: - return "HIPFFT_NOT_SUPPORTED"; - } - return ""; -} - -#define CHECK_CUDA(func) \ - { \ - hipError_t status = (func); \ - if (status != hipSuccess) \ - { \ - printf("In File %s : HIP API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - hipGetErrorString(status), status); \ - } \ - } - -#define CHECK_CUBLAS(func) \ - { \ - hipblasStatus_t status = (func); \ - if (status != HIPBLAS_STATUS_SUCCESS) \ - { \ - printf("In File %s : HIPBLAS API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - _hipblasGetErrorString(status), status); \ - } \ - } - -// #define CHECK_CUSOLVER(func)\ -// {\ -// rocsolver_status status = (func);\ -// if(status != CUSOLVER_STATUS_SUCCESS)\ -// {\ -// printf("In File %s : CUSOLVER API failed at line %d with error: %s (%d)\n",\ -// __FILE__, __LINE__, _rocsolverGetErrorString(status), status);\ -// }\ -// } - -#define CHECK_CUFFT(func) \ - { \ - hipfftResult_t status = (func); \ - if (status != HIPFFT_SUCCESS) \ - { \ - printf("In File %s : HIPFFT API failed at line %d with error: %s (%d)\n", __FILE__, __LINE__, \ - _hipfftGetErrorString(status), status); \ - } \ - } -#endif // __ROCM - -//========================================================== -// EXPLAIN : define "GLOBAL CLASS" -//========================================================== -namespace GlobalC -{ -//#ifdef __EXX - extern Exx_Info exx_info; -//#endif -} // namespace GlobalC - -#include "source_cell/parallel_kpoints.h" -#include "source_cell/unitcell.h" -namespace GlobalC -{ -extern Restart restart; // Peize Lin add 2020.04.04 -} // namespace GlobalC - -// extern Magnetism mag; - -#endif diff --git a/source/source_pw/module_pwdft/hamilt_lcaopw.h b/source/source_pw/module_pwdft/hamilt_lcaopw.h index 63d6c7c5f3..a5b2cedb6e 100644 --- a/source/source_pw/module_pwdft/hamilt_lcaopw.h +++ b/source/source_pw/module_pwdft/hamilt_lcaopw.h @@ -18,7 +18,7 @@ namespace hamilt K_Vectors* p_kv, pseudopot_cell_vnl* nlpp, const UnitCell* ucell) - : HamiltPW(pot_in, wfc_basis, p_kv, nlpp,ucell){}; + : HamiltPW(pot_in, wfc_basis, p_kv, nlpp, nullptr, ucell){}; #ifdef __EXX HamiltLIP(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, @@ -26,11 +26,12 @@ namespace hamilt pseudopot_cell_vnl* nlpp, const UnitCell* ucell, Exx_Lip& exx_lip_in) - : HamiltPW(pot_in, wfc_basis, p_kv, nlpp,ucell), exx_lip(exx_lip_in){}; + : HamiltPW(pot_in, wfc_basis, p_kv, nlpp, nullptr, ucell), + exx_lip(exx_lip_in){}; Exx_Lip& exx_lip; #endif }; } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/hamilt_pw.cpp b/source/source_pw/module_pwdft/hamilt_pw.cpp index a48f230bdc..27a56cbe11 100644 --- a/source/source_pw/module_pwdft/hamilt_pw.cpp +++ b/source/source_pw/module_pwdft/hamilt_pw.cpp @@ -3,16 +3,14 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/global_function.h" #include "source_base/global_variable.h" -#include "source_pw/module_pwdft/global.h" - -#include "operator_pw/veff_pw.h" -#include "operator_pw/ekinetic_pw.h" -#include "operator_pw/meta_pw.h" -#include "operator_pw/nonlocal_pw.h" -#include "operator_pw/onsite_proj_pw.h" -#include "operator_pw/op_exx_pw.h" - +#include "op_pw_veff.h" +#include "op_pw_ekin.h" +#include "op_pw_meta.h" +#include "op_pw_nl.h" +#include "op_pw_proj.h" +#include "op_pw_exx.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info namespace hamilt { @@ -22,6 +20,7 @@ HamiltPW::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* pkv, pseudopot_cell_vnl* nlpp, + Plus_U* p_dftu, // mohan add 2025-11-06 const UnitCell* ucell): ucell(ucell) { this->classname = "HamiltPW"; @@ -73,6 +72,10 @@ HamiltPW::HamiltPW(elecstate::Potential* pot_in, { pot_register_in.push_back("gatefield"); } + if (PARAM.inp.ml_exx) // sunliang + { + pot_register_in.push_back("ml_exx"); + } // DFT-1/2 if (PARAM.inp.dfthalf_type == 1) { pot_register_in.push_back("dfthalf"); @@ -120,7 +123,8 @@ HamiltPW::HamiltPW(elecstate::Potential* pot_in, if(PARAM.inp.sc_mag_switch || PARAM.inp.dft_plus_u) { Operator* onsite_proj - = new OnsiteProj>(isk, ucell, PARAM.inp.sc_mag_switch, (PARAM.inp.dft_plus_u>0)); + = new OnsiteProj>(isk, ucell, p_dftu, + PARAM.inp.sc_mag_switch, (PARAM.inp.dft_plus_u>0)); this->ops->add(onsite_proj); } if (GlobalC::exx_info.info_global.cal_exx) diff --git a/source/source_pw/module_pwdft/hamilt_pw.h b/source/source_pw/module_pwdft/hamilt_pw.h index 34c51c78fd..d3411c54f4 100644 --- a/source/source_pw/module_pwdft/hamilt_pw.h +++ b/source/source_pw/module_pwdft/hamilt_pw.h @@ -6,9 +6,10 @@ #include "source_estate/module_pot/potential_new.h" #include "source_esolver/esolver_ks_pw.h" #include "source_hamilt/hamilt.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_base/kernels/math_kernel_op.h" -#include "source_pw/module_pwdft/module_exx_helper/exx_helper.h" +#include "source_pw/module_pwdft/exx_helper.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 namespace hamilt { @@ -21,10 +22,19 @@ class HamiltPW : public Hamilt // return T if T is real type(float, double), // otherwise return the real type of T(complex, std::complex) using Real = typename GetTypeReal::type; + public: - HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* p_kv, pseudopot_cell_vnl* nlpp,const UnitCell* ucell); + + HamiltPW(elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* p_kv, + pseudopot_cell_vnl* nlpp, + Plus_U *p_dftu, // mohan add 2025-11-06 + const UnitCell* ucell); + template explicit HamiltPW(const HamiltPW* hamilt); + ~HamiltPW(); // for target K point, update consequence of hPsi() and matrix() @@ -58,4 +68,4 @@ class HamiltPW : public Hamilt } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/kernels/cuda/ekinetic_op.cu b/source/source_pw/module_pwdft/kernels/cuda/ekinetic_op.cu index 8eca104dfe..ba3e29b80c 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/ekinetic_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/ekinetic_op.cu @@ -61,7 +61,7 @@ void hamilt::ekinetic_pw_op::operator()(const b reinterpret_cast*>(tmhpsi), // array of data reinterpret_cast*>(tmpsi_in)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct ekinetic_pw_op; diff --git a/source/source_pw/module_pwdft/kernels/cuda/exx_cal_energy_op.cu b/source/source_pw/module_pwdft/kernels/cuda/exx_cal_energy_op.cu index 188173e5e5..5aff3f46e9 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/exx_cal_energy_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/exx_cal_energy_op.cu @@ -3,6 +3,7 @@ #include #include "source_base/module_device/device.h" +#include "source_base/module_device/kernel_compat.h" namespace hamilt { diff --git a/source/source_pw/module_pwdft/kernels/cuda/force_op.cu b/source/source_pw/module_pwdft/kernels/cuda/force_op.cu index 958e9d353e..1466ba47ac 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/force_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/force_op.cu @@ -2,6 +2,7 @@ // #include "source_psi/kernels/device.h" #include "source_base/module_device/types.h" #include "source_base/constants.h" +#include "source_base/module_device/kernel_compat.h" #include @@ -157,7 +158,7 @@ void cal_vkb1_nl_op::operator()(const base_devi gcar,// array of data reinterpret_cast*>(vkb1)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -196,7 +197,7 @@ void cal_force_nl_op::operator()(const base_dev reinterpret_cast*>(dbecp), force);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -314,7 +315,7 @@ void cal_force_nl_op::operator()(const base_dev reinterpret_cast*>(dbecp), force);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -480,7 +481,7 @@ void cal_force_nl_op::operator()(const base_dev reinterpret_cast*>(dbecp), force); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } // kernel for DeltaSpin force template @@ -517,7 +518,7 @@ void cal_force_nl_op::operator()(const base_dev reinterpret_cast*>(dbecp), force); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -564,7 +565,7 @@ void saveVkbValues( npw, ipol, npwx); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -614,7 +615,7 @@ void revertVkbValues( ipol, npwx, static_cast>(coeff)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template diff --git a/source/source_pw/module_pwdft/kernels/cuda/meta_op.cu b/source/source_pw/module_pwdft/kernels/cuda/meta_op.cu index b0f164f55a..19b0f60b2d 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/meta_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/meta_op.cu @@ -59,7 +59,7 @@ void meta_pw_op::operator()(const base_device:: reinterpret_cast * >(out), add); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct meta_pw_op; diff --git a/source/source_pw/module_pwdft/kernels/cuda/nonlocal_op.cu b/source/source_pw/module_pwdft/kernels/cuda/nonlocal_op.cu index 57da0d6a0a..c02fc785e2 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/nonlocal_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/nonlocal_op.cu @@ -99,7 +99,7 @@ void hamilt::nonlocal_pw_op::operator()(const b reinterpret_cast*>(ps), // array of data reinterpret_cast*>(becp)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); iat += l1; sum += l1 * l3; } @@ -129,7 +129,7 @@ void hamilt::nonlocal_pw_op::operator()(const b reinterpret_cast*>(ps), // array of data reinterpret_cast*>(becp)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); iat += l1; sum += l1 * l3; // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/source/source_pw/module_pwdft/kernels/cuda/onsite_op.cu b/source/source_pw/module_pwdft/kernels/cuda/onsite_op.cu index d8306e767e..68aee02047 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/onsite_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/onsite_op.cu @@ -94,7 +94,7 @@ void hamilt::onsite_ps_op::operator()(const bas reinterpret_cast*>(ps), // array of data reinterpret_cast*>(becp)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -124,7 +124,7 @@ void hamilt::onsite_ps_op::operator()(const bas reinterpret_cast*>(ps), // array of data reinterpret_cast*>(becp)); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } diff --git a/source/source_pw/module_pwdft/kernels/cuda/stress_op.cu b/source/source_pw/module_pwdft/kernels/cuda/stress_op.cu index 3a99248e05..58a8e219e5 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/stress_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/stress_op.cu @@ -1,12 +1,13 @@ #include "source_pw/module_pwdft/kernels/stress_op.h" #include "source_base/constants.h" #include "source_base/module_device/device.h" +#include "source_base/module_device/kernel_compat.h" #include "vnl_tools_cu.hpp" #include "source_base/module_device/types.h" #include #include -#include +#include "source_base/module_device/device_check.h" #include @@ -242,7 +243,7 @@ void cal_dbecp_noevc_nl_op::operator()(const ba reinterpret_cast*>(vkb2), reinterpret_cast*>(dbecp_noevc)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -289,7 +290,7 @@ void cal_stress_nl_op::operator()(const base_de reinterpret_cast*>(dbecp), stress);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -412,7 +413,7 @@ void cal_stress_nl_op::operator()(const base_de reinterpret_cast*>(dbecp), stress);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -433,7 +434,7 @@ FPTYPE cal_multi_dot_op::operator()(const int& cudaMemcpy(&sum, d_sum, sizeof(FPTYPE) * 1, cudaMemcpyDeviceToHost); cudaFree(d_sum); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); return sum; } @@ -450,7 +451,7 @@ void cal_stress_mgga_op::operator()( cal_stress_mgga<<>>( spin, nrxx, w1, gradwfc_, crosstaus); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } @@ -912,7 +913,7 @@ void pointer_array_malloc::operator()( const int n ) { - cudaErrcheck(cudaMalloc(ptr, n * sizeof(void*))); + CHECK_CUDA(cudaMalloc(ptr, n * sizeof(void*))); } template struct pointer_array_malloc; @@ -1073,7 +1074,7 @@ void cal_stress_nl_op::operator()(const base_de reinterpret_cast*>(dbecp), stress);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } // kernel for DeltaSpin stress template @@ -1104,7 +1105,7 @@ void cal_stress_nl_op::operator()(const base_de reinterpret_cast*>(dbecp), stress);// array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct synchronize_ptrs; diff --git a/source/source_pw/module_pwdft/kernels/cuda/veff_op.cu b/source/source_pw/module_pwdft/kernels/cuda/veff_op.cu index f4eb37e5ac..708b49ec8e 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/veff_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/veff_op.cu @@ -52,7 +52,7 @@ void veff_pw_op::operator()(const base_device:: reinterpret_cast*>(out), // array of data in); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template @@ -69,7 +69,7 @@ void veff_pw_op::operator()(const base_device:: reinterpret_cast*>(out1), // array of data in[0]); // array of data - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct veff_pw_op; diff --git a/source/source_pw/module_pwdft/kernels/cuda/vnl_op.cu b/source/source_pw/module_pwdft/kernels/cuda/vnl_op.cu index e4b2278feb..689b958282 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/vnl_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/vnl_op.cu @@ -108,7 +108,7 @@ void cal_vnl_op::operator() ( reinterpret_cast*>(sk), reinterpret_cast*>(vkb_in)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct cal_vnl_op; diff --git a/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu b/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu index b1b29ac03c..a5ab6cc087 100644 --- a/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu +++ b/source/source_pw/module_pwdft/kernels/cuda/wf_op.cu @@ -114,7 +114,7 @@ void cal_sk_op::operator()(const base_device::D reinterpret_cast*>(eigts3), reinterpret_cast*>(sk)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct cal_sk_op; diff --git a/source/source_pw/module_pwdft/kernels/force_op.cpp b/source/source_pw/module_pwdft/kernels/force_op.cpp index 029afdbf7c..0e0c34ccdd 100644 --- a/source/source_pw/module_pwdft/kernels/force_op.cpp +++ b/source/source_pw/module_pwdft/kernels/force_op.cpp @@ -1,5 +1,7 @@ #include "source_pw/module_pwdft/kernels/force_op.h" +#include "source_base/truncated_func.h" + #ifdef _OPENMP #include #endif @@ -109,9 +111,12 @@ struct cal_force_nl_op for (int ipol = 0; ipol < 3; ipol++) { - const FPTYPE dbb - = (conj(dbecp[ipol * nbands * nkb + ib * nkb + inkb]) * becp[ib * nkb + inkb]) - .real(); +#ifdef __SW + ModuleBase::truncated_underflow(dbecp[ipol * nbands * nkb + ib * nkb + inkb]); + ModuleBase::truncated_underflow(becp[ib * nkb + inkb]); + ModuleBase::truncated_underflow(local_force[ipol]); +#endif + const FPTYPE dbb = (conj(dbecp[ipol * nbands * nkb + ib * nkb + inkb]) * becp[ib * nkb + inkb]).real(); local_force[ipol] -= ps * fac * dbb; // cf[iat*3+ipol] += ps * fac * dbb; } diff --git a/source/source_pw/module_pwdft/kernels/stress_op.cpp b/source/source_pw/module_pwdft/kernels/stress_op.cpp index 46fccdeed6..6034a52710 100644 --- a/source/source_pw/module_pwdft/kernels/stress_op.cpp +++ b/source/source_pw/module_pwdft/kernels/stress_op.cpp @@ -1,5 +1,6 @@ #include "source_pw/module_pwdft/kernels/stress_op.h" +#include "source_base/truncated_func.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" #include "source_base/math_polyint.h" @@ -140,8 +141,10 @@ struct cal_stress_nl_op FPTYPE ps = deeq[((spin * deeq_2 + iat + ia) * deeq_3 + ip1) * deeq_4 + ip2] + ps_qq; const int inkb1 = sum + ia * nproj + ip1; const int inkb2 = sum + ia * nproj + ip2; - // out<<"\n ps = "< { { rhocg1 *= ModuleBase::FOUR_PI / omega / 2.0 / gx_arr[igl]; FPTYPE g2a = (gx_arr[igl]*gx_arr[igl]) / 4.0; - rhocg1 += ModuleBase::FOUR_PI / omega * gx_arr[ngg] * ModuleBase::libm::exp(-g2a) * (g2a + 1) + rhocg1 += ModuleBase::FOUR_PI / omega * gx_arr[ngg] * + ModuleBase::truncated_exp(-g2a) * (g2a + 1) / pow(gx_arr[igl] * gx_arr[igl], 2); drhocg [igl] = rhocg1; } @@ -644,6 +648,9 @@ struct cal_multi_dot_op { #endif for (int i = 0; i < npw; i++) { +#ifdef __SW + ModuleBase::truncated_underflow(psi[i]); +#endif sum += fac * gk1[i] * gk2[i] * d_kfac[i] * std::norm(psi[i]); } return sum; diff --git a/source/source_pw/module_pwdft/kernels/veff_op.cpp b/source/source_pw/module_pwdft/kernels/veff_op.cpp index 23646e9608..e8f4b18b3a 100644 --- a/source/source_pw/module_pwdft/kernels/veff_op.cpp +++ b/source/source_pw/module_pwdft/kernels/veff_op.cpp @@ -8,7 +8,7 @@ struct veff_pw_op void operator()(const base_device::DEVICE_CPU* dev, const int& size, std::complex* out, const FPTYPE* in) { #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096/sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ir = 0; ir < size; ++ir) { diff --git a/source/source_pw/module_pwdft/nonlocal_maths.hpp b/source/source_pw/module_pwdft/nonlocal_maths.hpp index 07cd28de2d..3e09675bcb 100644 --- a/source/source_pw/module_pwdft/nonlocal_maths.hpp +++ b/source/source_pw/module_pwdft/nonlocal_maths.hpp @@ -5,7 +5,7 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/kernels/stress_op.h" #include "source_base/kernels/math_kernel_op.h" @@ -33,7 +33,7 @@ class Nonlocal_maths private: ModuleBase::matrix nhtol_; - int lmax_; + int lmax_ = 0; const UnitCell* ucell_; Device* ctx = {}; diff --git a/source/source_pw/module_pwdft/onsite_proj_tools.h b/source/source_pw/module_pwdft/onsite_proj_tools.h index a8b7a56b8e..de5a0cce43 100644 --- a/source/source_pw/module_pwdft/onsite_proj_tools.h +++ b/source/source_pw/module_pwdft/onsite_proj_tools.h @@ -5,7 +5,7 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/kernels/stress_op.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" @@ -104,8 +104,8 @@ class Onsite_Proj_tools Device* ctx = {}; base_device::DEVICE_CPU* cpu_ctx = {}; base_device::AbacusDevice_t device = {}; - int nkb; - int nbands; + int nkb = 0; + int nbands = 0; int deeq_dims[4] = {0, 0, 0, 0}; // deeq can be something other than that in pseudopotentials int deeq_nc_dims[4] = {0, 0, 0, 0}; @@ -113,8 +113,8 @@ class Onsite_Proj_tools int max_nh = 0; int max_npw = 0; - int ntype; - bool nondiagonal; + int ntype = 0; + bool nondiagonal = false; int pre_ik_s = -1; int pre_ik_f = -1; diff --git a/source/source_pw/module_pwdft/onsite_projector.cpp b/source/source_pw/module_pwdft/onsite_projector.cpp index 4c03ce9b74..f9b8ad7cbc 100644 --- a/source/source_pw/module_pwdft/onsite_projector.cpp +++ b/source/source_pw/module_pwdft/onsite_projector.cpp @@ -503,7 +503,7 @@ void projectors::OnsiteProjector::read_abacus_orb(std::ifstream& ifs, { if (rank == 0) { - int l, izeta; + int l = 0, izeta = 0; ifs >> tmp >> tmp >> tmp; ifs >> tmp >> l >> izeta; ichi = radial_map_[l][izeta]; diff --git a/source/source_pw/module_pwdft/operator_pw/operator_pw.cpp b/source/source_pw/module_pwdft/op_pw.cpp similarity index 89% rename from source/source_pw/module_pwdft/operator_pw/operator_pw.cpp rename to source/source_pw/module_pwdft/op_pw.cpp index 331545a3a3..b4289bc023 100644 --- a/source/source_pw/module_pwdft/operator_pw/operator_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw.cpp @@ -1,6 +1,6 @@ #include "source_base/timer.h" #include "source_hamilt/operator.h" -#include "source_pw/module_pwdft/operator_pw/operator_pw.h" +#include "op_pw.h" using namespace hamilt; diff --git a/source/source_pw/module_pwdft/operator_pw/operator_pw.h b/source/source_pw/module_pwdft/op_pw.h similarity index 100% rename from source/source_pw/module_pwdft/operator_pw/operator_pw.h rename to source/source_pw/module_pwdft/op_pw.h diff --git a/source/source_pw/module_pwdft/operator_pw/ekinetic_pw.cpp b/source/source_pw/module_pwdft/op_pw_ekin.cpp similarity index 77% rename from source/source_pw/module_pwdft/operator_pw/ekinetic_pw.cpp rename to source/source_pw/module_pwdft/op_pw_ekin.cpp index c776863089..05d28266fd 100644 --- a/source/source_pw/module_pwdft/operator_pw/ekinetic_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_ekin.cpp @@ -1,11 +1,8 @@ -#include "ekinetic_pw.h" - +#include "op_pw_ekin.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" - #include "source_base/module_device/device.h" - namespace hamilt { template @@ -22,7 +19,8 @@ Ekinetic>::Ekinetic( this->gk2_row = gk2_row; this->gk2_col = gk2_col; this->device = base_device::get_device_type(this->ctx); - if( this->tpiba2 < 1e-10 || this->gk2 == nullptr) { + if( this->tpiba2 < 1e-10 || this->gk2 == nullptr) + { ModuleBase::WARNING_QUIT("EkineticPW", "Constuctor of Operator::EkineticPW is failed, please check your code!"); } } @@ -77,16 +75,8 @@ hamilt::Ekinetic>::Ekinetic(const Ekinetic, base_device::DEVICE_CPU>>; template class Ekinetic, base_device::DEVICE_CPU>>; -// template Ekinetic, base_device::DEVICE_CPU>>::Ekinetic(const -// Ekinetic, base_device::DEVICE_CPU>> *ekinetic); #if ((defined __CUDA) || (defined __ROCM)) template class Ekinetic, base_device::DEVICE_GPU>>; template class Ekinetic, base_device::DEVICE_GPU>>; -// template Ekinetic, base_device::DEVICE_CPU>>::Ekinetic(const -// Ekinetic, base_device::DEVICE_GPU>> *ekinetic); template -// Ekinetic, base_device::DEVICE_GPU>>::Ekinetic(const -// Ekinetic, base_device::DEVICE_CPU>> *ekinetic); template -// Ekinetic, base_device::DEVICE_GPU>>::Ekinetic(const -// Ekinetic, base_device::DEVICE_GPU>> *ekinetic); #endif -} // namespace hamilt \ No newline at end of file +} // namespace hamilt diff --git a/source/source_pw/module_pwdft/operator_pw/ekinetic_pw.h b/source/source_pw/module_pwdft/op_pw_ekin.h similarity index 98% rename from source/source_pw/module_pwdft/operator_pw/ekinetic_pw.h rename to source/source_pw/module_pwdft/op_pw_ekin.h index e5b6281fa9..adfb67eb7e 100644 --- a/source/source_pw/module_pwdft/operator_pw/ekinetic_pw.h +++ b/source/source_pw/module_pwdft/op_pw_ekin.h @@ -1,7 +1,7 @@ #ifndef EKINETICPW_H #define EKINETICPW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_pw/module_pwdft/kernels/ekinetic_op.h" #include diff --git a/source/source_pw/module_pwdft/operator_pw/op_exx_pw.cpp b/source/source_pw/module_pwdft/op_pw_exx.cpp similarity index 75% rename from source/source_pw/module_pwdft/operator_pw/op_exx_pw.cpp rename to source/source_pw/module_pwdft/op_pw_exx.cpp index 404c660877..be29938057 100644 --- a/source/source_pw/module_pwdft/operator_pw/op_exx_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_exx.cpp @@ -1,8 +1,9 @@ -#include "op_exx_pw.h" +#include "op_pw_exx.h" #include "source_base/constants.h" #include "source_base/global_variable.h" #include "source_base/parallel_common.h" +#include "source_base/parallel_comm.h" // use KP_WORLD #include "source_base/parallel_reduce.h" #include "source_base/module_external/lapack_connector.h" #include "source_base/timer.h" @@ -10,11 +11,12 @@ #include "source_cell/klist.h" #include "source_hamilt/operator.h" #include "source_psi/psi.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/kernels/cal_density_real_op.h" #include "source_pw/module_pwdft/kernels/exx_cal_energy_op.h" #include "source_pw/module_pwdft/kernels/mul_potential_op.h" #include "source_pw/module_pwdft/kernels/vec_mul_vec_complex_op.h" +#include "source_io/module_parameter/parameter.h" // use PARAM +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info #include #include @@ -37,6 +39,11 @@ OperatorEXXPW::OperatorEXXPW(const int* isk_in, const UnitCell *ucell) : isk(isk_in), wfcpw(wfcpw_in), rhopw(rhopw_in), kv(kv_in), ucell(ucell) { + if (GlobalV::KPAR != 1 && PARAM.inp.exxace == false) + { + // GlobalV::ofs_running << "EXX Calculation does not support k-point parallelism" << std::endl; + ModuleBase::WARNING_QUIT("OperatorEXXPW", "EXX Calculation does not support k-point parallelism when exxace is set to false"); + } gamma_extrapolation = PARAM.inp.exx_gamma_extrapolation; bool is_mp = kv_in->get_is_mp(); #ifdef __MPI @@ -46,11 +53,6 @@ OperatorEXXPW::OperatorEXXPW(const int* isk_in, { gamma_extrapolation = false; } - if (GlobalV::KPAR != 1) - { - // GlobalV::ofs_running << "EXX Calculation does not support k-point parallelism" << std::endl; - ModuleBase::WARNING_QUIT("OperatorEXXPW", "EXX Calculation does not support k-point parallelism"); - } this->classname = "OperatorEXXPW"; this->ctx = nullptr; @@ -76,15 +78,22 @@ OperatorEXXPW::OperatorEXXPW(const int* isk_in, tpiba = ucell->tpiba; Real tpiba2 = tpiba * tpiba; + // initialize rhopw_dev + double ecut_exx = PARAM.inp.ecutexx; + if (ecut_exx == 0.0) + { + ecut_exx = PARAM.inp.ecutrho; + } + rhopw_dev = new ModulePW::PW_Basis(wfcpw->get_device(), rhopw->get_precision()); rhopw_dev->fft_bundle.setfft(wfcpw->get_device(), rhopw->get_precision()); #ifdef __MPI rhopw_dev->initmpi(rhopw->poolnproc, rhopw->poolrank, rhopw->pool_world); #endif // here we can actually use different ecut to init the grids - rhopw_dev->initgrids(rhopw->lat0, rhopw->latvec, rhopw->gridecut_lat * rhopw->tpiba2); + rhopw_dev->initgrids(rhopw->lat0, rhopw->latvec, ecut_exx); rhopw_dev->initgrids(rhopw->lat0, rhopw->latvec, rhopw->nx, rhopw->ny, rhopw->nz); - rhopw_dev->initparameters(rhopw->gamma_only, rhopw->ggecut * rhopw->tpiba2, rhopw->distribution_type, rhopw->xprime); + rhopw_dev->initparameters(rhopw->gamma_only, ecut_exx, rhopw->distribution_type, rhopw->xprime); rhopw_dev->setuptransform(); rhopw_dev->collect_local_pw(); @@ -167,6 +176,9 @@ void OperatorEXXPW::act(const int nbands, const bool is_first_node) const { if (first_iter) return; + // std::cout << cal_exx_energy_ace(&psi) << " EXX energy" << std::endl; + // MPI_Abort(MPI_COMM_WORLD, 0); + // return; if (is_first_node) { @@ -192,27 +204,23 @@ void OperatorEXXPW::act_op(const int nbands, const int ngk_ik, const bool is_first_node) const { -// std::cout << "nbands: " << nbands -// << " nbasis: " << nbasis -// << " npol: " << npol -// << " ngk_ik: " << ngk_ik -// << " is_first_node: " << is_first_node -// << std::endl; - // get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, ik, iq); - -// set_psi(&p_exx_helper->psi); - ModuleBase::timer::tick("OperatorEXXPW", "act_op"); setmem_complex_op()(h_psi_recip, 0, wfcpw->npwk_max); setmem_complex_op()(h_psi_real, 0, rhopw_dev->nrxx); setmem_complex_op()(density_real, 0, rhopw_dev->nrxx); setmem_complex_op()(density_recip, 0, rhopw_dev->npw); - // setmem_complex_op()(psi_all_real, 0, wfcpw->nrxx * GlobalV::NBANDS); - // std::map, bool> has_real; setmem_complex_op()(psi_nk_real, 0, wfcpw->nrxx); setmem_complex_op()(psi_mq_real, 0, wfcpw->nrxx); + auto q_points = get_q_points(this->ik); + // std::cout << "kpoint " << this->ik << ", qpoints: "; + // for (auto iq: q_points) + // std::cout << iq << ", "; + // std::cout << std::endl; + int nk_fac = PARAM.inp.nspin == 2 ? 2 : 1; + int nk = wfcpw->nks / nk_fac; + // ik fixed here, select band n for (int n_iband = 0; n_iband < nbands; n_iband++) { @@ -221,12 +229,11 @@ void OperatorEXXPW::act_op(const int nbands, wfcpw->recip_to_real(ctx, psi_nk, psi_nk_real, this->ik); // for \psi_nk, get the pw of iq and band m - auto q_points = get_q_points(this->ik); + Real nqs = q_points.size(); for (int iq: q_points) { - get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, this->ik, iq); -// std::cout << "ik" << this->ik << " iq" << iq << std::endl; + get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, this->ik, iq % nk); for (int m_iband = 0; m_iband < psi.get_nbands(); m_iband++) { // double wg_mqb_real = GlobalC::exx_helper.wg(iq, m_iband); @@ -243,14 +250,10 @@ void OperatorEXXPW::act_op(const int nbands, // direct multiplication in real space, \psi_nk(r) * \psi_mq(r) cal_density_recip(psi_nk_real, psi_mq_real, ucell->omega); - // bring the density to recip space - // rhopw->real2recip(density_real, density_recip); - // multiply the density with the potential in recip space multiply_potential(density_recip, this->ik, iq); // bring the potential back to real space - // rhopw_dev->recip2real(density_recip, density_real); rho_recip2real(density_recip, density_real); if (false) @@ -263,7 +266,6 @@ void OperatorEXXPW::act_op(const int nbands, } T wk_iq = kv->wk[iq]; - T wk_ik = kv->wk[this->ik]; T tmp_scalar = wg_mqb / wk_iq / nqs; axpy_complex_op()(wfcpw->nrxx, @@ -290,6 +292,134 @@ void OperatorEXXPW::act_op(const int nbands, } +template +void OperatorEXXPW::act_op_kpar(const int nbands, + const int nbasis, + const int npol, + const T *tmpsi_in, + T *tmhpsi, + const int ngk_ik, + const bool is_first_node) const +{ + ModuleBase::timer::tick("OperatorEXXPW", "act_op_kpar"); + + setmem_complex_op()(h_psi_recip, 0, wfcpw->npwk_max); + setmem_complex_op()(h_psi_real, 0, rhopw_dev->nrxx); + setmem_complex_op()(density_real, 0, rhopw_dev->nrxx); + setmem_complex_op()(density_recip, 0, rhopw_dev->npw); + // setmem_complex_op()(psi_all_real, 0, wfcpw->nrxx * GlobalV::NBANDS); + // std::map, bool> has_real; + setmem_complex_op()(psi_nk_real, 0, wfcpw->nrxx); + setmem_complex_op()(psi_mq_real, 0, wfcpw->nrxx); + int nqs = kv->get_nkstot_full(); + int nspin_fac = PARAM.inp.nspin == 2 ? 2 : 1; + int ispin = this->ik < (wfcpw->nks / nspin_fac) ? 0 : 1; + + // ik fixed here, select band n + for (int iq = 0; iq < nqs; iq++) + { + // for \psi_nk, get the pw of iq and band m + get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, this->ik, iq); + + // decide which pool does the iq belong to + int iq_pool = kv->para_k.whichpool[iq]; + int iq_loc = iq - kv->para_k.startk_pool[iq_pool]; + int iq_loc_spin = iq_loc; + if (ispin == 1) + { + iq_loc_spin += wfcpw->nks / nspin_fac; + } + + for (int m_iband = 0; m_iband < psi.get_nbands(); m_iband++) + { + double wg_mqb = 0; + if (iq_pool == GlobalV::MY_POOL) + { + wg_mqb = (*wg)(iq_loc_spin, m_iband); + } +#ifdef __MPI + MPI_Bcast(&wg_mqb, 1, MPI_DOUBLE, kv->para_k.get_startpro_pool(iq_pool), MPI_COMM_WORLD); +#endif + if (wg_mqb < 1e-12) + continue; + + if (iq_pool == GlobalV::MY_POOL) + { + const T* psi_mq = get_pw(m_iband, iq_loc_spin); + wfcpw->recip_to_real(ctx, psi_mq, psi_mq_real, iq_loc); + // send + } +#ifdef __MPI +#ifdef __CUDA_MPI + MPI_Bcast(psi_mq_real, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); +#else + if (PARAM.inp.device == "cpu") + { + MPI_Bcast(psi_mq_real, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); + } + else if (PARAM.inp.device == "gpu") + { + // need to copy to cpu first + T* psi_mq_real_cpu = new T[wfcpw->nrxx]; + syncmem_complex_d2c_op()(psi_mq_real_cpu, psi_mq_real, wfcpw->nrxx); + MPI_Bcast(psi_mq_real_cpu, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); + syncmem_complex_c2d_op()(psi_mq_real, psi_mq_real_cpu, wfcpw->nrxx); + delete[] psi_mq_real_cpu; + } + else + { + ModuleBase::WARNING_QUIT("OperatorEXXPW", "construct_ace: unknown device"); + } +#endif +#endif + for (int n_iband = 0; n_iband < nbands; n_iband++) + { + const T* psi_nk = tmpsi_in + n_iband * nbasis; + // retrieve \psi_nk in real space + wfcpw->recip_to_real(ctx, psi_nk, psi_nk_real, this->ik); + + + // direct multiplication in real space, \psi_nk(r) * \psi_mq(r) + cal_density_recip(psi_nk_real, psi_mq_real, ucell->omega); + + mul_potential_op()(pot, density_recip, rhopw_dev->npw, wfcpw->nks, this->ik, iq); + + // bring the potential back to real space + rho_recip2real(density_recip, density_real); + + if (false) + { + // do nothing + } + else + { + vec_mul_vec_complex_op()(density_real, psi_mq_real, density_real, wfcpw->nrxx); + } + + + Real wk_iq = kv->wk[iq]; + Real wk_ik = kv->wk[this->ik]; + + Real tmp_scalar = wg_mqb / wk_ik / nqs; // wk_ik works for now, but wrong for symmetry. + + T* h_psi_nk = tmhpsi + n_iband * nbasis; + Real hybrid_alpha = GlobalC::exx_info.info_global.hybrid_alpha; + wfcpw->real_to_recip(ctx, density_real, h_psi_nk, this->ik, true, hybrid_alpha * tmp_scalar); + + + } // end of m_iband + setmem_complex_op()(density_real, 0, rhopw_dev->nrxx); + setmem_complex_op()(density_recip, 0, rhopw_dev->npw); + setmem_complex_op()(psi_mq_real, 0, wfcpw->nrxx); + + } // end of iq + + } + + ModuleBase::timer::tick("OperatorEXXPW", "act_op_kpar"); + +} + template std::vector OperatorEXXPW::get_q_points(const int ik) const { @@ -440,15 +570,36 @@ double OperatorEXXPW::cal_exx_energy_op(psi::Psi *ppsi_) c // for \psi_nk, get the pw of iq and band m // q_points is a vector of integers, 0 to nks-1 std::vector q_points; - for (int iq = 0; iq < wfcpw->nks; iq++) + if (PARAM.inp.nspin == 1) + { + for (int iq = 0; iq < wfcpw->nks; iq++) + { + q_points.push_back(iq); + } + } + else if (PARAM.inp.nspin == 2) + { + int nk = wfcpw->nks / nk_fac; + int k_spin = ik / nk; + for (int iq = 0; iq < wfcpw->nks; iq++) + { + int q_spin = iq / nk; + if (k_spin == q_spin) + { + q_points.push_back(iq); + } + } + } + else { - q_points.push_back(iq); + ModuleBase::WARNING_QUIT("OperatorEXXPW", "nspin == 4 not supported"); } double nqs = q_points.size(); for (int iq: q_points) { - get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, ik, iq); + int nk = wfcpw->nks / nk_fac; + get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, ik, iq % nk); for (int m_iband = 0; m_iband < psi.get_nbands(); m_iband++) { // double wg_f = GlobalC::exx_helper.wg(iq, m_iband); @@ -468,7 +619,7 @@ double OperatorEXXPW::cal_exx_energy_op(psi::Psi *ppsi_) c int nks = wfcpw->nks; int npw = rhopw_dev->npw; - int nk = nks / nk_fac; + // int nk = nks / nk_fac; Eexx_ik_real += exx_cal_energy_op()(density_recip, pot, wg_iqb_real / nqs * wg_ikb_real / kv->wk[ik], npw); } // m_iband diff --git a/source/source_pw/module_pwdft/operator_pw/op_exx_pw.h b/source/source_pw/module_pwdft/op_pw_exx.h similarity index 96% rename from source/source_pw/module_pwdft/operator_pw/op_exx_pw.h rename to source/source_pw/module_pwdft/op_pw_exx.h index d823eda015..0329de8477 100644 --- a/source/source_pw/module_pwdft/operator_pw/op_exx_pw.h +++ b/source/source_pw/module_pwdft/op_pw_exx.h @@ -1,7 +1,7 @@ #ifndef OPEXXPW_H #define OPEXXPW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_base/kernels/math_kernel_op.h" #include "source_base/macros.h" #include "source_base/matrix.h" @@ -78,6 +78,14 @@ class OperatorEXXPW : public OperatorPW const int ngk_ik = 0, const bool is_first_node = false) const; + void act_op_kpar(const int nbands, + const int nbasis, + const int npol, + const T *tmpsi_in, + T *tmhpsi, + const int ngk_ik = 0, + const bool is_first_node = false) const; + void act_op_ace(const int nbands, const int nbasis, const int npol, diff --git a/source/source_pw/module_pwdft/op_pw_exx_ace.cpp b/source/source_pw/module_pwdft/op_pw_exx_ace.cpp new file mode 100644 index 0000000000..3fdef6cb00 --- /dev/null +++ b/source/source_pw/module_pwdft/op_pw_exx_ace.cpp @@ -0,0 +1,346 @@ +#include "op_pw_exx.h" +#include "source_base/parallel_comm.h" +#include "source_io/module_parameter/parameter.h" +#include "source_hamilt/module_xc/exx_info.h" + +namespace hamilt +{ +template +void OperatorEXXPW::act_op_ace(const int nbands, + const int nbasis, + const int npol, + const T *tmpsi_in, + T *tmhpsi, + const int ngk_ik, + const bool is_first_node) const +{ + ModuleBase::timer::tick("OperatorEXXPW", "act_op_ace"); + // std::cout << "act_op_ace" << std::endl; + // hpsi += -Xi^\dagger * Xi * psi + T* Xi_ace = Xi_ace_k[this->ik]; + int nbands_tot = psi.get_nbands(); + int nbasis_max = psi.get_nbasis(); + // T* hpsi = nullptr; + // resmem_complex_op()(hpsi, nbands_tot * nbasis); + // setmem_complex_op()(hpsi, 0, nbands_tot * nbasis); + T* Xi_psi = nullptr; + resmem_complex_op()(Xi_psi, nbands_tot * nbands); + setmem_complex_op()(Xi_psi, 0, nbands_tot * nbands); + + char trans_N = 'N', trans_T = 'T', trans_C = 'C'; + T intermediate_one = 1.0, intermediate_zero = 0.0, intermediate_minus_one = -1.0; + // Xi * psi + gemm_complex_op()(trans_N, + trans_N, + nbands_tot, + nbands, + nbasis, + &intermediate_one, + Xi_ace, + nbands_tot, + tmpsi_in, + nbasis, + &intermediate_zero, + Xi_psi, + nbands_tot + ); + + Parallel_Reduce::reduce_pool(Xi_psi, nbands_tot * nbands); + + // Xi^\dagger * (Xi * psi) + gemm_complex_op()(trans_C, + trans_N, + nbasis, + nbands, + nbands_tot, + &intermediate_minus_one, + Xi_ace, + nbands_tot, + Xi_psi, + nbands_tot, + &intermediate_one, + tmhpsi, + nbasis + ); + + delmem_complex_op()(Xi_psi); + ModuleBase::timer::tick("OperatorEXXPW", "act_op_ace"); + +} + +template +void OperatorEXXPW::construct_ace() const +{ + int nbands = psi.get_nbands(); + int nbasis = psi.get_nbasis(); + int nk = psi.get_nk(); + + int* ik_ = const_cast(&this->ik); + int ik_save = this->ik; + + T intermediate_one = 1.0, intermediate_zero = 0.0; + + if (h_psi_ace == nullptr) + { + resmem_complex_op()(h_psi_ace, nbands * nbasis); + setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); + } + + if (Xi_ace_k.size() != nk) + { + Xi_ace_k.resize(nk); + for (int i = 0; i < nk; i++) + { + resmem_complex_op()(Xi_ace_k[i], nbands * nbasis); + } + } + + for (int i = 0; i < nk; i++) + { + setmem_complex_op()(Xi_ace_k[i], 0, nbands * nbasis); + } + + if (L_ace == nullptr) + { + resmem_complex_op()(L_ace, nbands * nbands); + setmem_complex_op()(L_ace, 0, nbands * nbands); + } + + if (psi_h_psi_ace == nullptr) + { + resmem_complex_op()(psi_h_psi_ace, nbands * nbands); + } + + if (first_iter) return; + ModuleBase::timer::tick("OperatorEXXPW", "construct_ace"); + + int nk_max = kv->para_k.get_max_nks_pool(); + int nspin_fac = PARAM.inp.nspin == 2 ? 2 : 1; + for (int ispin = 0; ispin < nspin_fac; ispin++) + { + for (int ik0 = 0; ik0 < nk_max; ik0++) + { + int ik = ik0 + ispin * wfcpw->nks / nspin_fac; + // printf("ik: %d\n", ik); + int npwk = wfcpw->npwk[ik]; + + T* Xi_ace = Xi_ace_k[ik]; + psi.fix_kb(ik, 0); + T* p_psi = psi.get_pointer(); + + setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); + + setmem_complex_op()(h_psi_recip, 0, wfcpw->npwk_max); + setmem_complex_op()(h_psi_real, 0, rhopw_dev->nrxx); + setmem_complex_op()(density_real, 0, rhopw_dev->nrxx); + setmem_complex_op()(density_recip, 0, rhopw_dev->npw); + setmem_complex_op()(psi_nk_real, 0, wfcpw->nrxx); + setmem_complex_op()(psi_mq_real, 0, wfcpw->nrxx); + int nqs = kv->get_nkstot_full(); + + bool skip_ik = false; + if (ik >= wfcpw->nks) + { + skip_ik = true; + } + if (skip_ik) + { + // ik fixed here, select band n + for (int iq0 = 0; iq0 < nqs; iq0++) + { + // For nspin=2, iq should be in the same spin channel as ik + int iq = 0; + + int nk = wfcpw->nks / 2; + iq = iq0 + ispin * nk; // iq in the same spin channel + + // for \psi_nk, get the pw of iq and band m + get_exx_potential(kv, wfcpw, rhopw_dev, pot, tpiba, gamma_extrapolation, ucell->omega, ik, iq); + + // decide which pool does the iq belong to + int iq_pool = kv->para_k.whichpool[iq0]; + int iq_loc = iq - kv->para_k.startk_pool[iq_pool]; + + for (int m_iband = 0; m_iband < psi.get_nbands(); m_iband++) + { + double wg_mqb = 0; + if (iq_pool == GlobalV::MY_POOL) + { + wg_mqb = (*wg)(iq_loc, m_iband); + } +#ifdef __MPI + MPI_Bcast(&wg_mqb, 1, MPI_DOUBLE, kv->para_k.get_startpro_pool(iq_pool), MPI_COMM_WORLD); +#endif + if (wg_mqb < 1e-12) + continue; + + if (iq_pool == GlobalV::MY_POOL) + { + const T* psi_mq = get_pw(m_iband, iq_loc); + wfcpw->recip_to_real(ctx, psi_mq, psi_mq_real, iq_loc); + // send + } + // if (iq == 0) + // std::cout << "Bcast psi_mq_real" << std::endl; +#ifdef __MPI +#ifdef __CUDA_MPI + MPI_Bcast(psi_mq_real, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); +#else + if (PARAM.inp.device == "cpu") + { + MPI_Bcast(psi_mq_real, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); + } + else if (PARAM.inp.device == "gpu") + { + // need to copy to cpu first + T* psi_mq_real_cpu = new T[wfcpw->nrxx]; + syncmem_complex_d2c_op()(psi_mq_real_cpu, psi_mq_real, wfcpw->nrxx); + MPI_Bcast(psi_mq_real_cpu, wfcpw->nrxx, MPI_DOUBLE_COMPLEX, iq_pool, KP_WORLD); + syncmem_complex_c2d_op()(psi_mq_real, psi_mq_real_cpu, wfcpw->nrxx); + delete[] psi_mq_real_cpu; + } + else + { + ModuleBase::WARNING_QUIT("OperatorEXXPW", "construct_ace: unknown device"); + } +#endif +#endif + + } // end of iq + + } + } + else + { + *ik_ = ik; + act_op_kpar(nbands, nbasis, 1, p_psi, h_psi_ace, nbasis, false); + // psi_h_psi_ace = psi^\dagger * h_psi_ace + // p_exx_helper->psi.fix_kb(0, 0); + gemm_complex_op()('C', + 'N', + nbands, + nbands, + npwk, + &intermediate_one, + p_psi, + nbasis, + h_psi_ace, + nbasis, + &intermediate_zero, + psi_h_psi_ace, + nbands); + + // reduction of psi_h_psi_ace, due to distributed memory + Parallel_Reduce::reduce_pool(psi_h_psi_ace, nbands * nbands); + + T intermediate_minus_one = -1.0; + axpy_complex_op()(nbands * nbands, + &intermediate_minus_one, + psi_h_psi_ace, + 1, + L_ace, + 1); + + + int info = 0; + char up = 'U', lo = 'L'; + + // for (int i = 0; i < nbands; ++i) + // { + // for (int j = 0; j < nbands; ++j) + // { + // // std::cout << L_ace[i * nbands + j]. << " "; + // if (L_ace[i * nbands + j].imag() >= 0.0) + // { + // std::cout << L_ace[i * nbands + j].real() << "+" << L_ace[i * nbands + j].imag() << "im "; + // } + // else + // { + // std::cout << L_ace[i * nbands + j].real() << L_ace[i * nbands + j].imag() << "im "; + // } + // } + // std::cout << ";" << std::endl; + // } + // MPI_Barrier(MPI_COMM_WORLD); + // MPI_Abort(MPI_COMM_WORLD, 0); + + lapack_potrf()(lo, nbands, L_ace, nbands); + + // expand for-loop + for (int i = 0; i < nbands; ++i) { + setmem_complex_op()(L_ace + i * nbands, 0, i); + } + + // L_ace inv in place + char non = 'N'; + lapack_trtri()(lo, non, nbands, L_ace, nbands); + + // Xi_ace = L_ace^-1 * h_psi_ace^dagger + gemm_complex_op()('N', + 'C', + nbands, + npwk, + nbands, + &intermediate_one, + L_ace, + nbands, + h_psi_ace, + nbasis, + &intermediate_zero, + Xi_ace, + nbands); + + // clear mem + setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); + setmem_complex_op()(psi_h_psi_ace, 0, nbands * nbands); + setmem_complex_op()(L_ace, 0, nbands * nbands); + } + } + } + + *ik_ = ik_save; + + ModuleBase::timer::tick("OperatorEXXPW", "construct_ace"); + +} + +template +double OperatorEXXPW::cal_exx_energy_ace(psi::Psi* ppsi_) const +{ + double Eexx = 0; + int nspin_fac = PARAM.inp.nspin == 2 ? 2 : 1; + psi::Psi psi_ = *ppsi_; + int* ik_ = const_cast(&this->ik); + int ik_save = this->ik; + Real hybrid_alpha = GlobalC::exx_info.info_global.hybrid_alpha; + for (int i = 0; i < wfcpw->nks; i++) + { + setmem_complex_op()(h_psi_ace, 0, psi_.get_nbands() * psi_.get_nbasis()); + *ik_ = i; + psi_.fix_kb(i, 0); + T* psi_i = psi_.get_pointer(); + act_op_ace(psi_.get_nbands(), psi_.get_nbasis(), 1, psi_i, h_psi_ace, 0, true); + + for (int nband = 0; nband < psi_.get_nbands(); nband++) + { + psi_.fix_kb(i, nband); + T* psi_i_n = psi_.get_pointer(); + T* hpsi_i_n = h_psi_ace + nband * psi_.get_nbasis(); + double wg_i_n = (*wg)(i, nband); + // Eexx += dot(psi_i_n, h_psi_i_n) + Eexx += dot_op()(psi_.get_nbasis(), psi_i_n, hpsi_i_n, false) * wg_i_n; + } + } + + Parallel_Reduce::reduce_all(Eexx); + *ik_ = ik_save; + Eexx = Eexx / hybrid_alpha / 2; // This factor of 2 is from the definition of EXX energy. + return Eexx; +} +template class OperatorEXXPW, base_device::DEVICE_CPU>; +template class OperatorEXXPW, base_device::DEVICE_CPU>; +#if ((defined __CUDA) || (defined __ROCM)) +template class OperatorEXXPW, base_device::DEVICE_GPU>; +template class OperatorEXXPW, base_device::DEVICE_GPU>; +#endif +} \ No newline at end of file diff --git a/source/source_pw/module_pwdft/operator_pw/exx_pw_pot.cpp b/source/source_pw/module_pwdft/op_pw_exx_pot.cpp similarity index 95% rename from source/source_pw/module_pwdft/operator_pw/exx_pw_pot.cpp rename to source/source_pw/module_pwdft/op_pw_exx_pot.cpp index 8c2c6dd140..042276cd28 100644 --- a/source/source_pw/module_pwdft/operator_pw/exx_pw_pot.cpp +++ b/source/source_pw/module_pwdft/op_pw_exx_pot.cpp @@ -1,6 +1,6 @@ -#include "op_exx_pw.h" +#include "op_pw_exx.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info namespace hamilt { @@ -30,6 +30,20 @@ void get_exx_potential(const K_Vectors* kv, // fill zero setmem_real_cpu_op()(pot_cpu, 0, npw); + std::vector> qvec_c, qvec_d; +#ifdef __MPI + kv->para_k.gatherkvec(kv->kvec_c, qvec_c); + kv->para_k.gatherkvec(kv->kvec_d, qvec_d); +#else + qvec_c = kv->kvec_c; + qvec_d = kv->kvec_d; +#endif + + if (ik > nks) + { + return; + } + // calculate Fock pot auto param_fock = GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Fock]; for (int i = 0; i < param_fock.size(); i++) @@ -39,8 +53,8 @@ void get_exx_potential(const K_Vectors* kv, double alpha = std::stod(param["alpha"]); const ModuleBase::Vector3 k_c = wfcpw->kvec_c[ik]; const ModuleBase::Vector3 k_d = wfcpw->kvec_d[ik]; - const ModuleBase::Vector3 q_c = wfcpw->kvec_c[iq]; - const ModuleBase::Vector3 q_d = wfcpw->kvec_d[iq]; + const ModuleBase::Vector3 q_c = qvec_c[iq]; + const ModuleBase::Vector3 q_d = qvec_d[iq]; #ifdef _OPENMP #pragma omp parallel for schedule(static) @@ -109,8 +123,8 @@ void get_exx_potential(const K_Vectors* kv, ucell_omega); const ModuleBase::Vector3 k_c = wfcpw->kvec_c[ik]; const ModuleBase::Vector3 k_d = wfcpw->kvec_d[ik]; - const ModuleBase::Vector3 q_c = wfcpw->kvec_c[iq]; - const ModuleBase::Vector3 q_d = wfcpw->kvec_d[iq]; + const ModuleBase::Vector3 q_c = qvec_c[iq]; + const ModuleBase::Vector3 q_d = qvec_d[iq]; #ifdef _OPENMP #pragma omp parallel for schedule(static) @@ -146,6 +160,10 @@ void get_exx_potential(const K_Vectors* kv, // const int ig_kq = ik * nks * npw + iq * npw + ig; Real gg = (k_c - q_c + rhopw_dev->gcar[ig]).norm2() * tpiba2; + // if (ig == 0 && GlobalV::MY_RANK==1) + // { + // printf("k-q+G: %f %f %f\n", (k_c - q_c + rhopw_dev->gcar[ig])[0], (k_c - q_c + rhopw_dev->gcar[ig])[1], (k_c - q_c + rhopw_dev->gcar[ig])[2]); + // } // if (kqgcar2 > 1e-12) // vasp uses 1/40 of the smallest (k spacing)**2 if (gg >= 1e-8) { @@ -374,7 +392,7 @@ double exx_divergence(Conv_Coulomb_Pot_K::Coulomb_Type coulomb_type, double ucell_omega) { double exx_div = 0; - + // return exx_div; double nqs_half1 = 0.5 * kv->nmp[0]; double nqs_half2 = 0.5 * kv->nmp[1]; double nqs_half3 = 0.5 * kv->nmp[2]; @@ -388,7 +406,7 @@ double exx_divergence(Conv_Coulomb_Pot_K::Coulomb_Type coulomb_type, // this is the \sum_q F(q) part // temporarily for all k points, should be replaced to q points later - for (int ik = 0; ik < wfcpw->nks; ik++) + for (int ik = 0; ik < wfcpw->nks / nk_fac; ik++) { const ModuleBase::Vector3 k_c = wfcpw->kvec_c[ik]; const ModuleBase::Vector3 k_d = wfcpw->kvec_d[ik]; @@ -437,7 +455,7 @@ double exx_divergence(Conv_Coulomb_Pot_K::Coulomb_Type coulomb_type, } } - Parallel_Reduce::reduce_pool(div); + Parallel_Reduce::reduce_all(div); // std::cout << "EXX div: " << div << std::endl; // if (PARAM.inp.dft_functional == "hse") @@ -454,8 +472,8 @@ double exx_divergence(Conv_Coulomb_Pot_K::Coulomb_Type coulomb_type, } } - div *= ModuleBase::e2 * ModuleBase::FOUR_PI / tpiba2 / wfcpw->nks; - // std::cout << "div: " << div << std::endl; + div *= ModuleBase::e2 * ModuleBase::FOUR_PI / tpiba2 / kv->get_nkstot_full(); + // std::cout << "div: " << div << std::endl; // numerically value the mean value of F(q) in the reciprocal space // This means we need to calculate the average of F(q) in the first brillouin zone @@ -481,9 +499,9 @@ double exx_divergence(Conv_Coulomb_Pot_K::Coulomb_Type coulomb_type, aa += 1.0 / std::sqrt(alpha * ModuleBase::PI); div -= ModuleBase::e2 * ucell_omega * aa; - exx_div = div * wfcpw->nks / nk_fac; + exx_div = div * kv->get_nkstot_full(); // exx_div = 0; - // std::cout << "EXX divergence: " << exx_div << std::endl; + // std::cout << "EXX divergence: " << exx_div << std::endl; return exx_div; } @@ -569,4 +587,4 @@ template void get_exx_stress_potential(const K_ int, int); #endif -} // namespace hamilt \ No newline at end of file +} // namespace hamilt diff --git a/source/source_pw/module_pwdft/operator_pw/meta_pw.cpp b/source/source_pw/module_pwdft/op_pw_meta.cpp similarity index 98% rename from source/source_pw/module_pwdft/operator_pw/meta_pw.cpp rename to source/source_pw/module_pwdft/op_pw_meta.cpp index c036a0a1f3..e0140b8641 100644 --- a/source/source_pw/module_pwdft/operator_pw/meta_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_meta.cpp @@ -1,7 +1,6 @@ -#include "meta_pw.h" +#include "op_pw_meta.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_base/tool_quit.h" @@ -114,4 +113,4 @@ template class Meta, base_device::DEVICE_GPU>>; // base_device::DEVICE_CPU>> *meta); template Meta, // base_device::DEVICE_GPU>>::Meta(const Meta, base_device::DEVICE_GPU>> *meta); #endif -} // namespace hamilt \ No newline at end of file +} // namespace hamilt diff --git a/source/source_pw/module_pwdft/operator_pw/meta_pw.h b/source/source_pw/module_pwdft/op_pw_meta.h similarity index 98% rename from source/source_pw/module_pwdft/operator_pw/meta_pw.h rename to source/source_pw/module_pwdft/op_pw_meta.h index 8534170079..84a8f322a7 100644 --- a/source/source_pw/module_pwdft/operator_pw/meta_pw.h +++ b/source/source_pw/module_pwdft/op_pw_meta.h @@ -1,7 +1,7 @@ #ifndef METAPW_H #define METAPW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_pw/module_pwdft/kernels/meta_op.h" diff --git a/source/source_pw/module_pwdft/operator_pw/nonlocal_pw.cpp b/source/source_pw/module_pwdft/op_pw_nl.cpp similarity index 99% rename from source/source_pw/module_pwdft/operator_pw/nonlocal_pw.cpp rename to source/source_pw/module_pwdft/op_pw_nl.cpp index 2a87f3c1a7..c757c4f7a2 100644 --- a/source/source_pw/module_pwdft/operator_pw/nonlocal_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_nl.cpp @@ -1,4 +1,4 @@ -#include "nonlocal_pw.h" +#include "op_pw_nl.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" diff --git a/source/source_pw/module_pwdft/operator_pw/nonlocal_pw.h b/source/source_pw/module_pwdft/op_pw_nl.h similarity index 97% rename from source/source_pw/module_pwdft/operator_pw/nonlocal_pw.h rename to source/source_pw/module_pwdft/op_pw_nl.h index 6a2bf6a954..829bb31e93 100644 --- a/source/source_pw/module_pwdft/operator_pw/nonlocal_pw.h +++ b/source/source_pw/module_pwdft/op_pw_nl.h @@ -1,13 +1,13 @@ #ifndef NONLOCALPW_H #define NONLOCALPW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_cell/unitcell.h" #include "source_pw/module_pwdft/kernels/nonlocal_op.h" #include "source_base/kernels/math_kernel_op.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" namespace hamilt { diff --git a/source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.cpp b/source/source_pw/module_pwdft/op_pw_proj.cpp similarity index 92% rename from source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.cpp rename to source/source_pw/module_pwdft/op_pw_proj.cpp index 56b6d3756a..d28bce4165 100644 --- a/source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_proj.cpp @@ -1,4 +1,4 @@ -#include "onsite_proj_pw.h" +#include "op_pw_proj.h" #include "source_base/timer.h" #include "source_base/parallel_reduce.h" @@ -13,9 +13,10 @@ namespace hamilt { template OnsiteProj>::OnsiteProj(const int* isk_in, - const UnitCell* ucell_in, - const bool cal_delta_spin, - const bool cal_dftu) + const UnitCell* ucell_in, + Plus_U *p_dftu, // mohan add 2025-11-06 + const bool cal_delta_spin, + const bool cal_dftu) { this->classname = "OnsiteProj"; this->cal_type = calculation_type::pw_onsite; @@ -23,6 +24,7 @@ OnsiteProj>::OnsiteProj(const int* isk_in, this->ucell = ucell_in; this->has_delta_spin = cal_delta_spin; this->has_dftu = cal_dftu; + this->dftu = p_dftu; // mohan add 2025-11-08 } template @@ -209,15 +211,18 @@ void OnsiteProj>::cal_ps_delta_spin(const int npol, const } template -void OnsiteProj>::cal_ps_dftu(const int npol, const int m) const +void OnsiteProj>::cal_ps_dftu( + const int npol, + const int m) const { - if(!this->has_dftu) return; + if(!this->has_dftu) + { + return; + } auto* onsite_p = projectors::OnsiteProjector::get_instance(); const std::complex* becp = onsite_p->get_becp(); - auto* dftu = ModuleDFTU::DFTU::get_instance(); - // T *ps = new T[tnp * m]; // ModuleBase::GlobalFunc::ZEROS(ps, m * tnp); if (this->nkb_m < m * tnp) { @@ -247,7 +252,7 @@ void OnsiteProj>::cal_ps_dftu(const int npol, const int m) for(int iat=0;iatucell->nat;iat++) { const int it = this->ucell->iat2it[iat]; - const int target_l = dftu->orbital_corr[it]; + const int target_l = this->dftu->orbital_corr[it]; orb_l_iat0[iat] = target_l; const int nproj = onsite_p->get_nh(iat); if(target_l == -1) @@ -354,30 +359,56 @@ void OnsiteProj>::cal_ps_dftu(const int npol, const int m) } template<> -void OnsiteProj, base_device::DEVICE_CPU>>::add_onsite_proj(std::complex *hpsi_in, const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_CPU>>::add_onsite_proj( + std::complex *hpsi_in, + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_CPU>>::update_becp(const std::complex *psi_in, const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_CPU>>::update_becp( + const std::complex *psi_in, + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_CPU>>::cal_ps_delta_spin(const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_CPU>>::cal_ps_delta_spin( + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_CPU>>::cal_ps_dftu(const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_CPU>>::cal_ps_dftu( + const int npol, + const int m) const {} #if ((defined __CUDA) || (defined __ROCM)) template<> -void OnsiteProj, base_device::DEVICE_GPU>>::add_onsite_proj(std::complex *hpsi_in, const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_GPU>>::add_onsite_proj( + std::complex *hpsi_in, + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_GPU>>::update_becp(const std::complex *psi_in, const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_GPU>>::update_becp( + const std::complex *psi_in, + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_GPU>>::cal_ps_delta_spin(const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_GPU>>::cal_ps_delta_spin( + const int npol, + const int m) const {} + template<> -void OnsiteProj, base_device::DEVICE_GPU>>::cal_ps_dftu(const int npol, const int m) const +void OnsiteProj, base_device::DEVICE_GPU>>::cal_ps_dftu( + const int npol, + const int m) const {} #endif @@ -405,7 +436,6 @@ hamilt::OnsiteProj>::OnsiteProj(const OnsiteProjclassname = "OnsiteProj"; this->cal_type = calculation_type::pw_nonlocal; - // FIXME: } template class OnsiteProj, base_device::DEVICE_CPU>>; @@ -415,4 +445,4 @@ template class OnsiteProj, base_device::DEVICE_C template class OnsiteProj, base_device::DEVICE_GPU>>; template class OnsiteProj, base_device::DEVICE_GPU>>; #endif -} // namespace hamilt \ No newline at end of file +} // namespace hamilt diff --git a/source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.h b/source/source_pw/module_pwdft/op_pw_proj.h similarity index 91% rename from source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.h rename to source/source_pw/module_pwdft/op_pw_proj.h index b8606aa087..50207cc7b7 100644 --- a/source/source_pw/module_pwdft/operator_pw/onsite_proj_pw.h +++ b/source/source_pw/module_pwdft/op_pw_proj.h @@ -1,10 +1,11 @@ #ifndef MODULEHAMILTPW_ONSITE_PROJ_PW_H #define MODULEHAMILTPW_ONSITE_PROJ_PW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_cell/unitcell.h" #include "source_base/kernels/math_kernel_op.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 20251106 namespace hamilt { @@ -22,9 +23,11 @@ class OnsiteProj> : public OperatorPW { private: using Real = typename GetTypeReal::type; + public: OnsiteProj(const int* isk_in, const UnitCell* ucell_in, + Plus_U *p_dftu, // mohan add 2025-11-06 const bool cal_delta_spin, const bool cal_dftu); @@ -40,22 +43,27 @@ class OnsiteProj> : public OperatorPW const int npol, const T* tmpsi_in, T* tmhpsi, - const int ngk = 0, - const bool is_first_node = false)const override; + const int ngk = 0, + const bool is_first_node = false)const override; const int *get_isk() const {return this->isk;} const UnitCell *get_ucell() const {return this->ucell;} private: void cal_ps_delta_spin(const int npol, const int m) const; + void cal_ps_dftu(const int npol, const int m) const; + void update_becp(const T* psi_in, const int npol, const int m) const; + void add_onsite_proj(T *hpsi_in, const int npol, const int m) const; const int* isk = nullptr; const UnitCell* ucell = nullptr; + Plus_U *dftu = nullptr; // mohan add 2025-11-06 + mutable int* ip_iat = nullptr; mutable T* lambda_coeff = nullptr; mutable int* orb_l_iat = nullptr; @@ -95,4 +103,4 @@ class OnsiteProj> : public OperatorPW } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/operator_pw/veff_pw.cpp b/source/source_pw/module_pwdft/op_pw_veff.cpp similarity index 99% rename from source/source_pw/module_pwdft/operator_pw/veff_pw.cpp rename to source/source_pw/module_pwdft/op_pw_veff.cpp index 6406b9267a..bd5fa7f4e8 100644 --- a/source/source_pw/module_pwdft/operator_pw/veff_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_veff.cpp @@ -1,4 +1,4 @@ -#include "veff_pw.h" +#include "op_pw_veff.h" #include "source_base/timer.h" #include "source_base/tool_quit.h" diff --git a/source/source_pw/module_pwdft/operator_pw/veff_pw.h b/source/source_pw/module_pwdft/op_pw_veff.h similarity index 98% rename from source/source_pw/module_pwdft/operator_pw/veff_pw.h rename to source/source_pw/module_pwdft/op_pw_veff.h index 3c2024edc5..fa7fe40872 100644 --- a/source/source_pw/module_pwdft/operator_pw/veff_pw.h +++ b/source/source_pw/module_pwdft/op_pw_veff.h @@ -1,7 +1,7 @@ #ifndef VEFFPW_H #define VEFFPW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_base/matrix.h" #include "source_basis/module_pw/pw_basis_k.h" #include "source_pw/module_pwdft/kernels/veff_op.h" diff --git a/source/source_pw/module_pwdft/operator_pw/velocity_pw.cpp b/source/source_pw/module_pwdft/op_pw_vel.cpp similarity index 99% rename from source/source_pw/module_pwdft/operator_pw/velocity_pw.cpp rename to source/source_pw/module_pwdft/op_pw_vel.cpp index f9a7aa6333..b4f0127586 100644 --- a/source/source_pw/module_pwdft/operator_pw/velocity_pw.cpp +++ b/source/source_pw/module_pwdft/op_pw_vel.cpp @@ -1,4 +1,4 @@ -#include "velocity_pw.h" +#include "op_pw_vel.h" #include "source_base/kernels/math_kernel_op.h" #include "source_base/parallel_reduce.h" diff --git a/source/source_pw/module_pwdft/operator_pw/velocity_pw.h b/source/source_pw/module_pwdft/op_pw_vel.h similarity index 97% rename from source/source_pw/module_pwdft/operator_pw/velocity_pw.h rename to source/source_pw/module_pwdft/op_pw_vel.h index 191e07fde3..211ce4007e 100644 --- a/source/source_pw/module_pwdft/operator_pw/velocity_pw.h +++ b/source/source_pw/module_pwdft/op_pw_vel.h @@ -1,8 +1,8 @@ #ifndef VELOCITY_PW_H #define VELOCITY_PW_H -#include "operator_pw.h" +#include "op_pw.h" #include "source_cell/unitcell.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_basis/module_pw/pw_basis_k.h" namespace hamilt { diff --git a/source/source_pw/module_pwdft/operator_pw/CMakeLists.txt b/source/source_pw/module_pwdft/operator_pw/CMakeLists.txt deleted file mode 100644 index 0a0e923ee0..0000000000 --- a/source/source_pw/module_pwdft/operator_pw/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -list(APPEND operator_ks_pw_srcs - operator_pw.cpp - ekinetic_pw.cpp - veff_pw.cpp - nonlocal_pw.cpp - meta_pw.cpp - velocity_pw.cpp - onsite_proj_pw.cpp - op_exx_pw.cpp - exx_pw_ace.cpp - exx_pw_pot.cpp -) - -# this library is included in module_pwdft now -#add_library( -# operator_ks_pw -# OBJECT -# ${operator_ks_pw_srcs} -#) - -#if(ENABLE_COVERAGE) -# add_coverage(operator_ks_pw) -#endif() diff --git a/source/source_pw/module_pwdft/operator_pw/exx_pw_ace.cpp b/source/source_pw/module_pwdft/operator_pw/exx_pw_ace.cpp deleted file mode 100644 index 80c4a0dc6a..0000000000 --- a/source/source_pw/module_pwdft/operator_pw/exx_pw_ace.cpp +++ /dev/null @@ -1,247 +0,0 @@ -#include "op_exx_pw.h" - -namespace hamilt -{ -template -void OperatorEXXPW::act_op_ace(const int nbands, - const int nbasis, - const int npol, - const T *tmpsi_in, - T *tmhpsi, - const int ngk_ik, - const bool is_first_node) const -{ - ModuleBase::timer::tick("OperatorEXXPW", "act_op_ace"); - // std::cout << "act_op_ace" << std::endl; - // hpsi += -Xi^\dagger * Xi * psi - T* Xi_ace = Xi_ace_k[this->ik]; - int nbands_tot = psi.get_nbands(); - int nbasis_max = psi.get_nbasis(); - // T* hpsi = nullptr; - // resmem_complex_op()(hpsi, nbands_tot * nbasis); - // setmem_complex_op()(hpsi, 0, nbands_tot * nbasis); - T* Xi_psi = nullptr; - resmem_complex_op()(Xi_psi, nbands_tot * nbands); - setmem_complex_op()(Xi_psi, 0, nbands_tot * nbands); - - char trans_N = 'N', trans_T = 'T', trans_C = 'C'; - T intermediate_one = 1.0, intermediate_zero = 0.0, intermediate_minus_one = -1.0; - // Xi * psi - gemm_complex_op()(trans_N, - trans_N, - nbands_tot, - nbands, - nbasis, - &intermediate_one, - Xi_ace, - nbands_tot, - tmpsi_in, - nbasis, - &intermediate_zero, - Xi_psi, - nbands_tot - ); - - Parallel_Reduce::reduce_pool(Xi_psi, nbands_tot * nbands); - - // Xi^\dagger * (Xi * psi) - gemm_complex_op()(trans_C, - trans_N, - nbasis, - nbands, - nbands_tot, - &intermediate_minus_one, - Xi_ace, - nbands_tot, - Xi_psi, - nbands_tot, - &intermediate_one, - tmhpsi, - nbasis - ); - - - // // negative sign, add to hpsi - // vec_add_vec_complex_op()(this->ctx, nbands * nbasis, tmhpsi, hpsi, -1, tmhpsi, 1); - // delmem_complex_op()(hpsi); - delmem_complex_op()(Xi_psi); - ModuleBase::timer::tick("OperatorEXXPW", "act_op_ace"); - -} - -template -void OperatorEXXPW::construct_ace() const -{ - // int nkb = p_exx_helper->psi.get_nbands() * p_exx_helper->psi.get_nk(); - int nbands = psi.get_nbands(); - int nbasis = psi.get_nbasis(); - int nk = psi.get_nk(); - - int ik_save = this->ik; - int * ik_ = const_cast(&this->ik); - - T intermediate_one = 1.0, intermediate_zero = 0.0; - - if (h_psi_ace == nullptr) - { - resmem_complex_op()(h_psi_ace, nbands * nbasis); - setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); - } - - if (Xi_ace_k.size() != nk) - { - Xi_ace_k.resize(nk); - for (int i = 0; i < nk; i++) - { - resmem_complex_op()(Xi_ace_k[i], nbands * nbasis); - } - } - - for (int i = 0; i < nk; i++) - { - setmem_complex_op()(Xi_ace_k[i], 0, nbands * nbasis); - } - - if (L_ace == nullptr) - { - resmem_complex_op()(L_ace, nbands * nbands); - setmem_complex_op()(L_ace, 0, nbands * nbands); - } - - if (psi_h_psi_ace == nullptr) - { - resmem_complex_op()(psi_h_psi_ace, nbands * nbands); - } - - if (first_iter) return; - ModuleBase::timer::tick("OperatorEXXPW", "construct_ace"); - - for (int ik = 0; ik < nk; ik++) - { - int npwk = wfcpw->npwk[ik]; - - T* Xi_ace = Xi_ace_k[ik]; - psi.fix_kb(ik, 0); - T* p_psi = psi.get_pointer(); - - setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); - - *ik_ = ik; - - act_op( - nbands, - nbasis, - 1, - p_psi, - h_psi_ace, - nbasis, - false - ); - - // psi_h_psi_ace = psi^\dagger * h_psi_ace - // p_exx_helper->psi.fix_kb(0, 0); - gemm_complex_op()('C', - 'N', - nbands, - nbands, - npwk, - &intermediate_one, - p_psi, - nbasis, - h_psi_ace, - nbasis, - &intermediate_zero, - psi_h_psi_ace, - nbands); - - // reduction of psi_h_psi_ace, due to distributed memory - Parallel_Reduce::reduce_pool(psi_h_psi_ace, nbands * nbands); - - T intermediate_minus_one = -1.0; - axpy_complex_op()(nbands * nbands, - &intermediate_minus_one, - psi_h_psi_ace, - 1, - L_ace, - 1); - - - int info = 0; - char up = 'U', lo = 'L'; - - lapack_potrf()(lo, nbands, L_ace, nbands); - - // expand for-loop - for (int i = 0; i < nbands; ++i) { - setmem_complex_op()(L_ace + i * nbands, 0, i); - } - - // L_ace inv in place - char non = 'N'; - lapack_trtri()(lo, non, nbands, L_ace, nbands); - - // Xi_ace = L_ace^-1 * h_psi_ace^dagger - gemm_complex_op()('N', - 'C', - nbands, - npwk, - nbands, - &intermediate_one, - L_ace, - nbands, - h_psi_ace, - nbasis, - &intermediate_zero, - Xi_ace, - nbands); - - // clear mem - setmem_complex_op()(h_psi_ace, 0, nbands * nbasis); - setmem_complex_op()(psi_h_psi_ace, 0, nbands * nbands); - setmem_complex_op()(L_ace, 0, nbands * nbands); - - } - - *ik_ = ik_save; - ModuleBase::timer::tick("OperatorEXXPW", "construct_ace"); - -} - -template -double OperatorEXXPW::cal_exx_energy_ace(psi::Psi* ppsi_) const -{ - double Eexx = 0; - - psi::Psi psi_ = *ppsi_; - int* ik_ = const_cast(&this->ik); - int ik_save = this->ik; - for (int i = 0; i < wfcpw->nks; i++) - { - setmem_complex_op()(h_psi_ace, 0, psi_.get_nbands() * psi_.get_nbasis()); - *ik_ = i; - psi_.fix_kb(i, 0); - T* psi_i = psi_.get_pointer(); - act_op_ace(psi_.get_nbands(), psi_.get_nbasis(), 1, psi_i, h_psi_ace, 0, true); - - for (int nband = 0; nband < psi_.get_nbands(); nband++) - { - psi_.fix_kb(i, nband); - T* psi_i_n = psi_.get_pointer(); - T* hpsi_i_n = h_psi_ace + nband * psi_.get_nbasis(); - double wg_i_n = (*wg)(i, nband); - // Eexx += dot(psi_i_n, h_psi_i_n) - Eexx += dot_op()(psi_.get_nbasis(), psi_i_n, hpsi_i_n, false) * wg_i_n * 2; - } - } - - Parallel_Reduce::reduce_pool(Eexx); - *ik_ = ik_save; - return Eexx; -} -template class OperatorEXXPW, base_device::DEVICE_CPU>; -template class OperatorEXXPW, base_device::DEVICE_CPU>; -#if ((defined __CUDA) || (defined __ROCM)) -template class OperatorEXXPW, base_device::DEVICE_GPU>; -template class OperatorEXXPW, base_device::DEVICE_GPU>; -#endif -} \ No newline at end of file diff --git a/source/source_pw/module_pwdft/parallel_grid.cpp b/source/source_pw/module_pwdft/parallel_grid.cpp index 2f05218cd2..ff20f40d73 100644 --- a/source/source_pw/module_pwdft/parallel_grid.cpp +++ b/source/source_pw/module_pwdft/parallel_grid.cpp @@ -1,7 +1,11 @@ #include "parallel_grid.h" - -#include "source_base/parallel_global.h" #include "source_io/module_parameter/parameter.h" + +#ifdef __MPI +#include "source_base/parallel_comm.h" // use POOL_WORLD +#include +#endif + Parallel_Grid::Parallel_Grid() { this->allocate = false; @@ -86,7 +90,7 @@ void Parallel_Grid::init(const int& ncx_in, assert(GlobalV::KPAR > 0); this->nproc_in_pool = new int[GlobalV::KPAR]; - int nprocgroup; + int nprocgroup = 0; if (PARAM.inp.esolver_type == "sdft") { nprocgroup = GlobalV::NPROC_IN_BNDGROUP; diff --git a/source/source_pw/module_pwdft/setup_pot.cpp b/source/source_pw/module_pwdft/setup_pot.cpp index 1eef712283..d8a340535c 100644 --- a/source/source_pw/module_pwdft/setup_pot.cpp +++ b/source/source_pw/module_pwdft/setup_pot.cpp @@ -4,7 +4,7 @@ #include "source_lcao/module_deltaspin/spin_constrain.h" #include "source_pw/module_pwdft/onsite_projector.h" #include "source_lcao/module_dftu/dftu.h" -#include "source_pw/module_pwdft/VSep_in_pw.h" +#include "source_pw/module_pwdft/vsep_pw.h" template void pw::setup_pot(const int istep, @@ -16,6 +16,7 @@ void pw::setup_pot(const int istep, const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi* kspw_psi, // electronic wave functions hamilt::Hamilt* p_hamilt, // hamiltonian @@ -37,13 +38,8 @@ void pw::setup_pot(const int istep, //---------------------------------------------------------- //! 1) Renew local pseudopotential //---------------------------------------------------------- - pelec->init_scf(istep, - ucell, - para_grid, - sf.strucFac, - locpp.numeric, - ucell.symm, - (void*)pw_wfc); + pelec->init_scf(ucell, para_grid, sf.strucFac, + locpp.numeric, ucell.symm, (void*)pw_wfc); //---------------------------------------------------------- //! 2) Symmetrize the charge density (rho) @@ -65,7 +61,7 @@ void pw::setup_pot(const int istep, //! D in uspp need vloc, thus behind init_scf() //! calculate the effective coefficient matrix //! for non-local pseudopotential projectors - ModuleBase::matrix veff = pelec->pot->get_effective_v(); + ModuleBase::matrix veff = pelec->pot->get_eff_v(); ppcell.cal_effective_D(veff, pw_rhod, ucell); @@ -102,22 +98,27 @@ void pw::setup_pot(const int istep, PARAM.inp.sccut, PARAM.inp.sc_drop_thr, ucell, - nullptr, + nullptr, // parallel orbitals PARAM.inp.nspin, kv, p_hamilt, kspw_psi, +#ifdef __LCAO + nullptr, // density matrix, not useful in LCAO, mohan note 2025-11-03 +#endif pelec, pw_wfc); } //---------------------------------------------------------- //! 6) DFT+U algorithm + // This should not called in before_scf (esolver), it should be + // called in before_all_runners (esolver), which should + // be improved later. Mohan note 2025-11-06 //---------------------------------------------------------- if (PARAM.inp.dft_plus_u) { - auto* dftu = ModuleDFTU::DFTU::get_instance(); - dftu->init(ucell, nullptr, kv.get_nks()); + dftu.init(ucell, nullptr, kv.get_nks()); } return; @@ -133,6 +134,7 @@ template void pw::setup_pot, base_device::DEVICE_CPU>( const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi, base_device::DEVICE_CPU>* kspw_psi, // electronic wave functions hamilt::Hamilt, base_device::DEVICE_CPU>* p_hamilt, // hamiltonian @@ -151,6 +153,7 @@ template void pw::setup_pot, base_device::DEVICE_CPU>( const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi, base_device::DEVICE_CPU>* kspw_psi, // electronic wave functions hamilt::Hamilt, base_device::DEVICE_CPU>* p_hamilt, // hamiltonian @@ -170,6 +173,7 @@ template void pw::setup_pot, base_device::DEVICE_GPU>( const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi, base_device::DEVICE_GPU>* kspw_psi, // electronic wave functions hamilt::Hamilt, base_device::DEVICE_GPU>* p_hamilt, // hamiltonian @@ -187,6 +191,7 @@ template void pw::setup_pot, base_device::DEVICE_GPU>( const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi, base_device::DEVICE_GPU>* kspw_psi, // electronic wave functions hamilt::Hamilt, base_device::DEVICE_GPU>* p_hamilt, // hamiltonian diff --git a/source/source_pw/module_pwdft/setup_pot.h b/source/source_pw/module_pwdft/setup_pot.h index b89e33c21e..0f691bbfc7 100644 --- a/source/source_pw/module_pwdft/setup_pot.h +++ b/source/source_pw/module_pwdft/setup_pot.h @@ -6,8 +6,9 @@ #include "source_cell/klist.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_hamilt/hamilt.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 namespace pw { @@ -22,6 +23,7 @@ void setup_pot(const int istep, const Charge &chr, // charge density pseudopot_cell_vl &locpp, // local pseudopotentials pseudopot_cell_vnl &ppcell, // non-local pseudopotentials + Plus_U &dftu, // mohan add 2025-11-06 VSep* vsep_cell, // U-1/2 method psi::Psi* kspw_psi, // electronic wave functions hamilt::Hamilt* p_hamilt, // hamiltonian diff --git a/source/source_pw/module_pwdft/setup_pwrho.cpp b/source/source_pw/module_pwdft/setup_pwrho.cpp index e08ee71d23..156c5b27bb 100644 --- a/source/source_pw/module_pwdft/setup_pwrho.cpp +++ b/source/source_pw/module_pwdft/setup_pwrho.cpp @@ -1,5 +1,5 @@ #include "source_pw/module_pwdft/setup_pwrho.h" -#include "source_io/print_info.h" // use print_rhofft +#include "source_io/module_output/print_info.h" // use print_rhofft #include "source_base/parallel_comm.h" // use POOL_WORLD void pw::setup_pwrho( diff --git a/source/source_pw/module_pwdft/setup_pwwfc.cpp b/source/source_pw/module_pwdft/setup_pwwfc.cpp index 759178638c..995e7b7f42 100644 --- a/source/source_pw/module_pwdft/setup_pwwfc.cpp +++ b/source/source_pw/module_pwdft/setup_pwwfc.cpp @@ -1,6 +1,7 @@ #include "source_pw/module_pwdft/setup_pwwfc.h" // pw_wfc #include "source_base/parallel_comm.h" // POOL_WORLD -#include "source_io/print_info.h" // print information +#include "source_base/parallel_reduce.h" // Parallel_Reduce +#include "source_io/module_output/print_info.h" // print information void pw::teardown_pwwfc(ModulePW::PW_Basis_K* &pw_wfc) { @@ -52,14 +53,12 @@ void pw::setup_pwwfc(const Input_para& inp, pw_rho.nz); pw_wfc->initparameters(false, inp.ecutwfc, kv.get_nks(), kv.kvec_d.data()); - #ifdef __MPI if (inp.pw_seed > 0) { - MPI_Allreduce(MPI_IN_PLACE, &pw_wfc->ggecut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + Parallel_Reduce::reduce_max( pw_wfc->ggecut); } - // qianrui add 2021-8-13 to make different kpar parameters can get the same - // results + // qianrui add 2021-8-13 to make different kpar parameters can get the same result #endif pw_wfc->fft_bundle.initfftmode(inp.fft_mode); diff --git a/source/source_pw/module_pwdft/soc.cpp b/source/source_pw/module_pwdft/soc.cpp index d90b334a2f..a44a0b6a48 100644 --- a/source/source_pw/module_pwdft/soc.cpp +++ b/source/source_pw/module_pwdft/soc.cpp @@ -122,7 +122,7 @@ int Soc::sph_ind(const int l, const double j, const int m, const int spin) // in a spinor with orbital angular momentum l, total angular // momentum j, projection along z of the total angular momentum m+-1/2. // Spin selects the up (spin=1) or down (spin=2) coefficient. - int sph_ind0; + int sph_ind0 = 0; if (spin != 0 && spin != 1) { ModuleBase::WARNING_QUIT("sph_ind", "spin must be 0 1"); diff --git a/source/source_pw/module_pwdft/stress_func_cc.cpp b/source/source_pw/module_pwdft/stress_cc.cpp similarity index 99% rename from source/source_pw/module_pwdft/stress_func_cc.cpp rename to source/source_pw/module_pwdft/stress_cc.cpp index 81b2767d51..211d5a4bda 100644 --- a/source/source_pw/module_pwdft/stress_func_cc.cpp +++ b/source/source_pw/module_pwdft/stress_cc.cpp @@ -3,7 +3,6 @@ #include "source_io/module_parameter/parameter.h" #include "source_base/math_integral.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_estate/cal_ux.h" #ifdef USE_LIBXC diff --git a/source/source_pw/module_pwdft/stress_func_ewa.cpp b/source/source_pw/module_pwdft/stress_ewa.cpp similarity index 79% rename from source/source_pw/module_pwdft/stress_func_ewa.cpp rename to source/source_pw/module_pwdft/stress_ewa.cpp index c3297cfd72..20f107581c 100644 --- a/source/source_pw/module_pwdft/stress_func_ewa.cpp +++ b/source/source_pw/module_pwdft/stress_ewa.cpp @@ -3,7 +3,6 @@ #include "source_base/timer.h" #include "source_base/tool_threading.h" #include "source_base/libm/libm.h" -#include "source_pw/module_pwdft/global.h" #ifdef _OPENMP #include @@ -64,32 +63,18 @@ void Stress_Func::stress_ewa(const UnitCell& ucell, } // else fact=1.0; -#ifdef _OPENMP #pragma omp parallel { - int num_threads = omp_get_num_threads(); - int thread_id = omp_get_thread_num(); ModuleBase::matrix local_sigma(3, 3); - FPTYPE local_sdewald = 0.0; -#else - int num_threads = 1; - int thread_id = 0; - ModuleBase::matrix& local_sigma = sigma; - FPTYPE& local_sdewald = sdewald; -#endif - - // Calculate ig range of this thread, avoid thread sync - int ig=0; - int ig_end=0; - ModuleBase::TASK_DIST_1D(num_threads, thread_id, rho_basis->npw, ig, ig_end); - ig_end = ig + ig_end; + FPTYPE local_sdewald = 0; FPTYPE g2,g2a; FPTYPE arg; std::complex rhostar; FPTYPE sewald; - for(; ig < ig_end; ig++) + #pragma omp for + for(int ig = 0; ig < rho_basis->npw; ig++) { if(ig == ig0) { @@ -136,34 +121,28 @@ void Stress_Func::stress_ewa(const UnitCell& ucell, if(ig0 >= 0) { - r = new ModuleBase::Vector3[mxr]; - r2 = new FPTYPE[mxr]; - irr = new int[mxr]; + std::vector> r(mxr); + std::vector r2(mxr); + std::vector irr(mxr); FPTYPE sqa = sqrt(alpha); FPTYPE sq8a_2pi = sqrt(8 * alpha / (ModuleBase::TWO_PI)); rmax = 4.0/sqa/ucell.lat0; - // collapse it, ia, jt, ja loop into a single loop - long long ijat; - long long ijat_end; - int it=0; - int i=0; - int jt=0; - int j=0; - - ModuleBase::TASK_DIST_1D(num_threads, thread_id, (long long)ucell.nat * ucell.nat, ijat, ijat_end); - ijat_end = ijat + ijat_end; - ucell.ijat2iaitjajt(ijat, &i, &it, &j, &jt); - - while (ijat < ijat_end) + #pragma omp for + for(long long ijat = 0; ijat < ucell.nat * ucell.nat; ijat++) { + int it=0; + int i=0; + int jt=0; + int j=0; + ucell.ijat2iaitjajt(ijat, &i, &it, &j, &jt); if (ucell.atoms[it].na != 0 && ucell.atoms[jt].na != 0) { //calculate tau[na]-tau[nb] d_tau = ucell.atoms[it].tau[i] - ucell.atoms[jt].tau[j]; //generates nearest-neighbors shells - H_Ewald_pw::rgen(d_tau, rmax, irr, ucell.latvec, ucell.G, r, r2, nrm); + H_Ewald_pw::rgen(d_tau, rmax, irr.data(), ucell.latvec, ucell.G, r.data(), r2.data(), nrm); for(int nr=0; nr::stress_ewa(const UnitCell& ucell, }//end l }//end nr } - - ++ijat; - ucell.step_jajtiait(&j, &jt, &i, &it); } - - delete[] r; - delete[] r2; - delete[] irr; }//end if -#ifdef _OPENMP #pragma omp critical(stress_ewa_reduce) { sdewald += local_sdewald; @@ -206,7 +177,6 @@ void Stress_Func::stress_ewa(const UnitCell& ucell, } } } -#endif for(int l=0;l<3;l++) { diff --git a/source/source_pw/module_pwdft/stress_func_exx.cpp b/source/source_pw/module_pwdft/stress_exx.cpp similarity index 98% rename from source/source_pw/module_pwdft/stress_func_exx.cpp rename to source/source_pw/module_pwdft/stress_exx.cpp index dd2c6570a0..73e7f7e214 100644 --- a/source/source_pw/module_pwdft/stress_func_exx.cpp +++ b/source/source_pw/module_pwdft/stress_exx.cpp @@ -1,5 +1,5 @@ -#include "global.h" -#include "operator_pw/op_exx_pw.h" +#include "source_hamilt/module_xc/exx_info.h" +#include "op_pw_exx.h" #include "source_base/parallel_common.h" #include "stress_pw.h" diff --git a/source/source_pw/module_pwdft/stress_func.h b/source/source_pw/module_pwdft/stress_func.h index 3d4ed38c89..815298aa9d 100644 --- a/source/source_pw/module_pwdft/stress_func.h +++ b/source/source_pw/module_pwdft/stress_func.h @@ -11,11 +11,12 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_cell/klist.h" #include "source_estate/module_charge/charge.h" -#include "source_pw/module_pwdft/VNL_in_pw.h" +#include "source_pw/module_pwdft/vnl_pw.h" #include "source_pw/module_pwdft/kernels/stress_op.h" #include "source_pw/module_pwdft/structure_factor.h" #include "source_base/kernels/math_kernel_op.h" #include "source_psi/psi.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-06 //------------------------------------------------------------------- // mohan reconstruction note: 2021-02-07 @@ -179,8 +180,9 @@ class Stress_Func void stress_onsite(ModuleBase::matrix& sigma, const ModuleBase::matrix& wg, const ModulePW::PW_Basis_K* wfc_basis, - const UnitCell& ucell_in, - const psi::Psi , Device>* psi_in, + const UnitCell& ucell_in, + const Plus_U &dftu, // mohan add 2025-11-06 + const psi::Psi , Device>* psi_in, ModuleSymmetry::Symmetry* p_symm); // nonlocal part in PW basis void get_dvnl1(ModuleBase::ComplexMatrix& vkb, diff --git a/source/source_pw/module_pwdft/stress_func_gga.cpp b/source/source_pw/module_pwdft/stress_gga.cpp similarity index 97% rename from source/source_pw/module_pwdft/stress_func_gga.cpp rename to source/source_pw/module_pwdft/stress_gga.cpp index 9d9bbf5ebd..f5eb5eaa1c 100644 --- a/source/source_pw/module_pwdft/stress_func_gga.cpp +++ b/source/source_pw/module_pwdft/stress_gga.cpp @@ -1,7 +1,6 @@ #include "stress_func.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" //calculate the GGA stress correction in PW and LCAO template diff --git a/source/source_pw/module_pwdft/stress_func_har.cpp b/source/source_pw/module_pwdft/stress_har.cpp similarity index 98% rename from source/source_pw/module_pwdft/stress_func_har.cpp rename to source/source_pw/module_pwdft/stress_har.cpp index b99ee7fb04..90d80bc4dc 100644 --- a/source/source_pw/module_pwdft/stress_func_har.cpp +++ b/source/source_pw/module_pwdft/stress_har.cpp @@ -2,7 +2,6 @@ #include "source_estate/module_pot/H_Hartree_pw.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" //calculate the Hartree part in PW or LCAO base template diff --git a/source/source_pw/module_pwdft/stress_func_kin.cpp b/source/source_pw/module_pwdft/stress_kin.cpp similarity index 97% rename from source/source_pw/module_pwdft/stress_func_kin.cpp rename to source/source_pw/module_pwdft/stress_kin.cpp index 1336be5c09..83d6617ffe 100644 --- a/source/source_pw/module_pwdft/stress_func_kin.cpp +++ b/source/source_pw/module_pwdft/stress_kin.cpp @@ -1,5 +1,4 @@ #include "stress_func.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" #include "source_pw/module_pwdft/fs_kin_tools.h" diff --git a/source/source_pw/module_pwdft/stress_func_loc.cpp b/source/source_pw/module_pwdft/stress_loc.cpp similarity index 92% rename from source/source_pw/module_pwdft/stress_func_loc.cpp rename to source/source_pw/module_pwdft/stress_loc.cpp index fe4d85e1be..0b932afcdb 100644 --- a/source/source_pw/module_pwdft/stress_func_loc.cpp +++ b/source/source_pw/module_pwdft/stress_loc.cpp @@ -4,23 +4,22 @@ #include "source_base/tool_threading.h" #include "source_base/timer.h" #include "source_base/libm/libm.h" -#include "source_pw/module_pwdft/global.h" //calculate local pseudopotential stress in PW or VL_dVL stress in LCAO template void Stress_Func::stress_loc(const UnitCell& ucell, - ModuleBase::matrix& sigma, - ModulePW::PW_Basis* rho_basis, - const ModuleBase::matrix& vloc, - const Structure_Factor* p_sf, - const bool is_pw, - const Charge* const chr) + ModuleBase::matrix& sigma, + ModulePW::PW_Basis* rho_basis, + const ModuleBase::matrix& vloc, + const Structure_Factor* p_sf, + const bool is_pw, + const Charge* const chr) { - ModuleBase::TITLE("Stress","stress_loc"); - ModuleBase::timer::tick("Stress","stress_loc"); + ModuleBase::TITLE("Stress","stress_loc"); + ModuleBase::timer::tick("Stress","stress_loc"); std::vector dvloc(rho_basis->npw); - FPTYPE evloc=0.0; + FPTYPE evloc=0.0; FPTYPE fact=1.0; const int nspin_rho = (PARAM.inp.nspin == 2) ? 2 : 1; @@ -189,7 +188,7 @@ const UnitCell& ucell_in // - int igl0; + int igl0 = 0; this->device = base_device::get_device_type(this->ctx); std::vector gx_arr(rho_basis->ngg+1); @@ -277,7 +276,7 @@ void Stress_Func::dvloc_coulomb(const UnitCell& ucell, FPTYPE* dvloc, ModulePW::PW_Basis* rho_basis) { - int igl0; + int igl0 = 0; // start from |G|=0 or not. if (rho_basis->gg_uniq[0] < 1.0e-8) { diff --git a/source/source_pw/module_pwdft/stress_func_mgga.cpp b/source/source_pw/module_pwdft/stress_mgga.cpp similarity index 98% rename from source/source_pw/module_pwdft/stress_func_mgga.cpp rename to source/source_pw/module_pwdft/stress_mgga.cpp index b2d9ffe841..35201b51bb 100644 --- a/source/source_pw/module_pwdft/stress_func_mgga.cpp +++ b/source/source_pw/module_pwdft/stress_mgga.cpp @@ -1,7 +1,6 @@ #include "source_base/timer.h" #include "source_hamilt/module_xc/xc_functional.h" #include "source_io/module_parameter/parameter.h" -#include "source_pw/module_pwdft/global.h" #include "stress_func.h" #include diff --git a/source/source_pw/module_pwdft/stress_func_nl.cpp b/source/source_pw/module_pwdft/stress_nl.cpp similarity index 99% rename from source/source_pw/module_pwdft/stress_func_nl.cpp rename to source/source_pw/module_pwdft/stress_nl.cpp index b5bc653074..3f825cc650 100644 --- a/source/source_pw/module_pwdft/stress_func_nl.cpp +++ b/source/source_pw/module_pwdft/stress_nl.cpp @@ -5,7 +5,6 @@ #include "source_base/module_device/device.h" #include "source_base/timer.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/nonlocal_maths.hpp" #include "stress_func.h" // calculate the nonlocal pseudopotential stress in PW diff --git a/source/source_pw/module_pwdft/stress_func_onsite.cpp b/source/source_pw/module_pwdft/stress_onsite.cpp similarity index 94% rename from source/source_pw/module_pwdft/stress_func_onsite.cpp rename to source/source_pw/module_pwdft/stress_onsite.cpp index 1be9831556..bcd37d900f 100644 --- a/source/source_pw/module_pwdft/stress_func_onsite.cpp +++ b/source/source_pw/module_pwdft/stress_onsite.cpp @@ -10,7 +10,8 @@ template void Stress_Func::stress_onsite(ModuleBase::matrix& sigma, const ModuleBase::matrix& wg, const ModulePW::PW_Basis_K* wfc_basis, - const UnitCell& ucell_in, + const UnitCell& ucell_in, + const Plus_U &dftu, // mohan add 2025-11-06 const psi::Psi , Device>* psi_in, ModuleSymmetry::Symmetry* p_symm) { @@ -56,13 +57,12 @@ void Stress_Func::stress_onsite(ModuleBase::matrix& sigma, onsite_p->get_fs_tools()->cal_dbecp_s(ik, npm, ipol, jpol); if(PARAM.inp.dft_plus_u) { - auto* dftu = ModuleDFTU::DFTU::get_instance(); onsite_p->get_fs_tools()->cal_stress_dftu(ik, npm, stress_device_tmp, - dftu->orbital_corr.data(), - dftu->get_eff_pot_pw(0), - dftu->get_size_eff_pot_pw(), + dftu.orbital_corr.data(), + dftu.get_eff_pot_pw(0), + dftu.get_size_eff_pot_pw(), wg.c); } if(PARAM.inp.sc_mag_switch) diff --git a/source/source_pw/module_pwdft/stress_pw.cpp b/source/source_pw/module_pwdft/stress_pw.cpp index fb5bfd026b..8fe96823bb 100644 --- a/source/source_pw/module_pwdft/stress_pw.cpp +++ b/source/source_pw/module_pwdft/stress_pw.cpp @@ -1,13 +1,16 @@ #include "stress_pw.h" #include "source_base/timer.h" +#include "source_base/global_variable.h" // use GlobalC #include "source_hamilt/module_vdw/vdw.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" +#include "source_hamilt/module_xc/xc_functional.h" +#include "source_hamilt/module_xc/exx_info.h" // use GlobalC::exx_info template void Stress_PW::cal_stress(ModuleBase::matrix& sigmatot, UnitCell& ucell, + Plus_U &dftu, // mhan add 2025-11-07 const pseudopot_cell_vl& locpp, const pseudopot_cell_vnl& nlpp, ModulePW::PW_Basis* rho_basis, @@ -91,7 +94,7 @@ void Stress_PW::cal_stress(ModuleBase::matrix& sigmatot, this->stress_mgga(ucell, sigmaxc, this->pelec->wg, - this->pelec->pot->get_effective_vofk(), + this->pelec->pot->get_eff_vofk(), pelec->charge, p_kv, wfc_basis, @@ -119,7 +122,7 @@ void Stress_PW::cal_stress(ModuleBase::matrix& sigmatot, // DFT+U and DeltaSpin stress if (PARAM.inp.dft_plus_u || PARAM.inp.sc_mag_switch) { - this->stress_onsite(sigmaonsite, this->pelec->wg, wfc_basis, ucell, d_psi_in, p_symm); + this->stress_onsite(sigmaonsite, this->pelec->wg, wfc_basis, ucell, dftu, d_psi_in, p_symm); } // EXX PW stress diff --git a/source/source_pw/module_pwdft/stress_pw.h b/source/source_pw/module_pwdft/stress_pw.h index a9ac9decb5..dde4688681 100644 --- a/source/source_pw/module_pwdft/stress_pw.h +++ b/source/source_pw/module_pwdft/stress_pw.h @@ -2,8 +2,9 @@ #define STRESS_PW_H #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "stress_func.h" +#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-07 template class Stress_PW : public Stress_Func @@ -13,15 +14,16 @@ class Stress_PW : public Stress_Func // calculate the stress in PW basis void cal_stress(ModuleBase::matrix& smearing_sigmatot, - UnitCell& ucell, - const pseudopot_cell_vl& locpp, - const pseudopot_cell_vnl& nlpp, - ModulePW::PW_Basis* rho_basis, - ModuleSymmetry::Symmetry* p_symm, - Structure_Factor* p_sf, - K_Vectors* p_kv, - ModulePW::PW_Basis_K* wfc_basis, - const psi::Psi , Device>* d_psi_in = nullptr); + UnitCell& ucell, + Plus_U &dftu, // mhan add 2025-11-07 + const pseudopot_cell_vl& locpp, + const pseudopot_cell_vnl& nlpp, + ModulePW::PW_Basis* rho_basis, + ModuleSymmetry::Symmetry* p_symm, + Structure_Factor* p_sf, + K_Vectors* p_kv, + ModulePW::PW_Basis_K* wfc_basis, + const psi::Psi , Device>* d_psi_in = nullptr); protected: // call the vdw stress diff --git a/source/source_pw/module_pwdft/stress_func_us.cpp b/source/source_pw/module_pwdft/stress_us.cpp similarity index 92% rename from source/source_pw/module_pwdft/stress_func_us.cpp rename to source/source_pw/module_pwdft/stress_us.cpp index adb8745901..e18ffb9823 100644 --- a/source/source_pw/module_pwdft/stress_func_us.cpp +++ b/source/source_pw/module_pwdft/stress_us.cpp @@ -26,7 +26,7 @@ void Stress_PW::stress_us(ModuleBase::matrix& sigma, ModuleBase::matrix stressus(3, 3); - ModuleBase::matrix veff = this->pelec->pot->get_effective_v(); + ModuleBase::matrix veff = this->pelec->pot->get_eff_v(); ModuleBase::ComplexMatrix vg(PARAM.inp.nspin, npw); // fourier transform of the total effective potential for (int is = 0; is < PARAM.inp.nspin; is++) @@ -111,19 +111,19 @@ void Stress_PW::stress_us(ModuleBase::matrix& sigma, const int dim = 2 * npw; const double one = 1; const double zero = 0; - dgemm_(&transa, - &transb, - &dim, - &PARAM.inp.nspin, - &nij, - &one, - qgm_data, - &dim, + BlasConnector::gemm(transb, + transa, + PARAM.inp.nspin, + dim, + nij, + one, tbecsum.c, - &nij, - &zero, + nij, + qgm_data, + dim, + zero, aux2_data, - &dim); + dim); for (int is = 0; is < PARAM.inp.nspin; is++) { @@ -148,19 +148,19 @@ void Stress_PW::stress_us(ModuleBase::matrix& sigma, ModuleBase::matrix fac(PARAM.inp.nspin, 3); const char transc = 'T'; const int three = 3; - dgemm_(&transc, - &transb, - &three, - &PARAM.inp.nspin, - &dim, - &one, + BlasConnector::gemm_cm(transc, + transb, + three, + PARAM.inp.nspin, + dim, + one, aux1_data, - &dim, + dim, aux2_data, - &dim, - &zero, + dim, + zero, fac.c, - &three); + three); for (int is = 0; is < PARAM.inp.nspin; is++) { diff --git a/source/source_pw/module_pwdft/structure_factor.cpp b/source/source_pw/module_pwdft/structure_factor.cpp index b97bdee944..44484f59d2 100644 --- a/source/source_pw/module_pwdft/structure_factor.cpp +++ b/source/source_pw/module_pwdft/structure_factor.cpp @@ -3,7 +3,6 @@ #include "source_io/module_parameter/parameter.h" #include "structure_factor.h" #include "source_base/constants.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/math_bspline.h" #include "source_base/memory.h" #include "source_base/timer.h" @@ -46,7 +45,7 @@ Structure_Factor::~Structure_Factor() // called in input.cpp void Structure_Factor::set(const ModulePW::PW_Basis* rho_basis_in, const int& nbspline_in) { - ModuleBase::TITLE("PW_Basis","set"); + ModuleBase::TITLE("Structure_Factor","set"); this->rho_basis = rho_basis_in; this->nbspline = nbspline_in; return; @@ -54,10 +53,11 @@ void Structure_Factor::set(const ModulePW::PW_Basis* rho_basis_in, const int& nb // Peize Lin optimize and add OpenMP 2021.04.01 // Calculate structure factor -void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Parallel_Grid& pgrid, const ModulePW::PW_Basis* rho_basis) +void Structure_Factor::setup(const UnitCell* Ucell, const Parallel_Grid& pgrid, const ModulePW::PW_Basis* rho_basis) { - ModuleBase::TITLE("PW_Basis","setup_structure_factor"); - ModuleBase::timer::tick("PW_Basis","setup_struc_factor"); + ModuleBase::TITLE("Structure_Factor","setup"); + ModuleBase::timer::tick("Structure_Factor","setup"); + const std::complex ci_tpi = ModuleBase::NEG_IMAG_UNIT * ModuleBase::TWO_PI; this->ucell = Ucell; this->strucFac.create(Ucell->ntype, rho_basis->npw); @@ -66,9 +66,15 @@ void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Paral // std::string outstr; // outstr = PARAM.globalv.global_out_dir + "strucFac.dat"; // std::ofstream ofs( outstr.c_str() ) ; - bool usebspline; - if(nbspline > 0) { usebspline = true; - } else { usebspline = false;} + bool usebspline; + if(nbspline > 0) + { + usebspline = true; + } + else + { + usebspline = false; + } if(usebspline) { @@ -100,12 +106,15 @@ void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Paral // ofs.close(); - int i,j; //ng; + int i=0; + int j=0; + this->eigts1.create(Ucell->nat, 2*rho_basis->nx + 1); this->eigts2.create(Ucell->nat, 2*rho_basis->ny + 1); this->eigts3.create(Ucell->nat, 2*rho_basis->nz + 1); - ModuleBase::Memory::record("SF::eigts123",sizeof(std::complex) * (Ucell->nat*2 * (rho_basis->nx + rho_basis->ny + rho_basis->nz) + 3)); + ModuleBase::Memory::record("SF::eigts123",sizeof(std::complex) + * (Ucell->nat*2 * (rho_basis->nx + rho_basis->ny + rho_basis->nz) + 3)); ModuleBase::Vector3 gtau; int inat = 0; @@ -177,7 +186,7 @@ void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Paral this->z_eigts3 = this->eigts3.c; // There's no need to delete double precision pointers while in a CPU environment. } - ModuleBase::timer::tick("PW_Basis","setup_struc_factor"); + ModuleBase::timer::tick("Structure_Factor","setup"); return; } @@ -298,7 +307,7 @@ void Structure_Factor::bspline_sf(const int norder, return; } -void Structure_Factor:: bsplinecoef(std::complex *b1, std::complex *b2, std::complex *b3, +void Structure_Factor::bsplinecoef(std::complex *b1, std::complex *b2, std::complex *b3, const int nx, const int ny, const int nz, const int norder) { const std::complex ci_tpi = ModuleBase::NEG_IMAG_UNIT * ModuleBase::TWO_PI; @@ -379,4 +388,4 @@ template <> std::complex * Structure_Factor::get_eigts3_data() const { return this->z_eigts3; -} \ No newline at end of file +} diff --git a/source/source_pw/module_pwdft/structure_factor.h b/source/source_pw/module_pwdft/structure_factor.h index 36e9185400..6de0a5b0e3 100644 --- a/source/source_pw/module_pwdft/structure_factor.h +++ b/source/source_pw/module_pwdft/structure_factor.h @@ -1,5 +1,5 @@ -#ifndef PLANEWAVE_H -#define PLANEWAVE_H +#ifndef STRUCTURE_FACTOR_H +#define STRUCTURE_FACTOR_H #include "source_base/complexmatrix.h" #include "source_basis/module_pw/pw_basis_k.h" @@ -23,9 +23,10 @@ class Structure_Factor // structure factor (ntype, ngmc) ModuleBase::ComplexMatrix strucFac; - void setup_structure_factor(const UnitCell* Ucell, - const Parallel_Grid& pgrid, - const ModulePW::PW_Basis* rho_basis); // Calculate structure factors + + void setup(const UnitCell* Ucell, + const Parallel_Grid& pgrid, + const ModulePW::PW_Basis* rho_basis); // Calculate structure factors /// calculate structure factors through Cardinal B-spline interpolation void bspline_sf( @@ -33,6 +34,7 @@ class Structure_Factor const UnitCell* Ucell, const Parallel_Grid& pgrid, const ModulePW::PW_Basis* rho_basis); + void bsplinecoef(std::complex *b1, std::complex *b2, std::complex *b3, const int nx, const int ny, const int nz, const int norder); @@ -51,7 +53,9 @@ class Structure_Factor // sf with k points std::complex* get_sk(const int ik, const int it, const int ia, const ModulePW::PW_Basis_K* wfc_basis) const; template + void get_sk(Device* ctx, const int ik, const ModulePW::PW_Basis_K* wfc_basis, std::complex* sk) const; + std::complex* get_skq(int ik, int it, int ia, @@ -59,9 +63,16 @@ class Structure_Factor ModuleBase::Vector3 q); private: + const UnitCell* ucell=nullptr; - std::complex * c_eigts1 = nullptr, * c_eigts2 = nullptr, * c_eigts3 = nullptr; - std::complex * z_eigts1 = nullptr, * z_eigts2 = nullptr, * z_eigts3 = nullptr; + std::complex * c_eigts1 = nullptr; + std::complex * c_eigts2 = nullptr; + std::complex * c_eigts3 = nullptr; + + std::complex * z_eigts1 = nullptr; + std::complex * z_eigts2 = nullptr; + std::complex * z_eigts3 = nullptr; + const ModulePW::PW_Basis* rho_basis = nullptr; std::string device = "cpu"; }; diff --git a/source/source_pw/module_pwdft/structure_factor_k.cpp b/source/source_pw/module_pwdft/structure_factor_k.cpp index ea071cd409..52dc326545 100644 --- a/source/source_pw/module_pwdft/structure_factor_k.cpp +++ b/source/source_pw/module_pwdft/structure_factor_k.cpp @@ -1,9 +1,9 @@ #include "source_base/memory.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/kernels/wf_op.h" #include "source_base/module_device/device.h" #include "structure_factor.h" + std::complex* Structure_Factor::get_sk(const int ik, const int it, const int ia, @@ -179,4 +179,4 @@ template void Structure_Factor::get_sk(base_dev int, const ModulePW::PW_Basis_K*, std::complex*) const; -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_pwdft/test/CMakeLists.txt b/source/source_pw/module_pwdft/test/CMakeLists.txt index 5922b02567..e508bca485 100644 --- a/source/source_pw/module_pwdft/test/CMakeLists.txt +++ b/source/source_pw/module_pwdft/test/CMakeLists.txt @@ -33,7 +33,7 @@ AddTest( LIBS parameter ${math_libs} base device planewave SOURCES structure_factor_test.cpp ../structure_factor.cpp ../parallel_grid.cpp ../../../source_cell/unitcell.cpp - ../../../source_io/output.cpp + ../../../source_io/module_output/output.cpp ../../../source_cell/update_cell.cpp ../../../source_cell/bcast_cell.cpp ../../../source_cell/print_cell.cpp @@ -43,6 +43,7 @@ AddTest( ../../../source_cell/read_stru.cpp ../../../source_cell/read_atom_species.cpp ../../../source_cell/read_atoms.cpp + ../../../source_cell/read_atoms_helper.cpp ../../../source_cell/read_pp.cpp ../../../source_cell/read_pp_complete.cpp ../../../source_cell/read_pp_upf100.cpp diff --git a/source/source_pw/module_pwdft/test/structure_factor_test.cpp b/source/source_pw/module_pwdft/test/structure_factor_test.cpp index c0f5078a72..0a1866a3f4 100644 --- a/source/source_pw/module_pwdft/test/structure_factor_test.cpp +++ b/source/source_pw/module_pwdft/test/structure_factor_test.cpp @@ -75,7 +75,7 @@ TEST_F(StructureFactorTest, set) TEST_F(StructureFactorTest, setup_structure_factor_double) { rho_basis->npw = 10; - SF.setup_structure_factor(ucell,*pgrid,rho_basis); + SF.setup(ucell,*pgrid,rho_basis); for (int i=0;i< ucell->nat * (2 * rho_basis->nx + 1);i++) { @@ -100,7 +100,7 @@ TEST_F(StructureFactorTest, setup_structure_factor_float) { PARAM.sys.has_float_data = true; rho_basis->npw = 10; - SF.setup_structure_factor(ucell,*pgrid,rho_basis); + SF.setup(ucell,*pgrid,rho_basis); for (int i=0;i< ucell->nat * (2 * rho_basis->nx + 1);i++) { @@ -125,4 +125,4 @@ int main() { testing::InitGoogleTest(); return RUN_ALL_TESTS(); -} \ No newline at end of file +} diff --git a/source/source_pw/module_pwdft/VL_in_pw.cpp b/source/source_pw/module_pwdft/vl_pw.cpp similarity index 97% rename from source/source_pw/module_pwdft/VL_in_pw.cpp rename to source/source_pw/module_pwdft/vl_pw.cpp index 87e14dcced..76ee526fbc 100644 --- a/source/source_pw/module_pwdft/VL_in_pw.cpp +++ b/source/source_pw/module_pwdft/vl_pw.cpp @@ -1,9 +1,9 @@ -#include "VL_in_pw.h" +#include "vl_pw.h" #include "source_io/module_parameter/parameter.h" #include "source_base/libm/libm.h" +#include "source_base/truncated_func.h" #include "source_base/math_integral.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" pseudopot_cell_vl::pseudopot_cell_vl() { @@ -227,8 +227,7 @@ void pseudopot_cell_vl::vloc_of_g(const int& msh, aux [ir] = aux1 [ir] * ModuleBase::libm::sin(gx * r [ir]) / gx; } ModuleBase::Integral::Simpson_Integral(msh, aux, rab, vloc_1d[ig] ); - // here we add the analytic fourier transform of the erf function - vloc_1d[ig] -= fac * ModuleBase::libm::exp(- gx2 * 0.25)/ gx2; + vloc_1d[ig] -= fac * ModuleBase::truncated_exp(- gx2 * 0.25)/ gx2; } // enddo const double d_fpi_omega = ModuleBase::FOUR_PI/ucell.omega;//mohan add 2008-06-04 diff --git a/source/source_pw/module_pwdft/VL_in_pw.h b/source/source_pw/module_pwdft/vl_pw.h similarity index 100% rename from source/source_pw/module_pwdft/VL_in_pw.h rename to source/source_pw/module_pwdft/vl_pw.h diff --git a/source/source_pw/module_pwdft/VNL_in_pw.cpp b/source/source_pw/module_pwdft/vnl_pw.cpp similarity index 98% rename from source/source_pw/module_pwdft/VNL_in_pw.cpp rename to source/source_pw/module_pwdft/vnl_pw.cpp index e26e09fa3e..3a1fdda873 100644 --- a/source/source_pw/module_pwdft/VNL_in_pw.cpp +++ b/source/source_pw/module_pwdft/vnl_pw.cpp @@ -1,4 +1,4 @@ -#include "VNL_in_pw.h" +#include "vnl_pw.h" #include "source_io/module_parameter/parameter.h" #include "source_base/clebsch_gordan_coeff.h" @@ -9,11 +9,13 @@ #include "source_base/math_sphbes.h" #include "source_base/math_ylmreal.h" #include "source_base/memory.h" +#include "source_base/parallel_reduce.h" #include "source_base/module_device/device.h" #include "source_base/timer.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/kernels/vnl_op.h" +#include "source_base/parallel_comm.h" // use POOL_WORLD + pseudopot_cell_vnl::pseudopot_cell_vnl() { @@ -340,7 +342,7 @@ void pseudopot_cell_vnl::getvnl(Device* ctx, ModuleBase::Vector3* _gk = new ModuleBase::Vector3[npw]; #ifdef _OPENMP -#pragma omp parallel for schedule(static, 4096 / sizeof(FPTYPE)) +#pragma omp parallel for schedule(static) #endif for (int ig = 0; ig < npw; ig++) { @@ -683,8 +685,8 @@ void pseudopot_cell_vnl::init_vnl(UnitCell& cell, const ModulePW::PW_Basis* rho_ } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, this->qq_nt.ptr, this->qq_nt.getSize(), MPI_DOUBLE, MPI_SUM, POOL_WORLD); - MPI_Allreduce(MPI_IN_PLACE, this->qq_so.ptr, this->qq_so.getSize(), MPI_DOUBLE_COMPLEX, MPI_SUM, POOL_WORLD); + Parallel_Reduce::reduce_pool(this->qq_nt.ptr, this->qq_nt.getSize()); + Parallel_Reduce::reduce_pool(this->qq_so.ptr, this->qq_so.getSize()); #endif // set the atomic specific qq_at matrices @@ -824,7 +826,7 @@ void pseudopot_cell_vnl::compute_qrad(UnitCell& cell) aux[ir] = besr[ir] * upf->qfuncl(l, ijv, ir); } // then we integrate with all the Q functions - double vqint; + double vqint = 0.0; ModuleBase::Integral::Simpson_Integral(kkbeta, aux, upf->rab.data(), vqint); qrad(it, l, ijv, iq) = vqint * pref; } @@ -1233,7 +1235,7 @@ void pseudopot_cell_vnl::init_vnl_alpha(const UnitCell& ucell) // pengfei Li 201 aux[ir] = ucell.atoms[it].ncpp.betar(ib, ir) * jl[ir] * ucell.atoms[it].ncpp.r[ir] * ucell.atoms[it].ncpp.r[ir]; } - double vqint; + double vqint = 0.0; ModuleBase::Integral::Simpson_Integral(kkbeta, aux, ucell.atoms[it].ncpp.rab.data(), vqint); this->tab_alpha(it, ib, L, iq) = vqint * pref; } @@ -1468,19 +1470,19 @@ void pseudopot_cell_vnl::newq(const ModuleBase::matrix& veff, const ModulePW::PW double* qg_ptr = reinterpret_cast(qg.c); double* aux_ptr = reinterpret_cast(aux.c); - dgemm_(&transa, - &transb, - &nij, - &natom, - &complex_npw, - &fact, - qg_ptr, - &complex_npw, + BlasConnector::gemm(transb, + transa, + natom, + nij, + complex_npw, + fact, aux_ptr, - &complex_npw, - &zero, + complex_npw, + qg_ptr, + complex_npw, + zero, deeaux.c, - &nij); + nij); // I'm not sure if this is correct for gamma_only if (rho_basis->gamma_only && rho_basis->ig_gge0 >= 0) { @@ -1510,7 +1512,7 @@ void pseudopot_cell_vnl::newq(const ModuleBase::matrix& veff, const ModulePW::PW } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, deeq.ptr, deeq.getSize(), MPI_DOUBLE, MPI_SUM, POOL_WORLD); + Parallel_Reduce::reduce_pool(deeq.ptr,deeq.getSize()); #endif delete[] qnorm; diff --git a/source/source_pw/module_pwdft/VNL_in_pw.h b/source/source_pw/module_pwdft/vnl_pw.h similarity index 100% rename from source/source_pw/module_pwdft/VNL_in_pw.h rename to source/source_pw/module_pwdft/vnl_pw.h diff --git a/source/source_pw/module_pwdft/VNL_grad_pw.cpp b/source/source_pw/module_pwdft/vnl_pw_grad.cpp similarity index 98% rename from source/source_pw/module_pwdft/VNL_grad_pw.cpp rename to source/source_pw/module_pwdft/vnl_pw_grad.cpp index 34009da082..7e22df63bc 100644 --- a/source/source_pw/module_pwdft/VNL_grad_pw.cpp +++ b/source/source_pw/module_pwdft/vnl_pw_grad.cpp @@ -1,11 +1,11 @@ -#include "VNL_in_pw.h" +#include "vnl_pw.h" #include "source_base/math_sphbes.h" #include "source_io/module_parameter/parameter.h" #include "source_base/timer.h" #include "source_base/math_ylmreal.h" #include "source_base/math_integral.h" #include "source_base/math_polyint.h" -#include "source_pw/module_pwdft/global.h" + void pseudopot_cell_vnl::initgradq_vnl(const UnitCell &cell) { const int nbrx = 10; @@ -47,7 +47,7 @@ void pseudopot_cell_vnl::initgradq_vnl(const UnitCell &cell) aux[ir] = cell.atoms[it].ncpp.betar(ib, ir) * djl[ir] * pow(cell.atoms[it].ncpp.r[ir],2); } - double vqint; + double vqint = 0.0; ModuleBase::Integral::Simpson_Integral(kkbeta, aux, cell.atoms[it].ncpp.rab.data(), vqint); this->tab_dq(it, ib, iq) = vqint * pref; } @@ -183,4 +183,4 @@ void pseudopot_cell_vnl::getgradq_vnl(const UnitCell& ucell, ModuleBase::timer::tick("pp_cell_vnl","getvnl"); return; -} \ No newline at end of file +} diff --git a/source/source_pw/module_pwdft/VSep_in_pw.cpp b/source/source_pw/module_pwdft/vsep_pw.cpp similarity index 99% rename from source/source_pw/module_pwdft/VSep_in_pw.cpp rename to source/source_pw/module_pwdft/vsep_pw.cpp index ee49a839a0..569ae0131c 100644 --- a/source/source_pw/module_pwdft/VSep_in_pw.cpp +++ b/source/source_pw/module_pwdft/vsep_pw.cpp @@ -1,4 +1,4 @@ -#include "VSep_in_pw.h" +#include "vsep_pw.h" #include "source_base/constants.h" #include "source_base/libm/libm.h" diff --git a/source/source_pw/module_pwdft/VSep_in_pw.h b/source/source_pw/module_pwdft/vsep_pw.h similarity index 100% rename from source/source_pw/module_pwdft/VSep_in_pw.h rename to source/source_pw/module_pwdft/vsep_pw.h diff --git a/source/source_pw/module_stodft/hamilt_sdft_pw.cpp b/source/source_pw/module_stodft/hamilt_sdft_pw.cpp index fac4e7f867..b1e752c50e 100644 --- a/source/source_pw/module_stodft/hamilt_sdft_pw.cpp +++ b/source/source_pw/module_stodft/hamilt_sdft_pw.cpp @@ -10,11 +10,11 @@ HamiltSdftPW::HamiltSdftPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* p_kv, pseudopot_cell_vnl* nlpp, - const UnitCell* ucell, - const int& npol, + const UnitCell* ucell, + const int& npol, Real* emin_in, Real* emax_in) - : HamiltPW(pot_in, wfc_basis, p_kv, nlpp,ucell), ngk(p_kv->ngk) + : HamiltPW(pot_in, wfc_basis, p_kv, nlpp, nullptr, ucell), ngk(p_kv->ngk) { this->classname = "HamiltSdftPW"; this->npwk_max = wfc_basis->npwk_max; @@ -69,4 +69,4 @@ template class HamiltSdftPW, base_device::DEVICE_GPU>; template class HamiltSdftPW, base_device::DEVICE_GPU>; #endif -} // namespace hamilt \ No newline at end of file +} // namespace hamilt diff --git a/source/source_pw/module_stodft/hamilt_sdft_pw.h b/source/source_pw/module_stodft/hamilt_sdft_pw.h index 39bc2bc13e..282ebec424 100644 --- a/source/source_pw/module_stodft/hamilt_sdft_pw.h +++ b/source/source_pw/module_stodft/hamilt_sdft_pw.h @@ -26,7 +26,7 @@ class HamiltSdftPW : public HamiltPW K_Vectors* p_kv, pseudopot_cell_vnl* nlpp, const UnitCell* ucell, - const int& npol, + const int& npol, Real* emin_in, Real* emax_in); /** @@ -64,4 +64,4 @@ class HamiltSdftPW : public HamiltPW } // namespace hamilt -#endif \ No newline at end of file +#endif diff --git a/source/source_pw/module_stodft/kernels/cuda/hpsi_norm_op.cu b/source/source_pw/module_stodft/kernels/cuda/hpsi_norm_op.cu index 2ccc8934cd..9c9be7b7de 100644 --- a/source/source_pw/module_stodft/kernels/cuda/hpsi_norm_op.cu +++ b/source/source_pw/module_stodft/kernels/cuda/hpsi_norm_op.cu @@ -40,7 +40,7 @@ void hamilt::hpsi_norm_op::operator()(const bas npwk_max, npwk, Ebar, DeltaE, reinterpret_cast*>(hpsi), reinterpret_cast*>(psi_in)); - cudaCheckOnDebug(); + CHECK_CUDA_SYNC(); } template struct hpsi_norm_op; diff --git a/source/source_pw/module_stodft/sto_dos.cpp b/source/source_pw/module_stodft/sto_dos.cpp index 8a8f2cce9b..2665dde510 100644 --- a/source/source_pw/module_stodft/sto_dos.cpp +++ b/source/source_pw/module_stodft/sto_dos.cpp @@ -157,7 +157,7 @@ void Sto_DOS::caldos(const double sigmain, const double de, cons double* vec_all = (double*)allorderchi.data(); int LDA = npwx * nchipk_new * 2; int M = npwx * nchipk_new * 2; - dgemm_(&trans, &normal, &N, &N, &M, &kweight, vec_all, &LDA, vec_all, &LDA, &one, spolyv.data(), &N); + BlasConnector::gemm(normal, trans, N, N, M, kweight, vec_all, LDA, vec_all, LDA, one, spolyv.data(), N); } } } @@ -235,9 +235,9 @@ void Sto_DOS::caldos(const double sigmain, const double de, cons } #ifdef __MPI MPI_Allreduce(MPI_IN_PLACE, ks_dos.data(), ndos, MPI_DOUBLE, MPI_SUM, INT_BGROUP); - MPI_Allreduce(MPI_IN_PLACE, sto_dos.data(), ndos, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, error.data(), ndos, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); -#endif + Parallel_Reduce::reduce_all(sto_dos.data(), ndos); + Parallel_Reduce::reduce_all(error.data(), ndos); + #endif if (GlobalV::MY_RANK == 0) { std::string dosfile = PARAM.globalv.global_out_dir + "dos_sdft.txt"; diff --git a/source/source_pw/module_stodft/sto_elecond.cpp b/source/source_pw/module_stodft/sto_elecond.cpp index b0fe4d71d7..1a32e9db83 100644 --- a/source/source_pw/module_stodft/sto_elecond.cpp +++ b/source/source_pw/module_stodft/sto_elecond.cpp @@ -1059,9 +1059,9 @@ void Sto_EleCond::sKG(const int& smear_type, } // ik loop ModuleBase::timer::tick("Sto_EleCond", "kloop"); #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, ct11.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, ct12.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, ct22.data(), nt, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(ct11.data(), nt); + Parallel_Reduce::reduce_all(ct12.data(), nt); + Parallel_Reduce::reduce_all(ct22.data(), nt); #endif //------------------------------------------------------------------ diff --git a/source/source_pw/module_stodft/sto_forces.cpp b/source/source_pw/module_stodft/sto_forces.cpp index 35ed90a80b..4e57ae98c7 100644 --- a/source/source_pw/module_stodft/sto_forces.cpp +++ b/source/source_pw/module_stodft/sto_forces.cpp @@ -5,8 +5,7 @@ #include "source_estate/elecstate.h" #include "source_estate/module_pot/efield.h" #include "source_estate/module_pot/gatefield.h" -#include "source_pw/module_pwdft/global.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" #include "source_io/module_parameter/parameter.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" @@ -109,7 +108,7 @@ void Sto_Forces::cal_stoforce(ModuleBase::matrix& force, if (ModuleSymmetry::Symmetry::symm_flag == 1) { - double d1, d2, d3; + double d1 = 0.0, d2 = 0.0, d3 = 0.0; for (int iat = 0; iat < ucell.nat; iat++) { ModuleBase::Mathzone::Cartesian_to_Direct(force(iat, 0), diff --git a/source/source_pw/module_stodft/sto_iter.cpp b/source/source_pw/module_stodft/sto_iter.cpp index aa9990a415..de719fe929 100644 --- a/source/source_pw/module_stodft/sto_iter.cpp +++ b/source/source_pw/module_stodft/sto_iter.cpp @@ -8,7 +8,6 @@ #include "source_base/tool_title.h" #include "source_estate/kernels/elecstate_op.h" #include "source_estate/occupy.h" -#include "source_pw/module_pwdft/global.h" #include "source_hsolver/para_linear_transform.h" #include "source_io/module_parameter/parameter.h" @@ -204,8 +203,8 @@ void Stochastic_Iter::checkemm(const int& ik, if (ik == nks - 1) { #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, p_hamilt_sto->emax, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, p_hamilt_sto->emin, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD); + Parallel_Reduce::reduce_max(*p_hamilt_sto->emax); + Parallel_Reduce::reduce_min(*p_hamilt_sto->emin); MPI_Allreduce(MPI_IN_PLACE, &change, 1, MPI_CHAR, MPI_LOR, MPI_COMM_WORLD); #endif if (change) @@ -249,7 +248,7 @@ void Stochastic_Iter::check_precision(const double ref, const double } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &error, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(error); #endif double relative_error = std::abs(error / ref); GlobalV::ofs_running << info << "Relative Chebyshev Precision: " << relative_error * 1e9 << "E-09" << std::endl; @@ -274,7 +273,7 @@ void Stochastic_Iter::itermu(const int iter, elecstate::ElecState* pe { ModuleBase::TITLE("Stochastic_Iter", "itermu"); ModuleBase::timer::tick("Stochastic_Iter", "itermu"); - double dmu; + double dmu = 0.0; if (iter == 1) { dmu = 2; @@ -295,8 +294,8 @@ void Stochastic_Iter::itermu(const int iter, elecstate::ElecState* pe double ne2 = calne(pes); double mu2 = this->stofunc.mu; double Dne = th_ne + 1; - double ne3; - double mu3; + double ne3 = 0.0; + double mu3 = 0.0; while (ne1 > targetne) { @@ -441,7 +440,7 @@ double Stochastic_Iter::calne(elecstate::ElecState* pes) double totne = 0; KS_ne = 0; const int norder = p_che->norder; - double sto_ne; + double sto_ne = 0.0; if (this->method == 1) { // Note: spolyv contains kv.wk[ik] @@ -473,7 +472,7 @@ double Stochastic_Iter::calne(elecstate::ElecState* pes) { MPI_Allreduce(MPI_IN_PLACE, &KS_ne, 1, MPI_DOUBLE, MPI_SUM, BP_WORLD); } - MPI_Allreduce(MPI_IN_PLACE, &sto_ne, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(sto_ne); #endif totne = KS_ne + sto_ne; @@ -540,7 +539,7 @@ void Stochastic_Iter::sum_stoeband(Stochastic_WF& stowf, { MPI_Allreduce(MPI_IN_PLACE, &pes->f_en.demet, 1, MPI_DOUBLE, MPI_SUM, BP_WORLD); } - MPI_Allreduce(MPI_IN_PLACE, &stodemet, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(stodemet); #endif pes->f_en.demet += stodemet; this->check_precision(pes->f_en.demet, 1e-4, "TS"); @@ -581,7 +580,7 @@ void Stochastic_Iter::sum_stoeband(Stochastic_WF& stowf, } } #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &sto_eband, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); + Parallel_Reduce::reduce_all(sto_eband); #endif pes->f_en.eband += sto_eband; ModuleBase::timer::tick("Stochastic_Iter", "sum_stoeband"); @@ -695,7 +694,7 @@ void Stochastic_Iter::cal_storho(const UnitCell& ucell, sto_ne *= ucell.omega / wfc_basis->nxyz; #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, &sto_ne, 1, MPI_DOUBLE, MPI_SUM, POOL_WORLD); + Parallel_Reduce::reduce_pool(sto_ne); #endif double factor = targetne / (KS_ne + sto_ne); if (std::abs(factor - 1) > 1e-10) diff --git a/source/source_pw/module_stodft/sto_iter.h b/source/source_pw/module_stodft/sto_iter.h index 20837d708f..8a97796502 100644 --- a/source/source_pw/module_stodft/sto_iter.h +++ b/source/source_pw/module_stodft/sto_iter.h @@ -119,8 +119,8 @@ class Stochastic_Iter Sto_Func stofunc; hamilt::HamiltSdftPW* p_hamilt_sto = nullptr; - double mu0; // chemical potential; unit in Ry - bool change; + double mu0 = 0.0; // chemical potential; unit in Ry + bool change = false; double targetne=0.0; Real* spolyv = nullptr; //[Device] coefficients of Chebyshev expansion Real* spolyv_cpu = nullptr; //[CPU] coefficients of Chebyshev expansion diff --git a/source/source_pw/module_stodft/sto_stress_pw.cpp b/source/source_pw/module_stodft/sto_stress_pw.cpp index d83bd9d441..224bc6fbcb 100644 --- a/source/source_pw/module_stodft/sto_stress_pw.cpp +++ b/source/source_pw/module_stodft/sto_stress_pw.cpp @@ -3,9 +3,8 @@ #include "source_base/timer.h" #include "source_pw/module_pwdft/fs_kin_tools.h" #include "source_pw/module_pwdft/fs_nonlocal_tools.h" -#include "source_pw/module_pwdft/global.h" #include "source_pw/module_pwdft/structure_factor.h" -#include "source_io/output_log.h" +#include "source_io/module_output/output_log.h" #include "source_io/module_parameter/parameter.h" template diff --git a/source/source_pw/module_stodft/sto_stress_pw.h b/source/source_pw/module_stodft/sto_stress_pw.h index 8dbbc08804..fd47037249 100644 --- a/source/source_pw/module_stodft/sto_stress_pw.h +++ b/source/source_pw/module_stodft/sto_stress_pw.h @@ -3,7 +3,7 @@ #include "source_basis/module_pw/pw_basis_k.h" #include "source_estate/elecstate.h" -#include "source_pw/module_pwdft/VL_in_pw.h" +#include "source_pw/module_pwdft/vl_pw.h" #include "source_pw/module_pwdft/stress_func.h" #include "sto_wf.h" diff --git a/source/source_pw/module_stodft/sto_tool.cpp b/source/source_pw/module_stodft/sto_tool.cpp index de1e72e3f1..4ba359310b 100644 --- a/source/source_pw/module_stodft/sto_tool.cpp +++ b/source/source_pw/module_stodft/sto_tool.cpp @@ -2,6 +2,7 @@ #include "source_base/math_chebyshev.h" #include "source_base/parallel_device.h" +#include "source_base/parallel_reduce.h" #include "source_base/timer.h" #include "source_io/module_parameter/parameter.h" #ifdef __MPI @@ -103,8 +104,8 @@ void check_che_op::operator()(const int& nche_in, if (ik == nk - 1) { #ifdef __MPI - MPI_Allreduce(MPI_IN_PLACE, p_hamilt_sto->emax, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - MPI_Allreduce(MPI_IN_PLACE, p_hamilt_sto->emin, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD); + Parallel_Reduce::reduce_max(*p_hamilt_sto->emax); + Parallel_Reduce::reduce_min(*p_hamilt_sto->emin); #endif GlobalV::ofs_running << "New Emax " << *p_hamilt_sto->emax << " Ry; new Emin " << *p_hamilt_sto->emin << " Ry" << std::endl; diff --git a/source/source_pw/module_stodft/sto_tool.h b/source/source_pw/module_stodft/sto_tool.h index 65a8b792a0..6b0c9e2a59 100644 --- a/source/source_pw/module_stodft/sto_tool.h +++ b/source/source_pw/module_stodft/sto_tool.h @@ -53,8 +53,8 @@ struct parallel_distribution this->start = st_per; this->num_per = num_per; } - int start; - int num_per; + int start = 0; + int num_per = 0; }; #ifdef __MPI diff --git a/source/source_pw/module_stodft/sto_wf.cpp b/source/source_pw/module_stodft/sto_wf.cpp index e844503a11..2ba8db2908 100644 --- a/source/source_pw/module_stodft/sto_wf.cpp +++ b/source/source_pw/module_stodft/sto_wf.cpp @@ -1,4 +1,5 @@ #include "sto_wf.h" +#include "source_base/parallel_comm.h" // use POOL_WORLD #include "source_base/memory.h" #include "source_io/module_parameter/parameter.h" @@ -6,10 +7,7 @@ #include #include -//---------Temporary------------------------------------ #include "source_base/global_function.h" -#include "source_pw/module_pwdft/global.h" -//------------------------------------------------------ template Stochastic_WF::Stochastic_WF() @@ -168,7 +166,7 @@ void Stochastic_WF::init_com_orbitals() const bool firstrankmore = false; const int npwx = this->npwx; const int nks = this->nks; - int igroup; + int igroup = 0; // former processor calculate more bands if (firstrankmore) { @@ -221,7 +219,7 @@ void Stochastic_WF::init_com_orbitals() // give value to orbitals in one parallel group one by one. for (int ichi = 0; ichi < nchipk; ++ichi) { - int ig; + int ig = 0; if (igroup < re) { // It has more nchip. diff --git a/source/source_pw/module_stodft/test/test_hamilt_sto.cpp b/source/source_pw/module_stodft/test/test_hamilt_sto.cpp index 24ff21ffae..a1937caf05 100644 --- a/source/source_pw/module_stodft/test/test_hamilt_sto.cpp +++ b/source/source_pw/module_stodft/test/test_hamilt_sto.cpp @@ -9,7 +9,14 @@ void elecstate::Potential::cal_v_eff(Charge const*, UnitCell const*, ModuleBase: void elecstate::Potential::cal_fixed_v(double*){} template -hamilt::HamiltPW::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* p_kv, pseudopot_cell_vnl*,const UnitCell*){} +hamilt::HamiltPW::HamiltPW( + elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* p_kv, + pseudopot_cell_vnl* ppcell, + Plus_U* p_dftu, // mohan add 20251108 + const UnitCell* ucell){} + template hamilt::HamiltPW::~HamiltPW(){ delete this->ops; diff --git a/source/source_pw/module_stodft/test/test_sto_tool.cpp b/source/source_pw/module_stodft/test/test_sto_tool.cpp index a0654e1e7f..79d4cdcf22 100644 --- a/source/source_pw/module_stodft/test/test_sto_tool.cpp +++ b/source/source_pw/module_stodft/test/test_sto_tool.cpp @@ -8,7 +8,13 @@ ***********************************************/ template -hamilt::HamiltPW::HamiltPW(elecstate::Potential* pot_in, ModulePW::PW_Basis_K* wfc_basis, K_Vectors* p_kv,pseudopot_cell_vnl*,const UnitCell*){} +hamilt::HamiltPW::HamiltPW(elecstate::Potential* pot_in, + ModulePW::PW_Basis_K* wfc_basis, + K_Vectors* p_kv, + pseudopot_cell_vnl*, + Plus_U* p_dftu, // mohan add 20251108 + const UnitCell*){} + template hamilt::HamiltPW::~HamiltPW(){}; template @@ -25,9 +31,10 @@ hamilt::HamiltSdftPW::HamiltSdftPW(elecstate::Potential* pot_in, const int& npol, Real* emin_in, Real* emax_in) - : HamiltPW(pot_in, wfc_basis, p_kv, nlpp, ucell), ngk(p_kv->ngk) + : HamiltPW(pot_in, wfc_basis, p_kv, nlpp, nullptr, ucell), ngk(p_kv->ngk) { } + template void hamilt::HamiltSdftPW::hPsi_norm(const T* psi_in, T* hpsi, const int& nbands){} @@ -35,6 +42,7 @@ template class hamilt::HamiltPW, base_device::DEVICE_CPU>; template class hamilt::HamiltSdftPW, base_device::DEVICE_CPU>; template class hamilt::HamiltPW, base_device::DEVICE_CPU>; template class hamilt::HamiltSdftPW, base_device::DEVICE_CPU>; + #if ((defined __CUDA) || (defined __ROCM)) template class hamilt::HamiltPW, base_device::DEVICE_GPU>; template class hamilt::HamiltSdftPW, base_device::DEVICE_GPU>; diff --git a/source/source_relax/bfgs.cpp b/source/source_relax/bfgs.cpp index d105dc2791..078a5122f9 100644 --- a/source/source_relax/bfgs.cpp +++ b/source/source_relax/bfgs.cpp @@ -1,5 +1,4 @@ #include "bfgs.h" -#include "source_pw/module_pwdft/global.h" #include "source_base/module_external/lapack_connector.h" #include "source_io/module_parameter/parameter.h" #include "ions_move_basic.h" diff --git a/source/source_relax/bfgs.h b/source/source_relax/bfgs.h index b8872c979f..97367ae9f2 100644 --- a/source/source_relax/bfgs.h +++ b/source/source_relax/bfgs.h @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include "source_base/matrix.h" #include "source_base/matrix3.h" #include "source_cell/unitcell.h" diff --git a/source/source_relax/ions_move_bfgs.cpp b/source/source_relax/ions_move_bfgs.cpp index 9c52010862..ee8a9d97e9 100644 --- a/source/source_relax/ions_move_bfgs.cpp +++ b/source/source_relax/ions_move_bfgs.cpp @@ -144,7 +144,7 @@ void Ions_Move_BFGS::restart_bfgs(const double& lat0) std::ifstream hess_file("hess_in"); if(hess_file) { - int rank1,rank2; + int rank1 = 0, rank2 = 0; hess_file >> rank1 >> rank2; if(rank1 == dim && rank2 == dim) { diff --git a/source/source_relax/lattice_change_basic.cpp b/source/source_relax/lattice_change_basic.cpp index d6cfaec9ef..47b0c283e1 100644 --- a/source/source_relax/lattice_change_basic.cpp +++ b/source/source_relax/lattice_change_basic.cpp @@ -4,6 +4,7 @@ #include "source_base/global_variable.h" #include "source_base/parallel_common.h" #include "source_io/module_parameter/parameter.h" +#include "source_cell/update_cell.h" int Lattice_Change_Basic::dim = 0; bool Lattice_Change_Basic::converged = true; @@ -24,13 +25,27 @@ void Lattice_Change_Basic::setup_gradient(const UnitCell &ucell, double *lat, do { ModuleBase::TITLE("Lattice_Change_Basic", "setup_gradient"); - if (Lattice_Change_Basic::fixed_axes == "volume") + // Apply fixed_axes constraints to stress tensor + if (Lattice_Change_Basic::fixed_axes == "shape") + { + // Shape constraint: only volume can change (isotropic expansion/contraction) + // Replace stress with pure hydrostatic pressure + double pressure = (stress(0, 0) + stress(1, 1) + stress(2, 2)) / 3.0; + stress.zero_out(); + stress(0, 0) = pressure; + stress(1, 1) = pressure; + stress(2, 2) = pressure; + } + else if (Lattice_Change_Basic::fixed_axes == "volume") { + // Volume constraint: only shape can change + // Remove hydrostatic pressure component from stress double stress_aver = (stress(0, 0) + stress(1, 1) + stress(2, 2)) / 3.0; stress(0, 0) = stress(0, 0) - stress_aver; stress(1, 1) = stress(1, 1) - stress_aver; stress(2, 2) = stress(2, 2) - stress_aver; } + // Note: Axis constraints ("a", "b", "c", etc.) are handled via ucell.lc[] flags below lat[0] = ucell.latvec.e11 * ucell.lat0; lat[1] = ucell.latvec.e12 * ucell.lat0; @@ -42,24 +57,48 @@ void Lattice_Change_Basic::setup_gradient(const UnitCell &ucell, double *lat, do lat[7] = ucell.latvec.e32 * ucell.lat0; lat[8] = ucell.latvec.e33 * ucell.lat0; + // Calculate gradients for each lattice vector, or zero them if fixed if (ucell.lc[0] == 1) { grad[0] = -(lat[0] * stress(0, 0) + lat[1] * stress(1, 0) + lat[2] * stress(2, 0)); grad[1] = -(lat[0] * stress(0, 1) + lat[1] * stress(1, 1) + lat[2] * stress(2, 1)); grad[2] = -(lat[0] * stress(0, 2) + lat[1] * stress(1, 2) + lat[2] * stress(2, 2)); } + else + { + // Zero out gradient for fixed lattice vector a + grad[0] = 0.0; + grad[1] = 0.0; + grad[2] = 0.0; + } + if (ucell.lc[1] == 1) { grad[3] = -(lat[3] * stress(0, 0) + lat[4] * stress(1, 0) + lat[5] * stress(2, 0)); grad[4] = -(lat[3] * stress(0, 1) + lat[4] * stress(1, 1) + lat[5] * stress(2, 1)); grad[5] = -(lat[3] * stress(0, 2) + lat[4] * stress(1, 2) + lat[5] * stress(2, 2)); } + else + { + // Zero out gradient for fixed lattice vector b + grad[3] = 0.0; + grad[4] = 0.0; + grad[5] = 0.0; + } + if (ucell.lc[2] == 1) { grad[6] = -(lat[6] * stress(0, 0) + lat[7] * stress(1, 0) + lat[8] * stress(2, 0)); grad[7] = -(lat[6] * stress(0, 1) + lat[7] * stress(1, 1) + lat[8] * stress(2, 1)); grad[8] = -(lat[6] * stress(0, 2) + lat[7] * stress(1, 2) + lat[8] * stress(2, 2)); } + else + { + // Zero out gradient for fixed lattice vector c + grad[6] = 0.0; + grad[7] = 0.0; + grad[8] = 0.0; + } // grad[0] = -stress(0,0); grad[1] = -stress(0,1); grad[2] = -stress(0,2); // grad[3] = -stress(1,0); grad[4] = -stress(1,1); grad[5] = -stress(1,2); @@ -117,17 +156,57 @@ void Lattice_Change_Basic::change_lattice(UnitCell &ucell, double *move, double ucell.latvec.e33 = (move[8] + lat[8]) / ucell.lat0; } - ucell.a1.x = ucell.latvec.e11; - ucell.a1.y = ucell.latvec.e12; - ucell.a1.z = ucell.latvec.e13; - ucell.a2.x = ucell.latvec.e21; - ucell.a2.y = ucell.latvec.e22; - ucell.a2.z = ucell.latvec.e23; - ucell.a3.x = ucell.latvec.e31; - ucell.a3.y = ucell.latvec.e32; - ucell.a3.z = ucell.latvec.e33; - - ucell.omega = std::abs(ucell.latvec.Det()) * ucell.lat0 * ucell.lat0 * ucell.lat0; + // Apply post-update constraints + // Order matters: fixed_ibrav first, then volume rescaling + + // 1. Enforce Bravais lattice symmetry if fixed_ibrav is set + if (PARAM.inp.fixed_ibrav) + { + unitcell::remake_cell(ucell.lat); + } + + // 2. Enforce volume constraint by rescaling lattice + if (Lattice_Change_Basic::fixed_axes == "volume") + { + double omega_old = ucell.omega; // Volume before this update + double omega_new = std::abs(ucell.latvec.Det()) * ucell.lat0 * ucell.lat0 * ucell.lat0; + + // Rescale lattice to maintain constant volume + if (omega_new > 1e-10) // Avoid division by zero + { + double scale = std::pow(omega_old / omega_new, 1.0 / 3.0); + ucell.latvec *= scale; + + // Update a1, a2, a3 vectors + ucell.a1.x = ucell.latvec.e11; + ucell.a1.y = ucell.latvec.e12; + ucell.a1.z = ucell.latvec.e13; + ucell.a2.x = ucell.latvec.e21; + ucell.a2.y = ucell.latvec.e22; + ucell.a2.z = ucell.latvec.e23; + ucell.a3.x = ucell.latvec.e31; + ucell.a3.y = ucell.latvec.e32; + ucell.a3.z = ucell.latvec.e33; + + // Recalculate omega (should be equal to omega_old now) + ucell.omega = std::abs(ucell.latvec.Det()) * ucell.lat0 * ucell.lat0 * ucell.lat0; + } + } + else + { + // Update a1, a2, a3 vectors for non-volume-constrained cases + ucell.a1.x = ucell.latvec.e11; + ucell.a1.y = ucell.latvec.e12; + ucell.a1.z = ucell.latvec.e13; + ucell.a2.x = ucell.latvec.e21; + ucell.a2.y = ucell.latvec.e22; + ucell.a2.z = ucell.latvec.e23; + ucell.a3.x = ucell.latvec.e31; + ucell.a3.y = ucell.latvec.e32; + ucell.a3.z = ucell.latvec.e33; + + ucell.omega = std::abs(ucell.latvec.Det()) * ucell.lat0 * ucell.lat0 * ucell.lat0; + } ucell.GT = ucell.latvec.Inverse(); ucell.G = ucell.GT.Transpose(); diff --git a/source/source_relax/lbfgs.cpp b/source/source_relax/lbfgs.cpp index 31eaa2116a..b347fe86fb 100644 --- a/source/source_relax/lbfgs.cpp +++ b/source/source_relax/lbfgs.cpp @@ -1,5 +1,4 @@ #include "lbfgs.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "ions_move_basic.h" #include "source_cell/update_cell.h" diff --git a/source/source_relax/line_search.cpp b/source/source_relax/line_search.cpp index bbf308f638..1c07a59c3d 100644 --- a/source/source_relax/line_search.cpp +++ b/source/source_relax/line_search.cpp @@ -1,9 +1,10 @@ #include "line_search.h" -#include "source_pw/module_pwdft/global.h" - +#include "source_base/global_function.h" +#include "source_base/global_variable.h" #include #include +#include bool Line_Search::line_search(const bool restart, const double x, // current point @@ -12,9 +13,10 @@ bool Line_Search::line_search(const bool restart, double& xnew, // the next point that we want to try const double conv_thr) { - if (restart) { - ls_step = 0; -} + if (restart) + { + ls_step = 0; + } if (ls_step == 0) // first point: make a trial step into trial direction { @@ -100,10 +102,11 @@ bool Line_Search::third_order(const double x, const double y, const double f, do } dmoveh = -fa / (fab - fa) / 2.0; - if (dmoveh < 0) { + if (dmoveh < 0) + { dmoveh = 4.0; -} - + } + if (dmove > 2.0 * dmoveh || dmoveh > 2.0 * dmove || (fa * fb > 0 && dmove < 1.0) || (fa * fb < 0 && dmove > 1.0)) { @@ -111,15 +114,17 @@ bool Line_Search::third_order(const double x, const double y, const double f, do } } // end anharmonic case - if (dmove > 4.0) { - dmove = 4.0; -} + if (dmove > 4.0) + { + dmove = 4.0; + } xnew = dmove + xa; double dy = (fb + (fab - fb) / (xa - xb) * (dmove - xb)) * (dmove - xb); - if (std::abs(dy) < conv_thr) { + if (std::abs(dy) < conv_thr) + { return true; -} + } ls_step++; return false; @@ -137,9 +142,10 @@ void Line_Search::init_brent(const double x, const double y, const double f) xb = x; yb = y; fb = f; - if (fa * fb > 0) { + if (fa * fb > 0) + { bracked = false; -} + } fstart = fa; } else // x < b @@ -233,9 +239,10 @@ bool Line_Search::brent(const double x, const double y, const double f, double& p = s * (2.0 * xm * qq * (qq - r) - (xb - xa) * (r - 1.0)); qq = (qq - 1.0) * (r - 1.0) * (s - 1.0); } - if (p > 0.0) { + if (p > 0.0) + { qq = -qq; -} + } p = std::abs(p); if (p < std::min(2.0 * (xb - xa) * qq - std::abs(tol1 * qq), std::abs(xe * qq) / 2.0)) @@ -273,9 +280,10 @@ bool Line_Search::brent(const double x, const double y, const double f, double& } xnew = xb; - if (std::abs(dy) < conv_thr) { + if (std::abs(dy) < conv_thr) + { return true; -} + } if (ls_step == 4) // I'm not sure if this is a good choice, but the idea is there should not be so many line // search steps I feel if the line search does not converge, we'd better change the direction // and restart line search @@ -335,9 +343,10 @@ bool Line_Search::brent(const double x, const double y, const double f, double& p = s * (2.0 * xm * qq * (qq - r) - (xb - xa) * (r - 1.0)); qq = (qq - 1.0) * (r - 1.0) * (s - 1.0); } - if (p > 0.0) { + if (p > 0.0) + { qq = -qq; -} + } p = std::abs(p); if (2.0 * p < std::min(3.0 * xm * qq - std::abs(tol1 * qq), std::abs(xe * qq))) @@ -381,9 +390,10 @@ bool Line_Search::brent(const double x, const double y, const double f, double& } xnew = xb; - if (std::abs(dy) < conv_thr) { + if (std::abs(dy) < conv_thr) + { return true; -} + } if (ls_step == 4) { GlobalV::ofs_running << "Too many Brent steps, let's do next CG step" << std::endl; @@ -392,4 +402,4 @@ bool Line_Search::brent(const double x, const double y, const double f, double& } return false; } // end ibrack -} \ No newline at end of file +} diff --git a/source/source_relax/relax_driver.cpp b/source/source_relax/relax_driver.cpp index 9b5217d77c..d1c69df8b0 100644 --- a/source/source_relax/relax_driver.cpp +++ b/source/source_relax/relax_driver.cpp @@ -1,12 +1,11 @@ #include "relax_driver.h" #include "source_base/global_file.h" -#include "source_pw/module_pwdft/global.h" // use chr. -#include "source_io/cif_io.h" -#include "source_io/json_output/output_info.h" -#include "source_io/output_log.h" -#include "source_io/print_info.h" -#include "source_io/read_exit_file.h" +#include "source_io/module_output/cif_io.h" +#include "source_io/module_json/output_info.h" +#include "source_io/module_output/output_log.h" +#include "source_io/module_output/print_info.h" +#include "source_io/module_output/read_exit_file.h" #include "source_io/module_parameter/parameter.h" #include "source_cell/print_cell.h" diff --git a/source/source_relax/relax_sync.cpp b/source/source_relax/relax_sync.cpp index a788af2f68..492feaea49 100644 --- a/source/source_relax/relax_sync.cpp +++ b/source/source_relax/relax_sync.cpp @@ -6,7 +6,6 @@ #include "source_base/tool_title.h" #include "source_cell/update_cell.h" #include "source_cell/print_cell.h" -#include "source_pw/module_pwdft/global.h" #include "source_io/module_parameter/parameter.h" #include "source_relax/ions_move_basic.h" @@ -384,7 +383,7 @@ void Relax::perform_line_search() // perform line search bool restart_brent = false; double x = dmovel, y = etot; - double xnew, yd; + double xnew = 0.0, yd = 0.0; brent_done = this->ls.line_search(restart_brent, x, y, f, xnew, force_thr_eva); dmove = xnew; @@ -498,7 +497,7 @@ void Relax::move_cell_ions(UnitCell& ucell, const bool is_new_dir) // or a line search step, the treatment is slightly different // and the input variable is_new_dir is used to make the distinction - double fac; // fac1 for force, fac2 for stress + double fac = 0.0; // fac1 for force, fac2 for stress if (is_new_dir) { fac = 1.0; @@ -595,8 +594,7 @@ void Relax::move_cell_ions(UnitCell& ucell, const bool is_new_dir) // ================================================================= // Calculating displacement in Cartesian coordinate (in Angstrom) - double move_ion[nat * 3]; - ModuleBase::zeros(move_ion, nat * 3); + std::vector move_ion(nat * 3, 0.0); for (int iat = 0; iat < nat; iat++) { @@ -631,10 +629,10 @@ void Relax::move_cell_ions(UnitCell& ucell, const bool is_new_dir) if (ModuleSymmetry::Symmetry::symm_flag && ucell.symm.all_mbl && ucell.symm.nrotk > 0) { - ucell.symm.symmetrize_vec3_nat(move_ion); + ucell.symm.symmetrize_vec3_nat(move_ion.data()); } - unitcell::update_pos_taud(ucell.lat,move_ion,ucell.ntype,ucell.nat,ucell.atoms); + unitcell::update_pos_taud(ucell.lat,move_ion.data(),ucell.ntype,ucell.nat,ucell.atoms); // Print the structure file. unitcell::print_tau(ucell.atoms,ucell.Coordinate,ucell.ntype,ucell.lat0,GlobalV::ofs_running); diff --git a/source/source_relax/test/CMakeLists.txt b/source/source_relax/test/CMakeLists.txt index 5f8a600cc6..c3e0d235a8 100644 --- a/source/source_relax/test/CMakeLists.txt +++ b/source/source_relax/test/CMakeLists.txt @@ -19,7 +19,7 @@ AddTest( ../../source_base/global_function.cpp ../../source_base/complexmatrix.cpp ../../source_base/matrix.cpp ../../source_base/complexarray.cpp ../../source_base/tool_quit.cpp ../../source_base/realarray.cpp ../../source_base/module_external/blas_connector_base.cpp ../../source_base/module_external/blas_connector_vector.cpp ../../source_base/module_external/blas_connector_matrix.cpp - ../../source_cell/update_cell.cpp ../../source_cell/print_cell.cpp ../../source_cell/bcast_cell.cpp ../../source_io/output.cpp + ../../source_cell/update_cell.cpp ../../source_cell/print_cell.cpp ../../source_cell/bcast_cell.cpp ../../source_io/module_output/output.cpp LIBS parameter ${math_libs} ) @@ -27,27 +27,28 @@ list(APPEND cell_source_files ../../source_cell/update_cell.cpp ../../source_cell/bcast_cell.cpp ../../source_cell/print_cell.cpp - ../../source_io/output.cpp + ../../source_io/module_output/output.cpp ) AddTest( TARGET lattice_change_methods_test - LIBS parameter ${math_libs} base device - SOURCES lattice_change_methods_test.cpp ../lattice_change_methods.cpp ../lattice_change_basic.cpp + LIBS parameter ${math_libs} base device + SOURCES lattice_change_methods_test.cpp ../lattice_change_methods.cpp ../lattice_change_basic.cpp mock_remake_cell.cpp ) AddTest( TARGET lattice_change_basic_test - LIBS parameter ${math_libs} base device - SOURCES lattice_change_basic_test.cpp ../lattice_change_basic.cpp + LIBS parameter ${math_libs} base device + SOURCES lattice_change_basic_test.cpp ../lattice_change_basic.cpp mock_remake_cell.cpp ) AddTest( TARGET lattice_change_cg_test - LIBS parameter ${math_libs} base device - SOURCES lattice_change_cg_test.cpp - ../lattice_change_cg.cpp + LIBS parameter ${math_libs} base device + SOURCES lattice_change_cg_test.cpp + ../lattice_change_cg.cpp ../lattice_change_basic.cpp - ../../source_io/orb_io.cpp + mock_remake_cell.cpp + ../../source_io/module_output/orb_io.cpp ) AddTest( @@ -76,7 +77,7 @@ AddTest( ../ions_move_bfgs.cpp ../ions_move_basic.cpp ../bfgs_basic.cpp - ../../source_io/orb_io.cpp + ../../source_io/module_output/orb_io.cpp ${cell_source_files} ) @@ -86,7 +87,7 @@ AddTest( SOURCES ions_move_cg_test.cpp ../ions_move_cg.cpp ../ions_move_basic.cpp - ../../source_io/orb_io.cpp + ../../source_io/module_output/orb_io.cpp ${cell_source_files} ) diff --git a/source/source_relax/test/ions_move_methods_test.cpp b/source/source_relax/test/ions_move_methods_test.cpp index f0027be236..464377f643 100644 --- a/source/source_relax/test/ions_move_methods_test.cpp +++ b/source/source_relax/test/ions_move_methods_test.cpp @@ -19,6 +19,64 @@ * - Ions_Move_Methods::get_update_iter() */ + // Mock the remake_cell function from update_cell.h +namespace unitcell +{ + // Track if remake_cell was called and with what lattice + static bool remake_cell_called = false; + static std::string remake_cell_latName; + static ModuleBase::Matrix3 remake_cell_latvec; + + void remake_cell(Lattice& lat) + { + remake_cell_called = true; + remake_cell_latName = lat.latName; + remake_cell_latvec = lat.latvec; + + // Mock implementation: enforce simple cubic structure for "sc" + if (lat.latName == "sc") + { + double celldm = std::sqrt(lat.latvec.e11 * lat.latvec.e11 + + lat.latvec.e12 * lat.latvec.e12 + + lat.latvec.e13 * lat.latvec.e13); + lat.latvec.Zero(); + lat.latvec.e11 = celldm; + lat.latvec.e22 = celldm; + lat.latvec.e33 = celldm; + } + // Mock implementation: enforce FCC structure for "fcc" + else if (lat.latName == "fcc") + { + double celldm = std::sqrt(lat.latvec.e11 * lat.latvec.e11 + + lat.latvec.e12 * lat.latvec.e12 + + lat.latvec.e13 * lat.latvec.e13) / std::sqrt(2.0); + lat.latvec.e11 = -celldm; + lat.latvec.e12 = 0.0; + lat.latvec.e13 = celldm; + lat.latvec.e21 = 0.0; + lat.latvec.e22 = celldm; + lat.latvec.e23 = celldm; + lat.latvec.e31 = -celldm; + lat.latvec.e32 = celldm; + lat.latvec.e33 = 0.0; + } + } + + // Helper function to reset mock state + void reset_remake_cell_mock() + { + remake_cell_called = false; + remake_cell_latName = ""; + remake_cell_latvec.Zero(); + } + + // Helper function to check if remake_cell was called + bool was_remake_cell_called() + { + return remake_cell_called; + } +} + // Define a fixture for the tests class IonsMoveMethodsTest : public ::testing::Test { diff --git a/source/source_relax/test/lattice_change_basic_test.cpp b/source/source_relax/test/lattice_change_basic_test.cpp index 4a12fca3fb..b40af6d88a 100644 --- a/source/source_relax/test/lattice_change_basic_test.cpp +++ b/source/source_relax/test/lattice_change_basic_test.cpp @@ -1,10 +1,13 @@ #include "source_relax/lattice_change_basic.h" +#include "mock_remake_cell.h" #include "for_test.h" #include "gtest/gtest.h" +#include "gmock/gmock.h" #define private public #include "source_io/module_parameter/parameter.h" #undef private + /************************************************ * unit tests of namespace Lattice_Change_Basic ***********************************************/ @@ -30,11 +33,17 @@ class LatticeChangeBasicTest : public ::testing::Test { // Initialize variables before each test stress.create(3, 3); + // Reset mock state before each test + unitcell::reset_remake_cell_mock(); + // Reset fixed_ibrav to default + PARAM.input.fixed_ibrav = false; } virtual void TearDown() { // Clean up after each test + unitcell::reset_remake_cell_mock(); + PARAM.input.fixed_ibrav = false; } }; @@ -525,3 +534,584 @@ TEST_F(LatticeChangeBasicTest, SetupEtotJudgementFalse) EXPECT_DOUBLE_EQ(80.0, Lattice_Change_Basic::etot); EXPECT_DOUBLE_EQ(-20.0, Lattice_Change_Basic::ediff); } + +// ============================================================================ +// NEW TESTS FOR SHAPE CONSTRAINT, VOLUME RESCALING, AND FIXED_IBRAV +// ============================================================================ + +// Test the setup_gradient function with fixed_axes = "shape" +TEST_F(LatticeChangeBasicTest, SetupGradientShape) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + + // Non-isotropic stress tensor + stress(0, 0) = 1.0; + stress(0, 1) = 2.0; + stress(0, 2) = 3.0; + stress(1, 0) = 4.0; + stress(1, 1) = 5.0; + stress(1, 2) = 6.0; + stress(2, 0) = 7.0; + stress(2, 1) = 8.0; + stress(2, 2) = 9.0; + + Lattice_Change_Basic::fixed_axes = "shape"; + + // Call setup_gradient method + Lattice_Change_Basic::setup_gradient(ucell, lat, grad, stress); + + // Check that stress becomes isotropic (only diagonal, all equal) + // Average pressure = (1 + 5 + 9) / 3 = 5 + EXPECT_DOUBLE_EQ(stress(0, 0), 5.0); + EXPECT_DOUBLE_EQ(stress(1, 1), 5.0); + EXPECT_DOUBLE_EQ(stress(2, 2), 5.0); + + // Off-diagonal elements should be zero + EXPECT_DOUBLE_EQ(stress(0, 1), 0.0); + EXPECT_DOUBLE_EQ(stress(0, 2), 0.0); + EXPECT_DOUBLE_EQ(stress(1, 0), 0.0); + EXPECT_DOUBLE_EQ(stress(1, 2), 0.0); + EXPECT_DOUBLE_EQ(stress(2, 0), 0.0); + EXPECT_DOUBLE_EQ(stress(2, 1), 0.0); +} + +// Test volume constraint rescaling in change_lattice +TEST_F(LatticeChangeBasicTest, ChangeLatticeVolumeRescaling) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + + // Set initial lattice (cubic, volume = 1000) + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.0; + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + ucell.omega = 1000.0; // Initial volume + + lat[0] = 10.0; + lat[1] = 0.0; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move that would change volume (expand by 10%) + move[0] = 1.0; + move[1] = 0.0; + move[2] = 0.0; + move[3] = 0.0; + move[4] = 1.0; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 1.0; + + Lattice_Change_Basic::fixed_axes = "volume"; + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Check that volume is preserved (should still be 1000) + EXPECT_NEAR(ucell.omega, 1000.0, 1e-8); + + // Check that lattice vectors were rescaled uniformly + double expected_scale = std::pow(1000.0 / 1331.0, 1.0/3.0); // (old_vol / new_vol)^(1/3) + EXPECT_NEAR(ucell.latvec.e11, 1.1 * expected_scale, 1e-10); + EXPECT_NEAR(ucell.latvec.e22, 1.1 * expected_scale, 1e-10); + EXPECT_NEAR(ucell.latvec.e33, 1.1 * expected_scale, 1e-10); +} + +// Test volume constraint with non-cubic cell +TEST_F(LatticeChangeBasicTest, ChangeLatticeVolumeRescalingNonCubic) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + + // Set initial lattice (non-cubic, volume = 1200) + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.0; + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.2; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + ucell.omega = 1200.0; // Initial volume + + lat[0] = 10.0; + lat[1] = 0.0; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 12.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move that would change volume + move[0] = 0.5; + move[1] = 0.0; + move[2] = 0.0; + move[3] = 0.0; + move[4] = -0.5; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 0.3; + + Lattice_Change_Basic::fixed_axes = "volume"; + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Check that volume is preserved + EXPECT_NEAR(ucell.omega, 1200.0, 1e-8); +} + +// Test change_lattice without volume constraint (should change volume) +TEST_F(LatticeChangeBasicTest, ChangeLatticeNoVolumeConstraint) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + + // Set initial lattice + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.0; + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + ucell.omega = 1000.0; // Initial volume + + lat[0] = 10.0; + lat[1] = 0.0; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move that changes volume + move[0] = 1.0; + move[1] = 0.0; + move[2] = 0.0; + move[3] = 0.0; + move[4] = 1.0; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 1.0; + + Lattice_Change_Basic::fixed_axes = "None"; + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Check that volume DID change (should be 1331) + EXPECT_NEAR(ucell.omega, 1331.0, 1e-8); + + // Check lattice vectors + EXPECT_DOUBLE_EQ(ucell.latvec.e11, 1.1); + EXPECT_DOUBLE_EQ(ucell.latvec.e22, 1.1); + EXPECT_DOUBLE_EQ(ucell.latvec.e33, 1.1); +} + +// Test fixed_ibrav with simple cubic lattice +TEST_F(LatticeChangeBasicTest, ChangeLatticeFixedIbravSimpleCubic) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + ucell.latName = "sc"; + + // Set initial lattice (slightly distorted cubic) + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.01; // Small distortion + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + lat[0] = 10.0; + lat[1] = 0.1; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move + move[0] = 0.1; + move[1] = 0.0; + move[2] = 0.0; + move[3] = 0.0; + move[4] = 0.1; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 0.1; + + PARAM.input.fixed_ibrav = true; + Lattice_Change_Basic::fixed_axes = "None"; + + // Verify remake_cell was not called yet + EXPECT_FALSE(unitcell::was_remake_cell_called()); + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Verify remake_cell was called + EXPECT_TRUE(unitcell::was_remake_cell_called()); + + // Check that lattice is now perfect cubic (all diagonal, equal) + // This is enforced by the mock remake_cell function + EXPECT_NEAR(ucell.latvec.e11, ucell.latvec.e22, 1e-10); + EXPECT_NEAR(ucell.latvec.e22, ucell.latvec.e33, 1e-10); + EXPECT_NEAR(ucell.latvec.e12, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e13, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e21, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e23, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e31, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e32, 0.0, 1e-10); + + // Reset for other tests + PARAM.input.fixed_ibrav = false; +} + +// Test fixed_ibrav with FCC lattice +TEST_F(LatticeChangeBasicTest, ChangeLatticeFixedIbravFCC) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + ucell.latName = "fcc"; + + // Set initial lattice (slightly distorted FCC) + double celldm = 1.0; + ucell.latvec.e11 = -celldm + 0.01; // Small distortion + ucell.latvec.e12 = 0.0; + ucell.latvec.e13 = celldm; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = celldm; + ucell.latvec.e23 = celldm; + ucell.latvec.e31 = -celldm; + ucell.latvec.e32 = celldm; + ucell.latvec.e33 = 0.0; + + lat[0] = (-celldm + 0.01) * ucell.lat0; + lat[1] = 0.0; + lat[2] = celldm * ucell.lat0; + lat[3] = 0.0; + lat[4] = celldm * ucell.lat0; + lat[5] = celldm * ucell.lat0; + lat[6] = -celldm * ucell.lat0; + lat[7] = celldm * ucell.lat0; + lat[8] = 0.0; + + // Apply a small move + for (int i = 0; i < 9; i++) move[i] = 0.01 * ucell.lat0; + + PARAM.input.fixed_ibrav = true; + Lattice_Change_Basic::fixed_axes = "None"; + + // Verify remake_cell was not called yet + EXPECT_FALSE(unitcell::was_remake_cell_called()); + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Verify remake_cell was called + EXPECT_TRUE(unitcell::was_remake_cell_called()); + + // Check that lattice maintains FCC structure + // For FCC: a1 = (-a, 0, a), a2 = (0, a, a), a3 = (-a, a, 0) + // All should have same magnitude + double mag1 = std::sqrt(ucell.latvec.e11*ucell.latvec.e11 + + ucell.latvec.e12*ucell.latvec.e12 + + ucell.latvec.e13*ucell.latvec.e13); + double mag2 = std::sqrt(ucell.latvec.e21*ucell.latvec.e21 + + ucell.latvec.e22*ucell.latvec.e22 + + ucell.latvec.e23*ucell.latvec.e23); + double mag3 = std::sqrt(ucell.latvec.e31*ucell.latvec.e31 + + ucell.latvec.e32*ucell.latvec.e32 + + ucell.latvec.e33*ucell.latvec.e33); + + EXPECT_NEAR(mag1, mag2, 1e-10); + EXPECT_NEAR(mag2, mag3, 1e-10); + + // Check FCC structure: e11 should be negative, e13 positive, e12 = 0 + EXPECT_LT(ucell.latvec.e11, 0.0); + EXPECT_GT(ucell.latvec.e13, 0.0); + EXPECT_NEAR(ucell.latvec.e12, 0.0, 1e-10); + + // Reset for other tests + PARAM.input.fixed_ibrav = false; +} + +// Test combination of fixed_axes = "volume" and fixed_ibrav +TEST_F(LatticeChangeBasicTest, ChangeLatticeVolumeAndIbrav) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + ucell.latName = "sc"; + + // Set initial lattice (cubic) + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.0; + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + ucell.omega = 1000.0; // Initial volume + + lat[0] = 10.0; + lat[1] = 0.0; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move that would change volume and break symmetry + move[0] = 1.0; + move[1] = 0.1; // Try to break symmetry + move[2] = 0.0; + move[3] = 0.0; + move[4] = 0.8; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 1.2; + + PARAM.input.fixed_ibrav = true; + Lattice_Change_Basic::fixed_axes = "volume"; + + // Verify remake_cell was not called yet + EXPECT_FALSE(unitcell::was_remake_cell_called()); + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Verify remake_cell was called (should be called before volume rescaling) + EXPECT_TRUE(unitcell::was_remake_cell_called()); + + // Check that volume is preserved + EXPECT_NEAR(ucell.omega, 1000.0, 1e-8); + + // Check that lattice is cubic (all diagonal, equal) + EXPECT_NEAR(ucell.latvec.e11, ucell.latvec.e22, 1e-10); + EXPECT_NEAR(ucell.latvec.e22, ucell.latvec.e33, 1e-10); + EXPECT_NEAR(ucell.latvec.e12, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e13, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e21, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e23, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e31, 0.0, 1e-10); + EXPECT_NEAR(ucell.latvec.e32, 0.0, 1e-10); + + // Reset for other tests + PARAM.input.fixed_ibrav = false; +} + +// Test axis constraint with fixed_axes = "a" +TEST_F(LatticeChangeBasicTest, SetupGradientAxisA) +{ + // Initialize variables + ucell.lc[0] = 0; // First axis fixed + ucell.lc[1] = 1; + ucell.lc[2] = 1; + + stress(0, 0) = 1.0; + stress(0, 1) = 2.0; + stress(0, 2) = 3.0; + stress(1, 0) = 4.0; + stress(1, 1) = 5.0; + stress(1, 2) = 6.0; + stress(2, 0) = 7.0; + stress(2, 1) = 8.0; + stress(2, 2) = 9.0; + + Lattice_Change_Basic::fixed_axes = "a"; + + // Call setup_gradient method + Lattice_Change_Basic::setup_gradient(ucell, lat, grad, stress); + + // Check that gradient for first lattice vector is zero + EXPECT_DOUBLE_EQ(grad[0], 0.0); + EXPECT_DOUBLE_EQ(grad[1], 0.0); + EXPECT_DOUBLE_EQ(grad[2], 0.0); + + // Check that gradients for other vectors are non-zero + EXPECT_NE(grad[3], 0.0); + EXPECT_NE(grad[4], 0.0); + EXPECT_NE(grad[5], 0.0); + EXPECT_NE(grad[6], 0.0); + EXPECT_NE(grad[7], 0.0); + EXPECT_NE(grad[8], 0.0); +} + +// Test that fixed axis doesn't move in change_lattice +TEST_F(LatticeChangeBasicTest, ChangeLatticeFixedAxisA) +{ + // Initialize variables + ucell.lc[0] = 0; // First axis fixed + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + + // Set initial lattice + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.1; + ucell.latvec.e13 = 0.2; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + // Save initial first lattice vector + double initial_e11 = ucell.latvec.e11; + double initial_e12 = ucell.latvec.e12; + double initial_e13 = ucell.latvec.e13; + + lat[0] = 10.0; + lat[1] = 1.0; + lat[2] = 2.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Try to move all lattice vectors + move[0] = 1.0; + move[1] = 0.5; + move[2] = 0.3; + move[3] = 0.5; + move[4] = 1.0; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 1.0; + + Lattice_Change_Basic::fixed_axes = "a"; + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Check that first lattice vector didn't change + EXPECT_DOUBLE_EQ(ucell.latvec.e11, initial_e11); + EXPECT_DOUBLE_EQ(ucell.latvec.e12, initial_e12); + EXPECT_DOUBLE_EQ(ucell.latvec.e13, initial_e13); + + // Check that other lattice vectors did change + EXPECT_NE(ucell.latvec.e21, 0.0); + EXPECT_NE(ucell.latvec.e22, 1.0); + EXPECT_NE(ucell.latvec.e33, 1.0); +} + +// Test that remake_cell is NOT called when fixed_ibrav = false +TEST_F(LatticeChangeBasicTest, ChangeLatticeNoFixedIbrav) +{ + // Initialize variables + ucell.lc[0] = 1; + ucell.lc[1] = 1; + ucell.lc[2] = 1; + ucell.lat0 = 10.0; + ucell.latName = "sc"; + + // Set initial lattice + ucell.latvec.e11 = 1.0; + ucell.latvec.e12 = 0.01; // Small distortion + ucell.latvec.e13 = 0.0; + ucell.latvec.e21 = 0.0; + ucell.latvec.e22 = 1.0; + ucell.latvec.e23 = 0.0; + ucell.latvec.e31 = 0.0; + ucell.latvec.e32 = 0.0; + ucell.latvec.e33 = 1.0; + + lat[0] = 10.0; + lat[1] = 0.1; + lat[2] = 0.0; + lat[3] = 0.0; + lat[4] = 10.0; + lat[5] = 0.0; + lat[6] = 0.0; + lat[7] = 0.0; + lat[8] = 10.0; + + // Apply a move + move[0] = 0.1; + move[1] = 0.0; + move[2] = 0.0; + move[3] = 0.0; + move[4] = 0.1; + move[5] = 0.0; + move[6] = 0.0; + move[7] = 0.0; + move[8] = 0.1; + + PARAM.input.fixed_ibrav = false; // Explicitly set to false + Lattice_Change_Basic::fixed_axes = "None"; + + // Verify remake_cell was not called yet + EXPECT_FALSE(unitcell::was_remake_cell_called()); + + // Call change_lattice method + Lattice_Change_Basic::change_lattice(ucell, move, lat); + + // Verify remake_cell was NOT called + EXPECT_FALSE(unitcell::was_remake_cell_called()); + + // Check that distortion remains (e12 should still be non-zero) + EXPECT_NE(ucell.latvec.e12, 0.0); +} diff --git a/source/source_relax/test/lattice_change_cg_test.cpp b/source/source_relax/test/lattice_change_cg_test.cpp index cdea39282b..01c863b8ee 100644 --- a/source/source_relax/test/lattice_change_cg_test.cpp +++ b/source/source_relax/test/lattice_change_cg_test.cpp @@ -1,5 +1,6 @@ #include "for_test.h" #include "gtest/gtest.h" +#include "mock_remake_cell.h" #define private public #include "source_relax/lattice_change_basic.h" #include "source_relax/lattice_change_cg.h" diff --git a/source/source_relax/test/lattice_change_methods_test.cpp b/source/source_relax/test/lattice_change_methods_test.cpp index 24d9b515ad..64173e110e 100644 --- a/source/source_relax/test/lattice_change_methods_test.cpp +++ b/source/source_relax/test/lattice_change_methods_test.cpp @@ -1,4 +1,5 @@ #include "source_relax/lattice_change_methods.h" +#include "mock_remake_cell.h" #include "for_test.h" #include "gtest/gtest.h" diff --git a/source/source_relax/test/mock_remake_cell.cpp b/source/source_relax/test/mock_remake_cell.cpp new file mode 100644 index 0000000000..ee51ba8653 --- /dev/null +++ b/source/source_relax/test/mock_remake_cell.cpp @@ -0,0 +1,58 @@ +#include "mock_remake_cell.h" +#include + +namespace unitcell +{ + // Mock state variables + bool remake_cell_called = false; + std::string remake_cell_latName = ""; + ModuleBase::Matrix3 remake_cell_latvec; + + void remake_cell(Lattice& lat) + { + remake_cell_called = true; + remake_cell_latName = lat.latName; + remake_cell_latvec = lat.latvec; + + // Mock implementation: enforce simple cubic structure for "sc" + if (lat.latName == "sc") + { + double celldm = std::sqrt(lat.latvec.e11 * lat.latvec.e11 + + lat.latvec.e12 * lat.latvec.e12 + + lat.latvec.e13 * lat.latvec.e13); + lat.latvec.Zero(); + lat.latvec.e11 = celldm; + lat.latvec.e22 = celldm; + lat.latvec.e33 = celldm; + } + // Mock implementation: enforce FCC structure for "fcc" + else if (lat.latName == "fcc") + { + double celldm = std::sqrt(lat.latvec.e11 * lat.latvec.e11 + + lat.latvec.e12 * lat.latvec.e12 + + lat.latvec.e13 * lat.latvec.e13) / std::sqrt(2.0); + lat.latvec.e11 = -celldm; + lat.latvec.e12 = 0.0; + lat.latvec.e13 = celldm; + lat.latvec.e21 = 0.0; + lat.latvec.e22 = celldm; + lat.latvec.e23 = celldm; + lat.latvec.e31 = -celldm; + lat.latvec.e32 = celldm; + lat.latvec.e33 = 0.0; + } + // For other lattice types, do nothing (just track the call) + } + + void reset_remake_cell_mock() + { + remake_cell_called = false; + remake_cell_latName = ""; + remake_cell_latvec.Zero(); + } + + bool was_remake_cell_called() + { + return remake_cell_called; + } +} diff --git a/source/source_relax/test/mock_remake_cell.h b/source/source_relax/test/mock_remake_cell.h new file mode 100644 index 0000000000..c2d4d63bd8 --- /dev/null +++ b/source/source_relax/test/mock_remake_cell.h @@ -0,0 +1,22 @@ +#ifndef MOCK_REMAKE_CELL_H +#define MOCK_REMAKE_CELL_H + +#include "source_cell/unitcell_data.h" +#include + +namespace unitcell +{ + // Mock state tracking + extern bool remake_cell_called; + extern std::string remake_cell_latName; + extern ModuleBase::Matrix3 remake_cell_latvec; + + // Mock implementation of remake_cell + void remake_cell(Lattice& lat); + + // Helper functions for testing + void reset_remake_cell_mock(); + bool was_remake_cell_called(); +} + +#endif // MOCK_REMAKE_CELL_H diff --git a/source/source_relax/test/relax_test.h b/source/source_relax/test/relax_test.h index d3c6ce5d2f..fa787a909a 100644 --- a/source/source_relax/test/relax_test.h +++ b/source/source_relax/test/relax_test.h @@ -26,4 +26,4 @@ void ModuleSymmetry::Symmetry::symmetrize_mat3(ModuleBase::matrix& sigma, const void ModuleSymmetry::Symmetry::symmetrize_vec3_nat(double* v)const {}; Structure_Factor::Structure_Factor() {}; Structure_Factor::~Structure_Factor(){}; -void Structure_Factor::setup_structure_factor(const UnitCell* Ucell, const Parallel_Grid&, const ModulePW::PW_Basis* rho_basis){}; +void Structure_Factor::setup(const UnitCell* Ucell, const Parallel_Grid&, const ModulePW::PW_Basis* rho_basis){}; diff --git a/tests/01_PW/011_PW_0ATOM/INPUT b/tests/01_PW/011_PW_0ATOM/INPUT index 8488f61585..03dd625920 100644 --- a/tests/01_PW/011_PW_0ATOM/INPUT +++ b/tests/01_PW/011_PW_0ATOM/INPUT @@ -1,7 +1,8 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest -calculation scf +calculation scf +init_wfc random nbands 6 symmetry 0 @@ -25,4 +26,4 @@ test_force 1 cal_stress 1 test_stress 1 -pw_seed 1 \ No newline at end of file +pw_seed 1 diff --git a/tests/01_PW/013_PW_ONCV_LDA/INPUT b/tests/01_PW/013_PW_ONCV_LDA/INPUT index 58e7c76e00..5d23e29076 100644 --- a/tests/01_PW/013_PW_ONCV_LDA/INPUT +++ b/tests/01_PW/013_PW_ONCV_LDA/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/016_PW_BLPS/INPUT b/tests/01_PW/016_PW_BLPS/INPUT index 39cdf2647c..19c2f8c7d7 100644 --- a/tests/01_PW/016_PW_BLPS/INPUT +++ b/tests/01_PW/016_PW_BLPS/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/017_PW_LPS6/INPUT b/tests/01_PW/017_PW_LPS6/INPUT index 54ac435ade..91483101d4 100644 --- a/tests/01_PW/017_PW_LPS6/INPUT +++ b/tests/01_PW/017_PW_LPS6/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 13 symmetry 1 diff --git a/tests/01_PW/018_PW_LPS8/INPUT b/tests/01_PW/018_PW_LPS8/INPUT index 92ffb868c9..62e81c6abc 100644 --- a/tests/01_PW/018_PW_LPS8/INPUT +++ b/tests/01_PW/018_PW_LPS8/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 3 symmetry 1 diff --git a/tests/01_PW/020_PW_kspace/INPUT b/tests/01_PW/020_PW_kspace/INPUT index cb9ee63eb9..fea245ffbb 100644 --- a/tests/01_PW/020_PW_kspace/INPUT +++ b/tests/01_PW/020_PW_kspace/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS suffix autotest calculation scf +init_wfc random symmetry 1 ecutwfc 20 diff --git a/tests/01_PW/021_PW_kspace3/INPUT b/tests/01_PW/021_PW_kspace3/INPUT index d0905b2ee0..fd6882a33c 100644 --- a/tests/01_PW/021_PW_kspace3/INPUT +++ b/tests/01_PW/021_PW_kspace3/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS suffix autotest calculation scf +init_wfc random symmetry 1 ecutwfc 5 diff --git a/tests/01_PW/029_PW_15_CF_CS_S1_smallg/INPUT b/tests/01_PW/029_PW_15_CF_CS_S1_smallg/INPUT index cfed35bc54..9c648e45dc 100644 --- a/tests/01_PW/029_PW_15_CF_CS_S1_smallg/INPUT +++ b/tests/01_PW/029_PW_15_CF_CS_S1_smallg/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/030_PW_15_CF_CS_S2_smallg/INPUT b/tests/01_PW/030_PW_15_CF_CS_S2_smallg/INPUT index 3da3a89c0f..4a1cb22210 100644 --- a/tests/01_PW/030_PW_15_CF_CS_S2_smallg/INPUT +++ b/tests/01_PW/030_PW_15_CF_CS_S2_smallg/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/035_PW_15_SO/INPUT b/tests/01_PW/035_PW_15_SO/INPUT index 6d62acf937..39c2798e90 100644 --- a/tests/01_PW/035_PW_15_SO/INPUT +++ b/tests/01_PW/035_PW_15_SO/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB +init_wfc random #nbands 40 gamma_only 0 @@ -14,7 +15,7 @@ relax_nmax 1 force_thr_ev 0.001 out_level ie relax_method cg -out_chg 1 +# out_chg 1 #out_band 1 #init_chg file diff --git a/tests/01_PW/036_PW_AF/INPUT b/tests/01_PW/036_PW_AF/INPUT index 63b1c605c7..f22bf6f7ff 100644 --- a/tests/01_PW/036_PW_AF/INPUT +++ b/tests/01_PW/036_PW_AF/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS suffix autotest +init_wfc random #nbands 40 calculation scf @@ -18,7 +19,7 @@ out_chg 0 smearing_method gaussian smearing_sigma 0.07 -mixing_type broyden +mixing_type broyden mixing_beta 0.2 ks_solver cg diff --git a/tests/01_PW/037_PW_FM/INPUT b/tests/01_PW/037_PW_FM/INPUT index 3e35f70dec..717202f9e4 100644 --- a/tests/01_PW/037_PW_FM/INPUT +++ b/tests/01_PW/037_PW_FM/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS suffix autotest +init_wfc random #nbands 40 calculation scf @@ -18,7 +19,7 @@ out_chg 0 smearing_method gaussian smearing_sigma 0.07 -mixing_type broyden +mixing_type broyden mixing_beta 0.2 ks_solver cg diff --git a/tests/01_PW/038_PW_NC/INPUT b/tests/01_PW/038_PW_NC/INPUT index acdac8c09e..6f890fa534 100644 --- a/tests/01_PW/038_PW_NC/INPUT +++ b/tests/01_PW/038_PW_NC/INPUT @@ -1,5 +1,6 @@ INPUT_PARAMETERS +init_wfc random # pw scf non-collinear calculations basis_type pw calculation scf @@ -20,7 +21,7 @@ smearing_method gaussian smearing_sigma 0.02 # charge mixing method -mixing_type broyden +mixing_type broyden mixing_beta 0.2 mixing_ndim 10 diff --git a/tests/01_PW/039_PW_FD_smear/INPUT b/tests/01_PW/039_PW_FD_smear/INPUT index aea44c4a4c..c8aea10376 100644 --- a/tests/01_PW/039_PW_FD_smear/INPUT +++ b/tests/01_PW/039_PW_FD_smear/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 35 symmetry 1 diff --git a/tests/01_PW/041_PW_GA_smear/INPUT b/tests/01_PW/041_PW_GA_smear/INPUT index 149e0a585a..d094d6e3c7 100644 --- a/tests/01_PW/041_PW_GA_smear/INPUT +++ b/tests/01_PW/041_PW_GA_smear/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 30 symmetry 1 @@ -17,7 +18,7 @@ scf_nmax 100 basis_type pw #Parameters (4.Smearing) -smearing_method gauss +smearing_method gauss smearing_sigma 0.002 #Parameters (5.Mixing) diff --git a/tests/01_PW/042_PW_M2_smear/INPUT b/tests/01_PW/042_PW_M2_smear/INPUT index 3432a4d8c4..b99655a898 100644 --- a/tests/01_PW/042_PW_M2_smear/INPUT +++ b/tests/01_PW/042_PW_M2_smear/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/043_PW_MP_smear/INPUT b/tests/01_PW/043_PW_MP_smear/INPUT index 6473f5b9f1..9a9d51a91f 100644 --- a/tests/01_PW/043_PW_MP_smear/INPUT +++ b/tests/01_PW/043_PW_MP_smear/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 diff --git a/tests/01_PW/044_PW_MV_smear/INPUT b/tests/01_PW/044_PW_MV_smear/INPUT index 1894fca69a..bfa97ba7ff 100644 --- a/tests/01_PW/044_PW_MV_smear/INPUT +++ b/tests/01_PW/044_PW_MV_smear/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/045_PW_BD_chgmix/INPUT b/tests/01_PW/045_PW_BD_chgmix/INPUT index 0636e83165..90bdb4be31 100644 --- a/tests/01_PW/045_PW_BD_chgmix/INPUT +++ b/tests/01_PW/045_PW_BD_chgmix/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 @@ -21,6 +22,6 @@ smearing_method gauss smearing_sigma 0.002 #Parameters (5.Mixing) -mixing_type broyden +mixing_type broyden mixing_beta 0.7 diff --git a/tests/01_PW/046_PW_KK_chgmix/INPUT b/tests/01_PW/046_PW_KK_chgmix/INPUT index 75730ec689..fddb9df523 100644 --- a/tests/01_PW/046_PW_KK_chgmix/INPUT +++ b/tests/01_PW/046_PW_KK_chgmix/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 diff --git a/tests/01_PW/047_PW_PK_chgmix/INPUT b/tests/01_PW/047_PW_PK_chgmix/INPUT index 2132fca512..dc5aa05437 100644 --- a/tests/01_PW/047_PW_PK_chgmix/INPUT +++ b/tests/01_PW/047_PW_PK_chgmix/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 diff --git a/tests/01_PW/048_PW_PL_chgmix/INPUT b/tests/01_PW/048_PW_PL_chgmix/INPUT index e0b5e7929c..fddb9df523 100644 --- a/tests/01_PW/048_PW_PL_chgmix/INPUT +++ b/tests/01_PW/048_PW_PL_chgmix/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 @@ -21,6 +22,6 @@ smearing_method gauss smearing_sigma 0.002 #Parameters (5.Mixing) -mixing_type plain +mixing_type plain mixing_beta 0.7 diff --git a/tests/01_PW/049_PW_PU_chgmix/INPUT b/tests/01_PW/049_PW_PU_chgmix/INPUT index 0a3df08fa0..d644b81e82 100644 --- a/tests/01_PW/049_PW_PU_chgmix/INPUT +++ b/tests/01_PW/049_PW_PU_chgmix/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 12 symmetry 1 diff --git a/tests/01_PW/050_PW_CHG_mismatch/INPUT b/tests/01_PW/050_PW_CHG_mismatch/INPUT index 40e519643a..b8b13f7e51 100644 --- a/tests/01_PW/050_PW_CHG_mismatch/INPUT +++ b/tests/01_PW/050_PW_CHG_mismatch/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nspin 2 nbands 6 diff --git a/tests/01_PW/055_PW_OW/INPUT b/tests/01_PW/055_PW_OW/INPUT index 02690cc991..8bc826697e 100644 --- a/tests/01_PW/055_PW_OW/INPUT +++ b/tests/01_PW/055_PW_OW/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS basis_type pw nspin 2 calculation scf +init_wfc random out_wfc_pw 1 nbands 6 diff --git a/tests/01_PW/058_PW_RE_MB/INPUT b/tests/01_PW/058_PW_RE_MB/INPUT index cb65f32dae..34d5a25637 100644 --- a/tests/01_PW/058_PW_RE_MB/INPUT +++ b/tests/01_PW/058_PW_RE_MB/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS # Directories suffix autotest pseudo_dir ../../PP_ORB +init_wfc random # Relaxation Method calculation relax diff --git a/tests/01_PW/059_PW_RE_MB_traj/INPUT b/tests/01_PW/059_PW_RE_MB_traj/INPUT index 59254d64f2..c25e3e4715 100644 --- a/tests/01_PW/059_PW_RE_MB_traj/INPUT +++ b/tests/01_PW/059_PW_RE_MB_traj/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation relax +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/060_PW_RE_MG/INPUT b/tests/01_PW/060_PW_RE_MG/INPUT index af7cac0310..7e6f95d0eb 100644 --- a/tests/01_PW/060_PW_RE_MG/INPUT +++ b/tests/01_PW/060_PW_RE_MG/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation relax +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/063_PW_CR/INPUT b/tests/01_PW/063_PW_CR/INPUT index 60c12dfef3..2331cca078 100644 --- a/tests/01_PW/063_PW_CR/INPUT +++ b/tests/01_PW/063_PW_CR/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest +init_wfc random pseudo_dir ../../PP_ORB calculation cell-relax basis_type pw @@ -19,7 +20,7 @@ relax_new 0 cal_stress 1 stress_thr 0.1 cal_force 1 -force_thr_ev 0.001 +force_thr_ev 0.001 mixing_type broyden mixing_beta 0.7 diff --git a/tests/01_PW/064_PW_CR_fix_a/INPUT b/tests/01_PW/064_PW_CR_fix_a/INPUT index 03af025629..d03c4429d6 100644 --- a/tests/01_PW/064_PW_CR_fix_a/INPUT +++ b/tests/01_PW/064_PW_CR_fix_a/INPUT @@ -2,8 +2,9 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB +init_wfc random pw_seed 1 - + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/065_PW_CR_fix_ab/INPUT b/tests/01_PW/065_PW_CR_fix_ab/INPUT index edb8c154eb..f721721c36 100644 --- a/tests/01_PW/065_PW_CR_fix_ab/INPUT +++ b/tests/01_PW/065_PW_CR_fix_ab/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/066_PW_CR_fix_abc/INPUT b/tests/01_PW/066_PW_CR_fix_abc/INPUT index c8e05d9392..5cd8eddd51 100644 --- a/tests/01_PW/066_PW_CR_fix_abc/INPUT +++ b/tests/01_PW/066_PW_CR_fix_abc/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax diff --git a/tests/01_PW/067_PW_CR_fix_ac/INPUT b/tests/01_PW/067_PW_CR_fix_ac/INPUT index 18c4d51efb..32166519cb 100644 --- a/tests/01_PW/067_PW_CR_fix_ac/INPUT +++ b/tests/01_PW/067_PW_CR_fix_ac/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/068_PW_CR_fix_b/INPUT b/tests/01_PW/068_PW_CR_fix_b/INPUT index f1022b2611..842555fddf 100644 --- a/tests/01_PW/068_PW_CR_fix_b/INPUT +++ b/tests/01_PW/068_PW_CR_fix_b/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/069_PW_CR_fix_bc/INPUT b/tests/01_PW/069_PW_CR_fix_bc/INPUT index 48cef8e62d..0e952f9438 100644 --- a/tests/01_PW/069_PW_CR_fix_bc/INPUT +++ b/tests/01_PW/069_PW_CR_fix_bc/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/070_PW_CR_fix_c/INPUT b/tests/01_PW/070_PW_CR_fix_c/INPUT index 5626335f68..c4529c4d68 100644 --- a/tests/01_PW/070_PW_CR_fix_c/INPUT +++ b/tests/01_PW/070_PW_CR_fix_c/INPUT @@ -3,7 +3,8 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB pw_seed 1 - +init_wfc random + nbands 8 calculation cell-relax symmetry 0 diff --git a/tests/01_PW/071_PW_CR_move/INPUT b/tests/01_PW/071_PW_CR_move/INPUT index dd42ff24a0..5e62c5f2b7 100644 --- a/tests/01_PW/071_PW_CR_move/INPUT +++ b/tests/01_PW/071_PW_CR_move/INPUT @@ -2,7 +2,8 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB - +init_wfc random + nbands 8 calculation cell-relax #Parameters (Accuracy) diff --git a/tests/01_PW/072_PW_ELF/INPUT b/tests/01_PW/072_PW_ELF/INPUT index cdf99b9343..b11284454d 100644 --- a/tests/01_PW/072_PW_ELF/INPUT +++ b/tests/01_PW/072_PW_ELF/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/075_PW_CHG_BINARY/INPUT b/tests/01_PW/075_PW_CHG_BINARY/INPUT index 20e786ba0e..124745ac5f 100644 --- a/tests/01_PW/075_PW_CHG_BINARY/INPUT +++ b/tests/01_PW/075_PW_CHG_BINARY/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 0 latname fcc diff --git a/tests/01_PW/076_PW_elec_add/INPUT b/tests/01_PW/076_PW_elec_add/INPUT index 5391f2b2ed..b2daf62677 100644 --- a/tests/01_PW/076_PW_elec_add/INPUT +++ b/tests/01_PW/076_PW_elec_add/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/077_PW_elec_minus/INPUT b/tests/01_PW/077_PW_elec_minus/INPUT index 6cfe39d668..e62fde3e8b 100644 --- a/tests/01_PW/077_PW_elec_minus/INPUT +++ b/tests/01_PW/077_PW_elec_minus/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/078_PW_S2_elec_add/INPUT b/tests/01_PW/078_PW_S2_elec_add/INPUT index d894338da8..06ab402779 100644 --- a/tests/01_PW/078_PW_S2_elec_add/INPUT +++ b/tests/01_PW/078_PW_S2_elec_add/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/079_PW_S2_elec_minus/INPUT b/tests/01_PW/079_PW_S2_elec_minus/INPUT index 6aeb5f4f93..d94184e3b1 100644 --- a/tests/01_PW/079_PW_S2_elec_minus/INPUT +++ b/tests/01_PW/079_PW_S2_elec_minus/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 8 symmetry 1 diff --git a/tests/01_PW/080_PW_dipole/INPUT b/tests/01_PW/080_PW_dipole/INPUT index 22b9b9a172..b5cd822ccb 100644 --- a/tests/01_PW/080_PW_dipole/INPUT +++ b/tests/01_PW/080_PW_dipole/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 0 diff --git a/tests/01_PW/081_PW_efield/INPUT b/tests/01_PW/081_PW_efield/INPUT index e6ea9fe492..cdab6d7dd2 100644 --- a/tests/01_PW/081_PW_efield/INPUT +++ b/tests/01_PW/081_PW_efield/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 0 diff --git a/tests/01_PW/082_PW_gatefield/INPUT b/tests/01_PW/082_PW_gatefield/INPUT index d669d47ca6..35ba0dcbf4 100644 --- a/tests/01_PW/082_PW_gatefield/INPUT +++ b/tests/01_PW/082_PW_gatefield/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 0 diff --git a/tests/01_PW/083_PW_sol_H2/INPUT b/tests/01_PW/083_PW_sol_H2/INPUT index f0a5f54268..c1e566f1f6 100644 --- a/tests/01_PW/083_PW_sol_H2/INPUT +++ b/tests/01_PW/083_PW_sol_H2/INPUT @@ -2,8 +2,9 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB +init_wfc random pw_seed 1 - + nbands 2 calculation scf basis_type pw diff --git a/tests/01_PW/084_PW_sol_H2O/INPUT b/tests/01_PW/084_PW_sol_H2O/INPUT index 8b1175fe87..b0c786df5d 100644 --- a/tests/01_PW/084_PW_sol_H2O/INPUT +++ b/tests/01_PW/084_PW_sol_H2O/INPUT @@ -1,7 +1,8 @@ INPUT_PARAMETERS - + calculation scf basis_type pw +init_wfc random pw_seed 1 cal_force 1 nbands 20 diff --git a/tests/01_PW/085_PW_get_pchg/INPUT b/tests/01_PW/085_PW_get_pchg/INPUT index 1c319c8366..6be22de010 100644 --- a/tests/01_PW/085_PW_get_pchg/INPUT +++ b/tests/01_PW/085_PW_get_pchg/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/086_PW_get_wf/INPUT b/tests/01_PW/086_PW_get_wf/INPUT index cf8619c111..f1a1536905 100644 --- a/tests/01_PW/086_PW_get_wf/INPUT +++ b/tests/01_PW/086_PW_get_wf/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/087_PW_get_pchg_kpar/INPUT b/tests/01_PW/087_PW_get_pchg_kpar/INPUT index 1a7c8d2f35..513a95322b 100644 --- a/tests/01_PW/087_PW_get_pchg_kpar/INPUT +++ b/tests/01_PW/087_PW_get_pchg_kpar/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/088_PW_get_pchg_sepk/INPUT b/tests/01_PW/088_PW_get_pchg_sepk/INPUT index 8bb4019fb5..2febcbb16f 100644 --- a/tests/01_PW/088_PW_get_pchg_sepk/INPUT +++ b/tests/01_PW/088_PW_get_pchg_sepk/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/089_PW_get_wf_kpar/INPUT b/tests/01_PW/089_PW_get_wf_kpar/INPUT index ee62db77cd..25ffb89ecc 100644 --- a/tests/01_PW/089_PW_get_wf_kpar/INPUT +++ b/tests/01_PW/089_PW_get_wf_kpar/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/091_PW_CR_VDW3/INPUT b/tests/01_PW/091_PW_CR_VDW3/INPUT index de91d6509f..634b6a0810 100644 --- a/tests/01_PW/091_PW_CR_VDW3/INPUT +++ b/tests/01_PW/091_PW_CR_VDW3/INPUT @@ -1,5 +1,6 @@ INPUT_PARAMETERS +init_wfc random ecutwfc 20 scf_thr 1e-08 scf_nmax 400 diff --git a/tests/01_PW/092_PW_MSST/INPUT b/tests/01_PW/092_PW_MSST/INPUT index b110b0a8da..bd7aba8f2d 100644 --- a/tests/01_PW/092_PW_MSST/INPUT +++ b/tests/01_PW/092_PW_MSST/INPUT @@ -1,36 +1,37 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB - +pseudo_dir ../../PP_ORB +init_wfc random + nbands 8 calculation md read_file_dir ./ #Parameters (Accuracy) ecutwfc 20 -scf_nmax 20 +scf_nmax 20 basis_type pw -md_nstep 3 +md_nstep 3 -smearing_method gauss -smearing_sigma 0.001 +smearing_method gauss +smearing_sigma 0.001 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 ks_solver cg mixing_type broyden mixing_beta 0.7 -md_type msst -md_tfirst 10 -md_dt 1 -md_restart 0 -init_vel 1 +md_type msst +md_tfirst 10 +md_dt 1 +md_restart 0 +init_vel 1 -msst_qmass 1 -msst_vel 10 +msst_qmass 1 +msst_vel 10 -pw_seed 1 +pw_seed 1 diff --git a/tests/01_PW/092_PW_MSST/result.ref b/tests/01_PW/092_PW_MSST/result.ref index 13752bd260..83962380b7 100644 --- a/tests/01_PW/092_PW_MSST/result.ref +++ b/tests/01_PW/092_PW_MSST/result.ref @@ -1,5 +1,5 @@ -etotref -250.4498856072767 -etotperatomref -125.2249428036 -totalforceref 7.137474 -totalstressref 322.546737 -totaltimeref 10.48 +etotref -250.1541088328131 +etotperatomref -125.0770544164 +totalforceref 8.894978 +totalstressref 365.361230 +totaltimeref 2.51 diff --git a/tests/01_PW/093_PW_MSST2/INPUT b/tests/01_PW/093_PW_MSST2/INPUT index d25545fa76..8f6860ac7d 100644 --- a/tests/01_PW/093_PW_MSST2/INPUT +++ b/tests/01_PW/093_PW_MSST2/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest calculation md +init_wfc random nbands 8 pseudo_dir ../../PP_ORB @@ -19,7 +20,7 @@ smearing_sigma 0.001 cal_stress 1 cal_force 1 -md_nstep 3 +md_nstep 4 md_type msst md_prec_level 2 md_tfirst 10 diff --git a/tests/01_PW/094_PW_NPT/INPUT b/tests/01_PW/094_PW_NPT/INPUT index cbfc39af19..2273b1cd4a 100644 --- a/tests/01_PW/094_PW_NPT/INPUT +++ b/tests/01_PW/094_PW_NPT/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest calculation md +init_wfc random pseudo_dir ../../PP_ORB pw_seed 1 nbands 8 @@ -17,10 +18,10 @@ ks_solver cg mixing_type broyden mixing_beta 0.7 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 -md_nstep 3 +md_nstep 4 md_type npt md_pmode iso md_dt 1 diff --git a/tests/01_PW/095_PW_NVT/INPUT b/tests/01_PW/095_PW_NVT/INPUT index 59ecaf90fa..992840ffb9 100644 --- a/tests/01_PW/095_PW_NVT/INPUT +++ b/tests/01_PW/095_PW_NVT/INPUT @@ -1,32 +1,33 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB - +pseudo_dir ../../PP_ORB +init_wfc random + nbands 8 calculation md read_file_dir ./ #Parameters (Accuracy) ecutwfc 20 -scf_nmax 20 +scf_nmax 20 basis_type pw -md_nstep 5 +md_nstep 6 -cal_stress 1 +cal_stress 1 stress_thr 1e-6 -cal_force 1 +cal_force 1 force_thr_ev 1.0e-3 ks_solver cg mixing_type broyden mixing_beta 0.7 -md_tchain 4 -md_type nvt -md_tfreq 0.1 -md_tfirst 10 -md_dt 1 -md_restart 1 -init_vel 1 +md_tchain 4 +md_type nvt +md_tfreq 0.1 +md_tfirst 10 +md_dt 1 +md_restart 1 +init_vel 1 diff --git a/tests/01_PW/095_PW_NVT/Restart_md.dat b/tests/01_PW/095_PW_NVT/Restart_md.txt similarity index 100% rename from tests/01_PW/095_PW_NVT/Restart_md.dat rename to tests/01_PW/095_PW_NVT/Restart_md.txt diff --git a/tests/01_PW/096_PW_PBE0/INPUT b/tests/01_PW/096_PW_PBE0/INPUT index ea943fad41..c35721969f 100644 --- a/tests/01_PW/096_PW_PBE0/INPUT +++ b/tests/01_PW/096_PW_PBE0/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS #Parameters (System) suffix autotest +init_wfc random nbands 2 stru_file STRU @@ -11,7 +12,7 @@ calculation scf #Parameters (PW) ecutwfc 10.0 # Rydberg #Parameters (electronic) -basis_type pw +basis_type pw scf_thr 1e-3 smearing_method fixed diff --git a/tests/01_PW/096_PW_PBE0_AFM/INPUT b/tests/01_PW/096_PW_PBE0_AFM/INPUT new file mode 100644 index 0000000000..34e5220d03 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_AFM/INPUT @@ -0,0 +1,31 @@ +INPUT_PARAMETERS +#Parameters (System) +suffix autotest +calculation scf +nspin 2 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (PW) +ecutwfc 30 +basis_type pw + +#Parameters (SCF) +scf_thr 1.0e-7 +scf_nmax 100 +smearing_method gaussian +smearing_sigma 0.015 +mixing_type pulay +mixing_ndim 8 +mixing_beta 0.2 + +#Parameters (Hybrid Functional) +dft_functional pbe0 + +#Parameters (Other) +symmetry -1 +init_wfc random +pw_seed 1 +device cpu +exx_thr_type energy +exx_ene_thr 5e-2 \ No newline at end of file diff --git a/tests/01_PW/096_PW_PBE0_AFM/KPT b/tests/01_PW/096_PW_PBE0_AFM/KPT new file mode 100644 index 0000000000..e583e6e418 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_AFM/KPT @@ -0,0 +1,7 @@ +K_POINTS +0 +Gamma +1 1 1 0 0 0 +### If you are running an energy calculation, please make sure your final energy is +### converged with respect to the k-point settings, unless you set a loose k-point +### mesh on purpose. diff --git a/tests/01_PW/096_PW_PBE0_AFM/README b/tests/01_PW/096_PW_PBE0_AFM/README new file mode 100644 index 0000000000..6f0a2e68a4 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_AFM/README @@ -0,0 +1 @@ +Fe Anti-ferromagnetic with nspin=2 hybrid functional (PBE0), PW basis, init magnet: up + down \ No newline at end of file diff --git a/tests/01_PW/096_PW_PBE0_AFM/STRU b/tests/01_PW/096_PW_PBE0_AFM/STRU new file mode 100644 index 0000000000..41c2d00632 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_AFM/STRU @@ -0,0 +1,19 @@ +ATOMIC_SPECIES +Fe 55.845 Fe_ONCV_PBE-1.0.upf + + +LATTICE_CONSTANT +1.889725989 + +LATTICE_VECTORS + 2.8328152400000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 2.8328152400000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 2.8328152400000000 +ATOMIC_POSITIONS +Direct + +Fe +1.0 +2 +0.0 0.0 0.0 mag 5 +0.5 0.5 0.5 mag -5 diff --git a/tests/01_PW/096_PW_PBE0_AFM/result.ref b/tests/01_PW/096_PW_PBE0_AFM/result.ref new file mode 100644 index 0000000000..94d18e2a1c --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_AFM/result.ref @@ -0,0 +1,3 @@ +etotref -6383.448381202996 +etotperatomref -3191.7241906015 +totaltimeref 1.06 diff --git a/tests/01_PW/096_PW_PBE0_FM/INPUT b/tests/01_PW/096_PW_PBE0_FM/INPUT new file mode 100644 index 0000000000..34e5220d03 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_FM/INPUT @@ -0,0 +1,31 @@ +INPUT_PARAMETERS +#Parameters (System) +suffix autotest +calculation scf +nspin 2 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (PW) +ecutwfc 30 +basis_type pw + +#Parameters (SCF) +scf_thr 1.0e-7 +scf_nmax 100 +smearing_method gaussian +smearing_sigma 0.015 +mixing_type pulay +mixing_ndim 8 +mixing_beta 0.2 + +#Parameters (Hybrid Functional) +dft_functional pbe0 + +#Parameters (Other) +symmetry -1 +init_wfc random +pw_seed 1 +device cpu +exx_thr_type energy +exx_ene_thr 5e-2 \ No newline at end of file diff --git a/tests/01_PW/096_PW_PBE0_FM/KPT b/tests/01_PW/096_PW_PBE0_FM/KPT new file mode 100644 index 0000000000..e583e6e418 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_FM/KPT @@ -0,0 +1,7 @@ +K_POINTS +0 +Gamma +1 1 1 0 0 0 +### If you are running an energy calculation, please make sure your final energy is +### converged with respect to the k-point settings, unless you set a loose k-point +### mesh on purpose. diff --git a/tests/01_PW/096_PW_PBE0_FM/README b/tests/01_PW/096_PW_PBE0_FM/README new file mode 100644 index 0000000000..99bca880b5 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_FM/README @@ -0,0 +1,3 @@ +Fe Ferromagnetic with nspin=2 hybrid functional (PBE0), PW basis, init magnet: up + up + + diff --git a/tests/01_PW/096_PW_PBE0_FM/STRU b/tests/01_PW/096_PW_PBE0_FM/STRU new file mode 100644 index 0000000000..34fa5b31d0 --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_FM/STRU @@ -0,0 +1,19 @@ +ATOMIC_SPECIES +Fe 55.845 Fe_ONCV_PBE-1.0.upf + + +LATTICE_CONSTANT +1.889725989 + +LATTICE_VECTORS + 2.8328152400000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 2.8328152400000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 2.8328152400000000 +ATOMIC_POSITIONS +Direct + +Fe +1.0 +2 +0.0 0.0 0.0 mag 5 +0.5 0.5 0.5 mag 5 diff --git a/tests/01_PW/096_PW_PBE0_FM/result.ref b/tests/01_PW/096_PW_PBE0_FM/result.ref new file mode 100644 index 0000000000..5b7663ffcd --- /dev/null +++ b/tests/01_PW/096_PW_PBE0_FM/result.ref @@ -0,0 +1,3 @@ +etotref -6382.460958449486 +etotperatomref -3191.2304792247 +totaltimeref 1.59 \ No newline at end of file diff --git a/tests/01_PW/097_PW_LDOS/INPUT b/tests/01_PW/097_PW_LDOS/INPUT index 9b0aea40f5..fa0e7f14eb 100644 --- a/tests/01_PW/097_PW_LDOS/INPUT +++ b/tests/01_PW/097_PW_LDOS/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/098_PW_15_SO_avg/INPUT b/tests/01_PW/098_PW_15_SO_avg/INPUT index 68dbf0fd2b..ac614c597f 100644 --- a/tests/01_PW/098_PW_15_SO_avg/INPUT +++ b/tests/01_PW/098_PW_15_SO_avg/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB +init_wfc random #nbands 40 gamma_only 0 @@ -14,7 +15,7 @@ relax_nmax 1 force_thr_ev 0.001 out_level ie relax_method cg -out_chg 1 +# out_chg 1 #out_band 1 #init_chg file diff --git a/tests/01_PW/100_PW_W90/INPUT b/tests/01_PW/100_PW_W90/INPUT index f088e3a40f..32f5b94efd 100644 --- a/tests/01_PW/100_PW_W90/INPUT +++ b/tests/01_PW/100_PW_W90/INPUT @@ -1,5 +1,6 @@ INPUT_PARAMETERS suffix autotest +init_wfc random pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB ecutwfc 50 diff --git a/tests/01_PW/101_PW_MD_1O/INPUT b/tests/01_PW/101_PW_MD_1O/INPUT index c20bce745e..a2736a0b94 100644 --- a/tests/01_PW/101_PW_MD_1O/INPUT +++ b/tests/01_PW/101_PW_MD_1O/INPUT @@ -1,31 +1,32 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest - +init_wfc random + nbands 8 calculation md #Parameters (Accuracy) ecutwfc 20 -scf_nmax 50 -scf_thr 1.0e-8 +scf_nmax 50 +scf_thr 1.0e-8 basis_type pw -md_nstep 3 +md_nstep 4 -cal_stress 1 +cal_stress 1 stress_thr 1e-6 -cal_force 1 +cal_force 1 force_thr_ev 1.0e-3 mixing_type broyden mixing_beta 0.7 -chg_extrap first-order +chg_extrap first-order -md_tchain 4 -md_tfirst 10 -md_tfreq 0.1 -init_vel 1 -pseudo_dir ../../PP_ORB -pw_seed 1 +md_tchain 4 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 +pseudo_dir ../../PP_ORB +pw_seed 1 diff --git a/tests/01_PW/102_PW_MD_2O/INPUT b/tests/01_PW/102_PW_MD_2O/INPUT index bcde3a9ca6..06fcbd3638 100644 --- a/tests/01_PW/102_PW_MD_2O/INPUT +++ b/tests/01_PW/102_PW_MD_2O/INPUT @@ -1,30 +1,31 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest - +init_wfc random + nbands 8 calculation md #Parameters (Accuracy) ecutwfc 20 -scf_nmax 50 -scf_thr 1.0e-8 +scf_nmax 50 +scf_thr 1.0e-8 basis_type pw -md_nstep 3 +md_nstep 4 -cal_stress 1 +cal_stress 1 stress_thr 1e-6 -cal_force 1 +cal_force 1 force_thr_ev 1.0e-3 mixing_type broyden mixing_beta 0.7 -chg_extrap second-order +chg_extrap second-order md_tfirst 10 md_tfreq 0.1 init_vel 1 -pseudo_dir ../../PP_ORB +pseudo_dir ../../PP_ORB pw_seed 1 diff --git a/tests/01_PW/202_PW_ONCV_Libxc/INPUT b/tests/01_PW/202_PW_ONCV_Libxc/INPUT index e46ac262e8..dc4815ce81 100644 --- a/tests/01_PW/202_PW_ONCV_Libxc/INPUT +++ b/tests/01_PW/202_PW_ONCV_Libxc/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 6 symmetry 1 diff --git a/tests/01_PW/204_PW_SY/INPUT b/tests/01_PW/204_PW_SY/INPUT index 45393cdaa7..3af4d5989f 100644 --- a/tests/01_PW/204_PW_SY/INPUT +++ b/tests/01_PW/204_PW_SY/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random symmetry 1 pseudo_dir ../../PP_ORB diff --git a/tests/01_PW/205_PW_SCAN/INPUT b/tests/01_PW/205_PW_SCAN/INPUT index 2e9a4ec38b..32d21b7a87 100644 --- a/tests/01_PW/205_PW_SCAN/INPUT +++ b/tests/01_PW/205_PW_SCAN/INPUT @@ -3,6 +3,7 @@ INPUT_PARAMETERS suffix autotest calculation scf kpar 2 +init_wfc random pseudo_dir ../../PP_ORB diff --git a/tests/01_PW/206_PW_SCAN_S2/INPUT b/tests/01_PW/206_PW_SCAN_S2/INPUT index 42dacc7dc7..f11e1da3af 100644 --- a/tests/01_PW/206_PW_SCAN_S2/INPUT +++ b/tests/01_PW/206_PW_SCAN_S2/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random pseudo_dir ../../PP_ORB pw_seed 1 diff --git a/tests/01_PW/207_PW_skip/INPUT b/tests/01_PW/207_PW_skip/INPUT index dac128c01f..edb73ebabf 100644 --- a/tests/01_PW/207_PW_skip/INPUT +++ b/tests/01_PW/207_PW_skip/INPUT @@ -2,6 +2,7 @@ INPUT_PARAMETERS #Parameters (1.General) suffix autotest calculation scf +init_wfc random nbands 10 symmetry 1 diff --git a/tests/01_PW/209_PW_DFTHALF/INPUT b/tests/01_PW/209_PW_DFTHALF/INPUT index 5737d3b48b..68229a9369 100644 --- a/tests/01_PW/209_PW_DFTHALF/INPUT +++ b/tests/01_PW/209_PW_DFTHALF/INPUT @@ -4,6 +4,7 @@ suffix autotest calculation scf ks_solver dav dfthalf_type 1 +init_wfc random symmetry 1 pseudo_dir ../../PP_ORB diff --git a/tests/01_PW/CASES_CPU.txt b/tests/01_PW/CASES_CPU.txt index 06af40e6ad..1057122012 100644 --- a/tests/01_PW/CASES_CPU.txt +++ b/tests/01_PW/CASES_CPU.txt @@ -94,6 +94,8 @@ 094_PW_NPT 095_PW_NVT 096_PW_PBE0 +096_PW_PBE0_AFM +096_PW_PBE0_FM 097_PW_LDOS 098_PW_15_SO_avg 099_PW_DJ_SO diff --git a/tests/02_NAO_Gamma/001_NO_GO_OHK/INPUT b/tests/02_NAO_Gamma/001_NO_GO_OHK/INPUT new file mode 100644 index 0000000000..0d0396c7d1 --- /dev/null +++ b/tests/02_NAO_Gamma/001_NO_GO_OHK/INPUT @@ -0,0 +1,35 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf + +nbands 6 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +gamma_only 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-8 +scf_nmax 100 + +#Parameters (3.Basis) +basis_type lcao + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 + +out_mat_hs 1 5 +out_ndigits 5 +#Parameters (5.Mixing) +mixing_type broyden +mixing_beta 0.7 +mixing_gg0 1.5 + +ks_solver scalapack_gvx + +bx 2 +by 2 +bz 2 diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/README b/tests/02_NAO_Gamma/001_NO_GO_OHK/README similarity index 100% rename from tests/02_NAO_Gamma/006_NO_GO_OH/README rename to tests/02_NAO_Gamma/001_NO_GO_OHK/README diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/STRU b/tests/02_NAO_Gamma/001_NO_GO_OHK/STRU similarity index 100% rename from tests/02_NAO_Gamma/006_NO_GO_OH/STRU rename to tests/02_NAO_Gamma/001_NO_GO_OHK/STRU diff --git a/tests/02_NAO_Gamma/001_NO_GO_OHK/hk_nao.txt.ref b/tests/02_NAO_Gamma/001_NO_GO_OHK/hk_nao.txt.ref new file mode 100644 index 0000000000..137aa45c0c --- /dev/null +++ b/tests/02_NAO_Gamma/001_NO_GO_OHK/hk_nao.txt.ref @@ -0,0 +1,89 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -6.56277e-01 -5.05476e-03 -1.33227e-15 1.55431e-15 1.11022e-16 -6.10623e-16 1.77636e-15 8.88178e-16 + -1.62299e-16 -1.02002e-15 -2.84495e-16 1.17545e-15 4.30211e-16 -4.64911e-02 -1.64084e-01 1.56125e-17 + 4.33681e-18 4.68375e-17 -2.60209e-17 -9.02056e-17 1.56125e-17 6.75277e-19 1.04083e-17 1.64799e-17 + 5.57536e-18 -2.03830e-17 +Row 2 + 4.60976e-01 3.05311e-16 -1.94289e-16 -3.05311e-16 -5.55112e-16 -4.99600e-16 -4.99600e-16 9.59202e-18 + -4.64906e-16 4.51028e-17 -1.67832e-16 -2.15106e-16 -1.64665e-01 1.35775e-02 -7.45931e-17 1.82146e-17 + 8.06646e-17 5.55112e-17 -5.20417e-18 -3.98986e-17 3.00313e-18 -6.31006e-17 -3.55618e-17 3.42436e-17 + -5.78964e-17 +Row 3 + -1.51652e-01 7.84095e-16 5.20417e-17 1.42215e-02 -6.52256e-16 -1.38778e-17 1.27676e-15 2.77556e-16 + -7.77156e-16 7.33767e-17 9.97934e-04 -1.77809e-17 7.97973e-17 3.57734e-02 -1.30104e-17 -7.80626e-18 + -2.51578e-02 -1.12757e-16 -7.97973e-17 -1.19262e-18 -7.15573e-18 2.84061e-17 -1.45213e-18 2.39861e-02 +Row 4 + -1.51652e-01 1.38778e-16 -9.64506e-16 1.42215e-02 -2.35922e-16 -5.55112e-17 8.32667e-17 9.97934e-04 + -1.66533e-16 5.55112e-16 2.51535e-17 -1.21431e-16 -8.23994e-18 3.57734e-02 -3.03577e-18 -5.20417e-18 + -2.51578e-02 -8.67362e-18 6.12574e-18 1.73472e-18 2.39861e-02 -1.84314e-18 -2.27682e-17 +Row 5 + -1.51652e-01 -3.46945e-17 -1.52656e-16 1.42215e-02 -2.77556e-17 9.97934e-04 5.82867e-16 9.99201e-16 + -1.66533e-16 4.98733e-17 7.97973e-17 -3.90313e-18 -2.03830e-17 3.57734e-02 3.29597e-17 -1.73472e-18 + -2.51578e-02 1.16552e-17 2.39861e-02 -5.20417e-18 -1.26852e-17 -6.50521e-18 +Row 6 + 6.77097e-01 -2.28983e-16 7.63278e-17 2.05391e-15 -8.32667e-16 1.22125e-15 -5.73015e-17 -1.33953e-03 + 6.03901e-17 1.73472e-18 -2.59125e-02 2.42861e-17 2.94903e-17 -8.86435e-02 3.46945e-18 -5.03070e-17 + 8.02310e-18 6.53774e-17 4.97649e-17 3.04771e-18 -2.24211e-02 +Row 7 + 6.77097e-01 -1.14492e-16 6.38378e-16 8.32667e-17 -1.33953e-03 3.88578e-16 1.38778e-16 -1.01915e-17 + 2.68882e-17 -8.32667e-17 -2.59125e-02 -7.41594e-17 -1.21431e-17 -8.86435e-02 7.45931e-17 -3.11166e-17 + -2.82977e-17 -2.24211e-02 -1.08420e-18 -5.72459e-17 +Row 8 + 6.77097e-01 2.49800e-16 -1.33953e-03 -1.38778e-16 1.33227e-15 -6.38378e-16 5.52943e-17 1.73472e-17 + 2.25514e-17 5.20417e-18 -2.59125e-02 -2.77556e-17 8.67362e-17 -8.86435e-02 2.86229e-17 -2.24211e-02 + -1.12757e-17 1.86483e-17 -4.01155e-18 +Row 9 + 7.51161e-01 -2.08167e-16 1.94289e-16 1.34361e-16 6.52256e-16 2.41146e-19 -2.15455e-17 -7.80626e-18 + -6.07153e-18 -3.46945e-18 5.55112e-17 -8.67362e-18 2.60209e-18 1.13528e-02 1.51788e-18 2.16840e-18 + -1.72670e-18 4.33681e-18 +Row 10 + 7.50429e-01 1.50921e-16 -1.04083e-16 -1.01481e-16 -5.63785e-18 1.21431e-17 -1.47451e-17 -2.08167e-17 + -2.35685e-02 -5.55112e-17 1.38778e-17 2.18116e-02 6.05798e-18 -2.05655e-02 9.75782e-18 1.23735e-17 + 1.25767e-17 +Row 11 + 7.50429e-01 7.63278e-17 1.02522e-15 -1.01915e-17 1.73472e-18 1.04083e-17 -2.35685e-02 -3.46945e-17 + -2.60209e-17 2.18116e-02 1.90820e-17 2.97478e-18 2.16840e-17 -2.05655e-02 -1.15603e-17 2.19009e-17 +Row 12 + 7.51161e-01 9.54624e-18 6.69062e-19 2.99309e-18 3.31382e-18 -7.80626e-18 1.51788e-17 -6.51442e-18 + -4.16334e-17 7.28584e-17 -1.40118e-18 -8.67362e-19 -2.60209e-18 1.13528e-02 1.97400e-19 +Row 13 + 7.50429e-01 -2.49366e-18 4.59702e-17 -2.35685e-02 4.33681e-18 9.54098e-18 2.18116e-02 6.07153e-17 + -2.25514e-17 -6.17995e-18 3.90313e-18 9.32414e-18 -4.52633e-19 -2.05655e-02 +Row 14 + -6.56278e-01 -5.05718e-03 1.30234e-15 -3.20967e-15 -1.35655e-15 4.35416e-16 -4.33681e-19 -1.85182e-16 + 1.74350e-16 9.40654e-16 5.16080e-16 -2.56515e-16 -8.67362e-17 +Row 15 + 4.60963e-01 2.92301e-16 -3.22659e-16 -3.50414e-16 2.09902e-16 -6.90420e-16 -1.09288e-16 1.98577e-17 + -2.04264e-16 -9.84456e-17 -1.94494e-16 8.19657e-17 +Row 16 + -1.51655e-01 -4.03323e-16 -1.84748e-16 1.42256e-02 -2.67147e-16 4.77049e-17 1.48536e-16 3.68629e-17 + 1.18482e-15 -5.77429e-17 -9.97149e-04 +Row 17 + -1.51655e-01 3.20924e-17 -1.87350e-16 1.42256e-02 -4.68375e-17 -1.07228e-15 -7.14706e-16 -9.97149e-04 + -2.08167e-17 9.49761e-17 +Row 18 + -1.51655e-01 8.06646e-17 3.72966e-17 1.42256e-02 -9.34691e-16 -9.97149e-04 -8.75602e-16 -4.27284e-16 + 2.20527e-15 +Row 19 + 6.77076e-01 -4.85723e-17 -1.28370e-16 2.68665e-16 1.52135e-15 1.01568e-15 -1.78500e-17 1.33804e-03 +Row 20 + 6.77076e-01 -1.90820e-16 -5.74085e-16 3.15286e-16 1.33804e-03 -1.89931e-15 5.42101e-16 +Row 21 + 6.77076e-01 -6.62990e-16 1.33804e-03 -6.43149e-16 7.92769e-16 1.70870e-15 +Row 22 + 7.51153e-01 7.86047e-18 -2.49150e-16 5.11870e-16 2.03071e-16 +Row 23 + 7.50428e-01 2.36356e-17 1.62305e-16 -2.94903e-16 +Row 24 + 7.50428e-01 -1.48536e-17 -3.10732e-16 +Row 25 + 7.51153e-01 3.68701e-17 +Row 26 + 7.50428e-01 diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/result.ref b/tests/02_NAO_Gamma/001_NO_GO_OHK/result.ref similarity index 50% rename from tests/02_NAO_Gamma/006_NO_GO_OH/result.ref rename to tests/02_NAO_Gamma/001_NO_GO_OHK/result.ref index 4257400dbc..768476ba12 100644 --- a/tests/02_NAO_Gamma/006_NO_GO_OH/result.ref +++ b/tests/02_NAO_Gamma/001_NO_GO_OHK/result.ref @@ -1,8 +1,8 @@ -etotref -204.1062806122546 -etotperatomref -102.0531403061 +etotref -204.106280612482 +etotperatomref -102.0531403062 CompareH_pass 0 CompareS_pass 0 pointgroupref T_d spacegroupref O_h nksibzref 1 -totaltimeref 0.52294 +totaltimeref 1.39 diff --git a/tests/02_NAO_Gamma/001_NO_GO_OHK/sk_nao.txt.ref b/tests/02_NAO_Gamma/001_NO_GO_OHK/sk_nao.txt.ref new file mode 100644 index 0000000000..4ac100c852 --- /dev/null +++ b/tests/02_NAO_Gamma/001_NO_GO_OHK/sk_nao.txt.ref @@ -0,0 +1,89 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + 1.00017e+00 1.88614e-03 -1.35525e-20 0.00000e+00 0.00000e+00 -5.42101e-20 0.00000e+00 0.00000e+00 + -2.71051e-20 0.00000e+00 0.00000e+00 3.04932e-20 0.00000e+00 4.67829e-02 2.35350e-01 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + -1.20753e-18 0.00000e+00 +Row 2 + 1.02054e+00 0.00000e+00 0.00000e+00 0.00000e+00 -8.67362e-19 0.00000e+00 0.00000e+00 -2.16840e-19 + 0.00000e+00 0.00000e+00 4.33681e-19 0.00000e+00 2.35350e-01 6.08580e-01 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 -1.51754e-17 + 0.00000e+00 +Row 3 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 6.77626e-21 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 -8.35117e-02 0.00000e+00 0.00000e+00 + 1.49288e-01 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 -4.17224e-02 +Row 4 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 1.35525e-20 0.00000e+00 + 0.00000e+00 6.77626e-21 0.00000e+00 0.00000e+00 0.00000e+00 -8.35117e-02 0.00000e+00 0.00000e+00 + 1.49288e-01 0.00000e+00 0.00000e+00 0.00000e+00 -4.17224e-02 0.00000e+00 0.00000e+00 +Row 5 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 6.77626e-21 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 -8.35117e-02 0.00000e+00 0.00000e+00 + 1.49288e-01 0.00000e+00 -4.17224e-02 0.00000e+00 0.00000e+00 0.00000e+00 +Row 6 + 9.80005e-01 0.00000e+00 0.00000e+00 2.71051e-20 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 1.49288e-01 0.00000e+00 0.00000e+00 -1.30508e-01 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 1.39401e-01 +Row 7 + 9.80005e-01 0.00000e+00 0.00000e+00 -5.42101e-20 0.00000e+00 0.00000e+00 -1.35525e-20 0.00000e+00 + 0.00000e+00 0.00000e+00 1.49288e-01 0.00000e+00 0.00000e+00 -1.30508e-01 0.00000e+00 0.00000e+00 + 0.00000e+00 1.39401e-01 0.00000e+00 0.00000e+00 +Row 8 + 9.80005e-01 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 1.35525e-20 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 1.49288e-01 0.00000e+00 0.00000e+00 -1.30508e-01 0.00000e+00 1.39401e-01 + 0.00000e+00 0.00000e+00 0.00000e+00 +Row 9 + 1.00007e+00 0.00000e+00 0.00000e+00 -2.37169e-20 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 6.29942e-03 0.00000e+00 0.00000e+00 + -6.16963e-19 0.00000e+00 +Row 10 + 1.00025e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 4.17224e-02 0.00000e+00 0.00000e+00 -1.39401e-01 0.00000e+00 7.89480e-03 0.00000e+00 0.00000e+00 + 0.00000e+00 +Row 11 + 1.00025e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 4.17224e-02 0.00000e+00 + 0.00000e+00 -1.39401e-01 0.00000e+00 0.00000e+00 0.00000e+00 7.89480e-03 0.00000e+00 0.00000e+00 +Row 12 + 1.00007e+00 0.00000e+00 -1.20753e-18 -1.51754e-17 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 0.00000e+00 0.00000e+00 -6.16963e-19 0.00000e+00 0.00000e+00 6.29942e-03 0.00000e+00 +Row 13 + 1.00025e+00 0.00000e+00 0.00000e+00 4.17224e-02 0.00000e+00 0.00000e+00 -1.39401e-01 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 7.89480e-03 +Row 14 + 1.00017e+00 1.88614e-03 -1.35525e-20 0.00000e+00 0.00000e+00 -5.42101e-20 0.00000e+00 0.00000e+00 + -2.71051e-20 0.00000e+00 0.00000e+00 3.04932e-20 0.00000e+00 +Row 15 + 1.02054e+00 0.00000e+00 0.00000e+00 0.00000e+00 -8.67362e-19 0.00000e+00 0.00000e+00 -2.16840e-19 + 0.00000e+00 0.00000e+00 4.33681e-19 0.00000e+00 +Row 16 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 6.77626e-21 0.00000e+00 + 0.00000e+00 0.00000e+00 0.00000e+00 +Row 17 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 1.35525e-20 0.00000e+00 + 0.00000e+00 6.77626e-21 +Row 18 + 9.98375e-01 0.00000e+00 0.00000e+00 5.69658e-03 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 + 6.77626e-21 +Row 19 + 9.80005e-01 0.00000e+00 0.00000e+00 2.71051e-20 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 +Row 20 + 9.80005e-01 0.00000e+00 0.00000e+00 -5.42101e-20 0.00000e+00 0.00000e+00 -1.35525e-20 +Row 21 + 9.80005e-01 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 1.35525e-20 +Row 22 + 1.00007e+00 0.00000e+00 0.00000e+00 -2.37169e-20 0.00000e+00 +Row 23 + 1.00025e+00 0.00000e+00 0.00000e+00 0.00000e+00 +Row 24 + 1.00025e+00 0.00000e+00 0.00000e+00 +Row 25 + 1.00007e+00 0.00000e+00 +Row 26 + 1.00025e+00 diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/INPUT b/tests/02_NAO_Gamma/002_NO_GO_AF/INPUT deleted file mode 100644 index b69e1c495c..0000000000 --- a/tests/02_NAO_Gamma/002_NO_GO_AF/INPUT +++ /dev/null @@ -1,35 +0,0 @@ -INPUT_PARAMETERS - -calculation scf -ecutwfc 8 -scf_thr 1.0e-6 -scf_nmax 50 -out_chg 0 - -#init_chg file -#out_dos 1 -#dos_sigma 0.05 -#out_band 1 - -smearing_method gaussian -smearing_sigma 0.02 - -#cal_force 1 -#force_thr_ev 0.01 -#relax_method cg -#relax_bfgs_init 0.5 - -mixing_type broyden -mixing_beta 0.4 -mixing_gg0 0.0 - - -ks_solver scalapack_gvx -basis_type lcao -gamma_only 1 -symmetry 0 -nspin 2 - -suffix autotest -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/INPUT b/tests/02_NAO_Gamma/002_NO_GO_OHK2/INPUT new file mode 100644 index 0000000000..b9b58e2330 --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/INPUT @@ -0,0 +1,35 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf +nspin 2 + +nbands 6 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +gamma_only 1 + +#Parameters (2.Iteration) +ecutwfc 5 +scf_thr 1e-8 +scf_nmax 100 + +#Parameters (3.Basis) +basis_type lcao + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 + +out_mat_hs 1 2 +#Parameters (5.Mixing) +mixing_type broyden +mixing_beta 0.7 +mixing_gg0 1.5 + +ks_solver scalapack_gvx + +bx 2 +by 2 +bz 2 diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/README b/tests/02_NAO_Gamma/002_NO_GO_OHK2/README new file mode 100644 index 0000000000..77810b9c46 --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/README @@ -0,0 +1 @@ +test for output H matrix with gamma_only and nspin=2, SZ orbital diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/STRU b/tests/02_NAO_Gamma/002_NO_GO_OHK2/STRU new file mode 100644 index 0000000000..8482d4e52d --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 14 Si_dojo_nsoc.upf + +NUMERICAL_ORBITAL +Si_dojo_6au_sz.orb + +LATTICE_CONSTANT +20 // add lattice constant + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si // Element type +0.0 // magnetism +2 +0.00 0.00 0.00 1 1 1 +0.25 0.25 0.25 1 1 1 diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks1_nao.txt.ref b/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks1_nao.txt.ref new file mode 100644 index 0000000000..00b1f8ae9b --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks1_nao.txt.ref @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks1_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -4.41e-01 1.44e-15 -1.83e-15 1.55e-15 -1.34e-02 1.18e-16 3.80e-17 -1.90e-16 +Row 2 + 9.28e-01 -2.33e-15 -1.71e-15 -6.37e-17 -3.35e-02 -6.99e-17 -2.17e-16 +Row 3 + 9.28e-01 -8.05e-16 -1.29e-16 8.38e-17 -3.35e-02 1.23e-16 +Row 4 + 9.28e-01 3.30e-16 -4.16e-17 -2.03e-16 -3.35e-02 +Row 5 + -4.41e-01 1.54e-15 3.61e-16 2.12e-15 +Row 6 + 9.28e-01 1.00e-15 6.24e-16 +Row 7 + 9.28e-01 -4.42e-16 +Row 8 + 9.28e-01 diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks2_nao.txt.ref b/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks2_nao.txt.ref new file mode 100644 index 0000000000..645d43e533 --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/hks2_nao.txt.ref @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks2_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -2.59e-01 -2.50e-15 3.61e-15 -2.16e-15 -1.31e-02 -9.33e-16 5.97e-17 5.03e-16 +Row 2 + 1.12e+00 9.21e-15 2.39e-15 1.10e-15 -3.45e-02 -4.14e-15 -1.24e-16 +Row 3 + 1.12e+00 3.23e-15 4.39e-16 2.31e-15 -3.45e-02 1.86e-15 +Row 4 + 1.12e+00 1.16e-15 1.94e-15 5.00e-15 -3.45e-02 +Row 5 + -2.59e-01 -7.13e-16 -9.52e-16 -2.94e-15 +Row 6 + 1.12e+00 -2.08e-15 -2.20e-15 +Row 7 + 1.12e+00 -2.01e-15 +Row 8 + 1.12e+00 diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/result.ref b/tests/02_NAO_Gamma/002_NO_GO_OHK2/result.ref new file mode 100644 index 0000000000..bf82a06207 --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/result.ref @@ -0,0 +1,9 @@ +etotref -170.3619865737633 +etotperatomref -85.1809932869 +CompareH1_pass 0 +CompareH2_pass 0 +CompareS_pass 0 +pointgroupref T_d +spacegroupref O_h +nksibzref 1 +totaltimeref 0.50 diff --git a/tests/02_NAO_Gamma/002_NO_GO_OHK2/sk_nao.txt.ref b/tests/02_NAO_Gamma/002_NO_GO_OHK2/sk_nao.txt.ref new file mode 100644 index 0000000000..b48d97c3fb --- /dev/null +++ b/tests/02_NAO_Gamma/002_NO_GO_OHK2/sk_nao.txt.ref @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + 1.00e+00 0.00e+00 0.00e+00 0.00e+00 6.14e-03 0.00e+00 0.00e+00 0.00e+00 +Row 2 + 1.00e+00 0.00e+00 0.00e+00 0.00e+00 -1.54e-02 0.00e+00 0.00e+00 +Row 3 + 1.00e+00 0.00e+00 0.00e+00 0.00e+00 -1.54e-02 0.00e+00 +Row 4 + 1.00e+00 0.00e+00 0.00e+00 0.00e+00 -1.54e-02 +Row 5 + 1.00e+00 0.00e+00 0.00e+00 0.00e+00 +Row 6 + 1.00e+00 0.00e+00 0.00e+00 +Row 7 + 1.00e+00 0.00e+00 +Row 8 + 1.00e+00 diff --git a/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/INPUT b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/INPUT new file mode 100644 index 0000000000..4722b8caa2 --- /dev/null +++ b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/INPUT @@ -0,0 +1,34 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation relax + +nbands 4 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (2.Iteration) +ecutwfc 5 +scf_thr 1e-8 +scf_nmax 100 + +#Parameters (3.Relaxation) +relax_nmax 2 +cal_force 1 +force_thr_ev 0.01 +relax_method bfgs 2 + +#Parameters (4.Basis) +basis_type lcao + +#Parameters (5.Smearing) +smearing_method fixed + +#Parameters (6.Mixing) +mixing_type broyden +mixing_beta 0.5 + +gamma_only 1 +out_mat_hs 1 5 +out_app_flag 1 diff --git a/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/STRU b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/STRU new file mode 100644 index 0000000000..086df89083 --- /dev/null +++ b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28 Si_dojo_nsoc.upf + +NUMERICAL_ORBITAL +Si_dojo_6au_sz.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si +0.0 +2 +0.00 0.00 0.00 1 1 1 +0.251 0.251 0.251 1 1 1 diff --git a/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/hk_nao.txt.ref b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/hk_nao.txt.ref new file mode 100644 index 0000000000..fc93c840e6 --- /dev/null +++ b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/hk_nao.txt.ref @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.59432e-01 9.24250e-04 -9.24250e-04 -9.24250e-04 -4.72133e-01 -4.06675e-04 4.06675e-04 4.06675e-04 +Row 2 + 1.32251e+00 -9.21838e-04 -9.21838e-04 1.98460e-04 -7.16261e-02 -7.43900e-05 -7.43900e-05 +Row 3 + 1.32251e+00 9.21838e-04 -1.98460e-04 -7.43900e-05 -7.16261e-02 7.43900e-05 +Row 4 + 1.32251e+00 -1.98460e-04 -7.43900e-05 7.43900e-05 -7.16261e-02 +Row 5 + -1.59427e-01 -1.31465e-03 1.31465e-03 1.31465e-03 +Row 6 + 1.32243e+00 -9.14026e-04 -9.14026e-04 +Row 7 + 1.32243e+00 9.14026e-04 +Row 8 + 1.32243e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.46817e-01 -2.23052e-03 2.23052e-03 2.23052e-03 -4.61859e-01 -7.94508e-03 7.94508e-03 7.94508e-03 +Row 2 + 1.33207e+00 3.84287e-03 3.84287e-03 7.80125e-03 -7.60615e-02 1.44866e-02 1.44866e-02 +Row 3 + 1.33207e+00 -3.84287e-03 -7.80125e-03 1.44866e-02 -7.60615e-02 -1.44866e-02 +Row 4 + 1.33207e+00 -7.80125e-03 1.44866e-02 -1.44866e-02 -7.60615e-02 +Row 5 + -1.46819e-01 2.16332e-03 -2.16332e-03 -2.16332e-03 +Row 6 + 1.33292e+00 3.21595e-03 3.21595e-03 +Row 7 + 1.33292e+00 -3.21595e-03 +Row 8 + 1.33292e+00 diff --git a/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/result.ref b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/result.ref new file mode 100644 index 0000000000..00650e8a1c --- /dev/null +++ b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/result.ref @@ -0,0 +1,9 @@ +etotref -183.7731368896913 +etotperatomref -91.8865684448 +totalforceref 23.972508 +CompareH_pass 0 +CompareS_pass 0 +pointgroupref C_3v +spacegroupref D_3d +nksibzref 1 +totaltimeref 0.42 diff --git a/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/sk_nao.txt.ref b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/sk_nao.txt.ref new file mode 100644 index 0000000000..59f326ca1a --- /dev/null +++ b/tests/02_NAO_Gamma/003_NO_GO_RE_OHK/sk_nao.txt.ref @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + 1.15061e+00 -6.50521e-19 0.00000e+00 0.00000e+00 8.22869e-01 9.81584e-04 -9.81584e-04 -9.81584e-04 +Row 2 + 1.16565e+00 0.00000e+00 0.00000e+00 -9.81584e-04 -3.19683e-01 -3.40116e-03 -3.40116e-03 +Row 3 + 1.16565e+00 0.00000e+00 9.81584e-04 -3.40116e-03 -3.19683e-01 3.40116e-03 +Row 4 + 1.16565e+00 9.81584e-04 -3.40116e-03 3.40116e-03 -3.19683e-01 +Row 5 + 1.15061e+00 -6.50521e-19 0.00000e+00 0.00000e+00 +Row 6 + 1.16565e+00 0.00000e+00 0.00000e+00 +Row 7 + 1.16565e+00 0.00000e+00 +Row 8 + 1.16565e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + 1.15061e+00 -6.50521e-19 1.39379e-20 1.39379e-20 8.23962e-01 -1.82457e-02 1.82457e-02 1.82457e-02 +Row 2 + 1.16565e+00 -1.26565e-19 -1.26565e-19 1.82457e-02 -3.15301e-01 5.22531e-02 5.22531e-02 +Row 3 + 1.16565e+00 8.05970e-19 -1.82457e-02 5.22531e-02 -3.15301e-01 -5.22531e-02 +Row 4 + 1.16565e+00 -1.82457e-02 5.22531e-02 -5.22531e-02 -3.15301e-01 +Row 5 + 1.15061e+00 -6.50521e-19 -2.02733e-20 -2.02733e-20 +Row 6 + 1.16565e+00 1.84095e-19 1.84095e-19 +Row 7 + 1.16565e+00 -1.17232e-18 +Row 8 + 1.16565e+00 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/INPUT b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/INPUT new file mode 100644 index 0000000000..766ad3a919 --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/INPUT @@ -0,0 +1,35 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation relax +nspin 2 + +nbands 8 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (2.Iteration) +ecutwfc 5 +scf_thr 1e-8 +scf_nmax 100 + +#Parameters (3.Relaxation) +relax_nmax 2 +cal_force 1 +force_thr_ev 0.01 +relax_method bfgs 2 + +#Parameters (4.Basis) +basis_type lcao + +#Parameters (5.Smearing) +smearing_method fixed + +#Parameters (6.Mixing) +mixing_type broyden +mixing_beta 0.5 + +gamma_only 1 +out_mat_hs 1 5 +out_app_flag 1 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/STRU b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/STRU new file mode 100644 index 0000000000..086df89083 --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28 Si_dojo_nsoc.upf + +NUMERICAL_ORBITAL +Si_dojo_6au_sz.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si +0.0 +2 +0.00 0.00 0.00 1 1 1 +0.251 0.251 0.251 1 1 1 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks1_nao.txt.ref b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks1_nao.txt.ref new file mode 100644 index 0000000000..49626df883 --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks1_nao.txt.ref @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks1_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.59432e-01 9.24250e-04 -9.24250e-04 -9.24250e-04 -4.72133e-01 -4.06675e-04 4.06675e-04 4.06675e-04 +Row 2 + 1.32251e+00 -9.21838e-04 -9.21838e-04 1.98459e-04 -7.16261e-02 -7.43902e-05 -7.43902e-05 +Row 3 + 1.32251e+00 9.21838e-04 -1.98459e-04 -7.43902e-05 -7.16261e-02 7.43902e-05 +Row 4 + 1.32251e+00 -1.98459e-04 -7.43902e-05 7.43902e-05 -7.16261e-02 +Row 5 + -1.59427e-01 -1.31465e-03 1.31465e-03 1.31465e-03 +Row 6 + 1.32243e+00 -9.14026e-04 -9.14026e-04 +Row 7 + 1.32243e+00 9.14026e-04 +Row 8 + 1.32243e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hks1_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.46777e-01 -2.23363e-03 2.23363e-03 2.23363e-03 -4.61821e-01 -7.94405e-03 7.94405e-03 7.94405e-03 +Row 2 + 1.33207e+00 3.84212e-03 3.84212e-03 7.79856e-03 -7.60611e-02 1.44855e-02 1.44855e-02 +Row 3 + 1.33207e+00 -3.84212e-03 -7.79856e-03 1.44855e-02 -7.60611e-02 -1.44855e-02 +Row 4 + 1.33207e+00 -7.79856e-03 1.44855e-02 -1.44855e-02 -7.60611e-02 +Row 5 + -1.46781e-01 2.16502e-03 -2.16502e-03 -2.16502e-03 +Row 6 + 1.33292e+00 3.21564e-03 3.21564e-03 +Row 7 + 1.33292e+00 -3.21564e-03 +Row 8 + 1.33292e+00 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks2_nao.txt.ref b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks2_nao.txt.ref new file mode 100644 index 0000000000..3040a28b9a --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/hks2_nao.txt.ref @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks2_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.59432e-01 9.24250e-04 -9.24250e-04 -9.24250e-04 -4.72133e-01 -4.06675e-04 4.06675e-04 4.06675e-04 +Row 2 + 1.32251e+00 -9.21838e-04 -9.21838e-04 1.98459e-04 -7.16261e-02 -7.43902e-05 -7.43902e-05 +Row 3 + 1.32251e+00 9.21838e-04 -1.98459e-04 -7.43902e-05 -7.16261e-02 7.43902e-05 +Row 4 + 1.32251e+00 -1.98459e-04 -7.43902e-05 7.43902e-05 -7.16261e-02 +Row 5 + -1.59427e-01 -1.31465e-03 1.31465e-03 1.31465e-03 +Row 6 + 1.32243e+00 -9.14026e-04 -9.14026e-04 +Row 7 + 1.32243e+00 9.14026e-04 +Row 8 + 1.32243e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hks2_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + -1.46777e-01 -2.23363e-03 2.23363e-03 2.23363e-03 -4.61821e-01 -7.94405e-03 7.94405e-03 7.94405e-03 +Row 2 + 1.33207e+00 3.84212e-03 3.84212e-03 7.79856e-03 -7.60611e-02 1.44855e-02 1.44855e-02 +Row 3 + 1.33207e+00 -3.84212e-03 -7.79856e-03 1.44855e-02 -7.60611e-02 -1.44855e-02 +Row 4 + 1.33207e+00 -7.79856e-03 1.44855e-02 -1.44855e-02 -7.60611e-02 +Row 5 + -1.46781e-01 2.16502e-03 -2.16502e-03 -2.16502e-03 +Row 6 + 1.33292e+00 3.21564e-03 3.21564e-03 +Row 7 + 1.33292e+00 -3.21564e-03 +Row 8 + 1.33292e+00 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/result.ref b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/result.ref new file mode 100644 index 0000000000..9b76a4a19f --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/result.ref @@ -0,0 +1,10 @@ +etotref -183.772932286494 +etotperatomref -91.8864661432 +totalforceref 23.971608 +CompareH1_pass 0 +CompareH2_pass 0 +CompareS_pass 0 +pointgroupref C_3v +spacegroupref D_3d +nksibzref 1 +totaltimeref 0.54 diff --git a/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/sk_nao.txt.ref b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/sk_nao.txt.ref new file mode 100644 index 0000000000..59f326ca1a --- /dev/null +++ b/tests/02_NAO_Gamma/004_NO_GO_RE_OHK2/sk_nao.txt.ref @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + 1.15061e+00 -6.50521e-19 0.00000e+00 0.00000e+00 8.22869e-01 9.81584e-04 -9.81584e-04 -9.81584e-04 +Row 2 + 1.16565e+00 0.00000e+00 0.00000e+00 -9.81584e-04 -3.19683e-01 -3.40116e-03 -3.40116e-03 +Row 3 + 1.16565e+00 0.00000e+00 9.81584e-04 -3.40116e-03 -3.19683e-01 3.40116e-03 +Row 4 + 1.16565e+00 9.81584e-04 -3.40116e-03 3.40116e-03 -3.19683e-01 +Row 5 + 1.15061e+00 -6.50521e-19 0.00000e+00 0.00000e+00 +Row 6 + 1.16565e+00 0.00000e+00 0.00000e+00 +Row 7 + 1.16565e+00 0.00000e+00 +Row 8 + 1.16565e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + 1.15061e+00 -6.50521e-19 1.39379e-20 1.39379e-20 8.23962e-01 -1.82457e-02 1.82457e-02 1.82457e-02 +Row 2 + 1.16565e+00 -1.26565e-19 -1.26565e-19 1.82457e-02 -3.15301e-01 5.22531e-02 5.22531e-02 +Row 3 + 1.16565e+00 8.05970e-19 -1.82457e-02 5.22531e-02 -3.15301e-01 -5.22531e-02 +Row 4 + 1.16565e+00 -1.82457e-02 5.22531e-02 -5.22531e-02 -3.15301e-01 +Row 5 + 1.15061e+00 -6.50521e-19 -2.02733e-20 -2.02733e-20 +Row 6 + 1.16565e+00 1.84095e-19 1.84095e-19 +Row 7 + 1.16565e+00 -1.17232e-18 +Row 8 + 1.16565e+00 diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/INPUT b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/INPUT new file mode 100644 index 0000000000..fd15b37aea --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/INPUT @@ -0,0 +1,33 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +nbands 8 +calculation md +basis_type lcao +gamma_only 1 +out_mat_hs 1 5 + +#Parameters (Accuracy) +ecutwfc 5 +scf_nmax 50 +scf_thr 1.0e-8 + +cal_stress 1 +stress_thr 1e-6 +cal_force 1 +force_thr_ev 1.0e-3 + +mixing_type broyden +mixing_beta 0.7 + +md_nstep 2 +md_tchain 4 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 +cal_syns 1 + +chg_extrap first-order + +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/STRU b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/STRU new file mode 100644 index 0000000000..6fc39c63ca --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 1 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0 0.5 0.5 #latvec1 +0.5 0 0.5 #latvec2 +0.5 0.5 0 #latvec3 + +ATOMIC_POSITIONS +Cartesian + +Si #label +0 #magnetism +2 #number of atoms +0 0 0 m 1 1 1 v 0.000135711648533 3.02182240507e-05 -8.2024241958e-05 +0.25 0.25 0.25 m 1 1 1 v -0.000135711648533 -3.02182240507e-05 8.2024241958e-05 diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/hk_nao.txt.ref b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/hk_nao.txt.ref new file mode 100644 index 0000000000..2b21e72d56 --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/hk_nao.txt.ref @@ -0,0 +1,178 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31964e-01 -7.79031e-01 -3.88578e-16 8.88178e-16 1.11022e-16 -1.11022e-16 3.33067e-16 -2.22045e-16 + -1.11634e-15 6.93889e-17 1.94289e-16 2.22411e-16 1.94289e-16 -5.55603e-01 -4.17914e-01 -2.22045e-16 + 4.09395e-16 -1.11022e-16 3.94650e-16 -8.58688e-17 -6.99094e-16 1.31213e-15 1.24900e-16 -6.80012e-16 + 6.00266e-16 4.99600e-16 +Row 2 + 8.97102e-01 -1.24900e-16 4.71845e-16 1.24900e-16 8.32667e-17 6.66134e-16 8.88178e-16 -1.07139e-15 + -1.31839e-16 6.17562e-16 -2.25582e-16 -6.93889e-17 -4.17914e-01 9.78300e-02 4.99167e-16 1.25811e-15 + -1.09721e-16 -7.42462e-16 5.20417e-17 -9.36751e-17 1.98278e-15 2.56739e-16 4.85723e-17 1.08715e-15 + -1.04777e-15 +Row 3 + 3.88003e-01 -2.08167e-16 -2.18575e-16 4.20473e-01 4.99600e-16 1.31839e-16 4.71845e-16 -2.77556e-16 + -4.99600e-16 1.17725e-16 6.39674e-02 -2.77556e-16 7.77156e-16 -4.12889e-02 -7.28584e-17 1.04083e-17 + -1.32845e-02 4.33681e-18 4.07660e-17 -2.08167e-17 4.68375e-17 -3.29597e-17 4.11676e-18 -1.77608e-01 +Row 4 + 3.88003e-01 -4.16334e-17 2.91434e-16 4.20473e-01 -1.31839e-16 2.77556e-17 2.77556e-17 6.39674e-02 + 3.60822e-16 -3.33067e-16 2.35922e-16 5.27356e-16 -6.93889e-18 -4.12889e-02 7.45931e-17 9.71445e-17 + -1.32845e-02 -4.85723e-17 -5.03070e-17 -1.12757e-16 -1.77608e-01 9.71445e-17 -4.16334e-17 +Row 5 + 3.88003e-01 -2.15106e-16 -1.17961e-16 4.20473e-01 -2.22045e-16 6.39674e-02 -2.77556e-17 -9.15934e-16 + -5.82867e-16 -8.60423e-16 -3.05311e-16 -2.94903e-17 -2.42861e-17 -4.12889e-02 3.90313e-17 -4.85723e-17 + -1.32845e-02 2.42861e-17 -1.77608e-01 -1.49186e-16 5.55112e-17 2.25514e-16 +Row 6 + 7.68029e-01 7.84095e-16 2.49800e-16 1.94289e-15 1.66533e-16 3.33067e-16 1.82932e-17 3.92224e-02 + 3.60822e-16 2.22045e-16 -1.32845e-02 6.24500e-17 1.00614e-16 1.33549e-01 -9.10730e-17 3.98986e-17 + 6.93889e-18 1.80411e-16 7.63278e-17 1.18341e-17 -3.73234e-02 +Row 7 + 7.68029e-01 -4.23273e-16 2.77556e-16 -1.38778e-16 3.92224e-02 -8.32667e-16 3.05311e-16 1.52656e-16 + -1.44329e-15 5.89806e-17 -1.32845e-02 0.00000e+00 -2.68882e-17 1.33549e-01 3.12250e-17 -1.17961e-16 + 6.24500e-17 -3.73234e-02 2.08167e-17 1.38778e-17 +Row 8 + 7.68029e-01 1.11022e-16 3.92224e-02 -2.22045e-16 1.66533e-16 -9.43690e-16 -4.16334e-16 -1.55431e-15 + -3.46945e-17 2.08167e-17 -1.32845e-02 5.98480e-17 2.60209e-17 1.33549e-01 -6.93889e-18 -3.73234e-02 + 5.89806e-17 9.71445e-17 1.24900e-16 +Row 9 + 1.45535e+00 2.77556e-17 4.16334e-17 -3.70272e-16 8.32667e-17 -1.09877e-15 -1.44173e-15 1.56125e-16 + -2.77556e-17 2.42861e-17 1.81279e-16 -4.51028e-17 3.59955e-17 -2.96562e-01 1.94289e-16 -1.38778e-17 + -6.60954e-18 3.60822e-16 +Row 10 + 1.40881e+00 -1.96024e-16 4.16334e-17 -4.57967e-16 8.18789e-16 -1.15186e-15 -3.46945e-18 3.81639e-17 + 1.77608e-01 -3.38271e-17 -2.60209e-17 3.73234e-02 -2.44596e-16 1.12412e-01 -1.04083e-16 -5.49040e-16 + 1.11022e-16 +Row 11 + 1.40881e+00 7.07767e-16 -1.02349e-16 2.28983e-16 0.00000e+00 -1.49186e-16 1.77608e-01 -4.51028e-17 + -4.85723e-17 3.73234e-02 -1.17961e-16 8.67362e-18 -9.71445e-17 1.12412e-01 1.87350e-16 -2.98372e-16 +Row 12 + 1.45535e+00 4.37652e-17 4.28160e-17 -3.63013e-16 -1.57203e-18 1.21431e-16 1.66533e-16 1.25156e-17 + 5.46438e-17 1.39645e-16 -9.96200e-17 2.08167e-16 3.46945e-16 -2.96562e-01 -6.43394e-18 +Row 13 + 1.40881e+00 -3.19189e-16 1.04083e-15 1.77608e-01 5.89806e-17 -2.42861e-17 3.73234e-02 2.08167e-17 + 3.64292e-17 -1.67401e-16 1.04083e-16 1.38778e-16 8.75060e-18 1.12412e-01 +Row 14 + -3.31964e-01 -7.79031e-01 2.11094e-16 6.60062e-16 8.35920e-17 5.36030e-16 9.10730e-16 -1.47451e-16 + 1.66886e-15 -2.98372e-16 -6.31439e-16 1.43386e-15 -6.93889e-17 +Row 15 + 8.97102e-01 8.01442e-16 -9.08995e-16 -2.74086e-16 7.02563e-16 -1.98626e-16 -8.34402e-16 1.57633e-15 + 3.33067e-16 -6.38378e-16 7.56907e-16 -2.91434e-16 +Row 16 + 3.88003e-01 -1.90820e-16 -3.45210e-16 4.20473e-01 6.07153e-17 -7.28584e-17 -7.32053e-16 -7.02563e-17 + 2.75821e-16 5.18808e-17 -6.39674e-02 +Row 17 + 3.88003e-01 1.04083e-17 -2.56739e-16 4.20473e-01 9.19403e-17 -1.91253e-16 -3.07046e-16 -6.39674e-02 + 2.44596e-16 -7.54605e-17 +Row 18 + 3.88003e-01 -2.18575e-16 1.50921e-16 4.20473e-01 -3.06612e-16 -6.39674e-02 -2.94903e-17 -5.57714e-16 + -2.24647e-16 +Row 19 + 7.68029e-01 -8.84709e-17 9.54098e-17 4.46691e-16 2.93168e-16 4.96131e-16 1.49541e-16 -3.92224e-02 +Row 20 + 7.68029e-01 -2.27249e-16 6.31006e-16 -9.07260e-16 -3.92224e-02 4.20670e-16 4.25007e-16 +Row 21 + 7.68029e-01 2.59775e-16 -3.92224e-02 -7.54605e-16 -8.92082e-16 4.51028e-17 +Row 22 + 1.45535e+00 -2.98372e-16 2.42861e-17 1.51048e-16 -1.14492e-16 +Row 23 + 1.40881e+00 1.28370e-16 -3.81639e-17 -4.85723e-17 +Row 24 + 1.40881e+00 -2.15106e-16 -2.63678e-16 +Row 25 + 1.45535e+00 -6.76992e-17 +Row 26 + 1.40881e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31972e-01 -7.79028e-01 7.14815e-04 1.18601e-03 2.55992e-04 6.52116e-04 1.08206e-03 2.33033e-04 + 1.28838e-06 -4.54117e-04 -2.04375e-03 -6.71044e-06 -1.23501e-03 -5.55607e-01 -4.17914e-01 -2.74459e-04 + -4.55894e-04 -9.72064e-05 -3.70140e-04 -6.13947e-04 -1.32724e-04 3.16152e-07 -1.41443e-04 -6.41178e-04 + -1.66937e-06 -3.87211e-04 +Row 2 + 8.97124e-01 4.13299e-04 6.86166e-04 1.47246e-04 7.09641e-04 1.17530e-03 2.58552e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22457e-06 -1.67368e-03 -4.17914e-01 9.78582e-02 -8.06321e-04 -1.33802e-03 + -2.88550e-04 -9.84117e-04 -1.63254e-03 -3.52887e-04 2.08194e-06 -1.13650e-03 -5.12933e-03 -1.07335e-05 + -3.09869e-03 +Row 3 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25482e-04 5.71666e-04 -3.25354e-04 -1.17980e-03 + -2.58013e-04 9.05124e-08 6.39657e-02 2.74459e-04 8.06321e-04 -4.12849e-02 8.86212e-05 3.86770e-04 + -1.32862e-02 -1.30746e-05 -5.42741e-05 -7.55665e-04 -2.76819e-05 -1.60987e-06 7.93538e-09 -1.77600e-01 +Row 4 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 2.70808e-04 -7.11922e-04 6.39648e-02 + -4.68990e-04 -2.58010e-04 4.55894e-04 1.33802e-03 8.86212e-05 -4.12828e-02 2.34402e-04 -1.30004e-05 + -1.32865e-02 -3.30227e-05 6.24888e-04 -1.55625e-05 -1.77599e-01 -1.08234e-03 -1.59499e-06 +Row 5 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 5.62924e-05 6.39661e-02 -7.11918e-04 9.75467e-05 + -1.17979e-03 9.72064e-05 2.88550e-04 3.86770e-04 2.34402e-04 -4.12859e-02 -5.43036e-05 -3.31051e-05 + -1.32860e-02 1.39674e-04 -1.77601e-01 -1.56254e-05 2.41913e-04 -2.77144e-05 +Row 6 + 7.68024e-01 1.19285e-04 5.38466e-04 -3.73100e-04 -8.94455e-04 -1.92126e-04 -3.43987e-07 3.92232e-02 + 3.70140e-04 9.84117e-04 -1.32862e-02 -1.30004e-05 -5.43036e-05 1.33536e-01 -1.55736e-04 -6.60403e-04 + -2.46721e-04 1.23777e-03 2.77104e-04 -1.10668e-07 -3.73205e-02 +Row 7 + 7.68027e-01 3.25302e-04 3.10059e-04 -5.39006e-04 3.92242e-02 -5.37339e-04 -1.92200e-04 6.13947e-04 + 1.63254e-03 -1.30746e-05 -1.32865e-02 -3.31051e-05 -1.55736e-04 1.33532e-01 -4.01356e-04 2.03797e-04 + 7.48369e-04 -3.73229e-02 -3.53085e-04 2.76976e-04 +Row 8 + 7.68023e-01 6.53686e-05 3.92227e-02 -5.38768e-04 1.13042e-04 -8.94297e-04 1.32724e-04 3.52887e-04 + -5.42741e-05 -3.30227e-05 -1.32860e-02 -6.60403e-04 -4.01356e-04 1.33538e-01 4.59822e-05 -3.73193e-02 + 7.48582e-04 7.95927e-05 1.23788e-03 +Row 9 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65605e-06 -8.39995e-04 3.16152e-07 2.08194e-06 7.55665e-04 + -6.24888e-04 -1.39674e-04 2.46721e-04 -2.03797e-04 -4.59822e-05 -2.96551e-01 -5.05300e-05 -2.09671e-04 + -1.31286e-05 2.55347e-04 +Row 10 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 -1.41443e-04 -1.13650e-03 2.76819e-05 1.55625e-05 + 1.77601e-01 -1.23777e-03 -7.48369e-04 3.73193e-02 -5.05300e-05 1.12402e-01 8.72775e-04 -8.75043e-05 + 1.44211e-03 +Row 11 + 1.40880e+00 -1.20483e-03 1.65486e-04 -6.41178e-04 -5.12933e-03 1.60987e-06 1.77599e-01 1.56254e-05 + -2.77104e-04 3.73229e-02 -7.48582e-04 -2.09671e-04 8.72775e-04 1.12414e-01 3.63226e-04 3.26091e-04 +Row 12 + 1.45534e+00 -1.93978e-08 -1.66937e-06 -1.07335e-05 -7.93538e-09 1.08234e-03 -2.41913e-04 1.10668e-07 + 3.53085e-04 -7.95927e-05 -1.31286e-05 -8.75043e-05 3.63226e-04 -2.96546e-01 6.31528e-08 +Row 13 + 1.40881e+00 -3.87211e-04 -3.09869e-03 1.77600e-01 1.59499e-06 2.77144e-05 3.73205e-02 -2.76976e-04 + -1.23788e-03 2.55347e-04 1.44211e-03 3.26091e-04 6.31528e-08 1.12406e-01 +Row 14 + -3.31972e-01 -7.79028e-01 -7.14815e-04 -1.18601e-03 -2.55992e-04 -6.52116e-04 -1.08206e-03 -2.33033e-04 + 1.28838e-06 -4.54117e-04 -2.04375e-03 -6.71044e-06 -1.23501e-03 +Row 15 + 8.97124e-01 -4.13299e-04 -6.86166e-04 -1.47246e-04 -7.09641e-04 -1.17530e-03 -2.58552e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22457e-06 -1.67368e-03 +Row 16 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25482e-04 5.71666e-04 3.25354e-04 1.17980e-03 + 2.58013e-04 -9.05124e-08 -6.39657e-02 +Row 17 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 -2.70808e-04 7.11922e-04 -6.39648e-02 + 4.68990e-04 2.58010e-04 +Row 18 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 -5.62924e-05 -6.39661e-02 7.11918e-04 -9.75467e-05 + 1.17979e-03 +Row 19 + 7.68024e-01 1.19285e-04 5.38466e-04 3.73100e-04 8.94455e-04 1.92126e-04 3.43987e-07 -3.92232e-02 +Row 20 + 7.68027e-01 3.25302e-04 -3.10059e-04 5.39006e-04 -3.92242e-02 5.37339e-04 1.92200e-04 +Row 21 + 7.68023e-01 -6.53686e-05 -3.92227e-02 5.38768e-04 -1.13042e-04 8.94297e-04 +Row 22 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65605e-06 -8.39995e-04 +Row 23 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 +Row 24 + 1.40880e+00 -1.20483e-03 1.65486e-04 +Row 25 + 1.45534e+00 -1.93978e-08 +Row 26 + 1.40881e+00 diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/result.ref b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/result.ref new file mode 100644 index 0000000000..9380ec04cc --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/result.ref @@ -0,0 +1,8 @@ +etotref -196.6304442823057 +etotperatomref -98.3152221412 +totalforceref 0.717564 +totalstressref 1315.352481 +CompareH_pass 0 +CompareS_pass 0 +CompareSYNS_pass 0 +totaltimeref 0.65 diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/sk_nao.txt.ref b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/sk_nao.txt.ref new file mode 100644 index 0000000000..8d0685c854 --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/sk_nao.txt.ref @@ -0,0 +1,178 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + 1.48885e+00 1.85694e+00 1.50298e-17 6.88468e-18 -2.36492e-17 1.00384e-16 4.09828e-17 -4.11861e-17 + 1.20440e-17 -2.12775e-18 9.48677e-20 -3.03848e-17 -6.11897e-18 1.23629e+00 2.25011e+00 1.25400e-16 + 3.90696e-17 -4.36222e-18 -1.23450e-16 -6.48649e-17 6.48861e-17 5.65987e-17 7.06637e-19 8.47965e-18 + 4.95197e-17 2.35825e-17 +Row 2 + 4.31653e+00 7.86589e-17 1.08420e-17 -3.96276e-17 -3.55618e-17 -5.20417e-17 -8.58688e-17 3.03983e-17 + -3.57787e-18 -4.77049e-18 -8.45678e-17 1.40946e-18 2.25011e+00 3.67664e+00 -5.28278e-17 -1.00353e-16 + 1.02837e-16 -2.69262e-16 3.84011e-17 1.30917e-17 -7.82523e-17 1.54296e-17 -3.71339e-18 -1.51241e-16 + -1.15264e-17 +Row 3 + 5.44536e-01 1.10589e-17 -1.03812e-17 5.83149e-01 -2.42861e-17 2.85145e-17 4.43845e-19 7.04731e-19 + -2.53432e-18 5.42101e-19 -5.42101e-20 -1.25400e-16 5.28278e-17 -1.24841e-01 -5.58517e-17 1.37660e-17 + -1.17065e-01 -2.78979e-17 -4.05898e-17 -3.03102e-17 -2.33866e-18 5.04832e-19 -7.17437e-19 -4.82752e-01 +Row 4 + 5.44536e-01 -6.50521e-18 -2.42861e-17 5.83149e-01 8.67362e-19 4.87891e-19 6.48488e-18 -5.42101e-20 + -4.60786e-19 5.83606e-18 -3.90696e-17 1.00353e-16 -5.58517e-17 -1.24841e-01 6.18385e-17 -2.78979e-17 + -1.17065e-01 4.95379e-17 2.29461e-18 1.69457e-17 -4.82752e-01 -1.11861e-17 -1.63689e-18 +Row 5 + 5.44536e-01 2.85145e-17 8.67362e-19 5.83149e-01 -4.84503e-19 -5.42101e-20 1.80249e-18 -1.35525e-18 + -2.48011e-18 4.36222e-18 -1.02837e-16 1.37660e-17 6.18385e-17 -1.24841e-01 -4.05898e-17 4.95379e-17 + -1.17065e-01 4.80776e-18 -4.82752e-01 -8.40765e-18 -1.76522e-17 -8.61433e-19 +Row 6 + 6.96122e-01 4.68375e-17 -5.29091e-17 8.34836e-18 3.14419e-18 -9.05309e-18 2.62919e-18 0.00000e+00 + 1.23450e-16 2.69262e-16 -1.17065e-01 -2.78979e-17 -4.05898e-17 -6.46175e-02 2.56414e-17 1.96241e-17 + 1.85941e-17 -1.39252e-17 -1.35796e-17 1.20617e-18 -4.19177e-01 +Row 7 + 6.96122e-01 -7.80626e-18 1.30104e-18 3.19840e-18 0.00000e+00 -2.57498e-18 5.48877e-18 6.48649e-17 + -3.84011e-17 -2.78979e-17 -1.17065e-01 4.95379e-17 2.56414e-17 -6.46175e-02 -1.10318e-17 6.36969e-19 + -1.88685e-17 -4.19177e-01 7.40053e-18 1.81858e-17 +Row 8 + 6.96122e-01 -3.21195e-18 0.00000e+00 -1.62630e-18 -4.44523e-18 -2.91379e-18 -6.48861e-17 -1.30917e-17 + -4.05898e-17 4.95379e-17 -1.17065e-01 1.96241e-17 -1.10318e-17 -6.46175e-02 3.91668e-18 -4.19177e-01 + -1.15332e-17 2.62648e-17 -1.16467e-17 +Row 9 + 9.91168e-01 -2.23617e-18 2.94429e-18 4.32444e-17 1.48739e-18 5.65987e-17 -7.82523e-17 3.03102e-17 + -2.29461e-18 -4.80776e-18 -1.85941e-17 -6.36969e-19 -3.91668e-18 -5.10937e-01 -7.31921e-18 6.99310e-18 + -6.37714e-17 -1.47968e-17 +Row 10 + 1.13701e+00 -2.29038e-18 -2.98156e-19 -3.06626e-19 7.06637e-19 1.54296e-17 2.33866e-18 -1.69457e-17 + 4.82752e-01 1.39252e-17 1.88685e-17 4.19177e-01 -7.31921e-18 1.32237e-01 1.45266e-17 1.31640e-17 + -5.73399e-18 +Row 11 + 1.13701e+00 -9.04631e-19 -2.79182e-18 8.47965e-18 -3.71339e-18 -5.04832e-19 4.82752e-01 8.40765e-18 + 1.35796e-17 4.19177e-01 1.15332e-17 6.99310e-18 1.45266e-17 1.32237e-01 1.70262e-17 -6.55604e-19 +Row 12 + 9.91168e-01 2.16091e-20 4.95197e-17 -1.51241e-16 7.17437e-19 1.11861e-17 1.76522e-17 -1.20617e-18 + -7.40053e-18 -2.62648e-17 -6.37714e-17 1.31640e-17 1.70262e-17 -5.10937e-01 -2.84074e-19 +Row 13 + 1.13701e+00 2.35825e-17 -1.15264e-17 4.82752e-01 1.63689e-18 8.61433e-19 4.19177e-01 -1.81858e-17 + 1.16467e-17 -1.47968e-17 -5.73399e-18 -6.55604e-19 -2.84074e-19 1.32237e-01 +Row 14 + 1.48885e+00 1.85694e+00 1.50298e-17 6.88468e-18 -2.36492e-17 1.00384e-16 4.09828e-17 -4.11861e-17 + 1.20440e-17 -2.12775e-18 9.48677e-20 -3.03848e-17 -6.11897e-18 +Row 15 + 4.31653e+00 7.86589e-17 1.08420e-17 -3.96276e-17 -3.55618e-17 -5.20417e-17 -8.58688e-17 3.03983e-17 + -3.57787e-18 -4.77049e-18 -8.45678e-17 1.40946e-18 +Row 16 + 5.44536e-01 1.10589e-17 -1.03812e-17 5.83149e-01 -2.42861e-17 2.85145e-17 4.43845e-19 7.04731e-19 + -2.53432e-18 5.42101e-19 -5.42101e-20 +Row 17 + 5.44536e-01 -6.50521e-18 -2.42861e-17 5.83149e-01 8.67362e-19 4.87891e-19 6.48488e-18 -5.42101e-20 + -4.60786e-19 5.83606e-18 +Row 18 + 5.44536e-01 2.85145e-17 8.67362e-19 5.83149e-01 -4.84503e-19 -5.42101e-20 1.80249e-18 -1.35525e-18 + -2.48011e-18 +Row 19 + 6.96122e-01 4.68375e-17 -5.29091e-17 8.34836e-18 3.14419e-18 -9.05309e-18 2.62919e-18 0.00000e+00 +Row 20 + 6.96122e-01 -7.80626e-18 1.30104e-18 3.19840e-18 0.00000e+00 -2.57498e-18 5.48877e-18 +Row 21 + 6.96122e-01 -3.21195e-18 0.00000e+00 -1.62630e-18 -4.44523e-18 -2.91379e-18 +Row 22 + 9.91168e-01 -2.23617e-18 2.94429e-18 4.32444e-17 1.48739e-18 +Row 23 + 1.13701e+00 -2.29038e-18 -2.98156e-19 -3.06626e-19 +Row 24 + 1.13701e+00 -9.04631e-19 -2.79182e-18 +Row 25 + 9.91168e-01 2.16091e-20 +Row 26 + 1.13701e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + 1.48885e+00 1.85694e+00 -1.34848e-17 1.16281e-16 3.25125e-17 -6.35478e-17 -2.30501e-16 1.21566e-17 + 5.10507e-18 -5.48877e-18 4.06576e-20 -4.59837e-17 -9.75104e-18 1.23629e+00 2.25011e+00 3.55178e-04 + 5.90487e-04 1.24492e-04 4.28563e-04 7.11768e-04 1.51827e-04 -1.15453e-06 5.48551e-04 2.46587e-03 + 5.95842e-06 1.49023e-03 +Row 2 + 4.31653e+00 -3.84350e-17 5.42101e-17 2.28225e-17 -1.47451e-17 9.71445e-17 7.80626e-18 9.90690e-18 + -4.55365e-18 -4.87891e-18 -1.05927e-16 -5.74627e-18 2.25011e+00 3.67665e+00 -4.79392e-04 -7.97562e-04 + -1.66751e-04 -5.39661e-04 -8.97294e-04 -1.88913e-04 1.57125e-06 -8.79829e-04 -3.96682e-03 -8.10910e-06 + -2.39668e-03 +Row 3 + 5.44536e-01 -8.45678e-18 -9.08019e-18 5.83149e-01 -3.81639e-17 2.24430e-17 -5.04832e-19 7.66531e-17 + -2.58853e-18 5.96311e-19 -4.98733e-18 -3.55178e-04 4.79392e-04 -1.24838e-01 5.48802e-04 2.46888e-03 + -1.17064e-01 4.87005e-04 2.19831e-03 -1.79153e-03 4.75245e-04 1.17592e-04 -1.72936e-08 -4.82737e-01 +Row 4 + 5.44536e-01 -1.77809e-17 -3.81639e-17 5.83149e-01 7.63278e-17 4.54823e-17 6.48488e-18 -4.87891e-18 + -2.16840e-17 -8.00107e-18 -5.90487e-04 7.97562e-04 5.48802e-04 -1.24830e-01 1.49195e-03 4.87005e-04 + -1.17055e-01 1.32804e-03 1.48203e-03 2.90121e-04 -4.82737e-01 -2.56697e-03 1.17583e-04 +Row 5 + 5.44536e-01 2.24430e-17 7.63278e-17 5.83149e-01 -6.20028e-19 -4.87891e-18 1.74828e-18 -1.32815e-18 + -1.26716e-17 -1.24492e-04 1.66751e-04 2.46888e-03 1.49195e-03 -1.24842e-01 2.19831e-03 1.32804e-03 + -1.17068e-01 3.30013e-04 -4.82737e-01 2.90156e-04 5.71591e-04 4.75264e-04 +Row 6 + 6.96122e-01 3.29597e-17 -1.12757e-17 -5.42101e-18 1.96241e-17 4.82470e-18 2.79182e-18 7.37257e-18 + -4.28563e-04 5.39661e-04 -1.17064e-01 4.87005e-04 2.19831e-03 -6.46215e-02 4.09418e-04 1.86883e-03 + -1.79747e-03 1.26928e-03 2.91200e-04 -4.08999e-08 -4.19167e-01 +Row 7 + 6.96122e-01 -6.33174e-17 -1.09288e-16 -2.98156e-18 7.37257e-18 6.13929e-17 4.43168e-18 -7.11768e-04 + 8.97294e-04 4.87005e-04 -1.17055e-01 1.32804e-03 4.09418e-04 -6.46140e-02 1.12787e-03 1.48692e-03 + 7.69230e-04 -4.19167e-01 -2.57547e-03 2.91180e-04 +Row 8 + 6.96122e-01 4.16063e-18 7.37257e-18 -1.19262e-18 -4.49944e-18 1.00953e-16 -1.51827e-04 1.88913e-04 + 2.19831e-03 1.32804e-03 -1.17068e-01 1.86883e-03 1.12787e-03 -6.46252e-02 3.31113e-04 -4.19167e-01 + 7.69312e-04 5.73485e-04 1.26932e-03 +Row 9 + 9.91168e-01 -6.77626e-19 2.86975e-18 9.53674e-17 4.83486e-18 -1.15453e-06 1.57125e-06 1.79153e-03 + -1.48203e-03 -3.30013e-04 1.79747e-03 -1.48692e-03 -3.31113e-04 -5.10922e-01 -6.05774e-06 -1.33026e-06 + -1.76263e-05 4.43587e-06 +Row 10 + 1.13701e+00 4.91957e-18 -7.44373e-18 3.62361e-18 5.48551e-04 -8.79829e-04 -4.75245e-04 -2.90121e-04 + 4.82737e-01 -1.26928e-03 -7.69230e-04 4.19167e-01 -6.05774e-06 1.32221e-01 2.17786e-03 -1.04671e-05 + 3.60087e-03 +Row 11 + 1.13701e+00 -6.94567e-19 5.61075e-18 2.46587e-03 -3.96682e-03 -1.17592e-04 4.82737e-01 -2.90156e-04 + -2.91200e-04 4.19167e-01 -7.69312e-04 -1.33026e-06 2.17786e-03 1.32237e-01 2.36050e-06 8.08017e-04 +Row 12 + 9.91168e-01 -3.10902e-18 5.95842e-06 -8.10910e-06 1.72936e-08 2.56697e-03 -5.71591e-04 4.08999e-08 + 2.57547e-03 -5.73485e-04 -1.76263e-05 -1.04671e-05 2.36050e-06 -5.10916e-01 5.13066e-08 +Row 13 + 1.13701e+00 1.49023e-03 -2.39668e-03 4.82737e-01 -1.17583e-04 -4.75264e-04 4.19167e-01 -2.91180e-04 + -1.26932e-03 4.43587e-06 3.60087e-03 8.08017e-04 5.13066e-08 1.32226e-01 +Row 14 + 1.48885e+00 1.85694e+00 -7.76763e-17 7.57315e-17 1.30158e-16 1.06442e-16 -2.34621e-16 -1.83013e-16 + -1.86686e-18 -5.54298e-18 -3.57787e-18 -3.55652e-17 -4.91957e-18 +Row 15 + 4.31653e+00 -8.65735e-17 6.07153e-17 8.14236e-17 3.36753e-16 1.28370e-16 -9.10730e-18 -8.60314e-17 + -4.33681e-18 -1.30104e-17 -9.74156e-17 -4.28260e-18 +Row 16 + 5.44536e-01 -5.20417e-18 -2.11962e-17 5.83149e-01 -1.99493e-17 7.28042e-17 -1.60564e-17 6.97142e-17 + 6.62041e-17 -2.16840e-19 -1.23057e-17 +Row 17 + 5.44536e-01 -2.14672e-17 -1.99493e-17 5.83149e-01 3.03577e-18 4.19044e-17 8.00277e-18 -1.22515e-17 + -3.68968e-17 3.90889e-17 +Row 18 + 5.44536e-01 7.28042e-17 3.03577e-18 5.83149e-01 4.06677e-17 -1.22515e-17 4.78404e-18 6.81014e-17 + 8.09763e-18 +Row 19 + 6.96122e-01 6.07153e-17 -8.17488e-17 6.91721e-17 1.14925e-17 1.34441e-17 7.15573e-18 1.85399e-17 +Row 20 + 6.96122e-01 -7.89299e-17 -1.08529e-16 -4.14707e-18 1.83230e-17 7.34276e-17 2.51467e-17 +Row 21 + 6.96122e-01 -9.89199e-17 1.83230e-17 -1.82688e-17 -1.26039e-16 1.00899e-16 +Row 22 + 9.91168e-01 7.99599e-19 3.28310e-18 3.65647e-17 1.79300e-17 +Row 23 + 1.13701e+00 1.34034e-17 -7.09475e-18 7.10999e-18 +Row 24 + 1.13701e+00 2.66307e-18 4.17418e-18 +Row 25 + 9.91168e-01 1.79660e-21 +Row 26 + 1.13701e+00 diff --git a/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/syns_nao.csr.ref b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/syns_nao.csr.ref new file mode 100644 index 0000000000..29f7263b89 --- /dev/null +++ b/tests/02_NAO_Gamma/005_NO_GO_MD_OHK/syns_nao.csr.ref @@ -0,0 +1,14 @@ +IONIC_STEP: 1 +Matrix Dimension of S_async(R): 26 +Matrix number of S_async(R): 1 +0 0 0 672 + 1.48884702e+00 1.85694239e+00 6.18410216e-04 1.02317953e-03 2.27825967e-04 5.31949313e-04 8.80126883e-04 1.95973296e-04 -3.46325308e-08 -4.65312583e-07 -1.03607610e-07 1.78729234e-07 -1.71423305e-07 1.23628926e+00 2.25011133e+00 -1.79623656e-04 -2.96479664e-04 -6.77644829e-05 -2.16219916e-04 -3.57062591e-04 -8.11718240e-05 -2.88642704e-07 -2.74679535e-04 -1.23304119e-03 1.48962708e-06 -7.45280058e-04 1.85694239e+00 4.31652581e+00 -8.55474517e-04 -1.41541011e-03 -3.15161843e-04 -6.70323180e-04 -1.10907120e-03 -2.46951009e-04 2.84840341e-07 -8.47694190e-07 -1.88752270e-07 -1.46999918e-06 -3.12295916e-07 2.25011133e+00 3.67664181e+00 2.42849251e-04 4.00695387e-04 9.19329690e-05 2.72995970e-04 4.50568777e-04 1.03049703e-04 3.92825612e-07 4.42631910e-04 1.98404692e-03 -2.02729662e-06 1.19936645e-03 -6.18410216e-04 8.55474517e-04 5.44530326e-01 -3.18722059e-06 -7.09680952e-07 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 -1.34332057e-03 -2.33089470e-03 -5.19007331e-04 3.42374099e-09 3.81985399e-09 1.79623656e-04 -2.42849251e-04 -1.24840188e-01 -2.75135667e-04 -1.23461686e-03 -1.17065004e-01 -2.45460287e-04 -1.09960094e-03 8.95769861e-04 -2.35566958e-04 -4.95120502e-05 2.16335581e-09 -4.82748090e-01 -1.02317953e-03 1.41541011e-03 -3.18722059e-06 5.44527701e-01 -1.17419053e-06 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 1.11127833e-03 -1.40878816e-03 3.81985399e-09 -1.92478677e-03 -5.19005646e-04 2.96479664e-04 -4.00695387e-04 -2.75135667e-04 -1.24838174e-01 -7.46258545e-04 -2.45460287e-04 -1.17062891e-01 -6.64750516e-04 -7.41034221e-04 -1.41651798e-04 -4.82748090e-01 1.28351130e-03 -4.95109811e-05 -2.27825967e-04 3.15161843e-04 -7.09680952e-07 -1.17419053e-06 5.44531631e-01 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 2.47443628e-04 3.81985399e-09 -1.40879501e-03 4.28586621e-04 -2.33089846e-03 6.77644829e-05 -9.19329690e-05 -1.23461686e-03 -7.46258545e-04 -1.24841190e-01 -1.09960094e-03 -6.64750516e-04 -1.17066054e-01 -1.65004430e-04 -4.82748090e-01 -1.41656124e-04 -2.85794987e-04 -2.35569334e-04 -5.31949313e-04 6.70323180e-04 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 6.96112581e-01 -5.32399396e-06 -1.18546677e-06 -1.90724848e-03 -2.92521245e-03 -6.51341920e-04 7.82874212e-09 4.22307437e-09 2.16219916e-04 -2.72995970e-04 -1.17065004e-01 -2.45460287e-04 -1.09960094e-03 -6.46184801e-02 -2.10000264e-04 -9.35600793e-04 8.98733339e-04 -6.33163284e-04 -1.38844494e-04 5.12112671e-09 -4.19174765e-01 -8.80126883e-04 1.10907120e-03 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -5.32399396e-06 6.96107168e-01 -1.96139142e-06 1.57779626e-03 -1.76799004e-03 4.22307436e-09 -2.73281468e-03 -6.51338068e-04 3.57062591e-04 -4.50568777e-04 -2.45460287e-04 -1.17062891e-01 -6.64750516e-04 -2.10000264e-04 -6.46166208e-02 -5.65889231e-04 -7.43482987e-04 -3.82154228e-04 -4.19174765e-01 1.28775593e-03 -1.38841966e-04 -1.95973296e-04 2.46951009e-04 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -1.18546677e-06 -1.96139142e-06 6.96115274e-01 3.51320158e-04 4.22307436e-09 -1.76800570e-03 6.08508216e-04 -2.92522105e-03 8.11718240e-05 -1.03049703e-04 -1.09960094e-03 -6.64750516e-04 -1.17066054e-01 -9.35600793e-04 -5.65889231e-04 -6.46194049e-02 -1.65551088e-04 -4.19174765e-01 -3.82164470e-04 -2.86740368e-04 -6.33168911e-04 -3.46325308e-08 2.84840341e-07 1.34332057e-03 -1.11127833e-03 -2.47443628e-04 1.90724848e-03 -1.57779626e-03 -3.51320158e-04 9.91148755e-01 -3.51624346e-06 -7.82944396e-07 7.65728634e-06 2.59079895e-06 -2.88642704e-07 3.92825612e-07 -8.95769861e-04 7.41034221e-04 1.65004430e-04 -8.98733339e-04 7.43482987e-04 1.65551088e-04 -5.10933358e-01 -1.51322828e-06 -3.39223792e-07 -4.40662955e-06 1.11837462e-06 -4.65312583e-07 -8.47694190e-07 2.33089470e-03 1.40878816e-03 -3.81985399e-09 2.92521245e-03 1.76799004e-03 -4.22307436e-09 -3.51624346e-06 1.13698095e+00 -3.49408070e-06 -6.09023833e-06 -2.11180788e-06 -2.74679535e-04 4.42631910e-04 2.35566958e-04 1.41651798e-04 4.82748090e-01 6.33163284e-04 3.82154228e-04 4.19174765e-01 -1.51322828e-06 1.32232574e-01 -1.08712966e-03 -2.62414619e-06 -1.79933501e-03 -1.03607610e-07 -1.88752270e-07 5.19007331e-04 -3.81985399e-09 1.40879501e-03 6.51341920e-04 -4.22307436e-09 1.76800570e-03 -7.82944396e-07 -3.49408070e-06 1.13699053e+00 1.35610767e-06 -9.48435982e-06 -1.23304119e-03 1.98404692e-03 4.95120502e-05 4.82748090e-01 1.41656124e-04 1.38844494e-04 4.19174765e-01 3.82164470e-04 -3.39223792e-07 -1.08712966e-03 1.32236696e-01 5.80494331e-07 -3.99082369e-04 1.78729234e-07 -1.46999918e-06 -3.42374099e-09 1.92478677e-03 -4.28586621e-04 -7.82874212e-09 2.73281468e-03 -6.08508216e-04 7.65728634e-06 -6.09023833e-06 1.35610767e-06 9.91145788e-01 1.48962708e-06 -2.02729662e-06 -2.16335581e-09 -1.28351130e-03 2.85794987e-04 -5.12112671e-09 -1.28775593e-03 2.86740368e-04 -4.40662955e-06 -2.62414619e-06 5.80494331e-07 -5.10931650e-01 -6.41902276e-09 -1.71423305e-07 -3.12295916e-07 -3.81985399e-09 5.19005646e-04 2.33089846e-03 -4.22307437e-09 6.51338068e-04 2.92522105e-03 2.59079895e-06 -2.11180788e-06 -9.48435982e-06 1.13698413e+00 -7.45280058e-04 1.19936645e-03 4.82748090e-01 4.95109811e-05 2.35569334e-04 4.19174765e-01 1.38841966e-04 6.33168911e-04 1.11837462e-06 -1.79933501e-03 -3.99082369e-04 -6.41902276e-09 1.32233943e-01 1.23628926e+00 2.25011133e+00 1.79623656e-04 2.96479664e-04 6.77644829e-05 2.16219916e-04 3.57062591e-04 8.11718240e-05 -2.88642704e-07 -2.74679535e-04 -1.23304119e-03 1.48962708e-06 -7.45280058e-04 1.48884702e+00 1.85694239e+00 -6.18410216e-04 -1.02317953e-03 -2.27825967e-04 -5.31949313e-04 -8.80126883e-04 -1.95973296e-04 -3.46325308e-08 -4.65312583e-07 -1.03607610e-07 1.78729234e-07 -1.71423305e-07 2.25011133e+00 3.67664181e+00 -2.42849251e-04 -4.00695387e-04 -9.19329690e-05 -2.72995970e-04 -4.50568777e-04 -1.03049703e-04 3.92825612e-07 4.42631910e-04 1.98404692e-03 -2.02729662e-06 1.19936645e-03 1.85694239e+00 4.31652581e+00 8.55474517e-04 1.41541011e-03 3.15161843e-04 6.70323180e-04 1.10907120e-03 2.46951009e-04 2.84840341e-07 -8.47694190e-07 -1.88752270e-07 -1.46999918e-06 -3.12295916e-07 -1.79623656e-04 2.42849251e-04 -1.24840188e-01 -2.75135667e-04 -1.23461686e-03 -1.17065004e-01 -2.45460287e-04 -1.09960094e-03 -8.95769861e-04 2.35566958e-04 4.95120502e-05 -2.16335581e-09 4.82748090e-01 6.18410216e-04 -8.55474517e-04 5.44530326e-01 -3.18722059e-06 -7.09680952e-07 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 1.34332057e-03 2.33089470e-03 5.19007331e-04 -3.42374099e-09 -3.81985399e-09 -2.96479664e-04 4.00695387e-04 -2.75135667e-04 -1.24838174e-01 -7.46258545e-04 -2.45460287e-04 -1.17062891e-01 -6.64750516e-04 7.41034221e-04 1.41651798e-04 4.82748090e-01 -1.28351130e-03 4.95109811e-05 1.02317953e-03 -1.41541011e-03 -3.18722059e-06 5.44527701e-01 -1.17419053e-06 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -1.11127833e-03 1.40878816e-03 -3.81985399e-09 1.92478677e-03 5.19005646e-04 -6.77644829e-05 9.19329690e-05 -1.23461686e-03 -7.46258545e-04 -1.24841190e-01 -1.09960094e-03 -6.64750516e-04 -1.17066054e-01 1.65004430e-04 4.82748090e-01 1.41656124e-04 2.85794987e-04 2.35569334e-04 2.27825967e-04 -3.15161843e-04 -7.09680952e-07 -1.17419053e-06 5.44531631e-01 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -2.47443628e-04 -3.81985399e-09 1.40879501e-03 -4.28586621e-04 2.33089846e-03 -2.16219916e-04 2.72995970e-04 -1.17065004e-01 -2.45460287e-04 -1.09960094e-03 -6.46184801e-02 -2.10000264e-04 -9.35600793e-04 -8.98733339e-04 6.33163284e-04 1.38844494e-04 -5.12112671e-09 4.19174765e-01 5.31949313e-04 -6.70323180e-04 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 6.96112581e-01 -5.32399396e-06 -1.18546677e-06 1.90724848e-03 2.92521245e-03 6.51341920e-04 -7.82874212e-09 -4.22307437e-09 -3.57062591e-04 4.50568777e-04 -2.45460287e-04 -1.17062891e-01 -6.64750516e-04 -2.10000264e-04 -6.46166208e-02 -5.65889231e-04 7.43482987e-04 3.82154228e-04 4.19174765e-01 -1.28775593e-03 1.38841966e-04 8.80126883e-04 -1.10907120e-03 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -5.32399396e-06 6.96107168e-01 -1.96139142e-06 -1.57779626e-03 1.76799004e-03 -4.22307436e-09 2.73281468e-03 6.51338068e-04 -8.11718240e-05 1.03049703e-04 -1.09960094e-03 -6.64750516e-04 -1.17066054e-01 -9.35600793e-04 -5.65889231e-04 -6.46194049e-02 1.65551088e-04 4.19174765e-01 3.82164470e-04 2.86740368e-04 6.33168911e-04 1.95973296e-04 -2.46951009e-04 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -1.18546677e-06 -1.96139142e-06 6.96115274e-01 -3.51320158e-04 -4.22307436e-09 1.76800570e-03 -6.08508216e-04 2.92522105e-03 -2.88642704e-07 3.92825612e-07 8.95769861e-04 -7.41034221e-04 -1.65004430e-04 8.98733339e-04 -7.43482987e-04 -1.65551088e-04 -5.10933358e-01 -1.51322828e-06 -3.39223792e-07 -4.40662955e-06 1.11837462e-06 -3.46325308e-08 2.84840341e-07 -1.34332057e-03 1.11127833e-03 2.47443628e-04 -1.90724848e-03 1.57779626e-03 3.51320158e-04 9.91148755e-01 -3.51624346e-06 -7.82944396e-07 7.65728634e-06 2.59079895e-06 -2.74679535e-04 4.42631910e-04 -2.35566958e-04 -1.41651798e-04 -4.82748090e-01 -6.33163284e-04 -3.82154228e-04 -4.19174765e-01 -1.51322828e-06 1.32232574e-01 -1.08712966e-03 -2.62414619e-06 -1.79933501e-03 -4.65312583e-07 -8.47694190e-07 -2.33089470e-03 -1.40878816e-03 3.81985399e-09 -2.92521245e-03 -1.76799004e-03 4.22307436e-09 -3.51624346e-06 1.13698095e+00 -3.49408070e-06 -6.09023833e-06 -2.11180788e-06 -1.23304119e-03 1.98404692e-03 -4.95120502e-05 -4.82748090e-01 -1.41656124e-04 -1.38844494e-04 -4.19174765e-01 -3.82164470e-04 -3.39223792e-07 -1.08712966e-03 1.32236696e-01 5.80494331e-07 -3.99082369e-04 -1.03607610e-07 -1.88752270e-07 -5.19007331e-04 3.81985399e-09 -1.40879501e-03 -6.51341920e-04 4.22307436e-09 -1.76800570e-03 -7.82944396e-07 -3.49408070e-06 1.13699053e+00 1.35610767e-06 -9.48435982e-06 1.48962708e-06 -2.02729662e-06 2.16335581e-09 1.28351130e-03 -2.85794987e-04 5.12112671e-09 1.28775593e-03 -2.86740368e-04 -4.40662955e-06 -2.62414619e-06 5.80494331e-07 -5.10931650e-01 -6.41902276e-09 1.78729234e-07 -1.46999918e-06 3.42374099e-09 -1.92478677e-03 4.28586621e-04 7.82874212e-09 -2.73281468e-03 6.08508216e-04 7.65728634e-06 -6.09023833e-06 1.35610767e-06 9.91145788e-01 -7.45280058e-04 1.19936645e-03 -4.82748090e-01 -4.95109811e-05 -2.35569334e-04 -4.19174765e-01 -1.38841966e-04 -6.33168911e-04 1.11837462e-06 -1.79933501e-03 -3.99082369e-04 -6.41902276e-09 1.32233943e-01 -1.71423305e-07 -3.12295916e-07 3.81985399e-09 -5.19005646e-04 -2.33089846e-03 4.22307437e-09 -6.51338068e-04 -2.92522105e-03 2.59079895e-06 -2.11180788e-06 -9.48435982e-06 1.13698413e+00 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 26 52 78 104 130 156 182 208 234 260 286 311 336 362 388 414 440 466 492 518 544 570 596 622 647 672 +IONIC_STEP: 2 +Matrix Dimension of S_async(R): 26 +Matrix number of S_async(R): 1 +0 0 0 672 + 1.48884702e+00 1.85694239e+00 6.18410216e-04 1.02317953e-03 2.27825967e-04 5.31949313e-04 8.80126883e-04 1.95973296e-04 -3.46325308e-08 -4.65312583e-07 -1.03607610e-07 1.78729234e-07 -1.71423305e-07 1.23628926e+00 2.25011133e+00 1.78268263e-04 2.95660465e-04 6.40854004e-05 2.14928436e-04 3.56282021e-04 7.76662314e-05 -2.88642782e-07 2.74415143e-04 1.23298232e-03 1.48962786e-06 7.45182656e-04 1.85694239e+00 4.31652581e+00 -8.55474517e-04 -1.41541011e-03 -3.15161843e-04 -6.70323180e-04 -1.10907120e-03 -2.46951009e-04 2.84840341e-07 -8.47694190e-07 -1.88752270e-07 -1.46999918e-06 -3.12295916e-07 2.25011133e+00 3.67664181e+00 -2.40747321e-04 -3.99424983e-04 -8.62274868e-05 -2.70885145e-04 -4.49292996e-04 -9.73200783e-05 3.92825601e-07 -4.40829656e-04 -1.98364563e-03 -2.02729681e-06 -1.19870250e-03 -6.18410216e-04 8.55474517e-04 5.44530326e-01 -3.18722059e-06 -7.09680952e-07 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 -1.34332057e-03 -2.33089470e-03 -5.19007331e-04 3.42374099e-09 3.81985401e-09 -1.78268263e-04 2.40747321e-04 -1.24840192e-01 2.74650046e-04 1.23450873e-03 -1.17065007e-01 2.44158702e-04 1.09931112e-03 -8.95769864e-04 2.36945101e-04 5.57013837e-05 -2.16062369e-09 -4.82748089e-01 -1.02317953e-03 1.41541011e-03 -3.18722059e-06 5.44527701e-01 -1.17419053e-06 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 1.11127833e-03 -1.40878816e-03 3.81985401e-09 -1.92478677e-03 -5.19005646e-04 -2.95660465e-04 3.99424983e-04 2.74650046e-04 -1.24838178e-01 7.46079638e-04 2.44158702e-04 -1.17062894e-01 6.64271002e-04 7.41034220e-04 1.43931987e-04 -4.82748089e-01 -1.28351129e-03 5.57003249e-05 -2.27825967e-04 3.15161843e-04 -7.09680952e-07 -1.17419053e-06 5.44531631e-01 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 2.47443628e-04 3.81985401e-09 -1.40879501e-03 4.28586621e-04 -2.33089846e-03 -6.40854004e-05 8.62274868e-05 1.23450873e-03 7.46079638e-04 -1.24841194e-01 1.09931112e-03 6.64271002e-04 -1.17066057e-01 1.65004435e-04 -4.82748089e-01 1.43936308e-04 2.85795006e-04 2.36947476e-04 -5.31949313e-04 6.70323180e-04 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 6.96112581e-01 -5.32399396e-06 -1.18546677e-06 -1.90724848e-03 -2.92521245e-03 -6.51341920e-04 7.82874215e-09 4.22307434e-09 -2.14928436e-04 2.70885145e-04 -1.17065007e-01 2.44158702e-04 1.09931112e-03 -6.46184820e-02 2.06474932e-04 9.34815817e-04 -8.98733354e-04 6.34166258e-04 1.43348922e-04 -5.11554605e-09 -4.19174763e-01 -8.80126883e-04 1.10907120e-03 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -5.32399396e-06 6.96107168e-01 -1.96139142e-06 1.57779626e-03 -1.76799004e-03 4.22307434e-09 -2.73281468e-03 -6.51338068e-04 -3.56282021e-04 4.49292996e-04 2.44158702e-04 -1.17062894e-01 6.64271002e-04 2.06474932e-04 -6.46166228e-02 5.64590473e-04 7.43482989e-04 3.83813692e-04 -4.19174763e-01 -1.28775593e-03 1.43346413e-04 -1.95973296e-04 2.46951009e-04 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -1.18546677e-06 -1.96139142e-06 6.96115274e-01 3.51320158e-04 4.22307434e-09 -1.76800570e-03 6.08508216e-04 -2.92522105e-03 -7.76662314e-05 9.73200783e-05 1.09931112e-03 6.64271002e-04 -1.17066057e-01 9.34815817e-04 5.64590473e-04 -6.46194069e-02 1.65551113e-04 -4.19174763e-01 3.83823923e-04 2.86740430e-04 6.34171882e-04 -3.46325308e-08 2.84840341e-07 1.34332057e-03 -1.11127833e-03 -2.47443628e-04 1.90724848e-03 -1.57779626e-03 -3.51320158e-04 9.91148755e-01 -3.51624346e-06 -7.82944396e-07 7.65728634e-06 2.59079895e-06 -2.88642782e-07 3.92825601e-07 8.95769864e-04 -7.41034220e-04 -1.65004435e-04 8.98733354e-04 -7.43482989e-04 -1.65551113e-04 -5.10933352e-01 -1.51406514e-06 -3.34853292e-07 -4.40663006e-06 1.11217954e-06 -4.65312583e-07 -8.47694190e-07 2.33089470e-03 1.40878816e-03 -3.81985401e-09 2.92521245e-03 1.76799004e-03 -4.22307434e-09 -3.51624346e-06 1.13698095e+00 -3.49408070e-06 -6.09023833e-06 -2.11180788e-06 2.74415143e-04 -4.40829656e-04 -2.36945101e-04 -1.43931987e-04 4.82748089e-01 -6.34166258e-04 -3.83813692e-04 4.19174763e-01 -1.51406514e-06 1.32232568e-01 1.08834173e-03 -2.61927937e-06 1.80006758e-03 -1.03607610e-07 -1.88752270e-07 5.19007331e-04 -3.81985401e-09 1.40879501e-03 6.51341920e-04 -4.22307434e-09 1.76800570e-03 -7.82944396e-07 -3.49408070e-06 1.13699053e+00 1.35610767e-06 -9.48435982e-06 1.23298232e-03 -1.98364563e-03 -5.57013837e-05 4.82748089e-01 -1.43936308e-04 -1.43348922e-04 4.19174763e-01 -3.83823923e-04 -3.34853292e-07 1.08834173e-03 1.32236691e-01 5.87041999e-07 4.02372404e-04 1.78729234e-07 -1.46999918e-06 -3.42374099e-09 1.92478677e-03 -4.28586621e-04 -7.82874215e-09 2.73281468e-03 -6.08508216e-04 7.65728634e-06 -6.09023833e-06 1.35610767e-06 9.91145788e-01 1.48962786e-06 -2.02729681e-06 2.16062369e-09 1.28351129e-03 -2.85795006e-04 5.11554605e-09 1.28775593e-03 -2.86740430e-04 -4.40663006e-06 -2.61927937e-06 5.87041999e-07 -5.10931644e-01 6.41892965e-09 -1.71423305e-07 -3.12295916e-07 -3.81985401e-09 5.19005646e-04 2.33089846e-03 -4.22307434e-09 6.51338068e-04 2.92522105e-03 2.59079895e-06 -2.11180788e-06 -9.48435982e-06 1.13698413e+00 7.45182656e-04 -1.19870250e-03 4.82748089e-01 -5.57003249e-05 -2.36947476e-04 4.19174763e-01 -1.43346413e-04 -6.34171882e-04 1.11217954e-06 1.80006758e-03 4.02372404e-04 6.41892965e-09 1.32233938e-01 1.23628926e+00 2.25011133e+00 -1.78268263e-04 -2.95660465e-04 -6.40854004e-05 -2.14928436e-04 -3.56282021e-04 -7.76662314e-05 -2.88642782e-07 2.74415143e-04 1.23298232e-03 1.48962786e-06 7.45182656e-04 1.48884702e+00 1.85694239e+00 -6.18410216e-04 -1.02317953e-03 -2.27825967e-04 -5.31949313e-04 -8.80126883e-04 -1.95973296e-04 -3.46325308e-08 -4.65312583e-07 -1.03607610e-07 1.78729234e-07 -1.71423305e-07 2.25011133e+00 3.67664181e+00 2.40747321e-04 3.99424983e-04 8.62274868e-05 2.70885145e-04 4.49292996e-04 9.73200783e-05 3.92825601e-07 -4.40829656e-04 -1.98364563e-03 -2.02729681e-06 -1.19870250e-03 1.85694239e+00 4.31652581e+00 8.55474517e-04 1.41541011e-03 3.15161843e-04 6.70323180e-04 1.10907120e-03 2.46951009e-04 2.84840341e-07 -8.47694190e-07 -1.88752270e-07 -1.46999918e-06 -3.12295916e-07 1.78268263e-04 -2.40747321e-04 -1.24840192e-01 2.74650046e-04 1.23450873e-03 -1.17065007e-01 2.44158702e-04 1.09931112e-03 8.95769864e-04 -2.36945101e-04 -5.57013837e-05 2.16062366e-09 4.82748089e-01 6.18410216e-04 -8.55474517e-04 5.44530326e-01 -3.18722059e-06 -7.09680952e-07 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 1.34332057e-03 2.33089470e-03 5.19007331e-04 -3.42374096e-09 -3.81985399e-09 2.95660465e-04 -3.99424983e-04 2.74650046e-04 -1.24838178e-01 7.46079638e-04 2.44158702e-04 -1.17062894e-01 6.64271002e-04 -7.41034220e-04 -1.43931987e-04 4.82748089e-01 1.28351129e-03 -5.57003249e-05 1.02317953e-03 -1.41541011e-03 -3.18722059e-06 5.44527701e-01 -1.17419053e-06 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -1.11127833e-03 1.40878816e-03 -3.81985399e-09 1.92478677e-03 5.19005646e-04 6.40854004e-05 -8.62274868e-05 1.23450873e-03 7.46079638e-04 -1.24841194e-01 1.09931112e-03 6.64271002e-04 -1.17066057e-01 -1.65004435e-04 4.82748089e-01 -1.43936308e-04 -2.85795006e-04 -2.36947476e-04 2.27825967e-04 -3.15161843e-04 -7.09680952e-07 -1.17419053e-06 5.44531631e-01 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -2.47443628e-04 -3.81985399e-09 1.40879501e-03 -4.28586621e-04 2.33089846e-03 2.14928436e-04 -2.70885145e-04 -1.17065007e-01 2.44158702e-04 1.09931112e-03 -6.46184820e-02 2.06474932e-04 9.34815817e-04 8.98733354e-04 -6.34166258e-04 -1.43348922e-04 5.11554614e-09 4.19174763e-01 5.31949313e-04 -6.70323180e-04 5.83143304e-01 -3.51939860e-06 -7.83646241e-07 6.96112581e-01 -5.32399396e-06 -1.18546677e-06 1.90724848e-03 2.92521245e-03 6.51341920e-04 -7.82874217e-09 -4.22307437e-09 3.56282021e-04 -4.49292996e-04 2.44158702e-04 -1.17062894e-01 6.64271002e-04 2.06474932e-04 -6.46166228e-02 5.64590473e-04 -7.43482989e-04 -3.83813692e-04 4.19174763e-01 1.28775593e-03 -1.43346413e-04 8.80126883e-04 -1.10907120e-03 -3.51939860e-06 5.83139932e-01 -1.29656740e-06 -5.32399396e-06 6.96107168e-01 -1.96139142e-06 -1.57779626e-03 1.76799004e-03 -4.22307437e-09 2.73281468e-03 6.51338068e-04 7.76662314e-05 -9.73200783e-05 1.09931112e-03 6.64271002e-04 -1.17066057e-01 9.34815817e-04 5.64590473e-04 -6.46194069e-02 -1.65551113e-04 4.19174763e-01 -3.83823923e-04 -2.86740430e-04 -6.34171882e-04 1.95973296e-04 -2.46951009e-04 -7.83646241e-07 -1.29656740e-06 5.83144981e-01 -1.18546677e-06 -1.96139142e-06 6.96115274e-01 -3.51320158e-04 -4.22307437e-09 1.76800570e-03 -6.08508216e-04 2.92522105e-03 -2.88642782e-07 3.92825601e-07 -8.95769864e-04 7.41034220e-04 1.65004435e-04 -8.98733354e-04 7.43482989e-04 1.65551113e-04 -5.10933352e-01 -1.51406514e-06 -3.34853292e-07 -4.40663006e-06 1.11217954e-06 -3.46325308e-08 2.84840341e-07 -1.34332057e-03 1.11127833e-03 2.47443628e-04 -1.90724848e-03 1.57779626e-03 3.51320158e-04 9.91148755e-01 -3.51624346e-06 -7.82944396e-07 7.65728634e-06 2.59079895e-06 2.74415143e-04 -4.40829656e-04 2.36945101e-04 1.43931987e-04 -4.82748089e-01 6.34166258e-04 3.83813692e-04 -4.19174763e-01 -1.51406514e-06 1.32232568e-01 1.08834173e-03 -2.61927937e-06 1.80006758e-03 -4.65312583e-07 -8.47694190e-07 -2.33089470e-03 -1.40878816e-03 3.81985399e-09 -2.92521245e-03 -1.76799004e-03 4.22307437e-09 -3.51624346e-06 1.13698095e+00 -3.49408070e-06 -6.09023833e-06 -2.11180788e-06 1.23298232e-03 -1.98364563e-03 5.57013837e-05 -4.82748089e-01 1.43936308e-04 1.43348922e-04 -4.19174763e-01 3.83823923e-04 -3.34853292e-07 1.08834173e-03 1.32236691e-01 5.87041999e-07 4.02372404e-04 -1.03607610e-07 -1.88752270e-07 -5.19007331e-04 3.81985399e-09 -1.40879501e-03 -6.51341920e-04 4.22307437e-09 -1.76800570e-03 -7.82944396e-07 -3.49408070e-06 1.13699053e+00 1.35610767e-06 -9.48435982e-06 1.48962786e-06 -2.02729681e-06 -2.16062366e-09 -1.28351129e-03 2.85795006e-04 -5.11554614e-09 -1.28775593e-03 2.86740430e-04 -4.40663006e-06 -2.61927937e-06 5.87041999e-07 -5.10931644e-01 6.41892967e-09 1.78729234e-07 -1.46999918e-06 3.42374096e-09 -1.92478677e-03 4.28586621e-04 7.82874217e-09 -2.73281468e-03 6.08508216e-04 7.65728634e-06 -6.09023833e-06 1.35610767e-06 9.91145788e-01 7.45182656e-04 -1.19870250e-03 -4.82748089e-01 5.57003249e-05 2.36947476e-04 -4.19174763e-01 1.43346413e-04 6.34171882e-04 1.11217954e-06 1.80006758e-03 4.02372404e-04 6.41892967e-09 1.32233938e-01 -1.71423305e-07 -3.12295916e-07 3.81985399e-09 -5.19005646e-04 -2.33089846e-03 4.22307437e-09 -6.51338068e-04 -2.92522105e-03 2.59079895e-06 -2.11180788e-06 -9.48435982e-06 1.13698413e+00 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 26 52 78 104 130 156 182 208 234 260 286 311 336 362 388 414 440 466 492 518 544 570 596 622 647 672 diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/INPUT b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/INPUT new file mode 100644 index 0000000000..8b0691ca96 --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/INPUT @@ -0,0 +1,33 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +nbands 8 +calculation md +basis_type lcao +gamma_only 1 +nspin 2 +out_mat_hs 1 5 + +#Parameters (Accuracy) +ecutwfc 5 +scf_nmax 50 +scf_thr 1.0e-8 + +cal_stress 1 +stress_thr 1e-6 +cal_force 1 +force_thr_ev 1.0e-3 + +mixing_type broyden +mixing_beta 0.7 + +md_nstep 2 +md_tchain 4 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 + +chg_extrap first-order + +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/STRU b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/STRU new file mode 100644 index 0000000000..6fc39c63ca --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 1 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0 0.5 0.5 #latvec1 +0.5 0 0.5 #latvec2 +0.5 0.5 0 #latvec3 + +ATOMIC_POSITIONS +Cartesian + +Si #label +0 #magnetism +2 #number of atoms +0 0 0 m 1 1 1 v 0.000135711648533 3.02182240507e-05 -8.2024241958e-05 +0.25 0.25 0.25 m 1 1 1 v -0.000135711648533 -3.02182240507e-05 8.2024241958e-05 diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks1_nao.txt.ref b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks1_nao.txt.ref new file mode 100644 index 0000000000..caf41031ba --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks1_nao.txt.ref @@ -0,0 +1,178 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks1_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31964e-01 -7.79031e-01 7.49401e-16 -1.38778e-16 -4.71845e-16 8.32667e-16 -1.11022e-15 3.88578e-16 + 5.36551e-15 9.29812e-16 1.80411e-16 5.62746e-15 6.66134e-16 -5.55603e-01 -4.17914e-01 3.64292e-16 + -2.56739e-16 -1.35308e-16 -4.33681e-18 -1.76074e-16 -7.63278e-16 -3.24090e-15 3.33067e-16 4.57967e-16 + -2.81710e-15 1.38778e-17 +Row 2 + 8.97102e-01 2.63678e-16 -4.16334e-17 -6.24500e-16 8.32667e-16 -6.38378e-16 -5.27356e-16 4.40430e-15 + 1.66533e-16 1.87350e-16 4.36975e-15 2.22045e-16 -4.17914e-01 9.78300e-02 9.31113e-16 -1.14188e-15 + -4.11997e-16 4.27436e-15 -2.68188e-15 -1.66533e-15 -6.99030e-15 9.71445e-17 -1.80411e-16 -6.13812e-15 + -9.22873e-16 +Row 3 + 3.88003e-01 1.04083e-16 1.83881e-16 4.20473e-01 -2.08167e-17 1.04083e-16 3.88578e-16 1.94289e-16 + 3.33067e-16 -6.09844e-17 6.39674e-02 -2.08167e-16 3.05311e-16 -4.12889e-02 -4.68375e-17 -1.26635e-16 + -1.32845e-02 3.12250e-17 8.67362e-18 3.92048e-16 1.73472e-16 -9.71445e-17 1.22848e-16 -1.77608e-01 +Row 4 + 3.88003e-01 -1.28370e-16 -2.28983e-16 4.20473e-01 0.00000e+00 -7.91034e-16 -3.88578e-16 6.39674e-02 + 3.05311e-16 8.04912e-16 -1.66533e-16 -6.66134e-16 3.12250e-17 -4.12889e-02 2.94903e-17 1.82146e-16 + -1.32845e-02 -1.31839e-16 2.11636e-16 7.63278e-17 -1.77608e-01 1.00614e-16 3.46945e-18 +Row 5 + 3.88003e-01 7.63278e-17 -2.08167e-16 4.20473e-01 -5.41234e-16 6.39674e-02 3.33067e-16 0.00000e+00 + 7.21645e-16 -2.91434e-16 4.44089e-16 1.78677e-16 7.11237e-17 -4.12889e-02 1.37043e-16 8.67362e-18 + -1.32845e-02 4.16334e-17 -1.77608e-01 5.89806e-17 -1.04083e-16 1.04083e-17 +Row 6 + 7.68029e-01 3.46945e-17 6.93889e-18 -8.32667e-16 -1.66533e-16 4.44089e-16 -4.79955e-17 3.92224e-02 + 2.08167e-16 6.10623e-16 -1.32845e-02 -1.21431e-16 -6.24500e-17 1.33549e-01 1.74340e-16 -2.35922e-16 + 1.04083e-16 6.93889e-18 8.67362e-17 8.82915e-17 -3.73234e-02 +Row 7 + 7.68029e-01 -2.91434e-16 -8.88178e-16 5.55112e-17 3.92224e-02 1.11022e-15 1.94289e-16 -1.94289e-16 + -9.43690e-16 4.51028e-17 -1.32845e-02 -7.97973e-17 1.83881e-16 1.33549e-01 -6.33174e-17 1.56125e-16 + 7.28584e-17 -3.73234e-02 1.63064e-16 -5.89806e-17 +Row 8 + 7.68029e-01 -2.49800e-16 3.92224e-02 1.66533e-16 8.88178e-16 7.49401e-16 8.32667e-17 -4.44089e-16 + 1.97758e-16 -6.93889e-17 -1.32845e-02 1.17094e-16 4.85723e-17 1.33549e-01 -3.46945e-18 -3.73234e-02 + 1.14492e-16 2.08167e-17 3.81639e-17 +Row 9 + 1.45535e+00 4.16334e-17 6.24500e-17 2.11263e-15 6.38378e-16 3.59963e-15 6.71948e-15 2.42861e-17 + 1.75207e-16 5.89806e-17 1.70003e-16 2.34188e-16 7.02563e-17 -2.96562e-01 -1.17961e-16 2.98372e-16 + 2.28410e-17 2.49800e-16 +Row 10 + 1.40881e+00 -3.66027e-16 -3.60822e-16 2.42861e-16 3.40006e-16 3.33067e-16 1.04083e-16 0.00000e+00 + 1.77608e-01 1.73472e-18 1.73472e-18 3.73234e-02 -9.80119e-17 1.12412e-01 -2.49800e-16 -2.15973e-16 + 4.57967e-16 +Row 11 + 1.40881e+00 1.38778e-17 4.87457e-16 -2.81025e-16 1.94289e-16 1.73472e-17 1.77608e-01 6.93889e-18 + -2.60209e-17 3.73234e-02 9.10730e-17 -1.17094e-16 -1.66533e-16 1.12412e-01 1.83013e-16 -2.77556e-16 +Row 12 + 1.45535e+00 -2.77862e-18 3.47608e-15 6.79577e-15 3.11462e-17 1.28370e-16 -3.81639e-17 7.33030e-17 + 1.78677e-16 -3.29597e-16 -9.95292e-18 1.11022e-16 -6.93889e-17 -2.96562e-01 6.51102e-17 +Row 13 + 1.40881e+00 5.16948e-16 9.71445e-17 1.77608e-01 2.77556e-17 -6.24500e-17 3.73234e-02 -3.55618e-17 + 7.02563e-17 1.39645e-16 -5.48173e-16 2.42861e-16 -4.85770e-17 1.12412e-01 +Row 14 + -3.31964e-01 -7.79031e-01 -2.05239e-16 4.49456e-16 5.50992e-16 -4.30211e-16 -1.66880e-15 -1.64452e-15 + -4.70639e-15 2.08167e-16 3.19189e-16 -4.59482e-15 -7.21645e-16 +Row 15 + 8.97102e-01 -5.03070e-16 1.00614e-16 1.28370e-16 9.72313e-16 -2.22912e-16 -2.48065e-16 -4.16214e-15 + 6.80012e-16 5.13478e-16 -3.88083e-15 -4.02456e-16 +Row 16 + 3.88003e-01 -1.68268e-16 -1.40513e-16 4.20473e-01 -1.56125e-17 3.46945e-18 1.55258e-16 -5.88939e-16 + -4.68375e-17 -1.56712e-17 -6.39674e-02 +Row 17 + 3.88003e-01 1.02349e-16 -5.20417e-18 4.20473e-01 2.02963e-16 -8.20091e-16 -9.18536e-16 -6.39674e-02 + -4.02456e-16 7.27716e-16 +Row 18 + 3.88003e-01 -1.47451e-16 2.70617e-16 4.20473e-01 -7.09936e-16 -6.39674e-02 -4.41487e-16 3.61690e-16 + 8.67362e-16 +Row 19 + 7.68029e-01 5.37764e-17 -1.19696e-16 -1.45804e-15 5.86337e-16 1.73472e-16 2.52742e-17 -3.92224e-02 +Row 20 + 7.68029e-01 2.98372e-16 -1.08247e-15 1.68268e-16 -3.92224e-02 4.98733e-17 -3.50414e-16 +Row 21 + 7.68029e-01 4.68375e-17 -3.92224e-02 3.78170e-16 -4.49727e-16 1.59595e-16 +Row 22 + 1.45535e+00 -3.12250e-17 6.24500e-17 -2.09684e-15 -9.33281e-16 +Row 23 + 1.40881e+00 6.93889e-18 -3.85109e-16 -3.05311e-16 +Row 24 + 1.40881e+00 -1.21431e-16 -3.08781e-16 +Row 25 + 1.45535e+00 -8.85787e-17 +Row 26 + 1.40881e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hks1_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31972e-01 -7.79028e-01 7.14816e-04 1.18601e-03 2.55992e-04 6.52117e-04 1.08206e-03 2.33033e-04 + 1.28836e-06 -4.54117e-04 -2.04375e-03 -6.71035e-06 -1.23501e-03 -5.55607e-01 -4.17914e-01 -2.74459e-04 + -4.55894e-04 -9.72065e-05 -3.70140e-04 -6.13947e-04 -1.32724e-04 3.16148e-07 -1.41443e-04 -6.41178e-04 + -1.66935e-06 -3.87211e-04 +Row 2 + 8.97124e-01 4.13300e-04 6.86167e-04 1.47246e-04 7.09641e-04 1.17531e-03 2.58553e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22457e-06 -1.67368e-03 -4.17914e-01 9.78582e-02 -8.06321e-04 -1.33802e-03 + -2.88550e-04 -9.84118e-04 -1.63254e-03 -3.52887e-04 2.08192e-06 -1.13650e-03 -5.12933e-03 -1.07334e-05 + -3.09869e-03 +Row 3 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25482e-04 5.71666e-04 -3.25354e-04 -1.17980e-03 + -2.58013e-04 9.05126e-08 6.39657e-02 2.74459e-04 8.06321e-04 -4.12849e-02 8.86212e-05 3.86770e-04 + -1.32862e-02 -1.30746e-05 -5.42741e-05 -7.55665e-04 -2.76819e-05 -1.60986e-06 7.93547e-09 -1.77600e-01 +Row 4 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 2.70808e-04 -7.11923e-04 6.39647e-02 + -4.68990e-04 -2.58010e-04 4.55894e-04 1.33802e-03 8.86212e-05 -4.12828e-02 2.34402e-04 -1.30004e-05 + -1.32865e-02 -3.30227e-05 6.24888e-04 -1.55625e-05 -1.77599e-01 -1.08234e-03 -1.59498e-06 +Row 5 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 5.62924e-05 6.39661e-02 -7.11918e-04 9.75467e-05 + -1.17979e-03 9.72065e-05 2.88550e-04 3.86770e-04 2.34402e-04 -4.12859e-02 -5.43036e-05 -3.31051e-05 + -1.32860e-02 1.39674e-04 -1.77601e-01 -1.56254e-05 2.41914e-04 -2.77144e-05 +Row 6 + 7.68024e-01 1.19285e-04 5.38466e-04 -3.73100e-04 -8.94456e-04 -1.92126e-04 -3.43987e-07 3.92231e-02 + 3.70140e-04 9.84118e-04 -1.32862e-02 -1.30004e-05 -5.43036e-05 1.33536e-01 -1.55736e-04 -6.60403e-04 + -2.46721e-04 1.23777e-03 2.77104e-04 -1.10668e-07 -3.73205e-02 +Row 7 + 7.68027e-01 3.25302e-04 3.10059e-04 -5.39006e-04 3.92242e-02 -5.37339e-04 -1.92200e-04 6.13947e-04 + 1.63254e-03 -1.30746e-05 -1.32865e-02 -3.31051e-05 -1.55736e-04 1.33532e-01 -4.01356e-04 2.03797e-04 + 7.48369e-04 -3.73229e-02 -3.53085e-04 2.76976e-04 +Row 8 + 7.68023e-01 6.53686e-05 3.92226e-02 -5.38769e-04 1.13042e-04 -8.94298e-04 1.32724e-04 3.52887e-04 + -5.42741e-05 -3.30227e-05 -1.32860e-02 -6.60403e-04 -4.01356e-04 1.33538e-01 4.59822e-05 -3.73193e-02 + 7.48582e-04 7.95927e-05 1.23788e-03 +Row 9 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65601e-06 -8.39995e-04 3.16148e-07 2.08192e-06 7.55665e-04 + -6.24888e-04 -1.39674e-04 2.46721e-04 -2.03797e-04 -4.59822e-05 -2.96551e-01 -5.05300e-05 -2.09671e-04 + -1.31286e-05 2.55348e-04 +Row 10 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 -1.41443e-04 -1.13650e-03 2.76819e-05 1.55625e-05 + 1.77601e-01 -1.23777e-03 -7.48369e-04 3.73193e-02 -5.05300e-05 1.12402e-01 8.72776e-04 -8.75043e-05 + 1.44211e-03 +Row 11 + 1.40880e+00 -1.20483e-03 1.65486e-04 -6.41178e-04 -5.12933e-03 1.60986e-06 1.77599e-01 1.56254e-05 + -2.77104e-04 3.73229e-02 -7.48582e-04 -2.09671e-04 8.72776e-04 1.12414e-01 3.63226e-04 3.26091e-04 +Row 12 + 1.45534e+00 -1.93980e-08 -1.66935e-06 -1.07334e-05 -7.93547e-09 1.08234e-03 -2.41914e-04 1.10668e-07 + 3.53085e-04 -7.95927e-05 -1.31286e-05 -8.75043e-05 3.63226e-04 -2.96546e-01 6.31527e-08 +Row 13 + 1.40881e+00 -3.87211e-04 -3.09869e-03 1.77600e-01 1.59498e-06 2.77144e-05 3.73205e-02 -2.76976e-04 + -1.23788e-03 2.55348e-04 1.44211e-03 3.26091e-04 6.31527e-08 1.12406e-01 +Row 14 + -3.31972e-01 -7.79028e-01 -7.14816e-04 -1.18601e-03 -2.55992e-04 -6.52117e-04 -1.08206e-03 -2.33033e-04 + 1.28836e-06 -4.54117e-04 -2.04375e-03 -6.71035e-06 -1.23501e-03 +Row 15 + 8.97124e-01 -4.13300e-04 -6.86167e-04 -1.47246e-04 -7.09641e-04 -1.17531e-03 -2.58553e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22457e-06 -1.67368e-03 +Row 16 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25482e-04 5.71666e-04 3.25354e-04 1.17980e-03 + 2.58013e-04 -9.05126e-08 -6.39657e-02 +Row 17 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 -2.70808e-04 7.11923e-04 -6.39647e-02 + 4.68990e-04 2.58010e-04 +Row 18 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 -5.62924e-05 -6.39661e-02 7.11918e-04 -9.75467e-05 + 1.17979e-03 +Row 19 + 7.68024e-01 1.19285e-04 5.38466e-04 3.73100e-04 8.94456e-04 1.92126e-04 3.43987e-07 -3.92231e-02 +Row 20 + 7.68027e-01 3.25302e-04 -3.10059e-04 5.39006e-04 -3.92242e-02 5.37339e-04 1.92200e-04 +Row 21 + 7.68023e-01 -6.53686e-05 -3.92226e-02 5.38769e-04 -1.13042e-04 8.94298e-04 +Row 22 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65601e-06 -8.39995e-04 +Row 23 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 +Row 24 + 1.40880e+00 -1.20483e-03 1.65486e-04 +Row 25 + 1.45534e+00 -1.93980e-08 +Row 26 + 1.40881e+00 diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks2_nao.txt.ref b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks2_nao.txt.ref new file mode 100644 index 0000000000..a61ec33508 --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/hks2_nao.txt.ref @@ -0,0 +1,178 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hks2_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31964e-01 -7.79031e-01 -8.32667e-17 1.66533e-16 7.49401e-16 -3.88578e-16 6.10623e-16 -2.22045e-16 + -3.61572e-15 6.10623e-16 7.63278e-16 -5.94430e-15 -7.07767e-16 -5.55603e-01 -4.17914e-01 1.73472e-16 + -9.02056e-17 -2.18575e-16 5.27356e-16 1.95156e-16 -1.43115e-16 2.49215e-15 -3.33067e-16 1.52656e-16 + 4.65652e-15 1.38778e-17 +Row 2 + 8.97102e-01 -6.66134e-16 4.44089e-16 2.22045e-16 -2.22045e-16 5.55112e-17 -3.33067e-16 -3.03169e-15 + -4.78784e-16 3.40006e-16 -5.08615e-15 1.24900e-16 -4.17914e-01 9.78300e-02 -6.60496e-16 1.24336e-15 + 1.32056e-15 -1.01308e-15 9.95731e-16 -1.63064e-16 5.05095e-15 2.63678e-16 -1.31839e-16 8.90029e-15 + 3.74700e-16 +Row 3 + 3.88003e-01 -1.73472e-17 -3.46945e-18 4.20473e-01 4.02456e-16 2.08167e-16 8.32667e-17 2.22045e-16 + 4.99600e-16 1.60750e-16 6.39674e-02 3.05311e-16 -8.32667e-16 -4.12889e-02 2.22045e-16 1.90820e-16 + -1.32845e-02 1.43982e-16 2.41127e-16 -2.08167e-17 6.24500e-17 -2.46331e-16 -1.10038e-16 -1.77608e-01 +Row 4 + 3.88003e-01 -4.51028e-17 -1.80411e-16 4.20473e-01 2.49800e-16 5.41234e-16 3.88578e-16 6.39674e-02 + -2.22045e-16 -6.93889e-16 3.60822e-16 1.27676e-15 -8.67362e-18 -4.12889e-02 1.42247e-16 -1.25767e-16 + -1.32845e-02 -8.67362e-18 -3.45210e-16 -1.90820e-16 -1.77608e-01 5.55112e-17 -2.02963e-16 +Row 5 + 3.88003e-01 -4.85723e-17 5.82867e-16 4.20473e-01 1.38778e-17 6.39674e-02 -2.77556e-17 1.66533e-16 + -4.99600e-16 5.13478e-16 2.77556e-16 -1.80411e-16 3.29597e-17 -4.12889e-02 -2.73219e-16 -9.97466e-17 + -1.32845e-02 -1.30104e-16 -1.77608e-01 -8.84709e-17 7.97973e-17 1.16226e-16 +Row 6 + 7.68029e-01 8.32667e-17 1.24900e-16 1.66533e-16 2.77556e-17 -9.15934e-16 1.49227e-16 3.92224e-02 + -3.33067e-16 1.05471e-15 -1.32845e-02 1.83881e-16 3.22659e-16 1.33549e-01 -4.33681e-17 1.19696e-16 + -1.38778e-17 4.51028e-17 -3.60822e-16 -5.00242e-19 -3.73234e-02 +Row 7 + 7.68029e-01 2.84495e-16 2.49800e-16 1.11022e-16 3.92224e-02 -1.11022e-16 -4.71845e-16 5.13478e-16 + -2.77556e-16 -7.97973e-17 -1.32845e-02 4.16334e-17 2.94903e-17 1.33549e-01 3.64292e-17 -2.53270e-16 + -9.71445e-17 -3.73234e-02 -6.93889e-18 -2.70617e-16 +Row 8 + 7.68029e-01 3.05311e-16 3.92224e-02 1.94289e-16 -2.77556e-16 -1.74860e-15 2.49800e-16 6.66134e-16 + -5.89806e-17 -1.35308e-16 -1.32845e-02 -1.03216e-16 -1.18829e-16 1.33549e-01 -7.63278e-17 -3.73234e-02 + -8.67362e-17 2.08167e-17 5.55112e-17 +Row 9 + 1.45535e+00 7.63278e-17 -8.32667e-17 -2.49849e-15 1.52656e-16 -2.12639e-15 -4.72244e-15 -5.55112e-17 + -3.40006e-16 -1.04083e-16 -1.17094e-16 -2.50668e-16 -1.40079e-16 -2.96562e-01 -1.38778e-17 -1.94289e-16 + -3.11723e-17 2.77556e-17 +Row 10 + 1.40881e+00 1.56125e-16 -3.88578e-16 -1.09288e-16 1.38778e-17 3.33067e-16 1.38778e-17 -6.93889e-17 + 1.77608e-01 -9.97466e-17 -1.34441e-16 3.73234e-02 6.02816e-17 1.12412e-01 -1.73472e-16 1.51788e-16 + -6.17562e-16 +Row 11 + 1.40881e+00 -1.52656e-16 -1.12757e-16 6.24500e-17 4.16334e-16 -3.12250e-17 1.77608e-01 6.93889e-18 + 1.35308e-16 3.73234e-02 -1.21431e-16 2.99240e-17 9.71445e-17 1.12412e-01 -2.32453e-16 -2.49800e-16 +Row 12 + 1.45535e+00 -2.14484e-18 -4.00842e-15 -8.15517e-15 -6.61672e-17 1.45717e-16 -6.93889e-17 -4.91598e-17 + -6.67869e-17 1.30972e-16 -8.04433e-17 -1.38778e-17 2.08167e-16 -2.96562e-01 -8.27256e-17 +Row 13 + 1.40881e+00 3.92048e-16 -3.19189e-16 1.77608e-01 5.55112e-17 -5.55112e-17 3.73234e-02 1.83013e-16 + -2.60209e-17 2.53270e-16 6.93889e-16 6.80012e-16 1.16037e-16 1.12412e-01 +Row 14 + -3.31964e-01 -7.79031e-01 4.72333e-16 -5.62321e-16 -4.24953e-16 -2.79290e-16 9.36751e-17 -3.72966e-16 + 3.87623e-15 -2.22045e-16 -2.49800e-16 6.76799e-15 1.11022e-15 +Row 15 + 8.97102e-01 3.33067e-16 1.11022e-16 5.79398e-16 2.32453e-16 2.15106e-16 -3.82507e-16 3.26546e-15 + -7.49401e-16 -9.43690e-16 5.65082e-15 5.41234e-16 +Row 16 + 3.88003e-01 3.67761e-16 8.32667e-17 4.20473e-01 -1.04083e-16 7.45931e-17 7.23380e-16 -5.18682e-16 + -4.90059e-16 1.85559e-16 -6.39674e-02 +Row 17 + 3.88003e-01 -1.04083e-16 -1.94289e-16 4.20473e-01 -2.27249e-16 6.29705e-16 2.74086e-16 -6.39674e-02 + -3.20056e-16 -8.06646e-17 +Row 18 + 3.88003e-01 -8.50015e-17 5.55112e-17 4.20473e-01 3.80338e-16 -6.39674e-02 1.97758e-16 2.19443e-16 + -8.46545e-16 +Row 19 + 7.68029e-01 7.97973e-17 -8.32667e-17 2.53270e-16 5.03070e-16 9.54098e-17 2.15085e-16 -3.92224e-02 +Row 20 + 7.68029e-01 -7.33788e-16 8.69530e-16 -2.32453e-16 -3.92224e-02 -3.41741e-16 -4.83988e-16 +Row 21 + 7.68029e-01 6.40113e-16 -3.92224e-02 7.28584e-17 9.88792e-16 -1.18482e-15 +Row 22 + 1.45535e+00 2.61943e-16 3.10516e-16 2.59965e-15 2.70617e-16 +Row 23 + 1.40881e+00 -2.08167e-16 2.11636e-16 2.70617e-16 +Row 24 + 1.40881e+00 -2.77556e-17 5.27356e-16 +Row 25 + 1.45535e+00 3.04353e-17 +Row 26 + 1.40881e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/hks2_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + -3.31972e-01 -7.79028e-01 7.14816e-04 1.18601e-03 2.55992e-04 6.52117e-04 1.08206e-03 2.33033e-04 + 1.28840e-06 -4.54117e-04 -2.04375e-03 -6.71053e-06 -1.23501e-03 -5.55607e-01 -4.17914e-01 -2.74459e-04 + -4.55894e-04 -9.72065e-05 -3.70140e-04 -6.13947e-04 -1.32724e-04 3.16157e-07 -1.41443e-04 -6.41178e-04 + -1.66939e-06 -3.87212e-04 +Row 2 + 8.97124e-01 4.13300e-04 6.86166e-04 1.47246e-04 7.09641e-04 1.17531e-03 2.58552e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22459e-06 -1.67368e-03 -4.17914e-01 9.78582e-02 -8.06321e-04 -1.33802e-03 + -2.88550e-04 -9.84118e-04 -1.63254e-03 -3.52887e-04 2.08197e-06 -1.13650e-03 -5.12933e-03 -1.07336e-05 + -3.09869e-03 +Row 3 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25483e-04 5.71666e-04 -3.25354e-04 -1.17980e-03 + -2.58013e-04 9.05122e-08 6.39657e-02 2.74459e-04 8.06321e-04 -4.12849e-02 8.86212e-05 3.86770e-04 + -1.32862e-02 -1.30746e-05 -5.42741e-05 -7.55665e-04 -2.76819e-05 -1.60987e-06 7.93546e-09 -1.77600e-01 +Row 4 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 2.70808e-04 -7.11923e-04 6.39647e-02 + -4.68990e-04 -2.58010e-04 4.55894e-04 1.33802e-03 8.86212e-05 -4.12828e-02 2.34402e-04 -1.30004e-05 + -1.32865e-02 -3.30227e-05 6.24888e-04 -1.55625e-05 -1.77599e-01 -1.08234e-03 -1.59499e-06 +Row 5 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 5.62924e-05 6.39661e-02 -7.11918e-04 9.75468e-05 + -1.17979e-03 9.72065e-05 2.88550e-04 3.86770e-04 2.34402e-04 -4.12859e-02 -5.43036e-05 -3.31051e-05 + -1.32860e-02 1.39674e-04 -1.77601e-01 -1.56255e-05 2.41914e-04 -2.77144e-05 +Row 6 + 7.68024e-01 1.19285e-04 5.38466e-04 -3.73100e-04 -8.94456e-04 -1.92126e-04 -3.43987e-07 3.92231e-02 + 3.70140e-04 9.84118e-04 -1.32862e-02 -1.30004e-05 -5.43036e-05 1.33536e-01 -1.55736e-04 -6.60403e-04 + -2.46721e-04 1.23777e-03 2.77104e-04 -1.10668e-07 -3.73205e-02 +Row 7 + 7.68027e-01 3.25302e-04 3.10060e-04 -5.39006e-04 3.92242e-02 -5.37340e-04 -1.92200e-04 6.13947e-04 + 1.63254e-03 -1.30746e-05 -1.32865e-02 -3.31051e-05 -1.55736e-04 1.33532e-01 -4.01356e-04 2.03797e-04 + 7.48369e-04 -3.73229e-02 -3.53085e-04 2.76976e-04 +Row 8 + 7.68023e-01 6.53687e-05 3.92226e-02 -5.38769e-04 1.13042e-04 -8.94297e-04 1.32724e-04 3.52887e-04 + -5.42741e-05 -3.30227e-05 -1.32860e-02 -6.60403e-04 -4.01356e-04 1.33538e-01 4.59822e-05 -3.73193e-02 + 7.48582e-04 7.95927e-05 1.23788e-03 +Row 9 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65609e-06 -8.39995e-04 3.16157e-07 2.08197e-06 7.55665e-04 + -6.24888e-04 -1.39674e-04 2.46721e-04 -2.03797e-04 -4.59822e-05 -2.96551e-01 -5.05301e-05 -2.09671e-04 + -1.31286e-05 2.55348e-04 +Row 10 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 -1.41443e-04 -1.13650e-03 2.76819e-05 1.55625e-05 + 1.77601e-01 -1.23777e-03 -7.48369e-04 3.73193e-02 -5.05301e-05 1.12402e-01 8.72775e-04 -8.75043e-05 + 1.44211e-03 +Row 11 + 1.40880e+00 -1.20483e-03 1.65486e-04 -6.41178e-04 -5.12933e-03 1.60987e-06 1.77599e-01 1.56255e-05 + -2.77104e-04 3.73229e-02 -7.48582e-04 -2.09671e-04 8.72775e-04 1.12414e-01 3.63226e-04 3.26091e-04 +Row 12 + 1.45534e+00 -1.93977e-08 -1.66939e-06 -1.07336e-05 -7.93546e-09 1.08234e-03 -2.41914e-04 1.10668e-07 + 3.53085e-04 -7.95927e-05 -1.31286e-05 -8.75043e-05 3.63226e-04 -2.96546e-01 6.31525e-08 +Row 13 + 1.40881e+00 -3.87212e-04 -3.09869e-03 1.77600e-01 1.59499e-06 2.77144e-05 3.73205e-02 -2.76976e-04 + -1.23788e-03 2.55348e-04 1.44211e-03 3.26091e-04 6.31525e-08 1.12406e-01 +Row 14 + -3.31972e-01 -7.79028e-01 -7.14816e-04 -1.18601e-03 -2.55992e-04 -6.52117e-04 -1.08206e-03 -2.33033e-04 + 1.28840e-06 -4.54117e-04 -2.04375e-03 -6.71053e-06 -1.23501e-03 +Row 15 + 8.97124e-01 -4.13300e-04 -6.86166e-04 -1.47246e-04 -7.09641e-04 -1.17531e-03 -2.58552e-04 1.75433e-06 + -6.22688e-04 -2.76647e-03 -9.22459e-06 -1.67368e-03 +Row 16 + 3.87997e-01 1.40062e-04 6.34089e-04 4.20466e-01 1.25483e-04 5.71666e-04 3.25354e-04 1.17980e-03 + 2.58013e-04 -9.05122e-08 -6.39657e-02 +Row 17 + 3.88000e-01 3.82956e-04 1.25448e-04 4.20468e-01 3.45051e-04 -2.70808e-04 7.11923e-04 -6.39647e-02 + 4.68990e-04 2.58010e-04 +Row 18 + 3.87995e-01 5.71685e-04 3.45096e-04 4.20465e-01 -5.62924e-05 -6.39661e-02 7.11918e-04 -9.75468e-05 + 1.17979e-03 +Row 19 + 7.68024e-01 1.19285e-04 5.38466e-04 3.73100e-04 8.94456e-04 1.92126e-04 3.43987e-07 -3.92231e-02 +Row 20 + 7.68027e-01 3.25302e-04 -3.10060e-04 5.39006e-04 -3.92242e-02 5.37340e-04 1.92200e-04 +Row 21 + 7.68023e-01 -6.53687e-05 -3.92226e-02 5.38769e-04 -1.13042e-04 8.94297e-04 +Row 22 + 1.45534e+00 1.53190e-04 6.95610e-04 -3.65609e-06 -8.39995e-04 +Row 23 + 1.40881e+00 4.37693e-04 2.65290e-04 7.22287e-04 +Row 24 + 1.40880e+00 -1.20483e-03 1.65486e-04 +Row 25 + 1.45534e+00 -1.93977e-08 +Row 26 + 1.40881e+00 diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/result.ref b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/result.ref new file mode 100644 index 0000000000..4a8cc1a5b6 --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/result.ref @@ -0,0 +1,8 @@ +etotref -196.6304397731159 +etotperatomref -98.3152198866 +totalforceref 0.717564 +totalstressref 1315.352680 +CompareH1_pass 0 +CompareH2_pass 0 +CompareS_pass 0 +totaltimeref 1.35 diff --git a/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/sk_nao.txt.ref b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/sk_nao.txt.ref new file mode 100644 index 0000000000..fe46bb7516 --- /dev/null +++ b/tests/02_NAO_Gamma/006_NO_GO_MD_OHK2/sk_nao.txt.ref @@ -0,0 +1,178 @@ +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + 1.48885e+00 1.85694e+00 1.50298e-17 6.88468e-18 -2.36492e-17 1.00384e-16 4.09828e-17 -4.11861e-17 + 1.20440e-17 -2.12775e-18 9.48677e-20 -3.03848e-17 -6.11897e-18 1.23629e+00 2.25011e+00 1.25400e-16 + 3.90696e-17 -4.36222e-18 -1.23450e-16 -6.48649e-17 6.48861e-17 5.65987e-17 7.06637e-19 8.47965e-18 + 4.95197e-17 2.35825e-17 +Row 2 + 4.31653e+00 7.86589e-17 1.08420e-17 -3.96276e-17 -3.55618e-17 -5.20417e-17 -8.58688e-17 3.03983e-17 + -3.57787e-18 -4.77049e-18 -8.45678e-17 1.40946e-18 2.25011e+00 3.67664e+00 -5.28278e-17 -1.00353e-16 + 1.02837e-16 -2.69262e-16 3.84011e-17 1.30917e-17 -7.82523e-17 1.54296e-17 -3.71339e-18 -1.51241e-16 + -1.15264e-17 +Row 3 + 5.44536e-01 1.10589e-17 -1.03812e-17 5.83149e-01 -2.42861e-17 2.85145e-17 4.43845e-19 7.04731e-19 + -2.53432e-18 5.42101e-19 -5.42101e-20 -1.25400e-16 5.28278e-17 -1.24841e-01 -5.58517e-17 1.37660e-17 + -1.17065e-01 -2.78979e-17 -4.05898e-17 -3.03102e-17 -2.33866e-18 5.04832e-19 -7.17437e-19 -4.82752e-01 +Row 4 + 5.44536e-01 -6.50521e-18 -2.42861e-17 5.83149e-01 8.67362e-19 4.87891e-19 6.48488e-18 -5.42101e-20 + -4.60786e-19 5.83606e-18 -3.90696e-17 1.00353e-16 -5.58517e-17 -1.24841e-01 6.18385e-17 -2.78979e-17 + -1.17065e-01 4.95379e-17 2.29461e-18 1.69457e-17 -4.82752e-01 -1.11861e-17 -1.63689e-18 +Row 5 + 5.44536e-01 2.85145e-17 8.67362e-19 5.83149e-01 -4.84503e-19 -5.42101e-20 1.80249e-18 -1.35525e-18 + -2.48011e-18 4.36222e-18 -1.02837e-16 1.37660e-17 6.18385e-17 -1.24841e-01 -4.05898e-17 4.95379e-17 + -1.17065e-01 4.80776e-18 -4.82752e-01 -8.40765e-18 -1.76522e-17 -8.61433e-19 +Row 6 + 6.96122e-01 4.68375e-17 -5.29091e-17 8.34836e-18 3.14419e-18 -9.05309e-18 2.62919e-18 0.00000e+00 + 1.23450e-16 2.69262e-16 -1.17065e-01 -2.78979e-17 -4.05898e-17 -6.46175e-02 2.56414e-17 1.96241e-17 + 1.85941e-17 -1.39252e-17 -1.35796e-17 1.20617e-18 -4.19177e-01 +Row 7 + 6.96122e-01 -7.80626e-18 1.30104e-18 3.19840e-18 0.00000e+00 -2.57498e-18 5.48877e-18 6.48649e-17 + -3.84011e-17 -2.78979e-17 -1.17065e-01 4.95379e-17 2.56414e-17 -6.46175e-02 -1.10318e-17 6.36969e-19 + -1.88685e-17 -4.19177e-01 7.40053e-18 1.81858e-17 +Row 8 + 6.96122e-01 -3.21195e-18 0.00000e+00 -1.62630e-18 -4.44523e-18 -2.91379e-18 -6.48861e-17 -1.30917e-17 + -4.05898e-17 4.95379e-17 -1.17065e-01 1.96241e-17 -1.10318e-17 -6.46175e-02 3.91668e-18 -4.19177e-01 + -1.15332e-17 2.62648e-17 -1.16467e-17 +Row 9 + 9.91168e-01 -2.23617e-18 2.94429e-18 4.32444e-17 1.48739e-18 5.65987e-17 -7.82523e-17 3.03102e-17 + -2.29461e-18 -4.80776e-18 -1.85941e-17 -6.36969e-19 -3.91668e-18 -5.10937e-01 -7.31921e-18 6.99310e-18 + -6.37714e-17 -1.47968e-17 +Row 10 + 1.13701e+00 -2.29038e-18 -2.98156e-19 -3.06626e-19 7.06637e-19 1.54296e-17 2.33866e-18 -1.69457e-17 + 4.82752e-01 1.39252e-17 1.88685e-17 4.19177e-01 -7.31921e-18 1.32237e-01 1.45266e-17 1.31640e-17 + -5.73399e-18 +Row 11 + 1.13701e+00 -9.04631e-19 -2.79182e-18 8.47965e-18 -3.71339e-18 -5.04832e-19 4.82752e-01 8.40765e-18 + 1.35796e-17 4.19177e-01 1.15332e-17 6.99310e-18 1.45266e-17 1.32237e-01 1.70262e-17 -6.55604e-19 +Row 12 + 9.91168e-01 2.16091e-20 4.95197e-17 -1.51241e-16 7.17437e-19 1.11861e-17 1.76522e-17 -1.20617e-18 + -7.40053e-18 -2.62648e-17 -6.37714e-17 1.31640e-17 1.70262e-17 -5.10937e-01 -2.84074e-19 +Row 13 + 1.13701e+00 2.35825e-17 -1.15264e-17 4.82752e-01 1.63689e-18 8.61433e-19 4.19177e-01 -1.81858e-17 + 1.16467e-17 -1.47968e-17 -5.73399e-18 -6.55604e-19 -2.84074e-19 1.32237e-01 +Row 14 + 1.48885e+00 1.85694e+00 1.50298e-17 6.88468e-18 -2.36492e-17 1.00384e-16 4.09828e-17 -4.11861e-17 + 1.20440e-17 -2.12775e-18 9.48677e-20 -3.03848e-17 -6.11897e-18 +Row 15 + 4.31653e+00 7.86589e-17 1.08420e-17 -3.96276e-17 -3.55618e-17 -5.20417e-17 -8.58688e-17 3.03983e-17 + -3.57787e-18 -4.77049e-18 -8.45678e-17 1.40946e-18 +Row 16 + 5.44536e-01 1.10589e-17 -1.03812e-17 5.83149e-01 -2.42861e-17 2.85145e-17 4.43845e-19 7.04731e-19 + -2.53432e-18 5.42101e-19 -5.42101e-20 +Row 17 + 5.44536e-01 -6.50521e-18 -2.42861e-17 5.83149e-01 8.67362e-19 4.87891e-19 6.48488e-18 -5.42101e-20 + -4.60786e-19 5.83606e-18 +Row 18 + 5.44536e-01 2.85145e-17 8.67362e-19 5.83149e-01 -4.84503e-19 -5.42101e-20 1.80249e-18 -1.35525e-18 + -2.48011e-18 +Row 19 + 6.96122e-01 4.68375e-17 -5.29091e-17 8.34836e-18 3.14419e-18 -9.05309e-18 2.62919e-18 0.00000e+00 +Row 20 + 6.96122e-01 -7.80626e-18 1.30104e-18 3.19840e-18 0.00000e+00 -2.57498e-18 5.48877e-18 +Row 21 + 6.96122e-01 -3.21195e-18 0.00000e+00 -1.62630e-18 -4.44523e-18 -2.91379e-18 +Row 22 + 9.91168e-01 -2.23617e-18 2.94429e-18 4.32444e-17 1.48739e-18 +Row 23 + 1.13701e+00 -2.29038e-18 -2.98156e-19 -3.06626e-19 +Row 24 + 1.13701e+00 -9.04631e-19 -2.79182e-18 +Row 25 + 9.91168e-01 2.16091e-20 +Row 26 + 1.13701e+00 +#------------------------------------------------------------------------ +# ionic step 2 +# filename OUT.autotest/sk_nao.txt +# gamma only 1 +# rows 26 +# columns 26 +#------------------------------------------------------------------------ +Row 1 + 1.48885e+00 1.85694e+00 -1.34848e-17 6.07695e-17 4.77456e-17 -6.35478e-17 -2.30501e-16 -1.85385e-16 + -3.56855e-18 -5.48877e-18 3.51010e-18 -3.21059e-17 2.27208e-17 1.23629e+00 2.25011e+00 3.55178e-04 + 5.90487e-04 1.24492e-04 4.28563e-04 7.11768e-04 1.51827e-04 -1.15453e-06 5.48551e-04 2.46587e-03 + 5.95842e-06 1.49023e-03 +Row 2 + 4.31653e+00 -3.84350e-17 5.24754e-17 1.42952e-16 -1.47451e-17 9.71445e-17 -6.67869e-17 2.36763e-17 + -4.55365e-18 1.10589e-17 -7.47015e-17 4.55365e-18 2.25011e+00 3.67665e+00 -4.79392e-04 -7.97562e-04 + -1.66751e-04 -5.39661e-04 -8.97294e-04 -1.88913e-04 1.57125e-06 -8.79829e-04 -3.96682e-03 -8.10910e-06 + -2.39668e-03 +Row 3 + 5.44536e-01 -8.45678e-18 2.21448e-17 5.83149e-01 -3.81639e-17 -1.65883e-17 1.12147e-18 9.05309e-17 + 2.60344e-17 5.96311e-19 6.72205e-18 -3.55178e-04 4.79392e-04 -1.24838e-01 5.48802e-04 2.46888e-03 + -1.17064e-01 4.87005e-04 2.19831e-03 -1.79153e-03 4.75245e-04 1.17592e-04 -1.72936e-08 -4.82737e-01 +Row 4 + 5.44536e-01 9.12898e-17 -3.81639e-17 5.83149e-01 -7.37257e-17 6.27753e-17 1.33154e-17 6.83047e-18 + -7.58942e-18 -4.59685e-17 -5.90487e-04 7.97562e-04 5.48802e-04 -1.24830e-01 1.49195e-03 4.87005e-04 + -1.17055e-01 1.32804e-03 1.48203e-03 2.90121e-04 -4.82737e-01 -2.56697e-03 1.17583e-04 +Row 5 + 5.44536e-01 -1.65883e-17 -7.37257e-17 5.83149e-01 1.37999e-17 6.83047e-18 1.85670e-18 -3.42676e-17 + -4.06440e-17 -1.24492e-04 1.66751e-04 2.46888e-03 1.49195e-03 -1.24842e-01 2.19831e-03 1.32804e-03 + -1.17068e-01 3.30013e-04 -4.82737e-01 2.90156e-04 5.71591e-04 4.75264e-04 +Row 6 + 6.96122e-01 3.29597e-17 4.07660e-17 1.84314e-18 -1.48536e-17 -4.14707e-17 2.79182e-18 -9.54098e-18 + -4.28563e-04 5.39661e-04 -1.17064e-01 4.87005e-04 2.19831e-03 -6.46215e-02 4.09418e-04 1.86883e-03 + -1.79747e-03 1.26928e-03 2.91200e-04 -4.08999e-08 -4.19167e-01 +Row 7 + 6.96122e-01 3.46945e-17 -1.02240e-16 -2.76472e-18 -9.54098e-18 4.69731e-17 -2.11419e-18 -7.11768e-04 + 8.97294e-04 4.87005e-04 -1.17055e-01 1.32804e-03 4.09418e-04 -6.46140e-02 1.12787e-03 1.48692e-03 + 7.69230e-04 -4.19167e-01 -2.57547e-03 2.91180e-04 +Row 8 + 6.96122e-01 -1.24277e-17 -9.54098e-18 -1.19262e-18 4.21484e-17 1.01820e-16 -1.51827e-04 1.88913e-04 + 2.19831e-03 1.32804e-03 -1.17068e-01 1.86883e-03 1.12787e-03 -6.46252e-02 3.31113e-04 -4.19167e-01 + 7.69312e-04 5.73485e-04 1.26932e-03 +Row 9 + 9.91168e-01 -7.45389e-19 3.76083e-19 8.49591e-17 3.33155e-17 -1.15453e-06 1.57125e-06 1.79153e-03 + -1.48203e-03 -3.30013e-04 1.79747e-03 -1.48692e-03 -3.31113e-04 -5.10922e-01 -6.05774e-06 -1.33026e-06 + -1.76263e-05 4.43587e-06 +Row 10 + 1.13701e+00 1.31053e-17 -7.51826e-18 -8.62110e-18 5.48551e-04 -8.79829e-04 -4.75245e-04 -2.90121e-04 + 4.82737e-01 -1.26928e-03 -7.69230e-04 4.19167e-01 -6.05774e-06 1.32221e-01 2.17786e-03 -1.04671e-05 + 3.60087e-03 +Row 11 + 1.13701e+00 -1.09979e-17 5.71917e-18 2.46587e-03 -3.96682e-03 -1.17592e-04 4.82737e-01 -2.90156e-04 + -2.91200e-04 4.19167e-01 -7.69312e-04 -1.33026e-06 2.17786e-03 1.32237e-01 2.36050e-06 8.08017e-04 +Row 12 + 9.91168e-01 -6.89463e-19 5.95842e-06 -8.10910e-06 1.72936e-08 2.56697e-03 -5.71591e-04 4.08999e-08 + 2.57547e-03 -5.73485e-04 -1.76263e-05 -1.04671e-05 2.36050e-06 -5.10916e-01 5.13066e-08 +Row 13 + 1.13701e+00 1.49023e-03 -2.39668e-03 4.82737e-01 -1.17583e-04 -4.75264e-04 4.19167e-01 -2.91180e-04 + -1.26932e-03 4.43587e-06 3.60087e-03 8.08017e-04 5.13066e-08 1.32226e-01 +Row 14 + 1.48885e+00 1.85694e+00 -1.51504e-16 8.97177e-17 1.28464e-16 2.93805e-16 -1.79327e-16 -2.05334e-16 + -1.91540e-17 -9.01243e-18 -1.37152e-17 -4.08151e-17 -5.02799e-18 +Row 15 + 4.31653e+00 -1.13028e-16 7.37257e-18 3.97360e-17 -1.74340e-16 6.59195e-17 -2.16840e-17 -2.51128e-17 + -4.77049e-18 -2.64545e-17 -1.05628e-16 -4.39102e-18 +Row 16 + 5.44536e-01 3.64292e-17 -1.34170e-17 5.83149e-01 3.46945e-17 1.46476e-16 2.57600e-17 4.88433e-17 + 4.56585e-17 -2.01458e-17 -1.87838e-17 +Row 17 + 5.44536e-01 -1.85399e-17 3.46945e-17 5.83149e-01 -4.77049e-18 2.44488e-17 -3.18417e-17 -1.87296e-17 + -4.21822e-17 3.01425e-17 +Row 18 + 5.44536e-01 1.46476e-16 -4.77049e-18 5.83149e-01 2.34764e-17 -1.87296e-17 -1.25361e-17 4.38018e-17 + 2.53907e-17 +Row 19 + 6.96122e-01 8.84709e-17 -1.01481e-16 -7.54605e-17 6.78711e-17 6.26127e-17 2.30664e-17 2.74303e-17 +Row 20 + 6.96122e-01 -5.03070e-17 -5.96311e-17 -3.73779e-17 2.72135e-17 8.47846e-17 2.59124e-17 +Row 21 + 6.96122e-01 -5.05916e-17 2.72135e-17 -8.40257e-17 -9.99363e-17 5.90755e-17 +Row 22 + 9.91168e-01 4.06305e-17 3.54907e-17 3.79539e-17 1.84585e-17 +Row 23 + 1.13701e+00 1.26987e-17 1.01881e-17 1.52991e-17 +Row 24 + 1.13701e+00 1.98782e-17 -3.22279e-17 +Row 25 + 9.91168e-01 3.71455e-20 +Row 26 + 1.13701e+00 diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/hk_nao.txt.ref b/tests/02_NAO_Gamma/006_NO_GO_OH/hk_nao.txt.ref deleted file mode 100644 index 15755a4b37..0000000000 --- a/tests/02_NAO_Gamma/006_NO_GO_OH/hk_nao.txt.ref +++ /dev/null @@ -1,26 +0,0 @@ -26 -0.65628 -0.0050548 -2.3592e-16 3.3304e-16 -2.7756e-16 -1.9429e-16 1.3878e-17 2.7755e-16 2.7783e-17 1.1102e-16 -1.9429e-16 4.6488e-16 3.3307e-16 -0.046491 -0.16408 -2.8189e-18 2.3852e-18 -3.0358e-18 -5.2042e-18 -6.5052e-17 -3.4694e-18 -7.5894e-19 -1.301e-18 -2.5479e-18 2.4215e-18 1.0842e-18 - 0.46098 1.0407e-17 -1.5916e-16 -6.9389e-18 2.0123e-16 -2.0036e-16 -8.6736e-17 -3.8001e-17 7.6328e-17 5.5516e-17 -1.2337e-16 -1.3184e-16 -0.16467 0.013578 3.2526e-18 3.6863e-18 -2.5804e-17 -3.1008e-17 -2.6455e-17 2.3636e-17 7.3014e-18 -1.4095e-18 -6.9389e-18 1.5881e-17 -8.6736e-18 - -0.15165 1.3878e-17 1.5265e-16 0.014221 1.1102e-16 -1.2837e-16 -6.8001e-16 3.3567e-16 -2.498e-16 3.6429e-17 0.00099793 3.3068e-18 -1.0192e-17 0.035773 -2.1684e-19 -9.9747e-18 -0.025158 1.7347e-18 3.1659e-17 8.2128e-18 -5.421e-18 -2.06e-18 1.6424e-18 0.023986 - -0.15165 5.5511e-17 1.1102e-16 0.014221 -1.6654e-16 -1.249e-16 -2.6368e-16 0.00099793 5.8287e-16 5.5511e-17 3.5508e-18 -1.2577e-17 -2.1684e-19 0.035773 4.3368e-19 -2.6021e-18 -0.025158 6.0715e-18 -2.1413e-18 3.4694e-18 0.023986 -1.0842e-18 -6.0715e-18 - -0.15165 -5.8982e-17 -1.1103e-16 0.014221 1.8735e-16 0.00099793 4.8572e-17 -1.1102e-16 5.9328e-16 4.7976e-18 1.8865e-17 1.1059e-17 2.1684e-18 0.035773 -2.1684e-18 1.5613e-17 -0.025158 1.0571e-18 0.023986 2.3852e-18 -1.0842e-18 -9.7036e-18 - 0.6771 2.3592e-16 2.5327e-16 -3.747e-16 2.2638e-16 -6.9389e-17 2.4286e-17 -0.0013395 8.3433e-19 -5.9631e-18 -0.025912 7.0744e-18 1.362e-18 -0.088644 -9.9747e-18 -3.361e-18 -2.6455e-17 8.6736e-18 2.0275e-17 1.44e-18 -0.022421 - 0.6771 -1.6652e-16 -2.2206e-16 -3.5389e-16 -0.0013395 -1.9429e-16 -5.1695e-16 1.2949e-17 -4.12e-17 3.0141e-17 -0.025912 5.2313e-18 -1.301e-17 -0.088644 4.3368e-19 2.7105e-19 -2.6455e-17 -0.022421 -7.481e-18 -7.6978e-18 - 0.6771 2.7756e-17 -0.0013395 -1.6653e-16 -1.9429e-16 -4.0072e-16 -1.4501e-17 2.06e-18 -3.0019e-18 -1.3634e-17 -0.025912 -1.0192e-17 1.3661e-17 -0.088644 9.2699e-18 -0.022421 -1.5287e-17 -1.236e-17 1.5287e-17 - 0.75116 9.7145e-17 -5.7246e-17 -3.0535e-16 2.3592e-16 1.1384e-18 1.1818e-17 -4.7705e-18 -3.2526e-18 -3.4694e-18 -2.4286e-17 -3.0358e-18 9.541e-18 0.011353 -8.6736e-19 -1.0842e-18 -2.015e-18 6.5052e-19 - 0.75043 -2.5674e-16 1.3878e-16 -1.4572e-16 3.2526e-18 6.9389e-18 3.5508e-18 -3.1713e-18 -0.023569 -1.0517e-17 4.0115e-18 0.021812 1.7347e-18 -0.020566 4.6756e-19 -1.4095e-18 -3.2153e-18 - 0.75043 -2.3592e-16 2.7062e-16 5.5836e-18 1.1276e-17 3.3881e-18 -0.023569 -4.4181e-18 -6.8305e-18 0.021812 6.3968e-18 3.5101e-18 2.3039e-19 -0.020566 -7.5894e-19 -5.3261e-18 - 0.75116 1.0408e-16 3.1872e-18 2.3749e-17 -1.0029e-18 5.2042e-18 -1.7347e-18 -7.5894e-18 -7.8063e-18 0 -2.1675e-18 -3.1442e-18 1.1926e-18 0.011353 -2.0329e-20 - 0.75043 4.8789e-18 -5.2042e-18 -0.023569 -1.1926e-18 6.2342e-19 0.021812 -8.9989e-18 1.7998e-17 3.1984e-18 -4.4825e-18 -4.6214e-18 2.5157e-19 -0.020566 - -0.65628 -0.0050572 6.206e-16 3.9853e-16 -5.2475e-17 4.1156e-16 -2.0903e-16 -4.6057e-16 2.3009e-16 3.2201e-16 1.6285e-16 5.6809e-16 -2.871e-16 - 0.46096 1.197e-16 1.1926e-16 -4.1633e-17 -4.5103e-17 2.6715e-16 2.498e-16 -7.2981e-17 6.2016e-17 -1.3883e-17 -1.8516e-16 1.7304e-16 - -0.15165 2.6411e-16 9.7579e-17 0.014226 -1.4313e-17 -1.5916e-16 -9.2526e-16 -1.5005e-16 2.4286e-17 9.1533e-18 -0.00099715 - -0.15165 2.125e-16 -6.6355e-17 0.014226 2.4284e-17 -2.4801e-16 1.0322e-16 -0.00099715 3.6895e-16 2.5804e-16 - -0.15165 -1.0278e-16 5.8542e-17 0.014226 4.288e-17 -0.00099715 -6.8088e-17 -3.3589e-16 4.6491e-16 - 0.67708 1.4615e-16 -7.7629e-17 -5.5197e-16 4.5146e-16 4.0289e-16 -2.8899e-17 0.001338 - 0.67708 1.6741e-16 2.0329e-19 -3.1745e-16 0.001338 8.4535e-16 3.6646e-16 - 0.67708 -1.0842e-18 0.001338 -2.6411e-16 -3.9259e-16 2.6541e-16 - 0.75115 1.313e-16 1.2382e-16 6.1314e-17 1.7748e-16 - 0.75043 6.3534e-17 -1.507e-17 -8.8471e-17 - 0.75043 3.9194e-17 -1.4528e-16 - 0.75115 -5.0131e-18 - 0.75043 diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/sk_nao.txt.ref b/tests/02_NAO_Gamma/006_NO_GO_OH/sk_nao.txt.ref deleted file mode 100644 index 5b98bf0dfb..0000000000 --- a/tests/02_NAO_Gamma/006_NO_GO_OH/sk_nao.txt.ref +++ /dev/null @@ -1,26 +0,0 @@ -26 1.0002 0.0018861 0 1.3553e-20 0 0 5.421e-20 0 -2.7105e-20 0 0 2.8292e-20 0 0.046783 0.23535 0 0 0 0 0 0 0 0 0 -1.2075e-18 0 - 1.0205 0 -2.1684e-19 0 0 8.6736e-19 0 -2.1684e-19 0 0 4.2902e-19 0 0.23535 0.60858 0 0 0 0 0 0 0 0 0 -1.5175e-17 0 - 0.99838 0 0 0.0056966 0 0 0 -4.0658e-20 -6.7763e-20 0 0 0 0 -0.083512 0 0 0.14929 0 0 0 0 0 0 -0.041722 - 0.99838 0 0 0.0056966 0 0 0 0 0 0 0 0 0 -0.083512 0 0 0.14929 0 0 0 -0.041722 0 0 - 0.99838 0 0 0.0056966 0 0 0 -1.6941e-21 0 0 0 0 0 -0.083512 0 0 0.14929 0 -0.041722 0 0 0 - 0.98001 0 0 0 5.421e-20 0 0 0 0 0 0.14929 0 0 -0.13051 0 0 0 0 0 0 0.1394 - 0.98001 0 0 0 0 0 0 0 0 0 0.14929 0 0 -0.13051 0 0 0 0.1394 0 0 - 0.98001 0 0 0 6.7763e-21 0 0 0 0 0 0.14929 0 0 -0.13051 0 0.1394 0 0 0 - 1.0001 0 0 -3.942e-20 0 0 0 0 0 0 0 0 0 0.0062994 0 0 -6.1696e-19 0 - 1.0002 0 0 0 0 0 0 0 0.041722 0 0 -0.1394 0 0.0078948 0 0 0 - 1.0002 0 0 0 0 0 0.041722 0 0 -0.1394 0 0 0 0.0078948 0 0 - 1.0001 0 -1.2075e-18 -1.5175e-17 0 0 0 0 0 0 -6.1696e-19 0 0 0.0062994 0 - 1.0002 0 0 0.041722 0 0 -0.1394 0 0 0 0 0 0 0.0078948 - 1.0002 0.0018861 0 1.3553e-20 0 0 5.421e-20 0 -2.7105e-20 0 0 2.8292e-20 0 - 1.0205 0 -2.1684e-19 0 0 8.6736e-19 0 -2.1684e-19 0 0 4.2902e-19 0 - 0.99838 0 0 0.0056966 0 0 0 -4.0658e-20 -6.7763e-20 0 0 - 0.99838 0 0 0.0056966 0 0 0 0 0 0 - 0.99838 0 0 0.0056966 0 0 0 -1.6941e-21 0 - 0.98001 0 0 0 5.421e-20 0 0 0 - 0.98001 0 0 0 0 0 0 - 0.98001 0 0 0 6.7763e-21 0 - 1.0001 0 0 -3.942e-20 0 - 1.0002 0 0 0 - 1.0002 0 0 - 1.0001 0 - 1.0002 \ No newline at end of file diff --git a/tests/02_NAO_Gamma/007_NO_GO_OHR/INPUT b/tests/02_NAO_Gamma/007_NO_GO_OHR/INPUT new file mode 100644 index 0000000000..78862b0e7e --- /dev/null +++ b/tests/02_NAO_Gamma/007_NO_GO_OHR/INPUT @@ -0,0 +1,34 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf + +nbands 6 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +gamma_only 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-8 +scf_nmax 100 + +#Parameters (3.Basis) +basis_type lcao + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 + +out_mat_hs2 1 5 +#Parameters (5.Mixing) +mixing_type broyden +mixing_beta 0.7 +mixing_gg0 1.5 + +ks_solver scalapack_gvx + +bx 2 +by 2 +bz 2 diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/STRU b/tests/02_NAO_Gamma/007_NO_GO_OHR/STRU similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/STRU rename to tests/02_NAO_Gamma/007_NO_GO_OHR/STRU diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/vxc_nao.txt.ref b/tests/02_NAO_Gamma/007_NO_GO_OXC/vxc_nao.txt.ref deleted file mode 100644 index 3e11a37e42..0000000000 --- a/tests/02_NAO_Gamma/007_NO_GO_OXC/vxc_nao.txt.ref +++ /dev/null @@ -1,6 +0,0 @@ -6 -0.684691 -8.83712e-07 1.13515e-16 1.82341e-16 2.58361e-17 3.54064e-17 - -0.71493 -8.00801e-18 2.58871e-17 -5.41766e-17 6.18429e-17 - -0.593224 7.78235e-17 -6.23292e-17 -1.32096e-06 - -0.593224 -8.16693e-17 6.51331e-07 - -0.593224 8.8859e-07 - -0.619565 diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/INPUT b/tests/02_NAO_Gamma/008_NO_GO_OW/INPUT similarity index 100% rename from tests/02_NAO_Gamma/016_NO_GO_OW/INPUT rename to tests/02_NAO_Gamma/008_NO_GO_OW/INPUT diff --git a/tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/KPT b/tests/02_NAO_Gamma/008_NO_GO_OW/KPT similarity index 100% rename from tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/KPT rename to tests/02_NAO_Gamma/008_NO_GO_OW/KPT diff --git a/tests/02_NAO_Gamma/008_NO_GO_OW/README b/tests/02_NAO_Gamma/008_NO_GO_OW/README new file mode 100644 index 0000000000..c24232a9f6 --- /dev/null +++ b/tests/02_NAO_Gamma/008_NO_GO_OW/README @@ -0,0 +1 @@ +test out_wfc_lcao > 0 for gamma only and nspin==1 diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/STRU b/tests/02_NAO_Gamma/008_NO_GO_OW/STRU similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/STRU rename to tests/02_NAO_Gamma/008_NO_GO_OW/STRU diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/result.ref b/tests/02_NAO_Gamma/008_NO_GO_OW/result.ref similarity index 100% rename from tests/02_NAO_Gamma/016_NO_GO_OW/result.ref rename to tests/02_NAO_Gamma/008_NO_GO_OW/result.ref diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/wf_nao.txt.ref b/tests/02_NAO_Gamma/008_NO_GO_OW/wf_nao.txt.ref similarity index 100% rename from tests/02_NAO_Gamma/016_NO_GO_OW/wf_nao.txt.ref rename to tests/02_NAO_Gamma/008_NO_GO_OW/wf_nao.txt.ref diff --git a/tests/02_NAO_Gamma/009_NO_GO_OW2/INPUT b/tests/02_NAO_Gamma/009_NO_GO_OW2/INPUT new file mode 100644 index 0000000000..ffaf2d254c --- /dev/null +++ b/tests/02_NAO_Gamma/009_NO_GO_OW2/INPUT @@ -0,0 +1,21 @@ +INPUT_PARAMETERS + +calculation scf +basis_type lcao +gamma_only 1 +out_wfc_lcao 1 +nspin 2 + +nbands 4 +latname sc +ecutwfc 25.0 # Rydberg +scf_thr 1e-10 + +suffix autotest +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +stru_file STRU +kpoint_file KPT + +smearing_method gauss +smearing_sigma 0.01 diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/STRU b/tests/02_NAO_Gamma/009_NO_GO_OW2/STRU similarity index 100% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/STRU rename to tests/02_NAO_Gamma/009_NO_GO_OW2/STRU diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_OW/INPUT b/tests/02_NAO_Gamma/010_NO_GO_RE_OW/INPUT new file mode 100644 index 0000000000..96cf2b5836 --- /dev/null +++ b/tests/02_NAO_Gamma/010_NO_GO_RE_OW/INPUT @@ -0,0 +1,33 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation relax + +nbands 4 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-9 +scf_nmax 100 + +#Parameters (3.Relaxation) +relax_nmax 2 +cal_force 1 +force_thr_ev 0.01 +relax_method bfgs 2 + +#Parameters (4.Basis) +basis_type lcao + +#Parameters (5.Smearing) +smearing_method fixed + +#Parameters (6.Mixing) +mixing_type broyden +mixing_beta 0.5 + +gamma_only 1 +out_wfc_lcao 1 diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_MB/STRU b/tests/02_NAO_Gamma/010_NO_GO_RE_OW/STRU similarity index 100% rename from tests/02_NAO_Gamma/010_NO_GO_RE_MB/STRU rename to tests/02_NAO_Gamma/010_NO_GO_RE_OW/STRU diff --git a/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/INPUT b/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/INPUT new file mode 100644 index 0000000000..3e4c4d6a5b --- /dev/null +++ b/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/INPUT @@ -0,0 +1,34 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation relax +nspin 2 + +nbands 6 +symmetry 1 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-9 +scf_nmax 100 + +#Parameters (3.Relaxation) +relax_nmax 2 +cal_force 1 +force_thr_ev 0.01 +relax_method bfgs 2 + +#Parameters (4.Basis) +basis_type lcao + +#Parameters (5.Smearing) +smearing_method fixed + +#Parameters (6.Mixing) +mixing_type broyden +mixing_beta 0.5 + +gamma_only 1 +out_wfc_lcao 1 diff --git a/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/STRU b/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/STRU new file mode 100644 index 0000000000..f4a07dbf54 --- /dev/null +++ b/tests/02_NAO_Gamma/011_NO_GO_RE_OW2/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28 Si_ONCV_PBE-1.0.upf upf201 + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si +0.0 +2 +0.00 0.00 0.00 1 1 1 +0.251 0.251 0.251 1 1 1 diff --git a/tests/02_NAO_Gamma/012_NO_GO_MD_OW/INPUT b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/INPUT new file mode 100644 index 0000000000..9367060d86 --- /dev/null +++ b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/INPUT @@ -0,0 +1,32 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +nbands 6 +calculation md +basis_type lcao +gamma_only 1 +out_wfc_lcao 1 + +#Parameters (Accuracy) +ecutwfc 10 +scf_nmax 50 +scf_thr 1.0e-6 + +cal_stress 1 +stress_thr 1e-6 +cal_force 1 +force_thr_ev 1.0e-3 + +mixing_type broyden +mixing_beta 0.7 + +md_nstep 2 +md_tchain 4 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 + +chg_extrap first-order + +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/README b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/README similarity index 100% rename from tests/02_NAO_Gamma/023_NO_GO_NVT_OW/README rename to tests/02_NAO_Gamma/012_NO_GO_MD_OW/README diff --git a/tests/02_NAO_Gamma/012_NO_GO_MD_OW/STRU b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/STRU new file mode 100644 index 0000000000..6fc39c63ca --- /dev/null +++ b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 1 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0 0.5 0.5 #latvec1 +0.5 0 0.5 #latvec2 +0.5 0.5 0 #latvec3 + +ATOMIC_POSITIONS +Cartesian + +Si #label +0 #magnetism +2 #number of atoms +0 0 0 m 1 1 1 v 0.000135711648533 3.02182240507e-05 -8.2024241958e-05 +0.25 0.25 0.25 m 1 1 1 v -0.000135711648533 -3.02182240507e-05 8.2024241958e-05 diff --git a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/result.ref b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/result.ref similarity index 100% rename from tests/02_NAO_Gamma/023_NO_GO_NVT_OW/result.ref rename to tests/02_NAO_Gamma/012_NO_GO_MD_OW/result.ref diff --git a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/wf_nao.txt.ref b/tests/02_NAO_Gamma/012_NO_GO_MD_OW/wf_nao.txt.ref similarity index 100% rename from tests/02_NAO_Gamma/023_NO_GO_NVT_OW/wf_nao.txt.ref rename to tests/02_NAO_Gamma/012_NO_GO_MD_OW/wf_nao.txt.ref diff --git a/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/INPUT b/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/INPUT new file mode 100644 index 0000000000..779fdb2ba1 --- /dev/null +++ b/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/INPUT @@ -0,0 +1,33 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +nbands 6 +calculation md +basis_type lcao +gamma_only 1 +nspin 2 +out_wfc_lcao 1 + +#Parameters (Accuracy) +ecutwfc 10 +scf_nmax 50 +scf_thr 1.0e-6 + +cal_stress 1 +stress_thr 1e-6 +cal_force 1 +force_thr_ev 1.0e-3 + +mixing_type broyden +mixing_beta 0.7 + +md_nstep 2 +md_tchain 4 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 + +chg_extrap first-order + +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/STRU b/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/STRU new file mode 100644 index 0000000000..6fc39c63ca --- /dev/null +++ b/tests/02_NAO_Gamma/013_NO_GO_MD_OW2/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 1 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0 0.5 0.5 #latvec1 +0.5 0 0.5 #latvec2 +0.5 0.5 0 #latvec3 + +ATOMIC_POSITIONS +Cartesian + +Si #label +0 #magnetism +2 #number of atoms +0 0 0 m 1 1 1 v 0.000135711648533 3.02182240507e-05 -8.2024241958e-05 +0.25 0.25 0.25 m 1 1 1 v -0.000135711648533 -3.02182240507e-05 8.2024241958e-05 diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/INPUT b/tests/02_NAO_Gamma/014_NO_GO_IW/INPUT similarity index 64% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/INPUT rename to tests/02_NAO_Gamma/014_NO_GO_IW/INPUT index 5adb3b80b2..d61bdbee34 100644 --- a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/INPUT +++ b/tests/02_NAO_Gamma/014_NO_GO_IW/INPUT @@ -1,15 +1,17 @@ INPUT_PARAMETERS #Parameters (System) -suffix autotest +suffix autotest -nbands 4 -stru_file STRU -kpoint_file KPT +nbands 4 +stru_file STRU +kpoint_file KPT pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -latname sc +latname sc + #Parameters (PW) -ecutwfc 25.0 # Rydberg +ecutwfc 25.0 # Rydberg + #Parameters (electronic) basis_type lcao scf_thr 1e-10 diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/KPT b/tests/02_NAO_Gamma/014_NO_GO_IW/KPT similarity index 100% rename from tests/02_NAO_Gamma/002_NO_GO_AF/KPT rename to tests/02_NAO_Gamma/014_NO_GO_IW/KPT diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/README b/tests/02_NAO_Gamma/014_NO_GO_IW/README similarity index 100% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/README rename to tests/02_NAO_Gamma/014_NO_GO_IW/README diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/STRU b/tests/02_NAO_Gamma/014_NO_GO_IW/STRU similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/STRU rename to tests/02_NAO_Gamma/014_NO_GO_IW/STRU diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/result.ref b/tests/02_NAO_Gamma/014_NO_GO_IW/result.ref similarity index 100% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/result.ref rename to tests/02_NAO_Gamma/014_NO_GO_IW/result.ref diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/wf_nao.txt b/tests/02_NAO_Gamma/014_NO_GO_IW/wf_nao.txt similarity index 100% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/wf_nao.txt rename to tests/02_NAO_Gamma/014_NO_GO_IW/wf_nao.txt diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/INPUT b/tests/02_NAO_Gamma/016_NO_GO_ODM/INPUT similarity index 85% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/INPUT rename to tests/02_NAO_Gamma/016_NO_GO_ODM/INPUT index 64c4429c8e..5fb7fec073 100644 --- a/tests/02_NAO_Gamma/018_NO_GO_ODM/INPUT +++ b/tests/02_NAO_Gamma/016_NO_GO_ODM/INPUT @@ -4,7 +4,7 @@ basis_type lcao calculation scf gamma_only 1 -out_dmk 1 // file name is dm_nao.txt +out_dmk 1 3 // file name is dm_nao.txt nbands 4 latname sc ecutwfc 25.0 // Rydberg diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/KPT b/tests/02_NAO_Gamma/016_NO_GO_ODM/KPT similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/KPT rename to tests/02_NAO_Gamma/016_NO_GO_ODM/KPT diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/README b/tests/02_NAO_Gamma/016_NO_GO_ODM/README similarity index 100% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/README rename to tests/02_NAO_Gamma/016_NO_GO_ODM/README diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/STRU b/tests/02_NAO_Gamma/016_NO_GO_ODM/STRU similarity index 100% rename from tests/02_NAO_Gamma/016_NO_GO_OW/STRU rename to tests/02_NAO_Gamma/016_NO_GO_ODM/STRU diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/dms1_nao.txt.ref b/tests/02_NAO_Gamma/016_NO_GO_ODM/dms1_nao.txt.ref similarity index 100% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/dms1_nao.txt.ref rename to tests/02_NAO_Gamma/016_NO_GO_ODM/dms1_nao.txt.ref diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/result.ref b/tests/02_NAO_Gamma/016_NO_GO_ODM/result.ref similarity index 100% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/result.ref rename to tests/02_NAO_Gamma/016_NO_GO_ODM/result.ref diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/README b/tests/02_NAO_Gamma/016_NO_GO_OW/README deleted file mode 100644 index 20528b428c..0000000000 --- a/tests/02_NAO_Gamma/016_NO_GO_OW/README +++ /dev/null @@ -1 +0,0 @@ -test out_wfc_lcao > 0 for gamma only diff --git a/tests/02_NAO_Gamma/021_NO_GO_MSST/result.ref b/tests/02_NAO_Gamma/021_NO_GO_MSST/result.ref deleted file mode 100644 index 98da325475..0000000000 --- a/tests/02_NAO_Gamma/021_NO_GO_MSST/result.ref +++ /dev/null @@ -1,5 +0,0 @@ -etotref -207.2084422005094 -etotperatomref -103.6042211003 -totalforceref 0.186002 -totalstressref 63.088667 -totaltimeref +1.0314 diff --git a/tests/02_NAO_Gamma/022_NO_GO_MSST2/result.ref b/tests/02_NAO_Gamma/022_NO_GO_MSST2/result.ref deleted file mode 100644 index fe1f873c56..0000000000 --- a/tests/02_NAO_Gamma/022_NO_GO_MSST2/result.ref +++ /dev/null @@ -1,5 +0,0 @@ -etotref -207.070585498893 -etotperatomref -103.5352927494 -totalforceref 0.218882 -totalstressref 63.052389 -totaltimeref +1.1941 diff --git a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/INPUT b/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/INPUT deleted file mode 100644 index b304a903c0..0000000000 --- a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/INPUT +++ /dev/null @@ -1,42 +0,0 @@ -INPUT_PARAMETERS - -# general -calculation md -md_nstep 2 -basis_type lcao -gamma_only 1 -nbands 8 - -# scf -ecutwfc 20 -scf_nmax 20 -scf_thr 1E-7 - -# solver -ks_solver genelpa -mixing_type broyden -mixing_beta 0.7 - -# force and stress -cal_force 1 -force_thr_ev 1.0e-3 -cal_stress 1 -stress_thr 1e-6 - -# md parameters -md_type nvt -md_tchain 4 -md_tfirst 10 -md_dt 1 -md_restart 0 - -# input and output -init_vel 1 -out_wfc_lcao 1 -out_app_flag 1 - -# directories -suffix autotest -read_file_dir ./ -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/STRU b/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/STRU deleted file mode 100644 index 7f7a971c9a..0000000000 --- a/tests/02_NAO_Gamma/023_NO_GO_NVT_OW/STRU +++ /dev/null @@ -1,22 +0,0 @@ -ATOMIC_SPECIES -Si 14 Si_dojo_nsoc.upf - -NUMERICAL_ORBITAL -Si_dojo_6au_sz.orb - -LATTICE_CONSTANT -10.2 - -LATTICE_VECTORS -0 0.5 0.5 #latvec1 -0.5 0 0.5 #latvec2 -0.5 0.5 0 #latvec3 - -ATOMIC_POSITIONS -Cartesian - -Si #label -0 #magnetism -2 #number of atoms -0 0 0 m 1 1 1 v 7.84179508201e-05 0.000114236741577 8.28212578036e-05 -0.241 0.255 0.250999999999 m 1 1 1 v -7.84179508201e-05 -0.000114236741577 -8.28212578036e-05 diff --git a/tests/02_NAO_Gamma/025_NO_GO_BS/INPUT b/tests/02_NAO_Gamma/110_NO_GO_BS/INPUT similarity index 100% rename from tests/02_NAO_Gamma/025_NO_GO_BS/INPUT rename to tests/02_NAO_Gamma/110_NO_GO_BS/INPUT diff --git a/tests/02_NAO_Gamma/004_NO_GO_FM/KPT b/tests/02_NAO_Gamma/110_NO_GO_BS/KPT similarity index 100% rename from tests/02_NAO_Gamma/004_NO_GO_FM/KPT rename to tests/02_NAO_Gamma/110_NO_GO_BS/KPT diff --git a/tests/02_NAO_Gamma/025_NO_GO_BS/README b/tests/02_NAO_Gamma/110_NO_GO_BS/README similarity index 100% rename from tests/02_NAO_Gamma/025_NO_GO_BS/README rename to tests/02_NAO_Gamma/110_NO_GO_BS/README diff --git a/tests/02_NAO_Gamma/025_NO_GO_BS/STRU b/tests/02_NAO_Gamma/110_NO_GO_BS/STRU similarity index 100% rename from tests/02_NAO_Gamma/025_NO_GO_BS/STRU rename to tests/02_NAO_Gamma/110_NO_GO_BS/STRU diff --git a/tests/02_NAO_Gamma/025_NO_GO_BS/result.ref b/tests/02_NAO_Gamma/110_NO_GO_BS/result.ref similarity index 100% rename from tests/02_NAO_Gamma/025_NO_GO_BS/result.ref rename to tests/02_NAO_Gamma/110_NO_GO_BS/result.ref diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/INPUT b/tests/02_NAO_Gamma/111_NO_GO_get_wf/INPUT similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/INPUT rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/INPUT diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/KPT b/tests/02_NAO_Gamma/111_NO_GO_get_wf/KPT similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/KPT rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/KPT diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/README b/tests/02_NAO_Gamma/111_NO_GO_get_wf/README similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/README rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/README diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/STRU b/tests/02_NAO_Gamma/111_NO_GO_get_wf/STRU similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/STRU rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/STRU diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/result.ref b/tests/02_NAO_Gamma/111_NO_GO_get_wf/result.ref similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/result.ref rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/result.ref diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/wfs1_nao.txt b/tests/02_NAO_Gamma/111_NO_GO_get_wf/wfs1_nao.txt similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/wfs1_nao.txt rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/wfs1_nao.txt diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/wfs2_nao.txt b/tests/02_NAO_Gamma/111_NO_GO_get_wf/wfs2_nao.txt similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/wfs2_nao.txt rename to tests/02_NAO_Gamma/111_NO_GO_get_wf/wfs2_nao.txt diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/INPUT b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/INPUT similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/INPUT rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/INPUT diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/KPT b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/KPT similarity index 100% rename from tests/02_NAO_Gamma/006_NO_GO_OH/KPT rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/KPT diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/README b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/README similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/README rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/README diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/STRU b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/STRU similarity index 100% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/STRU rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/STRU diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/result.ref b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/result.ref similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/result.ref rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/result.ref diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/wf_nao.txt b/tests/02_NAO_Gamma/114_NO_GO_get_pchg/wf_nao.txt similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/wf_nao.txt rename to tests/02_NAO_Gamma/114_NO_GO_get_pchg/wf_nao.txt diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/INPUT b/tests/02_NAO_Gamma/115_NO_GO_mulliken/INPUT similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/INPUT rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/INPUT diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/KPT b/tests/02_NAO_Gamma/115_NO_GO_mulliken/KPT similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/KPT rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/KPT diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/README b/tests/02_NAO_Gamma/115_NO_GO_mulliken/README similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/README rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/README diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/STRU b/tests/02_NAO_Gamma/115_NO_GO_mulliken/STRU similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/STRU rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/STRU diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/mulliken.txt.ref b/tests/02_NAO_Gamma/115_NO_GO_mulliken/mulliken.txt.ref similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/mulliken.txt.ref rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/mulliken.txt.ref diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/result.ref b/tests/02_NAO_Gamma/115_NO_GO_mulliken/result.ref similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/result.ref rename to tests/02_NAO_Gamma/115_NO_GO_mulliken/result.ref diff --git a/tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/INPUT b/tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/INPUT similarity index 100% rename from tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/INPUT rename to tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/INPUT diff --git a/tests/02_NAO_Gamma/008_NO_GO_CF_RE/KPT b/tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/KPT similarity index 100% rename from tests/02_NAO_Gamma/008_NO_GO_CF_RE/KPT rename to tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/KPT diff --git a/tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/README b/tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/README similarity index 100% rename from tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/README rename to tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/README diff --git a/tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/STRU b/tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/STRU similarity index 100% rename from tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/STRU rename to tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/STRU diff --git a/tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/result.ref b/tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/result.ref similarity index 100% rename from tests/02_NAO_Gamma/001_NO_GO_15_CF_CS/result.ref rename to tests/02_NAO_Gamma/131_NO_GO_15_CF_CS/result.ref diff --git a/tests/02_NAO_Gamma/008_NO_GO_CF_RE/INPUT b/tests/02_NAO_Gamma/132_NO_GO_CF_RE/INPUT similarity index 100% rename from tests/02_NAO_Gamma/008_NO_GO_CF_RE/INPUT rename to tests/02_NAO_Gamma/132_NO_GO_CF_RE/INPUT diff --git a/tests/02_NAO_Gamma/009_NO_GO_CS_CR/KPT b/tests/02_NAO_Gamma/132_NO_GO_CF_RE/KPT similarity index 100% rename from tests/02_NAO_Gamma/009_NO_GO_CS_CR/KPT rename to tests/02_NAO_Gamma/132_NO_GO_CF_RE/KPT diff --git a/tests/02_NAO_Gamma/008_NO_GO_CF_RE/README b/tests/02_NAO_Gamma/132_NO_GO_CF_RE/README similarity index 100% rename from tests/02_NAO_Gamma/008_NO_GO_CF_RE/README rename to tests/02_NAO_Gamma/132_NO_GO_CF_RE/README diff --git a/tests/02_NAO_Gamma/008_NO_GO_CF_RE/STRU b/tests/02_NAO_Gamma/132_NO_GO_CF_RE/STRU similarity index 100% rename from tests/02_NAO_Gamma/008_NO_GO_CF_RE/STRU rename to tests/02_NAO_Gamma/132_NO_GO_CF_RE/STRU diff --git a/tests/02_NAO_Gamma/008_NO_GO_CF_RE/result.ref b/tests/02_NAO_Gamma/132_NO_GO_CF_RE/result.ref similarity index 100% rename from tests/02_NAO_Gamma/008_NO_GO_CF_RE/result.ref rename to tests/02_NAO_Gamma/132_NO_GO_CF_RE/result.ref diff --git a/tests/02_NAO_Gamma/009_NO_GO_CS_CR/INPUT b/tests/02_NAO_Gamma/133_NO_GO_CS_CR/INPUT similarity index 100% rename from tests/02_NAO_Gamma/009_NO_GO_CS_CR/INPUT rename to tests/02_NAO_Gamma/133_NO_GO_CS_CR/INPUT diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_MB/KPT b/tests/02_NAO_Gamma/133_NO_GO_CS_CR/KPT similarity index 100% rename from tests/02_NAO_Gamma/010_NO_GO_RE_MB/KPT rename to tests/02_NAO_Gamma/133_NO_GO_CS_CR/KPT diff --git a/tests/02_NAO_Gamma/009_NO_GO_CS_CR/README b/tests/02_NAO_Gamma/133_NO_GO_CS_CR/README similarity index 100% rename from tests/02_NAO_Gamma/009_NO_GO_CS_CR/README rename to tests/02_NAO_Gamma/133_NO_GO_CS_CR/README diff --git a/tests/02_NAO_Gamma/009_NO_GO_CS_CR/STRU b/tests/02_NAO_Gamma/133_NO_GO_CS_CR/STRU similarity index 100% rename from tests/02_NAO_Gamma/009_NO_GO_CS_CR/STRU rename to tests/02_NAO_Gamma/133_NO_GO_CS_CR/STRU diff --git a/tests/02_NAO_Gamma/009_NO_GO_CS_CR/result.ref b/tests/02_NAO_Gamma/133_NO_GO_CS_CR/result.ref similarity index 100% rename from tests/02_NAO_Gamma/009_NO_GO_CS_CR/result.ref rename to tests/02_NAO_Gamma/133_NO_GO_CS_CR/result.ref diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_MB/INPUT b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/INPUT similarity index 100% rename from tests/02_NAO_Gamma/010_NO_GO_RE_MB/INPUT rename to tests/02_NAO_Gamma/134_NO_GO_RE_MB/INPUT diff --git a/tests/02_NAO_Gamma/011_NO_GO_elec_minus/KPT b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/KPT similarity index 100% rename from tests/02_NAO_Gamma/011_NO_GO_elec_minus/KPT rename to tests/02_NAO_Gamma/134_NO_GO_RE_MB/KPT diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_MB/README b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/README similarity index 100% rename from tests/02_NAO_Gamma/010_NO_GO_RE_MB/README rename to tests/02_NAO_Gamma/134_NO_GO_RE_MB/README diff --git a/tests/02_NAO_Gamma/134_NO_GO_RE_MB/STRU b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/STRU new file mode 100644 index 0000000000..f4a07dbf54 --- /dev/null +++ b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28 Si_ONCV_PBE-1.0.upf upf201 + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si +0.0 +2 +0.00 0.00 0.00 1 1 1 +0.251 0.251 0.251 1 1 1 diff --git a/tests/02_NAO_Gamma/010_NO_GO_RE_MB/result.ref b/tests/02_NAO_Gamma/134_NO_GO_RE_MB/result.ref similarity index 100% rename from tests/02_NAO_Gamma/010_NO_GO_RE_MB/result.ref rename to tests/02_NAO_Gamma/134_NO_GO_RE_MB/result.ref diff --git a/tests/02_NAO_Gamma/011_NO_GO_elec_minus/INPUT b/tests/02_NAO_Gamma/135_NO_GO_elec_minus/INPUT similarity index 100% rename from tests/02_NAO_Gamma/011_NO_GO_elec_minus/INPUT rename to tests/02_NAO_Gamma/135_NO_GO_elec_minus/INPUT diff --git a/tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/KPT b/tests/02_NAO_Gamma/135_NO_GO_elec_minus/KPT similarity index 100% rename from tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/KPT rename to tests/02_NAO_Gamma/135_NO_GO_elec_minus/KPT diff --git a/tests/02_NAO_Gamma/011_NO_GO_elec_minus/README b/tests/02_NAO_Gamma/135_NO_GO_elec_minus/README similarity index 100% rename from tests/02_NAO_Gamma/011_NO_GO_elec_minus/README rename to tests/02_NAO_Gamma/135_NO_GO_elec_minus/README diff --git a/tests/02_NAO_Gamma/011_NO_GO_elec_minus/STRU b/tests/02_NAO_Gamma/135_NO_GO_elec_minus/STRU similarity index 100% rename from tests/02_NAO_Gamma/011_NO_GO_elec_minus/STRU rename to tests/02_NAO_Gamma/135_NO_GO_elec_minus/STRU diff --git a/tests/02_NAO_Gamma/011_NO_GO_elec_minus/result.ref b/tests/02_NAO_Gamma/135_NO_GO_elec_minus/result.ref similarity index 100% rename from tests/02_NAO_Gamma/011_NO_GO_elec_minus/result.ref rename to tests/02_NAO_Gamma/135_NO_GO_elec_minus/result.ref diff --git a/tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/INPUT b/tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/INPUT similarity index 100% rename from tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/INPUT rename to tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/INPUT diff --git a/tests/02_NAO_Gamma/013_NO_GO_get_wf/KPT b/tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/KPT similarity index 100% rename from tests/02_NAO_Gamma/013_NO_GO_get_wf/KPT rename to tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/KPT diff --git a/tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/README b/tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/README similarity index 100% rename from tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/README rename to tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/README diff --git a/tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/STRU b/tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/STRU similarity index 100% rename from tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/STRU rename to tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/STRU diff --git a/tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/result.ref b/tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/result.ref similarity index 100% rename from tests/02_NAO_Gamma/012_NO_GO_S2_elec_minus/result.ref rename to tests/02_NAO_Gamma/136_NO_GO_S2_elec_minus/result.ref diff --git a/tests/02_NAO_Gamma/019_NO_GO_sol_H2O/INPUT b/tests/02_NAO_Gamma/137_NO_GO_sol_H2O/INPUT similarity index 100% rename from tests/02_NAO_Gamma/019_NO_GO_sol_H2O/INPUT rename to tests/02_NAO_Gamma/137_NO_GO_sol_H2O/INPUT diff --git a/tests/02_NAO_Gamma/014_NO_GO_wfc_file/KPT b/tests/02_NAO_Gamma/137_NO_GO_sol_H2O/KPT similarity index 100% rename from tests/02_NAO_Gamma/014_NO_GO_wfc_file/KPT rename to tests/02_NAO_Gamma/137_NO_GO_sol_H2O/KPT diff --git a/tests/02_NAO_Gamma/019_NO_GO_sol_H2O/README b/tests/02_NAO_Gamma/137_NO_GO_sol_H2O/README similarity index 100% rename from tests/02_NAO_Gamma/019_NO_GO_sol_H2O/README rename to tests/02_NAO_Gamma/137_NO_GO_sol_H2O/README diff --git a/tests/02_NAO_Gamma/019_NO_GO_sol_H2O/STRU b/tests/02_NAO_Gamma/137_NO_GO_sol_H2O/STRU similarity index 100% rename from tests/02_NAO_Gamma/019_NO_GO_sol_H2O/STRU rename to tests/02_NAO_Gamma/137_NO_GO_sol_H2O/STRU diff --git a/tests/02_NAO_Gamma/019_NO_GO_sol_H2O/result.ref b/tests/02_NAO_Gamma/137_NO_GO_sol_H2O/result.ref similarity index 100% rename from tests/02_NAO_Gamma/019_NO_GO_sol_H2O/result.ref rename to tests/02_NAO_Gamma/137_NO_GO_sol_H2O/result.ref diff --git a/tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/INPUT b/tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/INPUT similarity index 100% rename from tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/INPUT rename to tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/INPUT diff --git a/tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/README b/tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/README similarity index 100% rename from tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/README rename to tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/README diff --git a/tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/STRU b/tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/STRU similarity index 100% rename from tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/STRU rename to tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/STRU diff --git a/tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/result.ref b/tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/result.ref similarity index 100% rename from tests/02_NAO_Gamma/020_NO_GO_SCAN_Si2/result.ref rename to tests/02_NAO_Gamma/138_NO_GO_SCAN_Si2/result.ref diff --git a/tests/02_NAO_Gamma/024_NO_GO_FeBiTe/INPUT b/tests/02_NAO_Gamma/139_NO_GO_FeBiTe/INPUT similarity index 100% rename from tests/02_NAO_Gamma/024_NO_GO_FeBiTe/INPUT rename to tests/02_NAO_Gamma/139_NO_GO_FeBiTe/INPUT diff --git a/tests/02_NAO_Gamma/015_NO_GO_get_pchg/KPT b/tests/02_NAO_Gamma/139_NO_GO_FeBiTe/KPT similarity index 100% rename from tests/02_NAO_Gamma/015_NO_GO_get_pchg/KPT rename to tests/02_NAO_Gamma/139_NO_GO_FeBiTe/KPT diff --git a/tests/02_NAO_Gamma/024_NO_GO_FeBiTe/STRU b/tests/02_NAO_Gamma/139_NO_GO_FeBiTe/STRU similarity index 100% rename from tests/02_NAO_Gamma/024_NO_GO_FeBiTe/STRU rename to tests/02_NAO_Gamma/139_NO_GO_FeBiTe/STRU diff --git a/tests/02_NAO_Gamma/024_NO_GO_FeBiTe/result.ref b/tests/02_NAO_Gamma/139_NO_GO_FeBiTe/result.ref similarity index 100% rename from tests/02_NAO_Gamma/024_NO_GO_FeBiTe/result.ref rename to tests/02_NAO_Gamma/139_NO_GO_FeBiTe/result.ref diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/INPUT b/tests/02_NAO_Gamma/140_NO_GO_ocp/INPUT similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/INPUT rename to tests/02_NAO_Gamma/140_NO_GO_ocp/INPUT diff --git a/tests/02_NAO_Gamma/016_NO_GO_OW/KPT b/tests/02_NAO_Gamma/140_NO_GO_ocp/KPT similarity index 100% rename from tests/02_NAO_Gamma/016_NO_GO_OW/KPT rename to tests/02_NAO_Gamma/140_NO_GO_ocp/KPT diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/README b/tests/02_NAO_Gamma/140_NO_GO_ocp/README similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/README rename to tests/02_NAO_Gamma/140_NO_GO_ocp/README diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/STRU b/tests/02_NAO_Gamma/140_NO_GO_ocp/STRU similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/STRU rename to tests/02_NAO_Gamma/140_NO_GO_ocp/STRU diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/result.ref b/tests/02_NAO_Gamma/140_NO_GO_ocp/result.ref similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/result.ref rename to tests/02_NAO_Gamma/140_NO_GO_ocp/result.ref diff --git a/tests/02_NAO_Gamma/005_NO_GO_ocp/threshold b/tests/02_NAO_Gamma/140_NO_GO_ocp/threshold similarity index 100% rename from tests/02_NAO_Gamma/005_NO_GO_ocp/threshold rename to tests/02_NAO_Gamma/140_NO_GO_ocp/threshold diff --git a/tests/02_NAO_Gamma/021_NO_GO_MSST/INPUT b/tests/02_NAO_Gamma/141_NO_GO_MSST/INPUT similarity index 100% rename from tests/02_NAO_Gamma/021_NO_GO_MSST/INPUT rename to tests/02_NAO_Gamma/141_NO_GO_MSST/INPUT diff --git a/tests/02_NAO_Gamma/021_NO_GO_MSST/README b/tests/02_NAO_Gamma/141_NO_GO_MSST/README similarity index 100% rename from tests/02_NAO_Gamma/021_NO_GO_MSST/README rename to tests/02_NAO_Gamma/141_NO_GO_MSST/README diff --git a/tests/02_NAO_Gamma/021_NO_GO_MSST/STRU b/tests/02_NAO_Gamma/141_NO_GO_MSST/STRU similarity index 100% rename from tests/02_NAO_Gamma/021_NO_GO_MSST/STRU rename to tests/02_NAO_Gamma/141_NO_GO_MSST/STRU diff --git a/tests/02_NAO_Gamma/141_NO_GO_MSST/result.ref b/tests/02_NAO_Gamma/141_NO_GO_MSST/result.ref new file mode 100644 index 0000000000..36d41df666 --- /dev/null +++ b/tests/02_NAO_Gamma/141_NO_GO_MSST/result.ref @@ -0,0 +1,5 @@ +etotref -207.1644382026449 +etotperatomref -103.5822191013 +totalforceref 4.003278 +totalstressref 98.512702 +totaltimeref 2.52 diff --git a/tests/02_NAO_Gamma/022_NO_GO_MSST2/INPUT b/tests/02_NAO_Gamma/142_NO_GO_MSST2/INPUT similarity index 100% rename from tests/02_NAO_Gamma/022_NO_GO_MSST2/INPUT rename to tests/02_NAO_Gamma/142_NO_GO_MSST2/INPUT diff --git a/tests/02_NAO_Gamma/017_NO_GO_mulliken/KPT b/tests/02_NAO_Gamma/142_NO_GO_MSST2/KPT similarity index 100% rename from tests/02_NAO_Gamma/017_NO_GO_mulliken/KPT rename to tests/02_NAO_Gamma/142_NO_GO_MSST2/KPT diff --git a/tests/02_NAO_Gamma/022_NO_GO_MSST2/README b/tests/02_NAO_Gamma/142_NO_GO_MSST2/README similarity index 100% rename from tests/02_NAO_Gamma/022_NO_GO_MSST2/README rename to tests/02_NAO_Gamma/142_NO_GO_MSST2/README diff --git a/tests/02_NAO_Gamma/022_NO_GO_MSST2/STRU b/tests/02_NAO_Gamma/142_NO_GO_MSST2/STRU similarity index 100% rename from tests/02_NAO_Gamma/022_NO_GO_MSST2/STRU rename to tests/02_NAO_Gamma/142_NO_GO_MSST2/STRU diff --git a/tests/02_NAO_Gamma/142_NO_GO_MSST2/result.ref b/tests/02_NAO_Gamma/142_NO_GO_MSST2/result.ref new file mode 100644 index 0000000000..d7f5a647fa --- /dev/null +++ b/tests/02_NAO_Gamma/142_NO_GO_MSST2/result.ref @@ -0,0 +1,5 @@ +etotref -207.0265694269335 +etotperatomref -103.5132847135 +totalforceref 4.002666 +totalstressref 98.468360 +totaltimeref 2.79 diff --git a/tests/02_NAO_Gamma/143_NO_GO_AF/INPUT b/tests/02_NAO_Gamma/143_NO_GO_AF/INPUT new file mode 100644 index 0000000000..63f9ebc504 --- /dev/null +++ b/tests/02_NAO_Gamma/143_NO_GO_AF/INPUT @@ -0,0 +1,24 @@ +INPUT_PARAMETERS + +calculation scf +ecutwfc 8 +scf_thr 1.0e-8 +scf_nmax 50 +#out_chg 1 + +smearing_method gaussian +smearing_sigma 0.02 + +mixing_type broyden +mixing_beta 0.4 +mixing_gg0 0.0 + +ks_solver scalapack_gvx +basis_type lcao +gamma_only 1 +symmetry 0 +nspin 2 + +suffix autotest +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/02_NAO_Gamma/018_NO_GO_ODM/KPT b/tests/02_NAO_Gamma/143_NO_GO_AF/KPT similarity index 100% rename from tests/02_NAO_Gamma/018_NO_GO_ODM/KPT rename to tests/02_NAO_Gamma/143_NO_GO_AF/KPT diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/README b/tests/02_NAO_Gamma/143_NO_GO_AF/README similarity index 100% rename from tests/02_NAO_Gamma/002_NO_GO_AF/README rename to tests/02_NAO_Gamma/143_NO_GO_AF/README diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/STRU b/tests/02_NAO_Gamma/143_NO_GO_AF/STRU similarity index 100% rename from tests/02_NAO_Gamma/002_NO_GO_AF/STRU rename to tests/02_NAO_Gamma/143_NO_GO_AF/STRU diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/result.ref b/tests/02_NAO_Gamma/143_NO_GO_AF/result.ref similarity index 100% rename from tests/02_NAO_Gamma/002_NO_GO_AF/result.ref rename to tests/02_NAO_Gamma/143_NO_GO_AF/result.ref diff --git a/tests/02_NAO_Gamma/002_NO_GO_AF/threshold b/tests/02_NAO_Gamma/143_NO_GO_AF/threshold similarity index 100% rename from tests/02_NAO_Gamma/002_NO_GO_AF/threshold rename to tests/02_NAO_Gamma/143_NO_GO_AF/threshold diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/INPUT b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/INPUT similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/INPUT rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/INPUT diff --git a/tests/02_NAO_Gamma/019_NO_GO_sol_H2O/KPT b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/KPT similarity index 100% rename from tests/02_NAO_Gamma/019_NO_GO_sol_H2O/KPT rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/KPT diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/README b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/README similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/README rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/README diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/STRU b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/STRU similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/STRU rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/STRU diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/mulliken.txt.ref b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/mulliken.txt.ref similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/mulliken.txt.ref rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/mulliken.txt.ref diff --git a/tests/02_NAO_Gamma/003_NO_GO_AF_mag/result.ref b/tests/02_NAO_Gamma/144_NO_GO_AF_mag/result.ref similarity index 100% rename from tests/02_NAO_Gamma/003_NO_GO_AF_mag/result.ref rename to tests/02_NAO_Gamma/144_NO_GO_AF_mag/result.ref diff --git a/tests/02_NAO_Gamma/004_NO_GO_FM/INPUT b/tests/02_NAO_Gamma/145_NO_GO_FM/INPUT similarity index 100% rename from tests/02_NAO_Gamma/004_NO_GO_FM/INPUT rename to tests/02_NAO_Gamma/145_NO_GO_FM/INPUT diff --git a/tests/02_NAO_Gamma/022_NO_GO_MSST2/KPT b/tests/02_NAO_Gamma/145_NO_GO_FM/KPT similarity index 100% rename from tests/02_NAO_Gamma/022_NO_GO_MSST2/KPT rename to tests/02_NAO_Gamma/145_NO_GO_FM/KPT diff --git a/tests/02_NAO_Gamma/004_NO_GO_FM/README b/tests/02_NAO_Gamma/145_NO_GO_FM/README similarity index 100% rename from tests/02_NAO_Gamma/004_NO_GO_FM/README rename to tests/02_NAO_Gamma/145_NO_GO_FM/README diff --git a/tests/02_NAO_Gamma/004_NO_GO_FM/STRU b/tests/02_NAO_Gamma/145_NO_GO_FM/STRU similarity index 100% rename from tests/02_NAO_Gamma/004_NO_GO_FM/STRU rename to tests/02_NAO_Gamma/145_NO_GO_FM/STRU diff --git a/tests/02_NAO_Gamma/004_NO_GO_FM/result.ref b/tests/02_NAO_Gamma/145_NO_GO_FM/result.ref similarity index 100% rename from tests/02_NAO_Gamma/004_NO_GO_FM/result.ref rename to tests/02_NAO_Gamma/145_NO_GO_FM/result.ref diff --git a/tests/02_NAO_Gamma/026_NO_GO_PU_AF/INPUT b/tests/02_NAO_Gamma/146_NO_GO_PU_AF/INPUT similarity index 100% rename from tests/02_NAO_Gamma/026_NO_GO_PU_AF/INPUT rename to tests/02_NAO_Gamma/146_NO_GO_PU_AF/INPUT diff --git a/tests/02_NAO_Gamma/024_NO_GO_FeBiTe/KPT b/tests/02_NAO_Gamma/146_NO_GO_PU_AF/KPT similarity index 100% rename from tests/02_NAO_Gamma/024_NO_GO_FeBiTe/KPT rename to tests/02_NAO_Gamma/146_NO_GO_PU_AF/KPT diff --git a/tests/02_NAO_Gamma/026_NO_GO_PU_AF/README b/tests/02_NAO_Gamma/146_NO_GO_PU_AF/README similarity index 100% rename from tests/02_NAO_Gamma/026_NO_GO_PU_AF/README rename to tests/02_NAO_Gamma/146_NO_GO_PU_AF/README diff --git a/tests/02_NAO_Gamma/026_NO_GO_PU_AF/STRU b/tests/02_NAO_Gamma/146_NO_GO_PU_AF/STRU similarity index 100% rename from tests/02_NAO_Gamma/026_NO_GO_PU_AF/STRU rename to tests/02_NAO_Gamma/146_NO_GO_PU_AF/STRU diff --git a/tests/02_NAO_Gamma/026_NO_GO_PU_AF/result.ref b/tests/02_NAO_Gamma/146_NO_GO_PU_AF/result.ref similarity index 100% rename from tests/02_NAO_Gamma/026_NO_GO_PU_AF/result.ref rename to tests/02_NAO_Gamma/146_NO_GO_PU_AF/result.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/INPUT b/tests/02_NAO_Gamma/147_NO_GO_OXC/INPUT similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/INPUT rename to tests/02_NAO_Gamma/147_NO_GO_OXC/INPUT diff --git a/tests/02_NAO_Gamma/025_NO_GO_BS/KPT b/tests/02_NAO_Gamma/147_NO_GO_OXC/KPT similarity index 100% rename from tests/02_NAO_Gamma/025_NO_GO_BS/KPT rename to tests/02_NAO_Gamma/147_NO_GO_OXC/KPT diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/README b/tests/02_NAO_Gamma/147_NO_GO_OXC/README similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/README rename to tests/02_NAO_Gamma/147_NO_GO_OXC/README diff --git a/tests/02_NAO_Gamma/147_NO_GO_OXC/STRU b/tests/02_NAO_Gamma/147_NO_GO_OXC/STRU new file mode 100644 index 0000000000..697ce08219 --- /dev/null +++ b/tests/02_NAO_Gamma/147_NO_GO_OXC/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 14 Si_ONCV_PBE-1.0.upf upf201 + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +20 // add lattice constant + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si // Element type +0.0 // magnetism +2 +0.00 0.00 0.00 1 1 1 +0.25 0.25 0.25 1 1 1 diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/Vxc_R_spin0.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/Vxc_R_spin0.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/Vxc_R_spin0.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/Vxc_R_spin0.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/kinetic_out.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/kinetic_out.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/kinetic_out.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/kinetic_out.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/result.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/result.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/result.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/result.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/vhartree_out.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/vhartree_out.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/vhartree_out.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/vhartree_out.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/vpp_local_out.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/vpp_local_out.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/vpp_local_out.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/vpp_local_out.ref diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/vpp_nonlocal_out.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/vpp_nonlocal_out.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/vpp_nonlocal_out.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/vpp_nonlocal_out.ref diff --git a/tests/02_NAO_Gamma/147_NO_GO_OXC/vxc_nao.txt.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/vxc_nao.txt.ref new file mode 100644 index 0000000000..928cc55fda --- /dev/null +++ b/tests/02_NAO_Gamma/147_NO_GO_OXC/vxc_nao.txt.ref @@ -0,0 +1,19 @@ +#------------------------------------------------------------------------ +# ionic step 0 +# filename OUT.autotest/vxc_nao.txt +# gamma only 1 +# rows 6 +# columns 6 +#------------------------------------------------------------------------ +Row 1 + -6.84690722e-01 -8.83711720e-07 3.07396085e-16 -2.58938613e-16 4.20655377e-16 -3.02896732e-16 +Row 2 + -7.14929921e-01 3.44009688e-16 3.58682784e-17 2.06556129e-16 -5.92093671e-16 +Row 3 + -5.93223965e-01 -8.19837896e-18 2.92934486e-16 1.71874896e-06 +Row 4 + -5.93223965e-01 1.09189323e-16 -6.32572300e-08 +Row 5 + -5.93223965e-01 -2.56551521e-08 +Row 6 + -6.19565208e-01 diff --git a/tests/02_NAO_Gamma/007_NO_GO_OXC/vxc_out.ref b/tests/02_NAO_Gamma/147_NO_GO_OXC/vxc_out.ref similarity index 100% rename from tests/02_NAO_Gamma/007_NO_GO_OXC/vxc_out.ref rename to tests/02_NAO_Gamma/147_NO_GO_OXC/vxc_out.ref diff --git a/tests/02_NAO_Gamma/CASES_CPU.txt b/tests/02_NAO_Gamma/CASES_CPU.txt index f56b3e3a62..378efc18fc 100644 --- a/tests/02_NAO_Gamma/CASES_CPU.txt +++ b/tests/02_NAO_Gamma/CASES_CPU.txt @@ -1,26 +1,37 @@ -001_NO_GO_15_CF_CS -002_NO_GO_AF -003_NO_GO_AF_mag -004_NO_GO_FM -005_NO_GO_ocp -006_NO_GO_OH -007_NO_GO_OXC -008_NO_GO_CF_RE -009_NO_GO_CS_CR -010_NO_GO_RE_MB -011_NO_GO_elec_minus -012_NO_GO_S2_elec_minus -013_NO_GO_get_wf -014_NO_GO_wfc_file -015_NO_GO_get_pchg -016_NO_GO_OW -017_NO_GO_mulliken -018_NO_GO_ODM -019_NO_GO_sol_H2O -020_NO_GO_SCAN_Si2 -021_NO_GO_MSST -022_NO_GO_MSST2 -023_NO_GO_NVT_OW -024_NO_GO_FeBiTe -025_NO_GO_BS -026_NO_GO_PU_AF +001_NO_GO_OHK +002_NO_GO_OHK2 +003_NO_GO_RE_OHK +004_NO_GO_RE_OHK2 +005_NO_GO_MD_OHK +006_NO_GO_MD_OHK2 +#007_NO_GO_OHR +008_NO_GO_OW +#009_NO_GO_OW2 +#010_NO_GO_RE_OW +#011_NO_GO_RE_OW2 +#012_NO_GO_MD_OW +#013_NO_GO_MD_OW2 +014_NO_GO_IW +#015_NO_GO_IW2 +016_NO_GO_ODM +110_NO_GO_BS +111_NO_GO_get_wf +114_NO_GO_get_pchg +115_NO_GO_mulliken +131_NO_GO_15_CF_CS +132_NO_GO_CF_RE +133_NO_GO_CS_CR +134_NO_GO_RE_MB +135_NO_GO_elec_minus +136_NO_GO_S2_elec_minus +137_NO_GO_sol_H2O +138_NO_GO_SCAN_Si2 +139_NO_GO_FeBiTe +140_NO_GO_ocp +141_NO_GO_MSST +142_NO_GO_MSST2 +143_NO_GO_AF +144_NO_GO_AF_mag +145_NO_GO_FM +146_NO_GO_PU_AF +147_NO_GO_OXC diff --git a/tests/03_NAO_multik/02_NO_KP_15/INPUT b/tests/03_NAO_multik/02_NO_KP_15/INPUT index 4f0cca65d3..50aa01baa7 100644 --- a/tests/03_NAO_multik/02_NO_KP_15/INPUT +++ b/tests/03_NAO_multik/02_NO_KP_15/INPUT @@ -4,7 +4,7 @@ suffix autotest calculation scf nbands 6 -symmetry 1 +symmetry 0 pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB gamma_only 0 @@ -21,6 +21,9 @@ basis_type lcao #Parameters (4.Smearing) smearing_method gauss smearing_sigma 0.002 +init_chg dm +#out_dmr 1 +read_file_dir ./ #Parameters (5.Mixing) mixing_type broyden diff --git a/tests/03_NAO_multik/02_NO_KP_15/dmrs1_nao.csr b/tests/03_NAO_multik/02_NO_KP_15/dmrs1_nao.csr new file mode 100644 index 0000000000..53ffd0b63e --- /dev/null +++ b/tests/03_NAO_multik/02_NO_KP_15/dmrs1_nao.csr @@ -0,0 +1,55 @@ +IONIC_STEP: 1 +Matrix Dimension of DM(R): 26 +Matrix number of DM(R): 13 +-1 0 0 507 + 6.73361942e-04 -3.97537772e-05 7.92408229e-04 -2.08943763e-02 1.31266047e-04 -1.72965599e-05 5.42656099e-04 7.00477616e-06 3.94541403e-06 4.81371689e-08 -1.20934462e-04 -7.37597696e-06 -1.16470146e-05 -2.30970536e-02 5.66887190e-03 -1.83768890e-04 -6.04318066e-05 4.79903222e-05 -2.02907584e-03 -2.10279721e-03 1.92358576e-03 -5.47231757e-08 -1.60788675e-03 1.48588589e-03 -5.25276936e-05 1.54738933e-03 -3.97537772e-05 1.60670407e-05 -2.12667446e-04 8.26935955e-03 7.98001436e-06 4.25595524e-06 -2.30924551e-04 1.75054518e-06 -2.62363319e-06 -1.61175046e-06 9.06842324e-06 4.37520218e-06 3.04562873e-06 5.94037473e-03 -3.35393364e-04 4.11745563e-03 4.02735793e-03 -4.26787793e-03 -1.05916310e-04 -9.60150546e-05 1.11812472e-04 1.96413971e-07 1.93401252e-05 -6.19264361e-06 -2.84529967e-06 -1.29767783e-05 7.92408229e-04 -2.12667446e-04 -2.14829023e-02 -3.71268150e-03 1.75293540e-02 4.88599897e-04 9.01879561e-05 -2.04695642e-03 7.52737246e-05 1.59938622e-03 1.22639815e-04 -1.39228798e-04 3.19255962e-04 2.09662763e-06 -4.04833836e-03 -5.36715690e-02 -2.44138640e-01 2.21052348e-01 2.33518808e-05 5.92110603e-03 -5.21750510e-03 -8.88773026e-04 1.73137916e-03 -1.86241064e-03 1.52367404e-04 -1.73326849e-03 -2.08943763e-02 8.26935955e-03 -3.71268150e-03 -1.81977887e-01 -1.89085567e-02 1.40640772e-04 4.95961374e-03 4.61074437e-04 9.19749440e-04 1.52966528e-04 1.40876300e-03 -1.55859666e-03 -4.40258755e-05 -8.15517156e-05 -3.87799502e-03 -2.43868036e-01 -7.16630172e-02 2.34367319e-01 5.83941993e-03 4.12201360e-04 -5.51280191e-03 4.53245914e-04 1.98883091e-03 -1.97088972e-03 -6.39785684e-04 -2.02052298e-03 1.31266047e-04 7.98001436e-06 1.75293540e-02 -1.89085567e-02 -2.08026443e-02 -2.04072172e-03 3.33041135e-04 4.72221132e-04 1.06213432e-04 3.10813800e-04 2.12351595e-04 -4.96620554e-06 1.58339328e-03 1.14474191e-04 4.13501486e-03 2.21022945e-01 2.34513293e-01 -3.14277441e-02 -5.37854297e-03 -5.76269634e-03 -5.38296209e-04 -3.52799019e-04 -1.41761428e-03 1.61511410e-03 -7.72206803e-04 1.51421276e-03 -1.72965599e-05 4.25595524e-06 4.88599897e-04 1.40640772e-04 -2.04072172e-03 -1.57823544e-05 -4.39825444e-06 9.12826691e-05 -1.27991946e-06 -2.31224839e-05 -2.72506963e-06 3.80797434e-06 -1.05398619e-05 2.31797641e-03 9.94342201e-05 8.40500891e-05 5.94337156e-03 -5.46740884e-03 2.38849929e-05 -1.49379862e-04 1.34427742e-04 1.50846888e-05 -3.54165283e-05 4.25840113e-05 -4.27319573e-06 2.97436636e-05 5.42656099e-04 -2.30924551e-04 9.01879561e-05 4.95961374e-03 3.33041135e-04 -4.39825444e-06 -1.28104111e-04 -9.01745553e-06 -1.61753760e-05 -2.13841414e-06 -3.53600279e-05 2.74194417e-05 1.83218511e-06 2.40771110e-03 9.15295789e-05 6.06657551e-03 5.58610719e-04 -5.82300543e-03 -1.49956653e-04 1.22086375e-05 1.42290366e-04 -8.39813516e-06 -4.15542569e-05 3.60498903e-05 1.00704641e-05 4.49706024e-05 7.00477616e-06 1.75054518e-06 -2.04695642e-03 4.61074437e-04 4.72221132e-04 9.12826691e-05 -9.01745553e-06 -1.53380790e-05 -2.22079191e-06 -1.03262115e-05 -4.00517617e-06 -1.64895602e-08 -2.27178464e-05 -2.22301970e-03 -1.07877289e-04 -5.37624081e-03 -5.61031003e-03 -4.01763639e-04 1.35489660e-04 1.42989791e-04 3.79055304e-05 5.39509780e-06 2.24733557e-05 -3.61413449e-05 1.32282734e-05 -3.23124980e-05 3.94541403e-06 -2.62363319e-06 7.52737246e-05 9.19749440e-04 1.06213432e-04 -1.27991946e-06 -1.61753760e-05 -2.22079191e-06 -9.34885278e-07 -1.20221699e-06 -1.25341370e-05 2.91206873e-07 -1.66578969e-06 -2.43071797e-07 -2.86358914e-07 8.85894806e-04 -4.55645634e-04 3.51863680e-04 -1.49866022e-05 8.21974934e-06 -5.06922523e-06 6.28992205e-06 5.57191371e-06 -5.68520737e-06 2.85704469e-07 1.25586484e-05 4.81371689e-08 -1.61175046e-06 1.59938622e-03 1.52966528e-04 3.10813800e-04 -2.31224839e-05 -2.13841414e-06 -1.03262115e-05 -1.20221699e-06 -5.82926895e-06 -2.42238671e-06 1.76507771e-08 -1.98888934e-05 -1.54432729e-03 1.99491717e-05 -1.68902008e-03 -1.96572509e-03 1.37253496e-03 3.42841905e-05 4.04904295e-05 -2.02684488e-05 5.50844326e-06 1.52786244e-05 -2.04037581e-05 1.09640961e-05 -1.67291900e-05 -1.20934462e-04 9.06842324e-06 1.22639815e-04 1.40876300e-03 2.12351595e-04 -2.72506963e-06 -3.53600279e-05 -4.00517617e-06 -1.25341370e-05 -2.42238671e-06 -1.00227308e-05 2.11474313e-05 -1.03082780e-06 1.42206233e-03 -7.24007071e-06 1.82357183e-03 1.92551919e-03 -1.60786809e-03 -4.09493519e-05 -3.33531383e-05 3.44249429e-05 -5.60896386e-06 -2.07810848e-05 3.07999331e-05 9.09812263e-06 2.34815694e-05 -7.37597696e-06 4.37520218e-06 -1.39228798e-04 -1.55859666e-03 -4.96620554e-06 3.80797434e-06 2.74194417e-05 -1.64895602e-08 2.91206873e-07 1.76507771e-08 2.11474313e-05 -1.19495073e-06 5.11705169e-07 -5.19099848e-05 -2.66335103e-06 -1.50808329e-04 6.38070122e-04 7.70527997e-04 4.12883227e-06 -1.04591462e-05 -1.35261994e-05 2.52154614e-07 1.07864540e-05 8.89189683e-06 6.17212951e-06 -9.84746047e-07 -1.16470146e-05 3.04562873e-06 3.19255962e-04 -4.40258755e-05 1.58339328e-03 -1.05398619e-05 1.83218511e-06 -2.27178464e-05 -1.66578969e-06 -1.98888934e-05 -1.03082780e-06 5.11705169e-07 -5.95160958e-06 1.47631583e-03 -1.16926507e-05 1.70725211e-03 2.00321284e-03 -1.49575572e-03 -2.87870079e-05 -4.32676487e-05 3.03095393e-05 1.25949487e-05 -1.73577445e-05 2.38041797e-05 -9.90651717e-07 2.40545549e-05 6.75660007e-04 -3.70583968e-05 -7.60183549e-04 2.09274361e-02 -1.51406289e-04 -1.64162023e-06 -5.54621534e-04 8.02440447e-06 3.71527257e-06 1.41830964e-06 -1.20903168e-04 -7.05570119e-06 -1.46557977e-05 -3.70583968e-05 1.50522051e-05 2.16903688e-04 -8.22741963e-03 6.71138355e-06 -3.48363816e-06 2.29517192e-04 9.16193695e-07 -2.54427436e-06 -5.37690715e-07 9.28543243e-06 4.37638627e-06 3.64659964e-06 -7.60183549e-04 2.16903688e-04 -2.12881964e-02 -3.67288888e-03 1.76032039e-02 4.85036763e-04 1.05677681e-04 -2.04259252e-03 -7.38170330e-05 -1.59888601e-03 -1.10916847e-04 1.38435699e-04 -3.17602844e-04 2.09274361e-02 -8.22741963e-03 -3.67288888e-03 -1.82082090e-01 -1.90264795e-02 3.35823876e-05 4.94466670e-03 5.70967741e-04 -9.18925056e-04 -1.17448539e-04 -1.40231869e-03 1.56254351e-03 -2.57406725e-06 -1.51406289e-04 6.71138355e-06 1.76032039e-02 -1.90264795e-02 -2.08557672e-02 -2.04011682e-03 3.53343551e-04 4.82257184e-04 -1.05167768e-04 -3.06738183e-04 -2.05459987e-04 5.27889387e-06 -1.58582400e-03 -1.64162023e-06 -3.48363816e-06 4.85036763e-04 3.35823876e-05 -2.04011682e-03 -1.51869930e-05 -6.98851141e-07 9.03878041e-05 1.27799009e-06 2.30237241e-05 3.22070996e-06 -3.75439524e-06 1.05310605e-05 -5.54621534e-04 2.29517192e-04 1.05677681e-04 4.94466670e-03 3.53343551e-04 -6.98851141e-07 -1.27406033e-04 -1.24035629e-05 1.61114847e-05 1.80762506e-06 3.51900561e-05 -2.73107074e-05 3.94949154e-08 8.02440447e-06 9.16193695e-07 -2.04259252e-03 5.70967741e-04 4.82257184e-04 9.03878041e-05 -1.24035629e-05 -1.53786153e-05 2.71694594e-06 1.02971341e-05 4.34454045e-06 -9.81035752e-07 2.27171575e-05 3.71527257e-06 -2.54427436e-06 -7.38170330e-05 -9.18925056e-04 -1.05167768e-04 1.27799009e-06 1.61114847e-05 2.71694594e-06 -8.99249570e-07 -1.00005934e-06 -1.24953939e-05 2.66013274e-07 -1.65640447e-06 1.41830964e-06 -5.37690715e-07 -1.59888601e-03 -1.17448539e-04 -3.06738183e-04 2.30237241e-05 1.80762506e-06 1.02971341e-05 -1.00005934e-06 -5.72796451e-06 -2.00165153e-06 -3.38554894e-07 -1.98226003e-05 -1.20903168e-04 9.28543243e-06 -1.10916847e-04 -1.40231869e-03 -2.05459987e-04 3.22070996e-06 3.51900561e-05 4.34454045e-06 -1.24953939e-05 -2.00165153e-06 -9.81822232e-06 2.11801885e-05 -6.70871051e-07 -7.05570119e-06 4.37638627e-06 1.38435699e-04 1.56254351e-03 5.27889387e-06 -3.75439524e-06 -2.73107074e-05 -9.81035752e-07 2.66013274e-07 -3.38554894e-07 2.11801885e-05 -1.19986110e-06 5.24586487e-07 -1.46557977e-05 3.64659964e-06 -3.17602844e-04 -2.57406725e-06 -1.58582400e-03 1.05310605e-05 3.94949154e-08 2.27171575e-05 -1.65640447e-06 -1.98226003e-05 -6.70871051e-07 5.24586487e-07 -5.94200596e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +-1 0 1 338 + 9.71085217e-04 -5.39348870e-05 -7.82534933e-04 -1.12629834e-04 2.28947051e-02 -4.36601610e-06 -8.06803305e-06 -7.06290632e-04 4.12868179e-06 1.15246216e-04 4.10506076e-06 7.21610794e-06 1.69048349e-05 -5.39348870e-05 3.75923941e-05 2.13260123e-04 -8.32275071e-06 -8.28899270e-03 -4.01966247e-06 -1.25495233e-06 2.31714385e-04 2.53846290e-06 -1.03995572e-05 8.51559750e-07 4.24952023e-06 -3.30483140e-06 -7.82534933e-04 2.13260123e-04 2.12260058e-02 -1.88611657e-02 4.49743116e-03 -4.28539915e-04 2.00461619e-03 -2.98277030e-05 -7.48913815e-05 1.27504318e-05 -1.72695364e-03 -1.44978187e-04 -2.85669752e-04 -1.12629834e-04 -8.32275071e-06 -1.88611657e-02 2.06041132e-02 1.89297857e-02 1.99716134e-03 -4.10802222e-04 -3.32065905e-04 5.26255113e-06 -2.07560882e-04 -2.79617879e-04 5.85336743e-05 -1.71158075e-03 2.28947051e-02 -8.28899270e-03 4.49743116e-03 1.89297857e-02 -2.51030638e-01 -6.97149552e-05 -5.79195367e-04 5.87964879e-03 -7.58572004e-04 2.52034017e-03 -8.98211232e-05 -1.29388692e-03 -1.19719034e-04 -4.36601610e-06 -4.01966247e-06 -4.28539915e-04 1.99716134e-03 -6.97149552e-05 1.72996833e-06 -8.91563251e-05 5.55982718e-07 1.25402677e-06 -1.54915996e-06 2.64578367e-05 3.83703323e-06 2.60875899e-06 -8.06803305e-06 -1.25495233e-06 2.00461619e-03 -4.10802222e-04 -5.79195367e-04 -8.91563251e-05 1.20450077e-06 1.19334873e-05 -6.39506503e-07 4.76540983e-06 2.43465918e-06 -1.38199706e-06 2.60428974e-05 -7.06290632e-04 2.31714385e-04 -2.98277030e-05 -3.32065905e-04 5.87964879e-03 5.55982718e-07 1.19334873e-05 -1.32121017e-04 1.22464831e-05 -5.65057823e-05 6.06232335e-07 2.09370319e-05 1.52372290e-06 4.12868179e-06 2.53846290e-06 -7.48913815e-05 5.26255113e-06 -7.58572004e-04 1.25402677e-06 -6.39506503e-07 1.22464831e-05 7.63410118e-07 1.11093842e-05 1.08692028e-07 2.55846362e-07 1.84499944e-06 1.15246216e-04 -1.03995572e-05 1.27504318e-05 -2.07560882e-04 2.52034017e-03 -1.54915996e-06 4.76540983e-06 -5.65057823e-05 1.11093842e-05 -2.15933355e-05 1.82532486e-06 1.88266319e-05 1.25079886e-06 4.10506076e-06 8.51559750e-07 -1.72695364e-03 -2.79617879e-04 -8.98211232e-05 2.64578367e-05 2.43465918e-06 6.06232335e-07 1.08692028e-07 1.82532486e-06 1.28177961e-06 -4.95456302e-07 2.20350761e-05 7.21610794e-06 4.24952023e-06 -1.44978187e-04 5.85336743e-05 -1.29388692e-03 3.83703323e-06 -1.38199706e-06 2.09370319e-05 2.55846362e-07 1.88266319e-05 -4.95456302e-07 1.10150480e-06 5.83536261e-07 1.69048349e-05 -3.30483140e-06 -2.85669752e-04 -1.71158075e-03 -1.19719034e-04 2.60875899e-06 2.60428974e-05 1.52372290e-06 1.84499944e-06 1.25079886e-06 2.20350761e-05 5.83536261e-07 1.25888020e-06 9.73358697e-04 -5.24497521e-05 7.71791276e-04 1.26566916e-04 -2.29247964e-02 -1.15752095e-05 -5.84545877e-06 7.19758021e-04 4.19780550e-06 1.16006584e-04 1.69924216e-06 7.32000399e-06 1.21633219e-05 -5.24497521e-05 3.67228436e-05 -2.14994175e-04 -1.24687861e-05 8.23015024e-03 4.60503564e-06 -1.14862855e-06 -2.30017748e-04 2.45015475e-06 -1.06511582e-05 -2.80630140e-07 4.24054409e-06 -2.69920059e-06 7.71791276e-04 -2.14994175e-04 2.10343535e-02 -1.89470691e-02 4.54940609e-03 -4.27187482e-04 2.00198249e-03 -4.87863270e-05 7.35030715e-05 -2.64818782e-05 1.72950757e-03 1.45111271e-04 2.83888757e-04 1.26566916e-04 -1.24687861e-05 -1.89470691e-02 2.06649222e-02 1.89833575e-02 1.99039120e-03 -4.24913256e-04 -3.39360139e-04 -6.81302687e-06 2.00339240e-04 2.75085383e-04 -5.92197483e-05 1.71326927e-03 -2.29247964e-02 8.23015024e-03 4.54940609e-03 1.89833575e-02 -2.50832380e-01 5.33732012e-05 -4.13388431e-04 5.83183195e-03 7.66323778e-04 -2.51496652e-03 1.50325116e-04 1.29681999e-03 1.68779109e-04 -1.15752095e-05 4.60503564e-06 -4.27187482e-04 1.99039120e-03 5.33732012e-05 2.04807668e-06 -8.81771803e-05 -3.45556406e-06 -1.24927244e-06 1.15957686e-06 -2.65596570e-05 -3.78423205e-06 -2.77897092e-06 -5.84545877e-06 -1.14862855e-06 2.00198249e-03 -4.24913256e-04 -4.13388431e-04 -8.81771803e-05 2.23914575e-06 8.12114536e-06 2.23858063e-07 -3.48181621e-06 -2.58085711e-06 5.59776877e-07 -2.61227899e-05 7.19758021e-04 -2.30017748e-04 -4.87863270e-05 -3.39360139e-04 5.83183195e-03 -3.45556406e-06 8.12114536e-06 -1.30557911e-04 -1.23291589e-05 5.59860131e-05 -1.69660670e-06 -2.08151108e-05 -3.49791356e-06 4.19780550e-06 2.45015475e-06 7.35030715e-05 -6.81302687e-06 7.66323778e-04 -1.24927244e-06 2.23858063e-07 -1.23291589e-05 7.37765619e-07 1.11765612e-05 -5.91716112e-08 2.37232914e-07 1.83193233e-06 1.16006584e-04 -1.06511582e-05 -2.64818782e-05 2.00339240e-04 -2.51496652e-03 1.15957686e-06 -3.48181621e-06 5.59860131e-05 1.11765612e-05 -2.15196201e-05 2.28329556e-06 1.88698103e-05 8.46277756e-07 1.69924216e-06 -2.80630140e-07 1.72950757e-03 2.75085383e-04 1.50325116e-04 -2.65596570e-05 -2.58085711e-06 -1.69660670e-06 -5.91716112e-08 2.28329556e-06 1.10854705e-06 -8.00955041e-07 2.19288060e-05 7.32000399e-06 4.24054409e-06 1.45111271e-04 -5.92197483e-05 1.29681999e-03 -3.78423205e-06 5.59776877e-07 -2.08151108e-05 2.37232914e-07 1.88698103e-05 -8.00955041e-07 1.10635148e-06 6.06165209e-07 1.21633219e-05 -2.69920059e-06 2.83888757e-04 1.71326927e-03 1.68779109e-04 -2.77897092e-06 -2.61227899e-05 -3.49791356e-06 1.83193233e-06 8.46277756e-07 2.19288060e-05 6.06165209e-07 1.18296820e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +-1 1 0 314 + 8.00191823e-04 -5.87354670e-05 -2.15487940e-02 7.66760554e-04 7.66760554e-04 5.79664525e-04 -7.14099363e-06 -7.14099363e-06 -7.82059509e-06 -1.13448964e-05 -1.13448964e-05 -1.24491448e-04 -5.87354670e-05 2.31851909e-05 8.34376508e-03 -2.15531485e-04 -2.15531485e-04 -2.32461259e-04 4.34485113e-06 4.34485113e-06 9.91808434e-07 2.72052752e-06 2.72052752e-06 8.94449176e-06 -2.15487940e-02 8.34376508e-03 -2.06932720e-01 -1.79956951e-02 -1.79956951e-02 5.31351769e-03 5.31750642e-04 5.31750642e-04 -1.68310116e-03 4.85404194e-05 4.85404194e-05 1.78049713e-03 7.66760554e-04 -2.15531485e-04 -1.79956951e-02 4.10592132e-03 1.86127797e-02 3.54165425e-04 -4.06760377e-05 -2.02985282e-03 -2.12467694e-04 1.63440378e-03 -3.13237152e-05 -3.80330475e-05 2.69080937e-04 7.66760554e-04 -2.15531485e-04 -1.79956951e-02 1.86127797e-02 4.10592132e-03 3.54165425e-04 -2.02985282e-03 -4.06760377e-05 -2.12467694e-04 -3.13237152e-05 1.63440378e-03 3.80330475e-05 2.69080937e-04 5.79664525e-04 -2.32461259e-04 5.31351769e-03 3.54165425e-04 3.54165425e-04 -1.30377522e-04 -1.20574908e-05 -1.20574908e-05 2.85649901e-05 1.25818052e-07 1.25818052e-07 -4.25052695e-05 -7.14099363e-06 4.34485113e-06 5.31750642e-04 -4.06760377e-05 -2.02985282e-03 -1.20574908e-05 -6.50696410e-06 9.03552037e-05 5.21054342e-06 -2.41440578e-05 -2.61806781e-06 1.72409542e-06 -6.15471610e-06 -7.14099363e-06 4.34485113e-06 5.31750642e-04 -2.02985282e-03 -4.06760377e-05 -1.20574908e-05 9.03552037e-05 -6.50696410e-06 5.21054342e-06 -2.61806781e-06 -2.41440578e-05 -1.72409542e-06 -6.15471610e-06 -7.82059509e-06 9.91808434e-07 -1.68310116e-03 -2.12467694e-04 -2.12467694e-04 2.85649901e-05 5.21054342e-06 5.21054342e-06 7.34061477e-07 1.81143976e-06 1.81143976e-06 2.34668312e-05 -1.13448964e-05 2.72052752e-06 4.85404194e-05 1.63440378e-03 -3.13237152e-05 1.25818052e-07 -2.41440578e-05 -2.61806781e-06 1.81143976e-06 -2.10338601e-06 -2.05844595e-05 8.94007524e-07 -2.09281114e-06 -1.13448964e-05 2.72052752e-06 4.85404194e-05 -3.13237152e-05 1.63440378e-03 1.25818052e-07 -2.61806781e-06 -2.41440578e-05 1.81143976e-06 -2.05844595e-05 -2.10338601e-06 -8.94007524e-07 -2.09281114e-06 -3.80330475e-05 3.80330475e-05 1.72409542e-06 -1.72409542e-06 8.94007524e-07 -8.94007524e-07 1.92518589e-07 -1.24491448e-04 8.94449176e-06 1.78049713e-03 2.69080937e-04 2.69080937e-04 -4.25052695e-05 -6.15471610e-06 -6.15471610e-06 2.34668312e-05 -2.09281114e-06 -2.09281114e-06 -1.34870436e-05 8.16435485e-04 -4.34560325e-05 2.16989349e-02 -7.61794638e-04 -7.61794638e-04 -6.37180982e-04 6.39657600e-06 6.39657600e-06 -7.76766664e-06 -1.12762136e-05 -1.12762136e-05 -1.23026063e-04 -4.34560325e-05 2.56551279e-05 -8.18703017e-03 2.20932884e-04 2.20932884e-04 2.29769813e-04 -4.59485855e-06 -4.59485855e-06 1.78988980e-08 2.72943586e-06 2.72943586e-06 1.00491890e-05 2.16989349e-02 -8.18703017e-03 -2.06565600e-01 -1.79997021e-02 -1.79997021e-02 5.14854770e-03 5.40088650e-04 5.40088650e-04 1.68700198e-03 -4.31460992e-05 -4.31460992e-05 -1.81811033e-03 -7.61794638e-04 2.20932884e-04 -1.79997021e-02 3.78294925e-03 1.87514707e-02 3.53407664e-04 -1.01363895e-05 -2.03409318e-03 2.14694489e-04 -1.63539304e-03 4.23692834e-05 3.93485777e-05 -2.67534175e-04 -7.61794638e-04 2.20932884e-04 -1.79997021e-02 1.87514707e-02 3.78294925e-03 3.53407664e-04 -2.03409318e-03 -1.01363895e-05 2.14694489e-04 4.23692834e-05 -1.63539304e-03 -3.93485777e-05 -2.67534175e-04 -6.37180982e-04 2.29769813e-04 5.14854770e-03 3.53407664e-04 3.53407664e-04 -1.22636886e-04 -1.21436270e-05 -1.21436270e-05 -2.84631798e-05 -2.11405637e-07 -2.11405637e-07 4.35697451e-05 6.39657600e-06 -4.59485855e-06 5.40088650e-04 -1.01363895e-05 -2.03409318e-03 -1.21436270e-05 -4.79824282e-06 8.87240864e-05 -5.36472971e-06 2.42749794e-05 3.38336064e-06 -1.73037555e-06 6.27995462e-06 6.39657600e-06 -4.59485855e-06 5.40088650e-04 -2.03409318e-03 -1.01363895e-05 -1.21436270e-05 8.87240864e-05 -4.79824282e-06 -5.36472971e-06 3.38336064e-06 2.42749794e-05 1.73037555e-06 6.27995462e-06 -7.76766664e-06 1.78988980e-08 1.68700198e-03 2.14694489e-04 2.14694489e-04 -2.84631798e-05 -5.36472971e-06 -5.36472971e-06 7.64740405e-07 1.76825758e-06 1.76825758e-06 2.35272294e-05 -1.12762136e-05 2.72943586e-06 -4.31460992e-05 -1.63539304e-03 4.23692834e-05 -2.11405637e-07 2.42749794e-05 3.38336064e-06 1.76825758e-06 -1.56608428e-06 -2.03379520e-05 8.92242809e-07 -1.97462922e-06 -1.12762136e-05 2.72943586e-06 -4.31460992e-05 4.23692834e-05 -1.63539304e-03 -2.11405637e-07 3.38336064e-06 2.42749794e-05 1.76825758e-06 -2.03379520e-05 -1.56608428e-06 -8.92242809e-07 -1.97462922e-06 3.93485777e-05 -3.93485777e-05 -1.73037555e-06 1.73037555e-06 8.92242809e-07 -8.92242809e-07 1.99858664e-07 -1.23026063e-04 1.00491890e-05 -1.81811033e-03 -2.67534175e-04 -2.67534175e-04 4.35697451e-05 6.27995462e-06 6.27995462e-06 2.35272294e-05 -1.97462922e-06 -1.97462922e-06 -1.30828454e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 169 181 193 206 219 231 244 257 269 282 295 302 314 +0 -1 0 507 + 6.73361942e-04 -3.97537772e-05 7.92408229e-04 1.31266047e-04 -2.08943763e-02 -1.72965599e-05 7.00477616e-06 5.42656099e-04 3.94541403e-06 -1.20934462e-04 4.81371689e-08 7.37597696e-06 -1.16470146e-05 -2.30970536e-02 5.66887190e-03 -1.83768890e-04 4.79903222e-05 -6.04318066e-05 -2.02907584e-03 1.92358576e-03 -2.10279721e-03 -5.47231757e-08 1.48588589e-03 -1.60788675e-03 5.25276936e-05 1.54738933e-03 -3.97537772e-05 1.60670407e-05 -2.12667446e-04 7.98001436e-06 8.26935955e-03 4.25595524e-06 1.75054518e-06 -2.30924551e-04 -2.62363319e-06 9.06842324e-06 -1.61175046e-06 -4.37520218e-06 3.04562873e-06 5.94037473e-03 -3.35393364e-04 4.11745563e-03 -4.26787793e-03 4.02735793e-03 -1.05916310e-04 1.11812472e-04 -9.60150546e-05 1.96413971e-07 -6.19264361e-06 1.93401252e-05 2.84529967e-06 -1.29767783e-05 7.92408229e-04 -2.12667446e-04 -2.14829023e-02 1.75293540e-02 -3.71268150e-03 4.88599897e-04 -2.04695642e-03 9.01879561e-05 7.52737246e-05 1.22639815e-04 1.59938622e-03 1.39228798e-04 3.19255962e-04 2.09662763e-06 -4.04833836e-03 -5.36715690e-02 2.21052348e-01 -2.44138640e-01 2.33518808e-05 -5.21750510e-03 5.92110603e-03 -8.88773026e-04 -1.86241064e-03 1.73137916e-03 -1.52367404e-04 -1.73326849e-03 1.31266047e-04 7.98001436e-06 1.75293540e-02 -2.08026443e-02 -1.89085567e-02 -2.04072172e-03 4.72221132e-04 3.33041135e-04 1.06213432e-04 2.12351595e-04 3.10813800e-04 4.96620554e-06 1.58339328e-03 1.14474191e-04 4.13501486e-03 2.21022945e-01 -3.14277441e-02 2.34513293e-01 -5.37854297e-03 -5.38296209e-04 -5.76269634e-03 -3.52799019e-04 1.61511410e-03 -1.41761428e-03 7.72206803e-04 1.51421276e-03 -2.08943763e-02 8.26935955e-03 -3.71268150e-03 -1.89085567e-02 -1.81977887e-01 1.40640772e-04 4.61074437e-04 4.95961374e-03 9.19749440e-04 1.40876300e-03 1.52966528e-04 1.55859666e-03 -4.40258755e-05 -8.15517156e-05 -3.87799502e-03 -2.43868036e-01 2.34367319e-01 -7.16630172e-02 5.83941993e-03 -5.51280191e-03 4.12201360e-04 4.53245914e-04 -1.97088972e-03 1.98883091e-03 6.39785684e-04 -2.02052298e-03 -1.72965599e-05 4.25595524e-06 4.88599897e-04 -2.04072172e-03 1.40640772e-04 -1.57823544e-05 9.12826691e-05 -4.39825444e-06 -1.27991946e-06 -2.72506963e-06 -2.31224839e-05 -3.80797434e-06 -1.05398619e-05 2.31797641e-03 9.94342201e-05 8.40500891e-05 -5.46740884e-03 5.94337156e-03 2.38849929e-05 1.34427742e-04 -1.49379862e-04 1.50846888e-05 4.25840113e-05 -3.54165283e-05 4.27319573e-06 2.97436636e-05 7.00477616e-06 1.75054518e-06 -2.04695642e-03 4.72221132e-04 4.61074437e-04 9.12826691e-05 -1.53380790e-05 -9.01745553e-06 -2.22079191e-06 -4.00517617e-06 -1.03262115e-05 1.64895602e-08 -2.27178464e-05 -2.22301970e-03 -1.07877289e-04 -5.37624081e-03 -4.01763639e-04 -5.61031003e-03 1.35489660e-04 3.79055304e-05 1.42989791e-04 5.39509780e-06 -3.61413449e-05 2.24733557e-05 -1.32282734e-05 -3.23124980e-05 5.42656099e-04 -2.30924551e-04 9.01879561e-05 3.33041135e-04 4.95961374e-03 -4.39825444e-06 -9.01745553e-06 -1.28104111e-04 -1.61753760e-05 -3.53600279e-05 -2.13841414e-06 -2.74194417e-05 1.83218511e-06 2.40771110e-03 9.15295789e-05 6.06657551e-03 -5.82300543e-03 5.58610719e-04 -1.49956653e-04 1.42290366e-04 1.22086375e-05 -8.39813516e-06 3.60498903e-05 -4.15542569e-05 -1.00704641e-05 4.49706024e-05 3.94541403e-06 -2.62363319e-06 7.52737246e-05 1.06213432e-04 9.19749440e-04 -1.27991946e-06 -2.22079191e-06 -1.61753760e-05 -9.34885278e-07 -1.25341370e-05 -1.20221699e-06 -2.91206873e-07 -1.66578969e-06 -2.43071797e-07 -2.86358914e-07 8.85894806e-04 3.51863680e-04 -4.55645634e-04 -1.49866022e-05 -5.06922523e-06 8.21974934e-06 6.28992205e-06 -5.68520737e-06 5.57191371e-06 -2.85704469e-07 1.25586484e-05 -1.20934462e-04 9.06842324e-06 1.22639815e-04 2.12351595e-04 1.40876300e-03 -2.72506963e-06 -4.00517617e-06 -3.53600279e-05 -1.25341370e-05 -1.00227308e-05 -2.42238671e-06 -2.11474313e-05 -1.03082780e-06 1.42206233e-03 -7.24007071e-06 1.82357183e-03 -1.60786809e-03 1.92551919e-03 -4.09493519e-05 3.44249429e-05 -3.33531383e-05 -5.60896386e-06 3.07999331e-05 -2.07810848e-05 -9.09812263e-06 2.34815694e-05 4.81371689e-08 -1.61175046e-06 1.59938622e-03 3.10813800e-04 1.52966528e-04 -2.31224839e-05 -1.03262115e-05 -2.13841414e-06 -1.20221699e-06 -2.42238671e-06 -5.82926895e-06 -1.76507771e-08 -1.98888934e-05 -1.54432729e-03 1.99491717e-05 -1.68902008e-03 1.37253496e-03 -1.96572509e-03 3.42841905e-05 -2.02684488e-05 4.04904295e-05 5.50844326e-06 -2.04037581e-05 1.52786244e-05 -1.09640961e-05 -1.67291900e-05 7.37597696e-06 -4.37520218e-06 1.39228798e-04 4.96620554e-06 1.55859666e-03 -3.80797434e-06 1.64895602e-08 -2.74194417e-05 -2.91206873e-07 -2.11474313e-05 -1.76507771e-08 -1.19495073e-06 -5.11705169e-07 5.19099848e-05 2.66335103e-06 1.50808329e-04 -7.70527997e-04 -6.38070122e-04 -4.12883227e-06 1.35261994e-05 1.04591462e-05 -2.52154614e-07 -8.89189683e-06 -1.07864540e-05 6.17212951e-06 9.84746047e-07 -1.16470146e-05 3.04562873e-06 3.19255962e-04 1.58339328e-03 -4.40258755e-05 -1.05398619e-05 -2.27178464e-05 1.83218511e-06 -1.66578969e-06 -1.03082780e-06 -1.98888934e-05 -5.11705169e-07 -5.95160958e-06 1.47631583e-03 -1.16926507e-05 1.70725211e-03 -1.49575572e-03 2.00321284e-03 -2.87870079e-05 3.03095393e-05 -4.32676487e-05 1.25949487e-05 2.38041797e-05 -1.73577445e-05 9.90651717e-07 2.40545549e-05 6.75660007e-04 -3.70583968e-05 -7.60183549e-04 -1.51406289e-04 2.09274361e-02 -1.64162023e-06 8.02440447e-06 -5.54621534e-04 3.71527257e-06 -1.20903168e-04 1.41830964e-06 7.05570119e-06 -1.46557977e-05 -3.70583968e-05 1.50522051e-05 2.16903688e-04 6.71138355e-06 -8.22741963e-03 -3.48363816e-06 9.16193695e-07 2.29517192e-04 -2.54427436e-06 9.28543243e-06 -5.37690715e-07 -4.37638627e-06 3.64659964e-06 -7.60183549e-04 2.16903688e-04 -2.12881964e-02 1.76032039e-02 -3.67288888e-03 4.85036763e-04 -2.04259252e-03 1.05677681e-04 -7.38170330e-05 -1.10916847e-04 -1.59888601e-03 -1.38435699e-04 -3.17602844e-04 -1.51406289e-04 6.71138355e-06 1.76032039e-02 -2.08557672e-02 -1.90264795e-02 -2.04011682e-03 4.82257184e-04 3.53343551e-04 -1.05167768e-04 -2.05459987e-04 -3.06738183e-04 -5.27889387e-06 -1.58582400e-03 2.09274361e-02 -8.22741963e-03 -3.67288888e-03 -1.90264795e-02 -1.82082090e-01 3.35823876e-05 5.70967741e-04 4.94466670e-03 -9.18925056e-04 -1.40231869e-03 -1.17448539e-04 -1.56254351e-03 -2.57406725e-06 -1.64162023e-06 -3.48363816e-06 4.85036763e-04 -2.04011682e-03 3.35823876e-05 -1.51869930e-05 9.03878041e-05 -6.98851141e-07 1.27799009e-06 3.22070996e-06 2.30237241e-05 3.75439524e-06 1.05310605e-05 8.02440447e-06 9.16193695e-07 -2.04259252e-03 4.82257184e-04 5.70967741e-04 9.03878041e-05 -1.53786153e-05 -1.24035629e-05 2.71694594e-06 4.34454045e-06 1.02971341e-05 9.81035752e-07 2.27171575e-05 -5.54621534e-04 2.29517192e-04 1.05677681e-04 3.53343551e-04 4.94466670e-03 -6.98851141e-07 -1.24035629e-05 -1.27406033e-04 1.61114847e-05 3.51900561e-05 1.80762506e-06 2.73107074e-05 3.94949154e-08 3.71527257e-06 -2.54427436e-06 -7.38170330e-05 -1.05167768e-04 -9.18925056e-04 1.27799009e-06 2.71694594e-06 1.61114847e-05 -8.99249570e-07 -1.24953939e-05 -1.00005934e-06 -2.66013274e-07 -1.65640447e-06 -1.20903168e-04 9.28543243e-06 -1.10916847e-04 -2.05459987e-04 -1.40231869e-03 3.22070996e-06 4.34454045e-06 3.51900561e-05 -1.24953939e-05 -9.81822232e-06 -2.00165153e-06 -2.11801885e-05 -6.70871051e-07 1.41830964e-06 -5.37690715e-07 -1.59888601e-03 -3.06738183e-04 -1.17448539e-04 2.30237241e-05 1.02971341e-05 1.80762506e-06 -1.00005934e-06 -2.00165153e-06 -5.72796451e-06 3.38554894e-07 -1.98226003e-05 7.05570119e-06 -4.37638627e-06 -1.38435699e-04 -5.27889387e-06 -1.56254351e-03 3.75439524e-06 9.81035752e-07 2.73107074e-05 -2.66013274e-07 -2.11801885e-05 3.38554894e-07 -1.19986110e-06 -5.24586487e-07 -1.46557977e-05 3.64659964e-06 -3.17602844e-04 -1.58582400e-03 -2.57406725e-06 1.05310605e-05 2.27171575e-05 3.94949154e-08 -1.65640447e-06 -6.70871051e-07 -1.98226003e-05 -5.24586487e-07 -5.94200596e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +0 -1 1 338 + 9.71085217e-04 -5.39348870e-05 -7.82534933e-04 2.28947051e-02 -1.12629834e-04 -4.36601610e-06 -7.06290632e-04 -8.06803305e-06 4.12868179e-06 4.10506076e-06 1.15246216e-04 -7.21610794e-06 1.69048349e-05 -5.39348870e-05 3.75923941e-05 2.13260123e-04 -8.28899270e-03 -8.32275071e-06 -4.01966247e-06 2.31714385e-04 -1.25495233e-06 2.53846290e-06 8.51559750e-07 -1.03995572e-05 -4.24952023e-06 -3.30483140e-06 -7.82534933e-04 2.13260123e-04 2.12260058e-02 4.49743116e-03 -1.88611657e-02 -4.28539915e-04 -2.98277030e-05 2.00461619e-03 -7.48913815e-05 -1.72695364e-03 1.27504318e-05 1.44978187e-04 -2.85669752e-04 2.28947051e-02 -8.28899270e-03 4.49743116e-03 -2.51030638e-01 1.89297857e-02 -6.97149552e-05 5.87964879e-03 -5.79195367e-04 -7.58572004e-04 -8.98211232e-05 2.52034017e-03 1.29388692e-03 -1.19719034e-04 -1.12629834e-04 -8.32275071e-06 -1.88611657e-02 1.89297857e-02 2.06041132e-02 1.99716134e-03 -3.32065905e-04 -4.10802222e-04 5.26255113e-06 -2.79617879e-04 -2.07560882e-04 -5.85336743e-05 -1.71158075e-03 -4.36601610e-06 -4.01966247e-06 -4.28539915e-04 -6.97149552e-05 1.99716134e-03 1.72996833e-06 5.55982718e-07 -8.91563251e-05 1.25402677e-06 2.64578367e-05 -1.54915996e-06 -3.83703323e-06 2.60875899e-06 -7.06290632e-04 2.31714385e-04 -2.98277030e-05 5.87964879e-03 -3.32065905e-04 5.55982718e-07 -1.32121017e-04 1.19334873e-05 1.22464831e-05 6.06232335e-07 -5.65057823e-05 -2.09370319e-05 1.52372290e-06 -8.06803305e-06 -1.25495233e-06 2.00461619e-03 -5.79195367e-04 -4.10802222e-04 -8.91563251e-05 1.19334873e-05 1.20450077e-06 -6.39506503e-07 2.43465918e-06 4.76540983e-06 1.38199706e-06 2.60428974e-05 4.12868179e-06 2.53846290e-06 -7.48913815e-05 -7.58572004e-04 5.26255113e-06 1.25402677e-06 1.22464831e-05 -6.39506503e-07 7.63410118e-07 1.08692028e-07 1.11093842e-05 -2.55846362e-07 1.84499944e-06 4.10506076e-06 8.51559750e-07 -1.72695364e-03 -8.98211232e-05 -2.79617879e-04 2.64578367e-05 6.06232335e-07 2.43465918e-06 1.08692028e-07 1.28177961e-06 1.82532486e-06 4.95456302e-07 2.20350761e-05 1.15246216e-04 -1.03995572e-05 1.27504318e-05 2.52034017e-03 -2.07560882e-04 -1.54915996e-06 -5.65057823e-05 4.76540983e-06 1.11093842e-05 1.82532486e-06 -2.15933355e-05 -1.88266319e-05 1.25079886e-06 -7.21610794e-06 -4.24952023e-06 1.44978187e-04 1.29388692e-03 -5.85336743e-05 -3.83703323e-06 -2.09370319e-05 1.38199706e-06 -2.55846362e-07 4.95456302e-07 -1.88266319e-05 1.10150480e-06 -5.83536261e-07 1.69048349e-05 -3.30483140e-06 -2.85669752e-04 -1.19719034e-04 -1.71158075e-03 2.60875899e-06 1.52372290e-06 2.60428974e-05 1.84499944e-06 2.20350761e-05 1.25079886e-06 -5.83536261e-07 1.25888020e-06 9.73358697e-04 -5.24497521e-05 7.71791276e-04 -2.29247964e-02 1.26566916e-04 -1.15752095e-05 7.19758021e-04 -5.84545877e-06 4.19780550e-06 1.69924216e-06 1.16006584e-04 -7.32000399e-06 1.21633219e-05 -5.24497521e-05 3.67228436e-05 -2.14994175e-04 8.23015024e-03 -1.24687861e-05 4.60503564e-06 -2.30017748e-04 -1.14862855e-06 2.45015475e-06 -2.80630140e-07 -1.06511582e-05 -4.24054409e-06 -2.69920059e-06 7.71791276e-04 -2.14994175e-04 2.10343535e-02 4.54940609e-03 -1.89470691e-02 -4.27187482e-04 -4.87863270e-05 2.00198249e-03 7.35030715e-05 1.72950757e-03 -2.64818782e-05 -1.45111271e-04 2.83888757e-04 -2.29247964e-02 8.23015024e-03 4.54940609e-03 -2.50832380e-01 1.89833575e-02 5.33732012e-05 5.83183195e-03 -4.13388431e-04 7.66323778e-04 1.50325116e-04 -2.51496652e-03 -1.29681999e-03 1.68779109e-04 1.26566916e-04 -1.24687861e-05 -1.89470691e-02 1.89833575e-02 2.06649222e-02 1.99039120e-03 -3.39360139e-04 -4.24913256e-04 -6.81302687e-06 2.75085383e-04 2.00339240e-04 5.92197483e-05 1.71326927e-03 -1.15752095e-05 4.60503564e-06 -4.27187482e-04 5.33732012e-05 1.99039120e-03 2.04807668e-06 -3.45556406e-06 -8.81771803e-05 -1.24927244e-06 -2.65596570e-05 1.15957686e-06 3.78423205e-06 -2.77897092e-06 7.19758021e-04 -2.30017748e-04 -4.87863270e-05 5.83183195e-03 -3.39360139e-04 -3.45556406e-06 -1.30557911e-04 8.12114536e-06 -1.23291589e-05 -1.69660670e-06 5.59860131e-05 2.08151108e-05 -3.49791356e-06 -5.84545877e-06 -1.14862855e-06 2.00198249e-03 -4.13388431e-04 -4.24913256e-04 -8.81771803e-05 8.12114536e-06 2.23914575e-06 2.23858063e-07 -2.58085711e-06 -3.48181621e-06 -5.59776877e-07 -2.61227899e-05 4.19780550e-06 2.45015475e-06 7.35030715e-05 7.66323778e-04 -6.81302687e-06 -1.24927244e-06 -1.23291589e-05 2.23858063e-07 7.37765619e-07 -5.91716112e-08 1.11765612e-05 -2.37232914e-07 1.83193233e-06 1.69924216e-06 -2.80630140e-07 1.72950757e-03 1.50325116e-04 2.75085383e-04 -2.65596570e-05 -1.69660670e-06 -2.58085711e-06 -5.91716112e-08 1.10854705e-06 2.28329556e-06 8.00955041e-07 2.19288060e-05 1.16006584e-04 -1.06511582e-05 -2.64818782e-05 -2.51496652e-03 2.00339240e-04 1.15957686e-06 5.59860131e-05 -3.48181621e-06 1.11765612e-05 2.28329556e-06 -2.15196201e-05 -1.88698103e-05 8.46277756e-07 -7.32000399e-06 -4.24054409e-06 -1.45111271e-04 -1.29681999e-03 5.92197483e-05 3.78423205e-06 2.08151108e-05 -5.59776877e-07 -2.37232914e-07 8.00955041e-07 -1.88698103e-05 1.10635148e-06 -6.06165209e-07 1.21633219e-05 -2.69920059e-06 2.83888757e-04 1.68779109e-04 1.71326927e-03 -2.77897092e-06 -3.49791356e-06 -2.61227899e-05 1.83193233e-06 2.19288060e-05 8.46277756e-07 -6.06165209e-07 1.18296820e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +0 0 -1 471 + 8.27104610e-04 -3.98659597e-05 2.19421402e-02 -7.52756885e-04 -7.52756885e-04 -6.59182760e-04 6.13204445e-06 6.13204445e-06 -8.98360229e-06 1.47730474e-05 1.47730474e-05 1.15340247e-04 -2.51099580e-02 6.29348353e-03 -6.31050033e-05 -1.02757553e-04 -1.02757553e-04 2.60857304e-03 2.52870419e-03 2.52870419e-03 -3.53858037e-05 -1.65890102e-03 -1.65890102e-03 -1.59030648e-03 -3.98659597e-05 3.04867240e-05 -8.25959908e-03 2.16830303e-04 2.16830303e-04 2.31079442e-04 -3.92703250e-06 -3.92703250e-06 -8.77599430e-07 -3.48442376e-06 -3.48442376e-06 -9.80783619e-06 6.19555076e-03 -3.52773476e-04 -3.73009218e-03 -3.83582926e-03 -3.83582926e-03 8.99427453e-05 1.00011400e-04 1.00011400e-04 -1.51781937e-06 2.53152986e-05 2.53152986e-05 1.84962941e-05 2.19421402e-02 -8.25959908e-03 -2.25776063e-01 1.89809289e-02 1.89809289e-02 5.53116207e-03 -4.57345177e-04 -4.57345177e-04 1.67957642e-03 -2.05339061e-04 -2.05339061e-04 2.13977213e-03 1.69229525e-05 3.73429640e-03 -5.41240037e-02 -2.63046522e-01 -2.63046522e-01 2.57178258e-04 6.22850503e-03 6.22850503e-03 6.27445862e-04 -2.17977514e-03 -2.17977514e-03 -1.74058321e-03 -7.52756885e-04 2.16830303e-04 1.89809289e-02 -4.42337412e-03 -1.99801595e-02 -2.96907823e-04 9.87691772e-05 2.06245949e-03 1.02094724e-04 -1.62612876e-03 6.79594298e-05 -2.59762802e-05 -1.35102921e-04 7.00887608e-05 3.92447806e-03 -2.63136107e-01 -3.47195602e-02 -2.48816247e-01 6.29755746e-03 -1.84758420e-04 5.89069487e-03 -4.38409070e-04 -1.89467534e-03 -1.49426456e-03 5.69688749e-04 -2.01592823e-03 -7.52756885e-04 2.16830303e-04 1.89809289e-02 -1.99801595e-02 -4.42337412e-03 -2.96907823e-04 2.06245949e-03 9.87691772e-05 1.02094724e-04 6.79594298e-05 -1.62612876e-03 2.59762802e-05 -1.35102921e-04 7.00887608e-05 3.92447806e-03 -2.63136107e-01 -2.48816247e-01 -3.47195602e-02 6.29755746e-03 5.89069487e-03 -1.84758420e-04 -4.38409070e-04 -1.49426456e-03 -1.89467534e-03 -5.69688749e-04 -2.01592823e-03 -6.59182760e-04 2.31079442e-04 5.53116207e-03 -2.96907823e-04 -2.96907823e-04 -1.30343116e-04 8.15257998e-06 8.15257998e-06 -2.84912122e-05 3.01530942e-06 3.01530942e-06 -4.91702808e-05 -2.47473809e-03 -9.36892358e-05 1.85055545e-04 6.25899244e-03 6.25899244e-03 1.67811984e-05 -1.52552102e-04 -1.52552102e-04 -9.48786416e-06 4.42482840e-05 4.42482840e-05 3.01227762e-05 6.13204445e-06 -3.92703250e-06 -4.57345177e-04 9.87691772e-05 2.06245949e-03 8.15257998e-06 -7.39028050e-06 -9.10026813e-05 -2.55956238e-06 2.39686419e-05 -5.34389762e-06 5.89912211e-08 1.90580090e-06 -2.38289235e-03 -1.01946718e-04 6.11171644e-03 -3.27586255e-04 5.88159758e-03 -1.51455682e-04 2.98383132e-05 -1.43726904e-04 7.39129912e-06 3.75821848e-05 2.36039275e-05 -8.39798432e-06 4.17074093e-05 6.13204445e-06 -3.92703250e-06 -4.57345177e-04 2.06245949e-03 9.87691772e-05 8.15257998e-06 -9.10026813e-05 -7.39028050e-06 -2.55956238e-06 -5.34389762e-06 2.39686419e-05 -5.89912211e-08 1.90580090e-06 -2.38289235e-03 -1.01946718e-04 6.11171644e-03 5.88159758e-03 -3.27586255e-04 -1.51455682e-04 -1.43726904e-04 2.98383132e-05 7.39129912e-06 2.36039275e-05 3.75821848e-05 8.39798432e-06 4.17074093e-05 -8.98360229e-06 -8.77599430e-07 1.67957642e-03 1.02094724e-04 1.02094724e-04 -2.84912122e-05 -2.55956238e-06 -2.55956238e-06 -5.70652424e-07 -8.59672212e-07 -8.59672212e-07 -2.36211053e-05 -3.86038745e-05 -1.08295240e-06 -6.16597941e-04 4.41211161e-04 4.41211161e-04 9.07578221e-06 -7.64320267e-06 -7.64320267e-06 6.65712733e-06 5.97486234e-06 5.97486234e-06 -9.23640909e-06 1.47730474e-05 -3.48442376e-06 -2.05339061e-04 -1.62612876e-03 6.79594298e-05 3.01530942e-06 2.39686419e-05 -5.34389762e-06 -8.59672212e-07 -2.51151738e-06 2.04683267e-05 -1.56482757e-06 2.19597788e-06 -1.70448353e-03 2.43991765e-05 2.24188540e-03 1.92309318e-03 1.54556997e-03 -4.55107520e-05 -3.86120149e-05 -2.57795373e-05 6.03234159e-06 1.81574088e-05 1.80451259e-05 8.93697594e-06 2.25340319e-05 1.47730474e-05 -3.48442376e-06 -2.05339061e-04 6.79594298e-05 -1.62612876e-03 3.01530942e-06 -5.34389762e-06 2.39686419e-05 -8.59672212e-07 2.04683267e-05 -2.51151738e-06 1.56482757e-06 2.19597788e-06 -1.70448353e-03 2.43991765e-05 2.24188540e-03 1.54556997e-03 1.92309318e-03 -4.55107520e-05 -2.57795373e-05 -3.86120149e-05 6.03234159e-06 1.80451259e-05 1.81574088e-05 -8.93697594e-06 2.25340319e-05 -2.59762802e-05 2.59762802e-05 5.89912211e-08 -5.89912211e-08 -1.56482757e-06 1.56482757e-06 -3.53216145e-07 -5.67713655e-04 5.67713655e-04 7.94898406e-06 -7.94898406e-06 9.02916025e-06 -9.02916025e-06 6.82205343e-06 1.15340247e-04 -9.80783619e-06 2.13977213e-03 -1.35102921e-04 -1.35102921e-04 -4.91702808e-05 1.90580090e-06 1.90580090e-06 -2.36211053e-05 2.19597788e-06 2.19597788e-06 -1.79402382e-05 -1.64089484e-03 1.97314544e-05 1.76316450e-03 2.04213106e-03 2.04213106e-03 -3.07909725e-05 -4.35028479e-05 -4.35028479e-05 -9.33248770e-06 2.18671970e-05 2.18671970e-05 2.52734444e-05 8.15725212e-04 -5.05906081e-05 -2.18500845e-02 7.52686511e-04 7.52686511e-04 6.26926343e-04 -3.63481072e-06 -3.63481072e-06 -8.75085739e-06 1.48099130e-05 1.48099130e-05 1.17349286e-04 -5.05906081e-05 2.62254306e-05 8.33373538e-03 -2.15977210e-04 -2.15977210e-04 -2.30644690e-04 3.99602285e-06 3.99602285e-06 1.09623033e-07 -3.51931327e-06 -3.51931327e-06 -8.78544054e-06 -2.18500845e-02 8.33373538e-03 -2.26052722e-01 1.89193599e-02 1.89193599e-02 5.63429114e-03 -4.65884716e-04 -4.65884716e-04 -1.68355408e-03 2.05502133e-04 2.05502133e-04 -2.09251695e-03 7.52686511e-04 -2.15977210e-04 1.89193599e-02 -4.10207947e-03 -1.99611802e-02 -2.88305530e-04 6.88335999e-05 2.06132901e-03 -1.03715979e-04 1.63080656e-03 -7.82907019e-05 2.57365101e-05 1.33566268e-04 7.52686511e-04 -2.15977210e-04 1.89193599e-02 -1.99611802e-02 -4.10207947e-03 -2.88305530e-04 2.06132901e-03 6.88335999e-05 -1.03715979e-04 -7.82907019e-05 1.63080656e-03 -2.57365101e-05 1.33566268e-04 6.26926343e-04 -2.30644690e-04 5.63429114e-03 -2.88305530e-04 -2.88305530e-04 -1.35699991e-04 8.00918394e-06 8.00918394e-06 2.83805832e-05 -3.10746156e-06 -3.10746156e-06 4.75031374e-05 -3.63481072e-06 3.99602285e-06 -4.65884716e-04 6.88335999e-05 2.06132901e-03 8.00918394e-06 -8.47747415e-06 -9.12584526e-05 2.64110970e-06 -2.38213614e-05 4.37847663e-06 -1.57238704e-08 -1.96776833e-06 -3.63481072e-06 3.99602285e-06 -4.65884716e-04 2.06132901e-03 6.88335999e-05 8.00918394e-06 -9.12584526e-05 -8.47747415e-06 2.64110970e-06 4.37847663e-06 -2.38213614e-05 1.57238704e-08 -1.96776833e-06 -8.75085739e-06 1.09623033e-07 -1.68355408e-03 -1.03715979e-04 -1.03715979e-04 2.83805832e-05 2.64110970e-06 2.64110970e-06 -6.09131767e-07 -8.32998995e-07 -8.32998995e-07 -2.36780374e-05 1.48099130e-05 -3.51931327e-06 2.05502133e-04 1.63080656e-03 -7.82907019e-05 -3.10746156e-06 -2.38213614e-05 4.37847663e-06 -8.32998995e-07 -3.10927343e-06 2.05811303e-05 -1.59128036e-06 2.15926195e-06 1.48099130e-05 -3.51931327e-06 2.05502133e-04 -7.82907019e-05 1.63080656e-03 -3.10746156e-06 4.37847663e-06 -2.38213614e-05 -8.32998995e-07 2.05811303e-05 -3.10927343e-06 1.59128036e-06 2.15926195e-06 2.57365101e-05 -2.57365101e-05 -1.57238704e-08 1.57238704e-08 -1.59128036e-06 1.59128036e-06 -3.63854940e-07 1.17349286e-04 -8.78544054e-06 -2.09251695e-03 1.33566268e-04 1.33566268e-04 4.75031374e-05 -1.96776833e-06 -1.96776833e-06 -2.36780374e-05 2.15926195e-06 2.15926195e-06 -1.81079545e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 24 48 72 98 124 148 174 200 224 250 276 290 314 326 338 350 363 376 388 401 414 426 439 452 459 471 +0 0 0 628 + 1.99260091e+00 -1.75144175e-02 -1.02750088e-03 -4.17823329e-03 -4.17823329e-03 2.60603267e-04 6.81049240e-05 6.81049240e-05 3.70981740e-05 1.84242778e-03 1.84242778e-03 1.46101812e-04 -2.11117916e-02 5.77475205e-03 5.83412971e-05 -9.28697342e-05 -9.28697342e-05 2.23771540e-03 -2.33786484e-03 -2.33786484e-03 2.50009800e-05 1.29464718e-03 1.29464718e-03 -1.34875862e-03 -1.75144175e-02 6.95336019e-04 -1.26443980e-04 -1.10294372e-04 -1.10294372e-04 3.65040008e-06 1.09201094e-05 1.09201094e-05 -4.41016479e-07 -2.08002958e-05 -2.08002958e-05 -2.05232644e-06 5.67001664e-03 -3.25779578e-04 -4.34699780e-03 4.21399613e-03 4.21399613e-03 1.03798709e-04 -9.84988221e-05 -9.84988221e-05 1.60498129e-06 -1.65049900e-06 -1.65049900e-06 7.75238899e-06 -1.02750088e-03 -1.26443980e-04 5.88519897e-01 2.42103707e-02 2.42103707e-02 -1.35113803e-02 -5.27286187e-04 -5.27286187e-04 -7.38278356e-05 -2.47997580e-04 -2.47997580e-04 -5.29194473e-03 -1.58904072e-04 4.36260980e-03 -3.74836897e-02 2.12825117e-01 2.12825117e-01 -3.04467391e-04 -5.40453219e-03 -5.40453219e-03 9.67248841e-04 1.45612957e-03 1.45612957e-03 -1.41025838e-03 -4.17823329e-03 -1.10294372e-04 2.42103707e-02 5.87760421e-01 1.06406231e-03 -5.27681867e-04 -1.34760450e-02 1.07506905e-04 -1.09596827e-04 -8.63085367e-05 -5.29497248e-03 1.70552890e-04 -2.32570998e-04 1.41884587e-04 -4.30789668e-03 2.13045074e-01 -5.97021554e-02 -2.20865737e-01 -5.27596403e-03 2.56416836e-04 5.55065464e-03 4.42428956e-04 -1.65920515e-03 -1.72780240e-03 -8.84003183e-04 1.65691459e-03 -4.17823329e-03 -1.10294372e-04 2.42103707e-02 1.06406231e-03 5.87760421e-01 -5.27681867e-04 1.07506905e-04 -1.34760450e-02 -1.09596827e-04 -5.29497248e-03 -8.63085367e-05 -1.70552890e-04 -2.32570998e-04 1.41884587e-04 -4.30789668e-03 2.13045074e-01 -2.20865737e-01 -5.97021554e-02 -5.27596403e-03 5.55065464e-03 2.56416836e-04 4.42428956e-04 -1.72780240e-03 -1.65920515e-03 8.84003183e-04 1.65691459e-03 2.60603267e-04 3.65040008e-06 -1.35113803e-02 -5.27681867e-04 -5.27681867e-04 3.36845603e-04 1.28508746e-05 1.28508746e-05 1.18904386e-06 5.44917801e-06 5.44917801e-06 1.13248449e-04 -2.11427968e-03 -1.08158388e-04 -3.40232567e-04 -5.23614074e-03 -5.23614074e-03 3.37410762e-05 1.37679663e-04 1.37679663e-04 -1.75098012e-05 -3.26394890e-05 -3.26394890e-05 2.27814420e-05 6.81049240e-05 1.09201094e-05 -5.27286187e-04 -1.34760450e-02 1.07506905e-04 1.28508746e-05 3.35736131e-04 -5.37408247e-06 3.04803462e-06 6.63416174e-07 1.12980674e-04 -4.88314999e-06 4.87378685e-06 2.20209326e-03 1.00372389e-04 -5.32503467e-03 1.37953680e-04 5.52524203e-03 1.37111593e-04 1.98857860e-05 -1.43459194e-04 -7.11491360e-06 3.81526444e-05 3.00034158e-05 1.64887590e-05 -3.55937666e-05 6.81049240e-05 1.09201094e-05 -5.27286187e-04 1.07506905e-04 -1.34760450e-02 1.28508746e-05 -5.37408247e-06 3.35736131e-04 3.04803462e-06 1.12980674e-04 6.63416174e-07 4.88314999e-06 4.87378685e-06 2.20209326e-03 1.00372389e-04 -5.32503467e-03 5.52524203e-03 1.37953680e-04 1.37111593e-04 -1.43459194e-04 1.98857860e-05 -7.11491360e-06 3.00034158e-05 3.81526444e-05 -1.64887590e-05 -3.55937666e-05 3.70981740e-05 -4.41016479e-07 -7.38278356e-05 -1.09596827e-04 -1.09596827e-04 1.18904386e-06 3.04803462e-06 3.04803462e-06 1.22213836e-05 7.19336588e-07 7.19336588e-07 1.11214604e-06 2.67115377e-05 2.21398341e-06 -9.71173080e-04 -4.34586285e-04 -4.34586285e-04 1.75574968e-05 7.19579975e-06 7.19579975e-06 5.00193697e-06 -6.13609840e-06 -6.13609840e-06 -1.32819983e-05 1.84242778e-03 -2.08002958e-05 -2.47997580e-04 -8.63085367e-05 -5.29497248e-03 5.44917801e-06 6.63416174e-07 1.12980674e-04 7.19336588e-07 7.06644832e-05 3.31044684e-06 9.71979270e-07 3.65444658e-06 1.33346873e-03 -3.44522580e-07 -1.50002187e-03 1.68151364e-03 1.76531888e-03 3.38217457e-05 -3.94083474e-05 -3.19479331e-05 -6.36492427e-06 2.64331732e-05 2.22189072e-05 -1.14026272e-05 -2.01185218e-05 1.84242778e-03 -2.08002958e-05 -2.47997580e-04 -5.29497248e-03 -8.63085367e-05 5.44917801e-06 1.12980674e-04 6.63416174e-07 7.19336588e-07 3.31044684e-06 7.06644832e-05 -9.71979270e-07 3.65444658e-06 1.33346873e-03 -3.44522580e-07 -1.50002187e-03 1.76531888e-03 1.68151364e-03 3.38217457e-05 -3.19479331e-05 -3.94083474e-05 -6.36492427e-06 2.22189072e-05 2.64331732e-05 1.14026272e-05 -2.01185218e-05 1.70552890e-04 -1.70552890e-04 -4.88314999e-06 4.88314999e-06 9.71979270e-07 -9.71979270e-07 1.21159784e-05 8.81456465e-04 -8.81456465e-04 -1.57842819e-05 1.57842819e-05 -1.15627507e-05 1.15627507e-05 4.53122334e-06 1.46101812e-04 -2.05232644e-06 -5.29194473e-03 -2.32570998e-04 -2.32570998e-04 1.13248449e-04 4.87378685e-06 4.87378685e-06 1.11214604e-06 3.65444658e-06 3.65444658e-06 6.88904225e-05 -1.39639746e-03 8.89341158e-06 1.43539625e-03 -1.68312735e-03 -1.68312735e-03 -2.32099577e-05 3.70356697e-05 3.70356697e-05 -1.32588649e-05 -1.97642971e-05 -1.97642971e-05 1.81253684e-05 -2.11117916e-02 5.67001664e-03 -1.58904072e-04 1.41884587e-04 1.41884587e-04 -2.11427968e-03 2.20209326e-03 2.20209326e-03 2.67115377e-05 1.33346873e-03 1.33346873e-03 -1.39639746e-03 1.99242684e+00 -1.76383763e-02 5.74691481e-04 4.14268207e-03 4.14268207e-03 -4.05761935e-05 -6.08480824e-05 -6.08480824e-05 3.35775277e-05 1.84328969e-03 1.84328969e-03 7.93915814e-05 5.77475205e-03 -3.25779578e-04 4.36260980e-03 -4.30789668e-03 -4.30789668e-03 -1.08158388e-04 1.00372389e-04 1.00372389e-04 2.21398341e-06 -3.44522580e-07 -3.44522580e-07 8.89341158e-06 -1.76383763e-02 6.89816854e-04 -1.65392524e-04 1.18961341e-04 1.18961341e-04 1.13065679e-05 -1.08970667e-05 -1.08970667e-05 -3.86017134e-07 -2.06364396e-05 -2.06364396e-05 -1.46028404e-06 5.83412971e-05 -4.34699780e-03 -3.74836897e-02 2.13045074e-01 2.13045074e-01 -3.40232567e-04 -5.32503467e-03 -5.32503467e-03 -9.71173080e-04 -1.50002187e-03 -1.50002187e-03 1.43539625e-03 5.74691481e-04 -1.65392524e-04 5.88422498e-01 2.42518266e-02 2.42518266e-02 -1.34397019e-02 -5.45202092e-04 -5.45202092e-04 7.82513904e-05 2.31617630e-04 2.31617630e-04 5.28116267e-03 -9.28697342e-05 4.21399613e-03 2.12825117e-01 -5.97021554e-02 -2.20865737e-01 -5.23614074e-03 1.37953680e-04 5.52524203e-03 -4.34586285e-04 1.68151364e-03 1.76531888e-03 8.81456465e-04 -1.68312735e-03 4.14268207e-03 1.18961341e-04 2.42518266e-02 5.87665974e-01 9.44118100e-04 -5.44063371e-04 -1.34026621e-02 -2.33346351e-04 9.97080619e-05 -3.15590458e-05 5.28033814e-03 -1.71707719e-04 2.33040018e-04 -9.28697342e-05 4.21399613e-03 2.12825117e-01 -2.20865737e-01 -5.97021554e-02 -5.23614074e-03 5.52524203e-03 1.37953680e-04 -4.34586285e-04 1.76531888e-03 1.68151364e-03 -8.81456465e-04 -1.68312735e-03 4.14268207e-03 1.18961341e-04 2.42518266e-02 9.44118100e-04 5.87665974e-01 -5.44063371e-04 -2.33346351e-04 -1.34026621e-02 9.97080619e-05 5.28033814e-03 -3.15590458e-05 1.71707719e-04 2.33040018e-04 2.23771540e-03 1.03798709e-04 -3.04467391e-04 -5.27596403e-03 -5.27596403e-03 3.37410762e-05 1.37111593e-04 1.37111593e-04 1.75574968e-05 3.38217457e-05 3.38217457e-05 -2.32099577e-05 -4.05761935e-05 1.13065679e-05 -1.34397019e-02 -5.44063371e-04 -5.44063371e-04 3.32884265e-04 1.35025537e-05 1.35025537e-05 -1.34374640e-06 -5.12309825e-06 -5.12309825e-06 -1.12169694e-04 -2.33786484e-03 -9.84988221e-05 -5.40453219e-03 2.56416836e-04 5.55065464e-03 1.37679663e-04 1.98857860e-05 -1.43459194e-04 7.19579975e-06 -3.94083474e-05 -3.19479331e-05 -1.57842819e-05 3.70356697e-05 -6.08480824e-05 -1.08970667e-05 -5.45202092e-04 -1.34026621e-02 -2.33346351e-04 1.35025537e-05 3.31788422e-04 1.18356265e-05 -2.85726926e-06 -1.85544434e-06 -1.11784697e-04 4.79629696e-06 -5.12423742e-06 -2.33786484e-03 -9.84988221e-05 -5.40453219e-03 5.55065464e-03 2.56416836e-04 1.37679663e-04 -1.43459194e-04 1.98857860e-05 7.19579975e-06 -3.19479331e-05 -3.94083474e-05 1.57842819e-05 3.70356697e-05 -6.08480824e-05 -1.08970667e-05 -5.45202092e-04 -2.33346351e-04 -1.34026621e-02 1.35025537e-05 1.18356265e-05 3.31788422e-04 -2.85726926e-06 -1.11784697e-04 -1.85544434e-06 -4.79629696e-06 -5.12423742e-06 2.50009800e-05 1.60498129e-06 9.67248841e-04 4.42428956e-04 4.42428956e-04 -1.75098012e-05 -7.11491360e-06 -7.11491360e-06 5.00193697e-06 -6.36492427e-06 -6.36492427e-06 -1.32588649e-05 3.35775277e-05 -3.86017134e-07 7.82513904e-05 9.97080619e-05 9.97080619e-05 -1.34374640e-06 -2.85726926e-06 -2.85726926e-06 1.22800214e-05 5.91950284e-07 5.91950284e-07 1.16734423e-06 1.29464718e-03 -1.65049900e-06 1.45612957e-03 -1.65920515e-03 -1.72780240e-03 -3.26394890e-05 3.81526444e-05 3.00034158e-05 -6.13609840e-06 2.64331732e-05 2.22189072e-05 -1.15627507e-05 -1.97642971e-05 1.84328969e-03 -2.06364396e-05 2.31617630e-04 -3.15590458e-05 5.28033814e-03 -5.12309825e-06 -1.85544434e-06 -1.11784697e-04 5.91950284e-07 7.05160741e-05 5.71862272e-07 1.00228546e-06 3.39036125e-06 1.29464718e-03 -1.65049900e-06 1.45612957e-03 -1.72780240e-03 -1.65920515e-03 -3.26394890e-05 3.00034158e-05 3.81526444e-05 -6.13609840e-06 2.22189072e-05 2.64331732e-05 1.15627507e-05 -1.97642971e-05 1.84328969e-03 -2.06364396e-05 2.31617630e-04 5.28033814e-03 -3.15590458e-05 -5.12309825e-06 -1.11784697e-04 -1.85544434e-06 5.91950284e-07 5.71862272e-07 7.05160741e-05 -1.00228546e-06 3.39036125e-06 -8.84003183e-04 8.84003183e-04 1.64887590e-05 -1.64887590e-05 -1.14026272e-05 1.14026272e-05 4.53122334e-06 -1.71707719e-04 1.71707719e-04 4.79629696e-06 -4.79629696e-06 1.00228546e-06 -1.00228546e-06 1.21802672e-05 -1.34875862e-03 7.75238899e-06 -1.41025838e-03 1.65691459e-03 1.65691459e-03 2.27814420e-05 -3.55937666e-05 -3.55937666e-05 -1.32819983e-05 -2.01185218e-05 -2.01185218e-05 1.81253684e-05 7.93915814e-05 -1.46028404e-06 5.28116267e-03 2.33040018e-04 2.33040018e-04 -1.12169694e-04 -5.12423742e-06 -5.12423742e-06 1.16734423e-06 3.39036125e-06 3.39036125e-06 6.88069378e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 24 48 72 98 124 148 174 200 224 250 276 290 314 338 362 386 412 438 462 488 514 538 564 590 604 628 +0 0 1 471 + 8.27104610e-04 -3.98659597e-05 2.19421402e-02 -7.52756885e-04 -7.52756885e-04 -6.59182760e-04 6.13204445e-06 6.13204445e-06 -8.98360229e-06 1.47730474e-05 1.47730474e-05 1.15340247e-04 -3.98659597e-05 3.04867240e-05 -8.25959908e-03 2.16830303e-04 2.16830303e-04 2.31079442e-04 -3.92703250e-06 -3.92703250e-06 -8.77599430e-07 -3.48442376e-06 -3.48442376e-06 -9.80783619e-06 2.19421402e-02 -8.25959908e-03 -2.25776063e-01 1.89809289e-02 1.89809289e-02 5.53116207e-03 -4.57345177e-04 -4.57345177e-04 1.67957642e-03 -2.05339061e-04 -2.05339061e-04 2.13977213e-03 -7.52756885e-04 2.16830303e-04 1.89809289e-02 -4.42337412e-03 -1.99801595e-02 -2.96907823e-04 9.87691772e-05 2.06245949e-03 1.02094724e-04 -1.62612876e-03 6.79594298e-05 -2.59762802e-05 -1.35102921e-04 -7.52756885e-04 2.16830303e-04 1.89809289e-02 -1.99801595e-02 -4.42337412e-03 -2.96907823e-04 2.06245949e-03 9.87691772e-05 1.02094724e-04 6.79594298e-05 -1.62612876e-03 2.59762802e-05 -1.35102921e-04 -6.59182760e-04 2.31079442e-04 5.53116207e-03 -2.96907823e-04 -2.96907823e-04 -1.30343116e-04 8.15257998e-06 8.15257998e-06 -2.84912122e-05 3.01530942e-06 3.01530942e-06 -4.91702808e-05 6.13204445e-06 -3.92703250e-06 -4.57345177e-04 9.87691772e-05 2.06245949e-03 8.15257998e-06 -7.39028050e-06 -9.10026813e-05 -2.55956238e-06 2.39686419e-05 -5.34389762e-06 5.89912211e-08 1.90580090e-06 6.13204445e-06 -3.92703250e-06 -4.57345177e-04 2.06245949e-03 9.87691772e-05 8.15257998e-06 -9.10026813e-05 -7.39028050e-06 -2.55956238e-06 -5.34389762e-06 2.39686419e-05 -5.89912211e-08 1.90580090e-06 -8.98360229e-06 -8.77599430e-07 1.67957642e-03 1.02094724e-04 1.02094724e-04 -2.84912122e-05 -2.55956238e-06 -2.55956238e-06 -5.70652424e-07 -8.59672212e-07 -8.59672212e-07 -2.36211053e-05 1.47730474e-05 -3.48442376e-06 -2.05339061e-04 -1.62612876e-03 6.79594298e-05 3.01530942e-06 2.39686419e-05 -5.34389762e-06 -8.59672212e-07 -2.51151738e-06 2.04683267e-05 -1.56482757e-06 2.19597788e-06 1.47730474e-05 -3.48442376e-06 -2.05339061e-04 6.79594298e-05 -1.62612876e-03 3.01530942e-06 -5.34389762e-06 2.39686419e-05 -8.59672212e-07 2.04683267e-05 -2.51151738e-06 1.56482757e-06 2.19597788e-06 -2.59762802e-05 2.59762802e-05 5.89912211e-08 -5.89912211e-08 -1.56482757e-06 1.56482757e-06 -3.53216145e-07 1.15340247e-04 -9.80783619e-06 2.13977213e-03 -1.35102921e-04 -1.35102921e-04 -4.91702808e-05 1.90580090e-06 1.90580090e-06 -2.36211053e-05 2.19597788e-06 2.19597788e-06 -1.79402382e-05 -2.51099580e-02 6.19555076e-03 1.69229525e-05 7.00887608e-05 7.00887608e-05 -2.47473809e-03 -2.38289235e-03 -2.38289235e-03 -3.86038745e-05 -1.70448353e-03 -1.70448353e-03 -1.64089484e-03 8.15725212e-04 -5.05906081e-05 -2.18500845e-02 7.52686511e-04 7.52686511e-04 6.26926343e-04 -3.63481072e-06 -3.63481072e-06 -8.75085739e-06 1.48099130e-05 1.48099130e-05 1.17349286e-04 6.29348353e-03 -3.52773476e-04 3.73429640e-03 3.92447806e-03 3.92447806e-03 -9.36892358e-05 -1.01946718e-04 -1.01946718e-04 -1.08295240e-06 2.43991765e-05 2.43991765e-05 1.97314544e-05 -5.05906081e-05 2.62254306e-05 8.33373538e-03 -2.15977210e-04 -2.15977210e-04 -2.30644690e-04 3.99602285e-06 3.99602285e-06 1.09623033e-07 -3.51931327e-06 -3.51931327e-06 -8.78544054e-06 -6.31050033e-05 -3.73009218e-03 -5.41240037e-02 -2.63136107e-01 -2.63136107e-01 1.85055545e-04 6.11171644e-03 6.11171644e-03 -6.16597941e-04 2.24188540e-03 2.24188540e-03 1.76316450e-03 -2.18500845e-02 8.33373538e-03 -2.26052722e-01 1.89193599e-02 1.89193599e-02 5.63429114e-03 -4.65884716e-04 -4.65884716e-04 -1.68355408e-03 2.05502133e-04 2.05502133e-04 -2.09251695e-03 -1.02757553e-04 -3.83582926e-03 -2.63046522e-01 -3.47195602e-02 -2.48816247e-01 6.25899244e-03 -3.27586255e-04 5.88159758e-03 4.41211161e-04 1.92309318e-03 1.54556997e-03 -5.67713655e-04 2.04213106e-03 7.52686511e-04 -2.15977210e-04 1.89193599e-02 -4.10207947e-03 -1.99611802e-02 -2.88305530e-04 6.88335999e-05 2.06132901e-03 -1.03715979e-04 1.63080656e-03 -7.82907019e-05 2.57365101e-05 1.33566268e-04 -1.02757553e-04 -3.83582926e-03 -2.63046522e-01 -2.48816247e-01 -3.47195602e-02 6.25899244e-03 5.88159758e-03 -3.27586255e-04 4.41211161e-04 1.54556997e-03 1.92309318e-03 5.67713655e-04 2.04213106e-03 7.52686511e-04 -2.15977210e-04 1.89193599e-02 -1.99611802e-02 -4.10207947e-03 -2.88305530e-04 2.06132901e-03 6.88335999e-05 -1.03715979e-04 -7.82907019e-05 1.63080656e-03 -2.57365101e-05 1.33566268e-04 2.60857304e-03 8.99427453e-05 2.57178258e-04 6.29755746e-03 6.29755746e-03 1.67811984e-05 -1.51455682e-04 -1.51455682e-04 9.07578221e-06 -4.55107520e-05 -4.55107520e-05 -3.07909725e-05 6.26926343e-04 -2.30644690e-04 5.63429114e-03 -2.88305530e-04 -2.88305530e-04 -1.35699991e-04 8.00918394e-06 8.00918394e-06 2.83805832e-05 -3.10746156e-06 -3.10746156e-06 4.75031374e-05 2.52870419e-03 1.00011400e-04 6.22850503e-03 -1.84758420e-04 5.89069487e-03 -1.52552102e-04 2.98383132e-05 -1.43726904e-04 -7.64320267e-06 -3.86120149e-05 -2.57795373e-05 7.94898406e-06 -4.35028479e-05 -3.63481072e-06 3.99602285e-06 -4.65884716e-04 6.88335999e-05 2.06132901e-03 8.00918394e-06 -8.47747415e-06 -9.12584526e-05 2.64110970e-06 -2.38213614e-05 4.37847663e-06 -1.57238704e-08 -1.96776833e-06 2.52870419e-03 1.00011400e-04 6.22850503e-03 5.89069487e-03 -1.84758420e-04 -1.52552102e-04 -1.43726904e-04 2.98383132e-05 -7.64320267e-06 -2.57795373e-05 -3.86120149e-05 -7.94898406e-06 -4.35028479e-05 -3.63481072e-06 3.99602285e-06 -4.65884716e-04 2.06132901e-03 6.88335999e-05 8.00918394e-06 -9.12584526e-05 -8.47747415e-06 2.64110970e-06 4.37847663e-06 -2.38213614e-05 1.57238704e-08 -1.96776833e-06 -3.53858037e-05 -1.51781937e-06 6.27445862e-04 -4.38409070e-04 -4.38409070e-04 -9.48786416e-06 7.39129912e-06 7.39129912e-06 6.65712733e-06 6.03234159e-06 6.03234159e-06 -9.33248770e-06 -8.75085739e-06 1.09623033e-07 -1.68355408e-03 -1.03715979e-04 -1.03715979e-04 2.83805832e-05 2.64110970e-06 2.64110970e-06 -6.09131767e-07 -8.32998995e-07 -8.32998995e-07 -2.36780374e-05 -1.65890102e-03 2.53152986e-05 -2.17977514e-03 -1.89467534e-03 -1.49426456e-03 4.42482840e-05 3.75821848e-05 2.36039275e-05 5.97486234e-06 1.81574088e-05 1.80451259e-05 9.02916025e-06 2.18671970e-05 1.48099130e-05 -3.51931327e-06 2.05502133e-04 1.63080656e-03 -7.82907019e-05 -3.10746156e-06 -2.38213614e-05 4.37847663e-06 -8.32998995e-07 -3.10927343e-06 2.05811303e-05 -1.59128036e-06 2.15926195e-06 -1.65890102e-03 2.53152986e-05 -2.17977514e-03 -1.49426456e-03 -1.89467534e-03 4.42482840e-05 2.36039275e-05 3.75821848e-05 5.97486234e-06 1.80451259e-05 1.81574088e-05 -9.02916025e-06 2.18671970e-05 1.48099130e-05 -3.51931327e-06 2.05502133e-04 -7.82907019e-05 1.63080656e-03 -3.10746156e-06 4.37847663e-06 -2.38213614e-05 -8.32998995e-07 2.05811303e-05 -3.10927343e-06 1.59128036e-06 2.15926195e-06 5.69688749e-04 -5.69688749e-04 -8.39798432e-06 8.39798432e-06 8.93697594e-06 -8.93697594e-06 6.82205343e-06 2.57365101e-05 -2.57365101e-05 -1.57238704e-08 1.57238704e-08 -1.59128036e-06 1.59128036e-06 -3.63854940e-07 -1.59030648e-03 1.84962941e-05 -1.74058321e-03 -2.01592823e-03 -2.01592823e-03 3.01227762e-05 4.17074093e-05 4.17074093e-05 -9.23640909e-06 2.25340319e-05 2.25340319e-05 2.52734444e-05 1.17349286e-04 -8.78544054e-06 -2.09251695e-03 1.33566268e-04 1.33566268e-04 4.75031374e-05 -1.96776833e-06 -1.96776833e-06 -2.36780374e-05 2.15926195e-06 2.15926195e-06 -1.81079545e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 181 205 229 255 281 305 331 357 381 407 433 447 471 +0 1 -1 338 + 9.71085217e-04 -5.39348870e-05 -7.82534933e-04 2.28947051e-02 -1.12629834e-04 -4.36601610e-06 -7.06290632e-04 -8.06803305e-06 4.12868179e-06 4.10506076e-06 1.15246216e-04 -7.21610794e-06 1.69048349e-05 -5.39348870e-05 3.75923941e-05 2.13260123e-04 -8.28899270e-03 -8.32275071e-06 -4.01966247e-06 2.31714385e-04 -1.25495233e-06 2.53846290e-06 8.51559750e-07 -1.03995572e-05 -4.24952023e-06 -3.30483140e-06 -7.82534933e-04 2.13260123e-04 2.12260058e-02 4.49743116e-03 -1.88611657e-02 -4.28539915e-04 -2.98277030e-05 2.00461619e-03 -7.48913815e-05 -1.72695364e-03 1.27504318e-05 1.44978187e-04 -2.85669752e-04 2.28947051e-02 -8.28899270e-03 4.49743116e-03 -2.51030638e-01 1.89297857e-02 -6.97149552e-05 5.87964879e-03 -5.79195367e-04 -7.58572004e-04 -8.98211232e-05 2.52034017e-03 1.29388692e-03 -1.19719034e-04 -1.12629834e-04 -8.32275071e-06 -1.88611657e-02 1.89297857e-02 2.06041132e-02 1.99716134e-03 -3.32065905e-04 -4.10802222e-04 5.26255113e-06 -2.79617879e-04 -2.07560882e-04 -5.85336743e-05 -1.71158075e-03 -4.36601610e-06 -4.01966247e-06 -4.28539915e-04 -6.97149552e-05 1.99716134e-03 1.72996833e-06 5.55982718e-07 -8.91563251e-05 1.25402677e-06 2.64578367e-05 -1.54915996e-06 -3.83703323e-06 2.60875899e-06 -7.06290632e-04 2.31714385e-04 -2.98277030e-05 5.87964879e-03 -3.32065905e-04 5.55982718e-07 -1.32121017e-04 1.19334873e-05 1.22464831e-05 6.06232335e-07 -5.65057823e-05 -2.09370319e-05 1.52372290e-06 -8.06803305e-06 -1.25495233e-06 2.00461619e-03 -5.79195367e-04 -4.10802222e-04 -8.91563251e-05 1.19334873e-05 1.20450077e-06 -6.39506503e-07 2.43465918e-06 4.76540983e-06 1.38199706e-06 2.60428974e-05 4.12868179e-06 2.53846290e-06 -7.48913815e-05 -7.58572004e-04 5.26255113e-06 1.25402677e-06 1.22464831e-05 -6.39506503e-07 7.63410118e-07 1.08692028e-07 1.11093842e-05 -2.55846362e-07 1.84499944e-06 4.10506076e-06 8.51559750e-07 -1.72695364e-03 -8.98211232e-05 -2.79617879e-04 2.64578367e-05 6.06232335e-07 2.43465918e-06 1.08692028e-07 1.28177961e-06 1.82532486e-06 4.95456302e-07 2.20350761e-05 1.15246216e-04 -1.03995572e-05 1.27504318e-05 2.52034017e-03 -2.07560882e-04 -1.54915996e-06 -5.65057823e-05 4.76540983e-06 1.11093842e-05 1.82532486e-06 -2.15933355e-05 -1.88266319e-05 1.25079886e-06 -7.21610794e-06 -4.24952023e-06 1.44978187e-04 1.29388692e-03 -5.85336743e-05 -3.83703323e-06 -2.09370319e-05 1.38199706e-06 -2.55846362e-07 4.95456302e-07 -1.88266319e-05 1.10150480e-06 -5.83536261e-07 1.69048349e-05 -3.30483140e-06 -2.85669752e-04 -1.19719034e-04 -1.71158075e-03 2.60875899e-06 1.52372290e-06 2.60428974e-05 1.84499944e-06 2.20350761e-05 1.25079886e-06 -5.83536261e-07 1.25888020e-06 9.73358697e-04 -5.24497521e-05 7.71791276e-04 -2.29247964e-02 1.26566916e-04 -1.15752095e-05 7.19758021e-04 -5.84545877e-06 4.19780550e-06 1.69924216e-06 1.16006584e-04 -7.32000399e-06 1.21633219e-05 -5.24497521e-05 3.67228436e-05 -2.14994175e-04 8.23015024e-03 -1.24687861e-05 4.60503564e-06 -2.30017748e-04 -1.14862855e-06 2.45015475e-06 -2.80630140e-07 -1.06511582e-05 -4.24054409e-06 -2.69920059e-06 7.71791276e-04 -2.14994175e-04 2.10343535e-02 4.54940609e-03 -1.89470691e-02 -4.27187482e-04 -4.87863270e-05 2.00198249e-03 7.35030715e-05 1.72950757e-03 -2.64818782e-05 -1.45111271e-04 2.83888757e-04 -2.29247964e-02 8.23015024e-03 4.54940609e-03 -2.50832380e-01 1.89833575e-02 5.33732012e-05 5.83183195e-03 -4.13388431e-04 7.66323778e-04 1.50325116e-04 -2.51496652e-03 -1.29681999e-03 1.68779109e-04 1.26566916e-04 -1.24687861e-05 -1.89470691e-02 1.89833575e-02 2.06649222e-02 1.99039120e-03 -3.39360139e-04 -4.24913256e-04 -6.81302687e-06 2.75085383e-04 2.00339240e-04 5.92197483e-05 1.71326927e-03 -1.15752095e-05 4.60503564e-06 -4.27187482e-04 5.33732012e-05 1.99039120e-03 2.04807668e-06 -3.45556406e-06 -8.81771803e-05 -1.24927244e-06 -2.65596570e-05 1.15957686e-06 3.78423205e-06 -2.77897092e-06 7.19758021e-04 -2.30017748e-04 -4.87863270e-05 5.83183195e-03 -3.39360139e-04 -3.45556406e-06 -1.30557911e-04 8.12114536e-06 -1.23291589e-05 -1.69660670e-06 5.59860131e-05 2.08151108e-05 -3.49791356e-06 -5.84545877e-06 -1.14862855e-06 2.00198249e-03 -4.13388431e-04 -4.24913256e-04 -8.81771803e-05 8.12114536e-06 2.23914575e-06 2.23858063e-07 -2.58085711e-06 -3.48181621e-06 -5.59776877e-07 -2.61227899e-05 4.19780550e-06 2.45015475e-06 7.35030715e-05 7.66323778e-04 -6.81302687e-06 -1.24927244e-06 -1.23291589e-05 2.23858063e-07 7.37765619e-07 -5.91716112e-08 1.11765612e-05 -2.37232914e-07 1.83193233e-06 1.69924216e-06 -2.80630140e-07 1.72950757e-03 1.50325116e-04 2.75085383e-04 -2.65596570e-05 -1.69660670e-06 -2.58085711e-06 -5.91716112e-08 1.10854705e-06 2.28329556e-06 8.00955041e-07 2.19288060e-05 1.16006584e-04 -1.06511582e-05 -2.64818782e-05 -2.51496652e-03 2.00339240e-04 1.15957686e-06 5.59860131e-05 -3.48181621e-06 1.11765612e-05 2.28329556e-06 -2.15196201e-05 -1.88698103e-05 8.46277756e-07 -7.32000399e-06 -4.24054409e-06 -1.45111271e-04 -1.29681999e-03 5.92197483e-05 3.78423205e-06 2.08151108e-05 -5.59776877e-07 -2.37232914e-07 8.00955041e-07 -1.88698103e-05 1.10635148e-06 -6.06165209e-07 1.21633219e-05 -2.69920059e-06 2.83888757e-04 1.68779109e-04 1.71326927e-03 -2.77897092e-06 -3.49791356e-06 -2.61227899e-05 1.83193233e-06 2.19288060e-05 8.46277756e-07 -6.06165209e-07 1.18296820e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +0 1 0 507 + 6.73361942e-04 -3.97537772e-05 7.92408229e-04 1.31266047e-04 -2.08943763e-02 -1.72965599e-05 7.00477616e-06 5.42656099e-04 3.94541403e-06 -1.20934462e-04 4.81371689e-08 7.37597696e-06 -1.16470146e-05 -3.97537772e-05 1.60670407e-05 -2.12667446e-04 7.98001436e-06 8.26935955e-03 4.25595524e-06 1.75054518e-06 -2.30924551e-04 -2.62363319e-06 9.06842324e-06 -1.61175046e-06 -4.37520218e-06 3.04562873e-06 7.92408229e-04 -2.12667446e-04 -2.14829023e-02 1.75293540e-02 -3.71268150e-03 4.88599897e-04 -2.04695642e-03 9.01879561e-05 7.52737246e-05 1.22639815e-04 1.59938622e-03 1.39228798e-04 3.19255962e-04 1.31266047e-04 7.98001436e-06 1.75293540e-02 -2.08026443e-02 -1.89085567e-02 -2.04072172e-03 4.72221132e-04 3.33041135e-04 1.06213432e-04 2.12351595e-04 3.10813800e-04 4.96620554e-06 1.58339328e-03 -2.08943763e-02 8.26935955e-03 -3.71268150e-03 -1.89085567e-02 -1.81977887e-01 1.40640772e-04 4.61074437e-04 4.95961374e-03 9.19749440e-04 1.40876300e-03 1.52966528e-04 1.55859666e-03 -4.40258755e-05 -1.72965599e-05 4.25595524e-06 4.88599897e-04 -2.04072172e-03 1.40640772e-04 -1.57823544e-05 9.12826691e-05 -4.39825444e-06 -1.27991946e-06 -2.72506963e-06 -2.31224839e-05 -3.80797434e-06 -1.05398619e-05 7.00477616e-06 1.75054518e-06 -2.04695642e-03 4.72221132e-04 4.61074437e-04 9.12826691e-05 -1.53380790e-05 -9.01745553e-06 -2.22079191e-06 -4.00517617e-06 -1.03262115e-05 1.64895602e-08 -2.27178464e-05 5.42656099e-04 -2.30924551e-04 9.01879561e-05 3.33041135e-04 4.95961374e-03 -4.39825444e-06 -9.01745553e-06 -1.28104111e-04 -1.61753760e-05 -3.53600279e-05 -2.13841414e-06 -2.74194417e-05 1.83218511e-06 3.94541403e-06 -2.62363319e-06 7.52737246e-05 1.06213432e-04 9.19749440e-04 -1.27991946e-06 -2.22079191e-06 -1.61753760e-05 -9.34885278e-07 -1.25341370e-05 -1.20221699e-06 -2.91206873e-07 -1.66578969e-06 -1.20934462e-04 9.06842324e-06 1.22639815e-04 2.12351595e-04 1.40876300e-03 -2.72506963e-06 -4.00517617e-06 -3.53600279e-05 -1.25341370e-05 -1.00227308e-05 -2.42238671e-06 -2.11474313e-05 -1.03082780e-06 4.81371689e-08 -1.61175046e-06 1.59938622e-03 3.10813800e-04 1.52966528e-04 -2.31224839e-05 -1.03262115e-05 -2.13841414e-06 -1.20221699e-06 -2.42238671e-06 -5.82926895e-06 -1.76507771e-08 -1.98888934e-05 7.37597696e-06 -4.37520218e-06 1.39228798e-04 4.96620554e-06 1.55859666e-03 -3.80797434e-06 1.64895602e-08 -2.74194417e-05 -2.91206873e-07 -2.11474313e-05 -1.76507771e-08 -1.19495073e-06 -5.11705169e-07 -1.16470146e-05 3.04562873e-06 3.19255962e-04 1.58339328e-03 -4.40258755e-05 -1.05398619e-05 -2.27178464e-05 1.83218511e-06 -1.66578969e-06 -1.03082780e-06 -1.98888934e-05 -5.11705169e-07 -5.95160958e-06 -2.30970536e-02 5.94037473e-03 2.09662763e-06 1.14474191e-04 -8.15517156e-05 2.31797641e-03 -2.22301970e-03 2.40771110e-03 -2.43071797e-07 1.42206233e-03 -1.54432729e-03 5.19099848e-05 1.47631583e-03 6.75660007e-04 -3.70583968e-05 -7.60183549e-04 -1.51406289e-04 2.09274361e-02 -1.64162023e-06 8.02440447e-06 -5.54621534e-04 3.71527257e-06 -1.20903168e-04 1.41830964e-06 7.05570119e-06 -1.46557977e-05 5.66887190e-03 -3.35393364e-04 -4.04833836e-03 4.13501486e-03 -3.87799502e-03 9.94342201e-05 -1.07877289e-04 9.15295789e-05 -2.86358914e-07 -7.24007071e-06 1.99491717e-05 2.66335103e-06 -1.16926507e-05 -3.70583968e-05 1.50522051e-05 2.16903688e-04 6.71138355e-06 -8.22741963e-03 -3.48363816e-06 9.16193695e-07 2.29517192e-04 -2.54427436e-06 9.28543243e-06 -5.37690715e-07 -4.37638627e-06 3.64659964e-06 -1.83768890e-04 4.11745563e-03 -5.36715690e-02 2.21022945e-01 -2.43868036e-01 8.40500891e-05 -5.37624081e-03 6.06657551e-03 8.85894806e-04 1.82357183e-03 -1.68902008e-03 1.50808329e-04 1.70725211e-03 -7.60183549e-04 2.16903688e-04 -2.12881964e-02 1.76032039e-02 -3.67288888e-03 4.85036763e-04 -2.04259252e-03 1.05677681e-04 -7.38170330e-05 -1.10916847e-04 -1.59888601e-03 -1.38435699e-04 -3.17602844e-04 4.79903222e-05 -4.26787793e-03 2.21052348e-01 -3.14277441e-02 2.34367319e-01 -5.46740884e-03 -4.01763639e-04 -5.82300543e-03 3.51863680e-04 -1.60786809e-03 1.37253496e-03 -7.70527997e-04 -1.49575572e-03 -1.51406289e-04 6.71138355e-06 1.76032039e-02 -2.08557672e-02 -1.90264795e-02 -2.04011682e-03 4.82257184e-04 3.53343551e-04 -1.05167768e-04 -2.05459987e-04 -3.06738183e-04 -5.27889387e-06 -1.58582400e-03 -6.04318066e-05 4.02735793e-03 -2.44138640e-01 2.34513293e-01 -7.16630172e-02 5.94337156e-03 -5.61031003e-03 5.58610719e-04 -4.55645634e-04 1.92551919e-03 -1.96572509e-03 -6.38070122e-04 2.00321284e-03 2.09274361e-02 -8.22741963e-03 -3.67288888e-03 -1.90264795e-02 -1.82082090e-01 3.35823876e-05 5.70967741e-04 4.94466670e-03 -9.18925056e-04 -1.40231869e-03 -1.17448539e-04 -1.56254351e-03 -2.57406725e-06 -2.02907584e-03 -1.05916310e-04 2.33518808e-05 -5.37854297e-03 5.83941993e-03 2.38849929e-05 1.35489660e-04 -1.49956653e-04 -1.49866022e-05 -4.09493519e-05 3.42841905e-05 -4.12883227e-06 -2.87870079e-05 -1.64162023e-06 -3.48363816e-06 4.85036763e-04 -2.04011682e-03 3.35823876e-05 -1.51869930e-05 9.03878041e-05 -6.98851141e-07 1.27799009e-06 3.22070996e-06 2.30237241e-05 3.75439524e-06 1.05310605e-05 1.92358576e-03 1.11812472e-04 -5.21750510e-03 -5.38296209e-04 -5.51280191e-03 1.34427742e-04 3.79055304e-05 1.42290366e-04 -5.06922523e-06 3.44249429e-05 -2.02684488e-05 1.35261994e-05 3.03095393e-05 8.02440447e-06 9.16193695e-07 -2.04259252e-03 4.82257184e-04 5.70967741e-04 9.03878041e-05 -1.53786153e-05 -1.24035629e-05 2.71694594e-06 4.34454045e-06 1.02971341e-05 9.81035752e-07 2.27171575e-05 -2.10279721e-03 -9.60150546e-05 5.92110603e-03 -5.76269634e-03 4.12201360e-04 -1.49379862e-04 1.42989791e-04 1.22086375e-05 8.21974934e-06 -3.33531383e-05 4.04904295e-05 1.04591462e-05 -4.32676487e-05 -5.54621534e-04 2.29517192e-04 1.05677681e-04 3.53343551e-04 4.94466670e-03 -6.98851141e-07 -1.24035629e-05 -1.27406033e-04 1.61114847e-05 3.51900561e-05 1.80762506e-06 2.73107074e-05 3.94949154e-08 -5.47231757e-08 1.96413971e-07 -8.88773026e-04 -3.52799019e-04 4.53245914e-04 1.50846888e-05 5.39509780e-06 -8.39813516e-06 6.28992205e-06 -5.60896386e-06 5.50844326e-06 -2.52154614e-07 1.25949487e-05 3.71527257e-06 -2.54427436e-06 -7.38170330e-05 -1.05167768e-04 -9.18925056e-04 1.27799009e-06 2.71694594e-06 1.61114847e-05 -8.99249570e-07 -1.24953939e-05 -1.00005934e-06 -2.66013274e-07 -1.65640447e-06 1.48588589e-03 -6.19264361e-06 -1.86241064e-03 1.61511410e-03 -1.97088972e-03 4.25840113e-05 -3.61413449e-05 3.60498903e-05 -5.68520737e-06 3.07999331e-05 -2.04037581e-05 -8.89189683e-06 2.38041797e-05 -1.20903168e-04 9.28543243e-06 -1.10916847e-04 -2.05459987e-04 -1.40231869e-03 3.22070996e-06 4.34454045e-06 3.51900561e-05 -1.24953939e-05 -9.81822232e-06 -2.00165153e-06 -2.11801885e-05 -6.70871051e-07 -1.60788675e-03 1.93401252e-05 1.73137916e-03 -1.41761428e-03 1.98883091e-03 -3.54165283e-05 2.24733557e-05 -4.15542569e-05 5.57191371e-06 -2.07810848e-05 1.52786244e-05 -1.07864540e-05 -1.73577445e-05 1.41830964e-06 -5.37690715e-07 -1.59888601e-03 -3.06738183e-04 -1.17448539e-04 2.30237241e-05 1.02971341e-05 1.80762506e-06 -1.00005934e-06 -2.00165153e-06 -5.72796451e-06 3.38554894e-07 -1.98226003e-05 5.25276936e-05 2.84529967e-06 -1.52367404e-04 7.72206803e-04 6.39785684e-04 4.27319573e-06 -1.32282734e-05 -1.00704641e-05 -2.85704469e-07 -9.09812263e-06 -1.09640961e-05 6.17212951e-06 9.90651717e-07 7.05570119e-06 -4.37638627e-06 -1.38435699e-04 -5.27889387e-06 -1.56254351e-03 3.75439524e-06 9.81035752e-07 2.73107074e-05 -2.66013274e-07 -2.11801885e-05 3.38554894e-07 -1.19986110e-06 -5.24586487e-07 1.54738933e-03 -1.29767783e-05 -1.73326849e-03 1.51421276e-03 -2.02052298e-03 2.97436636e-05 -3.23124980e-05 4.49706024e-05 1.25586484e-05 2.34815694e-05 -1.67291900e-05 9.84746047e-07 2.40545549e-05 -1.46557977e-05 3.64659964e-06 -3.17602844e-04 -1.58582400e-03 -2.57406725e-06 1.05310605e-05 2.27171575e-05 3.94949154e-08 -1.65640447e-06 -6.70871051e-07 -1.98226003e-05 -5.24586487e-07 -5.94200596e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +1 -1 0 314 + 8.00191823e-04 -5.87354670e-05 -2.15487940e-02 7.66760554e-04 7.66760554e-04 5.79664525e-04 -7.14099363e-06 -7.14099363e-06 -7.82059509e-06 -1.13448964e-05 -1.13448964e-05 -1.24491448e-04 -5.87354670e-05 2.31851909e-05 8.34376508e-03 -2.15531485e-04 -2.15531485e-04 -2.32461259e-04 4.34485113e-06 4.34485113e-06 9.91808434e-07 2.72052752e-06 2.72052752e-06 8.94449176e-06 -2.15487940e-02 8.34376508e-03 -2.06932720e-01 -1.79956951e-02 -1.79956951e-02 5.31351769e-03 5.31750642e-04 5.31750642e-04 -1.68310116e-03 4.85404194e-05 4.85404194e-05 1.78049713e-03 7.66760554e-04 -2.15531485e-04 -1.79956951e-02 4.10592132e-03 1.86127797e-02 3.54165425e-04 -4.06760377e-05 -2.02985282e-03 -2.12467694e-04 1.63440378e-03 -3.13237152e-05 -3.80330475e-05 2.69080937e-04 7.66760554e-04 -2.15531485e-04 -1.79956951e-02 1.86127797e-02 4.10592132e-03 3.54165425e-04 -2.02985282e-03 -4.06760377e-05 -2.12467694e-04 -3.13237152e-05 1.63440378e-03 3.80330475e-05 2.69080937e-04 5.79664525e-04 -2.32461259e-04 5.31351769e-03 3.54165425e-04 3.54165425e-04 -1.30377522e-04 -1.20574908e-05 -1.20574908e-05 2.85649901e-05 1.25818052e-07 1.25818052e-07 -4.25052695e-05 -7.14099363e-06 4.34485113e-06 5.31750642e-04 -4.06760377e-05 -2.02985282e-03 -1.20574908e-05 -6.50696410e-06 9.03552037e-05 5.21054342e-06 -2.41440578e-05 -2.61806781e-06 1.72409542e-06 -6.15471610e-06 -7.14099363e-06 4.34485113e-06 5.31750642e-04 -2.02985282e-03 -4.06760377e-05 -1.20574908e-05 9.03552037e-05 -6.50696410e-06 5.21054342e-06 -2.61806781e-06 -2.41440578e-05 -1.72409542e-06 -6.15471610e-06 -7.82059509e-06 9.91808434e-07 -1.68310116e-03 -2.12467694e-04 -2.12467694e-04 2.85649901e-05 5.21054342e-06 5.21054342e-06 7.34061477e-07 1.81143976e-06 1.81143976e-06 2.34668312e-05 -1.13448964e-05 2.72052752e-06 4.85404194e-05 1.63440378e-03 -3.13237152e-05 1.25818052e-07 -2.41440578e-05 -2.61806781e-06 1.81143976e-06 -2.10338601e-06 -2.05844595e-05 8.94007524e-07 -2.09281114e-06 -1.13448964e-05 2.72052752e-06 4.85404194e-05 -3.13237152e-05 1.63440378e-03 1.25818052e-07 -2.61806781e-06 -2.41440578e-05 1.81143976e-06 -2.05844595e-05 -2.10338601e-06 -8.94007524e-07 -2.09281114e-06 -3.80330475e-05 3.80330475e-05 1.72409542e-06 -1.72409542e-06 8.94007524e-07 -8.94007524e-07 1.92518589e-07 -1.24491448e-04 8.94449176e-06 1.78049713e-03 2.69080937e-04 2.69080937e-04 -4.25052695e-05 -6.15471610e-06 -6.15471610e-06 2.34668312e-05 -2.09281114e-06 -2.09281114e-06 -1.34870436e-05 8.16435485e-04 -4.34560325e-05 2.16989349e-02 -7.61794638e-04 -7.61794638e-04 -6.37180982e-04 6.39657600e-06 6.39657600e-06 -7.76766664e-06 -1.12762136e-05 -1.12762136e-05 -1.23026063e-04 -4.34560325e-05 2.56551279e-05 -8.18703017e-03 2.20932884e-04 2.20932884e-04 2.29769813e-04 -4.59485855e-06 -4.59485855e-06 1.78988980e-08 2.72943586e-06 2.72943586e-06 1.00491890e-05 2.16989349e-02 -8.18703017e-03 -2.06565600e-01 -1.79997021e-02 -1.79997021e-02 5.14854770e-03 5.40088650e-04 5.40088650e-04 1.68700198e-03 -4.31460992e-05 -4.31460992e-05 -1.81811033e-03 -7.61794638e-04 2.20932884e-04 -1.79997021e-02 3.78294925e-03 1.87514707e-02 3.53407664e-04 -1.01363895e-05 -2.03409318e-03 2.14694489e-04 -1.63539304e-03 4.23692834e-05 3.93485777e-05 -2.67534175e-04 -7.61794638e-04 2.20932884e-04 -1.79997021e-02 1.87514707e-02 3.78294925e-03 3.53407664e-04 -2.03409318e-03 -1.01363895e-05 2.14694489e-04 4.23692834e-05 -1.63539304e-03 -3.93485777e-05 -2.67534175e-04 -6.37180982e-04 2.29769813e-04 5.14854770e-03 3.53407664e-04 3.53407664e-04 -1.22636886e-04 -1.21436270e-05 -1.21436270e-05 -2.84631798e-05 -2.11405637e-07 -2.11405637e-07 4.35697451e-05 6.39657600e-06 -4.59485855e-06 5.40088650e-04 -1.01363895e-05 -2.03409318e-03 -1.21436270e-05 -4.79824282e-06 8.87240864e-05 -5.36472971e-06 2.42749794e-05 3.38336064e-06 -1.73037555e-06 6.27995462e-06 6.39657600e-06 -4.59485855e-06 5.40088650e-04 -2.03409318e-03 -1.01363895e-05 -1.21436270e-05 8.87240864e-05 -4.79824282e-06 -5.36472971e-06 3.38336064e-06 2.42749794e-05 1.73037555e-06 6.27995462e-06 -7.76766664e-06 1.78988980e-08 1.68700198e-03 2.14694489e-04 2.14694489e-04 -2.84631798e-05 -5.36472971e-06 -5.36472971e-06 7.64740405e-07 1.76825758e-06 1.76825758e-06 2.35272294e-05 -1.12762136e-05 2.72943586e-06 -4.31460992e-05 -1.63539304e-03 4.23692834e-05 -2.11405637e-07 2.42749794e-05 3.38336064e-06 1.76825758e-06 -1.56608428e-06 -2.03379520e-05 8.92242809e-07 -1.97462922e-06 -1.12762136e-05 2.72943586e-06 -4.31460992e-05 4.23692834e-05 -1.63539304e-03 -2.11405637e-07 3.38336064e-06 2.42749794e-05 1.76825758e-06 -2.03379520e-05 -1.56608428e-06 -8.92242809e-07 -1.97462922e-06 3.93485777e-05 -3.93485777e-05 -1.73037555e-06 1.73037555e-06 8.92242809e-07 -8.92242809e-07 1.99858664e-07 -1.23026063e-04 1.00491890e-05 -1.81811033e-03 -2.67534175e-04 -2.67534175e-04 4.35697451e-05 6.27995462e-06 6.27995462e-06 2.35272294e-05 -1.97462922e-06 -1.97462922e-06 -1.30828454e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 169 181 193 206 219 231 244 257 269 282 295 302 314 +1 0 -1 338 + 9.71085217e-04 -5.39348870e-05 -7.82534933e-04 -1.12629834e-04 2.28947051e-02 -4.36601610e-06 -8.06803305e-06 -7.06290632e-04 4.12868179e-06 1.15246216e-04 4.10506076e-06 7.21610794e-06 1.69048349e-05 -5.39348870e-05 3.75923941e-05 2.13260123e-04 -8.32275071e-06 -8.28899270e-03 -4.01966247e-06 -1.25495233e-06 2.31714385e-04 2.53846290e-06 -1.03995572e-05 8.51559750e-07 4.24952023e-06 -3.30483140e-06 -7.82534933e-04 2.13260123e-04 2.12260058e-02 -1.88611657e-02 4.49743116e-03 -4.28539915e-04 2.00461619e-03 -2.98277030e-05 -7.48913815e-05 1.27504318e-05 -1.72695364e-03 -1.44978187e-04 -2.85669752e-04 -1.12629834e-04 -8.32275071e-06 -1.88611657e-02 2.06041132e-02 1.89297857e-02 1.99716134e-03 -4.10802222e-04 -3.32065905e-04 5.26255113e-06 -2.07560882e-04 -2.79617879e-04 5.85336743e-05 -1.71158075e-03 2.28947051e-02 -8.28899270e-03 4.49743116e-03 1.89297857e-02 -2.51030638e-01 -6.97149552e-05 -5.79195367e-04 5.87964879e-03 -7.58572004e-04 2.52034017e-03 -8.98211232e-05 -1.29388692e-03 -1.19719034e-04 -4.36601610e-06 -4.01966247e-06 -4.28539915e-04 1.99716134e-03 -6.97149552e-05 1.72996833e-06 -8.91563251e-05 5.55982718e-07 1.25402677e-06 -1.54915996e-06 2.64578367e-05 3.83703323e-06 2.60875899e-06 -8.06803305e-06 -1.25495233e-06 2.00461619e-03 -4.10802222e-04 -5.79195367e-04 -8.91563251e-05 1.20450077e-06 1.19334873e-05 -6.39506503e-07 4.76540983e-06 2.43465918e-06 -1.38199706e-06 2.60428974e-05 -7.06290632e-04 2.31714385e-04 -2.98277030e-05 -3.32065905e-04 5.87964879e-03 5.55982718e-07 1.19334873e-05 -1.32121017e-04 1.22464831e-05 -5.65057823e-05 6.06232335e-07 2.09370319e-05 1.52372290e-06 4.12868179e-06 2.53846290e-06 -7.48913815e-05 5.26255113e-06 -7.58572004e-04 1.25402677e-06 -6.39506503e-07 1.22464831e-05 7.63410118e-07 1.11093842e-05 1.08692028e-07 2.55846362e-07 1.84499944e-06 1.15246216e-04 -1.03995572e-05 1.27504318e-05 -2.07560882e-04 2.52034017e-03 -1.54915996e-06 4.76540983e-06 -5.65057823e-05 1.11093842e-05 -2.15933355e-05 1.82532486e-06 1.88266319e-05 1.25079886e-06 4.10506076e-06 8.51559750e-07 -1.72695364e-03 -2.79617879e-04 -8.98211232e-05 2.64578367e-05 2.43465918e-06 6.06232335e-07 1.08692028e-07 1.82532486e-06 1.28177961e-06 -4.95456302e-07 2.20350761e-05 7.21610794e-06 4.24952023e-06 -1.44978187e-04 5.85336743e-05 -1.29388692e-03 3.83703323e-06 -1.38199706e-06 2.09370319e-05 2.55846362e-07 1.88266319e-05 -4.95456302e-07 1.10150480e-06 5.83536261e-07 1.69048349e-05 -3.30483140e-06 -2.85669752e-04 -1.71158075e-03 -1.19719034e-04 2.60875899e-06 2.60428974e-05 1.52372290e-06 1.84499944e-06 1.25079886e-06 2.20350761e-05 5.83536261e-07 1.25888020e-06 9.73358697e-04 -5.24497521e-05 7.71791276e-04 1.26566916e-04 -2.29247964e-02 -1.15752095e-05 -5.84545877e-06 7.19758021e-04 4.19780550e-06 1.16006584e-04 1.69924216e-06 7.32000399e-06 1.21633219e-05 -5.24497521e-05 3.67228436e-05 -2.14994175e-04 -1.24687861e-05 8.23015024e-03 4.60503564e-06 -1.14862855e-06 -2.30017748e-04 2.45015475e-06 -1.06511582e-05 -2.80630140e-07 4.24054409e-06 -2.69920059e-06 7.71791276e-04 -2.14994175e-04 2.10343535e-02 -1.89470691e-02 4.54940609e-03 -4.27187482e-04 2.00198249e-03 -4.87863270e-05 7.35030715e-05 -2.64818782e-05 1.72950757e-03 1.45111271e-04 2.83888757e-04 1.26566916e-04 -1.24687861e-05 -1.89470691e-02 2.06649222e-02 1.89833575e-02 1.99039120e-03 -4.24913256e-04 -3.39360139e-04 -6.81302687e-06 2.00339240e-04 2.75085383e-04 -5.92197483e-05 1.71326927e-03 -2.29247964e-02 8.23015024e-03 4.54940609e-03 1.89833575e-02 -2.50832380e-01 5.33732012e-05 -4.13388431e-04 5.83183195e-03 7.66323778e-04 -2.51496652e-03 1.50325116e-04 1.29681999e-03 1.68779109e-04 -1.15752095e-05 4.60503564e-06 -4.27187482e-04 1.99039120e-03 5.33732012e-05 2.04807668e-06 -8.81771803e-05 -3.45556406e-06 -1.24927244e-06 1.15957686e-06 -2.65596570e-05 -3.78423205e-06 -2.77897092e-06 -5.84545877e-06 -1.14862855e-06 2.00198249e-03 -4.24913256e-04 -4.13388431e-04 -8.81771803e-05 2.23914575e-06 8.12114536e-06 2.23858063e-07 -3.48181621e-06 -2.58085711e-06 5.59776877e-07 -2.61227899e-05 7.19758021e-04 -2.30017748e-04 -4.87863270e-05 -3.39360139e-04 5.83183195e-03 -3.45556406e-06 8.12114536e-06 -1.30557911e-04 -1.23291589e-05 5.59860131e-05 -1.69660670e-06 -2.08151108e-05 -3.49791356e-06 4.19780550e-06 2.45015475e-06 7.35030715e-05 -6.81302687e-06 7.66323778e-04 -1.24927244e-06 2.23858063e-07 -1.23291589e-05 7.37765619e-07 1.11765612e-05 -5.91716112e-08 2.37232914e-07 1.83193233e-06 1.16006584e-04 -1.06511582e-05 -2.64818782e-05 2.00339240e-04 -2.51496652e-03 1.15957686e-06 -3.48181621e-06 5.59860131e-05 1.11765612e-05 -2.15196201e-05 2.28329556e-06 1.88698103e-05 8.46277756e-07 1.69924216e-06 -2.80630140e-07 1.72950757e-03 2.75085383e-04 1.50325116e-04 -2.65596570e-05 -2.58085711e-06 -1.69660670e-06 -5.91716112e-08 2.28329556e-06 1.10854705e-06 -8.00955041e-07 2.19288060e-05 7.32000399e-06 4.24054409e-06 1.45111271e-04 -5.92197483e-05 1.29681999e-03 -3.78423205e-06 5.59776877e-07 -2.08151108e-05 2.37232914e-07 1.88698103e-05 -8.00955041e-07 1.10635148e-06 6.06165209e-07 1.21633219e-05 -2.69920059e-06 2.83888757e-04 1.71326927e-03 1.68779109e-04 -2.77897092e-06 -2.61227899e-05 -3.49791356e-06 1.83193233e-06 8.46277756e-07 2.19288060e-05 6.06165209e-07 1.18296820e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +1 0 0 507 + 6.73361942e-04 -3.97537772e-05 7.92408229e-04 -2.08943763e-02 1.31266047e-04 -1.72965599e-05 5.42656099e-04 7.00477616e-06 3.94541403e-06 4.81371689e-08 -1.20934462e-04 -7.37597696e-06 -1.16470146e-05 -3.97537772e-05 1.60670407e-05 -2.12667446e-04 8.26935955e-03 7.98001436e-06 4.25595524e-06 -2.30924551e-04 1.75054518e-06 -2.62363319e-06 -1.61175046e-06 9.06842324e-06 4.37520218e-06 3.04562873e-06 7.92408229e-04 -2.12667446e-04 -2.14829023e-02 -3.71268150e-03 1.75293540e-02 4.88599897e-04 9.01879561e-05 -2.04695642e-03 7.52737246e-05 1.59938622e-03 1.22639815e-04 -1.39228798e-04 3.19255962e-04 -2.08943763e-02 8.26935955e-03 -3.71268150e-03 -1.81977887e-01 -1.89085567e-02 1.40640772e-04 4.95961374e-03 4.61074437e-04 9.19749440e-04 1.52966528e-04 1.40876300e-03 -1.55859666e-03 -4.40258755e-05 1.31266047e-04 7.98001436e-06 1.75293540e-02 -1.89085567e-02 -2.08026443e-02 -2.04072172e-03 3.33041135e-04 4.72221132e-04 1.06213432e-04 3.10813800e-04 2.12351595e-04 -4.96620554e-06 1.58339328e-03 -1.72965599e-05 4.25595524e-06 4.88599897e-04 1.40640772e-04 -2.04072172e-03 -1.57823544e-05 -4.39825444e-06 9.12826691e-05 -1.27991946e-06 -2.31224839e-05 -2.72506963e-06 3.80797434e-06 -1.05398619e-05 5.42656099e-04 -2.30924551e-04 9.01879561e-05 4.95961374e-03 3.33041135e-04 -4.39825444e-06 -1.28104111e-04 -9.01745553e-06 -1.61753760e-05 -2.13841414e-06 -3.53600279e-05 2.74194417e-05 1.83218511e-06 7.00477616e-06 1.75054518e-06 -2.04695642e-03 4.61074437e-04 4.72221132e-04 9.12826691e-05 -9.01745553e-06 -1.53380790e-05 -2.22079191e-06 -1.03262115e-05 -4.00517617e-06 -1.64895602e-08 -2.27178464e-05 3.94541403e-06 -2.62363319e-06 7.52737246e-05 9.19749440e-04 1.06213432e-04 -1.27991946e-06 -1.61753760e-05 -2.22079191e-06 -9.34885278e-07 -1.20221699e-06 -1.25341370e-05 2.91206873e-07 -1.66578969e-06 4.81371689e-08 -1.61175046e-06 1.59938622e-03 1.52966528e-04 3.10813800e-04 -2.31224839e-05 -2.13841414e-06 -1.03262115e-05 -1.20221699e-06 -5.82926895e-06 -2.42238671e-06 1.76507771e-08 -1.98888934e-05 -1.20934462e-04 9.06842324e-06 1.22639815e-04 1.40876300e-03 2.12351595e-04 -2.72506963e-06 -3.53600279e-05 -4.00517617e-06 -1.25341370e-05 -2.42238671e-06 -1.00227308e-05 2.11474313e-05 -1.03082780e-06 -7.37597696e-06 4.37520218e-06 -1.39228798e-04 -1.55859666e-03 -4.96620554e-06 3.80797434e-06 2.74194417e-05 -1.64895602e-08 2.91206873e-07 1.76507771e-08 2.11474313e-05 -1.19495073e-06 5.11705169e-07 -1.16470146e-05 3.04562873e-06 3.19255962e-04 -4.40258755e-05 1.58339328e-03 -1.05398619e-05 1.83218511e-06 -2.27178464e-05 -1.66578969e-06 -1.98888934e-05 -1.03082780e-06 5.11705169e-07 -5.95160958e-06 -2.30970536e-02 5.94037473e-03 2.09662763e-06 -8.15517156e-05 1.14474191e-04 2.31797641e-03 2.40771110e-03 -2.22301970e-03 -2.43071797e-07 -1.54432729e-03 1.42206233e-03 -5.19099848e-05 1.47631583e-03 6.75660007e-04 -3.70583968e-05 -7.60183549e-04 2.09274361e-02 -1.51406289e-04 -1.64162023e-06 -5.54621534e-04 8.02440447e-06 3.71527257e-06 1.41830964e-06 -1.20903168e-04 -7.05570119e-06 -1.46557977e-05 5.66887190e-03 -3.35393364e-04 -4.04833836e-03 -3.87799502e-03 4.13501486e-03 9.94342201e-05 9.15295789e-05 -1.07877289e-04 -2.86358914e-07 1.99491717e-05 -7.24007071e-06 -2.66335103e-06 -1.16926507e-05 -3.70583968e-05 1.50522051e-05 2.16903688e-04 -8.22741963e-03 6.71138355e-06 -3.48363816e-06 2.29517192e-04 9.16193695e-07 -2.54427436e-06 -5.37690715e-07 9.28543243e-06 4.37638627e-06 3.64659964e-06 -1.83768890e-04 4.11745563e-03 -5.36715690e-02 -2.43868036e-01 2.21022945e-01 8.40500891e-05 6.06657551e-03 -5.37624081e-03 8.85894806e-04 -1.68902008e-03 1.82357183e-03 -1.50808329e-04 1.70725211e-03 -7.60183549e-04 2.16903688e-04 -2.12881964e-02 -3.67288888e-03 1.76032039e-02 4.85036763e-04 1.05677681e-04 -2.04259252e-03 -7.38170330e-05 -1.59888601e-03 -1.10916847e-04 1.38435699e-04 -3.17602844e-04 -6.04318066e-05 4.02735793e-03 -2.44138640e-01 -7.16630172e-02 2.34513293e-01 5.94337156e-03 5.58610719e-04 -5.61031003e-03 -4.55645634e-04 -1.96572509e-03 1.92551919e-03 6.38070122e-04 2.00321284e-03 2.09274361e-02 -8.22741963e-03 -3.67288888e-03 -1.82082090e-01 -1.90264795e-02 3.35823876e-05 4.94466670e-03 5.70967741e-04 -9.18925056e-04 -1.17448539e-04 -1.40231869e-03 1.56254351e-03 -2.57406725e-06 4.79903222e-05 -4.26787793e-03 2.21052348e-01 2.34367319e-01 -3.14277441e-02 -5.46740884e-03 -5.82300543e-03 -4.01763639e-04 3.51863680e-04 1.37253496e-03 -1.60786809e-03 7.70527997e-04 -1.49575572e-03 -1.51406289e-04 6.71138355e-06 1.76032039e-02 -1.90264795e-02 -2.08557672e-02 -2.04011682e-03 3.53343551e-04 4.82257184e-04 -1.05167768e-04 -3.06738183e-04 -2.05459987e-04 5.27889387e-06 -1.58582400e-03 -2.02907584e-03 -1.05916310e-04 2.33518808e-05 5.83941993e-03 -5.37854297e-03 2.38849929e-05 -1.49956653e-04 1.35489660e-04 -1.49866022e-05 3.42841905e-05 -4.09493519e-05 4.12883227e-06 -2.87870079e-05 -1.64162023e-06 -3.48363816e-06 4.85036763e-04 3.35823876e-05 -2.04011682e-03 -1.51869930e-05 -6.98851141e-07 9.03878041e-05 1.27799009e-06 2.30237241e-05 3.22070996e-06 -3.75439524e-06 1.05310605e-05 -2.10279721e-03 -9.60150546e-05 5.92110603e-03 4.12201360e-04 -5.76269634e-03 -1.49379862e-04 1.22086375e-05 1.42989791e-04 8.21974934e-06 4.04904295e-05 -3.33531383e-05 -1.04591462e-05 -4.32676487e-05 -5.54621534e-04 2.29517192e-04 1.05677681e-04 4.94466670e-03 3.53343551e-04 -6.98851141e-07 -1.27406033e-04 -1.24035629e-05 1.61114847e-05 1.80762506e-06 3.51900561e-05 -2.73107074e-05 3.94949154e-08 1.92358576e-03 1.11812472e-04 -5.21750510e-03 -5.51280191e-03 -5.38296209e-04 1.34427742e-04 1.42290366e-04 3.79055304e-05 -5.06922523e-06 -2.02684488e-05 3.44249429e-05 -1.35261994e-05 3.03095393e-05 8.02440447e-06 9.16193695e-07 -2.04259252e-03 5.70967741e-04 4.82257184e-04 9.03878041e-05 -1.24035629e-05 -1.53786153e-05 2.71694594e-06 1.02971341e-05 4.34454045e-06 -9.81035752e-07 2.27171575e-05 -5.47231757e-08 1.96413971e-07 -8.88773026e-04 4.53245914e-04 -3.52799019e-04 1.50846888e-05 -8.39813516e-06 5.39509780e-06 6.28992205e-06 5.50844326e-06 -5.60896386e-06 2.52154614e-07 1.25949487e-05 3.71527257e-06 -2.54427436e-06 -7.38170330e-05 -9.18925056e-04 -1.05167768e-04 1.27799009e-06 1.61114847e-05 2.71694594e-06 -8.99249570e-07 -1.00005934e-06 -1.24953939e-05 2.66013274e-07 -1.65640447e-06 -1.60788675e-03 1.93401252e-05 1.73137916e-03 1.98883091e-03 -1.41761428e-03 -3.54165283e-05 -4.15542569e-05 2.24733557e-05 5.57191371e-06 1.52786244e-05 -2.07810848e-05 1.07864540e-05 -1.73577445e-05 1.41830964e-06 -5.37690715e-07 -1.59888601e-03 -1.17448539e-04 -3.06738183e-04 2.30237241e-05 1.80762506e-06 1.02971341e-05 -1.00005934e-06 -5.72796451e-06 -2.00165153e-06 -3.38554894e-07 -1.98226003e-05 1.48588589e-03 -6.19264361e-06 -1.86241064e-03 -1.97088972e-03 1.61511410e-03 4.25840113e-05 3.60498903e-05 -3.61413449e-05 -5.68520737e-06 -2.04037581e-05 3.07999331e-05 8.89189683e-06 2.38041797e-05 -1.20903168e-04 9.28543243e-06 -1.10916847e-04 -1.40231869e-03 -2.05459987e-04 3.22070996e-06 3.51900561e-05 4.34454045e-06 -1.24953939e-05 -2.00165153e-06 -9.81822232e-06 2.11801885e-05 -6.70871051e-07 -5.25276936e-05 -2.84529967e-06 1.52367404e-04 -6.39785684e-04 -7.72206803e-04 -4.27319573e-06 1.00704641e-05 1.32282734e-05 2.85704469e-07 1.09640961e-05 9.09812263e-06 6.17212951e-06 -9.90651717e-07 -7.05570119e-06 4.37638627e-06 1.38435699e-04 1.56254351e-03 5.27889387e-06 -3.75439524e-06 -2.73107074e-05 -9.81035752e-07 2.66013274e-07 -3.38554894e-07 2.11801885e-05 -1.19986110e-06 5.24586487e-07 1.54738933e-03 -1.29767783e-05 -1.73326849e-03 -2.02052298e-03 1.51421276e-03 2.97436636e-05 4.49706024e-05 -3.23124980e-05 1.25586484e-05 -1.67291900e-05 2.34815694e-05 -9.84746047e-07 2.40545549e-05 -1.46557977e-05 3.64659964e-06 -3.17602844e-04 -2.57406725e-06 -1.58582400e-03 1.05310605e-05 3.94949154e-08 2.27171575e-05 -1.65640447e-06 -1.98226003e-05 -6.70871051e-07 5.24586487e-07 -5.94200596e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 diff --git a/tests/03_NAO_multik/02_NO_KP_15/result.ref b/tests/03_NAO_multik/02_NO_KP_15/result.ref index e549847aad..cc7d63c6c3 100644 --- a/tests/03_NAO_multik/02_NO_KP_15/result.ref +++ b/tests/03_NAO_multik/02_NO_KP_15/result.ref @@ -1,8 +1,5 @@ -etotref -204.8201098650446568 -etotperatomref -102.4100549325 -totalforceref 0.393746 -totalstressref 46.724863 -pointgroupref C_1h -spacegroupref C_2h -nksibzref 6 -totaltimeref +0.79966 +etotref -204.8201568334281149 +etotperatomref -102.4100784167 +totalforceref 0.393726 +totalstressref 46.701814 +totaltimeref 0.27 diff --git a/tests/03_NAO_multik/17_NO_KP_OH/INPUT b/tests/03_NAO_multik/17_NO_KP_OH/INPUT index 0efe436f03..489e9f4ee0 100644 --- a/tests/03_NAO_multik/17_NO_KP_OH/INPUT +++ b/tests/03_NAO_multik/17_NO_KP_OH/INPUT @@ -25,6 +25,5 @@ smearing_sigma 0.002 mixing_type broyden mixing_beta 0.7 -out_mat_hs 1 5 +out_mat_hs 1 3 ks_solver scalapack_gvx -out_ndigits 5 diff --git a/tests/03_NAO_multik/17_NO_KP_OH/STRU b/tests/03_NAO_multik/17_NO_KP_OH/STRU index 8bff6c3384..b1c8ce954a 100644 --- a/tests/03_NAO_multik/17_NO_KP_OH/STRU +++ b/tests/03_NAO_multik/17_NO_KP_OH/STRU @@ -1,8 +1,8 @@ ATOMIC_SPECIES -Si 14 Si_ONCV_PBE-1.0.upf upf201 +Si 14 Si_dojo_nsoc.upf NUMERICAL_ORBITAL -Si_gga_8au_60Ry_2s2p1d.orb +Si_dojo_6au_sz.orb LATTICE_CONSTANT 10.2 // add lattice constant diff --git a/tests/03_NAO_multik/17_NO_KP_OH/hk2_nao.txt.ref b/tests/03_NAO_multik/17_NO_KP_OH/hk2_nao.txt.ref index 409d3c29fc..2febe1208f 100644 --- a/tests/03_NAO_multik/17_NO_KP_OH/hk2_nao.txt.ref +++ b/tests/03_NAO_multik/17_NO_KP_OH/hk2_nao.txt.ref @@ -1,26 +1,23 @@ -26 (-0.082776,-9.1297e-33) (-0.11465,2.1006e-17) (-0.020367,-9.5125e-16) (-0.020367,-9.5125e-16) (0.020367,9.5125e-16) (0.029184,1.3014e-15) (0.029184,1.3014e-15) (-0.029184,-1.3014e-15) (1.0922e-16,5.4272e-32) (-0.066314,-1.4078e-16) (0.066314,1.4078e-16) (4.2246e-16,4.4042e-32) (0.066314,1.4078e-16) (-0.19457,-1.035e-15) (0.10188,-2.722e-16) (0.11256,-8.2438e-16) (0.11256,-8.2438e-16) (-0.11256,8.2438e-16) (0.0034458,7.6953e-16) (0.0034458,7.6953e-16) (-0.0034458,-7.6953e-16) (-3.4085e-17,5.981e-31) (-0.038015,8.7631e-17) (0.038015,-8.7631e-17) (1.1196e-16,1.4241e-31) (0.038015,-8.7631e-17) - (0.70902,3.8567e-31) (-0.051417,2.1842e-16) (-0.051417,2.1842e-16) (0.051417,-2.1842e-16) (0.061774,-2.1271e-15) (0.061774,-2.1271e-15) (-0.061774,2.1271e-15) (1.0242e-16,5.9747e-31) (0.029537,-4.4615e-16) (-0.029537,4.4615e-16) (-3.8764e-17,-2.539e-31) (-0.029537,4.4615e-16) (0.10188,-2.722e-16) (0.058306,2.548e-15) (-0.14708,6.1324e-16) (-0.14708,6.1324e-16) (0.14708,-6.1324e-16) (0.16668,-1.8109e-15) (0.16668,-1.8109e-15) (-0.16668,1.8109e-15) (1.9326e-17,-8.9906e-32) (0.0087689,2.0855e-16) (-0.0087689,-2.0855e-16) (1.49e-16,-8.3232e-31) (-0.0087689,-2.0855e-16) - (0.28447,5.7303e-32) (-0.06343,1.9518e-31) (0.06343,8.9706e-31) (0.26975,2.2586e-17) (-0.074643,2.6518e-18) (0.074643,-2.6518e-18) (-0.008018,-5.1887e-17) (-0.031919,-6.006e-17) (0.031919,6.006e-17) (1.6266e-17,-6.8941e-31) (0.10178,-2.8642e-17) (-0.11256,8.2438e-16) (0.14708,-6.1324e-16) (-0.027588,-3.458e-16) (0.013264,-4.1515e-16) (-0.013264,4.1515e-16) (-0.080332,5.945e-16) (-0.12029,8.2169e-16) (0.12029,-8.2169e-16) (0.042437,-1.42e-16) (-0.039652,2.1512e-16) (0.039652,-2.1512e-16) (1.5921e-17,-3.314e-31) (-0.069547,-3.4356e-16) - (0.28447,-5.9725e-33) (0.06343,-1.6844e-31) (-0.074643,2.6518e-18) (0.26975,2.2586e-17) (0.074643,-2.6518e-18) (0.004009,2.5944e-17) (-0.031919,-6.006e-17) (0.10178,-2.8642e-17) (-0.0069438,-4.4936e-17) (0.031919,6.006e-17) (-0.11256,8.2438e-16) (0.14708,-6.1324e-16) (0.013264,-4.1515e-16) (-0.027588,-3.458e-16) (-0.013264,4.1515e-16) (-0.12029,8.2169e-16) (-0.080332,5.945e-16) (0.12029,-8.2169e-16) (-0.021219,7.1e-17) (-0.039652,2.1512e-16) (-0.069547,-3.4356e-16) (0.036752,-1.2298e-16) (0.039652,-2.1512e-16) - (0.28447,6.9645e-32) (0.074643,-2.6518e-18) (0.074643,-2.6518e-18) (0.26975,2.2586e-17) (-0.004009,-2.5944e-17) (0.10178,-2.8642e-17) (-0.031919,-6.006e-17) (-0.0069438,-4.4936e-17) (-0.031919,-6.006e-17) (0.11256,-8.2438e-16) (-0.14708,6.1324e-16) (-0.013264,4.1515e-16) (-0.013264,4.1515e-16) (-0.027588,-3.458e-16) (0.12029,-8.2169e-16) (0.12029,-8.2169e-16) (-0.080332,5.945e-16) (0.021219,-7.1e-17) (-0.069547,-3.4356e-16) (-0.039652,2.1512e-16) (0.036752,-1.2298e-16) (-0.039652,2.1512e-16) - (1.0055,4.7569e-33) (0.28657,3.8931e-30) (-0.28657,-3.3844e-32) (0.00042938,2.1669e-16) (0.061926,-2.9486e-16) (-0.061926,2.9486e-16) (-7.359e-17,1.6781e-30) (-0.026141,1.5691e-16) (-0.0034458,-7.6953e-16) (-0.16668,1.8109e-15) (-0.080332,5.945e-16) (-0.12029,8.2169e-16) (0.12029,-8.2169e-16) (0.31908,-5.8099e-16) (0.15471,-3.9248e-16) (-0.15471,3.9248e-16) (-0.018858,-1.3465e-16) (-0.077067,-2.8751e-16) (0.077067,2.8751e-16) (-1.0408e-17,1.155e-31) (0.073506,2.4706e-16) - (1.0055,-6.6696e-32) (-0.28657,3.3727e-30) (-0.00021469,-1.0834e-16) (0.061926,-2.9486e-16) (-0.026141,1.5691e-16) (0.00037185,1.8766e-16) (-0.061926,2.9486e-16) (-0.0034458,-7.6953e-16) (-0.16668,1.8109e-15) (-0.12029,8.2169e-16) (-0.080332,5.945e-16) (0.12029,-8.2169e-16) (0.15471,-3.9248e-16) (0.31908,-5.8099e-16) (-0.15471,3.9248e-16) (0.0094292,6.7324e-17) (-0.077067,-2.8751e-16) (0.073506,2.4706e-16) (-0.016332,-1.1661e-16) (0.077067,2.8751e-16) - (1.0055,-1.4293e-31) (0.00021469,1.0834e-16) (-0.026141,1.5691e-16) (0.061926,-2.9486e-16) (0.00037185,1.8766e-16) (0.061926,-2.9486e-16) (0.0034458,7.6953e-16) (0.16668,-1.8109e-15) (0.12029,-8.2169e-16) (0.12029,-8.2169e-16) (-0.080332,5.945e-16) (-0.15471,3.9248e-16) (-0.15471,3.9248e-16) (0.31908,-5.8099e-16) (-0.0094292,-6.7324e-17) (0.073506,2.4706e-16) (-0.077067,-2.8751e-16) (-0.016332,-1.1661e-16) (-0.077067,-2.8751e-16) - (1.3565,3.9521e-33) (-0.0083012,-3.7999e-17) (0.0083012,3.7999e-17) (-1.1507e-17,2.6613e-32) (-0.016602,-7.5998e-17) (3.2485e-17,9.6106e-32) (-2.0659e-16,-3.322e-31) (-0.042437,1.42e-16) (0.021219,-7.1e-17) (-0.021219,7.1e-17) (0.018858,1.3465e-16) (-0.0094292,-6.7324e-17) (0.0094292,6.7324e-17) (-0.11025,-5.1483e-16) (0.053608,-2.01e-16) (-0.053608,2.01e-16) (-5.9267e-17,-6.5921e-32) (0.10722,-4.02e-16) - (1.2857,-7.7255e-33) (0.027582,5.2214e-31) (-0.014378,6.5817e-17) (0.027582,1.1109e-31) (-0.038015,8.7631e-17) (0.0087689,2.0855e-16) (0.039652,-2.1512e-16) (0.039652,-2.1512e-16) (0.069547,3.4356e-16) (0.077067,2.8751e-16) (0.077067,2.8751e-16) (-0.073506,-2.4706e-16) (0.053608,-2.01e-16) (0.048247,1.8491e-16) (0.11466,-5.1565e-16) (0.092851,-3.4815e-16) (0.11466,-5.1565e-16) - (1.2857,6.8651e-32) (-0.014378,6.5817e-17) (-0.027582,3.1108e-31) (0.038015,-8.7631e-17) (-0.0087689,-2.0855e-16) (-0.039652,2.1512e-16) (0.069547,3.4356e-16) (0.039652,-2.1512e-16) (-0.077067,-2.8751e-16) (-0.073506,-2.4706e-16) (0.077067,2.8751e-16) (-0.053608,2.01e-16) (0.11466,-5.1565e-16) (0.048247,1.8491e-16) (0.092851,-3.4815e-16) (-0.11466,5.1565e-16) - (1.3565,6.28e-33) (1.1813e-17,-1.2652e-31) (2.0931e-16,6.8859e-31) (1.1554e-16,5.7494e-31) (-2.8145e-16,9.5266e-31) (-0.036752,1.2298e-16) (-0.036752,1.2298e-16) (2.7461e-16,-6.9214e-31) (0.016332,1.1661e-16) (0.016332,1.1661e-16) (-5.2225e-17,-1.7437e-32) (0.092851,-3.4815e-16) (0.092851,-3.4815e-16) (-0.11025,-5.1483e-16) (-1.2277e-16,2.7021e-31) - (1.2857,1.7309e-32) (0.038015,-8.7631e-17) (-0.0087689,-2.0855e-16) (0.069547,3.4356e-16) (-0.039652,2.1512e-16) (0.039652,-2.1512e-16) (-0.073506,-2.4706e-16) (-0.077067,-2.8751e-16) (0.077067,2.8751e-16) (0.10722,-4.02e-16) (0.11466,-5.1565e-16) (-0.11466,5.1565e-16) (-5.1327e-17,1.342e-31) (0.048247,1.8491e-16) - (-0.082776,-5.2578e-33) (-0.11465,-2.1006e-17) (0.020367,-9.5125e-16) (0.020367,-9.5125e-16) (-0.020367,9.5125e-16) (-0.029184,1.3014e-15) (-0.029184,1.3014e-15) (0.029184,-1.3014e-15) (2.9066e-16,4.7894e-32) (-0.066314,1.4078e-16) (0.066314,-1.4078e-16) (1.0835e-16,1.5036e-32) (0.066314,-1.4078e-16) - (0.70902,-2.8462e-31) (0.051417,2.1842e-16) (0.051417,2.1842e-16) (-0.051417,-2.1842e-16) (-0.061774,-2.1271e-15) (-0.061774,-2.1271e-15) (0.061774,2.1271e-15) (-8.627e-17,2.3684e-31) (0.029537,4.4615e-16) (-0.029537,-4.4615e-16) (3.4093e-17,-6.1297e-32) (-0.029537,-4.4615e-16) - (0.28447,-1.1435e-31) (-0.06343,3.2491e-32) (0.06343,6.0296e-31) (0.26975,-2.2586e-17) (-0.074643,-2.6518e-18) (0.074643,2.6518e-18) (0.008018,-5.1887e-17) (0.031919,-6.006e-17) (-0.031919,6.006e-17) (-6.2555e-17,-1.1012e-31) (-0.10178,-2.8642e-17) - (0.28447,9.505e-32) (0.06343,-5.2051e-31) (-0.074643,-2.6518e-18) (0.26975,-2.2586e-17) (0.074643,2.6518e-18) (-0.004009,2.5944e-17) (0.031919,-6.006e-17) (-0.10178,-2.8642e-17) (0.0069438,-4.4936e-17) (-0.031919,6.006e-17) - (0.28447,-8.1192e-32) (0.074643,2.6518e-18) (0.074643,2.6518e-18) (0.26975,-2.2586e-17) (0.004009,-2.5944e-17) (-0.10178,-2.8642e-17) (0.031919,-6.006e-17) (0.0069438,-4.4936e-17) (0.031919,-6.006e-17) - (1.0055,-8.3122e-31) (0.28657,9.0876e-31) (-0.28657,-9.0792e-32) (-0.00042938,2.1669e-16) (-0.061926,-2.9486e-16) (0.061926,2.9486e-16) (1.538e-17,3.5072e-31) (0.026141,1.5691e-16) - (1.0055,-1.3511e-31) (-0.28657,-7.5834e-31) (0.00021469,-1.0834e-16) (-0.061926,-2.9486e-16) (0.026141,1.5691e-16) (-0.00037185,1.8766e-16) (0.061926,2.9486e-16) - (1.0055,-4.6716e-31) (-0.00021469,1.0834e-16) (0.026141,1.5691e-16) (-0.061926,-2.9486e-16) (-0.00037185,1.8766e-16) (-0.061926,-2.9486e-16) - (1.3565,1.5062e-33) (-0.0083012,3.7999e-17) (0.0083012,-3.7999e-17) (-2.1236e-16,-5.9465e-32) (-0.016602,7.5998e-17) - (1.2857,3.5983e-33) (0.027582,-1.4237e-31) (-0.014378,-6.5817e-17) (0.027582,-1.322e-31) - (1.2857,9.3771e-34) (-0.014378,-6.5817e-17) (-0.027582,-1.697e-31) - (1.3565,7.2768e-33) (-8.0332e-18,6.5361e-32) - (1.2857,1.0457e-32) +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/hk2_nao.txt +# gamma only 0 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + (5.166e-02,-3.852e-32) (6.663e-03,1.288e-16) (6.663e-03,1.288e-16) (-6.663e-03,-1.288e-16) (-1.844e-01,-8.423e-16) (9.209e-02,-2.027e-16) (9.209e-02,-2.027e-16) (-9.209e-02,2.027e-16) +Row 2 + (1.445e+00,-6.019e-36) (1.126e-01,2.138e-29) (-1.126e-01,-2.586e-29) (-9.209e-02,2.027e-16) (1.090e-01,-3.838e-16) (-3.637e-02,4.150e-16) (3.637e-02,-4.150e-16) +Row 3 + (1.445e+00,-5.381e-33) (-1.126e-01,-4.535e-30) (-9.209e-02,2.027e-16) (-3.637e-02,4.150e-16) (1.090e-01,-3.838e-16) (3.637e-02,-4.150e-16) +Row 4 + (1.445e+00,1.852e-32) (9.209e-02,-2.027e-16) (3.637e-02,-4.150e-16) (3.637e-02,-4.150e-16) (1.090e-01,-3.838e-16) +Row 5 + (5.166e-02,-1.233e-32) (-6.663e-03,1.288e-16) (-6.663e-03,1.288e-16) (6.663e-03,-1.288e-16) +Row 6 + (1.445e+00,-2.312e-32) (1.126e-01,-2.271e-29) (-1.126e-01,2.667e-29) +Row 7 + (1.445e+00,2.543e-32) (-1.126e-01,3.883e-30) +Row 8 + (1.445e+00,-5.621e-32) diff --git a/tests/03_NAO_multik/17_NO_KP_OH/result.ref b/tests/03_NAO_multik/17_NO_KP_OH/result.ref index 3604bdcfc3..e92647c437 100644 --- a/tests/03_NAO_multik/17_NO_KP_OH/result.ref +++ b/tests/03_NAO_multik/17_NO_KP_OH/result.ref @@ -1,5 +1,5 @@ -etotref -211.4466153062836 -etotperatomref -105.7233076531 +etotref -194.1602102900063 +etotperatomref -97.0801051450 CompareH_pass 0 CompareS_pass 0 -totaltimeref 0.62879 +totaltimeref 0.33 diff --git a/tests/03_NAO_multik/17_NO_KP_OH/sk2_nao.txt.ref b/tests/03_NAO_multik/17_NO_KP_OH/sk2_nao.txt.ref index fe7ca72f8d..40dc7dd22e 100644 --- a/tests/03_NAO_multik/17_NO_KP_OH/sk2_nao.txt.ref +++ b/tests/03_NAO_multik/17_NO_KP_OH/sk2_nao.txt.ref @@ -1,26 +1,23 @@ -26 (0.98506,6.051e-33) (-0.097322,4.5979e-31) (1.4623e-17,2.204e-15) (-2.2985e-17,2.204e-15) (1.0435e-18,-2.204e-15) (-9.3919e-18,-4.7412e-15) (6.7871e-17,-4.7412e-15) (-1.4894e-17,4.7412e-15) (2.6309e-18,-1.509e-33) (0.085054,-2.1775e-33) (-0.085054,5.2285e-33) (-1.4383e-18,1.0987e-33) (-0.085054,5.1332e-33) (0.44884,2.2113e-15) (0.30005,3.5326e-15) (-0.48489,2.7256e-15) (-0.48489,2.7256e-15) (0.48489,-2.7256e-15) (0.50089,-4.1094e-15) (0.50089,-4.1094e-15) (-0.50089,4.1094e-15) (3.0632e-17,9.9267e-32) (0.2435,-8.2215e-16) (-0.2435,8.2215e-16) (3.4849e-17,8.3295e-32) (-0.2435,8.2215e-16) - (0.52584,-1.7849e-31) (2.1305e-17,4.8136e-15) (-8.2399e-18,4.8136e-15) (-5.4698e-17,-4.8136e-15) (-1.1493e-17,-5.5917e-15) (-8.6736e-18,-5.5917e-15) (-3.1876e-17,5.5917e-15) (-5.8276e-19,1.881e-32) (0.19474,1.6187e-32) (-0.19474,2.2817e-32) (6.18e-18,-1.3226e-32) (-0.19474,1.5018e-32) (0.30005,3.5326e-15) (-0.1912,2.4585e-15) (-0.11272,3.2857e-15) (-0.11272,3.2857e-15) (0.11272,-3.2857e-15) (0.11541,-4.3523e-15) (0.11541,-4.3523e-15) (-0.11541,4.3523e-15) (-2.1413e-18,-1.4102e-31) (-0.093884,1.3106e-15) (0.093884,-1.3106e-15) (1.8208e-17,-2.4998e-31) (0.093884,-1.3106e-15) - (1.0467,-4.2517e-32) (0.44713,-3.4401e-32) (-0.44713,3.1086e-32) (-0.11227,-1.9033e-31) (-0.68287,-2.6335e-32) (0.68287,2.0323e-32) (2.2023e-19,4.5287e-17) (-4.7705e-18,4.1314e-16) (2.8189e-18,-4.1314e-16) (8.6736e-19,2.0632e-31) (1.6263e-19,-3.1793e-17) (0.48489,-2.7256e-15) (0.11272,-3.2857e-15) (0.21954,1.3501e-16) (0.50325,-5.4124e-16) (-0.50325,5.4124e-16) (-0.55027,-1.2526e-15) (-0.35946,-1.4452e-15) (0.35946,1.4452e-15) (0.19188,-6.2657e-16) (-0.024506,3.0536e-16) (0.024506,-3.0536e-16) (2.8465e-17,2.7868e-32) (-0.30449,-8.9756e-16) - (1.0467,3.248e-32) (-0.44713,-1.5155e-32) (-0.68287,-2.6335e-32) (-0.11227,-1.0888e-31) (0.68287,9.3286e-32) (-1.1113e-18,-2.2644e-17) (1.2604e-18,4.1314e-16) (5.421e-20,-3.1793e-17) (5.8276e-19,3.922e-17) (-2.4733e-18,-4.1314e-16) (0.48489,-2.7256e-15) (0.11272,-3.2857e-15) (0.50325,-5.4124e-16) (0.21954,1.3501e-16) (-0.50325,5.4124e-16) (-0.35946,-1.4452e-15) (-0.55027,-1.2526e-15) (0.35946,1.4452e-15) (-0.095942,3.1329e-16) (-0.024506,3.0536e-16) (-0.30449,-8.9756e-16) (0.16618,-5.4263e-16) (0.024506,-3.0536e-16) - (1.0467,-4.2902e-32) (0.68287,2.0323e-32) (0.68287,9.3286e-32) (-0.11227,-1.1949e-31) (2.741e-18,2.2644e-17) (5.421e-20,-3.1793e-17) (3.1035e-18,4.1314e-16) (5.2855e-19,3.922e-17) (3.9844e-18,4.1314e-16) (-0.48489,2.7256e-15) (-0.11272,3.2857e-15) (-0.50325,5.4124e-16) (-0.50325,5.4124e-16) (0.21954,1.3501e-16) (0.35946,1.4452e-15) (0.35946,1.4452e-15) (-0.55027,-1.2526e-15) (0.095942,-3.1329e-16) (-0.30449,-8.9756e-16) (-0.024506,3.0536e-16) (0.16618,-5.4263e-16) (-0.024506,3.0536e-16) - (1.2292,4.3876e-33) (0.58205,-2.8391e-32) (-0.58205,2.5082e-32) (-2.575e-19,2.4193e-16) (1.301e-18,-1.3008e-16) (2.8189e-18,1.3008e-16) (-1.3824e-18,-3.5917e-31) (0,8.7897e-17) (-0.50089,4.1094e-15) (-0.11541,4.3523e-15) (-0.55027,-1.2526e-15) (-0.35946,-1.4452e-15) (0.35946,1.4452e-15) (0.38305,2.6688e-15) (0.46484,2.7809e-15) (-0.46484,-2.7809e-15) (0.12648,-6.3282e-16) (-0.26248,4.269e-16) (0.26248,-4.269e-16) (2.9985e-17,-5.2375e-31) (-0.013886,-8.3534e-16) - (1.2292,8.8387e-32) (-0.58205,1.4753e-32) (1.6263e-18,-1.2097e-16) (6.7763e-19,-1.3008e-16) (0,8.7897e-17) (-1.2468e-18,2.0952e-16) (-3.6185e-18,1.3008e-16) (-0.50089,4.1094e-15) (-0.11541,4.3523e-15) (-0.35946,-1.4452e-15) (-0.55027,-1.2526e-15) (0.35946,1.4452e-15) (0.46484,2.7809e-15) (0.38305,2.6688e-15) (-0.46484,-2.7809e-15) (-0.063239,3.1641e-16) (-0.26248,4.269e-16) (-0.013886,-8.3534e-16) (0.10953,-5.4804e-16) (0.26248,-4.269e-16) - (1.2292,-4.8569e-33) (1.0151e-17,1.2097e-16) (0,8.7897e-17) (-3.361e-18,-1.3008e-16) (1.3553e-18,2.0952e-16) (-1.7212e-18,-1.3008e-16) (0.50089,-4.1094e-15) (0.11541,-4.3523e-15) (0.35946,1.4452e-15) (0.35946,1.4452e-15) (-0.55027,-1.2526e-15) (-0.46484,-2.7809e-15) (-0.46484,-2.7809e-15) (0.38305,2.6688e-15) (0.063239,-3.1641e-16) (-0.013886,-8.3534e-16) (-0.26248,4.269e-16) (0.10953,-5.4804e-16) (-0.26248,4.269e-16) - (1.0122,1.2137e-32) (-0.05654,4.7639e-33) (0.05654,-2.6921e-33) (3.1171e-19,-5.4211e-33) (-0.11308,1.0697e-32) (3.0632e-17,9.9267e-32) (-2.1413e-18,-1.4102e-31) (-0.19188,6.2657e-16) (0.095942,-3.1329e-16) (-0.095942,3.1329e-16) (-0.12648,6.3282e-16) (0.063239,-3.1641e-16) (-0.063239,3.1641e-16) (-0.29169,-9.5242e-16) (0.11303,-4.3584e-16) (-0.11303,4.3584e-16) (-2.8155e-17,-1.1033e-31) (0.22606,-8.7168e-16) - (0.99552,6.2322e-33) (-0.030829,9.7026e-34) (-0.097931,-1.2331e-32) (-0.030829,-4.7837e-35) (0.2435,-8.2215e-16) (-0.093884,1.3106e-15) (0.024506,-3.0536e-16) (0.024506,-3.0536e-16) (0.30449,8.9756e-16) (0.26248,-4.269e-16) (0.26248,-4.269e-16) (0.013886,8.3534e-16) (0.11303,-4.3584e-16) (0.038813,2.889e-16) (0.13077,-4.249e-16) (0.19578,-7.549e-16) (0.13077,-4.249e-16) - (0.99552,-2.5219e-32) (-0.097931,-1.1642e-32) (0.030829,4.7012e-35) (-0.2435,8.2215e-16) (0.093884,-1.3106e-15) (-0.024506,3.0536e-16) (0.30449,8.9756e-16) (0.024506,-3.0536e-16) (-0.26248,4.269e-16) (0.013886,8.3534e-16) (0.26248,-4.269e-16) (-0.11303,4.3584e-16) (0.13077,-4.249e-16) (0.038813,2.889e-16) (0.19578,-7.549e-16) (-0.13077,4.249e-16) - (1.0122,-3.2171e-33) (3.4797e-17,-9.2822e-35) (3.4849e-17,8.3295e-32) (1.8208e-17,-2.4998e-31) (-2.8465e-17,-2.7868e-32) (-0.16618,5.4263e-16) (-0.16618,5.4263e-16) (-2.9985e-17,5.2375e-31) (-0.10953,5.4804e-16) (-0.10953,5.4804e-16) (-2.8155e-17,-1.1033e-31) (0.19578,-7.549e-16) (0.19578,-7.549e-16) (-0.29169,-9.5242e-16) (8.0045e-19,5.1353e-33) - (0.99552,-4.3545e-32) (-0.2435,8.2215e-16) (0.093884,-1.3106e-15) (0.30449,8.9756e-16) (-0.024506,3.0536e-16) (0.024506,-3.0536e-16) (0.013886,8.3534e-16) (-0.26248,4.269e-16) (0.26248,-4.269e-16) (0.22606,-8.7168e-16) (0.13077,-4.249e-16) (-0.13077,4.249e-16) (8.0045e-19,5.1353e-33) (0.038813,2.889e-16) - (0.98506,6.051e-33) (-0.097322,4.5979e-31) (1.4623e-17,2.204e-15) (-2.2985e-17,2.204e-15) (1.0435e-18,-2.204e-15) (-9.3919e-18,-4.7412e-15) (6.7871e-17,-4.7412e-15) (-1.4894e-17,4.7412e-15) (2.6309e-18,-1.509e-33) (0.085054,-2.1775e-33) (-0.085054,5.2285e-33) (-1.4383e-18,1.0987e-33) (-0.085054,5.1332e-33) - (0.52584,-1.7849e-31) (2.1305e-17,4.8136e-15) (-8.2399e-18,4.8136e-15) (-5.4698e-17,-4.8136e-15) (-1.1493e-17,-5.5917e-15) (-8.6736e-18,-5.5917e-15) (-3.1876e-17,5.5917e-15) (-5.8276e-19,1.881e-32) (0.19474,1.6187e-32) (-0.19474,2.2817e-32) (6.18e-18,-1.3226e-32) (-0.19474,1.5018e-32) - (1.0467,-4.2517e-32) (0.44713,-3.4401e-32) (-0.44713,3.1086e-32) (-0.11227,-1.9033e-31) (-0.68287,-2.6335e-32) (0.68287,2.0323e-32) (2.2023e-19,4.5287e-17) (-4.7705e-18,4.1314e-16) (2.8189e-18,-4.1314e-16) (8.6736e-19,2.0632e-31) (1.6263e-19,-3.1793e-17) - (1.0467,3.248e-32) (-0.44713,-1.5155e-32) (-0.68287,-2.6335e-32) (-0.11227,-1.0888e-31) (0.68287,9.3286e-32) (-1.1113e-18,-2.2644e-17) (1.2604e-18,4.1314e-16) (5.421e-20,-3.1793e-17) (5.8276e-19,3.922e-17) (-2.4733e-18,-4.1314e-16) - (1.0467,-4.2902e-32) (0.68287,2.0323e-32) (0.68287,9.3286e-32) (-0.11227,-1.1949e-31) (2.741e-18,2.2644e-17) (5.421e-20,-3.1793e-17) (3.1035e-18,4.1314e-16) (5.2855e-19,3.922e-17) (3.9844e-18,4.1314e-16) - (1.2292,4.3876e-33) (0.58205,-2.8391e-32) (-0.58205,2.5082e-32) (-2.575e-19,2.4193e-16) (1.301e-18,-1.3008e-16) (2.8189e-18,1.3008e-16) (-1.3824e-18,-3.5917e-31) (0,8.7897e-17) - (1.2292,8.8387e-32) (-0.58205,1.4753e-32) (1.6263e-18,-1.2097e-16) (6.7763e-19,-1.3008e-16) (0,8.7897e-17) (-1.2468e-18,2.0952e-16) (-3.6185e-18,1.3008e-16) - (1.2292,-4.8569e-33) (1.0151e-17,1.2097e-16) (0,8.7897e-17) (-3.361e-18,-1.3008e-16) (1.3553e-18,2.0952e-16) (-1.7212e-18,-1.3008e-16) - (1.0122,1.2137e-32) (-0.05654,4.7639e-33) (0.05654,-2.6921e-33) (3.1171e-19,-5.4211e-33) (-0.11308,1.0697e-32) - (0.99552,6.2322e-33) (-0.030829,9.7026e-34) (-0.097931,-1.2331e-32) (-0.030829,-4.7837e-35) - (0.99552,-2.5219e-32) (-0.097931,-1.1642e-32) (0.030829,4.7012e-35) - (1.0122,-3.2171e-33) (3.4797e-17,-9.2822e-35) - (0.99552,-4.3545e-32) +#------------------------------------------------------------------------ +# ionic step 1 +# filename OUT.autotest/sk2_nao.txt +# gamma only 0 +# rows 8 +# columns 8 +#------------------------------------------------------------------------ +Row 1 + (9.996e-01,2.696e-32) (6.505e-19,-6.918e-16) (0.000e+00,-6.918e-16) (0.000e+00,6.918e-16) (3.859e-01,1.528e-15) (-1.288e-02,-1.723e-16) (-1.288e-02,-1.723e-16) (1.288e-02,1.723e-16) +Row 2 + (1.012e+00,0.000e+00) (-7.121e-02,0.000e+00) (7.121e-02,0.000e+00) (1.288e-02,1.723e-16) (-1.220e-01,-5.729e-16) (9.660e-02,-1.723e-16) (-9.660e-02,1.723e-16) +Row 3 + (1.012e+00,2.196e-32) (7.121e-02,0.000e+00) (1.288e-02,1.723e-16) (9.660e-02,-1.723e-16) (-1.220e-01,-5.729e-16) (-9.660e-02,1.723e-16) +Row 4 + (1.012e+00,3.852e-34) (-1.288e-02,-1.723e-16) (-9.660e-02,1.723e-16) (-9.660e-02,1.723e-16) (-1.220e-01,-5.729e-16) +Row 5 + (9.996e-01,2.696e-32) (6.505e-19,-6.918e-16) (0.000e+00,-6.918e-16) (0.000e+00,6.918e-16) +Row 6 + (1.012e+00,0.000e+00) (-7.121e-02,0.000e+00) (7.121e-02,0.000e+00) +Row 7 + (1.012e+00,2.196e-32) (7.121e-02,0.000e+00) +Row 8 + (1.012e+00,3.852e-34) diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/INPUT b/tests/03_NAO_multik/32_NO_KP_wf/INPUT similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/INPUT rename to tests/03_NAO_multik/32_NO_KP_wf/INPUT diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/KPT b/tests/03_NAO_multik/32_NO_KP_wf/KPT similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/KPT rename to tests/03_NAO_multik/32_NO_KP_wf/KPT diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/README b/tests/03_NAO_multik/32_NO_KP_wf/README similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/README rename to tests/03_NAO_multik/32_NO_KP_wf/README diff --git a/tests/03_NAO_multik/33_NO_KP_OW/STRU b/tests/03_NAO_multik/32_NO_KP_wf/STRU similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/STRU rename to tests/03_NAO_multik/32_NO_KP_wf/STRU diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/result.ref b/tests/03_NAO_multik/32_NO_KP_wf/result.ref similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/result.ref rename to tests/03_NAO_multik/32_NO_KP_wf/result.ref diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk1s1_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk1s1_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk1s1_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk1s1_nao.txt diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk1s2_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk1s2_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk1s2_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk1s2_nao.txt diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk2s1_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk2s1_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk2s1_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk2s1_nao.txt diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk2s2_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk2s2_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk2s2_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk2s2_nao.txt diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk3s1_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk3s1_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk3s1_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk3s1_nao.txt diff --git a/tests/03_NAO_multik/32_NO_KP_get_wf/wfk3s2_nao.txt b/tests/03_NAO_multik/32_NO_KP_wf/wfk3s2_nao.txt similarity index 100% rename from tests/03_NAO_multik/32_NO_KP_get_wf/wfk3s2_nao.txt rename to tests/03_NAO_multik/32_NO_KP_wf/wfk3s2_nao.txt diff --git a/tests/03_NAO_multik/33_NO_KP_wf0/INPUT b/tests/03_NAO_multik/33_NO_KP_wf0/INPUT new file mode 100644 index 0000000000..a6b29618b4 --- /dev/null +++ b/tests/03_NAO_multik/33_NO_KP_wf0/INPUT @@ -0,0 +1,24 @@ +INPUT_PARAMETERS +suffix autotest + +#calculation scf +#out_wfc_lcao 1 + +calculation get_wf +symmetry -1 +nbands 2 +nspin 2 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +latname sc +ecutwfc 25.0 +basis_type lcao +scf_thr 1e-10 +read_file_dir ../32_NO_KP_wf/ + +out_wfc_norm 1 +out_wfc_re_im 1 + +bx 2 +by 2 +bz 2 diff --git a/tests/03_NAO_multik/33_NO_KP_wf0/KPT b/tests/03_NAO_multik/33_NO_KP_wf0/KPT new file mode 100644 index 0000000000..488317ce5a --- /dev/null +++ b/tests/03_NAO_multik/33_NO_KP_wf0/KPT @@ -0,0 +1,6 @@ +K_POINTS +3 +Direct +0.0000 0.0000 0.0000 0.0 +0.3333 0.0000 0.0000 0.0 +0.6667 0.0000 0.0000 0.0 diff --git a/tests/03_NAO_multik/33_NO_KP_wf0/README b/tests/03_NAO_multik/33_NO_KP_wf0/README new file mode 100644 index 0000000000..54533e01dd --- /dev/null +++ b/tests/03_NAO_multik/33_NO_KP_wf0/README @@ -0,0 +1,3 @@ +Test the 'calculation get_wf' option with zero-weight k-points. +This test verifies that ABACUS can handle k-points with zero weights +by automatically assigning equal weights and issuing a warning. diff --git a/tests/03_NAO_multik/34_NO_KP_MU/STRU b/tests/03_NAO_multik/33_NO_KP_wf0/STRU similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/STRU rename to tests/03_NAO_multik/33_NO_KP_wf0/STRU diff --git a/tests/03_NAO_multik/33_NO_KP_wf0/result.ref b/tests/03_NAO_multik/33_NO_KP_wf0/result.ref new file mode 100644 index 0000000000..e4d060972b --- /dev/null +++ b/tests/03_NAO_multik/33_NO_KP_wf0/result.ref @@ -0,0 +1,19 @@ +wfi1s1k1.cube -11.77152988 +wfi1s1k1im.cube 0 +wfi1s1k1re.cube -11.77169544 +wfi1s1k2.cube -3.754629032 +wfi1s1k2im.cube -5.256421773e-15 +wfi1s1k2re.cube -3.754662163 +wfi1s1k3.cube -3.754629032 +wfi1s1k3im.cube -2.592407863e-14 +wfi1s1k3re.cube -3.754662163 +wfi1s2k1.cube -11.77152988 +wfi1s2k1im.cube 0 +wfi1s2k1re.cube -15.5263576 +wfi1s2k2.cube -3.754629032 +wfi1s2k2im.cube 8.143533574e-14 +wfi1s2k2re.cube -7.509324327 +wfi1s2k3.cube -3.754629032 +wfi1s2k3im.cube -3.563679367e-14 +wfi1s2k3re.cube -7.509324327 +totaltimeref 0.22 diff --git a/tests/03_NAO_multik/34_NO_KP_pchg/INPUT b/tests/03_NAO_multik/34_NO_KP_pchg/INPUT new file mode 100644 index 0000000000..abd94c0d3e --- /dev/null +++ b/tests/03_NAO_multik/34_NO_KP_pchg/INPUT @@ -0,0 +1,21 @@ +INPUT_PARAMETERS +suffix autotest + +calculation get_pchg +symmetry -1 +nbands 2 +nspin 2 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +latname sc +ecutwfc 25.0 +basis_type lcao +scf_thr 1e-10 +read_file_dir ../32_NO_KP_wf/ + +out_pchg 1 +#if_separate_k true + +bx 2 +by 2 +bz 2 diff --git a/tests/03_NAO_multik/34_NO_KP_pchg/KPT b/tests/03_NAO_multik/34_NO_KP_pchg/KPT new file mode 100644 index 0000000000..eb3bd8bfb9 --- /dev/null +++ b/tests/03_NAO_multik/34_NO_KP_pchg/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +3 1 1 0 0 0 diff --git a/tests/03_NAO_multik/34_NO_KP_pchg/README b/tests/03_NAO_multik/34_NO_KP_pchg/README new file mode 100644 index 0000000000..443f8ac0e6 --- /dev/null +++ b/tests/03_NAO_multik/34_NO_KP_pchg/README @@ -0,0 +1 @@ +Obtain partial charge via 'calculation get_pchg' (multi-k points) diff --git a/tests/03_NAO_multik/34_NO_KP_pchg/STRU b/tests/03_NAO_multik/34_NO_KP_pchg/STRU new file mode 100644 index 0000000000..30af97b4b4 --- /dev/null +++ b/tests/03_NAO_multik/34_NO_KP_pchg/STRU @@ -0,0 +1,19 @@ +#This is the atom file containing all the information +#about the lattice structure. + +ATOMIC_SPECIES +H 1.0008 H_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +H_gga_6au_60Ry_2s1p.orb + +LATTICE_CONSTANT +10.0 #Lattice constant + +ATOMIC_POSITIONS +Cartesian #Cartesian(Unit is LATTICE_CONSTANT) +H #Name of element +0.0 #Magnetic for this element. +2 #Number of atoms +0.00 0.00 -0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z +0.00 0.00 0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z diff --git a/tests/03_NAO_multik/34_NO_KP_pchg/result.ref b/tests/03_NAO_multik/34_NO_KP_pchg/result.ref new file mode 100644 index 0000000000..7d68210df3 --- /dev/null +++ b/tests/03_NAO_multik/34_NO_KP_pchg/result.ref @@ -0,0 +1,3 @@ +pchgi1s1.cube 0.9999969968 +pchgi1s2.cube 0.9999969968 +totaltimeref 0.13 diff --git a/tests/03_NAO_multik/35_NO_KP_pchg_k/INPUT b/tests/03_NAO_multik/35_NO_KP_pchg_k/INPUT new file mode 100644 index 0000000000..4b1182e307 --- /dev/null +++ b/tests/03_NAO_multik/35_NO_KP_pchg_k/INPUT @@ -0,0 +1,21 @@ +INPUT_PARAMETERS +suffix autotest + +calculation get_pchg +symmetry -1 +nbands 2 +nspin 2 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +latname sc +ecutwfc 25.0 +basis_type lcao +scf_thr 1e-10 +read_file_dir ../32_NO_KP_wf/ + +out_pchg 1 +if_separate_k true + +bx 2 +by 2 +bz 2 diff --git a/tests/03_NAO_multik/35_NO_KP_pchg_k/KPT b/tests/03_NAO_multik/35_NO_KP_pchg_k/KPT new file mode 100644 index 0000000000..eb3bd8bfb9 --- /dev/null +++ b/tests/03_NAO_multik/35_NO_KP_pchg_k/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +3 1 1 0 0 0 diff --git a/tests/03_NAO_multik/35_NO_KP_pchg_k/README b/tests/03_NAO_multik/35_NO_KP_pchg_k/README new file mode 100644 index 0000000000..4519a5f1c6 --- /dev/null +++ b/tests/03_NAO_multik/35_NO_KP_pchg_k/README @@ -0,0 +1 @@ +Obtain partial charge for each k-point via 'calculation get_pchg' diff --git a/tests/03_NAO_multik/35_NO_KP_pchg_k/STRU b/tests/03_NAO_multik/35_NO_KP_pchg_k/STRU new file mode 100644 index 0000000000..30af97b4b4 --- /dev/null +++ b/tests/03_NAO_multik/35_NO_KP_pchg_k/STRU @@ -0,0 +1,19 @@ +#This is the atom file containing all the information +#about the lattice structure. + +ATOMIC_SPECIES +H 1.0008 H_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +H_gga_6au_60Ry_2s1p.orb + +LATTICE_CONSTANT +10.0 #Lattice constant + +ATOMIC_POSITIONS +Cartesian #Cartesian(Unit is LATTICE_CONSTANT) +H #Name of element +0.0 #Magnetic for this element. +2 #Number of atoms +0.00 0.00 -0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z +0.00 0.00 0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z diff --git a/tests/03_NAO_multik/35_NO_KP_pchg_k/result.ref b/tests/03_NAO_multik/35_NO_KP_pchg_k/result.ref new file mode 100644 index 0000000000..7a2a2d3684 --- /dev/null +++ b/tests/03_NAO_multik/35_NO_KP_pchg_k/result.ref @@ -0,0 +1,7 @@ +pchgi1s1k1.cube 0.9999996697 +pchgi1s1k2.cube 0.9999956604 +pchgi1s1k3.cube 0.9999956604 +pchgi1s2k1.cube 0.9999996697 +pchgi1s2k2.cube 0.9999956604 +pchgi1s2k3.cube 0.9999956604 +totaltimeref 0.25 diff --git a/tests/03_NAO_multik/34_NO_KP_MU/INPUT b/tests/03_NAO_multik/36_NO_KP_MU/INPUT similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/INPUT rename to tests/03_NAO_multik/36_NO_KP_MU/INPUT diff --git a/tests/03_NAO_multik/34_NO_KP_MU/KPT b/tests/03_NAO_multik/36_NO_KP_MU/KPT similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/KPT rename to tests/03_NAO_multik/36_NO_KP_MU/KPT diff --git a/tests/03_NAO_multik/34_NO_KP_MU/README b/tests/03_NAO_multik/36_NO_KP_MU/README similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/README rename to tests/03_NAO_multik/36_NO_KP_MU/README diff --git a/tests/03_NAO_multik/36_NO_KP_MU/STRU b/tests/03_NAO_multik/36_NO_KP_MU/STRU new file mode 100644 index 0000000000..30af97b4b4 --- /dev/null +++ b/tests/03_NAO_multik/36_NO_KP_MU/STRU @@ -0,0 +1,19 @@ +#This is the atom file containing all the information +#about the lattice structure. + +ATOMIC_SPECIES +H 1.0008 H_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +H_gga_6au_60Ry_2s1p.orb + +LATTICE_CONSTANT +10.0 #Lattice constant + +ATOMIC_POSITIONS +Cartesian #Cartesian(Unit is LATTICE_CONSTANT) +H #Name of element +0.0 #Magnetic for this element. +2 #Number of atoms +0.00 0.00 -0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z +0.00 0.00 0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z diff --git a/tests/03_NAO_multik/34_NO_KP_MU/mulliken.txt.ref b/tests/03_NAO_multik/36_NO_KP_MU/mulliken.txt.ref similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/mulliken.txt.ref rename to tests/03_NAO_multik/36_NO_KP_MU/mulliken.txt.ref diff --git a/tests/03_NAO_multik/34_NO_KP_MU/result.ref b/tests/03_NAO_multik/36_NO_KP_MU/result.ref similarity index 100% rename from tests/03_NAO_multik/34_NO_KP_MU/result.ref rename to tests/03_NAO_multik/36_NO_KP_MU/result.ref diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/INPUT b/tests/03_NAO_multik/37_NO_KP_MU_nscf/INPUT similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/INPUT rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/INPUT diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/KPT b/tests/03_NAO_multik/37_NO_KP_MU_nscf/KPT similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/KPT rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/KPT diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/README b/tests/03_NAO_multik/37_NO_KP_MU_nscf/README similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/README rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/README diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/STRU b/tests/03_NAO_multik/37_NO_KP_MU_nscf/STRU similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/STRU rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/STRU diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/chg.cube b/tests/03_NAO_multik/37_NO_KP_MU_nscf/chg.cube similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/chg.cube rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/chg.cube diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/mulliken.txt.ref b/tests/03_NAO_multik/37_NO_KP_MU_nscf/mulliken.txt.ref similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/mulliken.txt.ref rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/mulliken.txt.ref diff --git a/tests/03_NAO_multik/35_NO_KP_MU_nscf/result.ref b/tests/03_NAO_multik/37_NO_KP_MU_nscf/result.ref similarity index 100% rename from tests/03_NAO_multik/35_NO_KP_MU_nscf/result.ref rename to tests/03_NAO_multik/37_NO_KP_MU_nscf/result.ref diff --git a/tests/03_NAO_multik/41_NO_KP_MSST/INPUT b/tests/03_NAO_multik/41_NO_KP_MSST/INPUT index 1a90f706c0..1b643202e3 100644 --- a/tests/03_NAO_multik/41_NO_KP_MSST/INPUT +++ b/tests/03_NAO_multik/41_NO_KP_MSST/INPUT @@ -1,8 +1,8 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB nbands 8 calculation md @@ -10,25 +10,25 @@ read_file_dir ./ #Parameters (Accuracy) ecutwfc 10 -scf_nmax 20 +scf_nmax 20 scf_thr 1e-7 basis_type lcao -md_nstep 2 +md_nstep 2 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 -ks_solver scalapack_gvx -mixing_type broyden -mixing_beta 0.7 +ks_solver scalapack_gvx +mixing_type broyden +mixing_beta 0.7 smearing_method gauss smearing_sigma 0.001 md_type msst md_tfirst 10 md_dt 1 -md_restart 0 +md_restart 0 init_vel 1 msst_qmass 1 diff --git a/tests/03_NAO_multik/41_NO_KP_MSST/result.ref b/tests/03_NAO_multik/41_NO_KP_MSST/result.ref index ffa0d6b1f4..598fef7b05 100644 --- a/tests/03_NAO_multik/41_NO_KP_MSST/result.ref +++ b/tests/03_NAO_multik/41_NO_KP_MSST/result.ref @@ -1,5 +1,5 @@ -etotref -207.6323459951594 -etotperatomref -103.8161729976 -totalforceref 2.520068 -totalstressref 87.760114 -totaltimeref 2.27 +etotref -207.6071587315466 +etotperatomref -103.8035793658 +totalforceref 3.619098 +totalstressref 101.484403 +totaltimeref 1.04 diff --git a/tests/03_NAO_multik/42_NO_KP_MSST2/INPUT b/tests/03_NAO_multik/42_NO_KP_MSST2/INPUT index 5a7d5ceaf5..5bc4c3eaf8 100644 --- a/tests/03_NAO_multik/42_NO_KP_MSST2/INPUT +++ b/tests/03_NAO_multik/42_NO_KP_MSST2/INPUT @@ -1,8 +1,8 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB nbands 8 calculation md diff --git a/tests/03_NAO_multik/42_NO_KP_MSST2/result.ref b/tests/03_NAO_multik/42_NO_KP_MSST2/result.ref index ffa0d6b1f4..c98c295a92 100644 --- a/tests/03_NAO_multik/42_NO_KP_MSST2/result.ref +++ b/tests/03_NAO_multik/42_NO_KP_MSST2/result.ref @@ -1,5 +1,5 @@ -etotref -207.6323459951594 -etotperatomref -103.8161729976 -totalforceref 2.520068 -totalstressref 87.760114 -totaltimeref 2.27 +etotref -207.6071587315466 +etotperatomref -103.8035793658 +totalforceref 3.619098 +totalstressref 101.484403 +totaltimeref 1.02 diff --git a/tests/03_NAO_multik/43_NO_KP_NVT/INPUT b/tests/03_NAO_multik/43_NO_KP_NVT/INPUT index aeaf868a86..05245deb25 100644 --- a/tests/03_NAO_multik/43_NO_KP_NVT/INPUT +++ b/tests/03_NAO_multik/43_NO_KP_NVT/INPUT @@ -1,8 +1,8 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB nbands 8 calculation md @@ -10,22 +10,22 @@ read_file_dir ./ #Parameters (Accuracy) ecutwfc 10 -scf_nmax 20 -scf_thr 1e-7 +scf_nmax 20 +scf_thr 1e-7 basis_type lcao -md_nstep 2 +md_nstep 2 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 ks_solver scalapack_gvx mixing_type broyden mixing_beta 0.7 -md_tchain 4 -md_type nvt -md_tfirst 10 -md_dt 1 -md_restart 0 -init_vel 1 +md_tchain 4 +md_type nvt +md_tfirst 10 +md_dt 1 +md_restart 0 +init_vel 1 diff --git a/tests/03_NAO_multik/43_NO_KP_NVT/result.ref b/tests/03_NAO_multik/43_NO_KP_NVT/result.ref index 267cfc747e..1eeaf02021 100644 --- a/tests/03_NAO_multik/43_NO_KP_NVT/result.ref +++ b/tests/03_NAO_multik/43_NO_KP_NVT/result.ref @@ -1,5 +1,5 @@ -etotref -204.1399519257427 -etotperatomref -102.0699759629 -totalforceref 1.226368 -totalstressref 1450.704608 -totaltimeref 5.85 +etotref -204.12922883082 +etotperatomref -102.0646144154 +totalforceref 2.248078 +totalstressref 1441.592005 +totaltimeref 1.45 diff --git a/tests/03_NAO_multik/44_NO_KP_MD_OW/INPUT b/tests/03_NAO_multik/44_NO_KP_MD_OW/INPUT index 8e0e9c9147..271ac47277 100644 --- a/tests/03_NAO_multik/44_NO_KP_MD_OW/INPUT +++ b/tests/03_NAO_multik/44_NO_KP_MD_OW/INPUT @@ -2,8 +2,8 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB nbands 8 calculation md @@ -11,14 +11,14 @@ read_file_dir ./ #Parameters (Accuracy) ecutwfc 10 -scf_nmax 20 -scf_thr 1e-7 +scf_nmax 20 +scf_thr 1e-7 basis_type lcao -md_nstep 2 +md_nstep 3 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 ks_solver scalapack_gvx mixing_type broyden @@ -29,8 +29,8 @@ out_wfc_lcao 1 out_freq_ion 2 out_app_flag 0 -md_type nve -md_tfirst 10 -md_dt 1 -md_restart 0 -init_vel 1 +md_type nve +md_tfirst 10 +md_dt 1 +md_restart 0 +init_vel 1 diff --git a/tests/03_NAO_multik/44_NO_KP_MD_OW/result.ref b/tests/03_NAO_multik/44_NO_KP_MD_OW/result.ref index 274543ff46..08e971ac8e 100644 --- a/tests/03_NAO_multik/44_NO_KP_MD_OW/result.ref +++ b/tests/03_NAO_multik/44_NO_KP_MD_OW/result.ref @@ -1,6 +1,6 @@ -etotref -196.6232944871745 +etotref -196.6232944871748 etotperatomref -98.3116472436 totalforceref 0.975500 totalstressref 1500.928040 Compare_wfc_lcao_pass 0 -totaltimeref 5.81 +totaltimeref 1.94 diff --git a/tests/03_NAO_multik/57_NO_MD_1O/INPUT b/tests/03_NAO_multik/57_NO_MD_1O/INPUT index f0c93e9168..e68225b521 100644 --- a/tests/03_NAO_multik/57_NO_MD_1O/INPUT +++ b/tests/03_NAO_multik/57_NO_MD_1O/INPUT @@ -7,26 +7,26 @@ calculation md #Parameters (Accuracy) ecutwfc 10 -scf_nmax 50 -scf_thr 1.0e-6 +scf_nmax 50 +scf_thr 1.0e-6 basis_type lcao -md_nstep 2 +md_nstep 2 -cal_stress 1 -cal_force 1 +cal_stress 1 +cal_force 1 -smearing_method gaussian +smearing_method gaussian smearing_sigma 0.002 -mixing_type broyden -mixing_beta 0.7 +mixing_type broyden +mixing_beta 0.7 -md_tfirst 10 -md_tfreq 0.1 -init_vel 1 +md_tfirst 10 +md_tfreq 0.1 +init_vel 1 +cal_syns 1 chg_extrap first-order -read_file_dir ./ -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/03_NAO_multik/57_NO_MD_1O/result.ref b/tests/03_NAO_multik/57_NO_MD_1O/result.ref index a0dd701901..10ce17abe0 100644 --- a/tests/03_NAO_multik/57_NO_MD_1O/result.ref +++ b/tests/03_NAO_multik/57_NO_MD_1O/result.ref @@ -1,5 +1,6 @@ -etotref -203.9507557549999 -etotperatomref -101.9753778775 -totalforceref 6.437138 -totalstressref 1540.841015 -totaltimeref 6.35 +etotref -203.5228729135715 +etotperatomref -101.7614364568 +totalforceref 12.870552 +totalstressref 1579.045899 +CompareSYNS_pass 0 +totaltimeref 1.32 diff --git a/tests/03_NAO_multik/57_NO_MD_1O/syns_nao.csr.ref b/tests/03_NAO_multik/57_NO_MD_1O/syns_nao.csr.ref new file mode 100644 index 0000000000..cd1ec459d5 --- /dev/null +++ b/tests/03_NAO_multik/57_NO_MD_1O/syns_nao.csr.ref @@ -0,0 +1,750 @@ +IONIC_STEP: 1 +Matrix Dimension of S_async(R): 26 +Matrix number of S_async(R): 93 +-2 -1 0 169 + 1.68716785e-06 1.80473051e-05 8.83829730e-06 -1.41070482e-06 -5.30618499e-06 -2.96288397e-05 4.72914017e-06 1.77880534e-05 4.00411283e-06 -1.37163068e-06 -5.15921264e-06 -1.43923483e-06 8.23476046e-07 1.80473051e-05 1.92686388e-04 9.48656396e-05 -1.51417643e-05 -5.69538018e-05 -3.17179177e-04 5.06258363e-05 1.90422581e-04 4.31566421e-05 -1.47835430e-05 -5.56063984e-05 -1.55121859e-05 8.87548941e-06 -8.83829730e-06 -9.48656396e-05 -4.57597237e-05 7.45155832e-06 2.80280796e-05 1.54172333e-04 -2.50908893e-05 -9.43761578e-05 -2.02442746e-05 7.15531129e-06 2.69137845e-05 7.66451791e-06 -4.38534891e-06 1.41070482e-06 1.51417643e-05 7.45155832e-06 -2.63850868e-07 -4.47363848e-06 -2.50908893e-05 9.78616887e-07 1.50636368e-05 3.48964298e-06 -2.31211865e-07 -4.38534891e-06 -1.37254136e-06 1.38811004e-07 5.30618499e-06 5.69538018e-05 2.80280796e-05 -4.47363848e-06 -1.59015039e-05 -9.43761578e-05 1.50636368e-05 5.36337265e-05 1.31258439e-05 -4.38534891e-06 -1.55602477e-05 -4.04034496e-06 2.48361371e-06 2.96288397e-05 3.17179177e-04 1.54172333e-04 -2.50908893e-05 -9.43761578e-05 -5.17483661e-04 8.41729960e-05 3.16605914e-04 6.86530752e-05 -2.42406520e-05 -9.11780994e-05 -2.59487525e-05 1.48469003e-05 -4.72914017e-06 -5.06258363e-05 -2.50908893e-05 9.78616887e-07 1.50636368e-05 8.41729960e-05 -3.56110241e-06 -5.05343363e-05 -1.18052732e-05 8.82109247e-07 1.48469003e-05 4.63097951e-06 -5.29585585e-07 -1.77880534e-05 -1.90422581e-04 -9.43761578e-05 1.50636368e-05 5.36337265e-05 3.16605914e-04 -5.05343363e-05 -1.80204436e-04 -4.44040189e-05 1.48469003e-05 5.27796141e-05 1.37384971e-05 -8.42429863e-06 4.00411283e-06 4.31566421e-05 2.02442746e-05 -3.48964298e-06 -1.31258439e-05 -6.86530752e-05 1.18052732e-05 4.44040189e-05 8.44113450e-06 -3.27511852e-06 -1.23189377e-05 -3.71252378e-06 2.12416649e-06 -1.37163068e-06 -1.47835430e-05 -7.15531129e-06 2.31211865e-07 4.38534891e-06 2.42406520e-05 -8.82109247e-07 -1.48469003e-05 -3.27511852e-06 1.91574120e-07 4.24171652e-06 1.36057332e-06 -1.20402711e-07 -5.15921264e-06 -5.56063984e-05 -2.69137845e-05 4.38534891e-06 1.55602477e-05 9.11780994e-05 -1.48469003e-05 -5.27796141e-05 -1.23189377e-05 4.24171652e-06 1.50185413e-05 3.97526019e-06 -2.44944817e-06 -1.43923483e-06 -1.55121859e-05 -7.66451791e-06 1.37254136e-06 4.04034496e-06 2.59487525e-05 -4.63097951e-06 -1.37384971e-05 -3.71252378e-06 1.36057332e-06 3.97526019e-06 9.16402068e-07 -7.25669887e-07 8.23476046e-07 8.87548941e-06 4.38534891e-06 -1.38811004e-07 -2.48361371e-06 -1.48469003e-05 5.29585585e-07 8.42429863e-06 2.12416649e-06 -1.20402711e-07 -2.44944817e-06 -7.25669887e-07 6.33095135e-08 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 -1 1 169 + 5.19625974e-05 5.30554725e-04 2.53092819e-04 6.08431177e-05 -5.07075605e-05 -8.66830630e-04 -2.08384727e-04 1.73670935e-04 8.51557479e-05 3.72829468e-05 -3.10721631e-05 1.36870167e-06 -7.46969941e-06 5.30554725e-04 5.39360918e-03 2.55479080e-03 6.14167713e-04 -5.11856519e-04 -8.75034495e-03 -2.10356924e-03 1.75314593e-03 8.11863180e-04 3.55450483e-04 -2.96237727e-04 1.30490133e-05 -7.12150860e-05 -2.53092819e-04 -2.55479080e-03 -1.20957852e-03 -3.05901827e-04 2.54943138e-04 4.12834199e-03 1.04480943e-03 -8.70759741e-04 -3.71205620e-04 -1.74766717e-04 1.45653185e-04 -6.82346343e-06 3.72391017e-05 -6.08431177e-05 -6.14167713e-04 -3.05901827e-04 -1.06383978e-05 6.12879316e-05 1.04480943e-03 3.33551759e-05 -2.09329279e-04 -1.08466479e-04 1.49911805e-06 3.72391017e-05 9.46165055e-06 -3.00350755e-07 5.07075605e-05 5.11856519e-04 2.54943138e-04 6.12879316e-05 1.18216478e-05 -8.70759741e-04 -2.09329279e-04 -4.33572375e-05 9.03975793e-05 3.72391017e-05 1.51460449e-05 1.06196646e-05 3.64108550e-06 8.66830630e-04 8.75034495e-03 4.12834199e-03 1.04480943e-03 -8.70759741e-04 -1.41021682e-02 -3.57164721e-03 2.97666398e-03 1.24332243e-03 5.86755758e-04 -4.89010988e-04 2.29518575e-05 -1.25259931e-04 2.08384727e-04 2.10356924e-03 1.04480943e-03 3.33551759e-05 -2.09329279e-04 -3.57164721e-03 -1.03588375e-04 7.15585364e-04 3.65480902e-04 -9.62345984e-06 -1.25259931e-04 -3.29270874e-05 1.92807593e-06 -1.73670935e-04 -1.75314593e-03 -8.70759741e-04 -2.09329279e-04 -4.33572375e-05 2.97666398e-03 7.15585364e-04 1.58650526e-04 -3.04597227e-04 -1.25259931e-04 -5.55271748e-05 -3.66388095e-05 -1.33486460e-05 8.51557479e-05 8.11863180e-04 3.71205620e-04 1.08466479e-04 -9.03975793e-05 -1.24332243e-03 -3.65480902e-04 3.04597227e-04 5.62793061e-05 3.81062248e-05 -3.17582953e-05 1.87221750e-06 -1.02176407e-05 3.72829468e-05 3.55450483e-04 1.74766717e-04 -1.49911805e-06 -3.72391017e-05 -5.86755758e-04 9.62345984e-06 1.25259931e-04 3.81062248e-05 -1.24648972e-05 -1.39812208e-05 -6.76183022e-06 2.48385633e-06 -3.10721631e-05 -2.96237727e-04 -1.45653185e-04 -3.72391017e-05 -1.51460449e-05 4.89010988e-04 1.25259931e-04 5.55271748e-05 -3.17582953e-05 -1.39812208e-05 -1.75885626e-05 -6.77143911e-06 -4.34343740e-06 1.36870167e-06 1.30490133e-05 6.82346343e-06 -9.46165055e-06 -1.06196646e-05 -2.29518575e-05 3.29270874e-05 3.66388095e-05 1.87221750e-06 -6.76183022e-06 -6.77143911e-06 -1.28525833e-06 -1.36549809e-07 -7.46969941e-06 -7.12150860e-05 -3.72391017e-05 3.00350755e-07 -3.64108550e-06 1.25259931e-04 -1.92807593e-06 1.33486460e-05 -1.02176407e-05 2.48385633e-06 -4.34343740e-06 -1.36549809e-07 -5.65057294e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 -1 2 169 + 3.18521019e-07 3.25897778e-06 1.76199593e-06 1.12839912e-06 3.51799289e-07 -5.56073350e-06 -3.56114716e-06 -1.11025347e-06 8.15137800e-07 1.16666064e-06 3.63728023e-07 3.37259456e-07 2.32934920e-07 3.25897778e-06 3.33228321e-05 1.80487082e-05 1.15585661e-05 3.60359669e-06 -5.69075890e-05 -3.64441667e-05 -1.13621428e-05 8.35866066e-06 1.19632783e-05 3.72977319e-06 3.45835679e-06 2.38858259e-06 -1.76199593e-06 -1.80487082e-05 -9.69442865e-06 -6.27723902e-06 -1.95704532e-06 3.06467244e-05 1.98405085e-05 6.18564534e-06 -4.43147217e-06 -6.45690778e-06 -2.01306038e-06 -1.88749077e-06 -1.30363287e-06 -1.12839912e-06 -1.15585661e-05 -6.27723902e-06 -3.91252019e-06 -1.25331062e-06 1.98405085e-05 1.23718103e-05 3.96134670e-06 -2.96330847e-06 -4.06840503e-06 -1.30363287e-06 -1.13639572e-06 -8.12295857e-07 -3.51799289e-07 -3.60359669e-06 -1.95704532e-06 -1.25331062e-06 -2.83258775e-07 6.18564534e-06 3.96134670e-06 9.00781153e-07 -9.23866203e-07 -1.30363287e-06 -2.93423499e-07 -3.99418683e-07 -1.87911228e-07 5.56073350e-06 5.69075890e-05 3.06467244e-05 1.98405085e-05 6.18564534e-06 -9.67540019e-05 -6.26273777e-05 -1.95252429e-05 1.40330259e-05 2.04406674e-05 6.37275599e-06 5.97411644e-06 4.12614180e-06 3.56114716e-06 3.64441667e-05 1.98405085e-05 1.23718103e-05 3.96134670e-06 -6.26273777e-05 -3.90684870e-05 -1.25041531e-05 9.37697984e-06 1.28829502e-05 4.12614180e-06 3.60065997e-06 2.57220385e-06 1.11025347e-06 1.13621428e-05 6.18564534e-06 3.96134670e-06 9.00781153e-07 -1.95252429e-05 -1.25041531e-05 -2.85971356e-06 2.92344683e-06 4.12614180e-06 9.34717338e-07 1.26300631e-06 5.98601963e-07 8.15137800e-07 8.35866066e-06 4.43147217e-06 2.96330847e-06 9.23866203e-07 -1.40330259e-05 -9.37697984e-06 -2.92344683e-06 1.96075211e-06 3.01423273e-06 9.39742782e-07 9.09663752e-07 6.28277280e-07 1.16666064e-06 1.19632783e-05 6.45690778e-06 4.06840503e-06 1.30363287e-06 -2.04406674e-05 -1.28829502e-05 -4.12614180e-06 3.01423273e-06 4.20993129e-06 1.34943521e-06 1.18889496e-06 8.50121664e-07 3.63728023e-07 3.72977319e-06 2.01306038e-06 1.30363287e-06 2.93423499e-07 -6.37275599e-06 -4.12614180e-06 -9.34717338e-07 9.39742782e-07 1.34943521e-06 3.02318078e-07 4.18363644e-07 1.95972454e-07 3.37259456e-07 3.45835679e-06 1.88749077e-06 1.13639572e-06 3.99418683e-07 -5.97411644e-06 -3.60065997e-06 -1.26300631e-06 9.09663752e-07 1.18889496e-06 4.18363644e-07 3.13115574e-07 2.52649156e-07 2.32934920e-07 2.38858259e-06 1.30363287e-06 8.12295857e-07 1.87911228e-07 -4.12614180e-06 -2.57220385e-06 -5.98601963e-07 6.28277280e-07 8.50121664e-07 1.95972454e-07 2.52649156e-07 1.21809611e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 0 -1 169 + 1.67734723e-06 1.79389669e-05 5.27319121e-06 -1.40280692e-06 -8.79210250e-06 -1.76731528e-05 4.70152134e-06 2.94668190e-05 -7.55718436e-07 -8.18622424e-07 -5.13072197e-06 -4.16839277e-06 1.36490637e-06 1.79389669e-05 1.91495204e-04 5.65888818e-05 -1.50541241e-05 -9.43518317e-05 -1.89157298e-04 5.03207936e-05 3.15385938e-04 -8.14351419e-06 -8.82135860e-06 -5.52879289e-05 -4.49180066e-05 1.47080365e-05 -5.27319121e-06 -5.65888818e-05 -1.57968362e-05 4.44672971e-06 2.78699107e-05 5.32671588e-05 -1.49692712e-05 -9.38200158e-05 3.05795371e-06 2.46806453e-06 1.54686123e-05 1.33213889e-05 -4.36198064e-06 1.40280692e-06 1.50541241e-05 4.44672971e-06 -2.64398856e-07 -7.41412588e-06 -1.49692712e-05 9.79459319e-07 2.49585804e-05 -5.56984681e-07 -1.39267549e-07 -4.36198064e-06 -3.69193495e-06 2.32203710e-07 8.79210250e-06 9.43518317e-05 2.78699107e-05 -7.41412588e-06 -4.55495400e-05 -9.38200158e-05 2.49585804e-05 1.53425325e-04 -3.49090552e-06 -4.36198064e-06 -2.67820454e-05 -2.12828343e-05 7.12472525e-06 1.76731528e-05 1.89157298e-04 5.32671588e-05 -1.49692712e-05 -9.38200158e-05 -1.78928251e-04 5.02054113e-05 3.14662779e-04 -1.02818847e-05 -8.36925427e-06 -5.24543617e-05 -4.50882523e-05 1.47637821e-05 -4.70152134e-06 -5.03207936e-05 -1.49692712e-05 9.79459319e-07 2.49585804e-05 5.02054113e-05 -3.56063222e-06 -8.37085371e-05 1.89427309e-06 5.30453481e-07 1.47637821e-05 1.24801941e-05 -8.84436235e-07 -2.94668190e-05 -3.15385938e-04 -9.38200158e-05 2.49585804e-05 1.53425325e-04 3.14662779e-04 -8.37085371e-05 -5.14848541e-04 1.18723703e-05 1.47637821e-05 9.07069580e-05 7.21334740e-05 -2.41304256e-05 -7.55718436e-07 -8.14351419e-06 -3.05795371e-06 5.56984681e-07 3.49090552e-06 1.02818847e-05 -1.89427309e-06 -1.18723703e-05 -4.09711420e-07 4.33225983e-07 2.71524699e-06 1.40811295e-06 -4.61075150e-07 -8.18622424e-07 -8.82135860e-06 -2.46806453e-06 1.39267549e-07 4.36198064e-06 8.36925427e-06 -5.30453481e-07 -1.47637821e-05 4.33225983e-07 6.37041655e-08 2.43582462e-06 2.19196385e-06 -1.21130647e-07 -5.13072197e-06 -5.52879289e-05 -1.54686123e-05 4.36198064e-06 2.67820454e-05 5.24543617e-05 -1.47637821e-05 -9.07069580e-05 2.71524699e-06 2.43582462e-06 1.49416093e-05 1.26041729e-05 -4.22232506e-06 -4.16839277e-06 -4.49180066e-05 -1.33213889e-05 3.69193495e-06 2.12828343e-05 4.50882523e-05 -1.24801941e-05 -7.21334740e-05 1.40811295e-06 2.19196385e-06 1.26041729e-05 9.74645293e-06 -3.50387368e-06 1.36490637e-06 1.47080365e-05 4.36198064e-06 -2.32203710e-07 -7.12472525e-06 -1.47637821e-05 8.84436235e-07 2.41304256e-05 -4.61075150e-07 -1.21130647e-07 -4.22232506e-06 -3.50387368e-06 1.93017973e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 0 0 507 + 8.16644387e-06 8.96960839e-05 3.27387890e-05 1.60311706e-08 -3.27540937e-05 -1.14418655e-04 -5.60272701e-08 1.14472143e-04 6.48218452e-06 1.10057862e-08 -2.24864773e-05 -1.12484919e-05 -1.10109312e-08 7.75959531e-04 5.98270974e-03 2.17599507e-03 8.71859251e-04 -2.17735139e-03 -6.57152594e-03 -2.63302329e-03 6.57562205e-03 4.79125927e-05 7.93365250e-05 -1.98132317e-04 -8.32339644e-05 -7.93859763e-05 8.96960839e-05 9.85861294e-04 3.59851191e-04 1.76207978e-07 -3.60019413e-04 -1.25838511e-03 -6.16192197e-07 1.25897338e-03 7.14997122e-05 1.21395888e-07 -2.48030066e-04 -1.24072977e-04 -1.21452638e-07 5.98270974e-03 4.07183314e-02 1.52159792e-02 6.09660951e-03 -1.52254635e-02 -4.29273639e-02 -1.71997721e-02 4.29541210e-02 -3.30803889e-04 -5.47764784e-04 1.36796899e-03 5.74673954e-04 5.48106212e-04 -3.27387890e-05 -3.59851191e-04 -1.26923207e-04 -6.55357811e-08 1.33899462e-04 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -2.09430578e-05 -4.30900857e-08 8.80395289e-05 4.66031270e-05 4.56188997e-08 -2.17599507e-03 -1.52159792e-02 -5.12680496e-03 -2.47580126e-03 6.18298116e-03 1.45853104e-02 7.15105608e-03 -1.78588022e-02 1.71200742e-04 8.29193518e-05 -2.07079946e-04 -3.12092770e-05 -2.97664415e-05 -1.60311706e-08 -1.76207978e-07 -6.55357811e-08 6.91365691e-06 6.55664176e-08 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -1.45982806e-08 5.12077974e-06 4.56188997e-08 2.53276054e-08 -5.12317359e-06 -8.71859251e-04 -6.09660951e-03 -2.47580126e-03 6.03416177e-05 2.47734446e-03 7.15105608e-03 -3.97142624e-04 -7.15551341e-03 -2.35003961e-05 1.44624981e-04 -2.97664415e-05 4.06667841e-05 -1.44715127e-04 3.27540937e-05 3.60019413e-04 1.33899462e-04 6.55664176e-08 -1.27048368e-04 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 2.98264839e-05 4.56188997e-08 -8.80854743e-05 -4.15017171e-05 -4.31327274e-08 2.17735139e-03 1.52254635e-02 6.18298116e-03 2.47734446e-03 -5.13451041e-03 -1.78588022e-02 -7.15551341e-03 1.46075667e-02 5.86890834e-05 -2.97664415e-05 2.07043535e-04 1.64017292e-04 8.29564478e-05 1.14418655e-04 1.25838511e-03 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -1.55917305e-03 -8.03626587e-07 1.64193004e-03 7.42296114e-05 1.52133886e-07 -3.10832420e-04 -1.64370629e-04 -1.60899230e-07 6.57152594e-03 4.29273639e-02 1.45853104e-02 7.15105608e-03 -1.78588022e-02 -3.97047653e-02 -1.99068630e-02 4.97147169e-02 -7.64768271e-04 -8.83590716e-04 2.20664915e-03 8.20540247e-04 7.82605865e-04 5.60272701e-08 6.16192197e-07 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -8.03626587e-07 8.19893849e-05 8.04002265e-07 5.13997441e-08 -1.77469351e-05 -1.60899230e-07 -8.91773670e-08 1.77552314e-05 2.63302329e-03 1.71997721e-02 7.15105608e-03 -3.97142624e-04 -7.15551341e-03 -1.99068630e-02 2.00287017e-03 1.99192712e-02 -1.30665591e-04 -5.66628274e-04 7.82605865e-04 2.27294753e-04 5.66981460e-04 -1.14472143e-04 -1.25897338e-03 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 1.64193004e-03 8.04002265e-07 -1.56070783e-03 -1.05017411e-04 -1.60899230e-07 3.10994324e-04 1.46692159e-04 1.52284284e-07 -6.57562205e-03 -4.29541210e-02 -1.78588022e-02 -7.15551341e-03 1.46075667e-02 4.97147169e-02 1.99192712e-02 -3.97667215e-02 3.26319765e-04 7.82605865e-04 -2.20770877e-03 -1.07446528e-03 -8.84566027e-04 6.48218452e-06 7.14997122e-05 2.09430578e-05 1.45982806e-08 -2.98264839e-05 -7.42296114e-05 -5.13997441e-08 1.05017411e-04 -8.27477510e-07 8.02079735e-09 -1.63876959e-05 -1.15038314e-05 -1.12608781e-08 4.79125927e-05 -3.30803889e-04 -1.71200742e-04 2.35003961e-05 -5.86890834e-05 7.64768271e-04 1.30665591e-04 -3.26319765e-04 1.47861325e-04 -1.07688129e-04 2.68936641e-04 2.13379704e-04 2.03514950e-04 1.10057862e-08 1.21395888e-07 4.30900857e-08 -5.12077974e-06 -4.56188997e-08 -1.52133886e-07 1.77469351e-05 1.60899230e-07 8.02079735e-09 -3.64273931e-06 -2.96958683e-08 -1.76571801e-08 3.81582059e-06 7.93365250e-05 -5.47764784e-04 -8.29193518e-05 -1.44624981e-04 2.97664415e-05 8.83590716e-04 5.66628274e-04 -7.82605865e-04 -1.07688129e-04 -7.62092083e-05 5.21950139e-04 2.97745580e-04 9.32968683e-05 -2.24864773e-05 -2.48030066e-04 -8.80395289e-05 -4.56188997e-08 8.80854743e-05 3.10832420e-04 1.60899230e-07 -3.10994324e-04 -1.63876959e-05 -2.96958683e-08 5.70303735e-05 2.84446038e-05 2.97114970e-08 -1.98132317e-04 1.36796899e-03 2.07079946e-04 2.97664415e-05 -2.07043535e-04 -2.20664915e-03 -7.82605865e-04 2.20770877e-03 2.68936641e-04 5.21950139e-04 -1.17070930e-03 -4.67608464e-04 -5.22344377e-04 -1.12484919e-05 -1.24072977e-04 -4.66031270e-05 -2.53276054e-08 4.15017171e-05 1.64370629e-04 8.91773670e-08 -1.46692159e-04 -1.15038314e-05 -1.76571801e-08 2.84446038e-05 1.24914350e-05 1.57969378e-08 -8.32339644e-05 5.74673954e-04 3.12092770e-05 -4.06667841e-05 -1.64017292e-04 -8.20540247e-04 -2.27294753e-04 1.07446528e-03 2.13379704e-04 2.97745580e-04 -4.67608464e-04 -9.93045879e-05 -2.42644281e-04 -1.10109312e-08 -1.21452638e-07 -4.56188997e-08 5.12317359e-06 4.31327274e-08 1.60899230e-07 -1.77552314e-05 -1.52284284e-07 -1.12608781e-08 3.81582059e-06 2.97114970e-08 1.57969378e-08 -3.64630610e-06 -7.93859763e-05 5.48106212e-04 2.97664415e-05 1.44715127e-04 -8.29564478e-05 -7.82605865e-04 -5.66981460e-04 8.84566027e-04 2.03514950e-04 9.32968683e-05 -5.22344377e-04 -2.42644281e-04 -7.63254781e-05 8.26784870e-06 9.08005784e-05 3.31402035e-05 -1.62265978e-08 -3.31247122e-05 -1.15831465e-04 5.67151192e-08 1.15777320e-04 6.56541801e-06 -1.11255035e-08 -2.27114216e-05 -1.13503999e-05 1.11203030e-08 9.08005784e-05 9.97937040e-04 3.64208022e-04 -1.78328932e-07 -3.64037775e-04 -1.27378273e-03 6.23688385e-07 1.27318730e-03 7.24010828e-05 -1.22688076e-07 -2.50453438e-04 -1.25168152e-04 1.22630726e-07 -3.31402035e-05 -3.64208022e-04 -1.28449169e-04 6.63308026e-08 1.35406619e-04 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -2.12005244e-05 4.35479613e-08 8.88980985e-05 4.70236432e-05 -4.60703732e-08 1.62265978e-08 1.78328932e-07 6.63308026e-08 7.02074294e-06 -6.62997966e-08 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 1.47867785e-08 5.19559917e-06 -4.60703732e-08 -2.55683707e-08 -5.19317051e-06 3.31247122e-05 3.64037775e-04 1.35406619e-04 -6.62997966e-08 -1.28322549e-04 -4.74187979e-04 2.32178949e-07 4.49766695e-04 3.01854886e-05 -4.60703732e-08 -8.88516872e-05 -4.18084691e-05 4.35048805e-08 1.15831465e-04 1.27378273e-03 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -1.57814407e-03 8.13502356e-07 1.66067045e-03 7.51422849e-05 -1.53756556e-07 -3.13876127e-04 -1.65861691e-04 1.62499319e-07 -5.67151192e-08 -6.23688385e-07 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 8.13502356e-07 8.33026208e-05 -8.13122088e-07 -5.20668178e-08 -1.80108098e-05 1.62499319e-07 9.00304191e-08 1.80023907e-05 -1.15777320e-04 -1.27318730e-03 -4.74187979e-04 2.32178949e-07 4.49766695e-04 1.66067045e-03 -8.13122088e-07 -1.57659116e-03 -1.06288353e-04 1.62499319e-07 3.13712572e-04 1.47781689e-04 -1.53604601e-07 6.56541801e-06 7.24010828e-05 2.12005244e-05 -1.47867785e-08 -3.01854886e-05 -7.51422849e-05 5.20668178e-08 1.06288353e-04 -8.38745046e-07 -8.10711403e-09 -1.65497304e-05 -1.16159774e-05 1.13804966e-08 -1.11255035e-08 -1.22688076e-07 -4.35479613e-08 -5.19559917e-06 4.60703732e-08 1.53756556e-07 1.80108098e-05 -1.62499319e-07 -8.10711403e-09 -3.69169936e-06 2.99330769e-08 1.77980956e-08 3.86424439e-06 -2.27114216e-05 -2.50453438e-04 -8.88980985e-05 4.60703732e-08 8.88516872e-05 3.13876127e-04 -1.62499319e-07 -3.13712572e-04 -1.65497304e-05 2.99330769e-08 5.74131813e-05 2.86042224e-05 -2.99173155e-08 -1.13503999e-05 -1.25168152e-04 -4.70236432e-05 2.55683707e-08 4.18084691e-05 1.65861691e-04 -9.00304191e-08 -1.47781689e-04 -1.16159774e-05 1.77980956e-08 2.86042224e-05 1.25385472e-05 -1.58976997e-08 1.11203030e-08 1.22630726e-07 4.60703732e-08 5.19317051e-06 -4.35048805e-08 -1.62499319e-07 -1.80023907e-05 1.53604601e-07 1.13804966e-08 3.86424439e-06 -2.99173155e-08 -1.58976997e-08 -3.68808587e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +-2 0 1 676 + 1.69565517e-04 1.56053224e-03 6.48479832e-04 3.24568776e-04 -3.24531747e-04 -2.12361003e-03 -1.06288195e-03 1.06276069e-03 9.01314392e-05 1.04246931e-04 -1.04235037e-04 5.95242619e-09 -5.21703789e-05 5.93543166e-04 4.73514383e-03 1.67028414e-03 1.78280988e-03 -5.57750654e-04 -5.12384518e-03 -5.46903463e-03 1.71098314e-03 4.14790056e-05 2.04703950e-04 -6.40414680e-05 9.85548043e-05 -6.83558917e-05 1.56053224e-03 1.39128426e-02 5.76912170e-03 2.88748651e-03 -2.88715708e-03 -1.86343382e-02 -9.32661905e-03 9.32555499e-03 5.74071199e-04 6.63976534e-04 -6.63900782e-04 3.79125915e-08 -3.32287071e-04 4.73514383e-03 3.41208438e-02 1.22688396e-02 1.30953818e-02 -4.09687978e-03 -3.56563533e-02 -3.80584939e-02 1.19065696e-02 -1.11998561e-04 -5.52726550e-04 1.72920062e-04 -2.66110435e-04 1.84569552e-04 -6.48479832e-04 -5.76912170e-03 -2.33153957e-03 -1.28082856e-03 1.28068243e-03 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -1.96173742e-04 -3.08000907e-04 3.07965767e-04 -2.03623990e-08 1.78467408e-04 -1.67028414e-03 -1.22688396e-02 -3.97474675e-03 -5.10679853e-03 1.59765786e-03 1.15955919e-02 1.51023750e-02 -4.72476602e-03 1.23436117e-04 2.11782009e-06 -6.62558332e-07 -6.63398381e-05 4.60121535e-05 -3.24568776e-04 -2.88748651e-03 -1.28082856e-03 -4.13541800e-04 6.40990681e-04 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.82386438e-04 -8.13604017e-05 1.78467408e-04 4.86027490e-05 4.07168149e-05 -1.78280988e-03 -1.30953818e-02 -5.10679853e-03 -4.64111395e-03 1.70529083e-03 1.51023750e-02 1.35662448e-02 -5.04306982e-03 -1.10578360e-04 -1.59957689e-05 4.60121535e-05 6.91003464e-05 5.34139690e-06 3.24531747e-04 2.88715708e-03 1.28068243e-03 6.40990681e-04 -4.13395531e-04 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.82365630e-04 1.78467408e-04 -8.13196769e-05 4.86175846e-05 -4.07010777e-05 5.57750654e-04 4.09687978e-03 1.59765786e-03 1.70529083e-03 2.76226740e-04 -4.72476602e-03 -5.04306982e-03 -9.75845097e-04 3.45943520e-05 4.60121535e-05 1.16683907e-04 6.59231305e-05 1.24544811e-04 2.12361003e-03 1.86343382e-02 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -2.40561655e-02 -1.33214770e-02 1.33199571e-02 4.90535867e-04 8.30029912e-04 -8.29935214e-04 5.63839373e-08 -4.94180235e-04 5.12384518e-03 3.56563533e-02 1.15955919e-02 1.51023750e-02 -4.72476602e-03 -3.26976101e-02 -4.34121317e-02 1.35814509e-02 -5.29864027e-04 -1.16894937e-03 3.65704880e-04 -4.02341988e-04 2.79057379e-04 1.06288195e-03 9.32661905e-03 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.33214770e-02 -4.10770096e-03 6.66673345e-03 5.18213874e-04 1.79672091e-04 -4.94180235e-04 -1.57413568e-04 -8.99169018e-05 5.46903463e-03 3.80584939e-02 1.51023750e-02 1.35662448e-02 -5.04306982e-03 -4.34121317e-02 -3.83622981e-02 1.44964226e-02 1.16663489e-05 -1.20421443e-03 2.79057379e-04 -7.62709561e-04 4.02118042e-04 -1.06276069e-03 -9.32555499e-03 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.33199571e-02 6.66673345e-03 -4.10617966e-03 -5.18154752e-04 -4.94180235e-04 1.79559323e-04 -1.57452044e-04 8.98707205e-05 -1.71098314e-03 -1.19065696e-02 -4.72476602e-03 -5.04306982e-03 -9.75845097e-04 1.35814509e-02 1.44964226e-02 3.43928063e-03 -3.64980798e-06 2.79057379e-04 -3.99530458e-04 3.00915094e-05 -4.26446513e-04 9.01314392e-05 5.74071199e-04 1.96173742e-04 1.82386438e-04 -1.82365630e-04 -4.90535867e-04 -5.18213874e-04 5.18154752e-04 -8.38723793e-05 -7.52905161e-05 7.52819262e-05 -3.39022091e-09 2.97137846e-05 4.14790056e-05 -1.11998561e-04 -1.23436117e-04 1.10578360e-04 -3.45943520e-05 5.29864027e-04 -1.16663489e-05 3.64980798e-06 9.86661635e-05 -1.83151977e-04 5.72989504e-05 -1.62667418e-04 1.12823281e-04 1.04246931e-04 6.63976534e-04 3.08000907e-04 8.13604017e-05 -1.78467408e-04 -8.30029912e-04 -1.79672091e-04 4.94180235e-04 -7.52905161e-05 -9.97224729e-05 8.55349841e-05 -9.19395180e-06 4.96974181e-05 2.04703950e-04 -5.52726550e-04 -2.11782009e-06 1.59957689e-05 -4.60121535e-05 1.16894937e-03 1.20421443e-03 -2.79057379e-04 -1.83151977e-04 -9.79609707e-04 3.32574320e-04 -4.68383060e-04 3.58871778e-04 -1.04235037e-04 -6.63900782e-04 -3.07965767e-04 -1.78467408e-04 8.13196769e-05 8.29935214e-04 4.94180235e-04 -1.79559323e-04 7.52819262e-05 8.55349841e-05 -9.97029545e-05 -9.18366007e-06 -4.96938449e-05 -6.40414680e-05 1.72920062e-04 6.62558332e-07 -4.60121535e-05 -1.16683907e-04 -3.65704880e-04 -2.79057379e-04 3.99530458e-04 5.72989504e-05 3.32574320e-04 -2.06054057e-05 2.02424534e-04 -3.16893126e-05 5.95242619e-09 3.79125915e-08 2.03623990e-08 -4.86027490e-05 -4.86175846e-05 -5.63839373e-08 1.57413568e-04 1.57452044e-04 -3.39022091e-09 -9.19395180e-06 -9.18366007e-06 -5.01529191e-06 2.31304312e-09 9.85548043e-05 -2.66110435e-04 6.63398381e-05 -6.91003464e-05 -6.59231305e-05 4.02341988e-04 7.62709561e-04 -3.00915094e-05 -1.62667418e-04 -4.68383060e-04 2.02424534e-04 -1.64081552e-04 1.86233408e-04 -5.21703789e-05 -3.32287071e-04 -1.78467408e-04 -4.07168149e-05 4.07010777e-05 4.94180235e-04 8.99169018e-05 -8.98707205e-05 2.97137846e-05 4.96974181e-05 -4.96938449e-05 2.31304312e-09 -2.52880900e-05 -6.83558917e-05 1.84569552e-04 -4.60121535e-05 -5.34139690e-06 -1.24544811e-04 -2.79057379e-04 -4.02118042e-04 4.26446513e-04 1.12823281e-04 3.58871778e-04 -3.16893126e-05 1.86233408e-04 -2.47404266e-05 1.71091240e-06 1.83093242e-05 8.95839359e-06 1.42979385e-06 -5.37178616e-06 -3.00488970e-05 -4.79591878e-06 1.80184368e-05 4.05776295e-06 1.38917934e-06 -5.21919602e-06 -1.45395291e-06 -8.33003627e-07 1.71125195e-04 1.57340803e-03 6.54391095e-04 3.26863713e-04 -3.26901077e-04 -2.14206805e-03 -1.06994780e-03 1.07007011e-03 9.06971384e-05 1.04555142e-04 -1.04567094e-04 -5.97028977e-09 -5.22305220e-05 1.83093242e-05 1.95568163e-04 9.61985000e-05 1.53536482e-05 -5.76842003e-05 -3.21819416e-04 -5.13636084e-05 1.92974897e-04 4.37564431e-05 1.49800635e-05 -5.62806296e-05 -1.56785422e-05 -8.98260354e-06 1.57340803e-03 1.40097483e-02 5.81479070e-03 2.90444673e-03 -2.90477875e-03 -1.87705742e-02 -9.37576874e-03 9.37684052e-03 5.74307103e-04 6.62057940e-04 -6.62133622e-04 -3.78047189e-08 -3.30731050e-04 -8.95839359e-06 -9.61985000e-05 -4.63567584e-05 -7.54912661e-06 2.83623362e-05 1.56278233e-04 2.54346765e-05 -9.55589809e-05 -2.05019813e-05 -7.24310010e-06 2.72125838e-05 7.73973312e-06 4.43427412e-06 -6.54391095e-04 -5.81479070e-03 -2.35234431e-03 -1.28971937e-03 1.28986680e-03 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -1.96680176e-04 -3.08018123e-04 3.08053333e-04 2.03762001e-08 1.78259282e-04 -1.42979385e-06 -1.53536482e-05 -7.54912661e-06 -2.62468204e-07 4.52673723e-06 2.54346765e-05 9.76378855e-07 -1.52515785e-05 -3.53516852e-06 -2.28977735e-07 4.43427412e-06 1.38711907e-06 1.37303571e-07 -3.26863713e-04 -2.90444673e-03 -1.28971937e-03 -4.14492578e-04 6.44279323e-04 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.82801830e-04 -8.04965969e-05 1.78259282e-04 4.88317689e-05 4.02120757e-05 5.37178616e-06 5.76842003e-05 2.83623362e-05 4.52673723e-06 -1.60647110e-05 -9.55589809e-05 -1.52515785e-05 5.42176282e-05 1.32817534e-05 4.43427412e-06 -1.57084440e-05 -4.07060847e-06 -2.50712768e-06 3.26901077e-04 2.90477875e-03 1.28986680e-03 6.44279323e-04 -4.14639869e-04 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.82822726e-04 1.78259282e-04 -8.05373493e-05 4.88169931e-05 -4.02278350e-05 3.00488970e-05 3.21819416e-04 1.56278233e-04 2.54346765e-05 -9.55589809e-05 -5.24863017e-04 -8.53765342e-05 3.20762665e-04 6.95729467e-05 2.45540925e-05 -9.22505957e-05 -2.62203837e-05 -1.50222711e-05 2.14206805e-03 1.87705742e-02 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -2.42413527e-02 -1.33983586e-02 1.33998902e-02 4.89218183e-04 8.26988668e-04 -8.27083203e-04 -5.62431431e-08 -4.92037880e-04 4.79591878e-06 5.13636084e-05 2.54346765e-05 9.76378855e-07 -1.52515785e-05 -8.53765342e-05 -3.56155457e-06 5.11949469e-05 1.19669703e-05 8.77122891e-07 -1.50222711e-05 -4.68304715e-06 -5.25955525e-07 1.06994780e-03 9.37576874e-03 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.33983586e-02 -4.10981645e-03 6.69315015e-03 5.17979214e-04 1.75713806e-04 -4.92037880e-04 -1.58001634e-04 -8.77778333e-05 -1.80184368e-05 -1.92974897e-04 -9.55589809e-05 -1.52515785e-05 5.42176282e-05 3.20762665e-04 5.11949469e-05 -1.82276363e-04 -4.49603317e-05 -1.50222711e-05 5.33178903e-05 1.38510614e-05 8.50973902e-06 -1.07007011e-03 -9.37684052e-03 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.33998902e-02 6.69315015e-03 -4.11134659e-03 -5.18038425e-04 -4.92037880e-04 1.75826292e-04 -1.57963503e-04 8.78239864e-05 4.05776295e-06 4.37564431e-05 2.05019813e-05 3.53516852e-06 -1.32817534e-05 -6.95729467e-05 -1.19669703e-05 4.49603317e-05 8.54343973e-06 3.31464506e-06 -1.24532390e-05 -3.74922604e-06 -2.14801929e-06 9.06971384e-05 5.74307103e-04 1.96680176e-04 1.82801830e-04 -1.82822726e-04 -4.89218183e-04 -5.17979214e-04 5.18038425e-04 -8.52265465e-05 -7.70397886e-05 7.70485953e-05 3.50576416e-09 3.06698501e-05 1.38917934e-06 1.49800635e-05 7.24310010e-06 2.28977735e-07 -4.43427412e-06 -2.45540925e-05 -8.77122891e-07 1.50222711e-05 3.31464506e-06 1.88411795e-07 -4.28546332e-06 -1.37411125e-06 -1.18403833e-07 1.04555142e-04 6.62057940e-04 3.08018123e-04 8.04965969e-05 -1.78259282e-04 -8.26988668e-04 -1.75713806e-04 4.92037880e-04 -7.70397886e-05 -1.01196560e-04 8.73209439e-05 -9.02782116e-06 5.03959572e-05 -5.21919602e-06 -5.62806296e-05 -2.72125838e-05 -4.43427412e-06 1.57084440e-05 9.22505957e-05 1.50222711e-05 -5.33178903e-05 -1.24532390e-05 -4.28546332e-06 1.51483992e-05 4.00187243e-06 2.47079408e-06 -1.04567094e-04 -6.62133622e-04 -3.08053333e-04 -1.78259282e-04 8.05373493e-05 8.27083203e-04 4.92037880e-04 -1.75826292e-04 7.70485953e-05 8.73209439e-05 -1.01216522e-04 -9.03831022e-06 -5.03996529e-05 -1.45395291e-06 -1.56785422e-05 -7.73973312e-06 -1.38711907e-06 4.07060847e-06 2.62203837e-05 4.68304715e-06 -1.38510614e-05 -3.74922604e-06 -1.37411125e-06 4.00187243e-06 9.19457376e-07 7.31341186e-07 -5.97028977e-09 -3.78047189e-08 -2.03762001e-08 -4.88317689e-05 -4.88169931e-05 5.62431431e-08 1.58001634e-04 1.57963503e-04 3.50576416e-09 -9.02782116e-06 -9.03831022e-06 -4.82657881e-06 -2.36186727e-09 -8.33003627e-07 -8.98260354e-06 -4.43427412e-06 -1.37303571e-07 2.50712768e-06 1.50222711e-05 5.25955525e-07 -8.50973902e-06 -2.14801929e-06 -1.18403833e-07 2.47079408e-06 7.31341186e-07 6.19520250e-08 -5.22305220e-05 -3.30731050e-04 -1.78259282e-04 -4.02120757e-05 4.02278350e-05 4.92037880e-04 8.77778333e-05 -8.78239864e-05 3.06698501e-05 5.03959572e-05 -5.03996529e-05 -2.36186727e-09 -2.54891536e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-2 0 2 676 + 8.15919978e-06 8.96171586e-05 3.27102754e-05 3.27274346e-05 -1.41493681e-08 -1.14318287e-04 -1.14378256e-04 4.94502572e-08 6.47643325e-06 2.24703773e-05 -9.71483541e-09 1.12410803e-05 -9.71993163e-09 7.53554557e-08 7.55178124e-07 2.56321546e-07 4.44478713e-07 8.52966559e-08 -7.85992544e-07 -1.36296367e-06 -2.61556380e-07 -5.23921785e-08 2.81570943e-07 5.40342184e-08 2.35140889e-07 9.36989506e-08 8.96171586e-05 9.84998131e-04 3.59541633e-04 3.59730242e-04 -1.55525653e-07 -1.25729095e-03 -1.25795050e-03 5.43861897e-07 7.14374404e-05 2.47856525e-04 -1.07158207e-07 1.23993250e-04 -1.07214420e-07 7.55178124e-07 7.56635972e-06 2.56974278e-06 4.45610595e-06 8.55138672e-07 -7.87745480e-06 -1.36600338e-05 -2.62139708e-06 -5.25433673e-07 2.82383476e-06 5.41901457e-07 2.35819438e-06 9.39693390e-07 -3.27102754e-05 -3.59541633e-04 -1.26815516e-04 -1.33791713e-04 5.78434647e-08 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -2.09255703e-05 -8.79785547e-05 3.80366190e-08 -4.65727721e-05 4.02705210e-08 -2.56321546e-07 -2.56974278e-06 -8.58216184e-07 -1.51816500e-06 -2.91339932e-07 2.63346742e-06 4.65772303e-06 8.93829529e-07 1.92475721e-07 -9.46749854e-07 -1.81683834e-07 -8.06624395e-07 -3.21423720e-07 -3.27274346e-05 -3.59730242e-04 -1.33791713e-04 -1.26955848e-04 5.78738083e-08 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -2.98014781e-05 -8.80300750e-05 4.02705210e-08 -4.14790332e-05 3.80788582e-08 -4.44478713e-07 -4.45610595e-06 -1.51816500e-06 -2.61532200e-06 -5.05202938e-07 4.65772303e-06 8.02425972e-06 1.54996022e-06 3.00601125e-07 -1.66388883e-06 -3.21423720e-07 -1.37959306e-06 -5.53695760e-07 1.41493681e-08 1.55525653e-07 5.78434647e-08 5.78738083e-08 6.90602458e-06 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 1.28843611e-08 4.02705210e-08 5.11546916e-06 2.23586072e-08 5.11815264e-06 -8.52966559e-08 -8.55138672e-07 -2.91339932e-07 -5.05202938e-07 -7.96720857e-08 8.93829529e-07 1.54996022e-06 2.44897812e-07 5.76861613e-08 -3.21423720e-07 -5.06400406e-08 -2.72096564e-07 -8.78132193e-08 1.14318287e-04 1.25729095e-03 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -1.55783378e-03 -1.64059005e-03 7.09292153e-07 7.41676003e-05 3.10616227e-04 -1.34291716e-07 1.64262990e-04 -1.42034839e-07 7.85992544e-07 7.87745480e-06 2.63346742e-06 4.65772303e-06 8.93829529e-07 -8.07725544e-06 -1.42835249e-05 -2.74104670e-06 -5.90420581e-07 2.90640671e-06 5.57747234e-07 2.47579122e-06 9.86553381e-07 1.14378256e-04 1.25795050e-03 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -1.64059005e-03 -1.55955457e-03 7.09664234e-07 1.04928872e-04 3.10797775e-04 -1.42034839e-07 1.46611593e-04 -1.34440694e-07 1.36296367e-06 1.36600338e-05 4.65772303e-06 8.02425972e-06 1.54996022e-06 -1.42835249e-05 -2.46088344e-05 -4.75315841e-06 -9.22945279e-07 5.10731593e-06 9.86553381e-07 4.23494252e-06 1.69957219e-06 -4.94502572e-08 -5.43861897e-07 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 7.09292153e-07 7.09664234e-07 8.18957947e-05 -4.53649137e-08 -1.42034839e-07 -1.77282045e-05 -7.87233138e-08 -1.77375044e-05 2.61556380e-07 2.62139708e-06 8.93829529e-07 1.54996022e-06 2.44897812e-07 -2.74104670e-06 -4.75315841e-06 -7.52390225e-07 -1.77115672e-07 9.86553381e-07 1.55733495e-07 8.35051609e-07 2.70052301e-07 6.47643325e-06 7.14374404e-05 2.09255703e-05 2.98014781e-05 -1.28843611e-08 -7.41676003e-05 -1.04928872e-04 4.53649137e-08 -8.26388656e-07 1.63766450e-05 -7.08027324e-09 1.14959603e-05 -9.94032116e-09 -5.23921785e-08 -5.25433673e-07 -1.92475721e-07 -3.00601125e-07 -5.76861613e-08 5.90420581e-07 9.22945279e-07 1.77115672e-07 2.03711025e-08 -2.06266156e-07 -3.95830280e-08 -1.54486566e-07 -6.15598127e-08 2.24703773e-05 2.47856525e-04 8.79785547e-05 8.80300750e-05 -4.02705210e-08 -3.10616227e-04 -3.10797775e-04 1.42034839e-07 1.63766450e-05 5.70028575e-05 -2.62180073e-08 2.84327888e-05 -2.62334905e-08 2.81570943e-07 2.82383476e-06 9.46749854e-07 1.66388883e-06 3.21423720e-07 -2.90640671e-06 -5.10731593e-06 -9.86553381e-07 -2.06266156e-07 1.04215488e-06 2.01329269e-07 8.81629697e-07 3.53849281e-07 -9.71483541e-09 -1.07158207e-07 -3.80366190e-08 -4.02705210e-08 -5.11546916e-06 1.34291716e-07 1.42034839e-07 1.77282045e-05 -7.08027324e-09 -2.62180073e-08 -3.63928211e-06 -1.55891033e-08 -3.81236177e-06 5.40342184e-08 5.41901457e-07 1.81683834e-07 3.21423720e-07 5.06400406e-08 -5.57747234e-07 -9.86553381e-07 -1.55733495e-07 -3.95830280e-08 2.01329269e-07 3.16687921e-08 1.73901485e-07 5.60737096e-08 1.12410803e-05 1.23993250e-04 4.65727721e-05 4.14790332e-05 -2.23586072e-08 -1.64262990e-04 -1.46611593e-04 7.87233138e-08 1.14959603e-05 2.84327888e-05 -1.55891033e-08 1.24877430e-05 -1.39481760e-08 2.35140889e-07 2.35819438e-06 8.06624395e-07 1.37959306e-06 2.72096564e-07 -2.47579122e-06 -4.23494252e-06 -8.35051609e-07 -1.54486566e-07 8.81629697e-07 1.73901485e-07 7.24542127e-07 2.97469283e-07 -9.71993163e-09 -1.07214420e-07 -4.02705210e-08 -3.80788582e-08 -5.11815264e-06 1.42034839e-07 1.34440694e-07 1.77375044e-05 -9.94032116e-09 -2.62334905e-08 -3.81236177e-06 -1.39481760e-08 -3.64328085e-06 9.36989506e-08 9.39693390e-07 3.21423720e-07 5.53695760e-07 8.78132193e-08 -9.86553381e-07 -1.69957219e-06 -2.70052301e-07 -6.15598127e-08 3.53849281e-07 5.60737096e-08 2.97469283e-07 9.65678254e-08 3.00197366e-06 3.26546287e-05 1.54044205e-05 8.62020051e-06 -3.07546765e-06 -5.27966418e-05 -2.95446127e-05 1.05407642e-05 6.86551279e-06 8.08058691e-06 -2.88294728e-06 1.97313064e-06 -1.61327611e-06 8.27516628e-06 9.08802576e-05 3.31690024e-05 3.31516038e-05 1.43467963e-08 -1.15932821e-04 -1.15872009e-04 -5.01451490e-08 6.57122653e-06 2.27276232e-05 9.83568045e-09 1.13578487e-05 9.83052120e-09 3.26546287e-05 3.54557664e-04 1.68173591e-04 9.41087052e-05 -3.35755854e-05 -5.74940591e-04 -3.21732529e-04 1.14785959e-04 7.53624049e-05 8.87002152e-05 -3.16459742e-05 2.16589604e-05 -1.77088545e-05 9.08802576e-05 9.98807942e-04 3.64520473e-04 3.64329266e-04 1.57668323e-07 -1.27488695e-03 -1.27421822e-03 -5.51434836e-07 7.24639184e-05 2.50627890e-04 1.08462544e-07 1.25248189e-04 1.08405650e-07 -1.54044205e-05 -1.68173591e-04 -7.79876553e-05 -4.47304231e-05 1.59586739e-05 2.68698546e-04 1.54003718e-04 -5.49445981e-05 -3.37545532e-05 -4.12606910e-05 1.47207621e-05 -1.03369758e-05 8.45174457e-06 -3.31690024e-05 -3.64520473e-04 -1.28557904e-04 -1.35515297e-04 -5.86460424e-08 4.50592934e-04 4.74570596e-04 2.05376721e-07 -2.12181717e-05 -8.89594229e-05 -3.84983703e-08 -4.70541429e-05 -4.07266167e-08 -8.62020051e-06 -9.41087052e-05 -4.47304231e-05 -2.30845710e-05 8.93035664e-06 1.54003718e-04 7.96710675e-05 -3.07465933e-05 -2.07463501e-05 -2.17728225e-05 8.45174457e-06 -4.71203860e-06 4.34690881e-06 -3.31516038e-05 -3.64329266e-04 -1.35515297e-04 -1.28415700e-04 -5.86152800e-08 4.74570596e-04 4.50094936e-04 2.05268992e-07 -3.02107103e-05 -8.89073048e-05 -4.07266167e-08 -4.18311905e-05 -3.84556333e-08 3.07546765e-06 3.35755854e-05 1.59586739e-05 8.93035664e-06 -1.23987845e-06 -5.49445981e-05 -3.07465933e-05 4.46131908e-06 7.40176849e-06 8.45174457e-06 -1.09887083e-06 2.44638585e-06 -6.14920040e-07 -1.43467963e-08 -1.57668323e-07 -5.86460424e-08 -5.86152800e-08 7.02848825e-06 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -1.30740856e-08 -4.07266167e-08 5.20098097e-06 -2.26022436e-08 5.19825282e-06 5.27966418e-05 5.74940591e-04 2.68698546e-04 1.54003718e-04 -5.49445981e-05 -9.22547022e-04 -5.28398788e-04 1.88519209e-04 1.17289247e-04 1.43192665e-04 -5.10874902e-05 3.58444286e-05 -2.93072132e-05 1.15932821e-04 1.27488695e-03 4.50592934e-04 4.74570596e-04 2.05376721e-07 -1.57949590e-03 -1.66202156e-03 -7.19261877e-07 7.52048490e-05 3.14093514e-04 1.35928135e-07 1.65969820e-04 1.43651310e-07 2.95446127e-05 3.21732529e-04 1.54003718e-04 7.96710675e-05 -3.07465933e-05 -5.28398788e-04 -2.73978974e-04 1.05493964e-04 7.18721434e-05 7.57090313e-05 -2.93072132e-05 1.64568009e-05 -1.51151857e-05 1.15872009e-04 1.27421822e-03 4.74570596e-04 4.50094936e-04 2.05268992e-07 -1.66202156e-03 -1.57775183e-03 -7.18884592e-07 1.06377644e-04 3.13909848e-04 1.43651310e-07 1.47862365e-04 1.35777392e-07 -1.05407642e-05 -1.14785959e-04 -5.49445981e-05 -3.07465933e-05 4.46131908e-06 1.88519209e-04 1.05493964e-04 -1.59284508e-05 -2.56421474e-05 -2.93072132e-05 4.02017412e-06 -8.44119764e-06 2.24965989e-06 5.01451490e-08 5.51434836e-07 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -7.19261877e-07 -7.18884592e-07 8.33976123e-05 4.60363367e-08 1.43651310e-07 -1.80297925e-05 7.95865317e-08 -1.80203351e-05 6.86551279e-06 7.53624049e-05 3.37545532e-05 2.07463501e-05 -7.40176849e-06 -1.17289247e-04 -7.18721434e-05 2.56421474e-05 1.35697123e-05 1.85614856e-05 -6.62226458e-06 4.98272726e-06 -4.07399018e-06 6.57122653e-06 7.24639184e-05 2.12181717e-05 3.02107103e-05 1.30740856e-08 -7.52048490e-05 -1.06377644e-04 -4.60363367e-08 -8.39846215e-07 1.65608232e-05 7.16691593e-09 1.16238799e-05 1.00607783e-08 8.08058691e-06 8.87002152e-05 4.12606910e-05 2.17728225e-05 -8.45174457e-06 -1.43192665e-04 -7.57090313e-05 2.93072132e-05 1.85614856e-05 2.01094217e-05 -7.83985319e-06 4.44637876e-06 -4.12618461e-06 2.27276232e-05 2.50627890e-04 8.89594229e-05 8.89073048e-05 4.07266167e-08 -3.14093514e-04 -3.13909848e-04 -1.43651310e-07 1.65608232e-05 5.74406352e-05 2.64573468e-08 2.86159769e-05 2.64417132e-08 -2.88294728e-06 -3.16459742e-05 -1.47207621e-05 -8.45174457e-06 1.09887083e-06 5.10874902e-05 2.93072132e-05 -4.02017412e-06 -6.62226458e-06 -7.83985319e-06 9.32227628e-07 -2.34616322e-06 5.42827125e-07 9.83568045e-09 1.08462544e-07 3.84983703e-08 4.07266167e-08 -5.20098097e-06 -1.35928135e-07 -1.43651310e-07 1.80297925e-05 7.16691593e-09 2.64573468e-08 -3.69519580e-06 1.57315850e-08 -3.86773918e-06 1.97313064e-06 2.16589604e-05 1.03369758e-05 4.71203860e-06 -2.44638585e-06 -3.58444286e-05 -1.64568009e-05 8.44119764e-06 4.98272726e-06 4.44637876e-06 -2.34616322e-06 7.12052440e-07 -1.10030401e-06 1.13578487e-05 1.25248189e-04 4.70541429e-05 4.18311905e-05 2.26022436e-08 -1.65969820e-04 -1.47862365e-04 -7.95865317e-08 1.16238799e-05 2.86159769e-05 1.57315850e-08 1.25421922e-05 1.40503904e-08 -1.61327611e-06 -1.77088545e-05 -8.45174457e-06 -4.34690881e-06 6.14920040e-07 2.93072132e-05 1.51151857e-05 -2.24965989e-06 -4.07399018e-06 -4.12618461e-06 5.42827125e-07 -1.10030401e-06 2.65949928e-07 9.83052120e-09 1.08405650e-07 4.07266167e-08 3.84556333e-08 -5.19825282e-06 -1.43651310e-07 -1.35777392e-07 1.80203351e-05 1.00607783e-08 2.64417132e-08 -3.86773918e-06 1.40503904e-08 -3.69113714e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-2 1 -1 169 + 5.16849134e-05 5.27919969e-04 5.03464554e-05 6.05228069e-05 -2.51854556e-04 -1.72460600e-04 -2.07319453e-04 8.62721865e-04 -4.36437814e-05 7.42745124e-06 -3.09079755e-05 -7.28431049e-05 -3.71552957e-05 5.27919969e-04 5.36920334e-03 5.08436757e-04 6.11205287e-04 -2.54341866e-03 -1.74175000e-03 -2.09380379e-03 8.71298030e-03 -4.16481170e-04 7.08782210e-05 -2.94946711e-04 -6.95122663e-04 -3.54563251e-04 -5.03464554e-05 -5.08436757e-04 1.18971292e-05 -6.08553310e-05 2.53238294e-04 -4.35844971e-05 2.07888315e-04 -8.65089078e-04 5.41347455e-05 3.63941051e-06 -1.51447391e-05 7.26432869e-05 3.70533739e-05 -6.05228069e-05 -6.11205287e-04 -6.08553310e-05 -1.06356068e-05 3.04424458e-04 2.07888315e-04 3.33897374e-05 -1.03994648e-03 4.59437335e-05 2.84879266e-07 3.70533739e-05 9.83729058e-05 -1.42508823e-06 2.51854556e-04 2.54341866e-03 2.53238294e-04 3.04424458e-04 -1.20428633e-03 -8.65089078e-04 -1.03994648e-03 4.11102817e-03 -1.91186417e-04 3.70533739e-05 -1.45001695e-04 -3.17424937e-04 -1.74310376e-04 1.72460600e-04 1.74175000e-03 -4.35844971e-05 2.07888315e-04 -8.65089078e-04 1.59314984e-04 -7.10794113e-04 2.95783928e-03 -1.83204796e-04 -1.33334831e-05 5.54848433e-05 -2.44440916e-04 -1.24682693e-04 2.07319453e-04 2.09380379e-03 2.07888315e-04 3.33897374e-05 -1.03994648e-03 -7.10794113e-04 -1.03868797e-04 3.55569691e-03 -1.53970684e-04 -1.86288018e-06 -1.24682693e-04 -3.32106811e-04 9.31892537e-06 -8.62721865e-04 -8.71298030e-03 -8.65089078e-04 -1.03994648e-03 4.11102817e-03 2.95783928e-03 3.55569691e-03 -1.40457847e-02 6.40720750e-04 -1.24682693e-04 4.87018952e-04 1.06359498e-03 5.85458376e-04 -4.36437814e-05 -4.16481170e-04 -5.41347455e-05 -4.59437335e-05 1.91186417e-04 1.83204796e-04 1.53970684e-04 -6.40720750e-04 1.48711166e-05 -5.22964786e-06 2.17622200e-05 2.60823255e-05 1.33038881e-05 7.42745124e-06 7.08782210e-05 -3.63941051e-06 -2.84879266e-07 -3.70533739e-05 1.33334831e-05 1.86288018e-06 1.24682693e-04 -5.22964786e-06 -5.61283237e-07 4.32617101e-06 -8.78246290e-06 2.45210245e-06 -3.09079755e-05 -2.94946711e-04 1.51447391e-05 -3.70533739e-05 1.45001695e-04 -5.54848433e-05 1.24682693e-04 -4.87018952e-04 2.17622200e-05 4.32617101e-06 -1.75242342e-05 2.41967878e-05 1.40078970e-05 -7.28431049e-05 -6.95122663e-04 -7.26432869e-05 -9.83729058e-05 3.17424937e-04 2.44440916e-04 3.32106811e-04 -1.06359498e-03 2.60823255e-05 -8.78246290e-06 2.41967878e-05 4.06185712e-05 3.65106221e-05 -3.71552957e-05 -3.54563251e-04 -3.70533739e-05 1.42508823e-06 1.74310376e-04 1.24682693e-04 -9.31892537e-06 -5.85458376e-04 1.33038881e-05 2.45210245e-06 1.40078970e-05 3.65106221e-05 -1.23375687e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 1 0 676 + 1.69140261e-04 1.55701900e-03 3.23428906e-04 3.23768247e-04 -6.47182798e-04 -1.05927099e-03 -1.06038238e-03 2.11960636e-03 -4.51232749e-05 5.20523543e-05 -1.04047845e-04 -7.80466354e-05 -1.04157012e-04 5.92062699e-04 4.72480806e-03 5.55339758e-04 1.77842326e-03 -1.66721294e-03 -1.70383133e-03 -5.45635934e-03 5.11515627e-03 -1.06152809e-04 6.81944120e-05 -6.39300039e-05 1.32293777e-05 -2.04729815e-04 1.55701900e-03 1.38863696e-02 2.87828294e-03 2.88130283e-03 -5.75945802e-03 -9.29841885e-03 -9.30817474e-03 1.86061809e-02 -2.87859563e-04 3.32062954e-04 -6.63763150e-04 -4.97890953e-04 -6.64459569e-04 4.72480806e-03 3.40637241e-02 4.08098087e-03 1.30689568e-02 -1.22517144e-02 -1.18634774e-02 -3.79916687e-02 3.56159318e-02 2.83214868e-04 -1.81942161e-04 1.70564753e-04 -3.52958768e-05 5.46217554e-04 -3.23428906e-04 -2.87828294e-03 -4.11252946e-04 -6.38847089e-04 1.27699628e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 1.33206059e-04 -4.05569994e-05 8.10696930e-05 1.33575327e-04 1.78262737e-04 -5.55339758e-04 -4.08098087e-03 2.77496976e-04 -1.69805254e-03 1.59186805e-03 -9.79269286e-04 5.02272612e-03 -4.70863948e-03 7.45163790e-05 1.24376298e-04 -1.16598662e-04 -3.00218458e-06 4.64599854e-05 -3.23768247e-04 -2.88130283e-03 -6.38847089e-04 -4.12592798e-04 1.27833610e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 4.92900665e-05 -4.07013328e-05 1.78262737e-04 1.82245085e-04 8.14435629e-05 -1.77842326e-03 -1.30689568e-02 -1.69805254e-03 -4.63011355e-03 5.09780747e-03 5.02272612e-03 1.35371152e-02 -1.50789744e-02 -3.59886299e-06 -5.88818995e-06 4.64599854e-05 1.30237658e-04 1.76772261e-05 6.47182798e-04 5.75945802e-03 1.27699628e-03 1.27833610e-03 -2.32835114e-03 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 -9.85262868e-05 1.78262737e-04 -3.07851986e-04 -1.70278665e-04 -3.08174984e-04 1.66721294e-03 1.22517144e-02 1.59186805e-03 5.09780747e-03 -3.97128601e-03 -4.70863948e-03 -1.50789744e-02 1.15883473e-02 3.37381493e-06 4.64599854e-05 1.16179215e-07 1.40119507e-04 3.72052992e-07 1.05927099e-03 9.29841885e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -4.08600834e-03 -6.64655287e-03 1.32858448e-02 -3.95370826e-04 8.96847052e-05 -1.79271436e-04 -3.70192191e-04 -4.94039393e-04 1.70383133e-03 1.18634774e-02 -9.79269286e-04 5.02272612e-03 -4.70863948e-03 3.44784686e-03 -1.44420250e-02 1.35389204e-02 2.26202011e-05 -4.25415323e-04 3.98812783e-04 -1.78102703e-05 2.75620926e-04 1.06038238e-03 9.30817474e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -6.64655287e-03 -4.09994813e-03 1.32997843e-02 -1.23488297e-04 9.01085203e-05 -4.94039393e-04 -5.27791545e-04 -1.80307583e-04 5.45635934e-03 3.79916687e-02 5.02272612e-03 1.35371152e-02 -1.50789744e-02 -1.44420250e-02 -3.82916354e-02 4.33571171e-02 6.50264132e-04 -3.98180047e-04 2.75620926e-04 -3.90643172e-04 1.19539600e-03 -2.11960636e-03 -1.86061809e-02 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 1.32858448e-02 1.32997843e-02 -2.40314612e-02 2.46841691e-04 -4.94039393e-04 8.30492903e-04 4.26506203e-04 8.31364255e-04 -5.11515627e-03 -3.56159318e-02 -4.70863948e-03 -1.50789744e-02 1.15883473e-02 1.35389204e-02 4.33571171e-02 -3.26882730e-02 -6.09601099e-04 2.75620926e-04 -3.62559506e-04 -2.59276857e-04 -1.16106267e-03 -4.51232749e-05 -2.87859563e-04 -1.33206059e-04 -4.92900665e-05 9.85262868e-05 3.95370826e-04 1.23488297e-04 -2.46841691e-04 -2.47524705e-05 1.47501223e-05 -2.94841310e-05 -3.40970488e-05 -4.55041615e-05 -1.06152809e-04 2.83214868e-04 -7.45163790e-05 3.59886299e-06 -3.37381493e-06 -2.26202011e-05 -6.50264132e-04 6.09601099e-04 -2.39239075e-04 2.16746947e-04 -2.03193089e-04 3.20943771e-05 -4.96673088e-04 5.20523543e-05 3.32062954e-04 4.05569994e-05 4.07013328e-05 -1.78262737e-04 -8.96847052e-05 -9.01085203e-05 4.94039393e-04 1.47501223e-05 -2.51363211e-05 4.93846671e-05 2.55058314e-05 4.94171207e-05 6.81944120e-05 -1.81942161e-04 -1.24376298e-04 5.88818995e-06 -4.64599854e-05 4.25415323e-04 3.98180047e-04 -2.75620926e-04 2.16746947e-04 -2.43547439e-05 3.13034616e-05 4.74172809e-06 3.57270523e-04 -1.04047845e-04 -6.63763150e-04 -8.10696930e-05 -1.78262737e-04 3.07851986e-04 1.79271436e-04 4.94039393e-04 -8.30492903e-04 -2.94841310e-05 4.93846671e-05 -9.91458775e-05 -6.94270663e-05 -8.49604000e-05 -6.39300039e-05 1.70564753e-04 1.16598662e-04 -4.64599854e-05 -1.16179215e-07 -3.98812783e-04 -2.75620926e-04 3.62559506e-04 -2.03193089e-04 3.13034616e-05 -2.03091649e-05 5.10951320e-05 -3.31340343e-04 -7.80466354e-05 -4.97890953e-04 -1.33575327e-04 -1.82245085e-04 1.70278665e-04 3.70192191e-04 5.27791545e-04 -4.26506203e-04 -3.40970488e-05 2.55058314e-05 -6.94270663e-05 -6.40529973e-05 -6.02686003e-05 1.32293777e-05 -3.52958768e-05 3.00218458e-06 -1.30237658e-04 -1.40119507e-04 1.78102703e-05 3.90643172e-04 2.59276857e-04 3.20943771e-05 4.74172809e-06 5.10951320e-05 1.73193615e-04 7.46959854e-05 -1.04157012e-04 -6.64459569e-04 -1.78262737e-04 -8.14435629e-05 3.08174984e-04 4.94039393e-04 1.80307583e-04 -8.31364255e-04 -4.55041615e-05 4.94171207e-05 -8.49604000e-05 -6.02686003e-05 -9.93240647e-05 -2.04729815e-04 5.46217554e-04 -4.64599854e-05 -1.76772261e-05 -3.72052992e-07 -2.75620926e-04 -1.19539600e-03 1.16106267e-03 -4.96673088e-04 3.57270523e-04 -3.31340343e-04 7.46959854e-05 -9.77929331e-04 1.72085808e-06 1.84191054e-05 5.40518451e-06 1.43778673e-06 -9.00510433e-06 -1.81348291e-05 -4.82389021e-06 3.02128498e-05 -7.69616465e-07 8.37909016e-07 -5.24796755e-06 -4.26014697e-06 -1.39596680e-06 1.71555307e-04 1.57695618e-03 3.28015751e-04 3.27671645e-04 -6.55701953e-04 -1.07359504e-03 -1.07246878e-03 2.14611147e-03 -4.52904035e-05 5.23486899e-05 -1.04754679e-04 -7.85551705e-05 -1.04644786e-04 1.84191054e-05 1.96775931e-04 5.80537959e-05 1.54423919e-05 -9.67183429e-05 -1.94257344e-04 -5.16727287e-05 3.23635141e-04 -8.30076904e-06 9.03734462e-06 -5.66024357e-05 -4.59482062e-05 -1.50563280e-05 1.57695618e-03 1.40364205e-02 2.91373172e-03 2.91067506e-03 -5.82453608e-03 -9.40418907e-03 -9.39432358e-03 1.87989300e-02 -2.86322174e-04 3.30944075e-04 -6.62250393e-04 -4.96619271e-04 -6.61555658e-04 -5.40518451e-06 -5.80537959e-05 -1.61705710e-05 -4.55396187e-06 2.85222424e-05 5.45886201e-05 1.53471159e-05 -9.61216127e-05 3.12157602e-06 -2.52283058e-06 1.58009196e-05 1.36042971e-05 4.45786196e-06 -3.28015751e-04 -2.91373172e-03 -4.16802569e-04 -6.46441005e-04 1.29358959e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 1.33768209e-04 -4.03704402e-05 8.07850690e-05 1.33967991e-04 1.78461223e-04 -1.43778673e-06 -1.54423919e-05 -4.55396187e-06 -2.61865013e-07 7.58695686e-06 1.53471159e-05 9.75357482e-07 -2.55684851e-05 5.65448944e-07 -1.36809812e-07 4.45786196e-06 3.77169933e-06 2.27926841e-07 -3.27671645e-04 -2.91067506e-03 -6.46441005e-04 -4.15445557e-04 1.29223255e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 4.89219038e-05 -4.02254279e-05 1.78461223e-04 1.82732469e-04 8.04104422e-05 9.00510433e-06 9.67183429e-05 2.85222424e-05 7.58695686e-06 -4.65689137e-05 -9.61216127e-05 -2.55684851e-05 1.57032800e-04 -3.54150349e-06 4.45786196e-06 -2.73454041e-05 -2.17070568e-05 -7.27391621e-06 6.55701953e-04 5.82453608e-03 1.29358959e-03 1.29223255e-03 -2.35556224e-03 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 -9.78973564e-05 1.78461223e-04 -3.08161409e-04 -1.69937822e-04 -3.07838132e-04 1.81348291e-05 1.94257344e-04 5.45886201e-05 1.53471159e-05 -9.61216127e-05 -1.83568887e-04 -5.15281990e-05 3.22729928e-04 -1.05071432e-05 8.56536851e-06 -5.36463686e-05 -4.61005048e-05 -1.51062333e-05 1.07359504e-03 9.40418907e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -4.13166701e-03 -6.71346123e-03 1.34342709e-02 -3.95878040e-04 8.80008593e-05 -1.76098042e-04 -3.69458003e-04 -4.92161796e-04 4.82389021e-06 5.16727287e-05 1.53471159e-05 9.75357482e-07 -2.55684851e-05 -5.15281990e-05 -3.56145784e-06 8.58466176e-05 -1.92554493e-06 5.24965805e-07 -1.51062333e-05 -1.27647306e-05 -8.74599531e-07 1.07246878e-03 9.39432358e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -6.71346123e-03 -4.11757408e-03 1.34201776e-02 -1.21445868e-04 8.75764397e-05 -4.92161796e-04 -5.27274139e-04 -1.75064894e-04 -3.02128498e-05 -3.23635141e-04 -9.61216127e-05 -2.55684851e-05 1.57032800e-04 3.22729928e-04 8.58466176e-05 -5.27526940e-04 1.20600174e-05 -1.51062333e-05 9.27259754e-05 7.36603319e-05 2.46652407e-05 -2.14611147e-03 -1.87989300e-02 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 1.34342709e-02 1.34201776e-02 -2.42662003e-02 2.43024669e-04 -4.92161796e-04 8.26492446e-04 4.21964222e-04 8.25625413e-04 -7.69616465e-07 -8.30076904e-06 -3.12157602e-06 -5.65448944e-07 3.54150349e-06 1.05071432e-05 1.92554493e-06 -1.20600174e-05 -4.29451949e-07 -4.41051922e-07 2.76238366e-06 1.42043756e-06 4.65449593e-07 -4.52904035e-05 -2.86322174e-04 -1.33768209e-04 -4.89219038e-05 9.78973564e-05 3.95878040e-04 1.21445868e-04 -2.43024669e-04 -2.49008625e-05 1.54428858e-05 -3.09026749e-05 -3.48621147e-05 -4.64404637e-05 8.37909016e-07 9.03734462e-06 2.52283058e-06 1.36809812e-07 -4.45786196e-06 -8.56536851e-06 -5.24965805e-07 1.51062333e-05 -4.41051922e-07 6.15327829e-08 -2.48451942e-06 -2.23643919e-06 -1.17636364e-07 5.23486899e-05 3.30944075e-04 4.03704402e-05 4.02254279e-05 -1.78461223e-04 -8.80008593e-05 -8.75764397e-05 4.92161796e-04 1.54428858e-05 -2.56424764e-05 5.07133837e-05 2.67916323e-05 5.06790535e-05 -5.24796755e-06 -5.66024357e-05 -1.58009196e-05 -4.45786196e-06 2.73454041e-05 5.36463686e-05 1.51062333e-05 -9.27259754e-05 2.76238366e-06 -2.48451942e-06 1.52258159e-05 1.28379718e-05 4.30497731e-06 -1.04754679e-04 -6.62250393e-04 -8.07850690e-05 -1.78461223e-04 3.08161409e-04 1.76098042e-04 4.92161796e-04 -8.26492446e-04 -3.09026749e-05 5.07133837e-05 -1.01781931e-04 -7.16103976e-05 -8.79029123e-05 -4.26014697e-06 -4.59482062e-05 -1.36042971e-05 -3.77169933e-06 2.17070568e-05 4.61005048e-05 1.27647306e-05 -7.36603319e-05 1.42043756e-06 -2.23643919e-06 1.28379718e-05 9.91301205e-06 3.57042703e-06 -7.85551705e-05 -4.96619271e-04 -1.33967991e-04 -1.82732469e-04 1.69937822e-04 3.69458003e-04 5.27274139e-04 -4.21964222e-04 -3.48621147e-05 2.67916323e-05 -7.16103976e-05 -6.52311227e-05 -6.25458112e-05 -1.39596680e-06 -1.50563280e-05 -4.45786196e-06 -2.27926841e-07 7.27391621e-06 1.51062333e-05 8.74599531e-07 -2.46652407e-05 4.65449593e-07 -1.17636364e-07 4.30497731e-06 3.57042703e-06 1.86906885e-07 -1.04644786e-04 -6.61555658e-04 -1.78461223e-04 -8.04104422e-05 3.07838132e-04 4.92161796e-04 1.75064894e-04 -8.25625413e-04 -4.64404637e-05 5.06790535e-05 -8.79029123e-05 -6.25458112e-05 -1.01597405e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-2 1 1 676 + 1.69088388e-04 1.55659037e-03 3.23331355e-04 6.47024526e-04 -3.23633666e-04 -1.05896638e-03 -2.11911776e-03 1.05995650e-03 -4.51193676e-05 1.04036868e-04 -5.20379546e-05 7.80517727e-05 -1.04134141e-04 2.86047247e-05 3.02901620e-04 2.80877649e-05 1.46131797e-04 -2.81402921e-05 -9.75806511e-05 -5.07681402e-04 9.77631376e-05 -2.98941544e-05 2.06650036e-05 -3.97941619e-06 5.17633244e-05 -2.07036494e-05 1.55659037e-03 1.38831389e-02 2.87752923e-03 5.75827848e-03 -2.88021968e-03 -9.29617039e-03 -1.86027434e-02 9.30486221e-03 -2.87890442e-04 6.63821800e-04 -3.32035455e-04 4.98020264e-04 -6.64442466e-04 3.02901620e-04 3.20877362e-03 2.95742560e-04 1.53865542e-03 -2.96295631e-04 -1.02940955e-03 -5.35569375e-03 1.03133466e-03 -3.08563012e-04 2.13301091e-04 -4.10749416e-05 5.34293329e-04 -2.13699988e-04 -3.23331355e-04 -2.87752923e-03 -4.11137569e-04 -1.27669244e-03 6.38585770e-04 1.30251061e-03 4.12986990e-03 -2.06570985e-03 1.33193756e-04 -8.10798203e-05 4.05551234e-05 -1.33594706e-04 1.78237719e-04 -2.80877649e-05 -2.95742560e-04 3.23326128e-06 -1.47673677e-04 2.84372088e-05 -1.15773689e-05 5.12723617e-04 -9.87341064e-05 3.63743023e-05 5.63304714e-06 -1.08474402e-06 -5.27293276e-05 2.10900193e-05 -6.47024526e-04 -5.75827848e-03 -1.27669244e-03 -2.32796184e-03 1.27788613e-03 4.12986990e-03 7.50309160e-03 -4.13373129e-03 9.85425184e-05 -3.07873132e-04 1.78237719e-04 -1.70347504e-04 3.08160990e-04 -1.46131797e-04 -1.53865542e-03 -1.47673677e-04 -7.36682256e-04 1.47949843e-04 5.12723617e-04 2.55741236e-03 -5.13682466e-04 1.43026518e-04 -1.04391083e-04 2.10900193e-05 -2.47650389e-04 1.04586306e-04 3.23633666e-04 2.88021968e-03 6.38585770e-04 1.27788613e-03 -4.12331153e-04 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 -4.92897491e-05 1.78237719e-04 -4.06837196e-05 1.82233517e-04 -8.14129653e-05 2.81402921e-05 2.96295631e-04 2.84372088e-05 1.47949843e-04 3.12699919e-06 -9.87341064e-05 -5.13682466e-04 -1.12084265e-05 -2.75423152e-05 2.10900193e-05 1.06757172e-06 5.79663609e-05 5.55423949e-06 1.05896638e-03 9.29617039e-03 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -4.08506578e-03 -1.32831996e-02 6.64409216e-03 -3.95359218e-04 1.79348778e-04 -8.97080408e-05 3.70284810e-04 -4.94021970e-04 9.75806511e-05 1.02940955e-03 -1.15773689e-05 5.12723617e-04 -9.87341064e-05 4.11331303e-05 -1.78291256e-03 3.43331714e-04 -1.26428543e-04 -2.02786122e-05 3.90500960e-06 1.83041722e-04 -7.32107471e-05 2.11911776e-03 1.86027434e-02 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -1.32831996e-02 -2.40284433e-02 1.32956192e-02 -2.46930191e-04 8.30655294e-04 -4.94021970e-04 4.26772258e-04 -8.31431947e-04 5.07681402e-04 5.35569375e-03 5.12723617e-04 2.55741236e-03 -5.13682466e-04 -1.78291256e-03 -8.89210867e-03 1.78624680e-03 -4.96076275e-04 3.62238307e-04 -7.32107471e-05 8.58955744e-04 -3.62915732e-04 -1.05995650e-03 -9.30486221e-03 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 6.64409216e-03 1.32956192e-02 -4.09748428e-03 1.23511428e-04 -4.94021970e-04 9.00856744e-05 -5.27795838e-04 1.80272157e-04 -9.77631376e-05 -1.03133466e-03 -9.87341064e-05 -5.13682466e-04 -1.12084265e-05 3.43331714e-04 1.78624680e-03 3.98501933e-05 9.55283627e-05 -7.32107471e-05 -3.84513825e-06 -2.01360764e-04 -2.00050436e-05 -4.51193676e-05 -2.87890442e-04 -1.33193756e-04 -9.85425184e-05 4.92897491e-05 3.95359218e-04 2.46930191e-04 -1.23511428e-04 -2.47490182e-05 2.94546993e-05 -1.47328764e-05 3.40874454e-05 -4.54783628e-05 -2.98941544e-05 -3.08563012e-04 -3.63743023e-05 -1.43026518e-04 2.75423152e-05 1.26428543e-04 4.96076275e-04 -9.55283627e-05 2.11921154e-05 -2.24320413e-05 4.31969092e-06 -3.79448557e-05 1.51767105e-05 1.04036868e-04 6.63821800e-04 8.10798203e-05 3.07873132e-04 -1.78237719e-04 -1.79348778e-04 -8.30655294e-04 4.94021970e-04 2.94546993e-05 -9.90973788e-05 4.93505482e-05 -6.93955351e-05 8.48903546e-05 2.06650036e-05 2.13301091e-04 -5.63304714e-06 1.04391083e-04 -2.10900193e-05 2.02786122e-05 -3.62238307e-04 7.32107471e-05 -2.24320413e-05 -7.96350257e-06 1.55019683e-06 3.04330388e-05 -1.30443894e-05 -5.20379546e-05 -3.32035455e-04 -4.05551234e-05 -1.78237719e-04 4.06837196e-05 8.97080408e-05 4.94021970e-04 -9.00856744e-05 -1.47328764e-05 4.93505482e-05 -2.51178417e-05 2.54805866e-05 -4.93794285e-05 -3.97941619e-06 -4.10749416e-05 1.08474402e-06 -2.10900193e-05 -1.06757172e-06 -3.90500960e-06 7.32107471e-05 3.84513825e-06 4.31969092e-06 1.55019683e-06 -2.11889346e-07 -7.48000800e-06 -1.53735271e-06 7.80517727e-05 4.98020264e-04 1.33594706e-04 1.70347504e-04 -1.82233517e-04 -3.70284810e-04 -4.26772258e-04 5.27795838e-04 3.40874454e-05 -6.93955351e-05 2.54805866e-05 -6.40462852e-05 6.02250529e-05 5.17633244e-05 5.34293329e-04 5.27293276e-05 2.47650389e-04 -5.79663609e-05 -1.83041722e-04 -8.58955744e-04 2.01360764e-04 -3.79448557e-05 3.04330388e-05 -7.48000800e-06 6.49697908e-05 -3.47030391e-05 -1.04134141e-04 -6.64442466e-04 -1.78237719e-04 -3.08160990e-04 8.14129653e-05 4.94021970e-04 8.31431947e-04 -1.80272157e-04 -4.54783628e-05 8.48903546e-05 -4.93794285e-05 6.02250529e-05 -9.92560478e-05 -2.07036494e-05 -2.13699988e-04 -2.10900193e-05 -1.04586306e-04 -5.55423949e-06 7.32107471e-05 3.62915732e-04 2.00050436e-05 1.51767105e-05 -1.30443894e-05 -1.53735271e-06 -3.47030391e-05 -7.91475924e-06 9.18819074e-05 8.96549768e-04 2.66181767e-04 2.48250979e-04 -2.66015869e-04 -8.94489506e-04 -8.34234056e-04 8.93932012e-04 3.10913754e-06 7.64248648e-05 -8.18938434e-05 -5.28307109e-06 -7.63772327e-05 1.71607917e-04 1.57739011e-03 3.28114677e-04 6.55862237e-04 -3.27807936e-04 -1.07390369e-03 -2.14660583e-03 1.07289974e-03 -4.52942728e-05 1.04765636e-04 -5.23631411e-05 7.85499319e-05 -1.04667695e-04 8.96549768e-04 8.62740033e-03 2.54595335e-03 2.37445043e-03 -2.54436658e-03 -8.51685293e-03 -7.94313261e-03 8.51154477e-03 2.59615120e-05 6.38152871e-04 -6.83819218e-04 -4.41140065e-05 -6.37755140e-04 1.57739011e-03 1.40396814e-02 2.91449415e-03 5.82572737e-03 -2.91176951e-03 -9.40646010e-03 -1.88023956e-02 9.39766638e-03 -2.86290008e-04 6.62188680e-04 -3.30969969e-04 4.96487949e-04 -6.61569627e-04 -2.66181767e-04 -2.54595335e-03 -6.78529947e-04 -7.43182319e-04 7.96364594e-04 2.25616286e-03 2.48184216e-03 -2.65944328e-03 4.40069587e-05 -1.75662356e-04 1.88232790e-04 1.50962295e-05 2.18245830e-04 -3.28114677e-04 -2.91449415e-03 -4.16919525e-04 -1.29389719e-03 6.46705581e-04 1.31941097e-03 4.18190984e-03 -2.09016949e-03 1.33780351e-04 -8.07745132e-05 4.03720857e-05 -1.33948236e-04 1.78485871e-04 -2.48250979e-04 -2.37445043e-03 -7.43182319e-04 -5.74788074e-04 7.42719127e-04 2.48184216e-03 1.90971900e-03 -2.48029534e-03 -3.29499656e-05 -1.57865935e-04 2.18245830e-04 5.67988846e-05 1.57767545e-04 -6.55862237e-04 -5.82572737e-03 -1.29389719e-03 -2.35595549e-03 1.29268758e-03 4.18190984e-03 7.58642632e-03 -4.17800035e-03 9.78807044e-05 -3.08139304e-04 1.78485871e-04 -1.69868227e-04 3.07851237e-04 2.66015869e-04 2.54436658e-03 7.96364594e-04 7.42719127e-04 -6.77536964e-04 -2.65944328e-03 -2.48029534e-03 2.25284682e-03 3.53078717e-05 2.18245830e-04 -1.88058394e-04 3.06897827e-05 -1.75390226e-04 3.27807936e-04 2.91176951e-03 6.46705581e-04 1.29268758e-03 -4.15709803e-04 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 -4.89219685e-05 1.78485871e-04 -4.02428327e-05 1.82743816e-04 -8.04406389e-05 8.94489506e-04 8.51685293e-03 2.25616286e-03 2.48184216e-03 -2.65944328e-03 -7.48958431e-03 -8.27831157e-03 8.87070921e-03 -1.50985335e-04 5.48092189e-04 -5.87313775e-04 -4.78920306e-05 -6.92373945e-04 1.07390369e-03 9.40646010e-03 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -4.13261909e-03 -1.34369406e-02 6.71594663e-03 -3.95888562e-04 1.76018488e-04 -8.79761846e-05 3.69363699e-04 -4.92176709e-04 8.34234056e-04 7.94313261e-03 2.48184216e-03 1.90971900e-03 -2.48029534e-03 -8.27831157e-03 -6.33400305e-03 8.27315209e-03 1.09836703e-04 4.90970313e-04 -6.92373945e-04 -1.89379432e-04 -4.90664314e-04 2.14660583e-03 1.88023956e-02 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -1.34369406e-02 -2.42692352e-02 1.34243790e-02 -2.42934386e-04 8.26325317e-04 -4.92176709e-04 4.21695362e-04 -8.25552819e-04 -8.93932012e-04 -8.51154477e-03 -2.65944328e-03 -2.48029534e-03 2.25284682e-03 8.87070921e-03 8.27315209e-03 -7.47852346e-03 -1.17696640e-04 -6.92373945e-04 5.86754375e-04 -1.07207099e-04 5.47228870e-04 -1.07289974e-03 -9.39766638e-03 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 6.71594663e-03 1.34243790e-02 -4.12005630e-03 1.21421566e-04 -4.92176709e-04 8.75979182e-05 -5.27268313e-04 1.75097826e-04 3.10913754e-06 2.59615120e-05 -4.40069587e-05 3.29499656e-05 -3.53078717e-05 1.50985335e-04 -1.09836703e-04 1.17696640e-04 -2.42702964e-05 -7.06548330e-06 7.57109070e-06 -1.06200644e-06 -1.53534017e-05 -4.52942728e-05 -2.86290008e-04 -1.33780351e-04 -9.78807044e-05 4.89219685e-05 3.95888562e-04 2.42934386e-04 -1.21421566e-04 -2.49041449e-05 3.09325422e-05 -1.54604614e-05 3.48716743e-05 -4.64664662e-05 7.64248648e-05 6.38152871e-04 1.75662356e-04 1.57865935e-04 -2.18245830e-04 -5.48092189e-04 -4.90970313e-04 6.92373945e-04 -7.06548330e-06 -1.29931481e-05 2.12406844e-06 -1.36468913e-05 3.78743844e-06 1.04765636e-04 6.62188680e-04 8.07745132e-05 3.08139304e-04 -1.78485871e-04 -1.76018488e-04 -8.26325317e-04 4.92176709e-04 3.09325422e-05 -1.01831063e-04 5.07480848e-05 -7.16420931e-05 8.79741411e-05 -8.18938434e-05 -6.83819218e-04 -1.88232790e-04 -2.18245830e-04 1.88058394e-04 5.87313775e-04 6.92373945e-04 -5.86754375e-04 7.57109070e-06 2.12406844e-06 -1.32869950e-05 -1.31279665e-05 -2.13888070e-06 -5.23631411e-05 -3.30969969e-04 -4.03720857e-05 -1.78485871e-04 4.02428327e-05 8.79761846e-05 4.92176709e-04 -8.75979182e-05 -1.54604614e-05 5.07480848e-05 -2.56612647e-05 2.68173507e-05 -5.07174502e-05 -5.28307109e-06 -4.41140065e-05 -1.50962295e-05 -5.67988846e-05 -3.06897827e-05 4.78920306e-05 1.89379432e-04 1.07207099e-04 -1.06200644e-06 -1.36468913e-05 -1.31279665e-05 -2.30221774e-05 6.97378894e-07 7.85499319e-05 4.96487949e-04 1.33948236e-04 1.69868227e-04 -1.82743816e-04 -3.69363699e-04 -4.21695362e-04 5.27268313e-04 3.48716743e-05 -7.16420931e-05 2.68173507e-05 -6.52373474e-05 6.25899070e-05 -7.63772327e-05 -6.37755140e-04 -2.18245830e-04 -1.57767545e-04 1.75390226e-04 6.92373945e-04 4.90664314e-04 -5.47228870e-04 -1.53534017e-05 3.78743844e-06 -2.13888070e-06 6.97378894e-07 -1.29884256e-05 -1.04667695e-04 -6.61569627e-04 -1.78485871e-04 -3.07851237e-04 8.04406389e-05 4.92176709e-04 8.25552819e-04 -1.75097826e-04 -4.64664662e-05 8.79741411e-05 -5.07174502e-05 6.25899070e-05 -1.01666499e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-2 1 2 169 + 4.85174195e-06 5.32475257e-05 1.47416558e-05 2.35759274e-05 -4.90515490e-06 -5.11762258e-05 -8.18447402e-05 1.70284342e-05 -1.54079586e-06 1.27711042e-05 -2.65712746e-06 9.77017128e-06 -4.24947138e-06 5.32475257e-05 5.83836750e-04 1.62221424e-04 2.59436293e-04 -5.39777366e-05 -5.62412921e-04 -8.99451624e-04 1.87137899e-04 -1.70488320e-05 1.41311652e-04 -2.94009873e-05 1.08106474e-04 -4.70201960e-05 -1.47416558e-05 -1.62221424e-04 -4.18785615e-05 -7.27205119e-05 1.51300676e-05 1.46175787e-04 2.53311717e-04 -5.27034711e-05 7.19466627e-06 -3.65437842e-05 7.60321827e-06 -3.04858780e-05 1.32596310e-05 -2.35759274e-05 -2.59436293e-04 -7.27205119e-05 -1.12707500e-04 2.41971038e-05 2.53311717e-04 3.92898475e-04 -8.42872220e-05 5.78023180e-06 -6.16633927e-05 1.32596310e-05 -4.54493235e-05 2.05179457e-05 4.90515490e-06 5.39777366e-05 1.51300676e-05 2.41971038e-05 -1.44196735e-06 -5.27034711e-05 -8.42872220e-05 5.32057478e-06 -1.20262214e-06 1.32596310e-05 -6.91636798e-07 1.08317248e-05 -1.10611584e-06 5.11762258e-05 5.62412921e-04 1.46175787e-04 2.53311717e-04 -5.27034711e-05 -5.09238956e-04 -8.80696539e-04 1.83235758e-04 -2.50332622e-05 1.28568053e-04 -2.67495825e-05 1.07001922e-04 -4.65397781e-05 8.18447402e-05 8.99451624e-04 2.53311717e-04 3.92898475e-04 -8.42872220e-05 -8.80696539e-04 -1.36702722e-03 2.93043944e-04 -2.04632189e-05 2.16621232e-04 -4.65397781e-05 1.59825471e-04 -7.20787890e-05 -1.70284342e-05 -1.87137899e-04 -5.27034711e-05 -8.42872220e-05 5.32057478e-06 1.83235758e-04 2.93043944e-04 -1.95233641e-05 4.25753169e-06 -4.65397781e-05 2.61738794e-06 -3.79549453e-05 4.18591705e-06 -1.54079586e-06 -1.70488320e-05 -7.19466627e-06 -5.78023180e-06 1.20262214e-06 2.50332622e-05 2.04632189e-05 -4.25753169e-06 -2.07503469e-06 -5.33544500e-06 1.11008079e-06 -1.54122270e-06 6.70344618e-07 1.27711042e-05 1.41311652e-04 3.65437842e-05 6.16633927e-05 -1.32596310e-05 -1.28568053e-04 -2.16621232e-04 4.65397781e-05 -5.33544500e-06 3.08630249e-05 -6.65415974e-06 2.48956001e-05 -1.12631806e-05 -2.65712746e-06 -2.94009873e-05 -7.60321827e-06 -1.32596310e-05 6.91636798e-07 2.67495825e-05 4.65397781e-05 -2.61738794e-06 1.11008079e-06 -6.65415974e-06 2.65204781e-07 -5.97753437e-06 5.09104496e-07 9.77017128e-06 1.08106474e-04 3.04858780e-05 4.54493235e-05 -1.08317248e-05 -1.07001922e-04 -1.59825471e-04 3.79549453e-05 -1.54122270e-06 2.48956001e-05 -5.97753437e-06 1.73930476e-05 -8.92174853e-06 -4.24947138e-06 -4.70201960e-05 -1.32596310e-05 -2.05179457e-05 1.10611584e-06 4.65397781e-05 7.20787890e-05 -4.18591705e-06 6.70344618e-07 -1.12631806e-05 5.09104496e-07 -8.92174853e-06 7.61066682e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 2 -1 169 + 3.08462320e-07 3.15409966e-06 -3.41585595e-07 1.09359022e-06 -1.70828044e-06 1.07709367e-06 -3.44832780e-06 5.38657973e-06 -6.78759036e-07 -2.26328440e-07 3.53544169e-07 -5.21746268e-07 -1.13187574e-06 3.15409966e-06 3.22309239e-05 -3.49670173e-06 1.11947309e-05 -1.74871167e-05 1.10158810e-05 -3.52674703e-05 5.50907720e-05 -6.95547193e-06 -2.31926358e-06 3.62288590e-06 -5.34650934e-06 -1.15987110e-05 3.41585595e-07 3.49670173e-06 -2.77231079e-07 1.21779934e-06 -1.90230558e-06 8.80645566e-07 -3.84565583e-06 6.00723972e-06 -7.85446193e-07 -1.84061522e-07 2.87519668e-07 -5.84490191e-07 -1.26799233e-06 -1.09359022e-06 -1.11947309e-05 1.21779934e-06 -3.79564709e-06 6.09025327e-06 -3.84565583e-06 1.19913570e-05 -1.92322473e-05 2.39426416e-06 7.90027207e-07 -1.26799233e-06 1.94073671e-06 3.95095122e-06 1.70828044e-06 1.74871167e-05 -1.90230558e-06 6.09025327e-06 -9.41033926e-06 6.00723972e-06 -1.92322473e-05 2.97218427e-05 -3.74004315e-06 -1.26799233e-06 1.95900759e-06 -2.81451321e-06 -6.27178541e-06 -1.07709367e-06 -1.10158810e-05 8.80645566e-07 -3.84565583e-06 6.00723972e-06 -2.79286024e-06 1.21284827e-05 -1.89457159e-05 2.48239091e-06 5.85663140e-07 -9.14855367e-07 1.84824741e-06 4.00958575e-06 3.44832780e-06 3.52674703e-05 -3.84565583e-06 1.19913570e-05 -1.92322473e-05 1.21284827e-05 -3.78339761e-05 6.06549282e-05 -7.57312680e-06 -2.49932151e-06 4.00958575e-06 -6.13327398e-06 -1.24991865e-05 -5.38657973e-06 -5.50907720e-05 6.00723972e-06 -1.92322473e-05 2.97218427e-05 -1.89457159e-05 6.06549282e-05 -9.37526276e-05 1.18298647e-05 4.00958575e-06 -6.19581633e-06 8.90559558e-06 1.98359775e-05 -6.78759036e-07 -6.95547193e-06 7.85446193e-07 -2.39426416e-06 3.74004315e-06 -2.48239091e-06 7.57312680e-06 -1.18298647e-05 1.47065971e-06 5.18565300e-07 -8.10042865e-07 1.13673871e-06 2.46603962e-06 -2.26328440e-07 -2.31926358e-06 1.84061522e-07 -7.90027207e-07 1.26799233e-06 -5.85663140e-07 2.49932151e-06 -4.00958575e-06 5.18565300e-07 1.19449934e-07 -1.92174647e-07 4.06784631e-07 8.27629618e-07 3.53544169e-07 3.62288590e-06 -2.87519668e-07 1.26799233e-06 -1.95900759e-06 9.14855367e-07 -4.00958575e-06 6.19581633e-06 -8.10042865e-07 -1.92174647e-07 2.96618508e-07 -5.89510339e-07 -1.31399540e-06 -5.21746268e-07 -5.34650934e-06 5.84490191e-07 -1.94073671e-06 2.81451321e-06 -1.84824741e-06 6.13327398e-06 -8.90559558e-06 1.13673871e-06 4.06784631e-07 -5.89510339e-07 7.42990635e-07 1.96083353e-06 -1.13187574e-06 -1.15987110e-05 1.26799233e-06 -3.95095122e-06 6.27178541e-06 -4.00958575e-06 1.24991865e-05 -1.98359775e-05 2.46603962e-06 8.27629618e-07 -1.31399540e-06 1.96083353e-06 4.09296024e-06 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-2 2 0 668 + 8.10007911e-06 8.89729151e-05 -1.13385085e-09 3.24945913e-05 -3.24927368e-05 3.96246025e-09 -1.13558610e-04 1.13552129e-04 -1.28973321e-05 -7.79525178e-10 7.79480688e-10 1.27497202e-09 -2.23388344e-05 7.28503538e-08 7.29821548e-07 -8.26478194e-08 4.29870507e-07 -2.48051817e-07 2.53312569e-07 -1.31753751e-06 7.60269824e-07 -1.71682167e-07 -9.08173182e-08 5.24050858e-08 1.57539001e-07 -2.72571025e-07 8.89729151e-05 9.77951145e-04 -1.24640330e-08 3.57201882e-04 -3.57181495e-04 4.35824782e-08 -1.24901332e-03 1.24894204e-03 -1.42281146e-04 -8.59958750e-09 8.59909670e-09 1.40652718e-08 -2.46438174e-04 7.29821548e-07 7.30982289e-06 -8.28289708e-07 4.30812718e-06 -2.48595509e-06 2.53789584e-06 -1.32001858e-05 7.61701494e-06 -1.72115246e-06 -9.10464107e-07 5.25372810e-07 1.57936404e-06 -2.73258603e-06 1.13385085e-09 1.24640330e-08 6.84375556e-06 4.63803227e-09 -4.63776757e-09 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 -2.07009141e-09 5.07478398e-06 -5.07449435e-06 -3.23134929e-09 8.26478194e-08 8.28289708e-07 -7.75870454e-08 4.89690578e-07 -2.82570299e-07 2.38358612e-07 -1.50163088e-06 8.66498779e-07 -2.00488276e-07 -8.55416144e-08 4.93608018e-08 1.80232277e-07 -3.11834504e-07 -3.24945913e-05 -3.57201882e-04 4.63803227e-09 -1.26075811e-04 1.32911980e-04 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.05361622e-05 3.05445661e-09 -3.23134929e-09 5.06949868e-06 8.75314902e-05 -4.29870507e-07 -4.30812718e-06 4.89690578e-07 -2.53043254e-06 1.46971377e-06 -1.50163088e-06 7.75998291e-06 -4.50686143e-06 1.01098943e-06 5.36875545e-07 -3.11834504e-07 -9.19072127e-07 1.61133053e-06 3.24927368e-05 3.57181495e-04 -4.63776757e-09 1.32911980e-04 -1.26060639e-04 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.05332780e-05 -3.23134929e-09 3.05408776e-09 5.07977958e-06 -8.75259153e-05 2.48051817e-07 2.48595509e-06 -2.82570299e-07 1.46971377e-06 -8.31519466e-07 8.66498779e-07 -4.50686143e-06 2.55028426e-06 -5.83379787e-07 -3.11834504e-07 1.76410991e-07 5.51526297e-07 -9.17554545e-07 -3.96246025e-09 -4.35824782e-08 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 8.11322711e-05 5.68674213e-08 -5.68641757e-08 7.28839261e-09 -1.75845446e-05 1.75835410e-05 1.13966928e-08 -2.53312569e-07 -2.53789584e-06 2.38358612e-07 -1.50163088e-06 8.66498779e-07 -7.31910117e-07 4.60273833e-06 -2.65595705e-06 6.14944494e-07 2.62919439e-07 -1.51714629e-07 -5.52913645e-07 9.56640816e-07 1.13558610e-04 1.24901332e-03 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.68674213e-08 -1.54860907e-03 1.62964833e-03 -1.78417889e-04 -1.07837565e-08 1.13966928e-08 -1.75659038e-05 -3.09029852e-04 1.31753751e-06 1.32001858e-05 -1.50163088e-06 7.75998291e-06 -4.50686143e-06 4.60273833e-06 -2.37868891e-05 1.38142496e-05 -3.10178343e-06 -1.64711347e-06 9.56640816e-07 2.82001078e-06 -4.94349994e-06 -1.13552129e-04 -1.24894204e-03 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.68641757e-08 1.62964833e-03 -1.54842305e-03 1.78407706e-04 1.13966928e-08 -1.07824556e-08 -1.76021816e-05 3.09010207e-04 -7.60269824e-07 -7.61701494e-06 8.66498779e-07 -4.50686143e-06 2.55028426e-06 -2.65595705e-06 1.38142496e-05 -7.81833122e-06 1.78984835e-06 9.56640816e-07 -5.41286180e-07 -1.69167703e-06 2.81535516e-06 -1.28973321e-05 -1.42281146e-04 2.07009141e-09 -5.05361622e-05 5.05332780e-05 -7.28839261e-09 1.78417889e-04 -1.78407706e-04 1.90386979e-05 1.36919555e-09 -1.36911740e-09 -1.86534278e-09 3.26827434e-05 -1.71682167e-07 -1.72115246e-06 2.00488276e-07 -1.01098943e-06 5.83379787e-07 -6.14944494e-07 3.10178343e-06 -1.78984835e-06 4.01608353e-07 2.19986511e-07 -1.26940678e-07 -3.69807706e-07 6.39834354e-07 -7.79525178e-10 -8.59958750e-09 -5.07478398e-06 -3.05445661e-09 3.23134929e-09 1.75845446e-05 1.07837565e-08 -1.13966928e-08 1.36919555e-09 -3.61501287e-06 3.78410410e-06 1.31920456e-10 2.10742724e-09 -9.08173182e-08 -9.10464107e-07 8.55416144e-08 -5.36875545e-07 3.11834504e-07 -2.62919439e-07 1.64711347e-06 -9.56640816e-07 2.19986511e-07 9.41015718e-08 -5.46718897e-08 -1.95856737e-07 3.43395909e-07 7.79480688e-10 8.59909670e-09 5.07449435e-06 3.23134929e-09 -3.05408776e-09 -1.75835410e-05 -1.13966928e-08 1.07824556e-08 -1.36911740e-09 3.78410410e-06 -3.61458092e-06 1.32168544e-10 -2.10729189e-09 5.24050858e-08 5.25372810e-07 -4.93608018e-08 3.11834504e-07 -1.76410991e-07 1.51714629e-07 -9.56640816e-07 5.41286180e-07 -1.26940678e-07 -5.46718897e-08 3.09036958e-08 1.17548796e-07 -1.95533312e-07 1.27497202e-09 1.40652718e-08 -5.06949868e-06 -5.07977958e-06 1.75659038e-05 1.76021816e-05 -1.86534278e-09 1.31920456e-10 1.32168544e-10 -7.39890095e-06 -3.66281821e-09 1.57539001e-07 1.57936404e-06 -1.80232277e-07 9.19072127e-07 -5.51526297e-07 5.52913645e-07 -2.82001078e-06 1.69167703e-06 -3.69807706e-07 -1.95856737e-07 1.17548796e-07 3.19446098e-07 -5.99612796e-07 -2.23388344e-05 -2.46438174e-04 3.23134929e-09 -8.75314902e-05 8.75259153e-05 -1.13966928e-08 3.09029852e-04 -3.09010207e-04 3.26827434e-05 2.10742724e-09 -2.10729189e-09 -3.66281821e-09 5.67774792e-05 -2.72571025e-07 -2.73258603e-06 3.11834504e-07 -1.61133053e-06 9.17554545e-07 -9.56640816e-07 4.94349994e-06 -2.81535516e-06 6.39834354e-07 3.43395909e-07 -1.95533312e-07 -5.99612796e-07 1.01032422e-06 3.03078852e-06 3.29758925e-05 3.10985195e-06 8.70027955e-06 -1.55417088e-05 -1.06619878e-05 -2.98285179e-05 5.32840509e-05 -5.18136276e-06 1.63020078e-06 -2.91210249e-06 -4.99635463e-06 -8.14704564e-06 8.33525886e-06 9.15344711e-05 1.16616523e-09 3.33879637e-05 -3.33898711e-05 -4.07619778e-09 -1.16703825e-04 1.16710492e-04 -1.31985289e-05 7.98420174e-10 -7.98465787e-10 -1.30595078e-09 -2.28605226e-05 3.29758925e-05 3.58134117e-04 3.39587527e-05 9.50047290e-05 -1.69711309e-04 -1.16134253e-04 -3.24903077e-04 5.80389282e-04 -5.68893957e-05 1.78989855e-05 -3.19737796e-05 -5.48580767e-05 -8.94514676e-05 9.15344711e-05 1.00595728e-03 1.28147373e-08 3.66893104e-04 -3.66914064e-04 -4.48219880e-08 -1.28327862e-03 1.28335193e-03 -1.45525993e-04 8.80332117e-09 -8.80382409e-09 -1.43993157e-08 -2.52058414e-04 -3.10985195e-06 -3.39587527e-05 -1.25673782e-06 -9.02802959e-06 1.61271837e-05 4.52273325e-06 3.10923337e-05 -5.55416630e-05 5.87627149e-06 -6.22743877e-07 1.11243598e-06 5.23454912e-06 8.53544509e-06 -1.16616523e-09 -1.28147373e-08 7.09211384e-06 -4.76412594e-09 4.76439811e-09 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 2.12015265e-09 5.24241994e-06 -5.24271943e-06 3.30600061e-09 -8.70027955e-06 -9.50047290e-05 -9.02802959e-06 -2.32870075e-05 4.51182272e-05 3.10923337e-05 8.03944933e-05 -1.55386174e-04 1.45601778e-05 -4.39027139e-06 8.53544509e-06 1.57296147e-05 2.19406970e-05 -3.33879637e-05 -3.66893104e-04 -4.76412594e-09 -1.29307480e-04 1.36407386e-04 1.66844065e-08 4.53234446e-04 -4.77711192e-04 5.16210197e-05 -3.12270601e-09 3.30600061e-09 5.24782727e-06 8.94099293e-05 1.55417088e-05 1.69711309e-04 1.61271837e-05 4.51182272e-05 -7.86264945e-05 -5.55416630e-05 -1.55386174e-04 2.70982459e-04 -2.60095140e-05 8.53544509e-06 -1.48593696e-05 -2.42215386e-05 -4.15713262e-05 3.33898711e-05 3.66914064e-04 4.76439811e-09 1.36407386e-04 -1.29323065e-04 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 -5.16239687e-05 3.30600061e-09 -3.12308373e-09 5.23731202e-06 -8.94156361e-05 1.06619878e-05 1.16134253e-04 4.52273325e-06 3.10923337e-05 -5.55416630e-05 -1.61514754e-05 -1.06714788e-04 1.90629525e-04 -2.03341743e-05 2.27869979e-06 -4.07054604e-06 -1.81571636e-05 -2.96070338e-05 4.07619778e-09 4.48219880e-08 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 8.41779804e-05 -5.84346084e-08 5.84379467e-08 -7.46569843e-09 -1.81761239e-05 1.81771622e-05 -1.16612681e-08 2.98285179e-05 3.24903077e-04 3.10923337e-05 8.03944933e-05 -1.55386174e-04 -1.06714788e-04 -2.76557750e-04 5.33314827e-04 -5.05735808e-05 1.52709889e-05 -2.96070338e-05 -5.44429857e-05 -7.63178656e-05 1.16703825e-04 1.28327862e-03 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.84346084e-08 -1.58883758e-03 1.67311114e-03 -1.82265156e-04 1.10257515e-08 -1.16612681e-08 -1.81951971e-05 -3.15691473e-04 -5.32840509e-05 -5.80389282e-04 -5.55416630e-05 -1.55386174e-04 2.70982459e-04 1.90629525e-04 5.33314827e-04 -9.30691807e-04 9.03419091e-05 -2.96070338e-05 5.15853161e-05 8.42294570e-05 1.44317697e-04 -1.16710492e-04 -1.28335193e-03 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.84379467e-08 1.67311114e-03 -1.58902874e-03 1.82275569e-04 -1.16612681e-08 1.10270838e-08 -1.81580887e-05 3.15711584e-04 -5.18136276e-06 -5.68893957e-05 -5.87627149e-06 -1.45601778e-05 2.60095140e-05 2.03341743e-05 5.05735808e-05 -9.03419091e-05 8.28642377e-06 -3.01654914e-06 5.38860021e-06 8.10181255e-06 1.32107990e-05 -1.31985289e-05 -1.45525993e-04 -2.12015265e-09 -5.16210197e-05 5.16239687e-05 7.46569843e-09 1.82265156e-04 -1.82275569e-04 1.93393473e-05 -1.39493296e-09 1.39501265e-09 1.89611125e-09 3.31912158e-05 1.63020078e-06 1.78989855e-05 6.22743877e-07 4.39027139e-06 -8.53544509e-06 -2.27869979e-06 -1.52709889e-05 2.96070338e-05 -3.01654914e-06 2.68921036e-07 -5.48963898e-07 -3.00432370e-06 -4.16279116e-06 7.98420174e-10 8.80332117e-09 -5.24241994e-06 3.12270601e-09 -3.30600061e-09 1.81761239e-05 -1.10257515e-08 1.16612681e-08 -1.39493296e-09 -3.71979589e-06 3.89640841e-06 -1.36215115e-10 -2.14391725e-09 -2.91210249e-06 -3.19737796e-05 -1.11243598e-06 -8.53544509e-06 1.48593696e-05 4.07054604e-06 2.96070338e-05 -5.15853161e-05 5.38860021e-06 -5.48963898e-07 9.42249365e-07 4.59715836e-06 7.90816090e-06 -7.98465787e-10 -8.80382409e-09 5.24271943e-06 -3.30600061e-09 3.12308373e-09 -1.81771622e-05 1.16612681e-08 -1.10270838e-08 1.39501265e-09 3.89640841e-06 -3.72024107e-06 -1.35962382e-10 2.14405527e-09 -4.99635463e-06 -5.48580767e-05 -5.23454912e-06 -1.57296147e-05 2.42215386e-05 1.81571636e-05 5.44429857e-05 -8.42294570e-05 8.10181255e-06 -3.00432370e-06 4.59715836e-06 6.06053698e-06 1.39377836e-05 -1.30595078e-09 -1.43993157e-08 -5.24782727e-06 -5.23731202e-06 1.81951971e-05 1.81580887e-05 1.89611125e-09 -1.36215115e-10 -1.35962382e-10 -7.61642683e-06 3.72934049e-09 -8.14704564e-06 -8.94514676e-05 -8.53544509e-06 -2.19406970e-05 4.15713262e-05 2.96070338e-05 7.63178656e-05 -1.44317697e-04 1.32107990e-05 -4.16279116e-06 7.90816090e-06 1.39377836e-05 2.02398065e-05 -2.28605226e-05 -2.52058414e-04 -3.30600061e-09 -8.94099293e-05 8.94156361e-05 1.16612681e-08 3.15691473e-04 -3.15711584e-04 3.31912158e-05 -2.14391725e-09 2.14405527e-09 3.72934049e-09 5.76652620e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 360 386 411 437 463 488 514 540 566 592 618 642 668 +-2 2 1 169 + 4.87189063e-06 5.34710795e-05 4.93427935e-06 2.36715710e-05 -1.47922351e-05 -1.71309338e-05 -8.21834531e-05 5.13559899e-05 -7.71445824e-06 4.27317685e-06 -2.67028481e-06 6.24745013e-06 -1.28103482e-05 5.34710795e-05 5.86321127e-04 5.42999976e-05 2.60497260e-04 -1.62783311e-04 -1.88273161e-04 -9.03216293e-04 5.64414916e-04 -8.53623278e-05 4.72837251e-05 -2.95473409e-05 6.91295318e-05 -1.41749571e-04 -4.93427935e-06 -5.42999976e-05 -1.46211773e-06 -2.43393491e-05 1.52095260e-05 5.39197486e-06 8.47885247e-05 -5.29838848e-05 8.82394259e-06 -1.12227292e-06 7.01302200e-07 -6.49831983e-06 1.33247546e-05 -2.36715710e-05 -2.60497260e-04 -2.43393491e-05 -1.13153541e-04 7.29657462e-05 8.47885247e-05 3.94480070e-04 -2.54183378e-04 3.65769992e-05 -2.06306400e-05 1.33247546e-05 -2.78523586e-05 6.18475882e-05 1.47922351e-05 1.62783311e-04 1.52095260e-05 7.29657462e-05 -4.19845370e-05 -5.29838848e-05 -2.54183378e-04 1.46555821e-04 -2.28567666e-05 1.33247546e-05 -7.63400033e-06 2.15572050e-05 -3.66231354e-05 1.71309338e-05 1.88273161e-04 5.39197486e-06 8.47885247e-05 -5.29838848e-05 -1.97768317e-05 -2.94811969e-04 1.84226385e-04 -3.08998677e-05 4.24368479e-06 -2.65185539e-06 2.28099046e-05 -4.67715329e-05 8.21834531e-05 9.03216293e-04 8.47885247e-05 3.94480070e-04 -2.54183378e-04 -2.94811969e-04 -1.37264655e-03 8.83802407e-04 -1.28565508e-04 7.24795372e-05 -4.67715329e-05 9.80695841e-05 -2.17282865e-04 -5.13559899e-05 -5.64414916e-04 -5.29838848e-05 -2.54183378e-04 1.46555821e-04 1.84226385e-04 8.83802407e-04 -5.10607304e-04 8.03398822e-05 -4.67715329e-05 2.68597281e-05 -7.54782518e-05 1.28856093e-04 -7.71445824e-06 -8.53623278e-05 -8.82394259e-06 -3.65769992e-05 2.28567666e-05 3.08998677e-05 1.28565508e-04 -8.03398822e-05 1.12097928e-05 -7.42554800e-06 4.64018429e-06 -9.23004629e-06 1.89261386e-05 4.27317685e-06 4.72837251e-05 1.12227292e-06 2.06306400e-05 -1.33247546e-05 -4.24368479e-06 -7.24795372e-05 4.67715329e-05 -7.42554800e-06 7.73160612e-07 -5.16739674e-07 5.07102185e-06 -1.13136018e-05 -2.67028481e-06 -2.95473409e-05 -7.01302200e-07 -1.33247546e-05 7.63400033e-06 2.65185539e-06 4.67715329e-05 -2.68597281e-05 4.64018429e-06 -5.16739674e-07 2.69145374e-07 -3.97146117e-06 6.67838603e-06 6.24745013e-06 6.91295318e-05 6.49831983e-06 2.78523586e-05 -2.15572050e-05 -2.28099046e-05 -9.80695841e-05 7.54782518e-05 -9.23004629e-06 5.07102185e-06 -3.97146117e-06 4.14901778e-06 -1.71273716e-05 -1.28103482e-05 -1.41749571e-04 -1.33247546e-05 -6.18475882e-05 3.66231354e-05 4.67715329e-05 2.17282865e-04 -1.28856093e-04 1.89261386e-05 -1.13136018e-05 6.67838603e-06 -1.71273716e-05 3.09157513e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 -2 0 169 + 2.99405489e-06 3.25663426e-05 1.53642323e-05 -8.59819172e-06 -3.07824909e-06 -5.26542705e-05 2.94665886e-05 1.05493693e-05 6.84719200e-06 -8.06102185e-06 -2.88593625e-06 1.96646925e-06 1.61503892e-06 3.25663426e-05 3.53574880e-04 1.67724141e-04 -9.38624391e-05 -3.36038061e-05 -5.73351504e-04 3.20861209e-04 1.14871912e-04 7.51562105e-05 -8.84794606e-05 -3.16766394e-05 2.15843775e-05 1.77270047e-05 -1.53642323e-05 -1.67724141e-04 -7.77865843e-05 4.46167092e-05 1.59732824e-05 2.67983048e-04 -1.53599212e-04 -5.49902410e-05 -3.36659705e-05 4.11617669e-05 1.47363743e-05 -1.03020981e-05 -8.46099651e-06 8.59819172e-06 9.38624391e-05 4.46167092e-05 -2.30289229e-05 -8.93903071e-06 -1.53599212e-04 7.94722007e-05 3.07738536e-05 2.06917860e-05 -2.17231767e-05 -8.46099651e-06 4.69633410e-06 4.35227400e-06 3.07824909e-06 3.36038061e-05 1.59732824e-05 -8.93903071e-06 -1.26061899e-06 -5.49902410e-05 3.07738536e-05 4.53179412e-06 7.40789149e-06 -8.46099651e-06 -1.11898038e-06 2.44674416e-06 6.26208172e-07 5.26542705e-05 5.73351504e-04 2.67983048e-04 -1.53599212e-04 -5.49902410e-05 -9.20007385e-04 5.26963496e-04 1.88658843e-04 1.16970864e-04 -1.42836450e-04 -5.11370515e-05 3.57202705e-05 2.93366535e-05 -2.94665886e-05 -3.20861209e-04 -1.53599212e-04 7.94722007e-05 3.07738536e-05 5.26963496e-04 -2.73270116e-04 -1.05577999e-04 -7.16766700e-05 7.55294884e-05 2.93366535e-05 -1.64005435e-05 -1.51324566e-05 -1.05493693e-05 -1.14871912e-04 -5.49902410e-05 3.07738536e-05 4.53179412e-06 1.88658843e-04 -1.05577999e-04 -1.61668526e-05 -2.56610519e-05 2.93366535e-05 4.08894742e-06 -8.44165074e-06 -2.28827274e-06 6.84719200e-06 7.51562105e-05 3.36659705e-05 -2.06917860e-05 -7.40789149e-06 -1.16970864e-04 7.16766700e-05 2.56610519e-05 1.35338886e-05 -1.85159251e-05 -6.62890888e-06 4.96541331e-06 4.07803771e-06 -8.06102185e-06 -8.84794606e-05 -4.11617669e-05 2.17231767e-05 8.46099651e-06 1.42836450e-04 -7.55294884e-05 -2.93366535e-05 -1.85159251e-05 2.00669398e-05 7.84967262e-06 -4.43220843e-06 -4.13186612e-06 -2.88593625e-06 -3.16766394e-05 -1.47363743e-05 8.46099651e-06 1.11898038e-06 5.11370515e-05 -2.93366535e-05 -4.08894742e-06 -6.62890888e-06 7.84967262e-06 9.51437810e-07 -2.34679878e-06 -5.53856970e-07 1.96646925e-06 2.15843775e-05 1.03020981e-05 -4.69633410e-06 -2.44674416e-06 -3.57202705e-05 1.64005435e-05 8.44165074e-06 4.96541331e-06 -4.43220843e-06 -2.34679878e-06 7.07897977e-07 1.10066246e-06 1.61503892e-06 1.77270047e-05 8.46099651e-06 -4.35227400e-06 -6.26208172e-07 -2.93366535e-05 1.51324566e-05 2.28827274e-06 4.07803771e-06 -4.13186612e-06 -5.53856970e-07 1.10066246e-06 2.71694436e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 -2 1 169 + 6.93241889e-05 6.92601249e-04 3.36167729e-04 -5.36566511e-05 6.71190925e-05 -1.14111868e-03 1.82137075e-04 -2.27835226e-04 1.05715176e-04 -3.02127936e-05 3.77931766e-05 -1.36171071e-06 -6.03227233e-06 6.92601249e-04 6.86139740e-03 3.30766416e-03 -5.27945326e-04 6.60406688e-04 -1.12067356e-02 1.78873773e-03 -2.23753162e-03 9.51263104e-04 -2.71865564e-04 3.40076571e-04 -1.22531618e-05 -5.42805521e-05 -3.36167729e-04 -3.30766416e-03 -1.59708271e-03 2.68776579e-04 -3.36212561e-04 5.39270070e-03 -9.08495511e-04 1.13643683e-03 -4.47662261e-04 1.38164808e-04 -1.72830327e-04 6.65888882e-06 2.94983586e-05 5.36566511e-05 5.27945326e-04 2.68776579e-04 4.39465190e-05 5.36638068e-05 -9.08495511e-04 -1.54165395e-04 -1.81389791e-04 8.80430335e-05 3.64291137e-05 2.94983586e-05 -1.06413356e-05 7.27341990e-06 -6.71190925e-05 -6.60406688e-04 -3.36212561e-04 5.36638068e-05 1.97186405e-05 1.13643683e-03 -1.81389791e-04 -7.22724013e-05 -1.10133010e-04 2.94983586e-05 2.31113360e-05 -1.06522230e-05 -3.68886358e-06 1.14111868e-03 1.12067356e-02 5.39270070e-03 -9.08495511e-04 1.13643683e-03 -1.82075979e-02 3.07081454e-03 -3.84128121e-03 1.45894989e-03 -4.52041059e-04 5.65458057e-04 -2.18548942e-05 -9.68154785e-05 -1.82137075e-04 -1.78873773e-03 -9.08495511e-04 -1.54165395e-04 -1.81389791e-04 3.07081454e-03 5.41418306e-04 6.13117404e-04 -2.89785285e-04 -1.28487876e-04 -9.68154785e-05 3.63501155e-05 -2.56538297e-05 2.27835226e-04 2.23753162e-03 1.13643683e-03 -1.81389791e-04 -7.22724013e-05 -3.84128121e-03 6.13117404e-04 2.64610997e-04 3.62492346e-04 -9.68154785e-05 -8.47780880e-05 3.67432751e-05 1.35316626e-05 1.05715176e-04 9.51263104e-04 4.47662261e-04 -8.80430335e-05 1.10133010e-04 -1.45894989e-03 2.89785285e-04 -3.62492346e-04 3.10252241e-05 -1.87515517e-05 2.34563117e-05 -1.28981632e-06 -5.71378579e-06 -3.02127936e-05 -2.71865564e-04 -1.38164808e-04 -3.64291137e-05 -2.94983586e-05 4.52041059e-04 1.28487876e-04 9.68154785e-05 -1.87515517e-05 -2.80311257e-05 -6.74209048e-06 5.98009101e-06 -5.86771422e-06 3.77931766e-05 3.40076571e-04 1.72830327e-04 -2.94983586e-05 -2.31113360e-05 -5.65458057e-04 9.68154785e-05 8.47780880e-05 2.34563117e-05 -6.74209048e-06 -2.49872390e-05 6.77023581e-06 4.12299665e-06 -1.36171071e-06 -1.22531618e-05 -6.65888882e-06 1.06413356e-05 1.06522230e-05 2.18548942e-05 -3.63501155e-05 -3.67432751e-05 -1.28981632e-06 5.98009101e-06 6.77023581e-06 -5.23772353e-08 5.66831635e-08 -6.03227233e-06 -5.42805521e-05 -2.94983586e-05 -7.27341990e-06 3.68886358e-06 9.68154785e-05 2.56538297e-05 -1.35316626e-05 -5.71378579e-06 -5.86771422e-06 4.12299665e-06 5.66831635e-08 1.85929241e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 -2 2 169 + 8.41941522e-07 8.81721179e-06 4.52646423e-06 1.08815492e-06 2.71438800e-06 -1.47485447e-05 -3.54552706e-06 -8.84427020e-06 2.07758981e-06 1.09322589e-06 2.72703746e-06 -6.86257345e-07 6.55575540e-07 8.81721179e-06 9.22160680e-05 4.75149375e-05 1.14225166e-05 2.84933161e-05 -1.54525653e-04 -3.71477252e-05 -9.26645074e-05 2.18623372e-05 1.15039421e-05 2.86964310e-05 -7.22143968e-06 6.89857711e-06 -4.52646423e-06 -4.75149375e-05 -2.41247122e-05 -5.88999828e-06 -1.46925225e-05 7.88792374e-05 1.92509959e-05 4.80213538e-05 -1.08789021e-05 -5.86708428e-06 -1.46353639e-05 3.74159018e-06 -3.57430783e-06 -1.08815492e-06 -1.14225166e-05 -5.88999828e-06 -1.03967439e-06 -3.53205943e-06 1.92509959e-05 3.42760758e-06 1.15442583e-05 -2.77698686e-06 -1.04450008e-06 -3.57430783e-06 9.92839091e-07 -6.26356103e-07 -2.71438800e-06 -2.84933161e-05 -1.46925225e-05 -3.53205943e-06 -8.43440339e-06 4.80213538e-05 1.15442583e-05 2.75966975e-05 -6.92715687e-06 -3.57430783e-06 -8.52768045e-06 2.01082012e-06 -2.05004104e-06 1.47485447e-05 1.54525653e-04 7.88792374e-05 1.92509959e-05 4.80213538e-05 -2.57208764e-04 -6.27517796e-05 -1.56533481e-04 3.57092401e-05 1.92458751e-05 4.80085801e-05 -1.22686078e-05 1.17200920e-05 3.54552706e-06 3.71477252e-05 1.92509959e-05 3.42760758e-06 1.15442583e-05 -6.27517796e-05 -1.12617980e-05 -3.76304040e-05 9.10118160e-06 3.45738451e-06 1.17200920e-05 -3.24769188e-06 2.07329221e-06 8.84427020e-06 9.26645074e-05 4.80213538e-05 1.15442583e-05 2.75966975e-05 -1.56533481e-04 -3.76304040e-05 -9.00449118e-05 2.27027767e-05 1.17200920e-05 2.79946001e-05 -6.61292516e-06 6.72985808e-06 2.07758981e-06 2.18623372e-05 1.08789021e-05 2.77698686e-06 6.92715687e-06 -3.57092401e-05 -9.10118160e-06 -2.27027767e-05 4.68820997e-06 2.72102836e-06 6.78756914e-06 -1.81359460e-06 1.73251080e-06 1.09322589e-06 1.15039421e-05 5.86708428e-06 1.04450008e-06 3.57430783e-06 -1.92458751e-05 -3.45738451e-06 -1.17200920e-05 2.72102836e-06 1.03930704e-06 3.58696009e-06 -1.01433837e-06 6.34227920e-07 2.72703746e-06 2.86964310e-05 1.46353639e-05 3.57430783e-06 8.52768045e-06 -4.80085801e-05 -1.17200920e-05 -2.79946001e-05 6.78756914e-06 3.58696009e-06 8.54897621e-06 -2.04613221e-06 2.08885206e-06 -6.86257345e-07 -7.22143968e-06 -3.74159018e-06 -9.92839091e-07 -2.01082012e-06 1.22686078e-05 3.24769188e-06 6.61292516e-06 -1.81359460e-06 -1.01433837e-06 -2.04613221e-06 4.12345725e-07 -5.50077995e-07 6.55575540e-07 6.89857711e-06 3.57430783e-06 6.26356103e-07 2.05004104e-06 -1.17200920e-05 -2.07329221e-06 -6.72985808e-06 1.73251080e-06 6.34227920e-07 2.08885206e-06 -5.50077995e-07 3.62007967e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 -1 -1 169 + 9.12807568e-05 8.91196786e-04 2.64442740e-04 -2.46652059e-04 -2.64607571e-04 -8.88867447e-04 8.29067894e-04 8.89421489e-04 3.03309659e-06 -7.60999548e-05 -8.16397976e-05 -5.35521977e-06 7.61473888e-05 8.91196786e-04 8.58207172e-03 2.53108248e-03 -2.36080108e-03 -2.53266014e-03 -8.46982650e-03 7.90000944e-03 8.47510584e-03 2.53772079e-05 -6.36710476e-04 -6.83061042e-04 -4.48058680e-05 6.37107345e-04 -2.64442740e-04 -2.53108248e-03 -6.74171276e-04 7.38400520e-04 7.92153808e-04 2.24240770e-03 -2.46661971e-03 -2.64618205e-03 4.39276203e-05 1.75104105e-04 1.87851146e-04 1.53121755e-05 -2.17728167e-04 2.46652059e-04 2.36080108e-03 7.38400520e-04 -5.71234716e-04 -7.38860774e-04 -2.46661971e-03 1.89854913e-03 2.46815719e-03 3.26197848e-05 -1.57400690e-04 -2.17728167e-04 -5.67704650e-05 1.57498800e-04 2.64607571e-04 2.53266014e-03 7.92153808e-04 -7.38860774e-04 -6.75158485e-04 -2.64618205e-03 2.46815719e-03 2.24570546e-03 3.49944049e-05 -2.17728167e-04 -1.88025041e-04 3.02597409e-05 1.75375446e-04 8.88867447e-04 8.46982650e-03 2.24240770e-03 -2.46661971e-03 -2.64618205e-03 -7.44666136e-03 8.23029398e-03 8.82943409e-03 -1.50706526e-04 -5.46964554e-04 -5.86781892e-04 -4.86223601e-05 6.91375130e-04 -8.29067894e-04 -7.90000944e-03 -2.46661971e-03 1.89854913e-03 2.46815719e-03 8.23029398e-03 -6.29931908e-03 -8.23542402e-03 -1.08812930e-04 4.90095415e-04 6.91375130e-04 1.89331138e-04 -4.90400897e-04 -8.89421489e-04 -8.47510584e-03 -2.64618205e-03 2.46815719e-03 2.24570546e-03 8.82943409e-03 -8.23542402e-03 -7.45766491e-03 -1.16734176e-04 6.91375130e-04 5.87340135e-04 -1.05808529e-04 -5.47826170e-04 3.03309659e-06 2.53772079e-05 -4.39276203e-05 -3.26197848e-05 -3.49944049e-05 1.50706526e-04 1.08812930e-04 1.16734176e-04 -2.42672827e-05 7.04413418e-06 7.55692549e-06 -1.08102400e-06 1.53713869e-05 -7.60999548e-05 -6.36710476e-04 -1.75104105e-04 1.57400690e-04 2.17728167e-04 5.46964554e-04 -4.90095415e-04 -6.91375130e-04 7.04413418e-06 -1.24251976e-05 -1.51777582e-06 1.36855994e-05 3.22014098e-06 -8.16397976e-05 -6.83061042e-04 -1.87851146e-04 2.17728167e-04 1.88025041e-04 5.86781892e-04 -6.91375130e-04 -5.87340135e-04 7.55692549e-06 -1.51777582e-06 -1.26386789e-05 -1.30737023e-05 1.50259042e-06 -5.35521977e-06 -4.48058680e-05 -1.53121755e-05 5.67704650e-05 -3.02597409e-05 4.86223601e-05 -1.89331138e-04 1.05808529e-04 -1.08102400e-06 1.36855994e-05 -1.30737023e-05 -2.30407539e-05 -7.49987690e-07 7.61473888e-05 6.37107345e-04 2.17728167e-04 -1.57498800e-04 -1.75375446e-04 -6.91375130e-04 4.90400897e-04 5.47826170e-04 1.53713869e-05 3.22014098e-06 1.50259042e-06 -7.49987690e-07 -1.24292107e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 -1 0 507 + 1.70459777e-04 1.56791653e-03 6.51843036e-04 -3.25613709e-04 -3.26214862e-04 -2.13410893e-03 1.06604671e-03 1.06801486e-03 9.04416656e-05 -1.04332897e-04 -1.04525518e-04 -9.63083198e-08 5.22134005e-05 1.58529231e-02 7.47129421e-02 4.33360959e-02 -1.15285361e-02 -1.44710323e-02 -1.04681120e-01 2.78479186e-02 3.49557072e-02 -4.98802469e-03 2.52880716e-03 3.17424953e-03 1.93617154e-04 -8.44433479e-04 1.56791653e-03 1.39684405e-02 5.79508335e-03 -2.89480516e-03 -2.90014959e-03 -1.87117436e-02 9.34703588e-03 9.36429252e-03 5.74121068e-04 -6.62302200e-04 -6.63524952e-04 -6.11362418e-07 3.31449151e-04 7.47129421e-02 1.66833644e-01 1.32675530e-01 -3.52951644e-02 -4.43037575e-02 -1.84682661e-01 4.91304228e-02 6.16702705e-02 -4.41928165e-02 2.24046828e-02 2.81231621e-02 1.71540597e-03 -7.48149740e-03 -6.51843036e-04 -5.79508335e-03 -2.34326261e-03 1.28480592e-03 1.28717795e-03 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -1.96408637e-04 3.07727515e-04 3.08295646e-04 3.29006363e-07 -1.78370270e-04 -4.33360959e-02 -1.32675530e-01 -8.99714007e-02 2.88614507e-02 3.62279290e-02 1.65064487e-01 -5.50446034e-02 -6.90939623e-02 2.21670899e-02 -1.32210668e-02 -1.65955576e-02 -1.13872361e-03 4.96637989e-03 3.25613709e-04 2.89480516e-03 1.28480592e-03 -4.13017927e-04 -6.42981152e-04 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.82448989e-04 -8.05650461e-05 -1.78370270e-04 -4.88565785e-05 4.03187791e-05 1.15285361e-02 3.52951644e-02 2.88614507e-02 1.08417141e-02 -9.63757757e-03 -5.50446034e-02 -2.72064416e-02 1.83808029e-02 -8.75776196e-03 -2.25205532e-03 4.96637989e-03 1.95457682e-03 7.52018949e-04 3.26214862e-04 2.90014959e-03 1.28717795e-03 -6.42981152e-04 -4.15389902e-04 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.82785829e-04 -1.78370270e-04 -8.12230588e-05 4.86174757e-05 4.05731748e-05 1.44710323e-02 4.43037575e-02 3.62279290e-02 -9.63757757e-03 6.42218226e-03 -6.90939623e-02 1.83808029e-02 -1.87775036e-02 -1.09930572e-02 4.96637989e-03 2.53919045e-05 -1.69295704e-03 -6.75491138e-06 2.13410893e-03 1.87117436e-02 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -2.41602476e-02 1.33539278e-02 1.33785820e-02 4.89632371e-04 -8.27524231e-04 -8.29052018e-04 -9.09370158e-07 4.93013567e-04 1.04681120e-01 1.84682661e-01 1.65064487e-01 -5.50446034e-02 -6.90939623e-02 -1.80707780e-01 6.89606206e-02 8.65618467e-02 -5.91094241e-02 3.73738984e-02 4.69130590e-02 3.33388609e-03 -1.45402666e-02 -1.06604671e-03 -9.34703588e-03 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.33539278e-02 -4.09780267e-03 -6.68297344e-03 -5.17584298e-04 1.76574575e-04 4.93013567e-04 1.58070488e-04 -8.83667499e-05 -2.78479186e-02 -4.91304228e-02 -5.50446034e-02 -2.72064416e-02 1.83808029e-02 6.89606206e-02 6.01718298e-02 -2.30277174e-02 2.64105968e-02 1.16077536e-02 -1.45402666e-02 -7.05643278e-03 -3.87612622e-03 -1.06801486e-03 -9.36429252e-03 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.33785820e-02 -6.68297344e-03 -4.12245634e-03 -5.18539870e-04 4.93013567e-04 1.78393315e-04 -1.57452132e-04 -8.91124179e-05 -3.49557072e-02 -6.16702705e-02 -6.90939623e-02 1.83808029e-02 -1.87775036e-02 8.65618467e-02 -2.30277174e-02 4.96119427e-02 3.31515293e-02 -1.45402666e-02 4.93998140e-03 6.63094784e-03 -1.31416438e-03 9.04416656e-05 5.74121068e-04 1.96408637e-04 -1.82448989e-04 -1.82785829e-04 -4.89632371e-04 5.17584298e-04 5.18539870e-04 -8.46265595e-05 7.62147618e-05 7.63554706e-05 5.58167229e-08 -3.02609464e-05 -4.98802469e-03 -4.41928165e-02 -2.21670899e-02 8.75776196e-03 1.09930572e-02 5.91094241e-02 -2.64105968e-02 -3.31515293e-02 8.80157938e-03 -3.76012261e-03 -4.71984089e-03 -2.24095588e-04 9.77360801e-04 -1.04332897e-04 -6.62302200e-04 -3.07727515e-04 8.05650461e-05 1.78370270e-04 8.27524231e-04 -1.76574575e-04 -4.93013567e-04 7.62147618e-05 -1.00416407e-04 -8.65665973e-05 9.01613453e-06 5.00780865e-05 2.52880716e-03 2.24046828e-02 1.32210668e-02 2.25205532e-03 -4.96637989e-03 -3.73738984e-02 -1.16077536e-02 1.45402666e-02 -3.76012261e-03 3.11345474e-03 2.37673575e-03 -3.45898515e-04 -1.19339749e-03 -1.04525518e-04 -6.63524952e-04 -3.08295646e-04 1.78370270e-04 8.12230588e-05 8.29052018e-04 -4.93013567e-04 -1.78393315e-04 7.63554706e-05 -8.65665973e-05 -1.00735753e-04 -9.18419723e-06 5.01369399e-05 3.17424953e-03 2.81231621e-02 1.65955576e-02 -4.96637989e-03 -2.53919045e-05 -4.69130590e-02 1.45402666e-02 -4.93998140e-03 -4.71984089e-03 2.37673575e-03 4.20336134e-03 7.73532946e-04 -1.22108219e-03 -9.63083198e-08 -6.11362418e-07 -3.29006363e-07 4.88565785e-05 -4.86174757e-05 9.09370158e-07 -1.58070488e-04 1.57452132e-04 5.58167229e-08 9.01613453e-06 -9.18419723e-06 -4.90871085e-06 3.78184949e-08 1.93617154e-04 1.71540597e-03 1.13872361e-03 -1.95457682e-03 1.69295704e-03 -3.33388609e-03 7.05643278e-03 -6.63094784e-03 -2.24095588e-04 -3.45898515e-04 7.73532946e-04 -2.48394277e-04 -4.51378209e-05 5.22134005e-05 3.31449151e-04 1.78370270e-04 -4.03187791e-05 -4.05731748e-05 -4.93013567e-04 8.83667499e-05 8.91124179e-05 -3.02609464e-05 5.00780865e-05 5.01369399e-05 3.78184949e-08 -2.54118772e-05 -8.44433479e-04 -7.48149740e-03 -4.96637989e-03 -7.52018949e-04 6.75491138e-06 1.45402666e-02 3.87612622e-03 1.31416438e-03 9.77360801e-04 -1.19339749e-03 -1.22108219e-03 -4.51378209e-05 -6.18816283e-05 1.70227538e-04 1.56599930e-03 6.51015093e-04 -3.25814943e-04 -3.25214596e-04 -2.13153159e-03 1.06677226e-03 1.06480662e-03 9.03864428e-05 -1.04469411e-04 -1.04276916e-04 9.62499139e-08 5.21876954e-05 1.56599930e-03 1.39540110e-02 5.78874775e-03 -2.89710721e-03 -2.89176899e-03 -1.86929580e-02 9.35530547e-03 9.33806736e-03 5.74270178e-04 -6.63746306e-04 -6.62523286e-04 6.11523737e-07 3.31574473e-04 -6.51015093e-04 -5.78874775e-03 -2.34057715e-03 1.28572766e-03 1.28335857e-03 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -1.96448112e-04 3.08295628e-04 3.07727561e-04 -3.28946782e-07 -1.78358336e-04 3.25814943e-04 2.89710721e-03 1.28572766e-03 -4.15018849e-04 -6.42285263e-04 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.82741080e-04 -8.12948157e-05 -1.78358336e-04 -4.85777434e-05 4.06108259e-05 3.25214596e-04 2.89176899e-03 1.28335857e-03 -6.42285263e-04 -4.12649712e-04 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.82404361e-04 -1.78358336e-04 -8.06369221e-05 4.88168847e-05 4.03565362e-05 2.13153159e-03 1.86929580e-02 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -2.41369597e-02 1.33658221e-02 1.33411942e-02 4.90141923e-04 -8.29516416e-04 -8.27987948e-04 9.09635785e-07 4.93213898e-04 -1.06677226e-03 -9.35530547e-03 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.33658221e-02 -4.11975812e-03 -6.67689653e-03 -5.18619923e-04 1.78822237e-04 4.93213898e-04 1.57344700e-04 -8.93306502e-05 -1.06480662e-03 -9.33806736e-03 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.33411942e-02 -6.67689653e-03 -4.09512968e-03 -5.17664313e-04 4.93213898e-04 1.77002966e-04 -1.57963593e-04 -8.85850601e-05 9.03864428e-05 5.74270178e-04 1.96448112e-04 -1.82741080e-04 -1.82404361e-04 -4.90141923e-04 5.18619923e-04 5.17664313e-04 -8.44672508e-05 7.61101121e-05 7.59698714e-05 -5.55509065e-08 -3.01202741e-05 -1.04469411e-04 -6.63746306e-04 -3.08295628e-04 8.12948157e-05 1.78358336e-04 8.29516416e-04 -1.78822237e-04 -4.93213898e-04 7.61101121e-05 -1.00501109e-04 -8.62860668e-05 9.20640124e-06 5.00150775e-05 -1.04276916e-04 -6.62523286e-04 -3.07727561e-04 1.78358336e-04 8.06369221e-05 8.27987948e-04 -4.93213898e-04 -1.77002966e-04 7.59698714e-05 -8.62860668e-05 -1.00182833e-04 -9.03884807e-06 4.99565381e-05 9.62499139e-08 6.11523737e-07 3.28946782e-07 4.85777434e-05 -4.88168847e-05 -9.09635785e-07 -1.57344700e-04 1.57963593e-04 -5.55509065e-08 9.20640124e-06 -9.03884807e-06 -4.93388686e-06 -3.76829102e-08 5.21876954e-05 3.31574473e-04 1.78358336e-04 -4.06108259e-05 -4.03565362e-05 -4.93213898e-04 8.93306502e-05 8.85850601e-05 -3.01202741e-05 5.00150775e-05 4.99565381e-05 -3.76829102e-08 -2.53658797e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +-1 -1 1 664 + 2.50820093e-03 1.64061116e-02 9.26607928e-03 4.53731191e-06 -4.00819514e-06 -2.59561676e-02 -1.27099310e-05 1.12277676e-05 -7.32519544e-05 -6.21273115e-08 5.48823605e-08 1.20751197e-02 6.03525482e-02 3.31029126e-02 1.32633943e-02 1.10157253e-02 -8.22132826e-02 -3.29405208e-02 -2.73582857e-02 -2.87656255e-03 -2.30954797e-03 -1.91816254e-03 -1.43529571e-04 -7.68553101e-04 1.64061116e-02 8.10260212e-02 5.00551051e-02 2.45104340e-05 -2.16521598e-05 -1.17988572e-01 -5.77753480e-05 5.10378994e-05 -1.25535498e-02 -1.06470647e-05 9.40546164e-06 -5.72525214e-10 4.60556313e-09 6.03525482e-02 1.53680068e-01 1.11761257e-01 4.47795527e-02 3.71910269e-02 -1.70668246e-01 -6.83819054e-02 -5.67936285e-02 -3.49215408e-02 -2.80379697e-02 -2.32865409e-02 -1.74245255e-03 -9.33025373e-03 -9.26607928e-03 -5.00551051e-02 -3.02967924e-02 -1.64169660e-05 1.45025082e-05 7.61311007e-02 4.17454737e-05 -3.68773424e-05 4.85780563e-03 4.20142599e-06 -3.71147842e-06 2.30298846e-10 -1.85259243e-09 -3.31029126e-02 -1.11761257e-01 -6.94931772e-02 -3.35596254e-02 -2.78724742e-02 1.34400585e-01 6.72874331e-02 5.58846300e-02 1.46976571e-02 1.39686755e-02 1.16014867e-02 9.70655567e-04 5.19753765e-03 -4.53731191e-06 -2.45104340e-05 -1.64169660e-05 3.22985843e-03 7.10142892e-09 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 2.51964791e-06 -1.66164344e-04 -1.85259243e-09 -8.13664448e-08 7.18771226e-08 -1.32633943e-02 -4.47795527e-02 -3.35596254e-02 8.18886596e-04 -1.11677066e-02 6.72874331e-02 -6.57590765e-03 2.23913796e-02 8.74722442e-03 2.13937840e-03 5.19753765e-03 -1.26132150e-03 7.11925417e-04 4.00819514e-06 2.16521598e-05 1.45025082e-05 7.10142892e-09 3.22986019e-03 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 -2.22582020e-06 -1.85259243e-09 -1.66164805e-04 -7.18781294e-08 -8.13657562e-08 -1.10157253e-02 -3.71910269e-02 -2.78724742e-02 -1.11677066e-02 4.99009124e-03 5.58846300e-02 2.23913796e-02 -1.49392207e-02 7.26488405e-03 5.19753765e-03 1.98067265e-04 1.69358697e-03 7.93599121e-05 2.59561676e-02 1.17988572e-01 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -1.70063455e-01 -9.53613771e-05 8.42408491e-05 -2.33026297e-02 -2.06046353e-05 1.82018342e-05 -1.15319380e-09 9.27663400e-09 8.22132826e-02 1.70668246e-01 1.34400585e-01 6.72874331e-02 5.58846300e-02 -1.66911225e-01 -9.39367976e-02 -7.80178844e-02 -4.49322922e-02 -4.48652220e-02 -3.72621783e-02 -3.20396726e-03 -1.71561788e-02 1.27099310e-05 5.77753480e-05 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -9.53613771e-05 2.46831012e-02 4.12501336e-08 -1.28671159e-05 1.71734103e-03 9.27663400e-09 8.40933269e-07 -7.42864136e-07 3.29405208e-02 6.83819054e-02 6.72874331e-02 -6.57590765e-03 2.23913796e-02 -9.39367976e-02 2.98993782e-02 -3.12595443e-02 -2.95907174e-02 -3.95948875e-03 -1.71561788e-02 5.40638149e-03 -1.31760734e-03 -1.12277676e-05 -5.10378994e-05 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 8.42408491e-05 4.12501336e-08 2.46831115e-02 1.13666224e-05 9.27663400e-09 1.71734334e-03 7.42869178e-07 8.40929821e-07 2.73582857e-02 5.67936285e-02 5.58846300e-02 2.23913796e-02 -1.49392207e-02 -7.80178844e-02 -3.12595443e-02 4.15750034e-02 -2.45761536e-02 -1.71561788e-02 2.44844577e-03 -6.62257576e-03 9.81022486e-04 -7.32519544e-05 -1.25535498e-02 -4.85780563e-03 -2.51964791e-06 2.22582020e-06 2.33026297e-02 1.28671159e-05 -1.13666224e-05 -3.95982519e-03 -4.38332623e-06 3.87216643e-06 -2.94276912e-10 2.36725102e-09 -2.87656255e-03 -3.49215408e-02 -1.46976571e-02 -8.74722442e-03 -7.26488405e-03 4.49322922e-02 2.95907174e-02 2.45761536e-02 3.84290610e-03 1.30233128e-03 1.08163290e-03 -2.20730228e-05 -1.18193694e-04 -6.21273115e-08 -1.06470647e-05 -4.20142599e-06 1.66164344e-04 1.85259243e-09 2.06046353e-05 -1.71734103e-03 -9.27663400e-09 -4.38332623e-06 1.20838436e-03 3.28410752e-09 6.28875997e-07 -5.55538330e-07 -2.30954797e-03 -2.80379697e-02 -1.39686755e-02 -2.13937840e-03 -5.19753765e-03 4.48652220e-02 3.95948875e-03 1.71561788e-02 1.30233128e-03 2.88233782e-03 8.18454532e-04 9.94377636e-04 9.95130233e-04 5.48823605e-08 9.40546164e-06 3.71147842e-06 1.85259243e-09 1.66164805e-04 -1.82018342e-05 -9.27663400e-09 -1.71734334e-03 3.87216643e-06 3.28410752e-09 1.20838518e-03 5.55540262e-07 6.28874675e-07 -1.91816254e-03 -2.32865409e-02 -1.16014867e-02 -5.19753765e-03 -1.98067265e-04 3.72621783e-02 1.71561788e-02 -2.44844577e-03 1.08163290e-03 8.18454532e-04 2.57664020e-03 -7.63719720e-04 1.12335131e-03 -5.72525214e-10 -2.30298846e-10 8.13664448e-08 7.18781294e-08 1.15319380e-09 -8.40933269e-07 -7.42869178e-07 -2.94276912e-10 6.28875997e-07 5.55540262e-07 -7.58997251e-05 -1.43529571e-04 -1.74245255e-03 -9.70655567e-04 1.26132150e-03 -1.69358697e-03 3.20396726e-03 -5.40638149e-03 6.62257576e-03 -2.20730228e-05 9.94377636e-04 -7.63719720e-04 1.58722078e-04 1.24501907e-05 4.60556313e-09 1.85259243e-09 -7.18771226e-08 8.13657562e-08 -9.27663400e-09 7.42864136e-07 -8.40929821e-07 2.36725102e-09 -5.55538330e-07 6.28874675e-07 -7.58997251e-05 -7.68553101e-04 -9.33025373e-03 -5.19753765e-03 -7.11925417e-04 -7.93599121e-05 1.71561788e-02 1.31760734e-03 -9.81022486e-04 -1.18193694e-04 9.95130233e-04 1.12335131e-03 1.24501907e-05 2.23063597e-04 5.20394647e-05 5.31283806e-04 2.53475787e-04 -6.09317790e-05 -5.06060310e-05 -8.68105499e-04 2.08679547e-04 1.73315859e-04 8.52675168e-05 -3.73241497e-05 -3.09990469e-05 1.39162822e-06 7.45170613e-06 2.50627515e-03 1.63954155e-02 9.25966720e-03 -4.53385554e-06 4.00514183e-06 -2.59395698e-02 1.27009168e-05 -1.12198045e-05 -7.27294924e-05 6.16798881e-08 -5.44871132e-08 5.31283806e-04 5.40035942e-03 2.55834318e-03 -6.14987346e-04 -5.10769079e-04 -8.76207104e-03 2.10627052e-03 1.74933331e-03 8.12719434e-04 -3.55751674e-04 -2.95464543e-04 1.32641754e-05 7.10252464e-05 1.63954155e-02 8.09939371e-02 5.00301775e-02 -2.44965173e-05 2.16398660e-05 -1.17947808e-01 5.77513548e-05 -5.10167042e-05 -1.25415667e-02 1.06361588e-05 -9.39582747e-06 -5.71898835e-10 4.60052435e-09 -2.53475787e-04 -2.55834318e-03 -1.21144772e-03 3.06359340e-04 2.54442436e-04 4.13451445e-03 -1.04632116e-03 -8.69007304e-04 -3.71674720e-04 1.74951794e-04 1.45303749e-04 -6.93757469e-06 -3.71484045e-05 -9.25966720e-03 -5.00301775e-02 -3.02793851e-02 1.64061508e-05 -1.44929542e-05 7.60951540e-02 -4.17220445e-05 3.68566454e-05 4.85257292e-03 -4.19640178e-06 3.70704010e-06 2.29996550e-10 -1.85016066e-09 6.09317790e-05 6.14987346e-04 3.06359340e-04 -1.06391331e-05 -6.11641470e-05 -1.04632116e-03 3.33454576e-05 2.08896328e-04 1.08600852e-04 1.51988342e-06 -3.71484045e-05 -9.44966503e-06 -3.03442267e-07 4.53385554e-06 2.44965173e-05 1.64061508e-05 3.22751825e-03 7.09625512e-09 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 -2.51640210e-06 -1.65565609e-04 -1.85016066e-09 8.10676010e-08 -7.16131295e-08 5.06060310e-05 5.10769079e-04 2.54442436e-04 -6.11641470e-05 1.22060385e-05 -8.69007304e-04 2.08896328e-04 -4.46785596e-05 9.01969085e-05 -3.71484045e-05 1.53950328e-05 1.06184373e-05 -3.70073508e-06 -4.00514183e-06 -2.16398660e-05 -1.44929542e-05 7.09625512e-09 3.22752002e-03 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 2.22295290e-06 -1.85016066e-09 -1.65566069e-04 7.16141349e-08 8.10669134e-08 8.68105499e-04 8.76207104e-03 4.13451445e-03 -1.04632116e-03 -8.69007304e-04 -1.41224892e-02 3.57662764e-03 2.97051772e-03 1.24474918e-03 -5.87312265e-04 -4.87783930e-04 2.33332277e-05 1.24941672e-04 2.59395698e-02 1.17947808e-01 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -1.70014403e-01 9.53240449e-05 -8.42078704e-05 -2.32819729e-02 2.05842404e-05 -1.81838176e-05 -1.15193620e-09 9.26651742e-09 -2.08679547e-04 -2.10627052e-03 -1.04632116e-03 3.33454576e-05 2.08896328e-04 3.57662764e-03 -1.03510146e-04 -7.14067925e-04 -3.65896624e-04 -9.70942563e-06 1.24941672e-04 3.28873613e-05 1.93847113e-06 -1.27009168e-05 -5.77513548e-05 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 9.53240449e-05 2.46695060e-02 4.12311060e-08 1.28536127e-05 1.71440441e-03 9.26651742e-09 -8.39436678e-07 7.41542074e-07 -1.73315859e-04 -1.74933331e-03 -8.69007304e-04 2.08896328e-04 -4.46785596e-05 2.97051772e-03 -7.14067925e-04 1.63198458e-04 -3.03890288e-04 1.24941672e-04 -5.63758810e-05 -3.66310171e-05 1.35519166e-05 1.12198045e-05 5.10167042e-05 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -8.42078704e-05 4.12311060e-08 2.46695162e-02 -1.13546939e-05 9.26651742e-09 1.71440671e-03 -7.41547110e-07 -8.39433234e-07 8.52675168e-05 8.12719434e-04 3.71674720e-04 -1.08600852e-04 -9.01969085e-05 -1.24474918e-03 3.65896624e-04 3.03890288e-04 5.62305240e-05 -3.80876720e-05 -3.16331796e-05 1.90122359e-06 1.01804198e-05 -7.27294924e-05 -1.25415667e-02 -4.85257292e-03 2.51640210e-06 -2.22295290e-06 2.32819729e-02 -1.28536127e-05 1.13546939e-05 -3.95858081e-03 4.38119900e-06 -3.87028728e-06 -2.94092631e-10 2.36576860e-09 -3.73241497e-05 -3.55751674e-04 -1.74951794e-04 -1.51988342e-06 3.71484045e-05 5.87312265e-04 9.70942563e-06 -1.24941672e-04 -3.80876720e-05 -1.25040988e-05 1.39231378e-05 6.75835118e-06 2.48316896e-06 6.16798881e-08 1.06361588e-05 4.19640178e-06 1.65565609e-04 1.85016066e-09 -2.05842404e-05 -1.71440441e-03 -9.26651742e-09 4.38119900e-06 1.20748131e-03 3.28228457e-09 -6.28346033e-07 5.55070168e-07 -3.09990469e-05 -2.95464543e-04 -1.45303749e-04 3.71484045e-05 -1.53950328e-05 4.87783930e-04 -1.24941672e-04 5.63758810e-05 -3.16331796e-05 1.39231378e-05 -1.77044733e-05 -6.76221606e-06 4.37347927e-06 -5.44871132e-08 -9.39582747e-06 -3.70704010e-06 1.85016066e-09 1.65566069e-04 1.81838176e-05 -9.26651742e-09 -1.71440671e-03 -3.87028728e-06 3.28228457e-09 1.20748213e-03 -5.55072100e-07 -6.28344712e-07 1.39162822e-06 1.32641754e-05 6.93757469e-06 9.44966503e-06 -1.06184373e-05 -2.33332277e-05 -3.28873613e-05 3.66310171e-05 1.90122359e-06 6.75835118e-06 -6.76221606e-06 -1.27594424e-06 1.38120738e-07 -5.71898835e-10 -2.29996550e-10 -8.10676010e-08 -7.16141349e-08 1.15193620e-09 8.39436678e-07 7.41547110e-07 -2.94092631e-10 -6.28346033e-07 -5.55072100e-07 -7.58100897e-05 7.45170613e-06 7.10252464e-05 3.71484045e-05 3.03442267e-07 3.70073508e-06 -1.24941672e-04 -1.93847113e-06 -1.35519166e-05 1.01804198e-05 2.48316896e-06 4.37347927e-06 1.38120738e-07 -5.62148092e-07 4.60052435e-09 1.85016066e-09 7.16131295e-08 -8.10669134e-08 -9.26651742e-09 -7.41542074e-07 8.39433234e-07 2.36576860e-09 5.55070168e-07 -6.28344712e-07 -7.58100897e-05 + 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 25 + 0 24 50 76 102 128 154 180 206 232 258 284 308 332 356 382 408 434 460 486 512 538 564 590 616 640 664 +-1 -1 2 676 + 1.70355257e-04 1.56705372e-03 6.51449965e-04 3.26055349e-04 3.25454559e-04 -2.13288205e-03 -1.06752266e-03 -1.06555564e-03 9.04054609e-05 1.04503554e-04 1.04310995e-04 9.62880926e-08 5.22083963e-05 3.89399522e-05 4.05267955e-04 1.14262710e-04 1.21960499e-04 1.14202126e-04 -3.94339687e-04 -4.20906044e-04 -3.94130603e-04 -1.80568929e-06 4.83044511e-05 4.52316205e-05 3.17552305e-06 4.82788395e-05 1.56705372e-03 1.39619473e-02 5.79205032e-03 2.89896245e-03 2.89362082e-03 -1.87027028e-02 -9.36083599e-03 -9.34358769e-03 5.74116144e-04 6.63645499e-04 6.62422665e-04 6.11473553e-07 3.31547263e-04 4.05267955e-04 4.21141460e-03 1.17930151e-03 1.25875013e-03 1.17867623e-03 -4.07507107e-03 -4.34960542e-03 -4.07291041e-03 -1.79889691e-05 4.81227464e-04 4.50614747e-04 3.16357782e-05 4.80972311e-04 -6.51449965e-04 -5.79205032e-03 -2.34189260e-03 -1.28656563e-03 -1.28419500e-03 7.54453669e-03 4.15999622e-03 4.15233100e-03 -1.96381450e-04 -3.08292601e-04 -3.07724540e-04 -3.28989932e-07 -1.78381732e-04 -1.14262710e-04 -1.17930151e-03 -3.00445076e-04 -3.68995448e-04 -3.45522239e-04 1.03377483e-03 1.27132797e-03 1.19045394e-03 2.97262733e-05 -1.23982383e-04 -1.16095390e-04 -9.62440807e-06 -1.46324006e-04 -3.26055349e-04 -2.89896245e-03 -1.28656563e-03 -4.15303763e-04 -6.42748746e-04 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.82757759e-04 -8.12752461e-05 -1.78381732e-04 4.86026399e-05 -4.06038848e-05 -1.21960499e-04 -1.25875013e-03 -3.68995448e-04 -3.48593923e-04 -3.68799802e-04 1.27132797e-03 1.19966570e-03 1.27065389e-03 -7.10236446e-06 -1.35260384e-04 -1.46324006e-04 1.21464494e-05 -1.35188667e-04 -3.25454559e-04 -2.89362082e-03 -1.28419500e-03 -6.42748746e-04 -4.12932916e-04 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.82421010e-04 -1.78381732e-04 -8.06172662e-05 -4.88418014e-05 -4.03495161e-05 -1.14202126e-04 -1.17867623e-03 -3.45522239e-04 -3.68799802e-04 -3.00078579e-04 1.19045394e-03 1.27065389e-03 1.03251211e-03 -6.65055594e-06 -1.46324006e-04 -1.16011568e-04 -3.06123775e-05 -1.23827176e-04 2.13288205e-03 1.87027028e-02 7.54453669e-03 4.15999622e-03 4.15233100e-03 -2.41480897e-02 -1.33732595e-02 -1.33486179e-02 4.89739125e-04 8.29251221e-04 8.27723241e-04 9.09518461e-07 4.93150284e-04 3.94339687e-04 4.07507107e-03 1.03377483e-03 1.27132797e-03 1.19045394e-03 -3.56229745e-03 -4.38640656e-03 -4.10737049e-03 -1.03256208e-04 4.23073331e-04 3.96160021e-04 3.29488681e-05 5.00935780e-04 1.06752266e-03 9.36083599e-03 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.33732595e-02 -4.12208254e-03 -6.68107836e-03 5.18554836e-04 1.78642802e-04 4.93150284e-04 -1.57413656e-04 8.92472444e-05 4.20906044e-04 4.34960542e-03 1.27132797e-03 1.19966570e-03 1.27065389e-03 -4.38640656e-03 -4.13466337e-03 -4.38408083e-03 2.51095004e-05 4.61770109e-04 5.00935780e-04 -4.29595849e-05 4.61525273e-04 1.06555564e-03 9.34358769e-03 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.33486179e-02 -6.68107836e-03 -4.09743867e-03 5.17599346e-04 4.93150284e-04 1.76823765e-04 1.58032368e-04 8.85015542e-05 3.94130603e-04 4.07291041e-03 1.19045394e-03 1.27065389e-03 1.03251211e-03 -4.10737049e-03 -4.38408083e-03 -3.55794074e-03 2.35121892e-05 5.00935780e-04 3.95872373e-04 1.06089558e-04 4.22541986e-04 9.04054609e-05 5.74116144e-04 1.96381450e-04 1.82757759e-04 1.82421010e-04 -4.89739125e-04 -5.18554836e-04 -5.17599346e-04 -8.45382922e-05 -7.62385145e-05 -7.60980373e-05 -5.56923571e-08 -3.01969701e-05 -1.80568929e-06 -1.79889691e-05 -2.97262733e-05 7.10236446e-06 6.65055594e-06 1.03256208e-04 -2.51095004e-05 -2.35121892e-05 -1.75595779e-05 -7.56132592e-06 -7.08032110e-06 6.25635393e-07 9.51180333e-06 1.04503554e-04 6.63645499e-04 3.08292601e-04 8.12752461e-05 1.78381732e-04 -8.29251221e-04 -1.78642802e-04 -4.93150284e-04 -7.62385145e-05 -1.00634733e-04 -8.64460597e-05 -9.19448866e-06 -5.00888212e-05 4.83044511e-05 4.81227464e-04 1.23982383e-04 1.35260384e-04 1.46324006e-04 -4.23073331e-04 -4.61770109e-04 -5.00935780e-04 -7.56132592e-06 3.14969832e-05 3.69526627e-05 -6.57392841e-06 4.07280590e-05 1.04310995e-04 6.62422665e-04 3.07724540e-04 1.78381732e-04 8.06172662e-05 -8.27723241e-04 -4.93150284e-04 -1.76823765e-04 -7.60980373e-05 -8.64460597e-05 -1.00315868e-04 9.02664158e-06 -5.00301015e-05 4.52316205e-05 4.50614747e-04 1.16095390e-04 1.46324006e-04 1.16011568e-04 -3.96160021e-04 -5.00935780e-04 -3.95872373e-04 -7.08032110e-06 3.69526627e-05 2.66358874e-05 1.23099665e-05 3.69226169e-05 9.62880926e-08 6.11473553e-07 3.28989932e-07 -4.86026399e-05 4.88418014e-05 -9.09518461e-07 1.57413656e-04 -1.58032368e-04 -5.56923571e-08 -9.19448866e-06 9.02664158e-06 -4.92119020e-06 -3.77645891e-08 3.17552305e-06 3.16357782e-05 9.62440807e-06 -1.21464494e-05 3.06123775e-05 -3.29488681e-05 4.29595849e-05 -1.06089558e-04 6.25635393e-07 -6.57392841e-06 1.23099665e-05 -1.82646062e-05 3.28441827e-06 5.22083963e-05 3.31547263e-04 1.78381732e-04 4.06038848e-05 4.03495161e-05 -4.93150284e-04 -8.92472444e-05 -8.85015542e-05 -3.01969701e-05 -5.00888212e-05 -5.00301015e-05 -3.77645891e-08 -2.53974700e-05 4.82788395e-05 4.80972311e-04 1.46324006e-04 1.35188667e-04 1.23827176e-04 -5.00935780e-04 -4.61525273e-04 -4.22541986e-04 9.51180333e-06 4.07280590e-05 3.69226169e-05 3.28441827e-06 3.14537827e-05 6.90889430e-05 6.90437988e-04 3.35063394e-04 5.34773979e-05 6.71267497e-05 -1.13749907e-03 -1.81549199e-04 -2.27887072e-04 1.05470630e-04 3.01454198e-05 3.78396131e-05 -1.38474039e-06 6.03934684e-06 1.70331981e-04 1.56686156e-03 6.51407910e-04 3.25373633e-04 3.25974342e-04 -2.13275773e-03 -1.06529736e-03 -1.06726413e-03 9.04226467e-05 1.04298820e-04 1.04491378e-04 -9.62701417e-08 5.21927023e-05 6.90437988e-04 6.84220743e-03 3.29785860e-03 5.26350834e-04 6.60694463e-04 -1.11750831e-02 -1.78358597e-03 -2.23882114e-03 9.49803118e-04 2.71470965e-04 3.40760101e-04 -1.24701136e-05 5.43866142e-05 1.56686156e-03 1.39605011e-02 5.79177921e-03 2.89295265e-03 2.89829366e-03 -1.87019949e-02 -9.34151388e-03 -9.35876032e-03 5.74275380e-04 6.62403131e-04 6.63626069e-04 -6.11412895e-07 3.31476517e-04 -3.35063394e-04 -3.29785860e-03 -1.59204853e-03 -2.67905961e-04 -3.36285180e-04 5.37644677e-03 9.05674360e-04 1.13683497e-03 -4.46836930e-04 -1.37911731e-04 -1.73111756e-04 6.77369774e-06 -2.95425123e-05 -6.51407910e-04 -5.79177921e-03 -2.34194643e-03 -1.28396912e-03 -1.28633960e-03 7.54477708e-03 4.15163378e-03 4.15929858e-03 -1.96475381e-04 -3.07730625e-04 -3.08298762e-04 3.28963293e-07 -1.78346920e-04 -5.34773979e-05 -5.26350834e-04 -2.67905961e-04 4.37612473e-05 -5.36723997e-05 9.05674360e-04 -1.53519668e-04 1.81443205e-04 -8.78576495e-05 3.62990867e-05 -2.95425123e-05 1.06309250e-05 7.27217521e-06 -3.25373633e-04 -2.89295265e-03 -1.28396912e-03 -4.12734671e-04 -6.42517511e-04 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.82432375e-04 -8.05847531e-05 -1.78346920e-04 4.88316606e-05 -4.03258258e-05 -6.71267497e-05 -6.60694463e-04 -3.36285180e-04 -5.36723997e-05 1.91485394e-05 1.13683497e-03 1.81443205e-04 -7.03147319e-05 -1.10282076e-04 -2.95425123e-05 2.27516912e-05 -1.06302274e-05 3.63125685e-06 -3.25974342e-04 -2.89829366e-03 -1.28633960e-03 -6.42517511e-04 -4.15104936e-04 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.82769185e-04 -1.78346920e-04 -8.12426797e-05 -4.85925779e-05 -4.05801425e-05 1.13749907e-03 1.11750831e-02 5.37644677e-03 9.05674360e-04 1.13683497e-03 -1.81554630e-02 -3.06172641e-03 -3.84318891e-03 1.45682118e-03 4.51376387e-04 5.66583845e-04 -2.22393263e-05 9.69936354e-05 2.13275773e-03 1.87019949e-02 7.54477708e-03 4.15163378e-03 4.15929858e-03 -2.41491129e-02 -1.33465016e-02 -1.33711421e-02 4.90035601e-04 8.27789418e-04 8.29317695e-04 -9.09487945e-07 4.93077425e-04 1.81549199e-04 1.78358597e-03 9.05674360e-04 -1.53519668e-04 1.81443205e-04 -3.06172641e-03 5.39163955e-04 -6.13387635e-04 2.89269489e-04 -1.28035035e-04 9.69936354e-05 -3.63171474e-05 -2.56505959e-05 1.06529736e-03 9.34151388e-03 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.33465016e-02 -4.09549370e-03 -6.67879068e-03 5.17649483e-04 1.76754004e-04 4.93077425e-04 -1.58001725e-04 8.84503696e-05 2.27887072e-04 2.23882114e-03 1.13683497e-03 1.81443205e-04 -7.03147319e-05 -3.84318891e-03 -6.13387635e-04 2.57881009e-04 3.63101447e-04 9.69936354e-05 -8.35563820e-05 3.66757142e-05 -1.33359178e-05 1.06726413e-03 9.35876032e-03 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.33711421e-02 -6.67879068e-03 -4.12013194e-03 5.18605175e-04 4.93077425e-04 1.78572980e-04 1.57383187e-04 8.91959377e-05 1.05470630e-04 9.49803118e-04 4.46836930e-04 8.78576495e-05 1.10282076e-04 -1.45682118e-03 -2.89269489e-04 -3.63101447e-04 3.14796982e-05 1.88733263e-05 2.36904767e-05 -1.31956894e-06 5.75511089e-06 9.04226467e-05 5.74275380e-04 1.96475381e-04 1.82432375e-04 1.82769185e-04 -4.90035601e-04 -5.17649483e-04 -5.18605175e-04 -8.45554756e-05 -7.60865049e-05 -7.62269769e-05 5.56751504e-08 -3.01841932e-05 3.01454198e-05 2.71470965e-04 1.37911731e-04 -3.62990867e-05 2.95425123e-05 -4.51376387e-04 1.28035035e-04 -9.69936354e-05 1.88733263e-05 -2.79585300e-05 6.80982390e-06 -5.97973485e-06 -5.87203907e-06 1.04298820e-04 6.62403131e-04 3.07730625e-04 8.05847531e-05 1.78346920e-04 -8.27789418e-04 -1.76754004e-04 -4.93077425e-04 -7.60865049e-05 -1.00283317e-04 -8.64065121e-05 -9.02835932e-06 -5.00044961e-05 3.78396131e-05 3.40760101e-04 1.73111756e-04 2.95425123e-05 -2.27516912e-05 -5.66583845e-04 -9.69936354e-05 8.35563820e-05 2.36904767e-05 6.80982390e-06 -2.48357293e-05 6.77564943e-06 -4.09621064e-06 1.04491378e-04 6.63626069e-04 3.08298762e-04 1.78346920e-04 8.12426797e-05 -8.29317695e-04 -4.93077425e-04 -1.78572980e-04 -7.62269769e-05 -8.64065121e-05 -1.00602073e-04 9.19612793e-06 -5.00631691e-05 -1.38474039e-06 -1.24701136e-05 -6.77369774e-06 -1.06309250e-05 1.06302274e-05 2.22393263e-05 3.63171474e-05 -3.66757142e-05 -1.31956894e-06 -5.97973485e-06 6.77564943e-06 -6.54580906e-08 -5.82816034e-08 -9.62701417e-08 -6.11412895e-07 -3.28963293e-07 -4.88316606e-05 4.85925779e-05 9.09487945e-07 1.58001725e-04 -1.57383187e-04 5.56751504e-08 -9.02835932e-06 9.19612793e-06 -4.92142382e-06 3.77367705e-08 6.03934684e-06 5.43866142e-05 2.95425123e-05 -7.27217521e-06 -3.63125685e-06 -9.69936354e-05 2.56505959e-05 1.33359178e-05 5.75511089e-06 -5.87203907e-06 -4.09621064e-06 -5.82816034e-08 1.75365591e-07 5.21927023e-05 3.31476517e-04 1.78346920e-04 4.03258258e-05 4.05801425e-05 -4.93077425e-04 -8.84503696e-05 -8.91959377e-05 -3.01841932e-05 -5.00044961e-05 -5.00631691e-05 3.77367705e-08 -2.53802836e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 -2 169 + 2.96547790e-06 3.22477472e-05 3.04411892e-06 -8.51876033e-06 -1.52279880e-05 -1.04290570e-05 2.91850086e-05 5.21706146e-05 -5.08702863e-06 -1.59822079e-06 -2.85695172e-06 -4.90959250e-06 7.99498562e-06 3.22477472e-05 3.50028550e-04 3.32234720e-05 -9.29736329e-05 -1.66198052e-04 -1.13533863e-04 3.17716815e-04 5.67945062e-04 -5.58224670e-05 -1.75380627e-05 -3.13507364e-05 -5.38753731e-05 8.77329093e-05 -3.04411892e-06 -3.32234720e-05 -1.24374573e-06 8.84207732e-06 1.58059439e-05 4.47033294e-06 -3.04306751e-05 -5.43973464e-05 5.76648959e-06 6.18360979e-07 1.10537135e-06 5.14466815e-06 -8.37779264e-06 8.51876033e-06 9.29736329e-05 8.84207732e-06 -2.28280454e-05 -4.42318618e-05 -3.04306751e-05 7.87543261e-05 1.52227284e-04 -1.43074191e-05 -4.30916895e-06 -8.37779264e-06 -1.54533889e-05 2.15563107e-05 1.52279880e-05 1.66198052e-04 1.58059439e-05 -4.42318618e-05 -7.71521999e-05 -5.43973464e-05 1.52227284e-04 2.65714996e-04 -2.55756940e-05 -8.37779264e-06 -1.45985053e-05 -2.38474621e-05 4.08529268e-05 1.04290570e-05 1.13533863e-04 4.47033294e-06 -3.04306751e-05 -5.43973464e-05 -1.59437137e-05 1.04366396e-04 1.86563558e-04 -1.99396745e-05 -2.25914750e-06 -4.03841285e-06 -1.78321445e-05 2.90386094e-05 -2.91850086e-05 -3.17716815e-04 -3.04306751e-05 7.87543261e-05 1.52227284e-04 1.04366396e-04 -2.70711400e-04 -5.22085463e-04 4.96583995e-05 1.49775745e-05 2.90386094e-05 5.34478014e-05 -7.49242492e-05 -5.21706146e-05 -5.67945062e-04 -5.43973464e-05 1.52227284e-04 2.65714996e-04 1.86563558e-04 -5.22085463e-04 -9.11920026e-04 8.87684926e-05 2.90386094e-05 5.06418634e-05 8.28657029e-05 -1.41717820e-04 -5.08702863e-06 -5.58224670e-05 -5.76648959e-06 1.43074191e-05 2.55756940e-05 1.99396745e-05 -4.96583995e-05 -8.87684926e-05 8.16991466e-06 2.96568840e-06 5.30141309e-06 7.99369185e-06 -1.30172619e-05 -1.59822079e-06 -1.75380627e-05 -6.18360979e-07 4.30916895e-06 8.37779264e-06 2.25914750e-06 -1.49775745e-05 -2.90386094e-05 2.96568840e-06 2.68701073e-07 5.47682207e-07 2.95517133e-06 -4.09541424e-06 -2.85695172e-06 -3.13507364e-05 -1.10537135e-06 8.37779264e-06 1.45985053e-05 4.03841285e-06 -2.90386094e-05 -5.06418634e-05 5.30141309e-06 5.47682207e-07 9.41346799e-07 4.53230430e-06 -7.78164390e-06 -4.90959250e-06 -5.38753731e-05 -5.14466815e-06 1.54533889e-05 2.38474621e-05 1.78321445e-05 -5.34478014e-05 -8.28657029e-05 7.99369185e-06 2.95517133e-06 4.53230430e-06 6.00666499e-06 -1.37331901e-05 7.99498562e-06 8.77329093e-05 8.37779264e-06 -2.15563107e-05 -4.08529268e-05 -2.90386094e-05 7.49242492e-05 1.41717820e-04 -1.30172619e-05 -4.09541424e-06 -7.78164390e-06 -1.37331901e-05 1.99370339e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 0 -1 507 + 1.70032339e-04 1.56438760e-03 3.25106414e-04 -3.24810715e-04 -6.50539500e-04 -1.06450843e-03 1.06354021e-03 2.13008649e-03 -4.51901689e-05 -5.20954131e-05 -1.04338073e-04 -7.83664780e-05 1.04243172e-04 1.58127633e-02 7.45667574e-02 1.44078638e-02 -1.14996775e-02 -4.32545601e-02 -3.48128113e-02 2.77859445e-02 1.04513262e-01 2.32128546e-03 8.38970501e-04 3.15567979e-03 4.40209780e-03 -2.51871481e-03 1.56438760e-03 1.39418779e-02 2.89123777e-03 -2.88860806e-03 -5.78538070e-03 -9.33705417e-03 9.32856169e-03 1.86834904e-02 -2.87325728e-04 -3.31230284e-04 -6.63396783e-04 -4.98265571e-04 6.62793393e-04 7.45667574e-02 1.66710696e-01 4.41520937e-02 -3.52401194e-02 -1.32551183e-01 -6.15120390e-02 4.90960091e-02 1.84668333e-01 2.06303447e-02 7.45632149e-03 2.80459957e-02 3.91234929e-02 -2.23849913e-02 -3.25106414e-04 -2.89123777e-03 -4.13236729e-04 6.40831182e-04 1.28347366e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 1.33416548e-04 4.04298092e-05 8.09738924e-05 1.33939886e-04 -1.78166979e-04 -1.44078638e-02 -4.41520937e-02 6.45127437e-03 9.59643988e-03 3.60957761e-02 -1.88218583e-02 -1.83112117e-02 -6.88752710e-02 -6.93669481e-03 -1.23281650e-06 -4.63708093e-06 -8.64032130e-03 4.94366692e-03 3.24810715e-04 2.88860806e-03 6.40831182e-04 -4.12070467e-04 -1.28230628e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 -4.91020348e-05 -4.03045720e-05 -1.78166979e-04 -1.82427008e-04 8.06496427e-05 1.14996775e-02 3.52401194e-02 9.59643988e-03 1.08151595e-02 -2.88099465e-02 -1.83112117e-02 -2.71486988e-02 5.49729937e-02 2.68649412e-03 -7.47279938e-04 4.94366692e-03 8.54177339e-03 2.24344604e-03 6.50539500e-04 5.78538070e-03 1.28347366e-03 -1.28230628e-03 -2.34005912e-03 -4.15045840e-03 4.14668337e-03 7.53952843e-03 -9.83428554e-05 -1.78166979e-04 -3.08184344e-04 -1.70659072e-04 3.07904036e-04 4.32545601e-02 1.32551183e-01 3.60957761e-02 -2.88099465e-02 -8.98903285e-02 -6.88752710e-02 5.49729937e-02 1.65010011e-01 1.01049026e-02 4.94366692e-03 1.65333627e-02 1.97502878e-02 -1.31961505e-02 1.06450843e-03 9.33705417e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -4.10220340e-03 6.66275086e-03 1.33443338e-02 -3.95566341e-04 -8.89305745e-05 -1.78112509e-04 -3.70530844e-04 4.92880524e-04 3.48128113e-02 6.15120390e-02 -1.88218583e-02 -1.83112117e-02 -6.88752710e-02 4.96384119e-02 2.29637147e-02 8.63750636e-02 2.22556282e-02 -1.32418474e-03 -4.98075082e-03 2.53288026e-02 -1.44921883e-02 -1.06354021e-03 -9.32856169e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 6.66275086e-03 -4.09007772e-03 -1.33321966e-02 1.22606118e-04 8.85632582e-05 4.92880524e-04 5.27579766e-04 -1.77215506e-04 -2.77859445e-02 -4.90960091e-02 -1.83112117e-02 -2.71486988e-02 5.49729937e-02 2.29637147e-02 6.00809317e-02 -6.89405030e-02 -7.10875952e-03 3.85421475e-03 -1.44921883e-02 -2.63677115e-02 -1.15709286e-02 -2.13008649e-03 -1.86834904e-02 -4.15045840e-03 4.14668337e-03 7.53952843e-03 1.33443338e-02 -1.33321966e-02 -2.41354632e-02 2.45558779e-04 4.92880524e-04 8.29624947e-04 4.26217284e-04 -8.28870365e-04 -1.04513262e-01 -1.84668333e-01 -6.88752710e-02 5.49729937e-02 1.65010011e-01 8.63750636e-02 -6.89405030e-02 -1.80901362e-01 -2.67386859e-02 -1.44921883e-02 -4.68033905e-02 -5.29029404e-02 3.73562594e-02 -4.51901689e-05 -2.87325728e-04 -1.33416548e-04 4.91020348e-05 9.83428554e-05 3.95566341e-04 -1.22606118e-04 -2.45558779e-04 -2.48111523e-05 -1.49885919e-05 -3.00195488e-05 -3.44406887e-05 4.58130407e-05 2.32128546e-03 2.06303447e-02 6.93669481e-03 -2.68649412e-03 -1.01049026e-02 -2.22556282e-02 7.10875952e-03 2.67386859e-02 1.81633721e-03 4.43500407e-04 1.66816982e-03 3.79257313e-03 -2.16996772e-03 -5.20954131e-05 -3.31230284e-04 -4.04298092e-05 4.03045720e-05 1.78166979e-04 8.89305745e-05 -8.85632582e-05 -4.92880524e-04 -1.49885919e-05 -2.52596577e-05 -4.98257614e-05 -2.59979782e-05 4.97970660e-05 8.38970501e-04 7.45632149e-03 1.23281650e-06 7.47279938e-04 -4.94366692e-03 1.32418474e-03 -3.85421475e-03 1.44921883e-02 4.43500407e-04 -6.29261174e-05 1.21360112e-03 8.56358105e-04 -1.18878603e-03 -1.04338073e-04 -6.63396783e-04 -8.09738924e-05 1.78166979e-04 3.08184344e-04 1.78112509e-04 -4.92880524e-04 -8.29624947e-04 -3.00195488e-05 -4.98257614e-05 -1.00174289e-04 -7.03543520e-05 8.59889057e-05 3.15567979e-03 2.80459957e-02 4.63708093e-06 -4.94366692e-03 -1.65333627e-02 4.98075082e-03 1.44921883e-02 4.68033905e-02 1.66816982e-03 1.21360112e-03 4.17923006e-03 4.43417157e-03 -2.35128023e-03 -7.83664780e-05 -4.98265571e-04 -1.33939886e-04 1.82427008e-04 1.70659072e-04 3.70530844e-04 -5.27579766e-04 -4.26217284e-04 -3.44406887e-05 -2.59979782e-05 -7.03543520e-05 -6.46428973e-05 6.11562205e-05 4.40209780e-03 3.91234929e-02 8.64032130e-03 -8.54177339e-03 -1.97502878e-02 -2.53288026e-02 2.63677115e-02 5.29029404e-02 3.79257313e-03 8.56358105e-04 4.43417157e-03 6.70148223e-03 -3.05503084e-03 1.04243172e-04 6.62793393e-04 1.78166979e-04 -8.06496427e-05 -3.07904036e-04 -4.92880524e-04 1.77215506e-04 8.28870365e-04 4.58130407e-05 4.97970660e-05 8.59889057e-05 6.11562205e-05 -1.00017797e-04 -2.51871481e-03 -2.23849913e-02 -4.94366692e-03 -2.24344604e-03 1.31961505e-02 1.44921883e-02 1.15709286e-02 -3.73562594e-02 -2.16996772e-03 -1.18878603e-03 -2.35128023e-03 -3.05503084e-03 3.11000888e-03 1.70655454e-04 1.56953167e-03 3.26323630e-04 -3.26620395e-04 -6.52319411e-04 -1.06831472e-03 1.06928627e-03 2.13555614e-03 -4.52239229e-05 -5.23059013e-05 -1.04464250e-04 -7.82350394e-05 1.04559252e-04 1.56953167e-03 1.39805932e-02 2.90068412e-03 -2.90332205e-03 -5.79845399e-03 -9.36531333e-03 9.37383033e-03 1.87212176e-02 -2.86869568e-04 -3.31792785e-04 -6.62649600e-04 -4.96269464e-04 6.63252226e-04 -3.26323630e-04 -2.90068412e-03 -4.14801776e-04 6.44440531e-04 1.28706313e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 1.33559419e-04 4.04998597e-05 8.08854715e-05 1.33606340e-04 -1.78561667e-04 3.26620395e-04 2.90332205e-03 6.44440531e-04 -4.15973377e-04 -1.28823361e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 -4.91120363e-05 -4.06254571e-05 -1.78561667e-04 -1.82553690e-04 8.12100987e-05 6.52319411e-04 5.79845399e-03 1.28706313e-03 -1.28823361e-03 -2.34377996e-03 -4.16117676e-03 4.16496101e-03 7.54978362e-03 -9.80855301e-05 -1.78561667e-04 -3.07838138e-04 -1.69564494e-04 3.08118091e-04 1.06831472e-03 9.36531333e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -4.11536825e-03 6.69716546e-03 1.33754386e-02 -3.95693963e-04 -8.87661346e-05 -1.77281864e-04 -3.69139191e-04 4.93345668e-04 -1.06928627e-03 -9.37383033e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 6.69716546e-03 -4.12754378e-03 -1.33876024e-02 1.22336657e-04 8.91341618e-05 4.93345668e-04 5.27505568e-04 -1.78178773e-04 -2.13555614e-03 -1.87212176e-02 -4.16117676e-03 4.16496101e-03 7.54978362e-03 1.33754386e-02 -1.33876024e-02 -2.41617270e-02 2.44328210e-04 4.93345668e-04 8.27412544e-04 4.22291964e-04 -8.28165009e-04 -4.52239229e-05 -2.86869568e-04 -1.33559419e-04 4.91120363e-05 9.80855301e-05 3.95693963e-04 -1.22336657e-04 -2.44328210e-04 -2.48440244e-05 -1.52024209e-05 -3.03619565e-05 -3.45169245e-05 4.61310410e-05 -5.23059013e-05 -3.31792785e-04 -4.04998597e-05 4.06254571e-05 1.78561667e-04 8.87661346e-05 -8.91341618e-05 -4.93345668e-04 -1.52024209e-05 -2.55187535e-05 -5.02682615e-05 -2.62938797e-05 5.02974537e-05 -1.04464250e-04 -6.62649600e-04 -8.08854715e-05 1.78561667e-04 3.07838138e-04 1.77281864e-04 -4.93345668e-04 -8.27412544e-04 -3.03619565e-05 -5.02682615e-05 -1.00743841e-04 -7.06737575e-05 8.68649192e-05 -7.82350394e-05 -4.96269464e-04 -1.33606340e-04 1.82553690e-04 1.69564494e-04 3.69139191e-04 -5.27505568e-04 -4.22291964e-04 -3.45169245e-05 -2.62938797e-05 -7.06737575e-05 -6.46369762e-05 6.16496861e-05 1.04559252e-04 6.63252226e-04 1.78561667e-04 -8.12100987e-05 -3.08118091e-04 -4.93345668e-04 1.78178773e-04 8.28165009e-04 4.61310410e-05 5.02974537e-05 8.68649192e-05 6.16496861e-05 -1.00901762e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +-1 0 0 676 + 3.90477633e-02 1.43108181e-01 7.01149411e-02 6.86686256e-05 -7.01804978e-02 -1.48708178e-01 -1.45640659e-04 1.48847218e-01 -6.07213665e-03 -2.06392362e-05 2.10936488e-02 1.05566754e-02 2.06585336e-05 2.18836165e-01 3.26678087e-01 1.93427521e-01 2.32524344e-01 -1.93789252e-01 -2.19209091e-01 -2.63517052e-01 2.19619036e-01 1.14422574e-02 -1.06157222e-01 8.84730102e-02 -1.94879716e-02 1.06355748e-01 1.43108181e-01 2.06881524e-01 1.43374834e-01 1.40417329e-04 -1.43508888e-01 -1.50412044e-01 -1.47309378e-04 1.50552678e-01 -1.38350338e-02 -4.70253795e-05 4.80607339e-02 2.40528121e-02 4.70693478e-05 3.26678087e-01 2.55451704e-01 6.84024208e-02 8.22283611e-02 -6.85303408e-02 -7.63241290e-02 -9.17512562e-02 7.64668634e-02 -7.12665163e-03 6.61185567e-02 -5.51041899e-02 1.21378134e-02 -6.62422056e-02 -7.01149411e-02 -1.43374834e-01 -6.93144341e-02 -1.10488583e-04 1.12921202e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -7.11815146e-04 4.08396703e-05 -4.17388344e-02 -2.82459912e-02 -5.52750497e-05 -1.93427521e-01 -6.84024208e-02 4.85404850e-02 -1.91575569e-01 1.59661933e-01 -1.57845937e-01 9.78762730e-02 -8.15715437e-02 -1.09060493e-01 2.03731420e-02 -1.69792800e-02 2.21030294e-02 -1.20627445e-01 -6.86686256e-05 -1.40417329e-04 -1.10488583e-04 4.35011783e-02 1.10591889e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 2.42162472e-05 -1.46866461e-02 -5.52750497e-05 -4.20470853e-05 1.47003779e-02 -2.32524344e-01 -8.22283611e-02 -1.91575569e-01 -2.23936739e-02 1.91933836e-01 9.78762730e-02 -1.21605559e-01 -9.80593123e-02 4.21510437e-02 6.15286071e-02 -1.20627445e-01 -7.34585011e-02 -6.16436723e-02 7.01804978e-02 1.43508888e-01 1.12921202e-01 1.10591889e-04 -6.95254957e-02 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 -2.47494145e-02 -5.52750497e-05 4.18053364e-02 1.35719689e-02 4.09429851e-05 1.93789252e-01 6.85303408e-02 1.59661933e-01 1.91933836e-01 4.79438719e-02 -8.15715437e-02 -9.80593123e-02 -1.57541127e-01 -3.51293076e-02 -1.20627445e-01 1.73225482e-02 -1.05510138e-01 2.08238938e-02 1.48708178e-01 1.50412044e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -3.55478592e-02 -1.55449155e-04 1.58871668e-01 1.91406441e-02 -4.42816606e-05 4.52566068e-02 4.12450375e-02 8.07130995e-05 2.19209091e-01 7.63241290e-02 -1.57845937e-01 9.78762730e-02 -8.15715437e-02 1.69664211e-01 -8.94624005e-02 7.45592970e-02 3.58898722e-02 7.25584409e-02 -6.04712853e-02 5.80903396e-03 -3.17028455e-02 1.45640659e-04 1.47309378e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -1.55449155e-04 1.23175252e-01 1.55594499e-04 -4.42246994e-05 3.71217044e-02 8.07130995e-05 7.67502875e-05 -3.71564128e-02 2.63517052e-01 9.17512562e-02 9.78762730e-02 -1.21605559e-01 -9.80593123e-02 -8.94624005e-02 1.36539214e-01 8.96297049e-02 -2.77222994e-02 7.20750226e-02 -3.17028455e-02 4.78979661e-02 -7.22098107e-02 -1.48847218e-01 -1.50552678e-01 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 1.58871668e-01 1.55594499e-04 -3.58448071e-02 4.51983914e-02 8.07130995e-05 -4.53683706e-02 -4.12710932e-03 -4.44325219e-05 -2.19619036e-01 -7.64668634e-02 -8.15715437e-02 -9.80593123e-02 -1.57541127e-01 7.45592970e-02 8.96297049e-02 1.69385603e-01 2.31041772e-02 -3.17028455e-02 6.04569547e-02 2.82790834e-02 7.26769058e-02 -6.07213665e-03 -1.38350338e-02 7.11815146e-04 -2.42162472e-05 2.47494145e-02 -1.91406441e-02 4.42246994e-05 -4.51983914e-02 -7.64320723e-03 1.37779217e-05 -1.40812692e-02 -1.38387040e-02 -2.70811900e-05 1.14422574e-02 -7.12665163e-03 1.09060493e-01 -4.21510437e-02 3.51293076e-02 -3.58898722e-02 2.77222994e-02 -2.31041772e-02 -1.04054254e-01 -6.60398616e-02 5.50386042e-02 1.48427199e-02 -8.10042529e-02 -2.06392362e-05 -4.70253795e-05 -4.08396703e-05 1.46866461e-02 5.52750497e-05 4.42816606e-05 -3.71217044e-02 -8.07130995e-05 1.37779217e-05 -7.77558844e-03 -5.55643228e-05 -3.93143386e-05 7.83476102e-03 -1.06157222e-01 6.61185567e-02 -2.03731420e-02 -6.15286071e-02 1.20627445e-01 -7.25584409e-02 -7.20750226e-02 3.17028455e-02 -6.60398616e-02 3.16796958e-02 -4.70631554e-02 -5.57262889e-02 -8.80364598e-02 2.10936488e-02 4.80607339e-02 4.17388344e-02 5.52750497e-05 -4.18053364e-02 -4.52566068e-02 -8.07130995e-05 4.53683706e-02 -1.40812692e-02 -5.55643228e-05 4.90120357e-02 2.45102737e-02 5.56306169e-05 8.84730102e-02 -5.51041899e-02 1.69792800e-02 1.20627445e-01 -1.73225482e-02 6.04712853e-02 3.17028455e-02 -6.04569547e-02 5.50386042e-02 -4.70631554e-02 1.44325709e-02 -9.49184840e-02 4.74686681e-02 1.05566754e-02 2.40528121e-02 2.82459912e-02 4.20470853e-05 -1.35719689e-02 -4.12450375e-02 -7.67502875e-05 4.12710932e-03 -1.38387040e-02 -3.93143386e-05 2.45102737e-02 8.39735954e-03 3.16778891e-05 -1.94879716e-02 1.21378134e-02 -2.21030294e-02 7.34585011e-02 1.05510138e-01 -5.80903396e-03 -4.78979661e-02 -2.82790834e-02 1.48427199e-02 -5.57262889e-02 -9.49184840e-02 -1.21666576e-01 -2.91367597e-02 2.06585336e-05 4.70693478e-05 5.52750497e-05 -1.47003779e-02 -4.09429851e-05 -8.07130995e-05 3.71564128e-02 4.44325219e-05 -2.70811900e-05 7.83476102e-03 5.56306169e-05 3.16778891e-05 -7.79023244e-03 1.06355748e-01 -6.62422056e-02 1.20627445e-01 6.16436723e-02 -2.08238938e-02 3.17028455e-02 7.22098107e-02 -7.26769058e-02 -8.10042529e-02 -8.80364598e-02 4.74686681e-02 -2.91367597e-02 3.20086641e-02 7.80942775e-04 6.01613300e-03 2.18999750e-03 -8.77387942e-04 -2.18863258e-03 -6.61129537e-03 2.64871117e-03 6.60717485e-03 4.80726834e-05 -7.93553438e-05 -1.97950852e-04 -8.30175060e-05 7.93058853e-05 3.92221425e-02 1.43532144e-01 7.04318857e-02 -6.89694006e-05 -7.03660418e-02 -1.49256702e-01 1.46157457e-04 1.49117168e-01 -6.14421454e-03 2.08033691e-05 2.12246406e-02 1.06023891e-02 -2.07839209e-05 6.01613300e-03 4.08875310e-02 1.52952926e-02 -6.12781763e-03 -1.52857597e-02 -4.31188236e-02 1.72748763e-02 4.30919497e-02 -3.37847883e-04 5.57697907e-04 1.39117003e-03 5.83435055e-04 -5.57350320e-04 1.43532144e-01 2.07035011e-01 1.43672485e-01 -1.40689194e-04 -1.43538172e-01 -1.50532003e-01 1.47406277e-04 1.50391277e-01 -1.38908002e-02 4.70321215e-05 4.79845294e-02 2.39698123e-02 -4.69881531e-05 -2.18999750e-03 -1.52952926e-02 -5.15923545e-03 2.49119686e-03 6.21425750e-03 1.46684764e-02 -7.19131331e-03 -1.79386356e-02 1.72706639e-04 -8.54131672e-05 -2.13062012e-04 -3.37640327e-05 3.22544802e-05 -7.04318857e-02 -1.43672485e-01 -6.96392838e-02 1.10967367e-04 1.13214473e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -6.44737024e-04 -4.11247302e-05 -4.19575125e-02 -2.83346836e-02 5.55446341e-05 8.77387942e-04 6.12781763e-03 2.49119686e-03 6.08388128e-05 -2.48964421e-03 -7.19131331e-03 -4.00260266e-04 7.18683130e-03 2.28465162e-05 1.45566435e-04 3.22544802e-05 -3.96115447e-05 -1.45475710e-04 6.89694006e-05 1.40689194e-04 1.10967367e-04 4.36810194e-02 -1.10863628e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 -2.44346801e-05 -1.47786983e-02 5.55446341e-05 4.22182061e-05 1.47648823e-02 2.18863258e-03 1.52857597e-02 6.21425750e-03 -2.48964421e-03 -5.15148692e-03 -1.79386356e-02 7.18683130e-03 1.46461088e-02 5.69903313e-05 3.22544802e-05 2.13094501e-04 1.66296451e-04 -8.53729492e-05 7.03660418e-02 1.43538172e-01 1.13214473e-01 -1.10863628e-04 -6.94275057e-02 -1.74985607e-01 1.71352113e-04 8.99829313e-02 -2.49294862e-02 5.55446341e-05 4.18906689e-02 1.35432580e-02 -4.10208288e-05 6.61129537e-03 4.31188236e-02 1.46684764e-02 -7.19131331e-03 -1.79386356e-02 -3.98957702e-02 2.00026915e-02 4.98964485e-02 -7.72308287e-04 8.96716863e-04 2.23684831e-03 8.32819515e-04 -7.95585077e-04 1.49256702e-01 1.50532003e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -3.55932735e-02 1.55719370e-04 1.58872712e-01 1.91550894e-02 4.43250336e-05 4.52226225e-02 4.11843616e-02 -8.07339276e-05 -2.64871117e-03 -1.72748763e-02 -7.19131331e-03 -4.00260266e-04 7.18683130e-03 2.00026915e-02 2.01803309e-03 -1.99902248e-02 1.35107113e-04 -5.70128173e-04 -7.95585077e-04 -2.33020372e-04 5.69772839e-04 -1.46157457e-04 -1.47406277e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 1.55719370e-04 1.23427948e-01 -1.55573794e-04 4.44355598e-05 3.72580070e-02 -8.07339276e-05 -7.68136271e-05 -3.72231760e-02 -6.60717485e-03 -4.30919497e-02 -1.79386356e-02 7.18683130e-03 1.46461088e-02 4.98964485e-02 -1.99902248e-02 -3.98335545e-02 3.37022900e-04 -7.95585077e-04 -2.23576720e-03 -1.08333469e-03 8.95724851e-04 -1.49117168e-01 -1.50391277e-01 -1.74985607e-01 1.71352113e-04 8.99829313e-02 1.58872712e-01 -1.55573794e-04 -3.52960874e-02 4.53353869e-02 -8.07339276e-05 -4.51107162e-02 -3.92260496e-03 4.41740133e-05 4.80726834e-05 -3.37847883e-04 -1.72706639e-04 -2.28465162e-05 -5.69903313e-05 7.72308287e-04 -1.35107113e-04 -3.37022900e-04 1.49054702e-04 1.08920195e-04 2.71699980e-04 2.15185640e-04 -2.05564928e-04 -6.14421454e-03 -1.38908002e-02 6.44737024e-04 2.44346801e-05 2.49294862e-02 -1.91550894e-02 -4.44355598e-05 -4.53353869e-02 -7.70240327e-03 -1.39667020e-05 -1.42495299e-02 -1.39752767e-02 2.73958109e-05 -7.93553438e-05 5.57697907e-04 8.54131672e-05 -1.45566435e-04 -3.22544802e-05 -8.96716863e-04 5.70128173e-04 7.95585077e-04 1.08920195e-04 -7.64602679e-05 -5.25496697e-04 -2.99674206e-04 9.35305351e-05 2.08033691e-05 4.70321215e-05 4.11247302e-05 1.47786983e-02 -5.55446341e-05 -4.43250336e-05 -3.72580070e-02 8.07339276e-05 -1.39667020e-05 -7.86837129e-03 5.59786246e-05 3.96080071e-05 7.92534293e-03 -1.97950852e-04 1.39117003e-03 2.13062012e-04 -3.22544802e-05 -2.13094501e-04 -2.23684831e-03 7.95585077e-04 2.23576720e-03 2.71699980e-04 -5.25496697e-04 -1.17664155e-03 -4.68790009e-04 5.25099556e-04 2.12246406e-02 4.79845294e-02 4.19575125e-02 -5.55446341e-05 -4.18906689e-02 -4.52226225e-02 8.07339276e-05 4.51107162e-02 -1.42495299e-02 5.59786246e-05 4.92437744e-02 2.45592648e-02 -5.59117751e-05 -8.30175060e-05 5.83435055e-04 3.37640327e-05 3.96115447e-05 -1.66296451e-04 -8.32819515e-04 2.33020372e-04 1.08333469e-03 2.15185640e-04 -2.99674206e-04 -4.68790009e-04 -9.86401444e-05 2.43650376e-04 1.06023891e-02 2.39698123e-02 2.83346836e-02 -4.22182061e-05 -1.35432580e-02 -4.11843616e-02 7.68136271e-05 3.92260496e-03 -1.39752767e-02 3.96080071e-05 2.45592648e-02 8.37352664e-03 -3.18101412e-05 7.93058853e-05 -5.57350320e-04 -3.22544802e-05 1.45475710e-04 8.53729492e-05 7.95585077e-04 -5.69772839e-04 -8.95724851e-04 -2.05564928e-04 9.35305351e-05 5.25099556e-04 2.43650376e-04 -7.63436450e-05 -2.07839209e-05 -4.69881531e-05 -5.55446341e-05 -1.47648823e-02 4.10208288e-05 8.07339276e-05 3.72231760e-02 -4.41740133e-05 2.73958109e-05 7.92534293e-03 -5.59117751e-05 -3.18101412e-05 -7.85354621e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 1 676 + 3.90352750e-02 1.43077779e-01 7.00929462e-02 7.01664876e-02 -6.06418327e-05 -1.48670356e-01 -1.48826341e-01 1.28624111e-04 -6.06735631e-03 -2.10842729e-02 1.82222169e-05 -1.05531894e-02 1.82413356e-05 9.15762019e-03 4.83148251e-02 8.38611084e-03 2.68557300e-02 8.37277034e-03 -2.13472085e-02 -6.83624242e-02 -2.13132496e-02 1.01801353e-03 -1.22060292e-03 -3.80545527e-04 -1.76446286e-03 -1.21866120e-03 1.43077779e-01 2.06870478e-01 1.43354898e-01 1.43505305e-01 -1.24025372e-04 -1.50404918e-01 -1.50562723e-01 1.30124790e-04 -1.38318580e-02 -4.80661849e-02 4.15415057e-05 -2.40582899e-02 4.15850910e-05 4.83148251e-02 1.40434369e-01 3.10832043e-02 9.95410336e-02 3.10337576e-02 -5.20532728e-02 -1.66695703e-01 -5.19704673e-02 1.64722383e-02 -1.97502898e-02 -6.15751798e-03 -2.85503599e-02 -1.97188713e-02 -7.00929462e-02 -1.43354898e-01 -6.92934363e-02 -1.12900170e-01 9.75746892e-05 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -7.15622009e-04 4.17238982e-02 -3.60601441e-05 2.82393576e-02 -4.88121249e-05 -8.38611084e-03 -3.10832043e-02 3.80236599e-03 -2.29106850e-02 -7.14282961e-03 -1.17058310e-02 4.81700791e-02 1.50179127e-02 -3.67570296e-03 3.46277843e-04 1.07958520e-04 4.59900715e-03 3.17639534e-03 -7.01664876e-02 -1.43505305e-01 -1.12900170e-01 -6.95302215e-02 9.76770644e-05 1.74742533e-01 9.03848691e-02 -1.51180797e-04 2.47372636e-02 4.17984960e-02 -4.88121249e-05 1.35733224e-02 -3.61625176e-05 -2.68557300e-02 -9.95410336e-02 -2.29106850e-02 -6.24127339e-02 -2.28742390e-02 4.81700791e-02 1.27512468e-01 4.80934508e-02 -6.86041924e-03 9.30298659e-03 3.17639534e-03 1.18927087e-02 9.28818754e-03 6.06418327e-05 1.24025372e-04 9.75746892e-05 9.76770644e-05 4.34883186e-02 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 -2.13793372e-05 -4.88121249e-05 -1.46802192e-02 -3.71324719e-05 -1.46956216e-02 -8.37277034e-03 -3.10337576e-02 -7.14282961e-03 -2.28742390e-02 3.82510951e-03 1.50179127e-02 4.80934508e-02 -1.17536496e-02 -2.13886253e-03 3.17639534e-03 1.04972289e-04 5.47561043e-03 3.36163867e-04 1.48670356e-01 1.50404918e-01 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -3.55477897e-02 -1.58871579e-01 1.37305772e-04 1.91383675e-02 -4.52602299e-02 3.91164413e-05 -4.12489762e-02 7.12994329e-05 2.13472085e-02 5.20532728e-02 -1.17058310e-02 4.81700791e-02 1.50179127e-02 3.41922622e-02 -7.48076734e-02 -2.33226752e-02 1.41091685e-02 8.77821071e-04 2.73676948e-04 -1.66902967e-02 -1.15274838e-02 1.48826341e-01 1.50562723e-01 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -1.58871579e-01 -3.58809906e-02 1.37449833e-04 -4.51895230e-02 -4.53856342e-02 7.12994329e-05 -4.14093649e-03 3.92659774e-05 6.83624242e-02 1.66695703e-01 4.81700791e-02 1.27512468e-01 4.80934508e-02 -7.48076734e-02 -1.82012429e-01 -7.46886704e-02 2.36648521e-02 -3.30950187e-02 -1.15274838e-02 -4.10254309e-02 -3.30423716e-02 -1.28624111e-04 -1.30124790e-04 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 1.37305772e-04 1.37449833e-04 1.23157158e-01 3.90553324e-05 7.12994329e-05 3.71123182e-02 6.77953561e-05 3.71512564e-02 2.13132496e-02 5.19704673e-02 1.50179127e-02 4.80934508e-02 -1.17536496e-02 -2.33226752e-02 -7.46886704e-02 3.42665240e-02 7.37795517e-03 -1.15274838e-02 2.85574611e-04 -2.05370554e-02 9.14525789e-04 -6.06735631e-03 -1.38318580e-02 7.15622009e-04 -2.47372636e-02 2.13793372e-05 -1.91383675e-02 4.51895230e-02 -3.90553324e-05 -7.63846481e-03 1.40703716e-02 -1.21604081e-05 1.38292143e-02 -2.39039906e-05 1.01801353e-03 1.64722383e-02 3.67570296e-03 6.86041924e-03 2.13886253e-03 -1.41091685e-02 -2.36648521e-02 -7.37795517e-03 4.27436915e-04 1.06904007e-03 3.33293007e-04 -5.15884386e-04 -3.56305765e-04 -2.10842729e-02 -4.80661849e-02 -4.17238982e-02 -4.17984960e-02 4.88121249e-05 4.52602299e-02 4.53856342e-02 -7.12994329e-05 1.40703716e-02 4.89954008e-02 -4.90591418e-05 2.45060863e-02 -4.91248191e-05 -1.22060292e-03 -1.97502898e-02 -3.46277843e-04 -9.30298659e-03 -3.17639534e-03 -8.77821071e-04 3.30950187e-02 1.15274838e-02 1.06904007e-03 1.79721655e-03 5.99996563e-04 -2.05835279e-04 -4.54095308e-04 1.82222169e-05 4.15415057e-05 3.60601441e-05 4.88121249e-05 1.46802192e-02 -3.91164413e-05 -7.12994329e-05 -3.71123182e-02 -1.21604081e-05 -4.90591418e-05 -7.76912846e-03 -3.47109323e-05 -7.82829532e-03 -3.80545527e-04 -6.15751798e-03 -1.07958520e-04 -3.17639534e-03 -1.04972289e-04 -2.73676948e-04 1.15274838e-02 -2.85574611e-04 3.33293007e-04 5.99996563e-04 5.97826394e-05 -5.77500748e-04 6.01659247e-04 -1.05531894e-02 -2.40582899e-02 -2.82393576e-02 -1.35733224e-02 3.71324719e-05 4.12489762e-02 4.14093649e-03 -6.77953561e-05 1.38292143e-02 2.45060863e-02 -3.47109323e-05 8.39857043e-03 -2.79745566e-05 -1.76446286e-03 -2.85503599e-02 -4.59900715e-03 -1.18927087e-02 -5.47561043e-03 1.66902967e-02 4.10254309e-02 2.05370554e-02 -5.15884386e-04 -2.05835279e-04 -5.77500748e-04 1.02067736e-03 -1.02744979e-03 1.82413356e-05 4.15850910e-05 4.88121249e-05 3.61625176e-05 1.46956216e-02 -7.12994329e-05 -3.92659774e-05 -3.71512564e-02 -2.39039906e-05 -4.91248191e-05 -7.82829532e-03 -2.79745566e-05 -7.78554672e-03 -1.21866120e-03 -1.97188713e-02 -3.17639534e-03 -9.28818754e-03 -3.36163867e-04 1.15274838e-02 3.30423716e-02 -9.14525789e-04 -3.56305765e-04 -4.54095308e-04 6.01659247e-04 -1.02744979e-03 1.79866243e-03 1.58811464e-02 7.48155990e-02 4.34163708e-02 1.15488161e-02 -1.44464114e-02 -1.04854529e-01 -2.78914531e-02 3.48894123e-02 -5.00735879e-03 -2.53725212e-03 3.17384809e-03 1.90578541e-04 8.44248085e-04 3.92346948e-02 1.43562622e-01 7.04539945e-02 7.03800846e-02 6.09456872e-05 -1.49294660e-01 -1.49138042e-01 -1.29146200e-04 -6.14904967e-03 -2.12340751e-02 -1.83876633e-05 -1.06058918e-02 -1.83683737e-05 7.48155990e-02 1.66919864e-01 1.32833127e-01 3.53337998e-02 -4.41990421e-02 -1.84790564e-01 -4.91545517e-02 6.14874175e-02 -4.42670639e-02 -2.24303283e-02 2.80580926e-02 1.68479088e-03 7.46349234e-03 1.43562622e-01 2.07046006e-01 1.43692414e-01 1.43541673e-01 1.24300020e-04 -1.50539086e-01 -1.50381163e-01 -1.30222681e-04 -1.38939644e-02 -4.79790374e-02 -4.15474836e-05 -2.39643345e-02 -4.15038981e-05 -4.34163708e-02 -1.32833127e-01 -9.01434410e-02 -2.89129441e-02 3.61671951e-02 1.65322168e-01 5.51240732e-02 -6.89546905e-02 2.22375486e-02 1.32543622e-02 -1.65798786e-02 -1.11994876e-03 -4.96128575e-03 -7.04539945e-02 -1.43692414e-01 -6.96603995e-02 -1.13235554e-01 -9.80564135e-05 9.03265538e-02 1.75001865e-01 1.51542997e-04 -6.40862982e-04 4.19725482e-02 3.63461597e-05 2.83413534e-02 4.90844694e-05 -1.15488161e-02 -3.53337998e-02 -2.89129441e-02 1.08603750e-02 9.62052511e-03 5.51240732e-02 -2.72470058e-02 -1.83420453e-02 8.78347103e-03 -2.25930389e-03 -4.96128575e-03 -1.95389380e-03 7.51763284e-04 -7.03800846e-02 -1.43541673e-01 -1.13235554e-01 -6.94226948e-02 -9.79535472e-05 1.75001865e-01 8.99591889e-02 1.51384021e-04 2.49417263e-02 4.18975121e-02 4.90844694e-05 1.35418952e-02 3.62431213e-05 1.44464114e-02 4.41990421e-02 3.61671951e-02 9.62052511e-03 6.51694639e-03 -6.89546905e-02 -1.83420453e-02 -1.89660271e-02 -1.09872419e-02 -4.96128575e-03 -1.94063670e-05 -1.69881932e-03 -5.16212111e-06 -6.09456872e-05 -1.24300020e-04 -9.80564135e-05 -9.79535472e-05 4.36939847e-02 1.51542997e-04 1.51384021e-04 -8.48589593e-02 2.15983067e-05 4.90844694e-05 -1.47851947e-02 3.73063262e-05 -1.47696842e-02 1.04854529e-01 1.84790564e-01 1.65322168e-01 5.51240732e-02 -6.89546905e-02 -1.80846829e-01 -6.90112897e-02 8.63262064e-02 -5.92382269e-02 -3.74323846e-02 4.68241613e-02 3.27598887e-03 1.45123754e-02 1.49294660e-01 1.50539086e-01 9.03265538e-02 1.75001865e-01 1.51542997e-04 -3.55933538e-02 -1.58872773e-01 -1.37575997e-04 1.91573661e-02 -4.52189669e-02 -3.91573984e-05 -4.11804138e-02 -7.13204742e-05 2.78914531e-02 4.91545517e-02 5.51240732e-02 -2.72470058e-02 -1.83420453e-02 -6.90112897e-02 6.02356277e-02 2.29628931e-02 -2.64653896e-02 1.16397950e-02 1.45123754e-02 7.05364819e-03 -3.87303831e-03 1.49138042e-01 1.50381163e-01 1.75001865e-01 8.99591889e-02 1.51384021e-04 -1.58872773e-01 -3.52598472e-02 -1.37431673e-04 -4.53442356e-02 -4.50933797e-02 -7.13204742e-05 -3.90879932e-03 -3.90076821e-05 -3.48894123e-02 -6.14874175e-02 -6.89546905e-02 -1.83420453e-02 -1.89660271e-02 8.63262064e-02 2.29628931e-02 4.98684507e-02 3.31055497e-02 1.45123754e-02 5.08781728e-03 6.64329455e-03 1.35336660e-03 1.29146200e-04 1.30222681e-04 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -1.37575997e-04 -1.37431673e-04 1.23446141e-01 -3.92658750e-05 -7.13204742e-05 3.72674479e-02 -6.78607741e-05 3.72283524e-02 -5.00735879e-03 -4.42670639e-02 -2.22375486e-02 -8.78347103e-03 1.09872419e-02 5.92382269e-02 2.64653896e-02 -3.31055497e-02 8.85356280e-03 3.78893571e-03 -4.73957881e-03 -2.22255489e-04 -9.84574499e-04 -6.14904967e-03 -1.38939644e-02 6.40862982e-04 -2.49417263e-02 -2.15983067e-05 -1.91573661e-02 4.53442356e-02 3.92658750e-05 -7.70714517e-03 1.42605428e-02 1.23489278e-05 1.39848306e-02 2.42203674e-05 -2.53725212e-03 -2.24303283e-02 -1.32543622e-02 2.25930389e-03 4.96128575e-03 3.74323846e-02 -1.16397950e-02 -1.45123754e-02 3.78893571e-03 3.11966006e-03 -2.38565589e-03 3.45498336e-04 -1.19157591e-03 -2.12340751e-02 -4.79790374e-02 -4.19725482e-02 -4.18975121e-02 -4.90844694e-05 4.52189669e-02 4.50933797e-02 7.13204742e-05 1.42605428e-02 4.92604167e-02 4.94764240e-05 2.45634125e-02 4.94101171e-05 3.17384809e-03 2.80580926e-02 1.65798786e-02 4.96128575e-03 1.94063670e-05 -4.68241613e-02 -1.45123754e-02 -5.08781728e-03 -4.73957881e-03 -2.38565589e-03 4.19672455e-03 7.66615478e-04 1.21992795e-03 -1.83876633e-05 -4.15474836e-05 -3.63461597e-05 -4.90844694e-05 1.47851947e-02 3.91573984e-05 7.13204742e-05 -3.72674479e-02 1.23489278e-05 4.94764240e-05 -7.87491896e-03 3.50080332e-05 -7.93188481e-03 1.90578541e-04 1.68479088e-03 1.11994876e-03 1.95389380e-03 1.69881932e-03 -3.27598887e-03 -7.05364819e-03 -6.64329455e-03 -2.22255489e-04 3.45498336e-04 7.66615478e-04 -2.51944445e-04 4.44796514e-05 -1.06058918e-02 -2.39643345e-02 -2.83413534e-02 -1.35418952e-02 -3.73063262e-05 4.11804138e-02 3.90879932e-03 6.78607741e-05 1.39848306e-02 2.45634125e-02 3.50080332e-05 8.37229921e-03 2.81098497e-05 8.44248085e-04 7.46349234e-03 4.96128575e-03 -7.51763284e-04 5.16212111e-06 -1.45123754e-02 3.87303831e-03 -1.35336660e-03 -9.84574499e-04 -1.19157591e-03 1.21992795e-03 4.44796514e-05 -6.49437852e-05 -1.83683737e-05 -4.15038981e-05 -4.90844694e-05 -3.62431213e-05 1.47696842e-02 7.13204742e-05 3.90076821e-05 -3.72283524e-02 2.42203674e-05 4.94101171e-05 -7.93188481e-03 2.81098497e-05 -7.85826831e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 2 676 + 1.69875966e-04 1.56309629e-03 3.24812372e-04 6.49988216e-04 3.24554036e-04 -1.06359050e-03 -2.12837118e-03 -1.06274459e-03 -4.51784837e-05 1.04293240e-04 5.20760088e-05 7.83342981e-05 1.04210292e-04 7.64391380e-08 7.66150975e-07 8.66466883e-08 4.50795436e-07 2.59826431e-07 -2.65750466e-07 -1.38261599e-06 -7.96902875e-07 -1.79855778e-07 9.51693451e-08 5.48530649e-08 1.65324440e-07 2.85383225e-07 1.56309629e-03 1.39321547e-02 2.88896783e-03 5.78116848e-03 2.88667012e-03 -9.33028603e-03 -1.86710129e-02 -9.32286531e-03 -2.87419685e-04 6.63500139e-04 3.31300849e-04 4.98352698e-04 6.62972432e-04 7.66150975e-07 7.67741190e-06 8.68804591e-07 4.52011672e-06 2.60527437e-06 -2.66382524e-06 -1.38590440e-05 -7.98798223e-06 -1.80402683e-06 9.54587359e-07 5.50198620e-07 1.65827158e-06 2.86251017e-06 -3.24812372e-04 -2.88896783e-03 -4.12889039e-04 -1.28241153e-03 -6.40337515e-04 1.30761524e-03 4.14724642e-03 2.07081533e-03 1.33379801e-04 -8.09954742e-05 -4.04428995e-05 -1.33916930e-04 -1.78153411e-04 -8.66466883e-08 -8.68804591e-07 -8.10366131e-08 -5.13119966e-07 -2.95748623e-07 2.49147492e-07 1.57457959e-06 9.07545559e-07 2.09936487e-07 -8.93058171e-08 -5.14734841e-08 -1.88998319e-07 -3.26249100e-07 -6.49988216e-04 -5.78116848e-03 -1.28241153e-03 -2.33829995e-03 -1.28139158e-03 4.14724642e-03 7.53428530e-03 4.14394796e-03 9.83807621e-05 -3.08167282e-04 -1.78153411e-04 -1.70683975e-04 -3.07922185e-04 -4.50795436e-07 -4.52011672e-06 -5.13119966e-07 -2.65201224e-06 -1.53868696e-06 1.57457959e-06 8.13854182e-06 4.72167378e-06 1.05847327e-06 -5.62291473e-07 -3.26249100e-07 -9.63807299e-07 -1.68613699e-06 -3.24554036e-04 -2.88667012e-03 -6.40337515e-04 -1.28139158e-03 -4.11870065e-04 2.07081533e-03 4.14394796e-03 1.30431994e-03 4.91237728e-05 -1.78153411e-04 -4.03334217e-05 -1.82394415e-04 -8.07119774e-05 -2.59826431e-07 -2.60527437e-06 -2.95748623e-07 -1.53868696e-06 -8.69268630e-07 9.07545559e-07 4.72167378e-06 2.66794647e-06 6.10075678e-07 -3.26249100e-07 -1.84294835e-07 -5.77981440e-07 -9.58827994e-07 1.06359050e-03 9.33028603e-03 1.30761524e-03 4.14724642e-03 2.07081533e-03 -4.09936647e-03 -1.33348475e-02 -6.65839545e-03 -3.95532628e-04 1.78326504e-04 8.90425168e-05 3.70585174e-04 4.92999747e-04 2.65750466e-07 2.66382524e-06 2.49147492e-07 1.57457959e-06 9.07545559e-07 -7.65612413e-07 -4.82964708e-06 -2.78367939e-06 -6.44381690e-07 2.74704997e-07 1.58332612e-07 5.80221275e-07 1.00157859e-06 2.12837118e-03 1.86710129e-02 4.14724642e-03 7.53428530e-03 4.14394796e-03 -1.33348475e-02 -2.41202882e-02 -1.33242418e-02 -2.45798143e-04 8.29891702e-04 4.92999747e-04 4.26519386e-04 8.29231658e-04 1.38261599e-06 1.38590440e-05 1.57457959e-06 8.13854182e-06 4.72167378e-06 -4.82964708e-06 -2.49644465e-05 -1.44826073e-05 -3.24980348e-06 1.72632759e-06 1.00157859e-06 2.95940805e-06 5.17671876e-06 1.06274459e-03 9.32286531e-03 2.07081533e-03 4.14394796e-03 1.30431994e-03 -6.65839545e-03 -1.33242418e-02 -4.08877092e-03 -1.22732655e-04 4.92999747e-04 8.87213543e-05 5.27609947e-04 1.77541990e-04 7.96902875e-07 7.98798223e-06 9.07545559e-07 4.72167378e-06 2.66794647e-06 -2.78367939e-06 -1.44826073e-05 -8.18470095e-06 -1.87309979e-06 1.00157859e-06 5.65885040e-07 1.77408213e-06 2.94412168e-06 -4.51784837e-05 -2.87419685e-04 -1.33379801e-04 -9.83807621e-05 -4.91237728e-05 3.95532628e-04 2.45798143e-04 1.22732655e-04 -2.48009597e-05 2.99273523e-05 1.49434139e-05 3.43909079e-05 4.57511797e-05 -1.79855778e-07 -1.80402683e-06 -2.09936487e-07 -1.05847327e-06 -6.10075678e-07 6.44381690e-07 3.24980348e-06 1.87309979e-06 4.20001614e-07 -2.30243255e-07 -1.32706054e-07 -3.87430816e-07 -6.68783488e-07 1.04293240e-04 6.63500139e-04 8.09954742e-05 3.08167282e-04 1.78153411e-04 -1.78326504e-04 -8.29891702e-04 -4.92999747e-04 2.99273523e-05 -1.00005292e-04 -4.97399685e-05 -7.02141186e-05 -8.57983503e-05 9.51693451e-08 9.54587359e-07 8.93058171e-08 5.62291473e-07 3.26249100e-07 -2.74704997e-07 -1.72632759e-06 -1.00157859e-06 -2.30243255e-07 9.81955960e-08 5.69902811e-08 2.05262031e-07 3.59115185e-07 5.20760088e-05 3.31300849e-04 4.04428995e-05 1.78153411e-04 4.03334217e-05 -8.90425168e-05 -4.92999747e-04 -8.87213543e-05 1.49434139e-05 -4.97399685e-05 -2.52267750e-05 -2.59150043e-05 -4.97149683e-05 5.48530649e-08 5.50198620e-07 5.14734841e-08 3.26249100e-07 1.84294835e-07 -1.58332612e-07 -1.00157859e-06 -5.65885040e-07 -1.32706054e-07 5.69902811e-08 3.21658824e-08 1.23111354e-07 2.04201507e-07 7.83342981e-05 4.98352698e-04 1.33916930e-04 1.70683975e-04 1.82394415e-04 -3.70585174e-04 -4.26519386e-04 -5.27609947e-04 3.43909079e-05 -7.02141186e-05 -2.59150043e-05 -6.45671275e-05 -6.10086414e-05 1.65324440e-07 1.65827158e-06 1.88998319e-07 9.63807299e-07 5.77981440e-07 -5.80221275e-07 -2.95940805e-06 -1.77408213e-06 -3.87430816e-07 2.05262031e-07 1.23111354e-07 3.35047960e-07 6.28013255e-07 1.04210292e-04 6.62972432e-04 1.78153411e-04 3.07922185e-04 8.07119774e-05 -4.92999747e-04 -8.29231658e-04 -1.77541990e-04 4.57511797e-05 -8.57983503e-05 -4.97149683e-05 -6.10086414e-05 -9.98687600e-05 2.85383225e-07 2.86251017e-06 3.26249100e-07 1.68613699e-06 9.58827994e-07 -1.00157859e-06 -5.17671876e-06 -2.94412168e-06 -6.68783488e-07 3.59115185e-07 2.04201507e-07 6.28013255e-07 1.05531277e-06 1.34040550e-03 9.60213460e-03 3.73555125e-03 3.48391351e-03 1.24728012e-03 -1.09076056e-02 -1.01728372e-02 -3.64198981e-03 4.81260500e-05 1.52628664e-04 5.46427738e-05 6.20511120e-05 5.09618755e-05 1.70812525e-04 1.57082799e-03 3.26619005e-04 6.52872566e-04 3.26878741e-04 -1.06923657e-03 -2.13727680e-03 -1.07008685e-03 -4.52355680e-05 1.04509065e-04 5.23253592e-05 7.82671141e-05 1.04592173e-04 9.60213460e-03 5.71988794e-02 2.33762322e-02 2.18015403e-02 7.80519598e-03 -6.13754605e-02 -5.72410286e-02 -2.04929303e-02 -1.32713387e-03 -4.20891950e-03 -1.50684039e-03 -1.71113426e-03 -1.40533518e-03 1.57082799e-03 1.39903450e-02 2.90296254e-03 5.80267706e-03 2.90527106e-03 -9.37210352e-03 -1.87337209e-02 -9.37955646e-03 -2.86774397e-04 6.62543336e-04 3.31720680e-04 4.96180451e-04 6.63070208e-04 -3.73555125e-03 -2.33762322e-02 -8.61905469e-03 -9.70056309e-03 -3.47291040e-03 2.31501957e-02 2.65441727e-02 9.50311160e-03 3.94794045e-04 1.00199122e-03 3.58724097e-04 3.72619710e-04 3.06028347e-04 -3.26619005e-04 -2.90296254e-03 -4.15151071e-04 -1.28812886e-03 -6.44937408e-04 1.31426206e-03 4.16439840e-03 2.08502145e-03 1.33596014e-04 -8.08634926e-05 -4.04865482e-05 -1.33628939e-04 -1.78574888e-04 -3.48391351e-03 -2.18015403e-02 -9.70056309e-03 -7.26493933e-03 -3.23896492e-03 2.65441727e-02 1.94448570e-02 8.86295399e-03 2.20197109e-04 9.46422121e-04 3.06028347e-04 4.32968199e-04 3.16005166e-04 -6.52872566e-04 -5.80267706e-03 -1.28812886e-03 -2.34554260e-03 -1.28915322e-03 4.16439840e-03 7.55503474e-03 4.16771003e-03 9.80472196e-05 -3.07854286e-04 -1.78574888e-04 -1.69538864e-04 -3.08099099e-04 -1.24728012e-03 -7.80519598e-03 -3.47291040e-03 -3.23896492e-03 6.22579463e-04 9.50311160e-03 8.86295399e-03 -2.13818504e-03 7.88330351e-05 3.06028347e-04 2.01182701e-04 9.38238910e-05 1.87630442e-04 -3.26878741e-04 -2.90527106e-03 -6.44937408e-04 -1.28915322e-03 -4.16176405e-04 2.08502145e-03 4.16771003e-03 1.31757687e-03 4.90900573e-05 -1.78574888e-04 -4.05964083e-05 -1.82586078e-04 -8.11473946e-05 1.09076056e-02 6.13754605e-02 2.31501957e-02 2.65441727e-02 9.50311160e-03 -5.77966664e-02 -6.83193976e-02 -2.44591107e-02 -1.79914945e-03 -5.97835721e-03 -2.14031894e-03 -2.46834917e-03 -2.02722721e-03 1.06923657e-03 9.37210352e-03 1.31426206e-03 4.16439840e-03 2.08502145e-03 -4.11821518e-03 -1.33849485e-02 -6.70154535e-03 -3.95726654e-04 1.77065778e-04 8.86528879e-05 3.69083281e-04 4.93224043e-04 1.01728372e-02 5.72410286e-02 2.65441727e-02 1.94448570e-02 8.86295399e-03 -6.83193976e-02 -4.82598647e-02 -2.28114729e-02 -1.83921194e-03 -5.56264112e-03 -2.02722721e-03 -2.20897125e-03 -1.85733542e-03 2.13727680e-03 1.87337209e-02 4.16439840e-03 7.55503474e-03 4.16771003e-03 -1.33849485e-02 -2.41769159e-02 -1.33955926e-02 -2.44087177e-04 8.27141295e-04 4.93224043e-04 4.21987254e-04 8.27799059e-04 3.64198981e-03 2.04929303e-02 9.50311160e-03 8.86295399e-03 -2.13818504e-03 -2.44591107e-02 -2.28114729e-02 7.29057368e-03 -6.58458507e-04 -2.02722721e-03 -6.25942781e-04 -8.57500066e-04 -5.83777430e-04 1.07008685e-03 9.37955646e-03 2.08502145e-03 4.16771003e-03 1.31757687e-03 -6.70154535e-03 -1.33955926e-02 -4.12886944e-03 -1.22209008e-04 4.93224043e-04 8.89747330e-05 5.27473959e-04 1.77849915e-04 4.81260500e-05 -1.32713387e-03 -3.94794045e-04 -2.20197109e-04 -7.88330351e-05 1.79914945e-03 1.83921194e-03 6.58458507e-04 2.70312347e-04 -5.84152927e-04 -2.09133301e-04 -4.48700438e-04 -3.68512587e-04 -4.52355680e-05 -2.86774397e-04 -1.33596014e-04 -9.80472196e-05 -4.90900573e-05 3.95726654e-04 2.44087177e-04 1.22209008e-04 -2.48540403e-05 3.04545512e-05 1.52479149e-05 3.45666355e-05 4.61930859e-05 1.52628664e-04 -4.20891950e-03 -1.00199122e-03 -9.46422121e-04 -3.06028347e-04 5.97835721e-03 5.56264112e-03 2.02722721e-03 -5.84152927e-04 -1.82537010e-03 -7.59726669e-04 -6.76509301e-04 -6.94568981e-04 1.04509065e-04 6.62543336e-04 8.08634926e-05 3.07854286e-04 1.78574888e-04 -1.77065778e-04 -8.27141295e-04 -4.93224043e-04 3.04545512e-05 -1.00913456e-04 -5.03546334e-05 -7.08141106e-05 -8.70566197e-05 5.46427738e-05 -1.50684039e-03 -3.58724097e-04 -3.06028347e-04 -2.01182701e-04 2.14031894e-03 2.02722721e-03 6.25942781e-04 -2.09133301e-04 -7.59726669e-04 2.47142757e-05 -4.56968047e-04 1.28403370e-05 5.23253592e-05 3.31720680e-04 4.04865482e-05 1.78574888e-04 4.05964083e-05 -8.86528879e-05 -4.93224043e-04 -8.89747330e-05 1.52479149e-05 -5.03546334e-05 -2.55519497e-05 -2.63773034e-05 -5.03802528e-05 6.20511120e-05 -1.71113426e-03 -3.72619710e-04 -4.32968199e-04 -9.38238910e-05 2.46834917e-03 2.20897125e-03 8.57500066e-04 -4.48700438e-04 -6.76509301e-04 -4.56968047e-04 -1.06288677e-04 -3.26034042e-04 7.82671141e-05 4.96180451e-04 1.33628939e-04 1.69538864e-04 1.82586078e-04 -3.69083281e-04 -4.21987254e-04 -5.27473959e-04 3.45666355e-05 -7.08141106e-05 -2.63773034e-05 -6.47122220e-05 -6.17977590e-05 5.09618755e-05 -1.40533518e-03 -3.06028347e-04 -3.16005166e-04 -1.87630442e-04 2.02722721e-03 1.85733542e-03 5.83777430e-04 -3.68512587e-04 -6.94568981e-04 1.28403370e-05 -3.26034042e-04 2.29218748e-05 1.04592173e-04 6.63070208e-04 1.78574888e-04 3.08099099e-04 8.11473946e-05 -4.93224043e-04 -8.27799059e-04 -1.77849915e-04 4.61930859e-05 -8.70566197e-05 -5.03802528e-05 -6.17977590e-05 -1.01051860e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 1 -2 169 + 6.87819024e-05 6.87613283e-04 -6.67269383e-05 -5.32434237e-05 -3.33703543e-04 2.26563373e-04 1.80781705e-04 1.13305064e-03 -5.14301187e-05 6.01169111e-06 3.76783176e-05 -9.18167788e-05 3.00646587e-05 6.87613283e-04 6.81713437e-03 -6.57035650e-04 -5.24268434e-04 -3.28585621e-03 2.22683177e-03 1.77685580e-03 1.11364566e-02 -4.63619533e-04 5.41927084e-05 3.39653192e-04 -8.27687223e-04 2.71019461e-04 6.67269383e-05 6.57035650e-04 1.92258838e-05 -5.33559376e-05 -3.34408725e-04 -7.05363830e-05 1.80405053e-04 1.13068998e-03 -6.41045673e-05 -3.62818371e-06 -2.27396677e-05 -8.98689534e-05 2.94268591e-05 5.32434237e-05 5.24268434e-04 -5.33559376e-05 4.35195277e-05 -2.66834743e-04 1.80405053e-04 -1.52677122e-04 9.02211418e-04 -3.46750970e-05 -7.22612770e-06 2.94268591e-05 -8.12214723e-05 -3.61380948e-05 3.33703543e-04 3.28585621e-03 -3.34408725e-04 -2.66834743e-04 -1.58629486e-03 1.13068998e-03 9.02211418e-04 5.35798888e-03 -2.17326421e-04 2.94268591e-05 1.72511779e-04 -3.89818831e-04 1.37652318e-04 -2.26563373e-04 -2.22683177e-03 -7.05363830e-05 1.80405053e-04 1.13068998e-03 2.58483775e-04 -6.09994620e-04 -3.82314570e-03 2.12587192e-04 1.33171633e-05 8.34654173e-05 2.95188630e-04 -9.66571200e-05 -1.80781705e-04 -1.77685580e-03 1.80405053e-04 -1.52677122e-04 9.02211418e-04 -6.09994620e-04 5.36222164e-04 -3.05060252e-03 1.13087588e-04 2.54896689e-05 -9.66571200e-05 2.68184452e-04 1.27474646e-04 -1.13305064e-03 -1.11364566e-02 1.13068998e-03 9.02211418e-04 5.35798888e-03 -3.82314570e-03 -3.05060252e-03 -1.80967183e-02 7.08777275e-04 -9.66571200e-05 -5.64887591e-04 1.27164748e-03 -4.50740737e-04 -5.14301187e-05 -4.63619533e-04 6.41045673e-05 3.46750970e-05 2.17326421e-04 -2.12587192e-04 -1.13087588e-04 -7.08777275e-04 6.85432992e-06 -2.83829043e-06 -1.77890058e-05 1.33015139e-05 -4.35547271e-06 6.01169111e-06 5.41927084e-05 3.62818371e-06 7.22612770e-06 -2.94268591e-05 -1.33171633e-05 -2.54896689e-05 9.66571200e-05 -2.83829043e-06 1.75926191e-07 -4.08157180e-06 -5.03221959e-06 -5.84321138e-06 3.76783176e-05 3.39653192e-04 2.27396677e-05 -2.94268591e-05 -1.72511779e-04 -8.34654173e-05 9.66571200e-05 5.64887591e-04 -1.77890058e-05 -4.08157180e-06 -2.47541273e-05 -1.73013905e-05 6.86040720e-06 -9.18167788e-05 -8.27687223e-04 8.98689534e-05 8.12214723e-05 3.89818831e-04 -2.95188630e-04 -2.68184452e-04 -1.27164748e-03 1.33015139e-05 -5.03221959e-06 -1.73013905e-05 2.52509450e-05 -1.94857942e-05 3.00646587e-05 2.71019461e-04 -2.94268591e-05 3.61380948e-05 -1.37652318e-04 9.66571200e-05 -1.27474646e-04 4.50740737e-04 -4.35547271e-06 -5.84321138e-06 6.86040720e-06 -1.94857942e-05 -2.78777589e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 1 -1 668 + 2.49533627e-03 1.63346318e-02 -3.21849571e-07 4.51422233e-06 -9.22323548e-03 9.01883251e-07 -1.26497031e-05 2.58452468e-02 3.48831445e-05 -4.21672991e-09 6.04193497e-05 5.91433329e-08 1.20137032e-02 6.01082515e-02 -1.09807340e-02 1.31965450e-02 -3.29565989e-02 2.72845593e-02 -3.27903320e-02 8.18894506e-02 1.54856066e-03 7.62745269e-04 -1.90485388e-03 2.40019942e-03 2.28923584e-03 1.63346318e-02 8.08113414e-02 -1.74088221e-06 2.44173988e-05 -4.98884199e-02 4.10775119e-06 -5.76148107e-05 1.17715728e-01 6.23674190e-03 3.68992533e-10 -7.53907267e-07 1.08023487e-02 1.05742102e-05 6.01082515e-02 1.53434765e-01 -3.71385764e-02 4.46327989e-02 -1.11464421e-01 5.68116881e-02 -6.82757633e-02 1.70509550e-01 1.89042825e-02 9.31132532e-03 -2.32537845e-02 2.93007883e-02 2.79461840e-02 3.21849571e-07 1.74088221e-06 3.21423107e-03 5.70356528e-10 -1.16532421e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 9.39497938e-08 -7.93736167e-08 1.62172242e-04 1.51407575e-07 1.48209947e-10 1.09807340e-02 3.71385764e-02 4.93089213e-03 1.11345143e-02 -2.78069541e-02 -1.48036826e-02 -2.23449951e-02 5.58036244e-02 5.07388648e-03 8.69963759e-05 -2.17261766e-04 5.42599424e-03 5.17514519e-03 -4.51422233e-06 -2.44173988e-05 5.70356528e-10 3.21422311e-03 1.63446934e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 -1.18024906e-06 5.65901208e-09 1.48209947e-10 -2.20299756e-06 1.62170174e-04 -1.31965450e-02 -4.46327989e-02 1.11345143e-02 8.14471088e-04 3.34181412e-02 -2.23449951e-02 -6.54275578e-03 -6.70642816e-02 -3.26186593e-03 -7.09859373e-04 5.17514519e-03 -8.15820833e-03 -2.13050881e-03 9.22323548e-03 4.98884199e-02 -1.16532421e-06 1.63446934e-05 -3.01804370e-02 2.96515158e-06 -4.15888498e-05 7.58907191e-02 2.41142642e-03 1.48209947e-10 -2.97156138e-07 4.17671101e-03 4.16787528e-06 3.29565989e-02 1.11464421e-01 -2.78069541e-02 3.34181412e-02 -6.92614920e-02 5.58036244e-02 -6.70642816e-02 1.34087272e-01 8.14607210e-03 5.17514519e-03 -1.15618479e-02 1.21961637e-02 1.38949222e-02 -9.01883251e-07 -4.10775119e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 2.45922452e-02 3.31896716e-09 -6.78114931e-06 -5.06783606e-07 8.30946994e-07 -1.69774974e-03 -7.59286878e-07 -7.43251239e-10 -2.72845593e-02 -5.68116881e-02 -1.48036826e-02 -2.23449951e-02 5.58036244e-02 4.13333807e-02 3.12575333e-02 -7.80614917e-02 -1.79649714e-02 9.44586949e-04 -2.35897905e-03 -1.79454777e-02 -1.71158406e-02 1.26497031e-05 5.76148107e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 3.31896716e-09 2.45921989e-02 9.51115626e-05 5.66884180e-06 -5.92434932e-08 -7.43251239e-10 1.14806110e-05 -1.69773937e-03 3.27903320e-02 6.82757633e-02 -2.23449951e-02 -6.54275578e-03 -6.70642816e-02 3.12575333e-02 2.97774956e-02 9.38135816e-02 1.00765461e-02 1.32233329e-03 -1.71158406e-02 2.82140847e-02 3.96873358e-03 -2.58452468e-02 -1.17715728e-01 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -6.78114931e-06 9.51115626e-05 -1.69734988e-01 -1.15822968e-02 -7.43251239e-10 1.45933026e-06 -2.00611161e-02 -2.04683860e-05 -8.18894506e-02 -1.70509550e-01 5.58036244e-02 -6.70642816e-02 1.34087272e-01 -7.80614917e-02 9.38135816e-02 -1.66944310e-01 -2.51648207e-02 -1.71158406e-02 3.72132887e-02 -3.72590354e-02 -4.47225876e-02 3.48831445e-05 6.23674190e-03 -9.39497938e-08 1.18024906e-06 -2.41142642e-03 5.06783606e-07 -5.66884180e-06 1.15822968e-02 -1.04434616e-03 1.94361970e-07 -1.67843343e-03 -1.64298602e-06 1.54856066e-03 1.89042825e-02 -5.07388648e-03 3.26186593e-03 -8.14607210e-03 1.79649714e-02 -1.00765461e-02 2.51648207e-02 1.04765907e-03 -5.80092890e-05 1.44870409e-04 1.55858346e-03 1.48652862e-03 3.68992533e-10 7.93736167e-08 -5.65901208e-09 -1.48209947e-10 -8.30946994e-07 5.92434932e-08 7.43251239e-10 -7.53013993e-05 -6.25334397e-07 -1.64767438e-10 4.45841973e-08 7.62745269e-04 9.31132532e-03 -8.69963759e-05 7.09859373e-04 -5.17514519e-03 -9.44586949e-04 -1.32233329e-03 1.71158406e-02 -5.80092890e-05 2.22463031e-04 -1.11427933e-03 -1.23496461e-04 9.84675374e-04 -4.21672991e-09 -7.53907267e-07 -1.62172242e-04 -1.48209947e-10 2.97156138e-07 1.69774974e-03 7.43251239e-10 -1.45933026e-06 1.94361970e-07 -6.25334397e-07 1.20235056e-03 2.47475994e-07 2.64070842e-10 -1.90485388e-03 -2.32537845e-02 2.17261766e-04 -5.17514519e-03 1.15618479e-02 2.35897905e-03 1.71158406e-02 -3.72132887e-02 1.44870409e-04 -1.11427933e-03 2.55904414e-03 -1.28714748e-03 -7.86191236e-04 6.04193497e-05 1.08023487e-02 -1.51407575e-07 2.20299756e-06 -4.17671101e-03 7.59286878e-07 -1.14806110e-05 2.00611161e-02 -1.67843343e-03 -1.64767438e-10 2.47475994e-07 -2.98243108e-03 -4.09640213e-06 2.40019942e-03 2.93007883e-02 -5.42599424e-03 8.15820833e-03 -1.21961637e-02 1.79454777e-02 -2.82140847e-02 3.72590354e-02 1.55858346e-03 -1.23496461e-04 -1.28714748e-03 2.90539462e-03 5.88115344e-04 5.91433329e-08 1.05742102e-05 -1.48209947e-10 -1.62170174e-04 -4.16787528e-06 7.43251239e-10 1.69773937e-03 2.04683860e-05 -1.64298602e-06 4.45841973e-08 2.64070842e-10 -4.09640213e-06 1.20234688e-03 2.28923584e-03 2.79461840e-02 -5.17514519e-03 2.13050881e-03 -1.38949222e-02 1.71158406e-02 -3.96873358e-03 4.47225876e-02 1.48652862e-03 9.84675374e-04 -7.86191236e-04 5.88115344e-04 2.84969841e-03 5.23188812e-05 5.33933100e-04 5.09689763e-05 -6.12540461e-05 -2.54721125e-04 -1.74532039e-04 2.09750997e-04 8.72236420e-04 -4.39586076e-05 -7.49406223e-06 -3.11635897e-05 -7.33679930e-05 3.74521150e-05 2.51919723e-03 1.64671600e-02 3.24902890e-07 -4.55704780e-06 -9.30268310e-03 -9.09846362e-07 1.27613927e-05 2.60508990e-02 3.81198897e-05 4.61198093e-09 6.60255543e-05 -6.46870749e-08 5.33933100e-04 5.42487621e-03 5.14203684e-04 -6.17965249e-04 -2.56976989e-03 -1.76077461e-03 2.11608271e-03 8.79959777e-03 -4.18595403e-04 -7.13621330e-05 -2.96754973e-04 -6.98645983e-04 3.56637392e-04 1.64671600e-02 8.12088709e-02 1.75317606e-06 -2.45898309e-05 -5.01972800e-02 -4.12894643e-06 5.79120927e-05 1.18220802e-01 6.31097933e-03 3.74031330e-10 7.63541461e-07 1.09309316e-02 -1.07093382e-05 -5.09689763e-05 -5.14203684e-04 1.21313927e-05 6.15988994e-05 2.56155176e-04 -4.44544244e-05 -2.10343994e-04 -8.74702363e-04 5.45557124e-05 -3.70261553e-06 -1.53970954e-05 7.31373167e-05 -3.73343618e-05 -3.24902890e-07 -1.75317606e-06 3.24322663e-03 5.75530342e-10 1.17487826e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 -9.56120788e-08 8.30764056e-08 1.69590820e-04 -1.53758742e-07 1.50641723e-10 6.12540461e-05 6.17965249e-04 6.15988994e-05 -1.06416713e-05 -3.07844930e-04 -2.10343994e-04 3.33095825e-05 1.05120924e-03 -4.62121485e-05 3.19077277e-07 -3.73343618e-05 -9.90688690e-05 -1.59461164e-06 4.55704780e-06 2.45898309e-05 5.75530342e-10 3.24321860e-03 -1.64786973e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 1.19715064e-06 -5.92300780e-09 1.50641723e-10 2.23967753e-06 1.69588718e-04 2.54721125e-04 2.56976989e-03 2.56155176e-04 -3.07844930e-04 -1.21676659e-03 -8.74702363e-04 1.05120924e-03 4.15190808e-03 -1.92170333e-04 -3.73343618e-05 -1.45955556e-04 -3.19046297e-04 1.75408043e-04 9.30268310e-03 5.01972800e-02 1.17487826e-06 -1.64786973e-05 -3.03961175e-02 -2.98584860e-06 4.18791437e-05 7.63361082e-02 2.44384381e-03 1.50641723e-10 3.01594476e-07 4.23285954e-03 -4.23012686e-06 1.74532039e-04 1.76077461e-03 -4.44544244e-05 -2.10343994e-04 -8.74702363e-04 1.62545668e-04 7.18879714e-04 2.98941639e-03 -1.84493181e-04 1.35678454e-05 5.64210375e-05 -2.45889231e-04 1.25518927e-04 9.09846362e-07 4.12894643e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 2.47606941e-02 3.33799472e-09 6.81412802e-06 5.13892822e-07 -8.49490276e-07 -1.73413560e-03 7.68956244e-07 -7.53367854e-10 -2.09750997e-04 -2.11608271e-03 -2.10343994e-04 3.33095825e-05 1.05120924e-03 7.18879714e-04 -1.03223589e-04 -3.59265307e-03 1.54719851e-04 -2.00433142e-06 1.25518927e-04 3.34191239e-04 1.00167904e-05 -1.27613927e-05 -5.79120927e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 3.33799472e-09 2.47606475e-02 -9.55741178e-05 -5.73643688e-06 6.05655645e-08 -7.53367854e-10 -1.16347756e-05 -1.73412509e-03 -8.72236420e-04 -8.79959777e-03 -8.74702363e-04 1.05120924e-03 4.15190808e-03 2.98941639e-03 -3.59265307e-03 -1.41791040e-02 6.43392836e-04 1.25518927e-04 4.89774130e-04 1.06798483e-03 -5.88606037e-04 -2.60508990e-02 -1.18220802e-01 -2.98584860e-06 4.18791437e-05 7.63361082e-02 6.81412802e-06 -9.55741178e-05 -1.70342752e-01 -1.17102688e-02 -7.53367854e-10 -1.47734692e-06 -2.02827699e-02 2.07210855e-05 -4.39586076e-05 -4.18595403e-04 -5.45557124e-05 4.62121485e-05 1.92170333e-04 1.84493181e-04 -1.54719851e-04 -6.43392836e-04 1.46018896e-05 5.20693732e-06 2.16527236e-05 2.56290823e-05 -1.30828621e-05 3.81198897e-05 6.31097933e-03 9.56120788e-08 -1.19715064e-06 -2.44384381e-03 -5.13892822e-07 5.73643688e-06 1.17102688e-02 -1.04903361e-03 -1.95706982e-07 -1.68462869e-03 1.65047766e-06 -7.49406223e-06 -7.13621330e-05 3.70261553e-06 -3.19077277e-07 3.73343618e-05 -1.35678454e-05 2.00433142e-06 -1.25518927e-04 5.20693732e-06 -5.65918530e-07 -4.39091325e-06 8.74489962e-06 2.51514338e-06 3.74031330e-10 -8.30764056e-08 5.92300780e-09 -1.50641723e-10 8.49490276e-07 -6.05655645e-08 7.53367854e-10 -7.64120124e-05 6.31900794e-07 -1.66051241e-10 -4.50523593e-08 -3.11635897e-05 -2.96754973e-04 1.53970954e-05 3.73343618e-05 1.45955556e-04 -5.64210375e-05 -1.25518927e-04 -4.89774130e-04 2.16527236e-05 -4.39091325e-06 -1.77693524e-05 2.39329384e-05 -1.38953425e-05 4.61198093e-09 7.63541461e-07 -1.69590820e-04 -1.50641723e-10 -3.01594476e-07 1.73413560e-03 7.53367854e-10 1.47734692e-06 -1.95706982e-07 6.31900794e-07 1.21353966e-03 -2.48869296e-07 2.65893782e-10 -7.33679930e-05 -6.98645983e-04 -7.31373167e-05 9.90688690e-05 3.19046297e-04 2.45889231e-04 -3.34191239e-04 -1.06798483e-03 2.56290823e-05 8.74489962e-06 2.39329384e-05 3.98514227e-05 -3.62328248e-05 6.60255543e-05 1.09309316e-02 1.53758742e-07 -2.23967753e-06 -4.23285954e-03 -7.68956244e-07 1.16347756e-05 2.02827699e-02 -1.68462869e-03 -1.66051241e-10 -2.48869296e-07 -2.99427218e-03 4.12251080e-06 3.74521150e-05 3.56637392e-04 3.73343618e-05 1.59461164e-06 -1.75408043e-04 -1.25518927e-04 -1.00167904e-05 5.88606037e-04 -1.30828621e-05 2.51514338e-06 -1.38953425e-05 -3.62328248e-05 -1.26322554e-05 -6.46870749e-08 -1.07093382e-05 -1.50641723e-10 -1.69588718e-04 4.23012686e-06 7.53367854e-10 1.73412509e-03 -2.07210855e-05 1.65047766e-06 -4.50523593e-08 2.65893782e-10 4.12251080e-06 1.21353595e-03 + 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 256 282 308 334 359 385 411 437 463 489 515 541 566 590 616 642 668 +-1 1 0 676 + 3.89331986e-02 1.42829079e-01 -4.88176312e-06 6.99865125e-02 -6.99785278e-02 1.03594733e-05 -1.48516712e-01 1.48499767e-01 1.21287926e-02 1.46551442e-06 -1.46534722e-06 -2.39689066e-06 2.10076849e-02 9.13413085e-03 4.82140963e-02 -8.36708994e-03 2.67873350e-02 -8.38039646e-03 2.13033914e-02 -6.82030534e-02 2.13372711e-02 1.01368559e-03 1.21499085e-03 -3.80108923e-04 -1.75454691e-03 1.21692310e-03 1.42829079e-01 2.06779927e-01 -9.99851519e-06 1.43341901e-01 -1.43325548e-01 1.04981073e-05 -1.50504214e-01 1.50487043e-01 2.77767575e-02 3.35624824e-06 -3.35586533e-06 -5.48923978e-06 4.81107552e-02 4.82140963e-02 1.40311851e-01 -3.10388719e-02 9.93713065e-02 -3.10882342e-02 5.20225384e-02 -1.66550757e-01 5.21052719e-02 1.64442577e-02 1.97098813e-02 -6.16622068e-03 -2.84626926e-02 1.97412267e-02 4.88176312e-06 9.99851519e-06 4.33830748e-02 7.86401912e-06 -7.86312192e-06 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 3.44741836e-06 -1.46430081e-02 1.46413375e-02 -4.48205055e-10 3.92831877e-06 8.36708994e-03 3.10388719e-02 3.78907840e-03 2.28612530e-02 -7.15212483e-03 -1.16714566e-02 -4.80867174e-02 1.50438913e-02 3.66479620e-03 3.48771916e-04 -1.09113017e-04 -4.58073089e-03 3.17711497e-03 -6.99865125e-02 -1.43341901e-01 7.86401912e-06 -6.93580099e-02 1.12728223e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 -2.40608543e-02 -2.90737451e-06 3.92831877e-06 -1.46365828e-02 -4.16762926e-02 -2.67873350e-02 -9.93713065e-02 2.28612530e-02 -6.22607183e-02 2.28976102e-02 -4.80867174e-02 1.27258720e-01 -4.81631917e-02 -6.84279107e-03 -9.27355549e-03 3.17711497e-03 1.18419644e-02 -9.28830360e-03 6.99785278e-02 1.43325548e-01 -7.86312192e-06 1.12728223e-01 -6.93322862e-02 1.21794940e-05 -1.74609109e-01 9.02112683e-02 2.40581092e-02 3.92831877e-06 -2.90647810e-06 -1.46477626e-02 4.16681967e-02 8.38039646e-03 3.10882342e-02 -7.15212483e-03 2.28976102e-02 3.76634783e-03 1.50438913e-02 -4.81631917e-02 -1.16236447e-02 2.14076175e-03 3.17711497e-03 -1.12093704e-04 -5.47128247e-03 3.58869286e-04 -1.03594733e-05 -1.04981073e-05 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 1.23008948e-01 1.10829756e-05 -1.10817111e-05 -6.30793787e-06 3.70743003e-02 -3.70700705e-02 6.56460776e-10 -5.75358792e-06 -2.13033914e-02 -5.20225384e-02 -1.16714566e-02 -4.80867174e-02 1.50438913e-02 3.41164258e-02 7.47499637e-02 -2.33854667e-02 -1.40773202e-02 8.59733987e-04 -2.68967095e-04 1.66369942e-02 -1.15391287e-02 1.48516712e-01 1.50504214e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 1.10829756e-05 -3.58801230e-02 1.58870944e-01 2.62180358e-02 3.16820394e-06 -5.75358792e-06 3.70648895e-02 4.54151998e-02 6.82030534e-02 1.66550757e-01 -4.80867174e-02 1.27258720e-01 -4.81631917e-02 7.47499637e-02 -1.81848111e-01 7.48688416e-02 2.36249776e-02 3.30169034e-02 -1.15391287e-02 -4.08829883e-02 3.30694115e-02 -1.48499767e-01 -1.50487043e-01 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -1.10817111e-05 1.58870944e-01 -3.58438699e-02 -2.62150446e-02 -5.75358792e-06 3.16689102e-06 3.70794811e-02 -4.54015593e-02 -2.13372711e-02 -5.21052719e-02 1.50438913e-02 -4.81631917e-02 -1.16236447e-02 -2.33854667e-02 7.48688416e-02 3.40421031e-02 -7.39105545e-03 -1.15391287e-02 -2.57085073e-04 2.05366950e-02 8.23060828e-04 1.21287926e-02 2.77767575e-02 -3.44741836e-06 2.40608543e-02 -2.40581092e-02 6.30793787e-06 -2.62180358e-02 2.62150446e-02 1.63155837e-02 2.90562388e-06 -2.90529238e-06 -3.21565109e-06 2.81837574e-02 1.01368559e-03 1.64442577e-02 -3.66479620e-03 6.84279107e-03 -2.14076175e-03 1.40773202e-02 -2.36249776e-02 7.39105545e-03 4.22755686e-04 -1.07459687e-03 3.36186776e-04 -5.05815484e-04 3.50824789e-04 1.46551442e-06 3.35624824e-06 1.46430081e-02 2.90737451e-06 -3.92831877e-06 -3.70743003e-02 -3.16820394e-06 5.75358792e-06 2.90562388e-06 -7.73263348e-03 7.77543003e-03 5.41908480e-07 3.94790847e-06 1.21499085e-03 1.97098813e-02 -3.48771916e-04 9.27355549e-03 -3.17711497e-03 -8.59733987e-04 -3.30169034e-02 1.15391287e-02 -1.07459687e-03 1.78855359e-03 -5.99102215e-04 2.15249823e-04 -4.62502263e-04 -1.46534722e-06 -3.35586533e-06 -1.46413375e-02 -3.92831877e-06 2.90647810e-06 3.70700705e-02 5.75358792e-06 -3.16689102e-06 -2.90529238e-06 7.77543003e-03 -7.73085920e-03 5.42871179e-07 -3.94733429e-06 -3.80108923e-04 -6.16622068e-03 1.09113017e-04 -3.17711497e-03 1.12093704e-04 2.68967095e-04 1.15391287e-02 2.57085073e-04 3.36186776e-04 -5.99102215e-04 6.09950699e-05 -5.82069010e-04 -5.97436336e-04 -2.39689066e-06 -5.48923978e-06 4.48205055e-10 1.46365828e-02 1.46477626e-02 -6.56460776e-10 -3.70648895e-02 -3.70794811e-02 -3.21565109e-06 5.41908480e-07 5.42871179e-07 -1.55071762e-02 -7.34396046e-06 -1.75454691e-03 -2.84626926e-02 4.58073089e-03 -1.18419644e-02 5.47128247e-03 -1.66369942e-02 4.08829883e-02 -2.05366950e-02 -5.05815484e-04 2.15249823e-04 -5.82069010e-04 1.00928788e-03 1.03954640e-03 2.10076849e-02 4.81107552e-02 -3.92831877e-06 4.16762926e-02 -4.16681967e-02 5.75358792e-06 -4.54151998e-02 4.54015593e-02 2.81837574e-02 3.94790847e-06 -3.94733429e-06 -7.34396046e-06 4.88593834e-02 1.21692310e-03 1.97412267e-02 -3.17711497e-03 9.28830360e-03 -3.58869286e-04 1.15391287e-02 -3.30694115e-02 -8.23060828e-04 3.50824789e-04 -4.62502263e-04 -5.97436336e-04 1.03954640e-03 1.78708369e-03 1.59214781e-02 7.49621864e-02 1.45097888e-02 1.15777953e-02 -4.34981874e-02 -3.50326952e-02 -2.79536374e-02 1.05022806e-01 2.34372060e-03 -8.49746770e-04 3.19252873e-03 4.44634379e-03 2.54741435e-03 3.93376184e-02 1.43812330e-01 4.93149668e-06 7.05611715e-02 -7.05692375e-02 -1.04449263e-05 -1.49448795e-01 1.49465879e-01 1.23041896e-02 -1.48928208e-06 1.48945232e-06 2.43604152e-06 2.13114816e-02 7.49621864e-02 1.67042811e-01 4.43509360e-02 3.53889409e-02 -1.32957505e-01 -6.16457010e-02 -4.91889522e-02 1.84804637e-01 2.06547652e-02 -7.48865714e-03 2.81351503e-02 3.91847846e-02 2.24498796e-02 1.43812330e-01 2.07135892e-01 1.00434680e-05 1.43704622e-01 -1.43721049e-01 -1.05141295e-05 -1.50438973e-01 1.50456170e-01 2.76747208e-02 -3.34970988e-06 3.35009279e-06 5.47917180e-06 4.79340224e-02 -1.45097888e-02 -4.43509360e-02 6.48790170e-03 -9.66179294e-03 3.62996985e-02 -1.89218241e-02 1.84117933e-02 -6.91737598e-02 -6.99094766e-03 3.62986870e-07 -1.36375454e-06 -8.69940048e-03 -4.98409000e-03 -4.93149668e-06 -1.00434680e-05 4.38001625e-02 -7.92516748e-06 7.92607343e-06 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 -3.48998183e-06 -1.48228696e-02 1.48245640e-02 -4.54127846e-10 -3.97289502e-06 -1.15777953e-02 -3.53889409e-02 -9.66179294e-03 1.08870402e-02 2.89646172e-02 1.84117933e-02 -2.73049501e-02 -5.51958159e-02 -2.69928704e-03 -7.56527371e-04 -4.98409000e-03 -8.60370354e-03 2.26795646e-03 -7.05611715e-02 -1.43704622e-01 -7.92516748e-06 -6.95952497e-02 1.13408375e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -2.42616285e-02 2.93647550e-06 -3.97289502e-06 -1.48293676e-02 -4.20206786e-02 4.34981874e-02 1.32957505e-01 3.62996985e-02 2.89646172e-02 -9.02246192e-02 -6.91737598e-02 -5.51958159e-02 1.65376365e-01 1.01413171e-02 -4.98409000e-03 1.66422736e-02 1.98345966e-02 1.32793688e-02 7.05692375e-02 1.43721049e-01 7.92607343e-06 1.13408375e-01 -6.96211764e-02 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 2.42644019e-02 -3.97289502e-06 2.93738375e-06 -1.48180658e-02 4.20288712e-02 3.50326952e-02 6.16457010e-02 -1.89218241e-02 1.84117933e-02 -6.91737598e-02 4.98422119e-02 -2.30269492e-02 8.65130641e-02 2.23688827e-02 1.34340094e-03 -5.04720493e-03 2.54143428e-02 1.45604714e-02 1.04449263e-05 1.05141295e-05 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 1.23594998e-01 -1.11023371e-05 1.11036062e-05 6.33444089e-06 3.73055268e-02 -3.73097913e-02 6.58066333e-10 5.75703181e-06 2.79536374e-02 4.91889522e-02 1.84117933e-02 -2.73049501e-02 -5.51958159e-02 -2.30269492e-02 6.03266777e-02 6.90313664e-02 7.10944542e-03 3.89504815e-03 1.45604714e-02 2.64792361e-02 -1.16767746e-02 1.49448795e-01 1.50438973e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -1.11023371e-05 -3.52602051e-02 1.58873363e-01 2.60198035e-02 -3.14910296e-06 5.75703181e-06 3.73149430e-02 4.50633570e-02 -1.05022806e-01 -1.84804637e-01 -6.91737598e-02 -5.51958159e-02 1.65376365e-01 8.65130641e-02 6.90313664e-02 -1.80652720e-01 -2.67104384e-02 1.45604714e-02 -4.69336374e-02 -5.28934061e-02 -3.74497558e-02 -1.49465879e-01 -1.50456170e-01 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 1.11036062e-05 1.58873363e-01 -3.52965257e-02 -2.60227779e-02 5.75703181e-06 -3.15041910e-06 3.73003748e-02 -4.50770378e-02 2.34372060e-03 2.06547652e-02 6.99094766e-03 2.69928704e-03 -1.01413171e-02 -2.23688827e-02 -7.10944542e-03 2.67104384e-02 1.83559694e-03 -4.59919079e-04 1.72793228e-03 3.84583379e-03 2.20336812e-03 1.23041896e-02 2.76747208e-02 3.48998183e-06 2.42616285e-02 -2.42644019e-02 -6.33444089e-06 -2.60198035e-02 2.60227779e-02 1.65141115e-02 -2.95659433e-06 2.95693230e-06 3.25513784e-06 2.84772691e-02 -8.49746770e-04 -7.48865714e-03 -3.62986870e-07 7.56527371e-04 4.98409000e-03 -1.34340094e-03 -3.89504815e-03 -1.45604714e-02 -4.59919079e-04 -6.39026659e-05 -1.22746087e-03 -8.87662295e-04 -1.19619431e-03 -1.48928208e-06 -3.34970988e-06 1.48228696e-02 -2.93647550e-06 3.97289502e-06 -3.73055268e-02 3.14910296e-06 -5.75703181e-06 -2.95659433e-06 -7.91184381e-03 7.98550905e-03 -5.58562361e-07 -4.00482622e-06 3.19252873e-03 2.81351503e-02 1.36375454e-06 4.98409000e-03 -1.66422736e-02 5.04720493e-03 -1.45604714e-02 4.69336374e-02 1.72793228e-03 -1.22746087e-03 4.22100136e-03 4.52827279e-03 2.41132828e-03 1.48945232e-06 3.35009279e-06 -1.48245640e-02 3.97289502e-06 -2.93738375e-06 3.73097913e-02 -5.75703181e-06 3.15041910e-06 2.95693230e-06 7.98550905e-03 -7.91366940e-03 -5.57582947e-07 4.00541161e-06 4.44634379e-03 3.91847846e-02 8.69940048e-03 8.60370354e-03 -1.98345966e-02 -2.54143428e-02 -2.64792361e-02 5.28934061e-02 3.84583379e-03 -8.87662295e-04 4.52827279e-03 6.80144856e-03 3.13716200e-03 2.43604152e-06 5.47917180e-06 4.54127846e-10 1.48293676e-02 1.48180658e-02 -6.58066333e-10 -3.73149430e-02 -3.73003748e-02 3.25513784e-06 -5.58562361e-07 -5.57582947e-07 -1.58982655e-02 7.46365585e-06 2.54741435e-03 2.24498796e-02 4.98409000e-03 -2.26795646e-03 -1.32793688e-02 -1.45604714e-02 1.16767746e-02 3.74497558e-02 2.20336812e-03 -1.19619431e-03 2.41132828e-03 3.13716200e-03 3.12309261e-03 2.13114816e-02 4.79340224e-02 3.97289502e-06 4.20206786e-02 -4.20288712e-02 -5.75703181e-06 -4.50633570e-02 4.50770378e-02 2.84772691e-02 -4.00482622e-06 4.00541161e-06 7.46365585e-06 4.93968293e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 1 1 668 + 2.49376946e-03 1.63259218e-02 -3.21649074e-07 9.21801592e-03 -3.98531392e-06 9.01360150e-07 -2.58317306e-02 1.11680818e-05 3.46712384e-05 4.19087540e-09 -6.00523242e-05 5.19260133e-08 2.86743884e-05 3.03601879e-04 -2.81631572e-05 1.46483123e-04 2.81105037e-05 9.78381575e-05 -5.08878985e-04 -9.76552406e-05 -2.99417410e-05 -2.07100671e-05 -3.97431736e-06 5.18754913e-05 2.06713478e-05 1.63259218e-02 8.07851388e-02 -1.74007357e-06 4.98680929e-02 -2.15599546e-05 4.10635424e-06 -1.17682412e-01 5.08787746e-05 6.23186384e-03 7.53274645e-07 -3.25670509e-10 -1.07939008e-02 9.33326466e-06 3.03601879e-04 3.21575840e-03 -2.96494237e-04 1.54213540e-03 2.95939916e-04 1.03197625e-03 -5.36754821e-03 -1.03004688e-03 -3.08979967e-04 -2.13714888e-04 -4.10124596e-05 5.35322497e-04 2.13315330e-04 3.21649074e-07 1.74007357e-06 3.21232643e-03 1.16469636e-06 -5.03544437e-10 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 9.38408078e-08 -1.61686673e-04 6.99035624e-08 -1.51253354e-07 1.30785673e-10 2.81631572e-05 2.96494237e-04 3.23994267e-06 1.48068019e-04 2.84146495e-05 -1.16058529e-05 -5.14065233e-04 -9.86504956e-05 -3.64463602e-05 5.64931562e-06 1.08411880e-06 5.28557929e-05 2.10619784e-05 -9.21801592e-03 -4.98680929e-02 1.16469636e-06 -3.01662544e-02 1.44308845e-05 -2.96379028e-06 7.58614025e-02 -3.67221163e-05 -2.40929773e-03 -2.96864946e-07 1.30785673e-10 4.17302446e-03 -3.67823227e-06 -1.46483123e-04 -1.54213540e-03 1.48068019e-04 -7.38428346e-04 -1.47791193e-04 -5.14065233e-04 2.56333156e-03 5.13104143e-04 1.43232336e-04 1.04610281e-04 2.10619784e-05 -2.48164512e-04 -1.04414703e-04 3.98531392e-06 2.15599546e-05 -5.03544437e-10 1.44308845e-05 3.21232023e-03 1.28136410e-09 -3.67221163e-05 -9.07669659e-03 1.04163497e-06 1.30785673e-10 5.64176189e-09 -1.94397114e-06 -1.61685063e-04 -2.81105037e-05 -2.95939916e-04 2.84146495e-05 -1.47791193e-04 3.34628948e-06 -9.86504956e-05 5.13104143e-04 -1.19750697e-05 2.74866691e-05 2.10619784e-05 -1.10130512e-06 -5.78905140e-05 5.72814377e-06 -9.01360150e-07 -4.10635424e-06 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 2.45811607e-02 6.77897519e-06 -2.93081987e-09 -5.06317042e-07 1.69536494e-03 -7.32973512e-07 7.58652036e-07 -6.55990858e-10 -9.78381575e-05 -1.03197625e-03 -1.16058529e-05 -5.14065233e-04 -9.86504956e-05 4.12502670e-05 1.78748358e-03 3.43022888e-04 1.26668904e-04 -2.03418669e-05 -3.90365876e-06 -1.83463714e-04 -7.31066280e-05 2.58317306e-02 1.17682412e-01 -2.96379028e-06 7.58614025e-02 -3.67221163e-05 6.77897519e-06 -1.69694857e-01 8.39932287e-05 1.15738852e-02 1.45814709e-06 -6.55990858e-10 -2.00465492e-02 1.80668138e-05 5.08878985e-04 5.36754821e-03 -5.14065233e-04 2.56333156e-03 5.13104143e-04 1.78748358e-03 -8.91220164e-03 -1.78414172e-03 -4.96739673e-04 -3.62963852e-04 -7.31066280e-05 8.60651966e-04 3.62285260e-04 -1.11680818e-05 -5.08787746e-05 1.28136410e-09 -3.67221163e-05 -9.07669659e-03 -2.93081987e-09 8.39932287e-05 2.45811246e-02 -5.00384967e-06 -6.55990858e-10 -5.91569780e-08 1.01328654e-05 1.69535687e-03 9.76552406e-05 1.03004688e-03 -9.86504956e-05 5.13104143e-04 -1.19750697e-05 3.43022888e-04 -1.78414172e-03 4.25340904e-05 -9.53256741e-05 -7.31066280e-05 3.96357634e-06 2.01080008e-04 -2.06154813e-05 3.46712384e-05 6.23186384e-03 -9.38408078e-08 2.40929773e-03 -1.04163497e-06 5.06317042e-07 -1.15738852e-02 5.00384967e-06 -1.04403562e-03 -1.94273263e-07 1.67802194e-03 -1.45095116e-06 -2.99417410e-05 -3.08979967e-04 3.64463602e-05 -1.43232336e-04 -2.74866691e-05 -1.26668904e-04 4.96739673e-04 9.53256741e-05 2.11830416e-05 2.24524588e-05 4.30868700e-06 -3.79536642e-05 -1.51237776e-05 4.19087540e-09 7.53274645e-07 1.61686673e-04 2.96864946e-07 -1.30785673e-10 -1.69536494e-03 -1.45814709e-06 6.55990858e-10 -1.94273263e-07 1.20161446e-03 -5.52030007e-07 2.47383923e-07 -2.33170086e-10 -2.07100671e-05 -2.13714888e-04 -5.64931562e-06 -1.04610281e-04 -2.10619784e-05 2.03418669e-05 3.62963852e-04 7.31066280e-05 2.24524588e-05 -7.98862250e-06 -1.54975750e-06 -3.04690229e-05 -1.30119923e-05 -3.25670509e-10 -6.99035624e-08 -1.30785673e-10 -5.64176189e-09 7.32973512e-07 6.55990858e-10 5.91569780e-08 -5.52030007e-07 -7.52286023e-05 -1.45478430e-10 -4.45534560e-08 -3.97431736e-06 -4.10124596e-05 -1.08411880e-06 -2.10619784e-05 1.10130512e-06 3.90365876e-06 7.31066280e-05 -3.96357634e-06 4.30868700e-06 -1.54975750e-06 -2.10278033e-07 -7.46477330e-06 1.56260546e-06 -6.00523242e-05 -1.07939008e-02 1.51253354e-07 -4.17302446e-03 1.94397114e-06 -7.58652036e-07 2.00465492e-02 -1.01328654e-05 1.67802194e-03 2.47383923e-07 -1.45478430e-10 -2.98164606e-03 3.61717981e-06 5.18754913e-05 5.35322497e-04 -5.28557929e-05 2.48164512e-04 5.78905140e-05 1.83463714e-04 -8.60651966e-04 -2.01080008e-04 -3.79536642e-05 -3.04690229e-05 -7.46477330e-06 6.50454066e-05 3.46190392e-05 5.19260133e-08 9.33326466e-06 -1.30785673e-10 3.67823227e-06 1.61685063e-04 6.55990858e-10 -1.80668138e-05 -1.69535687e-03 -1.45095116e-06 -2.33170086e-10 -4.45534560e-08 3.61717981e-06 1.20161159e-03 2.06713478e-05 2.13315330e-04 -2.10619784e-05 1.04414703e-04 -5.72814377e-06 7.31066280e-05 -3.62285260e-04 2.06154813e-05 -1.51237776e-05 -1.30119923e-05 1.56260546e-06 3.46190392e-05 -8.03732216e-06 2.08895479e-02 9.20873866e-02 1.89676747e-02 5.30649289e-02 -1.89322130e-02 -4.43361936e-02 -1.24037184e-01 4.42533032e-02 3.42700738e-03 -4.86761853e-03 1.73664213e-03 -5.94225059e-03 4.85851810e-03 2.52078031e-03 1.64759450e-02 3.25105461e-07 9.30795141e-03 4.02813944e-06 -9.10374471e-07 -2.60645309e-02 -1.12797715e-05 3.83352702e-05 -4.63830420e-09 -6.63986110e-05 -5.74697701e-08 9.20873866e-02 1.80152843e-01 5.21379164e-02 1.45863680e-01 -5.20404401e-02 -6.61957604e-02 -1.85192617e-01 6.60720016e-02 2.11152401e-02 -2.99914539e-02 1.07001857e-02 -3.66127159e-02 2.99353823e-02 1.64759450e-02 8.12351455e-02 1.75399033e-06 5.02177252e-02 2.17323868e-05 -4.13034744e-06 -1.18254160e-01 -5.11760565e-05 6.31590129e-03 -7.64180646e-07 -3.30709311e-10 -1.09394579e-02 -9.46839279e-06 -1.89676747e-02 -5.21379164e-02 8.46120638e-03 -4.38238460e-02 1.56352304e-02 -2.39746264e-02 7.90875822e-02 -2.82164319e-02 -9.42958278e-03 -2.99720375e-04 1.06932584e-04 1.01724039e-02 -8.31718681e-03 -3.25105461e-07 -1.75399033e-06 3.24514969e-03 -1.17551164e-06 -5.08718255e-10 -9.16018014e-03 2.98721950e-06 1.29275887e-09 -9.57225318e-08 -1.70084588e-04 -7.36063615e-08 1.53914899e-07 1.33217453e-10 -5.30649289e-02 -1.45863680e-01 -4.38238460e-02 -9.84780914e-02 4.37419135e-02 7.90875822e-02 1.69015521e-01 -7.89397211e-02 -1.14287747e-02 2.02265482e-02 -8.31718681e-03 1.98263470e-02 -2.01887329e-02 -9.30795141e-03 -5.02177252e-02 -1.17551164e-06 -3.04104068e-02 -1.45648885e-05 2.98721950e-06 7.63655869e-02 3.70124103e-05 -2.44599452e-03 3.01889189e-07 1.33217453e-10 4.23658515e-03 3.74048393e-06 1.89322130e-02 5.20404401e-02 1.56352304e-02 4.37419135e-02 8.51972398e-03 -2.82164319e-02 -7.89397211e-02 -2.40802313e-02 4.07749528e-03 -8.31718681e-03 -1.18259547e-04 -1.32332365e-02 -3.30848907e-04 -4.02813944e-06 -2.17323868e-05 -5.08718255e-10 -1.45648885e-05 3.24514343e-03 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -1.05853658e-06 1.33217453e-10 -5.94060849e-09 1.98065116e-06 -1.70082948e-04 4.43361936e-02 6.61957604e-02 -2.39746264e-02 7.90875822e-02 -2.82164319e-02 5.90458816e-02 -8.89277983e-02 3.17271700e-02 2.67406724e-02 8.51434677e-03 -3.03770174e-03 -2.53892258e-02 2.07588036e-02 9.10374471e-07 4.13034744e-06 -9.16018014e-03 2.98721950e-06 1.29275887e-09 2.47718463e-02 -6.81630736e-06 -2.94984743e-09 5.14364745e-07 1.73655412e-03 7.51516832e-07 -7.69597852e-07 -6.66107483e-10 1.24037184e-01 1.85192617e-01 7.90875822e-02 1.69015521e-01 -7.89397211e-02 -8.89277983e-02 -1.57956440e-01 8.87615401e-02 2.40411301e-02 -4.77072889e-02 2.07588036e-02 -4.17181523e-02 4.76180960e-02 2.60645309e-02 1.18254160e-01 2.98721950e-06 7.63655869e-02 3.70124103e-05 -6.81630736e-06 -1.70382850e-01 -8.44557838e-05 1.17187506e-02 -1.47854212e-06 -6.66107483e-10 -2.02974633e-02 -1.83195134e-05 -4.42533032e-02 -6.60720016e-02 -2.82164319e-02 -7.89397211e-02 -2.40802313e-02 3.17271700e-02 8.87615401e-02 5.91646261e-02 -8.57726198e-03 2.07588036e-02 3.07116259e-03 3.57995442e-02 8.59204024e-03 1.12797715e-05 5.11760565e-05 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -2.94984743e-09 -8.44557838e-05 2.47718100e-02 5.07144479e-06 -6.66107483e-10 6.06535786e-08 -1.02870302e-05 1.73654592e-03 3.42700738e-03 2.11152401e-02 9.42958278e-03 1.14287747e-02 -4.07749528e-03 -2.67406724e-02 -2.40411301e-02 8.57726198e-03 2.54489451e-03 -4.67588065e-03 1.66823494e-03 -5.58260993e-03 4.56446778e-03 3.83352702e-05 6.31590129e-03 9.57225318e-08 2.44599452e-03 1.05853658e-06 -5.14364745e-07 -1.17187506e-02 -5.07144479e-06 -1.04934184e-03 1.95795826e-07 1.68503499e-03 1.45844276e-06 -4.86761853e-03 -2.99914539e-02 2.99720375e-04 -2.02265482e-02 8.31718681e-03 -8.51434677e-03 4.77072889e-02 -2.07588036e-02 -4.67588065e-03 5.77315873e-03 -2.29285844e-03 7.98888992e-03 -6.55926547e-03 -4.63830420e-09 -7.64180646e-07 1.70084588e-04 -3.01889189e-07 -1.33217453e-10 -1.73655412e-03 1.47854212e-06 6.66107483e-10 1.95795826e-07 1.21428062e-03 5.58596407e-07 -2.48961148e-07 -2.34993022e-10 1.73664213e-03 1.07001857e-02 -1.06932584e-04 8.31718681e-03 1.18259547e-04 3.03770174e-03 -2.07588036e-02 -3.07116259e-03 1.66823494e-03 -2.29285844e-03 1.64559903e-04 -2.89260846e-03 2.28834989e-03 -3.30709311e-10 7.36063615e-08 -1.33217453e-10 5.94060849e-09 -7.51516832e-07 6.66107483e-10 -6.06535786e-08 5.58596407e-07 -7.64858284e-05 -1.46762231e-10 4.50834198e-08 -5.94225059e-03 -3.66127159e-02 -1.01724039e-02 -1.98263470e-02 1.32332365e-02 2.53892258e-02 4.17181523e-02 -3.57995442e-02 -5.58260993e-03 7.98888992e-03 -2.89260846e-03 9.00556807e-03 -8.03323107e-03 -6.63986110e-05 -1.09394579e-02 -1.53914899e-07 -4.23658515e-03 -1.98065116e-06 7.69597852e-07 2.02974633e-02 1.02870302e-05 1.68503499e-03 -2.48961148e-07 -1.46762231e-10 -2.99505024e-03 -3.64328844e-06 4.85851810e-03 2.99353823e-02 8.31718681e-03 2.01887329e-02 3.30848907e-04 -2.07588036e-02 -4.76180960e-02 -8.59204024e-03 4.56446778e-03 -6.55926547e-03 2.28834989e-03 -8.03323107e-03 5.74860952e-03 -5.74697701e-08 -9.46839279e-06 -1.33217453e-10 -3.74048393e-06 1.70082948e-04 6.66107483e-10 1.83195134e-05 -1.73654592e-03 1.45844276e-06 -2.34993022e-10 4.50834198e-08 -3.64328844e-06 1.21427773e-03 + 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 258 282 308 334 359 385 411 437 463 489 515 541 566 592 616 642 668 +-1 1 2 169 + 1.20532254e-04 1.14730159e-03 1.15906276e-04 5.56045463e-04 1.16090607e-04 -3.85288171e-04 -1.84837048e-03 -3.85900910e-04 -6.83614235e-05 5.15974292e-05 1.07724588e-05 1.18371222e-04 5.16794867e-05 1.14730159e-03 1.06967980e-02 1.07551456e-03 5.15964289e-03 1.07722500e-03 -3.54679998e-03 -1.70153171e-02 -3.55244061e-03 -5.18423830e-04 3.91292860e-04 8.16937255e-05 8.97676778e-04 3.91915149e-04 -1.15906276e-04 -1.07551456e-03 4.34146551e-05 -5.52431618e-04 -1.15336112e-04 -1.58917178e-04 1.82049443e-03 3.80080976e-04 8.46557929e-05 4.35679035e-05 9.09606261e-06 -1.08683270e-04 -4.74498407e-05 -5.56045463e-04 -5.15964289e-03 -5.52431618e-04 -2.49165205e-03 -5.53310173e-04 1.82049443e-03 8.19519337e-03 1.82338963e-03 2.48608424e-04 -2.08316356e-04 -4.74498407e-05 -4.30451619e-04 -2.08647650e-04 -1.16090607e-04 -1.07722500e-03 -1.15336112e-04 -5.53310173e-04 4.30480989e-05 3.80080976e-04 1.82338963e-03 -1.57709221e-04 5.19042142e-05 -4.74498407e-05 9.05018523e-06 -1.27842976e-04 4.34171005e-05 3.85288171e-04 3.54679998e-03 -1.58917178e-04 1.82049443e-03 3.80080976e-04 5.81401382e-04 -5.98248174e-03 -1.24901646e-03 -2.63097441e-04 -1.59509000e-04 -3.33021268e-05 3.29268859e-04 1.43754920e-04 1.84837048e-03 1.70153171e-02 1.82049443e-03 8.19519337e-03 1.82338963e-03 -5.98248174e-03 -2.68717526e-02 -5.99199592e-03 -7.37302992e-04 6.25383703e-04 1.43754920e-04 1.27658937e-03 6.26378276e-04 3.85900910e-04 3.55244061e-03 3.80080976e-04 1.82338963e-03 -1.57709221e-04 -1.24901646e-03 -5.99199592e-03 5.77431812e-04 -1.53933369e-04 1.43754920e-04 -3.31540146e-05 3.93059986e-04 -1.59052124e-04 -6.83614235e-05 -5.18423830e-04 -8.46557929e-05 -2.48608424e-04 -5.19042142e-05 2.63097441e-04 7.37302992e-04 1.53933369e-04 -2.27214126e-05 4.85692413e-06 1.01402368e-06 4.01180111e-05 1.75150529e-05 5.15974292e-05 3.91292860e-04 -4.35679035e-05 2.08316356e-04 4.74498407e-05 1.59509000e-04 -6.25383703e-04 -1.43754920e-04 4.85692413e-06 -3.98591013e-05 -8.73250585e-06 -2.29921336e-05 -8.37688367e-06 1.07724588e-05 8.16937255e-05 -9.09606261e-06 4.74498407e-05 -9.05018523e-06 3.33021268e-05 -1.43754920e-04 3.31540146e-05 1.01402368e-06 -8.73250585e-06 1.44290958e-07 -1.75539249e-06 -8.72318116e-06 1.18371222e-04 8.97676778e-04 1.08683270e-04 4.30451619e-04 1.27842976e-04 -3.29268859e-04 -1.27658937e-03 -3.93059986e-04 4.01180111e-05 -2.29921336e-05 -1.75539249e-06 -6.90382621e-05 -1.57249844e-05 5.16794867e-05 3.91915149e-04 4.74498407e-05 2.08647650e-04 -4.34171005e-05 -1.43754920e-04 -6.26378276e-04 1.59052124e-04 1.75150529e-05 -8.37688367e-06 -8.72318116e-06 -1.57249844e-05 -3.98857244e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 2 -2 169 + 8.16831096e-07 8.54692732e-06 -2.63784829e-06 1.05681229e-06 -4.39773045e-06 8.58489187e-06 -3.43940146e-06 1.43124381e-05 -4.31988452e-07 -6.37831912e-07 2.65422047e-06 -2.08474415e-06 -1.06337155e-06 8.54692732e-06 8.93151253e-05 -2.76648735e-05 1.10834951e-05 -4.61219310e-05 8.98690212e-05 -3.60046053e-05 1.49826559e-04 -4.54140484e-06 -6.70539436e-06 2.79032683e-05 -2.19164821e-05 -1.11790041e-05 2.63784829e-06 2.76648735e-05 -8.21440228e-06 3.43592632e-06 -1.42979769e-05 2.68433096e-05 -1.12163119e-05 4.66746240e-05 -1.67360168e-06 -1.99887723e-06 8.31796084e-06 -6.82696681e-06 -3.48225094e-06 -1.05681229e-06 -1.10834951e-05 3.43592632e-06 -1.01473418e-06 5.72825885e-06 -1.12163119e-05 3.34055787e-06 -1.86994516e-05 5.14881149e-07 6.12550806e-07 -3.48225094e-06 2.82496433e-06 1.02122375e-06 4.39773045e-06 4.61219310e-05 -1.42979769e-05 5.72825885e-06 -2.34752827e-05 4.66746240e-05 -1.86994516e-05 7.66612564e-05 -2.14258343e-06 -3.48225094e-06 1.42664844e-05 -1.10078004e-05 -5.71564187e-06 -8.58489187e-06 -8.98690212e-05 2.68433096e-05 -1.12163119e-05 4.66746240e-05 -8.74820600e-05 3.65185528e-05 -1.51965257e-04 5.45917190e-06 6.55315199e-06 -2.72697396e-05 2.23563044e-05 1.14033456e-05 3.43940146e-06 3.60046053e-05 -1.12163119e-05 3.34055787e-06 -1.86994516e-05 3.65185528e-05 -1.09607859e-05 6.08824823e-05 -1.69036688e-06 -2.02443933e-06 1.14033456e-05 -9.24350753e-06 -3.37507602e-06 -1.43124381e-05 -1.49826559e-04 4.66746240e-05 -1.86994516e-05 7.66612564e-05 -1.51965257e-04 6.08824823e-05 -2.49681483e-04 7.03415164e-06 1.14033456e-05 -4.67370481e-05 3.60781716e-05 1.87244609e-05 -4.31988452e-07 -4.54140484e-06 1.67360168e-06 -5.14881149e-07 2.14258343e-06 -5.45917190e-06 1.69036688e-06 -7.03415164e-06 -8.38509941e-08 3.79573347e-07 -1.57952484e-06 9.23191508e-07 4.70894994e-07 -6.37831912e-07 -6.70539436e-06 1.99887723e-06 -6.12550806e-07 3.48225094e-06 -6.55315199e-06 2.02443933e-06 -1.14033456e-05 3.79573347e-07 3.54987214e-07 -2.03977935e-06 1.73163274e-06 6.21321090e-07 2.65422047e-06 2.79032683e-05 -8.31796084e-06 3.48225094e-06 -1.42664844e-05 2.72697396e-05 -1.14033456e-05 4.67370481e-05 -1.57952484e-06 -2.03977935e-06 8.35297827e-06 -6.73919858e-06 -3.50042866e-06 -2.08474415e-06 -2.19164821e-05 6.82696681e-06 -2.82496433e-06 1.10078004e-05 -2.23563044e-05 9.24350753e-06 -3.60781716e-05 9.23191508e-07 1.73163274e-06 -6.73919858e-06 5.06983808e-06 2.79343623e-06 -1.06337155e-06 -1.11790041e-05 3.48225094e-06 -1.02122375e-06 5.71564187e-06 -1.14033456e-05 3.37507602e-06 -1.87244609e-05 4.70894994e-07 6.21321090e-07 -3.50042866e-06 2.79343623e-06 1.01815144e-06 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +-1 2 -1 676 + 1.69076833e-04 1.55649490e-03 -3.23354778e-04 3.23648843e-04 -6.46944120e-04 1.05904640e-03 -1.06000952e-03 2.11886105e-03 -4.51059212e-05 -5.20492749e-05 1.04041689e-04 -7.80311210e-05 -1.04136307e-04 3.86191520e-05 4.02133307e-04 -1.13344487e-04 1.20969155e-04 -1.13404578e-04 3.91248844e-04 -4.17568098e-04 3.91456270e-04 -1.81969364e-06 -4.80115579e-05 4.50092463e-05 3.10409001e-06 -4.80370118e-05 1.55649490e-03 1.38824192e-02 -2.87776317e-03 2.88038026e-03 -5.75761390e-03 9.29696771e-03 -9.30542255e-03 1.86006795e-02 -2.87817072e-04 -3.32122026e-04 6.63881230e-04 -4.97909991e-04 -6.64484976e-04 4.02133307e-04 4.18123409e-03 -1.17051129e-03 1.24925142e-03 -1.17113185e-03 4.04560727e-03 -4.31775470e-03 4.04775210e-03 -1.81483078e-05 -4.78832542e-04 4.48889658e-04 3.09579479e-05 -4.79086401e-04 3.23354778e-04 2.87776317e-03 -4.11290064e-04 6.38705842e-04 -1.27671394e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -1.33188086e-04 -4.05852446e-05 8.11261525e-05 -1.33580368e-04 -1.78269465e-04 1.13344487e-04 1.17051129e-03 -2.98152175e-04 3.66055833e-04 -3.43165227e-04 1.02614487e-03 -1.26148781e-03 1.18260306e-03 -2.95762245e-05 -1.23333054e-04 1.15620656e-04 9.41155410e-06 -1.45647495e-04 -3.23648843e-04 -2.88038026e-03 6.38705842e-04 -4.12451239e-04 1.27787501e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 4.92750067e-05 4.07103584e-05 -1.78269465e-04 1.82219018e-04 8.14502486e-05 -1.20969155e-04 -1.24925142e-03 3.66055833e-04 -3.45849143e-04 3.66249903e-04 -1.26148781e-03 1.19051635e-03 -1.26215660e-03 -6.95026062e-06 1.34527160e-04 -1.45647495e-04 1.21925974e-05 1.34598481e-04 6.46944120e-04 5.75761390e-03 -1.27671394e-03 1.27787501e-03 -2.32751856e-03 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -9.84961837e-05 -1.78269465e-04 3.07871094e-04 -1.70276298e-04 -3.08151078e-04 1.13404578e-04 1.17113185e-03 -3.43165227e-04 3.66249903e-04 -2.98515946e-04 1.18260306e-03 -1.26215660e-03 1.02739848e-03 6.51563927e-06 -1.45647495e-04 1.15704052e-04 3.02632440e-05 -1.23487447e-04 -1.05904640e-03 -9.29696771e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -4.08670984e-03 6.64539894e-03 -1.32835382e-02 3.95352170e-04 8.97947178e-05 -1.79491341e-04 3.70253734e-04 4.94121524e-04 -3.91248844e-04 -4.04560727e-03 1.02614487e-03 -1.26148781e-03 1.18260306e-03 -3.53694347e-03 4.35349154e-03 -4.08125421e-03 1.02750661e-04 4.21065467e-04 -3.94734937e-04 -3.22340669e-05 4.98834843e-04 1.06000952e-03 9.30542255e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 6.64539894e-03 -4.09879125e-03 1.32956185e-02 -1.23474085e-04 -9.01621275e-05 4.94121524e-04 -5.27766916e-04 -1.80389660e-04 4.17568098e-04 4.31775470e-03 -1.26148781e-03 1.19051635e-03 -1.26215660e-03 4.35349154e-03 -4.10420214e-03 4.35579960e-03 2.45800046e-05 -4.59489366e-04 4.98834843e-04 -4.31026042e-05 -4.59732970e-04 -2.11886105e-03 -1.86006795e-02 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -1.32835382e-02 1.32956185e-02 -2.40240613e-02 2.46813282e-04 4.94121524e-04 -8.30669595e-04 4.26594825e-04 8.31425022e-04 -3.91456270e-04 -4.04775210e-03 1.18260306e-03 -1.26215660e-03 1.02739848e-03 -4.08125421e-03 4.35579960e-03 -3.54126979e-03 -2.30429407e-05 4.98834843e-04 -3.95021232e-04 -1.04909577e-04 4.21594254e-04 -4.51059212e-05 -2.87817072e-04 1.33188086e-04 -4.92750067e-05 9.84961837e-05 -3.95352170e-04 1.23474085e-04 -2.46813282e-04 -2.47411303e-05 -1.47282984e-05 2.94405072e-05 -3.40685171e-05 -4.54660846e-05 -1.81969364e-06 -1.81483078e-05 2.95762245e-05 6.95026062e-06 -6.51563927e-06 -1.02750661e-04 -2.45800046e-05 2.30429407e-05 -1.74665521e-05 7.55389309e-06 -7.08152473e-06 6.09338233e-07 -9.42974844e-06 -5.20492749e-05 -3.32122026e-04 4.05852446e-05 -4.07103584e-05 1.78269465e-04 -8.97947178e-05 9.01621275e-05 -4.94121524e-04 -1.47282984e-05 -2.51275068e-05 4.93575935e-05 -2.54736713e-05 -4.93856874e-05 -4.80115579e-05 -4.78832542e-04 1.23333054e-04 -1.34527160e-04 1.45647495e-04 -4.21065467e-04 4.59489366e-04 -4.98834843e-04 7.55389309e-06 3.15945630e-05 -3.70478846e-05 6.57119291e-06 4.08180468e-05 1.04041689e-04 6.63881230e-04 -8.11261525e-05 1.78269465e-04 -3.07871094e-04 1.79491341e-04 -4.94121524e-04 8.30669595e-04 2.94405072e-05 4.93575935e-05 -9.90964898e-05 6.93765564e-05 8.48872460e-05 4.50092463e-05 4.48889658e-04 -1.15620656e-04 1.45647495e-04 -1.15704052e-04 3.94734937e-04 -4.98834843e-04 3.95021232e-04 -7.08152473e-06 -3.70478846e-05 2.68065895e-05 1.22189974e-05 -3.70779227e-05 -7.80311210e-05 -4.97909991e-04 1.33580368e-04 -1.82219018e-04 1.70276298e-04 -3.70253734e-04 5.27766916e-04 -4.26594825e-04 -3.40685171e-05 -2.54736713e-05 6.93765564e-05 -6.40182947e-05 -6.02027351e-05 3.10409001e-06 3.09579479e-05 -9.41155410e-06 -1.21925974e-05 -3.02632440e-05 3.22340669e-05 4.31026042e-05 1.04909577e-04 6.09338233e-07 6.57119291e-06 1.22189974e-05 -1.81874420e-05 -3.23314547e-06 -1.04136307e-04 -6.64484976e-04 1.78269465e-04 -8.14502486e-05 3.08151078e-04 -4.94121524e-04 1.80389660e-04 -8.31425022e-04 -4.54660846e-05 -4.93856874e-05 8.48872460e-05 -6.02027351e-05 -9.92508158e-05 -4.80370118e-05 -4.79086401e-04 1.45647495e-04 -1.34598481e-04 1.23487447e-04 -4.98834843e-04 4.59732970e-04 -4.21594254e-04 -9.42974844e-06 4.08180468e-05 -3.70779227e-05 -3.23314547e-06 3.16378320e-05 6.96334772e-05 6.95444137e-04 -6.75212880e-05 5.38923083e-05 -3.37536749e-04 2.29166354e-04 -1.82909778e-04 1.14559524e-03 -5.17844955e-05 -6.06000337e-06 3.79548380e-05 -9.24491033e-05 -3.02937621e-05 1.71619640e-04 1.57748679e-03 -3.28090901e-04 3.27792487e-04 -6.55943768e-04 1.07382250e-03 -1.07284581e-03 2.14686594e-03 -4.53078102e-05 -5.23517311e-05 1.04760765e-04 -7.85707053e-05 -1.04665480e-04 6.95444137e-04 6.88660061e-03 -6.64083808e-04 5.30040383e-04 -3.31973361e-03 2.24957515e-03 -1.79550481e-03 1.12455539e-02 -4.65497926e-04 -5.44742006e-05 3.41181240e-04 -8.31037657e-04 -2.72314778e-04 1.57748679e-03 1.40404080e-02 -2.91425705e-03 2.91160640e-03 -5.82639977e-03 9.40565257e-03 -9.39709770e-03 1.88044812e-02 -2.86362953e-04 -3.30883268e-04 6.62128712e-04 -4.96597364e-04 -6.61526476e-04 6.75212880e-05 6.64083808e-04 1.96423715e-05 5.39821159e-05 -3.38099229e-04 -7.20547811e-05 -1.82433542e-04 1.14261249e-03 -6.45345109e-05 3.69209931e-06 -2.31242497e-05 -9.03749573e-05 -2.96141050e-05 3.28090901e-04 2.91425705e-03 -4.16764814e-04 6.46583847e-04 -1.29387543e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -1.33785987e-04 -4.03418768e-05 8.07279110e-05 -1.33962540e-04 -1.78453961e-04 -5.38923083e-05 -5.30040383e-04 5.39821159e-05 4.41901992e-05 2.69854863e-04 -1.82433542e-04 -1.55014611e-04 -9.11979416e-04 3.48527551e-05 -7.31970459e-06 -2.96141050e-05 8.17491728e-05 -3.65909680e-05 -3.27792487e-04 -2.91160640e-03 6.46583847e-04 -4.15588082e-04 1.29269859e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 4.89367367e-05 4.02161581e-05 -1.78453961e-04 1.82758178e-04 8.04031390e-05 3.37536749e-04 3.31973361e-03 -3.38099229e-04 2.69854863e-04 -1.60287100e-03 1.14261249e-03 -9.11979416e-04 5.41125867e-03 -2.18288769e-04 -2.96141050e-05 1.73430210e-04 -3.91553957e-04 -1.38423816e-04 6.55943768e-04 5.82639977e-03 -1.29387543e-03 1.29269859e-03 -2.35640447e-03 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -9.79270385e-05 -1.78453961e-04 3.08141237e-04 -1.69939378e-04 -3.07860969e-04 -2.29166354e-04 -2.24957515e-03 -7.20547811e-05 -1.82433542e-04 1.14261249e-03 2.64023264e-04 6.16527017e-04 -3.86141420e-03 2.13792340e-04 -1.35510228e-05 8.48723746e-05 2.96482561e-04 9.71515335e-05 -1.07382250e-03 -9.40565257e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -4.13095396e-03 6.71462401e-03 -1.34365977e-02 3.95895217e-04 8.78896388e-05 -1.75875480e-04 3.69394268e-04 4.92076893e-04 1.82909778e-04 1.79550481e-03 -1.82433542e-04 -1.55014611e-04 -9.11979416e-04 6.16527017e-04 5.44382763e-04 3.08199875e-03 -1.13506678e-04 2.58155417e-05 9.71515335e-05 -2.69623742e-04 1.29051064e-04 1.07284581e-03 9.39709770e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 6.71462401e-03 -4.11873388e-03 1.34243765e-02 -1.21458717e-04 -8.75217185e-05 4.92076893e-04 -5.27296378e-04 -1.74979939e-04 -1.14559524e-03 -1.12455539e-02 1.14261249e-03 -9.11979416e-04 5.41125867e-03 -3.86141420e-03 3.08199875e-03 -1.82666200e-02 7.10911748e-04 9.71515335e-05 -5.67149580e-04 1.27551396e-03 4.52672053e-04 -2.14686594e-03 -1.88044812e-02 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -1.34365977e-02 1.34243765e-02 -2.42736641e-02 2.43050381e-04 4.92076893e-04 -8.26310254e-04 4.21871149e-04 8.25558687e-04 -5.17844955e-05 -4.65497926e-04 6.45345109e-05 -3.48527551e-05 2.18288769e-04 -2.13792340e-04 1.13506678e-04 -7.10911748e-04 6.42204398e-06 2.79629402e-06 -1.75136679e-05 1.25069991e-05 4.09829887e-06 -4.53078102e-05 -2.86362953e-04 1.33785987e-04 -4.89367367e-05 9.79270385e-05 -3.95895217e-04 1.21458717e-04 -2.43050381e-04 -2.49123633e-05 -1.54651102e-05 3.09471481e-05 -3.48911273e-05 -4.64791119e-05 -6.06000337e-06 -5.44742006e-05 -3.69209931e-06 7.31970459e-06 2.96141050e-05 1.35510228e-05 -2.58155417e-05 -9.71515335e-05 2.79629402e-06 1.85410148e-07 4.13774999e-06 4.95706949e-06 -5.89656912e-06 -5.23517311e-05 -3.30883268e-04 4.03418768e-05 -4.02161581e-05 1.78453961e-04 -8.78896388e-05 8.75217185e-05 -4.92076893e-04 -1.54651102e-05 -2.56512763e-05 5.07406053e-05 -2.68243330e-05 -5.07108039e-05 3.79548380e-05 3.41181240e-04 2.31242497e-05 2.96141050e-05 -1.73430210e-04 -8.48723746e-05 -9.71515335e-05 5.67149580e-04 -1.75136679e-05 4.13774999e-06 -2.50693783e-05 -1.67530074e-05 -6.69044673e-06 1.04760765e-04 6.62128712e-04 -8.07279110e-05 1.78453961e-04 -3.08141237e-04 1.75875480e-04 -4.92076893e-04 8.26310254e-04 3.09471481e-05 5.07406053e-05 -1.01831601e-04 7.16616535e-05 8.79770935e-05 -9.24491033e-05 -8.31037657e-04 9.03749573e-05 -8.17491728e-05 3.91553957e-04 -2.96482561e-04 2.69623742e-04 -1.27551396e-03 1.25069991e-05 4.95706949e-06 -1.67530074e-05 2.38522113e-05 1.90758458e-05 -7.85707053e-05 -4.96597364e-04 1.33962540e-04 -1.82758178e-04 1.69939378e-04 -3.69394268e-04 5.27296378e-04 -4.21871149e-04 -3.48911273e-05 -2.68243330e-05 7.16616535e-05 -6.52662346e-05 -6.26128393e-05 -3.02937621e-05 -2.72314778e-04 2.96141050e-05 3.65909680e-05 1.38423816e-04 -9.71515335e-05 -1.29051064e-04 -4.52672053e-04 4.09829887e-06 -5.89656912e-06 -6.69044673e-06 1.90758458e-05 -2.81117921e-05 -1.04665480e-04 -6.61526476e-04 1.78453961e-04 -8.04031390e-05 3.07860969e-04 -4.92076893e-04 1.74979939e-04 -8.25558687e-04 -4.64791119e-05 -5.07108039e-05 8.79770935e-05 -6.26128393e-05 -1.01671490e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 2 0 676 + 1.69024978e-04 1.55606641e-03 -3.23257248e-04 6.46785904e-04 -3.23514311e-04 1.05874185e-03 -2.11837261e-03 1.05958378e-03 -4.51020151e-05 -1.04030710e-04 5.20348749e-05 7.80362555e-05 -1.04113438e-04 7.39085069e-08 7.40530621e-07 -2.51479709e-07 4.36042049e-07 -8.39676984e-08 7.70932976e-07 -1.33672492e-06 2.57410301e-07 -5.14251336e-08 -2.76301442e-07 5.32067863e-08 2.30657566e-07 -9.22555390e-08 1.55606641e-03 1.38791892e-02 -2.87700957e-03 5.75643469e-03 -2.87929745e-03 9.29471951e-03 -1.85972429e-02 9.30211091e-03 -2.87847916e-04 -6.63939809e-04 3.32094482e-04 4.98039246e-04 -6.64467791e-04 7.40530621e-07 7.41815338e-06 -2.52068792e-06 4.37063464e-06 -8.41643901e-07 7.72498373e-06 -1.33943917e-05 2.57932978e-06 -5.15627864e-07 -2.77041035e-06 5.33492082e-07 2.31274982e-06 -9.25024852e-07 3.23257248e-04 2.87700957e-03 -4.11174673e-04 1.27641016e-03 -6.38444578e-04 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -1.33175778e-04 -8.11362673e-05 4.05833576e-05 1.33599740e-04 -1.78244435e-04 2.51479709e-07 2.52068792e-06 -8.42350776e-07 1.48979629e-06 -2.86886931e-07 2.58404773e-06 -4.56939702e-06 8.79919154e-07 -1.88904757e-07 -9.29396769e-07 1.78971977e-07 7.91467165e-07 -3.16561174e-07 -6.46785904e-04 -5.75643469e-03 1.27641016e-03 -2.32712940e-03 1.27742520e-03 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 9.85124053e-05 3.07892219e-04 -1.78244435e-04 -1.70345115e-04 3.08137062e-04 -4.36042049e-07 -4.37063464e-06 1.48979629e-06 -2.56630250e-06 4.97434826e-07 -4.56939702e-06 7.87162964e-06 -1.52569666e-06 2.95169977e-07 1.63311438e-06 -3.16561174e-07 -1.35363869e-06 5.45287954e-07 3.23514311e-04 2.87929745e-03 -6.38444578e-04 1.27742520e-03 -4.12189685e-04 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -4.92746869e-05 -1.78244435e-04 4.06927391e-05 1.82207444e-04 -8.14196439e-05 8.39676984e-08 8.41643901e-07 -2.86886931e-07 4.97434826e-07 -7.89265136e-08 8.79919154e-07 -1.52569666e-06 2.42527231e-07 -5.68402603e-08 -3.16561174e-07 5.01800542e-08 2.67865758e-07 -8.70074717e-08 -1.05874185e-03 -9.29471951e-03 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -4.08576704e-03 1.32808933e-02 -6.64293860e-03 3.95340531e-04 1.79568636e-04 -8.98180109e-05 -3.70346319e-04 4.94104034e-04 -7.70932976e-07 -7.72498373e-06 2.58404773e-06 -4.56939702e-06 8.79919154e-07 -7.92346974e-06 1.40087894e-05 -2.69764304e-06 5.79303892e-07 2.85230428e-06 -5.49262224e-07 -2.42856754e-06 9.71348181e-07 2.11837261e-03 1.85972429e-02 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 1.32808933e-02 -2.40210442e-02 1.32914546e-02 -2.46901725e-04 -8.30831883e-04 4.94104034e-04 4.26860795e-04 -8.31492582e-04 1.33672492e-06 1.33943917e-05 -4.56939702e-06 7.87162964e-06 -1.52569666e-06 1.40087894e-05 -2.41340596e-05 4.67745809e-06 -9.06004138e-07 -5.01140264e-06 9.71348181e-07 4.15406412e-06 -1.67327991e-06 -1.05958378e-03 -9.30211091e-03 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -6.64293860e-03 1.32914546e-02 -4.09632811e-03 1.23497189e-04 4.94104034e-04 -9.01392455e-05 -5.27771165e-04 1.80354172e-04 -2.57410301e-07 -2.57932978e-06 8.79919154e-07 -1.52569666e-06 2.42527231e-07 -2.69764304e-06 4.67745809e-06 -7.44871054e-07 1.74467307e-07 9.71348181e-07 -1.54267555e-07 -8.21831446e-07 2.67485361e-07 -4.51020151e-05 -2.87847916e-04 1.33175778e-04 -9.85124053e-05 4.92746869e-05 -3.95340531e-04 2.46901725e-04 -1.23497189e-04 -2.47376814e-05 -2.94110916e-05 1.47110643e-05 3.40589179e-05 -4.54403024e-05 -5.14251336e-08 -5.15627864e-07 1.88904757e-07 -2.95169977e-07 5.68402603e-08 -5.79303892e-07 9.06004138e-07 -1.74467307e-07 2.01046236e-08 2.02503588e-07 -3.89956891e-08 -1.51710916e-07 6.06794418e-08 -1.04030710e-04 -6.63939809e-04 8.11362673e-05 -3.07892219e-04 1.78244435e-04 -1.79568636e-04 8.30831883e-04 -4.94104034e-04 -2.94110916e-05 -9.90479928e-05 4.93234809e-05 6.93450270e-05 -8.48172275e-05 -2.76301442e-07 -2.77041035e-06 9.29396769e-07 -1.63311438e-06 3.16561174e-07 -2.85230428e-06 5.01140264e-06 -9.71348181e-07 2.02503588e-07 1.02323198e-06 -1.98351667e-07 -8.65243592e-07 3.48556542e-07 5.20348749e-05 3.32094482e-04 -4.05833576e-05 1.78244435e-04 -4.06927391e-05 8.98180109e-05 -4.94104034e-04 9.01392455e-05 1.47110643e-05 4.93234809e-05 -2.51090313e-05 -2.54484369e-05 4.93480127e-05 5.32067863e-08 5.33492082e-07 -1.78971977e-07 3.16561174e-07 -5.01800542e-08 5.49262224e-07 -9.71348181e-07 1.54267555e-07 -3.89956891e-08 -1.98351667e-07 3.13931531e-08 1.71236788e-07 -5.55732295e-08 7.80362555e-05 4.98039246e-04 -1.33599740e-04 1.70345115e-04 -1.82207444e-04 3.70346319e-04 -4.26860795e-04 5.27771165e-04 3.40589179e-05 6.93450270e-05 -2.54484369e-05 -6.40115708e-05 6.01592062e-05 2.30657566e-07 2.31274982e-06 -7.91467165e-07 1.35363869e-06 -2.67865758e-07 2.42856754e-06 -4.15406412e-06 8.21831446e-07 -1.51710916e-07 -8.65243592e-07 1.71236788e-07 7.10868853e-07 -2.92904253e-07 -1.04113438e-04 -6.64467791e-04 1.78244435e-04 -3.08137062e-04 8.14196439e-05 -4.94104034e-04 8.31492582e-04 -1.80354172e-04 -4.54403024e-05 -8.48172275e-05 4.93480127e-05 6.01592062e-05 -9.91828370e-05 -9.22555390e-08 -9.25024852e-07 3.16561174e-07 -5.45287954e-07 8.70074717e-08 -9.71348181e-07 1.67327991e-06 -2.67485361e-07 6.06794418e-08 3.48556542e-07 -5.55732295e-08 -2.92904253e-07 9.57009822e-08 1.34722517e-03 9.64416165e-03 -1.25121941e-03 3.50145265e-03 -3.75201731e-03 3.65230825e-03 -1.02207369e-02 1.09521349e-02 -7.73954728e-05 -5.06144404e-05 5.42364199e-05 -1.04985262e-05 -1.51776942e-04 1.71672269e-04 1.57792086e-03 -3.28189848e-04 6.56104109e-04 -3.27928827e-04 1.07413122e-03 -2.14736046e-03 1.07327692e-03 -4.53116807e-05 -1.04771720e-04 5.23661820e-05 7.85654639e-05 -1.04688391e-04 9.64416165e-03 5.73712970e-02 -7.82121551e-03 2.18871411e-02 -2.34533893e-02 2.05195484e-02 -5.74225643e-02 6.15317345e-02 2.16460231e-03 1.41558841e-03 -1.51688820e-03 2.93623556e-04 4.24490875e-03 1.57792086e-03 1.40436697e-02 -2.91501960e-03 5.82759139e-03 -2.91270117e-03 9.40792386e-03 -1.88079477e-02 9.40044139e-03 -2.86330751e-04 -6.62066927e-04 3.30909116e-04 4.96465986e-04 -6.61540361e-04 1.25121941e-03 7.82121551e-03 6.29979656e-04 3.24855868e-03 -3.48102619e-03 -2.16015424e-03 -8.88437554e-03 9.52014323e-03 1.22784159e-04 1.87831078e-04 -2.01272308e-04 2.13952185e-05 3.09310164e-04 3.28189848e-04 2.91501960e-03 -4.16881756e-04 1.29418310e-03 -6.46848479e-04 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -1.33798126e-04 -8.07173426e-05 4.03435112e-05 1.33942777e-04 -1.78478598e-04 -3.50145265e-03 -2.18871411e-02 3.24855868e-03 -7.30004193e-03 9.74141568e-03 -8.88437554e-03 1.95273992e-02 -2.66414751e-02 -4.90277705e-04 -3.18914754e-04 3.09310164e-04 2.48095308e-05 -9.56326017e-04 -6.56104109e-04 -5.82759139e-03 1.29418310e-03 -2.35679785e-03 1.29315379e-03 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 9.79103764e-05 3.08119111e-04 -1.78478598e-04 -1.69869761e-04 3.07874052e-04 3.75201731e-03 2.34533893e-02 -3.48102619e-03 9.74141568e-03 -8.64768415e-03 9.52014323e-03 -2.66414751e-02 2.32130212e-02 5.25362076e-04 3.09310164e-04 -3.61705191e-04 1.54900099e-04 1.01220744e-03 3.27928827e-04 2.91270117e-03 -6.46848479e-04 1.29315379e-03 -4.15852421e-04 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -4.89367989e-05 -1.78478598e-04 4.02335566e-05 1.82769519e-04 -8.04333283e-05 -3.65230825e-03 -2.05195484e-02 -2.16015424e-03 -8.88437554e-03 9.52014323e-03 7.35384112e-03 2.28477230e-02 -2.44827106e-02 -1.08144859e-03 -5.82573874e-04 6.24262977e-04 -1.41201307e-04 -2.04134393e-03 -1.07413122e-03 -9.40792386e-03 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -4.13190580e-03 1.34392678e-02 -6.71710977e-03 3.95905708e-04 1.75795878e-04 -8.78649213e-05 -3.69299930e-04 4.92091737e-04 1.02207369e-02 5.74225643e-02 -8.88437554e-03 1.95273992e-02 -2.66414751e-02 2.28477230e-02 -4.84194893e-02 6.85132051e-02 2.85632217e-03 1.86993934e-03 -2.04134393e-03 4.93313976e-04 5.60736566e-03 2.14736046e-03 1.88079477e-02 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 1.34392678e-02 -2.42766998e-02 1.34285790e-02 -2.42960040e-04 -8.26143021e-04 4.92091737e-04 4.21602203e-04 -8.25485959e-04 -1.09521349e-02 -6.15317345e-02 9.52014323e-03 -2.66414751e-02 2.32130212e-02 -2.44827106e-02 6.85132051e-02 -5.78977100e-02 -3.06072115e-03 -2.04134393e-03 2.15234195e-03 -3.18221861e-04 -6.02318296e-03 -1.07327692e-03 -9.40044139e-03 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -6.71710977e-03 1.34285790e-02 -4.12121681e-03 1.21434388e-04 4.92091737e-04 -8.75431602e-05 -5.27290508e-04 1.75012809e-04 -7.73954728e-05 2.16460231e-03 -1.22784159e-04 4.90277705e-04 -5.25362076e-04 1.08144859e-03 -2.85632217e-03 3.06072115e-03 -4.02796827e-04 -4.68390859e-04 5.01909003e-04 -6.09837431e-05 -8.81640520e-04 -4.53116807e-05 -2.86330751e-04 1.33798126e-04 -9.79103764e-05 4.89367989e-05 -3.95905708e-04 2.42960040e-04 -1.21434388e-04 -2.49156491e-05 -3.09770316e-05 1.54826978e-05 3.49006910e-05 -4.65051310e-05 -5.06144404e-05 1.41558841e-03 -1.87831078e-04 3.18914754e-04 -3.09310164e-04 5.82573874e-04 -1.86993934e-03 2.04134393e-03 -4.68390859e-04 2.42444883e-05 -1.44064175e-05 -1.56330927e-04 -6.96665863e-04 -1.04771720e-04 -6.62066927e-04 8.07173426e-05 -3.08119111e-04 1.78478598e-04 -1.75795878e-04 8.26143021e-04 -4.92091737e-04 -3.09770316e-05 -1.01880734e-04 5.07753127e-05 7.16933507e-05 -8.80483494e-05 5.42364199e-05 -1.51688820e-03 2.01272308e-04 -3.09310164e-04 3.61705191e-04 -6.24262977e-04 2.04134393e-03 -2.15234195e-03 5.01909003e-04 -1.44064175e-05 2.62374939e-05 -4.82504763e-05 7.61444281e-04 5.23661820e-05 3.30909116e-04 -4.03435112e-05 1.78478598e-04 -4.02335566e-05 8.78649213e-05 -4.92091737e-04 8.75431602e-05 1.54826978e-05 5.07753127e-05 -2.56700685e-05 -2.68500618e-05 5.07492181e-05 -1.04985262e-05 2.93623556e-04 -2.13952185e-05 -2.48095308e-05 -1.54900099e-04 1.41201307e-04 -4.93313976e-04 3.18221861e-04 -6.09837431e-05 -1.56330927e-04 -4.82504763e-05 5.68535943e-04 -1.66881037e-04 7.85654639e-05 4.96465986e-04 -1.33942777e-04 1.69869761e-04 -1.82769519e-04 3.69299930e-04 -4.21602203e-04 5.27290508e-04 3.49006910e-05 7.16933507e-05 -2.68500618e-05 -6.52724471e-05 6.26569537e-05 -1.51776942e-04 4.24490875e-03 -3.09310164e-04 9.56326017e-04 -1.01220744e-03 2.04134393e-03 -5.60736566e-03 6.02318296e-03 -8.81640520e-04 -6.96665863e-04 7.61444281e-04 -1.66881037e-04 -1.83251594e-03 -1.04688391e-04 -6.61540361e-04 1.78478598e-04 -3.07874052e-04 8.04333283e-05 -4.92091737e-04 8.25485959e-04 -1.75012809e-04 -4.65051310e-05 -8.80483494e-05 5.07492181e-05 6.26569537e-05 -1.01740622e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 2 1 169 + 1.20838743e-04 1.14994189e-03 -1.16163812e-04 5.57436619e-04 -1.15979020e-04 3.86103214e-04 -1.85279793e-03 3.85489007e-04 -6.84459616e-05 -5.16604235e-05 1.07483525e-05 1.18586107e-04 -5.15782429e-05 1.14994189e-03 1.07180648e-02 -1.07758393e-03 5.17101439e-03 -1.07586972e-03 3.55311614e-03 -1.70503793e-02 3.54746389e-03 -5.18522314e-04 -3.91361034e-04 8.14257042e-05 8.98366260e-04 -3.90738463e-04 1.16163812e-04 1.07758393e-03 4.36273845e-05 5.53633560e-04 -1.15187764e-04 -1.59667926e-04 -1.82421631e-03 3.79542379e-04 -8.47263934e-05 4.37201467e-05 -9.09631624e-06 1.08805118e-04 -4.73240665e-05 -5.57436619e-04 -5.17101439e-03 5.53633560e-04 -2.49772905e-03 5.52752848e-04 -1.82421631e-03 8.21407276e-03 -1.82131438e-03 2.48753714e-04 2.08468026e-04 -4.73240665e-05 -4.31004756e-04 2.08136398e-04 1.15979020e-04 1.07586972e-03 -1.15187764e-04 5.52752848e-04 4.39941544e-05 3.79542379e-04 -1.82131438e-03 -1.60876429e-04 -5.17551432e-05 -4.73240665e-05 -9.14221067e-06 1.27590177e-04 4.38708315e-05 -3.86103214e-04 -3.55311614e-03 -1.59667926e-04 -1.82421631e-03 3.79542379e-04 5.84054395e-04 5.99381872e-03 -1.24706056e-03 2.63211868e-04 -1.60043752e-04 3.32983463e-05 -3.29468945e-04 1.43300338e-04 1.85279793e-03 1.70503793e-02 -1.82421631e-03 8.21407276e-03 -1.82131438e-03 5.99381872e-03 -2.69295049e-02 5.98428385e-03 -7.37274974e-04 -6.25491403e-04 1.43300338e-04 1.27745400e-03 -6.24496381e-04 -3.85489007e-04 -3.54746389e-03 3.79542379e-04 -1.82131438e-03 -1.60876429e-04 -1.24706056e-03 5.98428385e-03 5.88025167e-04 1.53395787e-04 1.43300338e-04 3.34464857e-05 -3.92105430e-04 -1.60500036e-04 -6.84459616e-05 -5.18522314e-04 8.47263934e-05 -2.48753714e-04 5.17551432e-05 -2.63211868e-04 7.37274974e-04 -1.53395787e-04 -2.29086204e-05 -5.01805165e-06 1.04404464e-06 4.04822140e-05 -1.76074712e-05 -5.16604235e-05 -3.91361034e-04 -4.37201467e-05 -2.08468026e-04 4.73240665e-05 1.60043752e-04 6.25491403e-04 -1.43300338e-04 -5.01805165e-06 -3.99439108e-05 8.72157701e-06 2.32655364e-05 -8.46639708e-06 1.07483525e-05 8.14257042e-05 9.09631624e-06 4.73240665e-05 9.14221067e-06 -3.32983463e-05 -1.43300338e-04 -3.34464857e-05 1.04404464e-06 8.72157701e-06 1.60513338e-07 -1.80929793e-06 8.73086122e-06 1.18586107e-04 8.98366260e-04 -1.08805118e-04 4.31004756e-04 -1.27590177e-04 3.29468945e-04 -1.27745400e-03 3.92105430e-04 4.04822140e-05 2.32655364e-05 -1.80929793e-06 -6.96611350e-05 1.59554123e-05 -5.15782429e-05 -3.90738463e-04 4.73240665e-05 -2.08136398e-04 -4.38708315e-05 -1.43300338e-04 6.24496381e-04 1.60500036e-04 -1.76074712e-05 -8.46639708e-06 8.73086122e-06 1.59554123e-05 -3.99169529e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +0 -2 -1 169 + 4.83764829e-06 5.30911406e-05 1.46984542e-05 -2.35090249e-05 -4.90819033e-06 -5.10233223e-05 8.16078028e-05 1.70379941e-05 -1.53943203e-06 -1.27368643e-05 -2.65918958e-06 9.74182205e-06 4.25316520e-06 5.30911406e-05 5.82098719e-04 1.61742263e-04 -2.58694065e-04 -5.40098840e-05 -5.60713909e-04 8.96817926e-04 1.87236735e-04 -1.70334222e-05 -1.40930150e-04 -2.94232535e-05 1.07790773e-04 4.70601866e-05 -1.46984542e-05 -1.61742263e-04 -4.17561872e-05 7.25103932e-05 1.51386462e-05 1.45741865e-04 -2.52567568e-04 -5.27308002e-05 7.18150565e-06 3.64459676e-05 7.60915207e-06 -3.03954511e-05 -1.32702973e-05 2.35090249e-05 2.58694065e-04 7.25103932e-05 -1.12395490e-04 -2.42130774e-05 -2.52567568e-04 3.91792067e-04 8.43387797e-05 -5.78033861e-06 -6.15017715e-05 -1.32702973e-05 4.53208280e-05 2.05370167e-05 4.90819033e-06 5.40098840e-05 1.51386462e-05 -2.42130774e-05 -1.47598382e-06 -5.27308002e-05 8.43387797e-05 5.43821262e-06 -1.20681322e-06 -1.32702973e-05 -7.10869313e-07 1.08376028e-05 1.13697972e-06 5.10233223e-05 5.60713909e-04 1.45741865e-04 -2.52567568e-04 -5.27308002e-05 -5.07697308e-04 8.78056527e-04 1.83319749e-04 -2.49862810e-05 -1.28218025e-04 -2.67692288e-05 1.06679408e-04 4.65749776e-05 -8.16078028e-05 -8.96817926e-04 -2.52567568e-04 3.91792067e-04 8.43387797e-05 8.78056527e-04 -1.36309607e-03 -2.93205563e-04 2.04622975e-05 2.16043222e-04 4.65749776e-05 -1.59366266e-04 -7.21423649e-05 -1.70379941e-05 -1.87236735e-04 -5.27308002e-05 8.43387797e-05 5.43821262e-06 1.83319749e-04 -2.93205563e-04 -1.99286730e-05 4.27209768e-06 4.65749776e-05 2.68440631e-06 -3.79736458e-05 -4.29349738e-06 -1.53943203e-06 -1.70334222e-05 -7.18150565e-06 5.78033861e-06 1.20681322e-06 2.49862810e-05 -2.04622975e-05 -4.27209768e-06 -2.06595899e-06 5.32876938e-06 1.11253506e-06 -1.54446109e-06 -6.74293591e-07 -1.27368643e-05 -1.40930150e-04 -3.64459676e-05 6.15017715e-05 1.32702973e-05 1.28218025e-04 -2.16043222e-04 -4.65749776e-05 5.32876938e-06 3.07901722e-05 6.66120940e-06 -2.48297491e-05 -1.12756585e-05 -2.65918958e-06 -2.94232535e-05 -7.60915207e-06 1.32702973e-05 7.10869313e-07 2.67692288e-05 -4.65749776e-05 -2.68440631e-06 1.11253506e-06 6.66120940e-06 2.75337517e-07 -5.98176914e-06 -5.26679386e-07 9.74182205e-06 1.07790773e-04 3.03954511e-05 -4.53208280e-05 -1.08376028e-05 -1.06679408e-04 1.59366266e-04 3.79736458e-05 -1.54446109e-06 -2.48297491e-05 -5.98176914e-06 1.73425048e-05 8.92932991e-06 4.25316520e-06 4.70601866e-05 1.32702973e-05 -2.05370167e-05 -1.13697972e-06 -4.65749776e-05 7.21423649e-05 4.29349738e-06 -6.74293591e-07 -1.12756585e-05 -5.26679386e-07 8.92932991e-06 7.88426233e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +0 -2 0 507 + 8.28412077e-06 9.09777564e-05 3.32019247e-05 -3.31868258e-05 -1.43620391e-08 -1.16048744e-04 1.15995970e-04 5.01987947e-08 6.57558171e-06 -2.27474444e-05 -9.84425830e-09 1.13685478e-05 9.83978156e-09 1.34432031e-03 9.62626429e-03 3.74599809e-03 -3.49398187e-03 1.24656360e-03 -1.09360727e-02 1.02003362e-02 -3.63921976e-03 4.80079912e-05 -1.52180833e-04 5.42942394e-05 6.19375449e-05 -5.06415336e-05 9.09777564e-05 9.99873567e-04 3.64877315e-04 -3.64711384e-04 -1.57833689e-07 -1.27614898e-03 1.27556864e-03 5.52019250e-07 7.25104506e-05 -2.50841297e-04 -1.08554899e-07 1.25363589e-04 1.08505532e-07 9.62626429e-03 5.72979189e-02 2.34267559e-02 -2.18506947e-02 7.79577048e-03 -6.14815418e-02 5.73453023e-02 -2.04593410e-02 -1.33464434e-03 4.23069750e-03 -1.50940495e-03 -1.72189237e-03 1.40785804e-03 -3.32019247e-05 -3.64877315e-04 -1.28672006e-04 1.35648275e-04 5.87035905e-08 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -2.12268792e-05 8.90275005e-05 3.85278318e-08 -4.70947387e-05 -4.07617534e-08 -3.74599809e-03 -2.34267559e-02 -8.64102511e-03 9.72659782e-03 -3.47020199e-03 2.32014078e-02 -2.66071034e-02 9.49273578e-03 3.96522464e-04 -1.00834421e-03 3.59751493e-04 3.75796735e-04 -3.07259886e-04 3.31868258e-05 3.64711384e-04 1.35648275e-04 -1.28548604e-04 -5.86768947e-08 -4.75038761e-04 4.50562840e-04 2.05485837e-07 3.02322860e-05 -8.89822797e-05 -4.07617534e-08 4.18684747e-05 3.84907500e-08 3.49398187e-03 2.18506947e-02 9.72659782e-03 -7.28509092e-03 3.23674026e-03 -2.66071034e-02 1.94922505e-02 -8.85410135e-03 -2.22604499e-04 9.52357513e-04 -3.07259886e-04 -4.35524492e-04 3.16917998e-04 1.43620391e-08 1.57833689e-07 5.87035905e-08 -5.86768947e-08 7.03795935e-06 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 1.30834228e-08 -4.07617534e-08 5.20719763e-06 2.26240712e-08 -5.20482962e-06 -1.24656360e-03 -7.79577048e-03 -3.47020199e-03 3.23674026e-03 6.32352775e-04 9.49273578e-03 -8.85410135e-03 -2.16591271e-03 7.94196070e-05 -3.07259886e-04 2.00764043e-04 9.47252988e-05 -1.87257417e-04 1.16048744e-04 1.27614898e-03 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -1.58091757e-03 1.66367474e-03 7.19977313e-07 7.52359251e-05 -3.14334982e-04 -1.36032633e-07 1.66113681e-04 1.43775825e-07 1.09360727e-02 6.14815418e-02 2.32014078e-02 -2.66071034e-02 9.49273578e-03 -5.78936510e-02 6.84488788e-02 -2.44208139e-02 -1.80654004e-03 6.00732479e-03 -2.14326024e-03 -2.48405504e-03 2.03101942e-03 -1.15995970e-04 -1.27556864e-03 -4.75038761e-04 4.50562840e-04 2.05485837e-07 1.66367474e-03 -1.57940409e-03 -7.19649898e-07 -1.06454134e-04 3.14175621e-04 1.43775825e-07 -1.47994545e-04 -1.35901837e-07 -1.02003362e-02 -5.73453023e-02 -2.66071034e-02 1.94922505e-02 -8.85410135e-03 6.84488788e-02 -4.83515504e-02 2.27778763e-02 1.85129704e-03 -5.58979105e-03 2.03101942e-03 2.22092757e-03 -1.86012644e-03 -5.01987947e-08 -5.52019250e-07 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 7.19977313e-07 -7.19649898e-07 8.35137710e-05 -4.60694388e-08 1.43775825e-07 -1.80517420e-05 -7.96638128e-08 1.80435329e-05 3.63921976e-03 2.04593410e-02 9.49273578e-03 -8.85410135e-03 -2.16591271e-03 -2.44208139e-02 2.27778763e-02 7.36578817e-03 -6.60495560e-04 2.03101942e-03 -6.21680971e-04 -8.60878060e-04 5.79856687e-04 6.57558171e-06 7.25104506e-05 2.12268792e-05 -3.02322860e-05 -1.30834228e-08 -7.52359251e-05 1.06454134e-04 4.60694388e-08 -8.45204057e-07 -1.65665211e-05 -7.16938176e-09 1.16312371e-05 1.00671462e-08 4.80079912e-05 -1.33464434e-03 -3.96522464e-04 2.22604499e-04 -7.94196070e-05 1.80654004e-03 -1.85129704e-03 6.60495560e-04 2.71215134e-04 5.86178632e-04 -2.09133583e-04 -4.50870287e-04 3.68641715e-04 -2.27474444e-05 -2.50841297e-04 -8.90275005e-05 8.89822797e-05 4.07617534e-08 3.14334982e-04 -3.14175621e-04 -1.43775825e-07 -1.65665211e-05 5.74742044e-05 2.64734900e-08 -2.86348849e-05 -2.64599273e-08 -1.52180833e-04 4.23069750e-03 1.00834421e-03 -9.52357513e-04 3.07259886e-04 -6.00732479e-03 5.58979105e-03 -2.03101942e-03 5.86178632e-04 -1.83058075e-03 7.59356146e-04 6.79425369e-04 -6.94299133e-04 -9.84425830e-09 -1.08554899e-07 -3.85278318e-08 4.07617534e-08 -5.20719763e-06 1.36032633e-07 -1.43775825e-07 1.80517420e-05 -7.16938176e-09 2.64734900e-08 -3.69892919e-06 -1.57434652e-08 3.87201115e-06 5.42942394e-05 -1.50940495e-03 -3.59751493e-04 3.07259886e-04 -2.00764043e-04 2.14326024e-03 -2.03101942e-03 6.21680971e-04 -2.09133583e-04 7.59356146e-04 2.68928306e-05 -4.57288828e-04 -1.51113252e-05 1.13685478e-05 1.25363589e-04 4.70947387e-05 -4.18684747e-05 -2.26240712e-08 -1.66113681e-04 1.47994545e-04 7.96638128e-08 1.16312371e-05 -2.86348849e-05 -1.57434652e-08 1.25506408e-05 1.40613983e-08 6.19375449e-05 -1.72189237e-03 -3.75796735e-04 4.35524492e-04 -9.47252988e-05 2.48405504e-03 -2.22092757e-03 8.60878060e-04 -4.50870287e-04 6.79425369e-04 -4.57288828e-04 -1.07511075e-04 3.26309004e-04 9.83978156e-09 1.08505532e-07 4.07617534e-08 -3.84907500e-08 5.20482962e-06 -1.43775825e-07 1.35901837e-07 -1.80435329e-05 1.00671462e-08 -2.64599273e-08 3.87201115e-06 1.40613983e-08 -3.69540674e-06 -5.06415336e-05 1.40785804e-03 3.07259886e-04 -3.16917998e-04 1.87257417e-04 -2.03101942e-03 1.86012644e-03 -5.79856687e-04 3.68641715e-04 -6.94299133e-04 -1.51113252e-05 3.26309004e-04 2.47862397e-05 8.15034854e-06 8.95207190e-05 3.26777168e-05 -3.26925762e-05 1.41342975e-08 -1.14203622e-04 1.14255554e-04 -4.93972079e-08 6.47211935e-06 -2.24507007e-05 9.70632845e-09 1.12304527e-05 -9.71074216e-09 8.95207190e-05 9.83943379e-04 3.59188453e-04 -3.59351785e-04 1.55362031e-07 -1.25604163e-03 1.25661278e-03 -5.43283551e-07 7.13912780e-05 -2.47644416e-04 1.07066504e-07 1.23878490e-04 -1.07115190e-07 -3.26777168e-05 -3.59188453e-04 -1.26702582e-04 1.33660050e-04 -5.77865415e-08 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -2.09169040e-05 8.79108833e-05 -3.80073619e-08 -4.65324191e-05 4.02356286e-08 3.26925762e-05 3.59351785e-04 1.33660050e-04 -1.26824112e-04 5.78128185e-08 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 2.97800920e-05 -8.79555064e-05 4.02356286e-08 4.14419060e-05 -3.80439459e-08 -1.41342975e-08 -1.55362031e-07 -5.77865415e-08 5.78128185e-08 6.89669227e-06 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -1.28751150e-08 4.02356286e-08 5.10933177e-06 -2.23369374e-08 -5.11165511e-06 1.14203622e-04 1.25604163e-03 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -1.55642601e-03 1.63895261e-03 -7.08584223e-07 7.41366515e-05 -3.10376134e-04 1.34187914e-07 1.64119956e-04 -1.41911161e-07 -1.14255554e-04 -1.25661278e-03 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 1.63895261e-03 -1.55791621e-03 7.08906434e-07 -1.04853035e-04 3.10533377e-04 -1.41911161e-07 -1.46479937e-04 1.34316946e-07 4.93972079e-08 5.43283551e-07 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -7.08584223e-07 7.08906434e-07 8.17813602e-05 4.53321263e-08 -1.41911161e-07 -1.77065360e-05 7.86465779e-08 1.77145876e-05 6.47211935e-06 7.13912780e-05 2.09169040e-05 -2.97800920e-05 1.28751150e-08 -7.41366515e-05 1.04853035e-04 -4.53321263e-08 -8.21102025e-07 -1.63709222e-05 7.07779903e-09 1.14886294e-05 -9.93398225e-09 -2.24507007e-05 -2.47644416e-04 -8.79108833e-05 8.79555064e-05 -4.02356286e-08 3.10376134e-04 -3.10533377e-04 1.41911161e-07 -1.63709222e-05 5.69692112e-05 -2.62018624e-08 -2.84138377e-05 2.62152747e-08 9.70632845e-09 1.07066504e-07 3.80073619e-08 -4.02356286e-08 -5.10933177e-06 -1.34187914e-07 1.41911161e-07 1.77065360e-05 7.07779903e-09 -2.62018624e-08 -3.63558527e-06 1.55772517e-08 3.80813104e-06 1.12304527e-05 1.23878490e-04 4.65324191e-05 -4.14419060e-05 2.23369374e-08 -1.64119956e-04 1.46479937e-04 -7.86465779e-08 1.14886294e-05 -2.84138377e-05 1.55772517e-08 1.24792536e-05 -1.39371751e-08 -9.71074216e-09 -1.07115190e-07 -4.02356286e-08 3.80439459e-08 5.11165511e-06 1.41911161e-07 -1.34316946e-07 -1.77145876e-05 -9.93398225e-09 2.62152747e-08 3.80813104e-06 -1.39371751e-08 -3.63904779e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +0 -2 1 676 + 1.71253570e-04 1.57446716e-03 6.54828154e-04 -3.27104859e-04 3.27142251e-04 -2.14342488e-03 1.07070029e-03 -1.07082268e-03 9.07161630e-05 -1.04589232e-04 1.04601187e-04 -5.97265336e-09 -5.22511997e-05 1.02530213e-03 7.61946018e-03 2.86558461e-03 -7.62320529e-04 2.86406524e-03 -8.50927204e-03 2.26368914e-03 -8.50476032e-03 5.14307720e-05 -5.09471145e-05 1.91410115e-04 -8.88776803e-05 -5.09201018e-05 1.57446716e-03 1.40177114e-02 5.81810678e-03 -2.90630600e-03 2.90663823e-03 -1.87803531e-02 9.38130822e-03 -9.38238062e-03 5.74150680e-04 -6.61954567e-04 6.62030237e-04 -3.78014553e-08 -3.30702499e-04 7.61946018e-03 4.86015527e-02 1.89710302e-02 -5.04679070e-03 1.89609715e-02 -5.17058124e-02 1.37550998e-02 -5.16783973e-02 -7.19174588e-04 7.12411436e-04 -2.67655501e-03 1.24280789e-03 7.12033706e-04 -6.54828154e-04 -5.81810678e-03 -2.35366609e-03 1.29055977e-03 -1.29070730e-03 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -1.96612803e-04 3.08014335e-04 -3.08049546e-04 2.03788294e-08 1.78282284e-04 -2.86558461e-03 -1.89710302e-02 -6.68046238e-03 2.14379347e-03 -8.05430806e-03 1.84770600e-02 -6.03020659e-03 2.26556999e-02 2.56216110e-04 -1.46899009e-04 5.51904781e-04 -1.99746480e-04 -1.14439430e-04 3.27104859e-04 2.90630600e-03 1.29055977e-03 -4.14777029e-04 6.44744162e-04 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.82818190e-04 -8.04765421e-05 1.78282284e-04 -4.88566866e-05 -4.02048644e-05 7.62320529e-04 5.04679070e-03 2.14379347e-03 8.07813250e-04 2.14265681e-03 -6.03020659e-03 -2.58646577e-03 -6.02700930e-03 -1.20437061e-05 1.52248307e-04 -1.14439430e-04 2.07389243e-05 1.52167583e-04 -3.27142251e-04 -2.90663823e-03 -1.29070730e-03 6.44744162e-04 -4.14924426e-04 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.82839088e-04 1.78282284e-04 -8.05172997e-05 -4.88419097e-05 4.02206285e-05 -2.86406524e-03 -1.89609715e-02 -8.05430806e-03 2.14265681e-03 -6.67191913e-03 2.26556999e-02 -6.02700930e-03 1.84530290e-02 4.52486306e-05 -1.14439430e-04 5.51741268e-04 -3.21364271e-04 -1.46777622e-04 2.14342488e-03 1.87803531e-02 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -2.42525232e-02 1.34058098e-02 -1.34073423e-02 4.88811673e-04 -8.26719605e-04 8.26814110e-04 -5.62356320e-08 -4.91972170e-04 8.50927204e-03 5.17058124e-02 1.84770600e-02 -6.03020659e-03 2.26556999e-02 -4.82636087e-02 1.61685369e-02 -6.07457663e-02 -1.16758362e-03 1.04815518e-03 -3.93795615e-03 1.77118105e-03 1.01475105e-03 -1.07070029e-03 -9.38130822e-03 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.34058098e-02 -4.11213250e-03 6.69734001e-03 -5.17912316e-04 1.75532526e-04 -4.91972170e-04 1.58070397e-04 8.76933976e-05 -2.26368914e-03 -1.37550998e-02 -6.03020659e-03 -2.58646577e-03 -6.02700930e-03 1.61685369e-02 8.21312877e-03 1.61599642e-02 2.53682551e-04 -3.93637081e-04 1.01475105e-03 -4.38314715e-04 -3.93428370e-04 1.07082268e-03 9.38238062e-03 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.34073423e-02 6.69734001e-03 -4.11366360e-03 5.17971520e-04 -4.91972170e-04 1.75644997e-04 1.58032277e-04 -8.77395568e-05 8.50476032e-03 5.16783973e-02 2.26556999e-02 -6.02700930e-03 1.84530290e-02 -6.07457663e-02 1.61599642e-02 -4.81991753e-02 -9.53094336e-04 1.01475105e-03 -3.93599918e-03 1.89371997e-03 1.04707883e-03 9.07161630e-05 5.74150680e-04 1.96612803e-04 -1.82818190e-04 1.82839088e-04 -4.88811673e-04 5.17912316e-04 -5.17971520e-04 -8.52979525e-05 7.71688483e-05 -7.71776697e-05 3.51458724e-09 3.07470380e-05 5.14307720e-05 -7.19174588e-04 -2.56216110e-04 1.20437061e-05 -4.52486306e-05 1.16758362e-03 -2.53682551e-04 9.53094336e-04 2.07548868e-04 1.11240964e-04 -4.17936243e-04 3.68466765e-04 2.11103227e-04 -1.04589232e-04 -6.61954567e-04 -3.08014335e-04 8.04765421e-05 -1.78282284e-04 8.26719605e-04 -1.75532526e-04 4.91972170e-04 7.71688483e-05 -1.01330348e-04 8.74817293e-05 9.01559582e-06 -5.04698362e-05 -5.09471145e-05 7.12411436e-04 1.46899009e-04 -1.52248307e-04 1.14439430e-04 -1.04815518e-03 3.93637081e-04 -1.01475105e-03 1.11240964e-04 7.59463477e-05 4.80341255e-04 -3.07544632e-04 7.37264108e-05 1.04601187e-04 6.62030237e-04 3.08049546e-04 -1.78282284e-04 8.05172997e-05 -8.26814110e-04 4.91972170e-04 -1.75644997e-04 -7.71776697e-05 8.74817293e-05 -1.01350348e-04 9.02610316e-06 5.04735432e-05 1.91410115e-04 -2.67655501e-03 -5.51904781e-04 1.14439430e-04 -5.51741268e-04 3.93795615e-03 -1.01475105e-03 3.93599918e-03 -4.17936243e-04 4.80341255e-04 -1.60086163e-03 7.21742696e-04 4.80025380e-04 -5.97265336e-09 -3.78014553e-08 -2.03788294e-08 4.88566866e-05 4.88419097e-05 5.62356320e-08 -1.58070397e-04 -1.58032277e-04 3.51458724e-09 9.01559582e-06 9.02610316e-06 -4.81374186e-06 -2.36694876e-09 -8.88776803e-05 1.24280789e-03 1.99746480e-04 -2.07389243e-05 3.21364271e-04 -1.77118105e-03 4.38314715e-04 -1.89371997e-03 3.68466765e-04 -3.07544632e-04 7.21742696e-04 -2.16898403e-04 -2.49692010e-04 -5.22511997e-05 -3.30702499e-04 -1.78282284e-04 4.02048644e-05 -4.02206285e-05 4.91972170e-04 -8.76933976e-05 8.77395568e-05 3.07470380e-05 -5.04698362e-05 5.04735432e-05 -2.36694876e-09 -2.55207716e-05 -5.09201018e-05 7.12033706e-04 1.14439430e-04 -1.52167583e-04 1.46777622e-04 -1.01475105e-03 3.93428370e-04 -1.04707883e-03 2.11103227e-04 7.37264108e-05 4.80025380e-04 -2.49692010e-04 7.58681457e-05 3.14140416e-07 3.21329148e-06 1.73842906e-06 -1.11324448e-06 3.48277652e-07 -5.48431559e-06 3.51201221e-06 -1.09873023e-06 8.04403664e-07 -1.15140146e-06 3.60215031e-07 3.32580864e-07 -2.30672281e-07 1.69438374e-04 1.55948196e-03 6.48046884e-04 -3.24329437e-04 3.24292434e-04 -2.12226517e-03 1.06213468e-03 -1.06201350e-03 9.01124270e-05 -1.04212802e-04 1.04200912e-04 5.95006197e-09 -5.21496576e-05 3.21329148e-06 3.28470681e-05 1.78022917e-05 -1.14001218e-05 3.56651905e-06 -5.61102930e-05 3.59315636e-05 -1.12411611e-05 8.24616421e-06 -1.18033345e-05 3.69266380e-06 3.40937833e-06 -2.36468529e-06 1.55948196e-03 1.39049300e-02 5.76583102e-03 -2.88563802e-03 2.88530880e-03 -1.86246236e-02 9.32110598e-03 -9.32004254e-03 5.74223138e-04 -6.64074910e-04 6.63999146e-04 3.79155613e-08 -3.32313100e-04 -1.73842906e-06 -1.78022917e-05 -9.56877547e-06 6.19521191e-06 -1.93816712e-06 3.02376912e-05 -1.95736377e-05 6.12359700e-06 -4.37523838e-06 6.37502375e-06 -1.99442111e-06 -1.86195796e-06 1.29142153e-06 -6.48046884e-04 -5.76583102e-03 -2.33022970e-03 1.27999418e-03 -1.27984815e-03 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -1.96239779e-04 3.08003259e-04 -3.07968119e-04 -2.03596901e-08 1.78443665e-04 1.11324448e-06 1.14001218e-05 6.19521191e-06 -3.86165948e-06 1.24115152e-06 -1.95736377e-05 1.22061819e-05 -3.92139131e-06 2.92495627e-06 -4.01688985e-06 1.29142153e-06 1.12123804e-06 -8.04745504e-07 3.24329437e-04 2.88563802e-03 1.27999418e-03 -4.13258084e-04 6.40528393e-04 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.82369507e-04 -8.13796244e-05 1.78443665e-04 -4.85778526e-05 -4.07235914e-05 -3.48277652e-07 -3.56651905e-06 -1.93816712e-06 1.24115152e-06 -2.82701121e-07 6.12359700e-06 -3.92139131e-06 8.98540606e-07 -9.15070244e-07 1.29142153e-06 -2.92973931e-07 -3.95272547e-07 1.87612841e-07 -3.24292434e-04 -2.88530880e-03 -1.27984815e-03 6.40528393e-04 -4.13111920e-04 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.82348701e-04 1.78443665e-04 -8.13389050e-05 -4.85926870e-05 4.07078591e-05 5.48431559e-06 5.61102930e-05 3.02376912e-05 -1.95736377e-05 6.12359700e-06 -9.54267441e-05 6.17618563e-05 -1.93221476e-05 1.38492653e-05 -2.01732308e-05 6.31117922e-06 5.89091529e-06 -4.08583600e-06 2.12226517e-03 1.86246236e-02 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -2.40450711e-02 1.33140646e-02 -1.33125456e-02 4.90935405e-04 -8.30291250e-04 8.30196522e-04 5.63909849e-08 -4.94242004e-04 -3.51201221e-06 -3.59315636e-05 -1.95736377e-05 1.22061819e-05 -3.92139131e-06 6.17618563e-05 -3.85308569e-05 1.23733978e-05 -9.25189424e-06 1.27146061e-05 -4.08583600e-06 -3.55115486e-06 2.54724986e-06 -1.06213468e-03 -9.32110598e-03 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.33140646e-02 -4.10538365e-03 6.66255871e-03 -5.18277260e-04 1.79849679e-04 -4.94242004e-04 1.57344614e-04 8.99994920e-05 1.09873023e-06 1.12411611e-05 6.12359700e-06 -3.92139131e-06 8.98540606e-07 -1.93221476e-05 1.23733978e-05 -2.85118771e-06 2.89444776e-06 -4.08583600e-06 9.32775521e-07 1.24940122e-06 -5.97325039e-07 1.06201350e-03 9.32004254e-03 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.33125456e-02 6.66255871e-03 -4.10386331e-03 5.18218130e-04 -4.94242004e-04 1.79736897e-04 1.57383100e-04 -8.99533169e-05 8.04403664e-07 8.24616421e-06 4.37523838e-06 -2.92495627e-06 9.15070244e-07 -1.38492653e-05 9.25189424e-06 -2.89444776e-06 1.93671537e-06 -2.97656138e-06 9.31214862e-07 8.97393393e-07 -6.22416391e-07 9.01124270e-05 5.74223138e-04 1.96239779e-04 -1.82369507e-04 1.82348701e-04 -4.90935405e-04 5.18277260e-04 -5.18218130e-04 -8.38016586e-05 7.51629141e-05 -7.51543388e-05 -3.38151966e-09 2.96375220e-05 -1.15140146e-06 -1.18033345e-05 -6.37502375e-06 4.01688985e-06 -1.29142153e-06 2.01732308e-05 -1.27146061e-05 4.08583600e-06 -2.97656138e-06 4.15818736e-06 -1.33729152e-06 -1.17341856e-06 8.42489788e-07 -1.04212802e-04 -6.64074910e-04 -3.08003259e-04 8.13796244e-05 -1.78443665e-04 8.30291250e-04 -1.79849679e-04 4.94242004e-04 7.51629141e-05 -9.95895492e-05 8.53756906e-05 9.20586492e-06 -4.96239640e-05 3.60215031e-07 3.69266380e-06 1.99442111e-06 -1.29142153e-06 2.92973931e-07 -6.31117922e-06 4.08583600e-06 -9.32775521e-07 9.31214862e-07 -1.33729152e-06 3.02001728e-07 4.14149036e-07 -1.95741871e-07 1.04200912e-04 6.63999146e-04 3.07968119e-04 -1.78443665e-04 8.13389050e-05 -8.30196522e-04 4.94242004e-04 -1.79736897e-04 -7.51543388e-05 8.53756906e-05 -9.95700672e-05 9.19559131e-06 4.96204019e-05 3.32580864e-07 3.40937833e-06 1.86195796e-06 -1.12123804e-06 3.95272547e-07 -5.89091529e-06 3.55115486e-06 -1.24940122e-06 8.97393393e-07 -1.17341856e-06 4.14149036e-07 3.08843068e-07 -2.50146702e-07 5.95006197e-09 3.79155613e-08 2.03596901e-08 4.85778526e-05 4.85926870e-05 -5.63909849e-08 -1.57344614e-04 -1.57383100e-04 -3.38151966e-09 9.20586492e-06 9.19559131e-06 -5.02786531e-06 2.30800708e-09 -2.30672281e-07 -2.36468529e-06 -1.29142153e-06 8.04745504e-07 -1.87612841e-07 4.08583600e-06 -2.54724986e-06 5.97325039e-07 -6.22416391e-07 8.42489788e-07 -1.95741871e-07 -2.50146702e-07 1.21681575e-07 -5.21496576e-05 -3.32313100e-04 -1.78443665e-04 4.07235914e-05 -4.07078591e-05 4.94242004e-04 -8.99994920e-05 8.99533169e-05 2.96375220e-05 -4.96239640e-05 4.96204019e-05 2.30800708e-09 -2.52565247e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -2 2 676 + 8.27679714e-06 9.08980152e-05 3.31731044e-05 1.62438414e-08 3.31599130e-05 -1.15947314e-04 -5.67758070e-08 -1.15901207e-04 6.56977077e-06 1.11352091e-08 2.27312343e-05 -1.13610948e-05 1.11307811e-08 8.47343647e-07 8.87539818e-06 2.73264300e-06 1.09489222e-06 4.55304093e-06 -8.90594867e-06 -3.56835998e-06 -1.48388021e-05 -4.45271445e-07 6.59820472e-07 2.74382222e-06 -2.15364805e-06 1.09937142e-06 9.08980152e-05 9.99002029e-04 3.64564650e-04 1.78516013e-07 3.64419679e-04 -1.27504401e-03 -6.24349544e-07 -1.27453698e-03 7.24475934e-05 1.22792579e-07 2.50666770e-04 -1.25283515e-04 1.22743750e-07 8.87539818e-06 9.28409779e-05 2.86904438e-05 1.14954437e-05 4.78030847e-05 -9.33279063e-05 -3.73938340e-05 -1.55499923e-04 -4.68652130e-06 6.94466877e-06 2.88789713e-05 -2.26673360e-05 1.15709813e-05 -3.31731044e-05 -3.64564650e-04 -1.28563202e-04 -6.63959062e-08 -1.35539521e-04 4.50611937e-04 2.32516738e-07 4.74655879e-04 -2.12092296e-05 -4.35812986e-08 -8.89661525e-05 4.70642248e-05 -4.61101322e-08 -2.73264300e-06 -2.86904438e-05 -8.49333622e-06 -3.55505234e-06 -1.47834631e-05 2.77968524e-05 1.16224295e-05 4.83311471e-05 1.72755575e-06 -2.06385811e-06 -8.58242502e-06 7.04364490e-06 -3.59556515e-06 -1.62438414e-08 -1.78516013e-07 -6.63959062e-08 7.03020590e-06 -6.63695036e-08 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -1.47973422e-08 5.20181119e-06 -4.61101322e-08 2.55930694e-08 5.19974266e-06 -1.09489222e-06 -1.14954437e-05 -3.55505234e-06 -1.04500913e-06 -5.92331262e-06 1.16224295e-05 3.44625272e-06 1.93649141e-05 5.29149089e-07 -6.29719392e-07 -3.59556515e-06 2.91631522e-06 -1.04921798e-06 -3.31599130e-05 -3.64419679e-04 -1.35539521e-04 -6.63695036e-08 -1.28455384e-04 4.74655879e-04 2.32424277e-07 4.50234363e-04 -3.02070532e-05 -4.61101322e-08 -8.89266385e-05 4.18457443e-05 -4.35446194e-08 -4.55304093e-06 -4.78030847e-05 -1.47834631e-05 -5.92331262e-06 -2.42523265e-05 4.83311471e-05 1.93649141e-05 7.93172621e-05 2.20043344e-06 -3.59556515e-06 -1.47170092e-05 1.13444696e-05 -5.89668644e-06 1.15947314e-04 1.27504401e-03 4.50611937e-04 2.32516738e-07 4.74655879e-04 -1.57956493e-03 -8.14311739e-07 -1.66232271e-03 7.51733537e-05 1.53874803e-07 3.14117514e-04 -1.66005504e-04 1.62640217e-07 8.90594867e-06 9.33279063e-05 2.77968524e-05 1.16224295e-05 4.83311471e-05 -9.07208917e-05 -3.78946500e-05 -1.57582535e-04 -5.64344202e-06 6.77712529e-06 2.81822522e-05 -2.31023894e-05 1.17930628e-05 5.67758070e-08 6.24349544e-07 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -8.14311739e-07 8.34186783e-05 -8.13987924e-07 5.21042689e-08 -1.80327429e-05 1.62640217e-07 -9.01178660e-08 -1.80255721e-05 3.56835998e-06 3.73938340e-05 1.16224295e-05 3.44625272e-06 1.93649141e-05 -3.78946500e-05 -1.13263508e-05 -6.31388338e-05 -1.74010972e-06 2.08511582e-06 1.17930628e-05 -9.55730174e-06 3.47415219e-06 1.15901207e-04 1.27453698e-03 4.74655879e-04 2.32424277e-07 4.50234363e-04 -1.66232271e-03 -8.13987924e-07 -1.57824260e-03 1.06364805e-04 1.62640217e-07 3.13978265e-04 -1.47913839e-04 1.53745428e-07 1.48388021e-05 1.55499923e-04 4.83311471e-05 1.93649141e-05 7.93172621e-05 -1.57582535e-04 -6.31388338e-05 -2.58701941e-04 -7.23613758e-06 1.17930628e-05 4.82898947e-05 -3.72414580e-05 1.93483855e-05 6.56977077e-06 7.24475934e-05 2.12092296e-05 1.47973422e-08 3.02070532e-05 -7.51733537e-05 -5.21042689e-08 -1.06364805e-04 -8.44098719e-07 8.10990595e-09 1.65554298e-05 -1.16233331e-05 1.13877032e-08 -4.45271445e-07 -4.68652130e-06 -1.72755575e-06 -5.29149089e-07 -2.20043344e-06 5.64344202e-06 1.74010972e-06 7.23613758e-06 -9.27366502e-08 -3.90827723e-07 -1.62523267e-06 9.43875709e-07 -4.81819662e-07 1.11352091e-08 1.22792579e-07 4.35812986e-08 -5.20181119e-06 4.61101322e-08 -1.53874803e-07 1.80327429e-05 -1.62640217e-07 8.10990595e-09 -3.69543062e-06 2.99513513e-08 -1.78115422e-08 -3.86851395e-06 6.59820472e-07 6.94466877e-06 2.06385811e-06 6.29719392e-07 3.59556515e-06 -6.77712529e-06 -2.08511582e-06 -1.17930628e-05 -3.90827723e-07 3.64007278e-07 2.10175769e-06 -1.78512422e-06 6.37245931e-07 2.27312343e-05 2.50666770e-04 8.89661525e-05 4.61101322e-08 8.89266385e-05 -3.14117514e-04 -1.62640217e-07 -3.13978265e-04 1.65554298e-05 2.99513513e-08 5.74467552e-05 -2.86231329e-05 2.99379342e-08 2.74382222e-06 2.88789713e-05 8.58242502e-06 3.59556515e-06 1.47170092e-05 -2.81822522e-05 -1.17930628e-05 -4.82898947e-05 -1.62523267e-06 2.10175769e-06 8.59861531e-06 -6.93523297e-06 3.60611560e-06 -1.13610948e-05 -1.25283515e-04 -4.70642248e-05 -2.55930694e-08 -4.18457443e-05 1.66005504e-04 9.01178660e-08 1.47913839e-04 -1.16233331e-05 -1.78115422e-08 -2.86231329e-05 1.25469982e-05 -1.59101603e-08 -2.15364805e-06 -2.26673360e-05 -7.04364490e-06 -2.91631522e-06 -1.13444696e-05 2.31023894e-05 9.55730174e-06 3.72414580e-05 9.43875709e-07 -1.78512422e-06 -6.93523297e-06 5.20999612e-06 -2.87653314e-06 1.11307811e-08 1.22743750e-07 4.61101322e-08 -5.19974266e-06 4.35446194e-08 -1.62640217e-07 1.80255721e-05 -1.53745428e-07 1.13877032e-08 -3.86851395e-06 2.99379342e-08 -1.59101603e-08 -3.69235334e-06 1.09937142e-06 1.15709813e-05 3.59556515e-06 1.04921798e-06 5.89668644e-06 -1.17930628e-05 -3.47415219e-06 -1.93483855e-05 -4.81819662e-07 6.37245931e-07 3.60611560e-06 -2.87653314e-06 1.04330362e-06 8.22130806e-07 8.60394759e-06 4.42386549e-06 -1.06343094e-06 2.65577596e-06 -1.44010598e-05 3.46179888e-06 -8.64537781e-06 2.03146849e-06 -1.06942685e-06 2.67074993e-06 -6.73127594e-07 -6.42008243e-07 8.15758664e-06 8.95995828e-05 3.27062093e-05 -1.60140991e-08 3.27192142e-05 -1.14303917e-04 5.59671786e-08 -1.14349367e-04 6.47786822e-06 -1.09961516e-08 2.24667923e-05 -1.12378601e-05 -1.10005239e-08 8.60394759e-06 8.99268630e-05 4.64049445e-05 -1.11550530e-05 2.78582467e-05 -1.50782072e-04 3.62457495e-05 -9.05188918e-05 2.13607873e-05 -1.12449686e-05 2.80827989e-05 -7.07790223e-06 -6.75068385e-06 8.95995828e-05 9.84805909e-04 3.59497797e-04 -1.76022642e-07 3.59640743e-04 -1.25713505e-03 6.15537104e-07 -1.25763492e-03 7.14535282e-05 -1.21292036e-07 2.47817881e-04 -1.23958180e-04 -1.21340265e-07 -4.42386549e-06 -4.64049445e-05 -2.36011317e-05 5.76106408e-06 -1.43874839e-05 7.70924782e-05 -1.88114453e-05 4.69790583e-05 -1.06498610e-05 5.74489609e-06 -1.43471065e-05 3.67301932e-06 3.50321202e-06 -3.27062093e-05 -3.59497797e-04 -1.26810205e-04 6.54713024e-08 -1.33767722e-04 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -2.09343890e-05 4.30569530e-08 -8.79718337e-05 4.65627599e-05 4.55793850e-08 1.06343094e-06 1.11550530e-05 5.76106408e-06 -1.02001774e-06 3.45853542e-06 -1.88114453e-05 3.35898305e-06 -1.12930613e-05 2.71697021e-06 -1.02591683e-06 3.50321202e-06 -9.73526929e-07 -6.15887908e-07 1.60140991e-08 1.76022642e-07 6.54713024e-08 6.90431656e-06 6.54973356e-08 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 1.45878080e-08 5.11463775e-06 4.55793850e-08 -2.53030645e-08 5.11667146e-06 -2.65577596e-06 -2.78582467e-05 -1.43874839e-05 3.45853542e-06 -8.27237205e-06 4.69790583e-05 -1.12930613e-05 2.70398976e-05 -6.78526821e-06 3.50321202e-06 -8.37195547e-06 1.97878928e-06 2.01249258e-06 -3.27192142e-05 -3.59640743e-04 -1.33767722e-04 6.54973356e-08 -1.26916563e-04 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -2.98050867e-05 4.55793850e-08 -8.80108820e-05 4.14645807e-05 4.30931929e-08 1.44010598e-05 1.50782072e-04 7.70924782e-05 -1.88114453e-05 4.69790583e-05 -2.51149095e-04 6.12624106e-05 -1.52994643e-04 3.49208736e-05 -1.88255688e-05 4.70143300e-05 -1.20313977e-05 -1.14751743e-05 1.14303917e-04 1.25713505e-03 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -1.55776448e-03 8.02824710e-07 -1.64029168e-03 7.41986551e-05 -1.52016335e-07 3.10592247e-04 -1.64227548e-04 -1.60759170e-07 -3.46179888e-06 -3.62457495e-05 -1.88114453e-05 3.35898305e-06 -1.12930613e-05 6.12624106e-05 -1.10244480e-05 3.67776185e-05 -8.89541849e-06 3.39170953e-06 -1.14751743e-05 3.18139934e-06 2.03614252e-06 -5.59671786e-08 -6.15537104e-07 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 8.02824710e-07 8.18748505e-05 8.03143934e-07 -5.13626078e-08 -1.77252502e-05 -1.60759170e-07 8.90904652e-08 -1.77322982e-05 8.64537781e-06 9.05188918e-05 4.69790583e-05 -1.12930613e-05 2.70398976e-05 -1.52994643e-04 3.67776185e-05 -8.81450461e-05 2.22151131e-05 -1.14751743e-05 2.74545049e-05 -6.50048290e-06 -6.59965138e-06 1.14349367e-04 1.25763492e-03 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -1.64029168e-03 8.03143934e-07 -1.55906866e-03 1.04941536e-04 -1.60759170e-07 3.10729845e-04 -1.46560472e-04 -1.52144154e-07 2.03146849e-06 2.13607873e-05 1.06498610e-05 -2.71697021e-06 6.78526821e-06 -3.49208736e-05 8.89541849e-06 -2.22151131e-05 4.59449937e-06 -2.66559661e-06 6.65696956e-06 -1.78050867e-06 -1.69819400e-06 6.47786822e-06 7.14535282e-05 2.09343890e-05 -1.45878080e-08 2.98050867e-05 -7.41986551e-05 5.13626078e-08 -1.04941536e-04 -8.22186744e-07 -8.01799705e-09 1.63819744e-05 -1.14964989e-05 -1.12537004e-08 -1.06942685e-06 -1.12449686e-05 -5.74489609e-06 1.02591683e-06 -3.50321202e-06 1.88255688e-05 -3.39170953e-06 1.14751743e-05 -2.66559661e-06 1.02215095e-06 -3.51938298e-06 9.95477457e-07 6.24328517e-07 -1.09961516e-08 -1.21292036e-07 -4.30569530e-08 -5.11463775e-06 -4.55793850e-08 1.52016335e-07 1.77252502e-05 1.60759170e-07 -8.01799705e-09 -3.63904034e-06 -2.96775921e-08 1.76437621e-08 -3.81158746e-06 2.67074993e-06 2.80827989e-05 1.43471065e-05 -3.50321202e-06 8.37195547e-06 -4.70143300e-05 1.14751743e-05 -2.74545049e-05 6.65696956e-06 -3.51938298e-06 8.40209917e-06 -2.01552393e-06 -2.05253227e-06 2.24667923e-05 2.47817881e-04 8.79718337e-05 -4.55793850e-08 8.80108820e-05 -3.10592247e-04 1.60759170e-07 -3.10729845e-04 1.63819744e-05 -2.96775921e-08 5.69967315e-05 -2.84256551e-05 -2.96908766e-08 -6.73127594e-07 -7.07790223e-06 -3.67301932e-06 9.73526929e-07 -1.97878928e-06 1.20313977e-05 -3.18139934e-06 6.50048290e-06 -1.78050867e-06 9.95477457e-07 -2.01552393e-06 4.08216584e-07 5.41057998e-07 -1.12378601e-05 -1.23958180e-04 -4.65627599e-05 2.53030645e-08 -4.14645807e-05 1.64227548e-04 -8.90904652e-08 1.46560472e-04 -1.14964989e-05 1.76437621e-08 -2.84256551e-05 1.24829480e-05 1.57844842e-08 -6.42008243e-07 -6.75068385e-06 -3.50321202e-06 6.15887908e-07 -2.01249258e-06 1.14751743e-05 -2.03614252e-06 6.59965138e-06 -1.69819400e-06 6.24328517e-07 -2.05253227e-06 5.41057998e-07 3.56976839e-07 -1.10005239e-08 -1.21340265e-07 -4.55793850e-08 -5.11667146e-06 -4.30931929e-08 1.60759170e-07 1.77322982e-05 1.52144154e-07 -1.12537004e-08 -3.81158746e-06 -2.96908766e-08 1.57844842e-08 -3.64207091e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 -2 169 + 4.81760248e-06 5.28686911e-05 4.87919842e-06 -2.34138655e-05 -1.46480828e-05 -1.69359590e-05 8.12707812e-05 5.08442797e-05 -7.64340014e-06 -4.22955057e-06 -2.64607340e-06 6.17624259e-06 1.26977428e-05 5.28686911e-05 5.79626318e-04 5.36890443e-05 -2.57638234e-04 -1.61182534e-04 -1.86106503e-04 8.93071416e-04 5.58719533e-04 -8.45699515e-05 -4.67976136e-05 -2.92773236e-05 6.83366731e-05 1.40493429e-04 -4.87919842e-06 -5.36890443e-05 -1.45584224e-06 2.40714796e-05 1.50594965e-05 5.36683805e-06 -8.38397355e-05 -5.24514580e-05 8.73770683e-06 1.12081376e-06 7.01198730e-07 -6.42315983e-06 -1.32053802e-05 2.34138655e-05 2.57638234e-04 2.40714796e-05 -1.11951690e-04 -7.22661788e-05 -8.38397355e-05 3.90218239e-04 2.51699414e-04 -3.62523694e-05 -2.04247491e-05 -1.32053802e-05 2.75450628e-05 6.13181490e-05 1.46480828e-05 1.61182534e-04 1.50594965e-05 -7.22661788e-05 -4.16504629e-05 -5.24514580e-05 2.51699414e-04 1.45362651e-04 -2.26800528e-05 -1.32053802e-05 -7.57842947e-06 2.13339465e-05 3.63666966e-05 1.69359590e-05 1.86106503e-04 5.36683805e-06 -8.38397355e-05 -5.24514580e-05 -1.96752888e-05 2.91445484e-04 1.82332881e-04 -3.05920293e-05 -4.23569094e-06 -2.64991491e-06 2.25419108e-05 4.63439352e-05 -8.12707812e-05 -8.93071416e-04 -8.38397355e-05 3.90218239e-04 2.51699414e-04 2.91445484e-04 -1.35750397e-03 -8.74962893e-04 1.27401228e-04 7.17431012e-05 4.63439352e-05 -9.69708992e-05 -2.15383510e-04 -5.08442797e-05 -5.58719533e-04 -5.24514580e-05 2.51699414e-04 1.45362651e-04 1.82332881e-04 -8.74962893e-04 -5.06331732e-04 7.97042132e-05 4.63439352e-05 2.66592796e-05 -7.46818487e-05 -1.27930191e-04 -7.64340014e-06 -8.45699515e-05 -8.73770683e-06 3.62523694e-05 2.26800528e-05 3.05920293e-05 -1.27401228e-04 -7.97042132e-05 1.11343571e-05 7.36172368e-06 4.60561019e-06 -9.14692552e-06 -1.88051726e-05 -4.22955057e-06 -4.67976136e-05 -1.12081376e-06 2.04247491e-05 1.32053802e-05 4.23569094e-06 -7.17431012e-05 -4.63439352e-05 7.36172368e-06 7.76307411e-07 5.19030891e-07 -5.01910939e-06 -1.12253451e-05 -2.64607340e-06 -2.92773236e-05 -7.01198730e-07 1.32053802e-05 7.57842947e-06 2.64991491e-06 -4.63439352e-05 -2.66592796e-05 4.60561019e-06 5.19030891e-07 2.71389217e-07 -3.93309825e-06 -6.63700227e-06 6.17624259e-06 6.83366731e-05 6.42315983e-06 -2.75450628e-05 -2.13339465e-05 -2.25419108e-05 9.69708992e-05 7.46818487e-05 -9.14692552e-06 -5.01910939e-06 -3.93309825e-06 4.10151154e-06 1.69709601e-05 1.26977428e-05 1.40493429e-04 1.32053802e-05 -6.13181490e-05 -3.63666966e-05 -4.63439352e-05 2.15383510e-04 1.27930191e-04 -1.88051726e-05 -1.12253451e-05 -6.63700227e-06 1.69709601e-05 3.07373682e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +0 -1 -1 507 + 1.70876587e-04 1.57135665e-03 3.26693848e-04 -6.53113366e-04 -3.26999304e-04 -1.06946317e-03 2.13802828e-03 1.07046310e-03 -4.52529589e-05 -1.04515170e-04 -5.23284157e-05 7.82826168e-05 1.04612890e-04 2.08444768e-02 9.19397241e-02 1.89220801e-02 -5.29521578e-02 -1.89574665e-02 -4.42419337e-02 1.23808051e-01 4.43246710e-02 3.41776797e-03 4.84743064e-03 1.73543454e-03 -5.91326293e-03 -4.85649586e-03 1.57135665e-03 1.39943214e-02 2.90348621e-03 -5.80453430e-03 -2.90620094e-03 -9.37356333e-03 1.87392555e-02 9.38232751e-03 -2.86815690e-04 -6.62422772e-04 -3.31660316e-04 4.96159440e-04 6.63042130e-04 9.19397241e-02 1.80049656e-01 5.20587081e-02 -1.45682764e-01 -5.21560635e-02 -6.61417847e-02 1.85093298e-01 6.62654770e-02 2.11223239e-02 2.99578558e-02 1.07252484e-02 -3.65448608e-02 -3.00138802e-02 -3.26693848e-04 -2.90348621e-03 -4.15113506e-04 1.28841356e-03 6.45079952e-04 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 1.33613851e-04 8.08065612e-05 4.04580439e-05 -1.33623619e-04 -1.78567779e-04 -1.89220801e-02 -5.20587081e-02 8.45214231e-03 4.37221853e-02 1.56530328e-02 -2.39454193e-02 -7.89400195e-02 -2.82614125e-02 -9.40620523e-03 3.01643097e-04 1.07991613e-04 1.01303122e-02 8.31991062e-03 6.53113366e-04 5.80453430e-03 1.28841356e-03 -2.34638136e-03 -1.28961822e-03 -4.16522749e-03 7.55756377e-03 4.16912193e-03 -9.80770187e-05 -3.07834441e-04 -1.78567779e-04 1.69540617e-04 3.08122263e-04 5.29521578e-02 1.45682764e-01 4.37221853e-02 -9.82776132e-02 -4.38039506e-02 -7.89400195e-02 1.68754212e-01 7.90876459e-02 1.14165572e-02 2.01639438e-02 8.31991062e-03 -1.97429678e-02 -2.02016526e-02 3.26999304e-04 2.90620094e-03 6.45079952e-04 -1.28961822e-03 -4.16319228e-04 -2.08543656e-03 4.16912193e-03 1.31799284e-03 -4.91049770e-05 -1.78567779e-04 -4.05872025e-05 1.82611904e-04 8.11403231e-05 1.89574665e-02 5.21560635e-02 1.56530328e-02 -4.38039506e-02 8.39365120e-03 -2.82614125e-02 7.90876459e-02 -2.38398141e-02 4.08725553e-03 8.31991062e-03 -9.66805138e-05 -1.32303099e-02 2.70553860e-04 1.06946317e-03 9.37356333e-03 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -4.11750559e-03 1.33872685e-02 6.70270695e-03 -3.95744275e-04 -1.76844079e-04 -8.85418883e-05 3.69020309e-04 4.93139890e-04 4.42419337e-02 6.61417847e-02 -2.39454193e-02 -7.89400195e-02 -2.82614125e-02 5.89867991e-02 8.88351937e-02 3.18039959e-02 2.67022713e-02 -8.48951089e-03 -3.03934013e-03 -2.53202627e-02 -2.07952449e-02 -2.13802828e-03 -1.87392555e-02 -4.16522749e-03 7.55756377e-03 4.16912193e-03 1.33872685e-02 -2.41843553e-02 -1.33997855e-02 2.44113689e-04 8.26960857e-04 4.93139890e-04 -4.21895582e-04 -8.27734056e-04 -1.23808051e-01 -1.85093298e-01 -7.89400195e-02 1.68754212e-01 7.90876459e-02 8.88351937e-02 -1.57867835e-01 -8.90013252e-02 -2.40690426e-02 -4.76346262e-02 -2.07952449e-02 4.16110986e-02 4.77237082e-02 -1.07046310e-03 -9.38232751e-03 -2.08543656e-03 4.16912193e-03 1.31799284e-03 6.70270695e-03 -1.33997855e-02 -4.13003365e-03 1.22222283e-04 4.93139890e-04 8.89202386e-05 -5.27496964e-04 -1.77765809e-04 -4.43246710e-02 -6.62654770e-02 -2.82614125e-02 7.90876459e-02 -2.38398141e-02 3.18039959e-02 -8.90013252e-02 5.88679562e-02 -8.61698726e-03 -2.07952449e-02 3.00589909e-03 3.58379885e-02 -8.41180473e-03 -4.52529589e-05 -2.86815690e-04 -1.33613851e-04 9.80770187e-05 4.91049770e-05 3.95744275e-04 -2.44113689e-04 -1.22222283e-04 -2.48654934e-05 -3.04987563e-05 -1.52700474e-05 3.45954558e-05 4.62316000e-05 3.41776797e-03 2.11223239e-02 9.40620523e-03 -1.14165572e-02 -4.08725553e-03 -2.67022713e-02 2.40690426e-02 8.61698726e-03 2.54200794e-03 4.64465649e-03 1.66283912e-03 -5.55623569e-03 -4.56327344e-03 -1.04515170e-04 -6.62422772e-04 -8.08065612e-05 3.07834441e-04 1.78567779e-04 1.76844079e-04 -8.26960857e-04 -4.93139890e-04 -3.04987563e-05 -1.00963008e-04 -5.03818370e-05 7.08650300e-05 8.71305384e-05 4.84743064e-03 2.99578558e-02 -3.01643097e-04 -2.01639438e-02 -8.31991062e-03 8.48951089e-03 4.76346262e-02 2.07952449e-02 4.64465649e-03 5.74892077e-03 2.29119207e-03 -7.93221648e-03 -6.53868565e-03 -5.23284157e-05 -3.31660316e-04 -4.04580439e-05 1.78567779e-04 4.05872025e-05 8.85418883e-05 -4.93139890e-04 -8.89202386e-05 -1.52700474e-05 -5.03818370e-05 -2.55607884e-05 2.64098346e-05 5.04119965e-05 1.73543454e-03 1.07252484e-02 -1.07991613e-04 -8.31991062e-03 9.66805138e-05 3.03934013e-03 2.07952449e-02 -3.00589909e-03 1.66283912e-03 2.29119207e-03 1.69415907e-04 -2.87698715e-03 -2.29567116e-03 7.82826168e-05 4.96159440e-04 1.33623619e-04 -1.69540617e-04 -1.82611904e-04 -3.69020309e-04 4.21895582e-04 5.27496964e-04 3.45954558e-05 7.08650300e-05 2.64098346e-05 -6.47470438e-05 -6.18643903e-05 -5.91326293e-03 -3.65448608e-02 -1.01303122e-02 1.97429678e-02 1.32303099e-02 2.53202627e-02 -4.16110986e-02 -3.58379885e-02 -5.55623569e-03 -7.93221648e-03 -2.87698715e-03 8.94345836e-03 7.99905199e-03 1.04612890e-04 6.63042130e-04 1.78567779e-04 -3.08122263e-04 -8.11403231e-05 -4.93139890e-04 8.27734056e-04 1.77765809e-04 4.62316000e-05 8.71305384e-05 5.04119965e-05 -6.18643903e-05 -1.01125864e-04 -4.85649586e-03 -3.00138802e-02 -8.31991062e-03 2.02016526e-02 -2.70553860e-04 2.07952449e-02 -4.77237082e-02 8.41180473e-03 -4.56327344e-03 -6.53868565e-03 -2.29567116e-03 7.99905199e-03 5.77335405e-03 1.69812269e-04 1.56257026e-03 3.24737940e-04 -6.49748532e-04 -3.24434356e-04 -1.06336506e-03 2.12762291e-03 1.06237096e-03 -4.51611142e-05 -1.04287103e-04 -5.20729446e-05 7.83187515e-05 1.04189610e-04 1.56257026e-03 1.39281933e-02 2.88844641e-03 -5.77931796e-03 -2.88574612e-03 -9.32883121e-03 1.86654949e-02 9.32011008e-03 -2.87377701e-04 -6.63619325e-04 -3.31360362e-04 4.98372620e-04 6.62998935e-04 -3.24737940e-04 -2.88844641e-03 -4.12926346e-04 1.28212806e-03 6.40195973e-04 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 1.33361885e-04 8.10521596e-05 4.04712038e-05 -1.33922102e-04 -1.78160290e-04 6.49748532e-04 5.77931796e-03 1.28212806e-03 -2.33746393e-03 -1.28092946e-03 -4.14642043e-03 7.53176319e-03 4.14254411e-03 -9.83507742e-05 -3.08186714e-04 -1.78160290e-04 1.70681803e-04 3.07898603e-04 3.24434356e-04 2.88574612e-03 6.40195973e-04 -1.28092946e-03 -4.11728801e-04 -2.07040290e-03 4.14254411e-03 1.30390836e-03 -4.91087991e-05 -1.78160290e-04 -4.03425113e-05 1.82368464e-04 8.07188943e-05 1.06336506e-03 9.32883121e-03 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -4.10007140e-03 1.33325342e-02 6.65724034e-03 -3.95514409e-04 -1.78547270e-04 -8.91527502e-05 3.70647471e-04 4.93082622e-04 -2.12762291e-03 -1.86654949e-02 -4.14642043e-03 7.53176319e-03 4.14254411e-03 1.33325342e-02 -2.41128640e-02 -1.33200701e-02 2.45770524e-04 8.30070130e-04 4.93082622e-04 -4.26609392e-04 -8.29294132e-04 -1.06237096e-03 -9.32011008e-03 -2.07040290e-03 4.14254411e-03 1.30390836e-03 6.65724034e-03 -1.33200701e-02 -4.08761842e-03 1.22718864e-04 4.93082622e-04 8.87751887e-05 -5.27586074e-04 -1.77624913e-04 -4.51611142e-05 -2.87377701e-04 -1.33361885e-04 9.83507742e-05 4.91087991e-05 3.95514409e-04 -2.45770524e-04 -1.22718864e-04 -2.47895715e-05 -2.98834622e-05 -1.49214986e-05 3.43621849e-05 4.57129687e-05 -1.04287103e-04 -6.63619325e-04 -8.10521596e-05 3.08186714e-04 1.78160290e-04 1.78547270e-04 -8.30070130e-04 -4.93082622e-04 -2.98834622e-05 -9.99557848e-05 -4.97128759e-05 7.01632737e-05 8.57249345e-05 -5.20729446e-05 -3.31360362e-04 -4.04712038e-05 1.78160290e-04 4.03425113e-05 8.91527502e-05 -4.93082622e-04 -8.87751887e-05 -1.49214986e-05 -4.97128759e-05 -2.52179989e-05 2.58826758e-05 4.96835272e-05 7.83187515e-05 4.98372620e-04 1.33922102e-04 -1.70681803e-04 -1.82368464e-04 -3.70647471e-04 4.26609392e-04 5.27586074e-04 3.43621849e-05 7.01632737e-05 2.58826758e-05 -6.45321359e-05 -6.09423818e-05 1.04189610e-04 6.62998935e-04 1.78160290e-04 -3.07898603e-04 -8.07188943e-05 -4.93082622e-04 8.29294132e-04 1.77624913e-04 4.57129687e-05 8.57249345e-05 4.96835272e-05 -6.09423818e-05 -9.97954284e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +0 -1 0 676 + 3.92500494e-02 1.43599898e-01 7.04711972e-02 -7.04071004e-02 -6.09690816e-05 -1.49320233e-01 1.49184420e-01 1.29186361e-04 -6.14982268e-03 2.12456198e-02 1.83976605e-05 -1.06131400e-02 -1.83809269e-05 3.08689243e-01 3.37803817e-01 2.74649246e-01 -2.19212078e-01 2.74212338e-01 -2.40318287e-01 1.91810726e-01 -2.39935993e-01 -1.56639160e-02 1.18287935e-01 -1.47966351e-01 2.66595580e-02 1.18099765e-01 1.43599898e-01 2.07059446e-01 1.43696713e-01 -1.43566014e-01 -1.24321098e-04 -1.50526721e-01 1.50389810e-01 1.30230169e-04 -1.38862174e-02 4.79723254e-02 4.15416713e-05 -2.39643282e-02 -4.15038872e-05 3.37803817e-01 3.00707410e-01 1.95476874e-02 -1.56020424e-02 1.95165912e-02 -9.93563702e-02 7.93015699e-02 -9.91983156e-02 1.42548524e-02 -1.07647223e-01 1.34655887e-01 -2.42613702e-02 -1.07475979e-01 -7.04711972e-02 -1.43696713e-01 -6.96545637e-02 1.13261353e-01 9.80787537e-05 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -6.49774041e-04 -4.19809586e-02 -3.63534427e-05 2.83534715e-02 4.91054568e-05 -2.74649246e-01 -1.95476874e-02 5.15296470e-02 1.88058412e-01 -2.35242224e-01 -2.11110311e-01 -4.59525878e-02 5.74820816e-02 -1.40621697e-01 -3.10391428e-02 3.88268566e-02 -3.18145608e-02 -1.40936025e-01 7.04071004e-02 1.43566014e-01 1.13261353e-01 -6.94484370e-02 -9.79895466e-05 -1.75021767e-01 8.99790234e-02 1.51422380e-04 -2.49464601e-02 4.19158809e-02 4.91054568e-05 -1.35500312e-02 -3.62640747e-05 2.19212078e-01 1.56020424e-02 1.88058412e-01 1.37047330e-01 1.87759251e-01 -4.59525878e-02 -2.32006791e-01 -4.58794871e-02 -7.84983186e-02 -2.53026434e-02 -1.40936025e-01 1.35514321e-01 -2.52623923e-02 6.09690816e-05 1.24321098e-04 9.80787537e-05 -9.79895466e-05 4.37098145e-02 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 -2.16024059e-05 4.91054568e-05 -1.47910621e-02 -3.73270966e-05 1.47776090e-02 -2.74212338e-01 -1.95165912e-02 -2.35242224e-01 1.87759251e-01 5.22786829e-02 5.74820816e-02 -4.58794871e-02 -2.11293340e-01 9.81935287e-02 -1.40936025e-01 3.83264782e-02 1.05986932e-01 -3.05903877e-02 1.49320233e-01 1.50526721e-01 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -3.55490351e-02 1.58872868e-01 1.37576080e-04 1.91774349e-02 4.51977880e-02 3.91390585e-05 -4.11813359e-02 -7.13220712e-05 2.40318287e-01 9.93563702e-02 -2.11110311e-01 -4.59525878e-02 5.74820816e-02 1.67910797e-01 9.01103808e-02 -1.12719055e-01 2.27570528e-02 -8.98737795e-02 1.12423090e-01 -1.83940388e-02 -8.14841588e-02 -1.49184420e-01 -1.50389810e-01 -1.75021767e-01 8.99790234e-02 1.51422380e-04 1.58872868e-01 -3.52598991e-02 -1.37450948e-04 4.53414527e-02 -4.50889048e-02 -7.13220712e-05 3.90395303e-03 3.90092580e-05 -1.91810726e-01 -7.93015699e-02 -4.59525878e-02 -2.32006791e-01 -4.58794871e-02 9.01103808e-02 2.08887592e-01 8.99670346e-02 -3.85722994e-03 7.54890702e-02 -8.14841588e-02 6.42146411e-03 7.53689833e-02 -1.29186361e-04 -1.30230169e-04 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 1.37576080e-04 -1.37450948e-04 1.23468348e-01 3.92634651e-05 -7.13220712e-05 3.72737671e-02 6.78765160e-05 -3.72398649e-02 2.39935993e-01 9.91983156e-02 5.74820816e-02 -4.58794871e-02 -2.11293340e-01 -1.12719055e-01 8.99670346e-02 1.68269706e-01 4.82500804e-03 -8.14841588e-02 1.12277148e-01 -2.86969477e-02 -8.96143254e-02 -6.14982268e-03 -1.38862174e-02 6.49774041e-04 2.49464601e-02 2.16024059e-05 -1.91774349e-02 -4.53414527e-02 -3.92634651e-05 -7.71985221e-03 -1.42582602e-02 -1.23469512e-05 1.39925551e-02 2.42337454e-05 -1.56639160e-02 1.42548524e-02 1.40621697e-01 7.84983186e-02 -9.81935287e-02 -2.27570528e-02 3.85722994e-03 -4.82500804e-03 -1.68081601e-01 4.33360226e-02 -5.42090208e-02 -3.28746487e-02 -1.45632132e-01 2.12456198e-02 4.79723254e-02 4.19809586e-02 -4.19158809e-02 -4.91054568e-05 -4.51977880e-02 4.50889048e-02 7.13220712e-05 -1.42582602e-02 4.92807889e-02 4.94990683e-05 -2.45775648e-02 -4.94415450e-05 1.18287935e-01 -1.07647223e-01 3.10391428e-02 2.53026434e-02 1.40936025e-01 8.98737795e-02 -7.54890702e-02 8.14841588e-02 4.33360226e-02 1.12750160e-02 -7.73215580e-02 1.42815911e-01 1.21200158e-02 1.83976605e-05 4.15416713e-05 3.63534427e-05 -4.91054568e-05 1.47910621e-02 -3.91390585e-05 7.13220712e-05 -3.72737671e-02 -1.23469512e-05 4.94990683e-05 -7.88069639e-03 -3.50341232e-05 7.93987295e-03 -1.47966351e-01 1.34655887e-01 -3.88268566e-02 1.40936025e-01 -3.83264782e-02 -1.12423090e-01 8.14841588e-02 -1.12277148e-01 -5.42090208e-02 -7.73215580e-02 4.61837826e-02 9.46351393e-02 -7.68512943e-02 -1.06131400e-02 -2.39643282e-02 -2.83534715e-02 1.35500312e-02 3.73270966e-05 4.11813359e-02 -3.90395303e-03 -6.78765160e-05 1.39925551e-02 -2.45775648e-02 -3.50341232e-05 8.37764785e-03 2.81329305e-05 2.66595580e-02 -2.42613702e-02 3.18145608e-02 -1.35514321e-01 -1.05986932e-01 1.83940388e-02 -6.42146411e-03 2.86969477e-02 -3.28746487e-02 1.42815911e-01 9.46351393e-02 -1.29720243e-01 3.35277076e-02 -1.83809269e-05 -4.15038872e-05 -4.91054568e-05 3.62640747e-05 -1.47776090e-02 7.13220712e-05 -3.90092580e-05 3.72398649e-02 2.42337454e-05 -4.94415450e-05 7.93987295e-03 2.81329305e-05 -7.86624645e-03 1.18099765e-01 -1.07475979e-01 1.40936025e-01 2.52623923e-02 3.05903877e-02 8.14841588e-02 -7.53689833e-02 8.96143254e-02 -1.45632132e-01 1.21200158e-02 -7.68512943e-02 3.35277076e-02 1.12364246e-02 5.94583619e-04 4.74240544e-03 1.67332813e-03 -1.78589267e-03 -5.56785059e-04 -5.13266744e-03 5.47794125e-03 1.70784946e-03 4.15565990e-05 -2.04793963e-04 -6.38483042e-05 9.86627339e-05 6.81433705e-05 3.90200104e-02 1.43040610e-01 7.00758462e-02 -7.01395746e-02 6.06185730e-05 -1.48644876e-01 1.48780057e-01 -1.28584109e-04 -6.06660721e-03 2.10728168e-02 -1.82123158e-05 -1.05459825e-02 1.82288785e-05 4.74240544e-03 3.41609486e-02 1.22873736e-02 -1.31139435e-02 -4.08851433e-03 -3.57036384e-02 3.81054171e-02 1.18800683e-02 -1.13147162e-04 5.57597500e-04 1.73841329e-04 -2.68631423e-04 -1.85535611e-04 1.43040610e-01 2.06856968e-01 1.43350536e-01 -1.43480902e-01 1.24004281e-04 -1.50417204e-01 1.50553997e-01 -1.30117248e-04 -1.38395888e-02 4.80728535e-02 -4.15472691e-05 -2.40582680e-02 4.15850530e-05 -1.67332813e-03 -1.22873736e-02 -3.98225369e-03 5.11582442e-03 1.59495284e-03 1.16156890e-02 -1.51268223e-02 -4.71606651e-03 1.23664884e-04 -3.19928813e-06 -9.97437223e-07 -6.58815545e-05 -4.55023999e-05 -7.00758462e-02 -1.43350536e-01 -6.92992616e-02 1.12874473e-01 -9.75524806e-05 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -7.06744227e-04 -4.17155764e-02 3.60529520e-05 2.82273075e-02 -4.87912961e-05 1.78589267e-03 1.31139435e-02 5.11582442e-03 -4.64884411e-03 -1.70224509e-03 -1.51268223e-02 1.35867094e-02 5.03331563e-03 1.10415751e-04 -1.48208680e-05 -4.55023999e-05 -6.96360506e-05 4.93151208e-06 7.01395746e-02 1.43480902e-01 1.12874473e-01 -6.95044687e-02 9.76411967e-05 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 -2.47326054e-02 4.17802159e-02 -4.87912961e-05 -1.35651915e-02 3.61416551e-05 5.56785059e-04 4.08851433e-03 1.59495284e-03 -1.70224509e-03 2.80414708e-04 -4.71606651e-03 5.03331563e-03 -9.88462800e-04 3.44241519e-05 -4.55023999e-05 1.16942241e-04 6.55533294e-05 -1.24808929e-04 -6.06185730e-05 -1.24004281e-04 -9.75524806e-05 9.76411967e-05 4.34725702e-02 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 2.13753113e-05 -4.87912961e-05 -1.46743990e-02 3.71118284e-05 1.46877442e-02 5.13266744e-03 3.57036384e-02 1.16156890e-02 -1.51268223e-02 -4.71606651e-03 -3.27473001e-02 4.34737815e-02 1.35537551e-02 -5.31229886e-04 1.17538048e-03 3.66446596e-04 -4.05821645e-04 -2.80288754e-04 1.48644876e-01 1.50417204e-01 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -3.55920291e-02 1.58871492e-01 -1.37305696e-04 1.91183423e-02 4.52813592e-02 -3.91347024e-05 -4.12480311e-02 7.12977992e-05 -5.47794125e-03 -3.81054171e-02 -1.51268223e-02 1.35867094e-02 5.03331563e-03 4.34737815e-02 -3.84119210e-02 -1.44655143e-02 -9.83779365e-06 -1.21105606e-03 -2.80288754e-04 7.66138830e-04 4.02968138e-04 -1.48780057e-01 -1.50553997e-01 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 1.58871492e-01 -3.58808593e-02 1.37430565e-04 4.51923078e-02 -4.53900595e-02 7.12977992e-05 4.14573359e-03 -3.92643227e-05 -1.70784946e-03 -1.18800683e-02 -4.71606651e-03 5.03331563e-03 -9.88462800e-04 1.35537551e-02 -1.44655143e-02 3.47644401e-03 -3.06711406e-06 -2.80288754e-04 -3.99412771e-04 3.12091447e-05 4.26281211e-04 1.28584109e-04 1.30117248e-04 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -1.37305696e-04 1.37430565e-04 1.23134994e-01 -3.90577392e-05 7.12977992e-05 3.71060027e-02 -6.77796089e-05 -3.71397476e-02 4.15565990e-05 -1.13147162e-04 -1.23664884e-04 -1.10415751e-04 -3.44241519e-05 5.31229886e-04 9.83779365e-06 3.06711406e-06 9.89028240e-05 1.83897895e-04 5.73335687e-05 -1.63404529e-04 -1.12858573e-04 -6.06660721e-03 -1.38395888e-02 7.06744227e-04 2.47326054e-02 -2.13753113e-05 -1.91183423e-02 -4.51923078e-02 3.90577392e-05 -7.62586988e-03 -1.40726582e-02 1.21623842e-05 1.38215649e-02 -2.38907685e-05 -2.04793963e-04 5.57597500e-04 3.19928813e-06 1.48208680e-05 4.55023999e-05 -1.17538048e-03 1.21105606e-03 2.80288754e-04 1.83897895e-04 -9.81929976e-04 -3.32238599e-04 4.69842767e-04 3.58475166e-04 2.10728168e-02 4.80728535e-02 4.17155764e-02 -4.17802159e-02 4.87912961e-05 -4.52813592e-02 4.53900595e-02 -7.12977992e-05 -1.40726582e-02 4.89750822e-02 -4.90366322e-05 -2.44919408e-02 4.90935259e-05 -6.38483042e-05 1.73841329e-04 9.97437223e-07 4.55023999e-05 -1.16942241e-04 -3.66446596e-04 2.80288754e-04 3.99412771e-04 5.73335687e-05 -3.32238599e-04 -1.98534516e-05 2.02383007e-04 3.08241206e-05 -1.82123158e-05 -4.15472691e-05 -3.60529520e-05 4.87912961e-05 1.46743990e-02 3.91347024e-05 -7.12977992e-05 -3.71060027e-02 1.21623842e-05 -4.90366322e-05 -7.76340215e-03 3.46850220e-05 7.82037819e-03 9.86627339e-05 -2.68631423e-04 6.58815545e-05 6.96360506e-05 -6.55533294e-05 4.05821645e-04 -7.66138830e-04 -3.12091447e-05 -1.63404529e-04 4.69842767e-04 2.02383007e-04 -1.64835224e-04 -1.86166643e-04 -1.05459825e-02 -2.40582680e-02 -2.82273075e-02 1.35651915e-02 -3.71118284e-05 4.12480311e-02 -4.14573359e-03 6.77796089e-05 1.38215649e-02 -2.44919408e-02 3.46850220e-05 8.39319630e-03 -2.79515653e-05 6.81433705e-05 -1.85535611e-04 4.55023999e-05 -4.93151208e-06 1.24808929e-04 2.80288754e-04 -4.02968138e-04 -4.26281211e-04 -1.12858573e-04 3.58475166e-04 3.08241206e-05 -1.86166643e-04 -2.38698255e-05 1.82288785e-05 4.15850530e-05 4.87912961e-05 -3.61416551e-05 -1.46877442e-02 -7.12977992e-05 3.92643227e-05 3.71397476e-02 -2.38907685e-05 4.90935259e-05 7.82037819e-03 -2.79515653e-05 -7.77761969e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 1 676 + 3.92374918e-02 1.43569413e-01 7.04490824e-02 6.89958744e-05 7.03930517e-02 -1.49282270e-01 -1.46202908e-04 -1.49163540e-01 -6.14498615e-03 -2.08146796e-05 -2.12361802e-02 1.06096349e-02 -2.07981249e-05 1.21013339e-02 6.04567082e-02 1.10570109e-02 1.32919255e-02 3.31565318e-02 -2.74551701e-02 -3.30045869e-02 -8.23295040e-02 1.56592577e-03 -7.72878990e-04 -1.92793638e-03 2.42609122e-03 -2.31762337e-03 1.43569413e-01 2.07048455e-01 1.43676788e-01 1.40713055e-04 1.43562517e-01 -1.50519643e-01 -1.47414757e-04 -1.50399929e-01 -1.38830541e-02 -4.70255451e-05 -4.79778198e-02 2.39698076e-02 -4.69881440e-05 6.04567082e-02 1.53784404e-01 3.73022976e-02 4.48420795e-02 1.11857972e-01 -5.69216604e-02 -6.84270350e-02 -1.70690331e-01 1.89654568e-02 -9.36059892e-03 -2.33498898e-02 2.93832115e-02 -2.80695207e-02 -7.04490824e-02 -1.43676788e-01 -6.96334486e-02 -1.10992647e-04 -1.13240266e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -6.53646142e-04 4.11329686e-05 4.19659177e-02 -2.83467977e-02 5.55683815e-05 -1.10570109e-02 -3.73022976e-02 4.97094572e-03 -1.12085857e-02 -2.79596682e-02 -1.49080059e-02 2.24647070e-02 5.60379136e-02 -5.11613809e-03 8.43793886e-05 2.10483265e-04 -5.46236648e-03 5.21815012e-03 -6.89958744e-05 -1.40713055e-04 -1.10992647e-04 4.36968444e-02 -1.10904371e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 2.44393156e-05 -1.47845630e-02 5.55683815e-05 -4.22417099e-05 -1.47728043e-02 -1.32919255e-02 -4.48420795e-02 -1.12085857e-02 8.20773533e-04 -3.36110574e-02 2.24647070e-02 -6.59006059e-03 6.73646595e-02 -3.28237648e-03 7.14510136e-04 5.21815012e-03 -8.22222006e-03 2.14259336e-03 -7.03930517e-02 -1.43562517e-01 -1.13240266e-01 -1.10904371e-04 -6.94532486e-02 1.75005510e-01 1.71395535e-04 9.00027746e-02 2.49342156e-02 5.55683815e-05 4.19090325e-02 -1.35513938e-02 4.10445423e-05 -3.31565318e-02 -1.11857972e-01 -2.79596682e-02 -3.36110574e-02 -6.95474254e-02 5.60379136e-02 6.73646595e-02 1.34444769e-01 -8.18784456e-03 5.21815012e-03 1.16392431e-02 -1.22496527e-02 1.39918423e-02 1.49282270e-01 1.50519643e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -3.55489594e-02 -1.55719463e-04 -1.58872807e-01 1.91751556e-02 -4.43042779e-05 -4.52014465e-02 4.11852851e-02 -8.07357378e-05 2.74551701e-02 5.69216604e-02 -1.49080059e-02 2.24647070e-02 5.60379136e-02 4.15536843e-02 -3.13351132e-02 -7.81650239e-02 1.80716772e-02 9.69257016e-04 2.41779876e-03 1.80152326e-02 -1.72097915e-02 1.46202908e-04 1.47414757e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -1.55719463e-04 1.23450153e-01 -1.55595614e-04 -4.44328321e-05 3.72643260e-02 -8.07357378e-05 7.68314473e-05 3.72346883e-02 3.30045869e-02 6.84270350e-02 2.24647070e-02 -6.59006059e-03 6.73646595e-02 -3.13351132e-02 2.99513181e-02 -9.39642447e-02 1.01052159e-02 -1.31871761e-03 -1.72097915e-02 2.83649511e-02 -3.95442340e-03 1.49163540e-01 1.50399929e-01 1.75005510e-01 1.71395535e-04 9.00027746e-02 -1.58872807e-01 -1.55595614e-04 -3.52961440e-02 -4.53326039e-02 -8.07357378e-05 -4.51062441e-02 3.91776154e-03 -4.41758025e-05 8.23295040e-02 1.70690331e-01 5.60379136e-02 6.73646595e-02 1.34444769e-01 -7.81650239e-02 -9.39642447e-02 -1.66772474e-01 2.52073270e-02 -1.72097915e-02 -3.73491828e-02 3.72881489e-02 -4.48984415e-02 -6.14498615e-03 -1.38830541e-02 6.53646142e-04 -2.44393156e-05 -2.49342156e-02 -1.91751556e-02 4.44328321e-05 4.53326039e-02 -7.71510376e-03 1.39644645e-05 1.42472471e-02 -1.39829968e-02 2.74109445e-05 1.56592577e-03 1.89654568e-02 5.11613809e-03 3.28237648e-03 8.18784456e-03 -1.80716772e-02 -1.01052159e-02 -2.52073270e-02 1.06653020e-03 4.44978805e-05 1.10999372e-04 1.59350702e-03 -1.52226309e-03 -2.08146796e-05 -4.70255451e-05 -4.11329686e-05 1.47845630e-02 -5.55683815e-05 4.43042779e-05 -3.72643260e-02 8.07357378e-05 1.39644645e-05 -7.87414572e-03 5.60042492e-05 -3.96375293e-05 -7.93332691e-03 -7.72878990e-04 -9.36059892e-03 -8.43793886e-05 -7.14510136e-04 -5.21815012e-03 -9.69257016e-04 1.31871761e-03 1.72097915e-02 4.44978805e-05 2.24906867e-04 1.12772791e-03 1.02575078e-04 1.00172648e-03 -2.12361802e-02 -4.79778198e-02 -4.19659177e-02 -5.55683815e-05 -4.19090325e-02 4.52014465e-02 8.07357378e-05 4.51062441e-02 1.42472471e-02 5.60042492e-05 4.92641434e-02 -2.45734168e-02 5.59473429e-05 -1.92793638e-03 -2.33498898e-02 -2.10483265e-04 -5.21815012e-03 -1.16392431e-02 -2.41779876e-03 1.72097915e-02 3.73491828e-02 1.10999372e-04 1.12772791e-03 2.58592101e-03 -1.33450608e-03 8.33983349e-04 1.06096349e-02 2.39698076e-02 2.83467977e-02 4.22417099e-05 1.35513938e-02 -4.11852851e-02 -7.68314473e-05 -3.91776154e-03 -1.39829968e-02 -3.96375293e-05 -2.45734168e-02 8.37887676e-03 -3.18362629e-05 2.42609122e-03 2.93832115e-02 5.46236648e-03 8.22222006e-03 1.22496527e-02 -1.80152326e-02 -2.83649511e-02 -3.72881489e-02 1.59350702e-03 1.02575078e-04 -1.33450608e-03 2.95404629e-03 -6.48327192e-04 -2.07981249e-05 -4.69881440e-05 -5.55683815e-05 1.47728043e-02 -4.10445423e-05 8.07357378e-05 -3.72346883e-02 4.41758025e-05 2.74109445e-05 -7.93332691e-03 5.59473429e-05 -3.18362629e-05 -7.86152136e-03 -2.31762337e-03 -2.80695207e-02 -5.21815012e-03 -2.14259336e-03 -1.39918423e-02 1.72097915e-02 3.95442340e-03 4.48984415e-02 -1.52226309e-03 1.00172648e-03 8.33983349e-04 -6.48327192e-04 2.89471773e-03 1.20397875e-02 6.02120523e-02 3.30100044e-02 -1.32249374e-02 1.10218598e-02 -8.20053125e-02 3.28541345e-02 -2.73811250e-02 -2.86031694e-03 2.29724551e-03 -1.91455862e-03 -1.40547260e-04 7.67037700e-04 3.90324935e-02 1.43071006e-01 7.00978352e-02 -6.86422865e-05 7.01535788e-02 -1.48682692e-01 1.45595366e-04 -1.48800929e-01 -6.07138617e-03 2.06280218e-05 -2.10821875e-02 1.05494662e-02 2.06444258e-05 6.02120523e-02 1.53539095e-01 1.11561044e-01 -4.46951718e-02 3.72496219e-02 -1.70531896e-01 6.83209134e-02 -5.69396668e-02 -3.48353885e-02 2.79778225e-02 -2.33171340e-02 -1.71170485e-03 9.34164179e-03 1.43071006e-01 2.06868017e-01 1.43370476e-01 -1.40393455e-04 1.43484488e-01 -1.50424335e-01 1.47300844e-04 -1.50543956e-01 -1.38427655e-02 4.70319070e-05 -4.80674051e-02 2.40527917e-02 4.70693080e-05 -3.30100044e-02 -1.11561044e-01 -6.93156585e-02 3.34693760e-02 -2.78938764e-02 1.34131636e-01 -6.71413200e-02 5.59565761e-02 1.46400324e-02 -1.39179997e-02 1.15994683e-02 9.52021174e-04 -5.19566254e-03 -7.00978352e-02 -1.43370476e-01 -6.93202600e-02 1.10463434e-04 -1.12895499e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -7.02935424e-04 -4.08315227e-05 4.17305074e-02 -2.82339372e-02 -5.52514609e-05 1.32249374e-02 4.46951718e-02 3.34693760e-02 8.16345489e-04 1.11752414e-02 -6.71413200e-02 -6.55683463e-03 -2.24181193e-02 -8.71069385e-03 2.13371123e-03 -5.19566254e-03 1.26137781e-03 7.12434502e-04 6.86422865e-05 1.40393455e-04 1.10463434e-04 4.34854252e-02 1.10551277e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 -2.42116850e-05 -1.46808232e-02 -5.52514609e-05 4.20237084e-05 -1.46924978e-02 -1.10218598e-02 -3.72496219e-02 -2.78938764e-02 1.11752414e-02 4.91171019e-03 5.59565761e-02 -2.24181193e-02 -1.47723506e-02 7.25962199e-03 -5.19566254e-03 2.29668885e-04 1.68700037e-03 -9.20132148e-05 -7.01535788e-02 -1.43484488e-01 -1.12895499e-01 1.10551277e-04 -6.94997435e-02 1.74738923e-01 -1.71110551e-04 9.03413179e-02 2.47447519e-02 -5.52514609e-05 4.17870511e-02 -1.35638376e-02 -4.09193626e-05 8.20053125e-02 1.70531896e-01 1.34131636e-01 -6.71413200e-02 5.59565761e-02 -1.66806170e-01 9.38411264e-02 -7.82085924e-02 -4.48140672e-02 4.47560132e-02 -3.73003279e-02 -3.14600983e-03 1.71693717e-02 1.48682692e-01 1.50424335e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -3.55921032e-02 1.55449069e-04 -1.58871580e-01 1.91206163e-02 4.43023376e-05 -4.52777390e-02 4.12440938e-02 8.07112526e-05 -3.28541345e-02 -6.83209134e-02 -6.71413200e-02 -6.55683463e-03 -2.24181193e-02 9.38411264e-02 2.98292939e-02 3.13330385e-02 2.94990852e-02 -3.96378479e-03 1.71693717e-02 -5.40513062e-03 -1.32348605e-03 -1.45595366e-04 -1.47300844e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 1.55449069e-04 1.23153086e-01 1.55572686e-04 4.42274240e-05 3.71153887e-02 8.07112526e-05 -7.67324619e-05 3.71449038e-02 2.73811250e-02 5.69396668e-02 5.59565761e-02 -2.24181193e-02 -1.47723506e-02 -7.82085924e-02 3.13330385e-02 4.13118395e-02 -2.45849770e-02 1.71693717e-02 2.32823488e-03 -6.60558729e-03 -9.32770566e-04 1.48800929e-01 1.50543956e-01 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -1.58871580e-01 1.55572686e-04 -3.58446805e-02 -4.52011760e-02 8.07112526e-05 -4.53727988e-02 4.13190929e-03 4.44306539e-05 -2.86031694e-03 -3.48353885e-02 -1.46400324e-02 8.71069385e-03 -7.25962199e-03 4.48140672e-02 -2.94990852e-02 2.45849770e-02 3.80995650e-03 -1.27267510e-03 1.06066638e-03 -2.36284940e-05 1.28952679e-04 -6.07138617e-03 -1.38427655e-02 7.02935424e-04 2.42116850e-05 -2.47447519e-02 -1.91206163e-02 -4.42274240e-05 4.52011760e-02 -7.63060578e-03 -1.37801588e-05 1.40835555e-02 -1.38310503e-02 -2.70662122e-05 2.29724551e-03 2.79778225e-02 1.39179997e-02 -2.13371123e-03 5.19566254e-03 -4.47560132e-02 3.96378479e-03 -1.71693717e-02 -1.27267510e-03 2.86196970e-03 -8.01531681e-04 -9.93121063e-04 9.91210877e-04 2.06280218e-05 4.70319070e-05 4.08315227e-05 1.46808232e-02 5.52514609e-05 -4.43023376e-05 -3.71153887e-02 -8.07112526e-05 -1.37801588e-05 -7.76985917e-03 -5.55388330e-05 3.92849961e-05 -7.82683976e-03 -1.91455862e-03 -2.33171340e-02 -1.15994683e-02 5.19566254e-03 -2.29668885e-04 3.73003279e-02 -1.71693717e-02 -2.32823488e-03 1.06066638e-03 -8.01531681e-04 2.56823425e-03 -7.68735185e-04 -1.11860753e-03 -2.10821875e-02 -4.80674051e-02 -4.17305074e-02 5.52514609e-05 -4.17870511e-02 4.52777390e-02 -8.07112526e-05 4.53727988e-02 1.40835555e-02 -5.55388330e-05 4.89917140e-02 -2.44961278e-02 -5.55951839e-05 -1.40547260e-04 -1.71170485e-03 -9.52021174e-04 -1.26137781e-03 -1.68700037e-03 3.14600983e-03 5.40513062e-03 6.60558729e-03 -2.36284940e-05 -9.93121063e-04 -7.68735185e-04 1.62016098e-04 -1.18080328e-05 1.05494662e-02 2.40527917e-02 2.82339372e-02 -4.20237084e-05 1.35638376e-02 -4.12440938e-02 7.67324619e-05 -4.13190929e-03 -1.38310503e-02 3.92849961e-05 -2.44961278e-02 8.39198690e-03 3.16518569e-05 7.67037700e-04 9.34164179e-03 5.19566254e-03 -7.12434502e-04 9.20132148e-05 -1.71693717e-02 1.32348605e-03 9.32770566e-04 1.28952679e-04 9.91210877e-04 -1.11860753e-03 -1.18080328e-05 2.24294892e-04 2.06444258e-05 4.70693080e-05 5.52514609e-05 1.46924978e-02 4.09193626e-05 -8.07112526e-05 -3.71449038e-02 -4.44306539e-05 -2.70662122e-05 -7.82683976e-03 -5.55951839e-05 3.16518569e-05 -7.78230244e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 2 676 + 1.70719458e-04 1.57005992e-03 3.26398409e-04 3.26740866e-04 6.52560013e-04 -1.06854114e-03 -1.06966225e-03 -2.13630705e-03 -4.52413105e-05 5.23089602e-05 1.04470359e-04 -7.82505410e-05 1.04579970e-04 3.24320009e-07 3.31948369e-06 3.58620831e-07 1.14844943e-06 1.79273401e-06 -1.13233473e-06 -3.62619530e-06 -5.66050491e-06 -7.11318921e-07 2.37358032e-07 3.70516807e-07 -5.46042437e-07 1.18654517e-06 1.57005992e-03 1.39845673e-02 2.90120743e-03 2.90425137e-03 5.80031000e-03 -9.36677236e-03 -9.37659996e-03 -1.87267490e-02 -2.86910970e-04 3.31732532e-04 6.62529264e-04 -4.96248635e-04 6.63224388e-04 3.31948369e-06 3.39531922e-05 3.67482957e-06 1.17682955e-05 1.83703549e-05 -1.15922505e-05 -3.71230904e-05 -5.79492879e-05 -7.29688800e-06 2.43487825e-06 3.80085439e-06 -5.60144035e-06 1.21718781e-05 -3.26398409e-04 -2.90120743e-03 -4.14764252e-04 -6.44582972e-04 -1.28734761e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 1.33577269e-04 -4.04713759e-05 -8.08285841e-05 1.33601047e-04 -1.78554592e-04 -3.58620831e-07 -3.67482957e-06 -2.88790554e-07 -1.27708987e-06 -1.99354223e-06 9.18906236e-07 4.03856435e-06 6.30421459e-06 8.22490139e-07 -1.91497867e-07 -2.98928912e-07 6.10887007e-07 -1.32745182e-06 -3.26740866e-04 -2.90425137e-03 -6.44582972e-04 -4.16116134e-04 -1.28869829e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 4.91269703e-05 -4.06162668e-05 -1.78554592e-04 1.82579539e-04 -8.12030661e-05 -1.14844943e-06 -1.17682955e-05 -1.27708987e-06 -3.97975979e-06 -6.38413121e-06 4.03856435e-06 1.25909249e-05 2.01886534e-05 2.50569348e-06 -8.27261024e-07 -1.32745182e-06 2.03035541e-06 -4.13545128e-06 -6.52560013e-04 -5.80031000e-03 -1.28734761e-03 -1.28869829e-03 -2.34461810e-03 4.16200528e-03 4.16637205e-03 7.55231102e-03 9.81153560e-05 -1.78554592e-04 -3.07818361e-04 1.69566300e-04 -3.08141323e-04 -1.79273401e-06 -1.83703549e-05 -1.99354223e-06 -6.38413121e-06 -9.85565335e-06 6.30421459e-06 2.01886534e-05 3.11723691e-05 3.91139723e-06 -1.32745182e-06 -2.04903504e-06 2.93821637e-06 -6.56184169e-06 1.06854114e-03 9.36677236e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -4.11465939e-03 -6.69832648e-03 -1.33777573e-02 -3.95711679e-04 8.86552125e-05 1.77060333e-04 -3.69076357e-04 4.93261692e-04 1.13233473e-06 1.15922505e-05 9.18906236e-07 4.03856435e-06 6.30421459e-06 -2.91887598e-06 -1.27541577e-05 -1.99092897e-05 -2.60322671e-06 6.10399668e-07 9.52836247e-07 -1.93455309e-06 4.20376599e-06 1.06966225e-03 9.37659996e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -6.69832648e-03 -4.12870777e-03 -1.33917933e-02 -1.22350018e-04 8.90797389e-05 4.93261692e-04 -5.27528724e-04 1.78094850e-04 3.62619530e-06 3.71230904e-05 4.03856435e-06 1.25909249e-05 2.01886534e-05 -1.27541577e-05 -3.97801846e-05 -6.37576247e-05 -7.93730362e-06 2.62100322e-06 4.20376599e-06 -6.42575115e-06 1.31023109e-05 2.13630705e-03 1.87267490e-02 4.16200528e-03 4.16637205e-03 7.55231102e-03 -1.33777573e-02 -1.33917933e-02 -2.41691624e-02 -2.44354893e-04 4.93261692e-04 8.27232454e-04 -4.22200574e-04 8.28100385e-04 5.66050491e-06 5.79492879e-05 6.30421459e-06 2.01886534e-05 3.11723691e-05 -1.99092897e-05 -6.37576247e-05 -9.84620951e-05 -1.23901617e-05 4.20376599e-06 6.49010940e-06 -9.31091499e-06 2.07839640e-05 -4.52413105e-05 -2.86910970e-04 -1.33577269e-04 -4.91269703e-05 -9.81153560e-05 3.95711679e-04 1.22350018e-04 2.44354893e-04 -2.48554673e-05 1.52245278e-05 3.04061079e-05 -3.45457148e-05 4.61695186e-05 -7.11318921e-07 -7.29688800e-06 -8.22490139e-07 -2.50569348e-06 -3.91139723e-06 2.60322671e-06 7.93730362e-06 1.23901617e-05 1.53545058e-06 -5.42361295e-07 -8.46628083e-07 1.18534388e-06 -2.57574130e-06 5.23089602e-05 3.31732532e-04 4.04713759e-05 4.06162668e-05 1.78554592e-04 -8.86552125e-05 -8.90797389e-05 -4.93261692e-04 1.52245278e-05 -2.55275929e-05 -5.02954556e-05 2.63263767e-05 -5.03291766e-05 2.37358032e-07 2.43487825e-06 1.91497867e-07 8.27261024e-07 1.32745182e-06 -6.10399668e-07 -2.62100322e-06 -4.20376599e-06 -5.42361295e-07 1.24059189e-07 1.99568397e-07 -4.25056397e-07 8.65206444e-07 1.04470359e-04 6.62529264e-04 8.08285841e-05 1.78554592e-04 3.07818361e-04 -1.77060333e-04 -4.93261692e-04 -8.27232454e-04 3.04061079e-05 -5.02954556e-05 -1.00793375e-04 7.07246307e-05 -8.69387726e-05 3.70516807e-07 3.80085439e-06 2.98928912e-07 1.32745182e-06 2.04903504e-06 -9.52836247e-07 -4.20376599e-06 -6.49010940e-06 -8.46628083e-07 1.99568397e-07 3.07740041e-07 -6.14655125e-07 1.37307555e-06 -7.82505410e-05 -4.96248635e-04 -1.33601047e-04 -1.82579539e-04 -1.69566300e-04 3.69076357e-04 5.27528724e-04 4.22200574e-04 -3.45457148e-05 2.63263767e-05 7.07246307e-05 -6.46717736e-05 6.17162441e-05 -5.46042437e-07 -5.60144035e-06 -6.10887007e-07 -2.03035541e-06 -2.93821637e-06 1.93455309e-06 6.42575115e-06 9.31091499e-06 1.18534388e-06 -4.25056397e-07 -6.14655125e-07 7.70698298e-07 -2.04660920e-06 1.04579970e-04 6.63224388e-04 1.78554592e-04 8.12030661e-05 3.08141323e-04 -4.93261692e-04 -1.78094850e-04 -8.28100385e-04 4.61695186e-05 -5.03291766e-05 -8.69387726e-05 6.17162441e-05 -1.00975711e-04 1.18654517e-06 1.21718781e-05 1.32745182e-06 4.13545128e-06 6.56184169e-06 -4.20376599e-06 -1.31023109e-05 -2.07839640e-05 -2.57574130e-06 8.65206444e-07 1.37307555e-06 -2.04660920e-06 4.27612138e-06 1.01757345e-03 7.56972476e-03 2.84449741e-03 7.56640338e-04 2.84600546e-03 -8.45059496e-03 -2.24787022e-03 -8.45507515e-03 5.14382232e-05 5.10654411e-05 1.92076099e-04 -8.92972253e-05 5.10925142e-05 1.69968586e-04 1.56386115e-03 3.25031918e-04 3.24690943e-04 6.50299618e-04 -1.06428280e-03 -1.06316632e-03 -2.12933765e-03 -4.51727960e-05 5.20923513e-05 1.04331940e-04 -7.83509303e-05 1.04222491e-04 7.56972476e-03 4.83733207e-02 1.88603795e-02 5.01688766e-03 1.88703786e-02 -5.14552457e-02 -1.36871682e-02 -5.14825254e-02 -7.06222228e-04 -7.01104109e-04 -2.63711306e-03 1.22600824e-03 -7.01475809e-04 1.56386115e-03 1.39379141e-02 2.89071600e-03 2.88768349e-03 5.78352895e-03 -9.33559857e-03 -9.32580505e-03 -1.86779693e-02 -2.87283852e-04 3.31289906e-04 6.63516196e-04 -4.98285673e-04 6.62820133e-04 -2.84449741e-03 -1.88603795e-02 -6.63410800e-03 -2.12860080e-03 -8.00645854e-03 1.83635173e-02 5.99194989e-03 2.25379500e-02 2.53336620e-04 1.43810999e-04 5.40926602e-04 -1.94578336e-04 1.11330407e-04 -3.25031918e-04 -2.89071600e-03 -4.13274076e-04 -6.40689538e-04 -1.28318997e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 1.33398645e-04 -4.04581339e-05 -8.10306217e-05 1.33945083e-04 -1.78173892e-04 -7.56640338e-04 -5.01688766e-03 -2.12860080e-03 8.01897237e-04 -2.12972931e-03 5.99194989e-03 -2.56862307e-03 5.99512660e-03 1.10276866e-05 1.51926966e-04 1.11330407e-04 -1.92185288e-05 1.52007512e-04 -3.24690943e-04 -2.88768349e-03 -6.40689538e-04 -4.11929137e-04 -1.28184384e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 4.90870753e-05 -4.03136771e-05 -1.78173892e-04 1.82401080e-04 -8.06565982e-05 -2.84600546e-03 -1.88703786e-02 -8.00645854e-03 -2.12972931e-03 -6.64259520e-03 2.25379500e-02 5.99512660e-03 1.83874085e-02 4.14792269e-05 1.11330407e-04 5.41083639e-04 -3.17074961e-04 1.43929014e-04 -6.50299618e-04 -5.78352895e-03 -1.28318997e-03 -1.28184384e-03 -2.33922250e-03 4.14963185e-03 4.14527867e-03 7.53700469e-03 9.83128941e-05 -1.78173892e-04 -3.08203844e-04 1.70656951e-04 -3.07880522e-04 8.45059496e-03 5.14552457e-02 1.83635173e-02 5.99194989e-03 2.25379500e-02 -4.80245958e-02 -1.60833530e-02 -6.04954667e-02 -1.15447250e-03 -1.03318148e-03 -3.88617946e-03 1.74703870e-03 -9.99589844e-04 1.06428280e-03 9.33559857e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -4.10290906e-03 -6.66159519e-03 -1.33420192e-02 -3.95548216e-04 8.90408852e-05 1.78333442e-04 -3.70593279e-04 4.92963575e-04 2.24787022e-03 1.36871682e-02 5.99194989e-03 -2.56862307e-03 5.99512660e-03 -1.60833530e-02 8.16062070e-03 -1.60918798e-02 -2.47991486e-04 -3.94026319e-04 -9.99589844e-04 4.30593464e-04 -3.94235217e-04 1.06316632e-03 9.32580505e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -6.66159519e-03 -4.08892500e-03 -1.33280228e-02 -1.22592413e-04 8.86171635e-05 4.92963575e-04 -5.27556042e-04 1.77298611e-04 8.45507515e-03 5.14825254e-02 2.25379500e-02 5.99512660e-03 1.83874085e-02 -6.04954667e-02 -1.60918798e-02 -4.80887238e-02 -9.32788125e-04 -9.99589844e-04 -3.88810372e-03 1.87630782e-03 -1.03424109e-03 2.12933765e-03 1.86779693e-02 4.14963185e-03 4.14527867e-03 7.53700469e-03 -1.33420192e-02 -1.33280228e-02 -2.41280351e-02 -2.45531331e-04 4.92963575e-04 8.29803722e-04 -4.26307571e-04 8.28933215e-04 5.14382232e-05 -7.06222228e-04 -2.53336620e-04 -1.10276866e-05 -4.14792269e-05 1.15447250e-03 2.47991486e-04 9.32788125e-04 2.05700403e-04 -1.10043767e-04 -4.13915496e-04 3.65247307e-04 -2.08980773e-04 -4.51727960e-05 -2.87283852e-04 -1.33398645e-04 -4.90870753e-05 -9.83128941e-05 3.95548216e-04 1.22592413e-04 2.45531331e-04 -2.47997539e-05 1.49666512e-05 2.99756052e-05 -3.44119357e-05 4.57747934e-05 5.10654411e-05 -7.01104109e-04 -1.43810999e-04 -1.51926966e-04 -1.11330407e-04 1.03318148e-03 3.94026319e-04 9.99589844e-04 -1.10043767e-04 7.48226736e-05 -4.76837615e-04 3.05282129e-04 7.25891165e-05 5.20923513e-05 3.31289906e-04 4.04581339e-05 4.03136771e-05 1.78173892e-04 -8.90408852e-05 -8.86171635e-05 -4.92963575e-04 1.49666512e-05 -2.52508823e-05 -4.97986593e-05 2.59656156e-05 -4.97656043e-05 1.92076099e-04 -2.63711306e-03 -5.40926602e-04 -1.11330407e-04 -5.41083639e-04 3.88617946e-03 9.99589844e-04 3.88810372e-03 -4.13915496e-04 -4.76837615e-04 -1.59196851e-03 7.19051548e-04 -4.77150933e-04 1.04331940e-04 6.63516196e-04 8.10306217e-05 1.78173892e-04 3.08203844e-04 -1.78333442e-04 -4.92963575e-04 -8.29803722e-04 2.99756052e-05 -4.97986593e-05 -1.00124765e-04 7.03034607e-05 -8.59154247e-05 -8.92972253e-05 1.22600824e-03 1.94578336e-04 1.92185288e-05 3.17074961e-04 -1.74703870e-03 -4.30593464e-04 -1.87630782e-03 3.65247307e-04 3.05282129e-04 7.19051548e-04 -2.17066409e-04 2.48356354e-04 -7.83509303e-05 -4.98285673e-04 -1.33945083e-04 -1.82401080e-04 -1.70656951e-04 3.70593279e-04 5.27556042e-04 4.26307571e-04 -3.44119357e-05 2.59656156e-05 7.03034607e-05 -6.46078809e-05 6.10898878e-05 5.10925142e-05 -7.01475809e-04 -1.11330407e-04 -1.52007512e-04 -1.43929014e-04 9.99589844e-04 3.94235217e-04 1.03424109e-03 -2.08980773e-04 7.25891165e-05 -4.77150933e-04 2.48356354e-04 7.48996213e-05 1.04222491e-04 6.62820133e-04 1.78173892e-04 8.06565982e-05 3.07880522e-04 -4.92963575e-04 -1.77298611e-04 -8.28933215e-04 4.57747934e-05 -4.97656043e-05 -8.59154247e-05 6.10898878e-05 -9.99444110e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 -2 499 + 8.22431014e-06 9.03264335e-05 -1.15092237e-09 -3.29515519e-05 -3.29819549e-05 4.02255197e-09 1.15167916e-04 1.15274176e-04 -1.30567437e-05 7.89159811e-10 7.89887933e-10 -2.08561661e-08 2.26149339e-05 1.33751568e-03 9.58431535e-03 -1.24264302e-03 -3.47648115e-03 -3.72955829e-03 3.62894976e-03 1.01525339e-02 1.08916072e-02 -7.80469259e-05 5.09871371e-05 5.46988440e-05 -1.07620232e-05 1.53028260e-04 9.03264335e-05 9.92753883e-04 -1.26493700e-08 -3.62158546e-04 -3.62492694e-04 4.42375729e-08 1.26654648e-03 1.26771507e-03 -1.43999445e-04 8.70343917e-09 8.71146944e-09 -2.30017255e-07 2.49414248e-04 9.58431535e-03 5.71256604e-02 -7.77982346e-03 -2.17652287e-02 -2.33496705e-02 2.04328387e-02 5.71639458e-02 6.13253053e-02 2.13941086e-03 -1.39765191e-03 -1.49939667e-03 2.95006997e-04 -4.19478817e-03 1.15092237e-09 1.26493700e-08 6.97476357e-06 -4.70251108e-09 -4.70684987e-09 -2.40384979e-05 1.64675606e-08 1.64827544e-08 -2.09658074e-09 -5.16093129e-06 -5.16569305e-06 3.27086392e-09 1.24264302e-03 7.77982346e-03 6.24956661e-04 -3.22719163e-03 -3.46212126e-03 -2.14395977e-03 8.83277749e-03 9.47577655e-03 1.19639555e-04 -1.87058829e-04 -2.00676136e-04 2.13788872e-05 -3.03992462e-04 3.29515519e-05 3.62158546e-04 -4.70251108e-09 -1.27660762e-04 -1.34759748e-04 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.10872854e-05 3.08758929e-09 3.27086392e-09 -5.24729515e-06 8.84809725e-05 3.47648115e-03 2.17652287e-02 -3.22719163e-03 -7.25006205e-03 -9.68580605e-03 8.83277749e-03 1.94098542e-02 2.65099131e-02 4.83271624e-04 -3.14023082e-04 -3.03992462e-04 -2.59616141e-05 -9.42480961e-04 3.29819549e-05 3.62492694e-04 -4.70684987e-09 -1.34759748e-04 -1.27909321e-04 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.11344213e-05 3.27086392e-09 3.09362226e-09 5.07924973e-06 8.85721378e-05 3.72955829e-03 2.33496705e-02 -3.46212126e-03 -9.68580605e-03 -8.61241001e-03 9.47577655e-03 2.65099131e-02 2.31385811e-02 5.18452313e-04 -3.03992462e-04 -3.56780857e-04 1.56180923e-04 -9.98148221e-04 -4.02255197e-09 -4.42375729e-08 -2.40384979e-05 1.64675606e-08 1.64827544e-08 8.27387335e-05 -5.76693005e-08 -5.77225093e-08 7.38221994e-09 1.78886957e-05 1.79052008e-05 -1.15367526e-08 -3.62894976e-03 -2.04328387e-02 -2.14395977e-03 8.83277749e-03 9.47577655e-03 7.30258139e-03 -2.27417801e-02 -2.43973118e-02 -1.06622710e-03 5.81065912e-04 6.23365724e-04 -1.41846965e-04 2.01696223e-03 -1.15167916e-04 -1.26654648e-03 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.76693005e-08 -1.56836563e-03 -1.65262777e-03 1.80372960e-04 -1.09013067e-08 -1.15367526e-08 1.81933121e-05 -3.12398486e-04 -1.01525339e-02 -5.71639458e-02 8.83277749e-03 1.94098542e-02 2.65099131e-02 -2.27417801e-02 -4.81920914e-02 -6.82551569e-02 -2.82538171e-03 1.84758355e-03 2.01696223e-03 -4.87799399e-04 5.54517302e-03 -1.15274176e-04 -1.26771507e-03 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.77225093e-08 -1.65262777e-03 -1.57141384e-03 1.80539382e-04 -1.15367526e-08 -1.09225858e-08 -1.76003043e-05 -3.12719748e-04 -1.08916072e-02 -6.13253053e-02 9.47577655e-03 2.65099131e-02 2.31385811e-02 -2.43973118e-02 -6.82551569e-02 -5.77924565e-02 -3.03106082e-03 2.01696223e-03 2.13127748e-03 -3.28144044e-04 5.96256999e-03 -1.30567437e-05 -1.43999445e-04 2.09658074e-09 5.10872854e-05 5.11344213e-05 -7.38221994e-09 -1.80372960e-04 -1.80539382e-04 1.91984898e-05 -1.38221596e-09 -1.38349126e-09 3.03902675e-08 -3.29530311e-05 -7.80469259e-05 2.13941086e-03 -1.19639555e-04 -4.83271624e-04 -5.18452313e-04 1.06622710e-03 2.82538171e-03 3.03106082e-03 -4.01220320e-04 4.65138310e-04 4.98998949e-04 -6.17329286e-05 8.77798022e-04 7.89159811e-10 8.70343917e-09 5.16093129e-06 -3.08758929e-09 -3.27086392e-09 -1.78886957e-05 1.09013067e-08 1.15367526e-08 -1.38221596e-09 -3.66689421e-06 -3.84347757e-06 -1.36204331e-10 2.12570328e-09 5.09871371e-05 -1.39765191e-03 1.87058829e-04 3.14023082e-04 3.03992462e-04 -5.81065912e-04 -1.84758355e-03 -2.01696223e-03 4.65138310e-04 2.34645233e-05 1.35458040e-05 1.55891489e-04 -6.92209772e-04 7.89887933e-10 8.71146944e-09 5.16569305e-06 -3.27086392e-09 -3.09362226e-09 -1.79052008e-05 1.15367526e-08 1.09225858e-08 -1.38349126e-09 -3.84347757e-06 -3.67398335e-06 1.32157773e-10 2.12791218e-09 5.46988440e-05 -1.49939667e-03 2.00676136e-04 3.03992462e-04 3.56780857e-04 -6.23365724e-04 -2.01696223e-03 -2.13127748e-03 4.98998949e-04 1.35458040e-05 2.53697956e-05 -4.66526598e-05 -7.57642946e-04 -2.08561661e-08 -2.30017255e-07 5.24729515e-06 -5.07924973e-06 -1.81933121e-05 1.76003043e-05 3.03902675e-08 -1.36204331e-10 1.32157773e-10 -7.51386306e-06 -5.97266014e-08 -1.07620232e-05 2.95006997e-04 -2.13788872e-05 2.59616141e-05 -1.56180923e-04 1.41846965e-04 4.87799399e-04 3.28144044e-04 -6.17329286e-05 1.55891489e-04 -4.66526598e-05 5.63216592e-04 1.68680505e-04 2.26149339e-05 2.49414248e-04 -3.27086392e-09 -8.84809725e-05 -8.85721378e-05 1.15367526e-08 3.12398486e-04 3.12719748e-04 -3.29530311e-05 2.12570328e-09 2.12791218e-09 -5.97266014e-08 5.72493338e-05 1.53028260e-04 -4.19478817e-03 3.03992462e-04 9.42480961e-04 9.98148221e-04 -2.01696223e-03 -5.54517302e-03 -5.96256999e-03 8.77798022e-04 -6.92209772e-04 -7.57642946e-04 1.68680505e-04 -1.82343655e-03 8.20974861e-06 9.01678303e-05 1.14892157e-09 -3.29264972e-05 -3.28961472e-05 -4.01550972e-09 1.15078934e-04 1.14972860e-04 -1.30380943e-05 -7.88714653e-10 -7.87987654e-10 2.08251874e-08 2.25826322e-05 9.01678303e-05 9.91019828e-04 1.26276555e-08 -3.61891076e-04 -3.61557502e-04 -4.41608263e-08 1.26558797e-03 1.26442142e-03 -1.43798531e-04 -8.69881791e-09 -8.69079976e-09 2.29683210e-07 2.49066256e-04 -1.14892157e-09 -1.26276555e-08 6.95938620e-06 4.69902220e-09 4.69469087e-09 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 2.09348108e-09 -5.15529041e-06 -5.15053852e-06 -3.26624168e-09 3.29264972e-05 3.61891076e-04 4.69902220e-09 -1.27708066e-04 -1.34543323e-04 -1.64551990e-08 4.47598510e-04 4.71148476e-04 -5.10670363e-05 -3.08936886e-09 -3.26624168e-09 -5.06896926e-06 8.84554137e-05 3.28961472e-05 3.61557502e-04 4.69469087e-09 -1.34543323e-04 -1.27459921e-04 -1.64400314e-08 4.71148476e-04 4.46729545e-04 -5.10199652e-05 -3.26624168e-09 -3.08334476e-09 5.23678033e-06 8.83643803e-05 4.01550972e-09 4.41608263e-08 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 8.25501551e-05 5.76252238e-08 5.75721076e-08 -7.37124160e-09 1.78684916e-05 1.78520213e-05 1.15203707e-08 -1.15078934e-04 -1.26558797e-03 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.76252238e-08 -1.56890876e-03 -1.64993668e-03 1.80300415e-04 1.09075048e-08 1.15203707e-08 1.75640280e-05 -3.12305810e-04 -1.14972860e-04 -1.26442142e-03 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.75721076e-08 -1.64993668e-03 -1.56586569e-03 1.80134223e-04 1.15203707e-08 1.08862571e-08 -1.81562050e-05 -3.11985016e-04 -1.30380943e-05 -1.43798531e-04 -2.09348108e-09 5.10670363e-05 5.10199652e-05 7.37124160e-09 -1.80300415e-04 -1.80134223e-04 1.91798739e-05 1.38189198e-09 1.38061822e-09 -3.03594982e-08 -3.29215468e-05 -7.88714653e-10 -8.69881791e-09 5.15529041e-06 3.08936886e-09 3.26624168e-09 -1.78684916e-05 -1.09075048e-08 -1.15203707e-08 1.38189198e-09 -3.66746168e-06 -3.83652398e-06 1.31909688e-10 -2.12564295e-09 -7.87987654e-10 -8.69079976e-09 5.15053852e-06 3.26624168e-09 3.08334476e-09 -1.78520213e-05 -1.15203707e-08 -1.08862571e-08 1.38061822e-09 -3.83652398e-06 -3.66038577e-06 -1.35951600e-10 -2.12343673e-09 2.08251874e-08 2.29683210e-07 5.06896926e-06 -5.23678033e-06 -1.75640280e-05 1.81562050e-05 -3.03594982e-08 1.31909688e-10 -1.35951600e-10 -7.50039447e-06 5.96600777e-08 2.25826322e-05 2.49066256e-04 3.26624168e-09 -8.84554137e-05 -8.83643803e-05 -1.15203707e-08 3.12305810e-04 3.11985016e-04 -3.29215468e-05 -2.12564295e-09 -2.12343673e-09 5.96600777e-08 5.71943630e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 16 17 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 347 360 372 385 398 410 423 436 449 462 475 486 499 +0 0 -1 676 + 3.91473712e-02 1.43350481e-01 -4.90810225e-06 -7.02264377e-02 -7.03560908e-02 1.04047658e-05 1.48874167e-01 1.49149021e-01 1.22216249e-02 -1.47672879e-06 -1.47945515e-06 3.90454712e-05 -2.11684393e-02 3.07701009e-01 3.37818299e-01 -2.73822622e-01 -2.18491276e-01 -2.74258093e-01 2.40261621e-01 1.91711948e-01 2.40643719e-01 -1.53428242e-02 -1.17762759e-01 -1.47820043e-01 2.70443463e-02 -1.17950042e-01 1.43350481e-01 2.06969368e-01 -1.00223895e-05 -1.43403025e-01 -1.43667778e-01 1.05066413e-05 1.50331830e-01 1.50609375e-01 2.77227826e-02 -3.34972080e-06 -3.35590511e-06 8.85683466e-05 -4.80171865e-02 3.37818299e-01 3.00129489e-01 -2.01908107e-02 -1.61108529e-02 -2.02229210e-02 9.90187372e-02 7.90100178e-02 9.91762108e-02 1.39253842e-02 1.06883299e-01 1.34163754e-01 -2.45458664e-02 1.07053280e-01 4.90810225e-06 1.00223895e-05 4.36040271e-02 -7.88916809e-06 -7.90373318e-06 -8.47198876e-02 1.22003699e-05 1.22228944e-05 3.46994451e-06 1.47246794e-02 1.47518643e-02 7.28934678e-09 -3.95190762e-06 2.73822622e-01 2.01908107e-02 5.14000714e-02 -1.87407324e-01 -2.35240402e-01 -2.10473295e-01 4.62756203e-02 5.80868199e-02 1.40295152e-01 -3.08788086e-02 -3.87601891e-02 3.22599238e-02 -1.40697036e-01 7.02264377e-02 1.43403025e-01 -7.88916809e-06 -6.92762962e-02 -1.13088725e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 2.41449995e-02 -2.91552205e-06 -3.95190762e-06 1.48289776e-02 -4.17930850e-02 2.18491276e-01 1.61108529e-02 -1.87407324e-01 1.36729034e-01 -1.87705366e-01 4.62756203e-02 -2.31543180e-01 4.63492143e-02 -7.78781020e-02 2.52608060e-02 -1.40697036e-01 1.35335987e-01 2.53009793e-02 7.03560908e-02 1.43667778e-01 -7.90373318e-06 -1.13088725e-01 -6.96934836e-02 1.22228944e-05 1.74888437e-01 9.04914302e-02 2.41895763e-02 -3.95190762e-06 -2.93010075e-06 -1.46473741e-02 -4.19246640e-02 2.74258093e-01 2.02229210e-02 -2.35240402e-01 -1.87705366e-01 5.06524406e-02 5.80868199e-02 4.63492143e-02 -2.10288686e-01 -9.77553894e-02 -1.40697036e-01 -3.92590417e-02 -1.05256133e-01 -3.13259658e-02 -1.04047658e-05 -1.05066413e-05 -8.47198876e-02 1.22003699e-05 1.22228944e-05 1.23319846e-01 -1.10830618e-05 -1.11035236e-05 -6.32201299e-06 -3.71628842e-02 -3.72314949e-02 -1.06159769e-08 5.75543479e-06 -2.40261621e-01 -9.90187372e-02 -2.10473295e-01 4.62756203e-02 5.80868199e-02 1.68010812e-01 -8.96693003e-02 -1.12556125e-01 -2.29180971e-02 -8.93530583e-02 -1.12159167e-01 1.85534199e-02 -8.09180829e-02 -1.48874167e-01 -1.50331830e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -1.10830618e-05 -3.52595621e-02 -1.58872180e-01 -2.60890459e-02 3.14752702e-06 5.75543479e-06 -3.73147809e-02 4.51188027e-02 -1.91711948e-01 -7.90100178e-02 4.62756203e-02 -2.31543180e-01 4.63492143e-02 -8.96693003e-02 2.08838397e-01 -8.98119051e-02 -3.45469136e-03 -7.51965356e-02 -8.09180829e-02 6.24087131e-03 -7.53161237e-02 -1.49149021e-01 -1.50609375e-01 1.22228944e-05 1.74888437e-01 9.04914302e-02 -1.11035236e-05 -1.58872180e-01 -3.58456459e-02 -2.61372119e-02 5.75543479e-06 3.16875898e-06 3.70793186e-02 4.53394497e-02 -2.40643719e-01 -9.91762108e-02 5.80868199e-02 4.63492143e-02 -2.10288686e-01 -1.12556125e-01 -8.98119051e-02 1.67653091e-01 -4.33645262e-03 -8.09180829e-02 -1.12303375e-01 2.93320866e-02 -8.96102287e-02 1.22216249e-02 2.77227826e-02 -3.46994451e-06 -2.41449995e-02 -2.41895763e-02 6.32201299e-06 2.60890459e-02 2.61372119e-02 1.64208833e-02 -2.92991674e-06 -2.93532599e-06 5.22726833e-05 -2.83395511e-02 -1.53428242e-02 1.39253842e-02 -1.40295152e-01 7.78781020e-02 9.77553894e-02 2.29180971e-02 3.45469136e-03 4.33645262e-03 -1.67470841e-01 -4.34021540e-02 -5.44799418e-02 -3.32179928e-02 1.44875517e-01 -1.47672879e-06 -3.34972080e-06 -1.47246794e-02 2.91552205e-06 3.95190762e-06 3.71628842e-02 -3.14752702e-06 -5.75543479e-06 -2.92991674e-06 -7.81299182e-03 -7.88653339e-03 -5.58517128e-07 3.97339830e-06 -1.17762759e-01 1.06883299e-01 3.08788086e-02 -2.52608060e-02 1.40697036e-01 8.93530583e-02 7.51965356e-02 8.09180829e-02 -4.34021540e-02 1.11021914e-02 7.70144141e-02 -1.42554333e-01 1.19404722e-02 -1.47945515e-06 -3.35590511e-06 -1.47518643e-02 3.95190762e-06 2.93010075e-06 3.72314949e-02 -5.75543479e-06 -3.16875898e-06 -2.93532599e-06 -7.88653339e-03 -7.84208546e-03 5.42826137e-07 3.98276739e-06 -1.47820043e-01 1.34163754e-01 3.87601891e-02 1.40697036e-01 3.92590417e-02 1.12159167e-01 8.09180829e-02 1.12303375e-01 -5.44799418e-02 7.70144141e-02 4.64189145e-02 9.36209823e-02 7.74824925e-02 3.90454712e-05 8.85683466e-05 -7.28934678e-09 -1.48289776e-02 1.46473741e-02 1.06159769e-08 3.73147809e-02 -3.70793186e-02 5.22726833e-05 -5.58517128e-07 5.42826137e-07 -1.57138654e-02 -1.19632376e-04 2.70443463e-02 -2.45458664e-02 -3.22599238e-02 -1.35335987e-01 1.05256133e-01 -1.85534199e-02 -6.24087131e-03 -2.93320866e-02 -3.32179928e-02 -1.42554333e-01 9.36209823e-02 -1.29511515e-01 -3.40390277e-02 -2.11684393e-02 -4.80171865e-02 3.95190762e-06 4.17930850e-02 4.19246640e-02 -5.75543479e-06 -4.51188027e-02 -4.53394497e-02 -2.83395511e-02 3.97339830e-06 3.98276739e-06 -1.19632376e-04 4.91444137e-02 -1.17950042e-01 1.07053280e-01 1.40697036e-01 -2.53009793e-02 3.13259658e-02 8.09180829e-02 7.53161237e-02 8.96102287e-02 1.44875517e-01 1.19404722e-02 7.74824925e-02 -3.40390277e-02 1.11401401e-02 5.96070478e-04 4.75277945e-03 5.59203996e-04 -1.79029805e-03 -1.67641035e-03 -1.71502339e-03 5.49066719e-03 5.14138488e-03 -1.06159880e-04 -6.83045731e-05 -6.39594584e-05 1.34684710e-05 2.04766944e-04 3.91223307e-02 1.43289601e-01 4.90502288e-06 -7.03199719e-02 -7.01904001e-02 -1.03994747e-05 1.49090185e-01 1.48815471e-01 1.22107648e-02 1.47797156e-06 1.47524824e-06 -3.90063207e-05 -2.11496292e-02 4.75277945e-03 3.42182054e-02 4.10445357e-03 -1.31404555e-02 -1.23045409e-02 -1.19232474e-02 3.81724142e-02 3.57441211e-02 2.92474545e-04 1.88181721e-04 1.76210763e-04 -3.71061546e-05 -5.64140791e-04 1.43289601e-01 2.06947327e-01 1.00196061e-05 -1.43644268e-01 -1.43379588e-01 -1.05056493e-05 1.50612337e-01 1.50334819e-01 2.77291004e-02 3.35628623e-06 3.35010193e-06 -8.85784145e-05 -4.80281294e-02 -5.59203996e-04 -4.10445357e-03 2.79146471e-04 1.70950651e-03 1.60075827e-03 -9.85046467e-04 -5.05371641e-03 -4.73223021e-03 7.38522427e-05 -1.24978539e-04 -1.17028177e-04 -2.96314310e-06 -4.50499360e-05 -4.90502288e-06 -1.00196061e-05 4.35782022e-02 7.89988685e-06 7.88533050e-06 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 -3.46730911e-06 1.47406117e-02 1.47134507e-02 7.28342405e-09 3.94914759e-06 1.79029805e-03 1.31404555e-02 1.70950651e-03 -4.65988978e-03 -5.12484607e-03 -5.05371641e-03 1.36159442e-02 1.51502896e-02 6.05860816e-06 -4.37922170e-06 -4.50499360e-05 -1.30519411e-04 1.31282549e-05 7.03199719e-02 1.43644268e-01 7.89988685e-06 -6.96770937e-02 -1.13046612e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 2.41769599e-02 2.92823710e-06 3.94914759e-06 1.46361945e-02 -4.19027880e-02 1.67641035e-03 1.23045409e-02 1.60075827e-03 -5.12484607e-03 -3.98572001e-03 -4.73223021e-03 1.51502896e-02 1.16229346e-02 5.67319696e-06 -4.50499360e-05 1.54706450e-06 1.39982697e-04 -4.95294486e-06 7.01904001e-02 1.43379588e-01 7.88533050e-06 -1.13046612e-01 -6.92601093e-02 -1.21967065e-05 1.74855873e-01 8.98537365e-02 2.41324114e-02 3.94914759e-06 2.91367025e-06 -1.48176760e-02 -4.17713057e-02 1.71502339e-03 1.19232474e-02 -9.85046467e-04 -5.05371641e-03 -4.73223021e-03 3.46790742e-03 1.45200339e-02 1.35963591e-02 2.71229022e-05 4.27315906e-04 4.00132709e-04 -1.86633712e-05 -2.83747240e-04 1.03994747e-05 1.05056493e-05 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 1.23283559e-01 1.11022440e-05 1.10817869e-05 6.32037199e-06 -3.72168976e-02 -3.71483216e-02 -1.06143713e-08 -5.75522155e-06 -5.49066719e-03 -3.81724142e-02 -5.05371641e-03 1.36159442e-02 1.51502896e-02 1.45200339e-02 -3.84827803e-02 -4.35289004e-02 -6.63028172e-04 -4.06932686e-04 -2.83747240e-04 3.92416695e-04 1.21992363e-03 -1.49090185e-01 -1.50612337e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 1.11022440e-05 -3.58817490e-02 -1.58872031e-01 -2.61493097e-02 -3.16985866e-06 -5.75522155e-06 -3.70647269e-02 4.53603689e-02 -5.14138488e-03 -3.57441211e-02 -4.73223021e-03 1.51502896e-02 1.16229346e-02 1.35963591e-02 -4.35289004e-02 -3.27565852e-02 -6.20850419e-04 -2.83747240e-04 -3.69605943e-04 -2.55553552e-04 1.18329769e-03 -1.48815471e-01 -1.50334819e-01 -1.21967065e-05 1.74855873e-01 8.98537365e-02 1.10817869e-05 -1.58872031e-01 -3.52957328e-02 -2.61011269e-02 -5.75522155e-06 -3.14862992e-06 3.73002126e-02 4.51397623e-02 -1.06159880e-04 2.92474545e-04 -7.38522427e-05 -6.05860816e-06 -5.67319696e-06 -2.71229022e-05 6.63028172e-04 6.20850419e-04 -2.40442653e-04 -2.18605766e-04 -2.04699419e-04 3.28465375e-05 4.99380004e-04 1.22107648e-02 2.77291004e-02 3.46730911e-06 -2.41769599e-02 -2.41324114e-02 -6.32037199e-06 2.61493097e-02 2.61011269e-02 1.64085910e-02 2.93214608e-06 2.92674330e-06 -5.22331965e-05 -2.83213775e-02 -6.83045731e-05 1.88181721e-04 1.24978539e-04 4.37922170e-06 4.50499360e-05 -4.27315906e-04 4.06932686e-04 2.83747240e-04 -2.18605766e-04 -2.42552677e-05 -3.12098794e-05 -4.50323114e-06 3.60081513e-04 1.47797156e-06 3.35628623e-06 -1.47406117e-02 -2.92823710e-06 -3.94914759e-06 3.72168976e-02 3.16985866e-06 5.75522155e-06 2.93214608e-06 -7.83085215e-03 -7.87352594e-03 5.41863474e-07 -3.97920169e-06 -6.39594584e-05 1.76210763e-04 1.17028177e-04 4.50499360e-05 -1.54706450e-06 -4.00132709e-04 2.83747240e-04 3.69605943e-04 -2.04699419e-04 -3.12098794e-05 -2.01496308e-05 5.20366058e-05 3.33475308e-04 1.47524824e-06 3.35010193e-06 -1.47134507e-02 -3.94914759e-06 -2.91367025e-06 3.71483216e-02 5.75522155e-06 3.14862992e-06 2.92674330e-06 -7.87352594e-03 -7.80180981e-03 -5.57537750e-07 -3.96984382e-06 1.34684710e-05 -3.71061546e-05 2.96314310e-06 1.30519411e-04 -1.39982697e-04 1.86633712e-05 -3.92416695e-04 2.55553552e-04 3.28465375e-05 -4.50323114e-06 5.20366058e-05 1.75142643e-04 -7.65478887e-05 -3.90063207e-05 -8.85784145e-05 -7.28342405e-09 -1.46361945e-02 1.48176760e-02 1.06143713e-08 3.70647269e-02 -3.73002126e-02 -5.22331965e-05 5.41863474e-07 -5.57537750e-07 -1.56896505e-02 1.19512681e-04 2.04766944e-04 -5.64140791e-04 4.50499360e-05 -1.31282549e-05 4.95294486e-06 2.83747240e-04 -1.21992363e-03 -1.18329769e-03 4.99380004e-04 3.60081513e-04 3.33475308e-04 -7.65478887e-05 -9.83612846e-04 -2.11496292e-02 -4.80281294e-02 -3.94914759e-06 4.19027880e-02 4.17713057e-02 5.75522155e-06 -4.53603689e-02 -4.51397623e-02 -2.83213775e-02 -3.97920169e-06 -3.96984382e-06 1.19512681e-04 4.91111366e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 0 668 + 9.99996115e-01 3.73073662e-06 -1.21500210e-04 1.70414694e-03 -1.50541854e-03 2.52688712e-05 -3.54418066e-04 3.13087748e-04 4.86977957e-09 6.79433204e-10 -6.00201379e-10 -1.04649914e-09 8.41835040e-09 2.19414972e-01 3.26846431e-01 -1.93999310e-01 2.33146584e-01 1.93636612e-01 2.19479646e-01 -2.63768616e-01 -2.19069310e-01 1.12827887e-02 1.06616776e-01 8.85490615e-02 -1.98737736e-02 -1.06417446e-01 3.73073662e-06 9.99992628e-01 7.58923902e-05 -1.06445729e-03 9.40326039e-04 5.88464601e-05 -8.25373180e-04 7.29122625e-04 7.67480036e-07 1.07079060e-07 -9.45920794e-08 -1.64928861e-07 1.32673682e-06 3.26846431e-01 2.55688369e-01 -6.81732151e-02 8.19299418e-02 6.80457594e-02 7.64249066e-02 -9.18467486e-02 -7.62820236e-02 -7.05415439e-03 -6.66582719e-02 -5.53620890e-02 1.24253561e-02 6.65336485e-02 1.21500210e-04 -7.58923902e-05 9.99996147e-01 3.05943878e-07 -2.70266358e-07 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 1.56786977e-04 -1.90444895e-03 1.68236241e-03 7.97540218e-10 1.93999310e-01 6.81732151e-02 4.84921254e-02 1.92190509e-01 1.59621120e-01 -1.58136546e-01 -9.78109002e-02 -8.12354657e-02 1.09281897e-01 2.05721871e-02 1.70859402e-02 -2.25521151e-02 -1.20759074e-01 -1.70414694e-03 1.06445729e-03 3.05943878e-07 9.99991878e-01 3.79072255e-06 2.23230424e-07 -5.92604429e-06 2.76588179e-06 1.09952768e-03 1.35780203e-04 7.97540218e-10 -1.90444762e-03 1.68235129e-03 -2.33146584e-01 -8.19299418e-02 1.92190509e-01 -2.25605523e-02 -1.91831192e-01 -9.78109002e-02 -1.21975934e-01 9.76280342e-02 4.25865781e-02 -6.18461001e-02 -1.20759074e-01 -7.33101550e-02 6.17304735e-02 1.50541854e-03 -9.40326039e-04 -2.70266358e-07 3.79072255e-06 9.99992820e-01 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -9.71306709e-04 7.97540218e-10 1.35780401e-04 -1.68236370e-03 -1.90443913e-03 -1.93636612e-01 -6.80457594e-02 1.59621120e-01 -1.91831192e-01 4.90895355e-02 -8.12354657e-02 9.76280342e-02 -1.58440584e-01 3.53696827e-02 -1.20759074e-01 -1.67418699e-02 1.05906621e-01 2.01202250e-02 -2.52688712e-05 -5.88464601e-05 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 9.99993865e-01 4.87107188e-07 -4.30303383e-07 1.69677373e-04 -2.06102250e-03 1.82067721e-03 -1.52805337e-10 1.22921159e-09 -2.19479646e-01 -7.64249066e-02 -1.58136546e-01 -9.78109002e-02 -8.12354657e-02 1.69696581e-01 8.96834187e-02 7.44853004e-02 -3.58194879e-02 7.28918755e-02 6.05393207e-02 -5.97954653e-03 -3.20184824e-02 3.54418066e-04 8.25373180e-04 2.23230424e-07 -5.92604429e-06 2.76588179e-06 4.87107188e-07 9.99987068e-01 6.03538209e-06 1.18992198e-03 1.46942909e-04 1.22921159e-09 -2.06102046e-03 1.82066005e-03 2.63768616e-01 9.18467486e-02 -9.78109002e-02 -1.21975934e-01 9.76280342e-02 8.96834187e-02 1.36540693e-01 -8.95157478e-02 -2.76433858e-02 -7.25120957e-02 -3.20184824e-02 4.79995836e-02 7.23765281e-02 -3.13087748e-04 -7.29122625e-04 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -4.30303383e-07 6.03538209e-06 9.99988568e-01 -1.05115972e-03 1.22921159e-09 1.46943214e-04 -1.82067919e-03 -2.06100737e-03 2.19069310e-01 7.62820236e-02 -8.12354657e-02 9.76280342e-02 -1.58440584e-01 7.44853004e-02 -8.95157478e-02 1.69975355e-01 -2.29588248e-02 -3.20184824e-02 -6.05530027e-02 -2.79286437e-02 7.27720407e-02 4.86977957e-09 7.67480036e-07 -1.56786977e-04 -1.09952768e-03 9.71306709e-04 -1.69677373e-04 -1.18992198e-03 1.05115972e-03 9.99985971e-01 3.86777936e-07 -3.41673985e-07 1.19145002e-06 -9.58437846e-06 1.12827887e-02 -7.05415439e-03 -1.09281897e-01 -4.25865781e-02 -3.53696827e-02 3.58194879e-02 2.76433858e-02 2.29588248e-02 -1.04525810e-01 6.60887598e-02 5.48890887e-02 1.52056533e-02 8.14212146e-02 6.79433204e-10 1.07079060e-07 1.90444895e-03 -1.35780203e-04 -7.97540218e-10 2.06102250e-03 -1.46942909e-04 -1.22921159e-09 3.86777936e-07 9.99982167e-01 8.30036538e-06 6.69909830e-07 -5.91781293e-07 1.06616776e-01 -6.66582719e-02 -2.05721871e-02 6.18461001e-02 1.20759074e-01 -7.28918755e-02 7.25120957e-02 3.20184824e-02 6.60887598e-02 3.19824435e-02 4.72885383e-02 5.55413962e-02 -8.82899608e-02 -6.00201379e-10 -9.45920794e-08 -1.68236241e-03 -7.97540218e-10 -1.35780401e-04 -1.82067721e-03 -1.22921159e-09 -1.46943214e-04 -3.41673985e-07 8.30036538e-06 9.99984231e-01 5.91790365e-07 6.69903625e-07 8.85490615e-02 -5.53620890e-02 -1.70859402e-02 1.20759074e-01 1.67418699e-02 -6.05393207e-02 3.20184824e-02 6.05530027e-02 5.48890887e-02 4.72885383e-02 1.43198940e-02 -9.54821905e-02 -4.68816506e-02 -1.04649914e-09 -1.64928861e-07 1.90444762e-03 1.68236370e-03 1.52805337e-10 2.06102046e-03 1.82067919e-03 1.19145002e-06 6.69909830e-07 5.91790365e-07 9.99974882e-01 -1.98737736e-02 1.24253561e-02 2.25521151e-02 7.33101550e-02 -1.05906621e-01 5.97954653e-03 -4.79995836e-02 2.79286437e-02 1.52056533e-02 5.55413962e-02 -9.54821905e-02 -1.21607821e-01 2.96560301e-02 8.41835040e-09 1.32673682e-06 -7.97540218e-10 -1.68235129e-03 1.90443913e-03 -1.22921159e-09 -1.82066005e-03 2.06100737e-03 -9.58437846e-06 -5.91781293e-07 6.69903625e-07 9.99974883e-01 -1.06417446e-01 6.65336485e-02 1.20759074e-01 -6.17304735e-02 -2.01202250e-02 3.20184824e-02 -7.23765281e-02 -7.27720407e-02 8.14212146e-02 -8.82899608e-02 -4.68816506e-02 2.96560301e-02 3.16520028e-02 2.19414972e-01 3.26846431e-01 1.93999310e-01 -2.33146584e-01 -1.93636612e-01 -2.19479646e-01 2.63768616e-01 2.19069310e-01 1.12827887e-02 1.06616776e-01 8.85490615e-02 -1.98737736e-02 -1.06417446e-01 9.99996115e-01 3.73073662e-06 1.21500210e-04 -1.70414694e-03 1.50541854e-03 -2.52688712e-05 3.54418066e-04 -3.13087748e-04 4.86977957e-09 6.79433204e-10 -6.00201379e-10 -1.04649914e-09 8.41835040e-09 3.26846431e-01 2.55688369e-01 6.81732151e-02 -8.19299418e-02 -6.80457594e-02 -7.64249066e-02 9.18467486e-02 7.62820236e-02 -7.05415439e-03 -6.66582719e-02 -5.53620890e-02 1.24253561e-02 6.65336485e-02 3.73073662e-06 9.99992628e-01 -7.58923902e-05 1.06445729e-03 -9.40326039e-04 -5.88464601e-05 8.25373180e-04 -7.29122625e-04 7.67480036e-07 1.07079060e-07 -9.45920794e-08 -1.64928861e-07 1.32673682e-06 -1.93999310e-01 -6.81732151e-02 4.84921254e-02 1.92190509e-01 1.59621120e-01 -1.58136546e-01 -9.78109002e-02 -8.12354657e-02 -1.09281897e-01 -2.05721871e-02 -1.70859402e-02 2.25521151e-02 1.20759074e-01 -1.21500210e-04 7.58923902e-05 9.99996147e-01 3.05943878e-07 -2.70266358e-07 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 -1.56786977e-04 1.90444895e-03 -1.68236241e-03 -7.97540218e-10 2.33146584e-01 8.19299418e-02 1.92190509e-01 -2.25605523e-02 -1.91831192e-01 -9.78109002e-02 -1.21975934e-01 9.76280342e-02 -4.25865781e-02 6.18461001e-02 1.20759074e-01 7.33101550e-02 -6.17304735e-02 1.70414694e-03 -1.06445729e-03 3.05943878e-07 9.99991878e-01 3.79072255e-06 2.23230424e-07 -5.92604429e-06 2.76588179e-06 -1.09952768e-03 -1.35780203e-04 -7.97540218e-10 1.90444762e-03 -1.68235129e-03 1.93636612e-01 6.80457594e-02 1.59621120e-01 -1.91831192e-01 4.90895355e-02 -8.12354657e-02 9.76280342e-02 -1.58440584e-01 -3.53696827e-02 1.20759074e-01 1.67418699e-02 -1.05906621e-01 -2.01202250e-02 -1.50541854e-03 9.40326039e-04 -2.70266358e-07 3.79072255e-06 9.99992820e-01 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 9.71306709e-04 -7.97540218e-10 -1.35780401e-04 1.68236370e-03 1.90443913e-03 2.19479646e-01 7.64249066e-02 -1.58136546e-01 -9.78109002e-02 -8.12354657e-02 1.69696581e-01 8.96834187e-02 7.44853004e-02 3.58194879e-02 -7.28918755e-02 -6.05393207e-02 5.97954653e-03 3.20184824e-02 2.52688712e-05 5.88464601e-05 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 9.99993865e-01 4.87107188e-07 -4.30303383e-07 -1.69677373e-04 2.06102250e-03 -1.82067721e-03 1.52805337e-10 -1.22921159e-09 -2.63768616e-01 -9.18467486e-02 -9.78109002e-02 -1.21975934e-01 9.76280342e-02 8.96834187e-02 1.36540693e-01 -8.95157478e-02 2.76433858e-02 7.25120957e-02 3.20184824e-02 -4.79995836e-02 -7.23765281e-02 -3.54418066e-04 -8.25373180e-04 2.23230424e-07 -5.92604429e-06 2.76588179e-06 4.87107188e-07 9.99987068e-01 6.03538209e-06 -1.18992198e-03 -1.46942909e-04 -1.22921159e-09 2.06102046e-03 -1.82066005e-03 -2.19069310e-01 -7.62820236e-02 -8.12354657e-02 9.76280342e-02 -1.58440584e-01 7.44853004e-02 -8.95157478e-02 1.69975355e-01 2.29588248e-02 3.20184824e-02 6.05530027e-02 2.79286437e-02 -7.27720407e-02 3.13087748e-04 7.29122625e-04 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -4.30303383e-07 6.03538209e-06 9.99988568e-01 1.05115972e-03 -1.22921159e-09 -1.46943214e-04 1.82067919e-03 2.06100737e-03 1.12827887e-02 -7.05415439e-03 1.09281897e-01 4.25865781e-02 3.53696827e-02 -3.58194879e-02 -2.76433858e-02 -2.29588248e-02 -1.04525810e-01 6.60887598e-02 5.48890887e-02 1.52056533e-02 8.14212146e-02 4.86977957e-09 7.67480036e-07 1.56786977e-04 1.09952768e-03 -9.71306709e-04 1.69677373e-04 1.18992198e-03 -1.05115972e-03 9.99985971e-01 3.86777936e-07 -3.41673985e-07 1.19145002e-06 -9.58437846e-06 1.06616776e-01 -6.66582719e-02 2.05721871e-02 -6.18461001e-02 -1.20759074e-01 7.28918755e-02 -7.25120957e-02 -3.20184824e-02 6.60887598e-02 3.19824435e-02 4.72885383e-02 5.55413962e-02 -8.82899608e-02 6.79433204e-10 1.07079060e-07 -1.90444895e-03 1.35780203e-04 7.97540218e-10 -2.06102250e-03 1.46942909e-04 1.22921159e-09 3.86777936e-07 9.99982167e-01 8.30036538e-06 6.69909830e-07 -5.91781293e-07 8.85490615e-02 -5.53620890e-02 1.70859402e-02 -1.20759074e-01 -1.67418699e-02 6.05393207e-02 -3.20184824e-02 -6.05530027e-02 5.48890887e-02 4.72885383e-02 1.43198940e-02 -9.54821905e-02 -4.68816506e-02 -6.00201379e-10 -9.45920794e-08 1.68236241e-03 7.97540218e-10 1.35780401e-04 1.82067721e-03 1.22921159e-09 1.46943214e-04 -3.41673985e-07 8.30036538e-06 9.99984231e-01 5.91790365e-07 6.69903625e-07 -1.98737736e-02 1.24253561e-02 -2.25521151e-02 -7.33101550e-02 1.05906621e-01 -5.97954653e-03 4.79995836e-02 -2.79286437e-02 1.52056533e-02 5.55413962e-02 -9.54821905e-02 -1.21607821e-01 2.96560301e-02 -1.04649914e-09 -1.64928861e-07 -1.90444762e-03 -1.68236370e-03 -1.52805337e-10 -2.06102046e-03 -1.82067919e-03 1.19145002e-06 6.69909830e-07 5.91790365e-07 9.99974882e-01 -1.06417446e-01 6.65336485e-02 -1.20759074e-01 6.17304735e-02 2.01202250e-02 -3.20184824e-02 7.23765281e-02 7.27720407e-02 8.14212146e-02 -8.82899608e-02 -4.68816506e-02 2.96560301e-02 3.16520028e-02 8.41835040e-09 1.32673682e-06 7.97540218e-10 1.68235129e-03 -1.90443913e-03 1.22921159e-09 1.82066005e-03 -2.06100737e-03 -9.58437846e-06 -5.91781293e-07 6.69903625e-07 9.99974883e-01 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 26 52 77 103 129 155 181 207 233 259 285 309 334 360 386 411 437 463 489 515 541 567 593 619 643 668 +0 0 1 676 + 3.91223307e-02 1.43289601e-01 -4.90502288e-06 7.03199719e-02 7.01904001e-02 1.03994747e-05 -1.49090185e-01 -1.48815471e-01 1.22107648e-02 1.47797156e-06 1.47524824e-06 -3.90063207e-05 -2.11496292e-02 5.96070478e-04 4.75277945e-03 -5.59203996e-04 1.79029805e-03 1.67641035e-03 1.71502339e-03 -5.49066719e-03 -5.14138488e-03 -1.06159880e-04 -6.83045731e-05 -6.39594584e-05 1.34684710e-05 2.04766944e-04 1.43289601e-01 2.06947327e-01 -1.00196061e-05 1.43644268e-01 1.43379588e-01 1.05056493e-05 -1.50612337e-01 -1.50334819e-01 2.77291004e-02 3.35628623e-06 3.35010193e-06 -8.85784145e-05 -4.80281294e-02 4.75277945e-03 3.42182054e-02 -4.10445357e-03 1.31404555e-02 1.23045409e-02 1.19232474e-02 -3.81724142e-02 -3.57441211e-02 2.92474545e-04 1.88181721e-04 1.76210763e-04 -3.71061546e-05 -5.64140791e-04 4.90502288e-06 1.00196061e-05 4.35782022e-02 7.89988685e-06 7.88533050e-06 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 3.46730911e-06 -1.47406117e-02 -1.47134507e-02 -7.28342405e-09 -3.94914759e-06 5.59203996e-04 4.10445357e-03 2.79146471e-04 1.70950651e-03 1.60075827e-03 -9.85046467e-04 -5.05371641e-03 -4.73223021e-03 -7.38522427e-05 1.24978539e-04 1.17028177e-04 2.96314310e-06 4.50499360e-05 -7.03199719e-02 -1.43644268e-01 7.89988685e-06 -6.96770937e-02 -1.13046612e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 -2.41769599e-02 -2.92823710e-06 -3.94914759e-06 -1.46361945e-02 4.19027880e-02 -1.79029805e-03 -1.31404555e-02 1.70950651e-03 -4.65988978e-03 -5.12484607e-03 -5.05371641e-03 1.36159442e-02 1.51502896e-02 -6.05860816e-06 4.37922170e-06 4.50499360e-05 1.30519411e-04 -1.31282549e-05 -7.01904001e-02 -1.43379588e-01 7.88533050e-06 -1.13046612e-01 -6.92601093e-02 -1.21967065e-05 1.74855873e-01 8.98537365e-02 -2.41324114e-02 -3.94914759e-06 -2.91367025e-06 1.48176760e-02 4.17713057e-02 -1.67641035e-03 -1.23045409e-02 1.60075827e-03 -5.12484607e-03 -3.98572001e-03 -4.73223021e-03 1.51502896e-02 1.16229346e-02 -5.67319696e-06 4.50499360e-05 -1.54706450e-06 -1.39982697e-04 4.95294486e-06 -1.03994747e-05 -1.05056493e-05 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 1.23283559e-01 1.11022440e-05 1.10817869e-05 -6.32037199e-06 3.72168976e-02 3.71483216e-02 1.06143713e-08 5.75522155e-06 -1.71502339e-03 -1.19232474e-02 -9.85046467e-04 -5.05371641e-03 -4.73223021e-03 3.46790742e-03 1.45200339e-02 1.35963591e-02 -2.71229022e-05 -4.27315906e-04 -4.00132709e-04 1.86633712e-05 2.83747240e-04 1.49090185e-01 1.50612337e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 1.11022440e-05 -3.58817490e-02 -1.58872031e-01 2.61493097e-02 3.16985866e-06 5.75522155e-06 3.70647269e-02 -4.53603689e-02 5.49066719e-03 3.81724142e-02 -5.05371641e-03 1.36159442e-02 1.51502896e-02 1.45200339e-02 -3.84827803e-02 -4.35289004e-02 6.63028172e-04 4.06932686e-04 2.83747240e-04 -3.92416695e-04 -1.21992363e-03 1.48815471e-01 1.50334819e-01 -1.21967065e-05 1.74855873e-01 8.98537365e-02 1.10817869e-05 -1.58872031e-01 -3.52957328e-02 2.61011269e-02 5.75522155e-06 3.14862992e-06 -3.73002126e-02 -4.51397623e-02 5.14138488e-03 3.57441211e-02 -4.73223021e-03 1.51502896e-02 1.16229346e-02 1.35963591e-02 -4.35289004e-02 -3.27565852e-02 6.20850419e-04 2.83747240e-04 3.69605943e-04 2.55553552e-04 -1.18329769e-03 1.22107648e-02 2.77291004e-02 -3.46730911e-06 2.41769599e-02 2.41324114e-02 6.32037199e-06 -2.61493097e-02 -2.61011269e-02 1.64085910e-02 2.93214608e-06 2.92674330e-06 -5.22331965e-05 -2.83213775e-02 -1.06159880e-04 2.92474545e-04 7.38522427e-05 6.05860816e-06 5.67319696e-06 2.71229022e-05 -6.63028172e-04 -6.20850419e-04 -2.40442653e-04 -2.18605766e-04 -2.04699419e-04 3.28465375e-05 4.99380004e-04 1.47797156e-06 3.35628623e-06 1.47406117e-02 2.92823710e-06 3.94914759e-06 -3.72168976e-02 -3.16985866e-06 -5.75522155e-06 2.93214608e-06 -7.83085215e-03 -7.87352594e-03 5.41863474e-07 -3.97920169e-06 -6.83045731e-05 1.88181721e-04 -1.24978539e-04 -4.37922170e-06 -4.50499360e-05 4.27315906e-04 -4.06932686e-04 -2.83747240e-04 -2.18605766e-04 -2.42552677e-05 -3.12098794e-05 -4.50323114e-06 3.60081513e-04 1.47524824e-06 3.35010193e-06 1.47134507e-02 3.94914759e-06 2.91367025e-06 -3.71483216e-02 -5.75522155e-06 -3.14862992e-06 2.92674330e-06 -7.87352594e-03 -7.80180981e-03 -5.57537750e-07 -3.96984382e-06 -6.39594584e-05 1.76210763e-04 -1.17028177e-04 -4.50499360e-05 1.54706450e-06 4.00132709e-04 -2.83747240e-04 -3.69605943e-04 -2.04699419e-04 -3.12098794e-05 -2.01496308e-05 5.20366058e-05 3.33475308e-04 -3.90063207e-05 -8.85784145e-05 7.28342405e-09 1.46361945e-02 -1.48176760e-02 -1.06143713e-08 -3.70647269e-02 3.73002126e-02 -5.22331965e-05 5.41863474e-07 -5.57537750e-07 -1.56896505e-02 1.19512681e-04 1.34684710e-05 -3.71061546e-05 -2.96314310e-06 -1.30519411e-04 1.39982697e-04 -1.86633712e-05 3.92416695e-04 -2.55553552e-04 3.28465375e-05 -4.50323114e-06 5.20366058e-05 1.75142643e-04 -7.65478887e-05 -2.11496292e-02 -4.80281294e-02 3.94914759e-06 -4.19027880e-02 -4.17713057e-02 -5.75522155e-06 4.53603689e-02 4.51397623e-02 -2.83213775e-02 -3.97920169e-06 -3.96984382e-06 1.19512681e-04 4.91111366e-02 2.04766944e-04 -5.64140791e-04 -4.50499360e-05 1.31282549e-05 -4.95294486e-06 -2.83747240e-04 1.21992363e-03 1.18329769e-03 4.99380004e-04 3.60081513e-04 3.33475308e-04 -7.65478887e-05 -9.83612846e-04 3.07701009e-01 3.37818299e-01 2.73822622e-01 2.18491276e-01 2.74258093e-01 -2.40261621e-01 -1.91711948e-01 -2.40643719e-01 -1.53428242e-02 -1.17762759e-01 -1.47820043e-01 2.70443463e-02 -1.17950042e-01 3.91473712e-02 1.43350481e-01 4.90810225e-06 7.02264377e-02 7.03560908e-02 -1.04047658e-05 -1.48874167e-01 -1.49149021e-01 1.22216249e-02 -1.47672879e-06 -1.47945515e-06 3.90454712e-05 -2.11684393e-02 3.37818299e-01 3.00129489e-01 2.01908107e-02 1.61108529e-02 2.02229210e-02 -9.90187372e-02 -7.90100178e-02 -9.91762108e-02 1.39253842e-02 1.06883299e-01 1.34163754e-01 -2.45458664e-02 1.07053280e-01 1.43350481e-01 2.06969368e-01 1.00223895e-05 1.43403025e-01 1.43667778e-01 -1.05066413e-05 -1.50331830e-01 -1.50609375e-01 2.77227826e-02 -3.34972080e-06 -3.35590511e-06 8.85683466e-05 -4.80171865e-02 -2.73822622e-01 -2.01908107e-02 5.14000714e-02 -1.87407324e-01 -2.35240402e-01 -2.10473295e-01 4.62756203e-02 5.80868199e-02 -1.40295152e-01 3.08788086e-02 3.87601891e-02 -3.22599238e-02 1.40697036e-01 -4.90810225e-06 -1.00223895e-05 4.36040271e-02 -7.88916809e-06 -7.90373318e-06 -8.47198876e-02 1.22003699e-05 1.22228944e-05 -3.46994451e-06 -1.47246794e-02 -1.47518643e-02 -7.28934678e-09 3.95190762e-06 -2.18491276e-01 -1.61108529e-02 -1.87407324e-01 1.36729034e-01 -1.87705366e-01 4.62756203e-02 -2.31543180e-01 4.63492143e-02 7.78781020e-02 -2.52608060e-02 1.40697036e-01 -1.35335987e-01 -2.53009793e-02 -7.02264377e-02 -1.43403025e-01 -7.88916809e-06 -6.92762962e-02 -1.13088725e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -2.41449995e-02 2.91552205e-06 3.95190762e-06 -1.48289776e-02 4.17930850e-02 -2.74258093e-01 -2.02229210e-02 -2.35240402e-01 -1.87705366e-01 5.06524406e-02 5.80868199e-02 4.63492143e-02 -2.10288686e-01 9.77553894e-02 1.40697036e-01 3.92590417e-02 1.05256133e-01 3.13259658e-02 -7.03560908e-02 -1.43667778e-01 -7.90373318e-06 -1.13088725e-01 -6.96934836e-02 1.22228944e-05 1.74888437e-01 9.04914302e-02 -2.41895763e-02 3.95190762e-06 2.93010075e-06 1.46473741e-02 4.19246640e-02 2.40261621e-01 9.90187372e-02 -2.10473295e-01 4.62756203e-02 5.80868199e-02 1.68010812e-01 -8.96693003e-02 -1.12556125e-01 2.29180971e-02 8.93530583e-02 1.12159167e-01 -1.85534199e-02 8.09180829e-02 1.04047658e-05 1.05066413e-05 -8.47198876e-02 1.22003699e-05 1.22228944e-05 1.23319846e-01 -1.10830618e-05 -1.11035236e-05 6.32201299e-06 3.71628842e-02 3.72314949e-02 1.06159769e-08 -5.75543479e-06 1.91711948e-01 7.90100178e-02 4.62756203e-02 -2.31543180e-01 4.63492143e-02 -8.96693003e-02 2.08838397e-01 -8.98119051e-02 3.45469136e-03 7.51965356e-02 8.09180829e-02 -6.24087131e-03 7.53161237e-02 1.48874167e-01 1.50331830e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -1.10830618e-05 -3.52595621e-02 -1.58872180e-01 2.60890459e-02 -3.14752702e-06 -5.75543479e-06 3.73147809e-02 -4.51188027e-02 2.40643719e-01 9.91762108e-02 5.80868199e-02 4.63492143e-02 -2.10288686e-01 -1.12556125e-01 -8.98119051e-02 1.67653091e-01 4.33645262e-03 8.09180829e-02 1.12303375e-01 -2.93320866e-02 8.96102287e-02 1.49149021e-01 1.50609375e-01 1.22228944e-05 1.74888437e-01 9.04914302e-02 -1.11035236e-05 -1.58872180e-01 -3.58456459e-02 2.61372119e-02 -5.75543479e-06 -3.16875898e-06 -3.70793186e-02 -4.53394497e-02 -1.53428242e-02 1.39253842e-02 1.40295152e-01 -7.78781020e-02 -9.77553894e-02 -2.29180971e-02 -3.45469136e-03 -4.33645262e-03 -1.67470841e-01 -4.34021540e-02 -5.44799418e-02 -3.32179928e-02 1.44875517e-01 1.22216249e-02 2.77227826e-02 3.46994451e-06 2.41449995e-02 2.41895763e-02 -6.32201299e-06 -2.60890459e-02 -2.61372119e-02 1.64208833e-02 -2.92991674e-06 -2.93532599e-06 5.22726833e-05 -2.83395511e-02 -1.17762759e-01 1.06883299e-01 -3.08788086e-02 2.52608060e-02 -1.40697036e-01 -8.93530583e-02 -7.51965356e-02 -8.09180829e-02 -4.34021540e-02 1.11021914e-02 7.70144141e-02 -1.42554333e-01 1.19404722e-02 -1.47672879e-06 -3.34972080e-06 1.47246794e-02 -2.91552205e-06 -3.95190762e-06 -3.71628842e-02 3.14752702e-06 5.75543479e-06 -2.92991674e-06 -7.81299182e-03 -7.88653339e-03 -5.58517128e-07 3.97339830e-06 -1.47820043e-01 1.34163754e-01 -3.87601891e-02 -1.40697036e-01 -3.92590417e-02 -1.12159167e-01 -8.09180829e-02 -1.12303375e-01 -5.44799418e-02 7.70144141e-02 4.64189145e-02 9.36209823e-02 7.74824925e-02 -1.47945515e-06 -3.35590511e-06 1.47518643e-02 -3.95190762e-06 -2.93010075e-06 -3.72314949e-02 5.75543479e-06 3.16875898e-06 -2.93532599e-06 -7.88653339e-03 -7.84208546e-03 5.42826137e-07 3.98276739e-06 2.70443463e-02 -2.45458664e-02 3.22599238e-02 1.35335987e-01 -1.05256133e-01 1.85534199e-02 6.24087131e-03 2.93320866e-02 -3.32179928e-02 -1.42554333e-01 9.36209823e-02 -1.29511515e-01 -3.40390277e-02 3.90454712e-05 8.85683466e-05 7.28934678e-09 1.48289776e-02 -1.46473741e-02 -1.06159769e-08 -3.73147809e-02 3.70793186e-02 5.22726833e-05 -5.58517128e-07 5.42826137e-07 -1.57138654e-02 -1.19632376e-04 -1.17950042e-01 1.07053280e-01 -1.40697036e-01 2.53009793e-02 -3.13259658e-02 -8.09180829e-02 -7.53161237e-02 -8.96102287e-02 1.44875517e-01 1.19404722e-02 7.74824925e-02 -3.40390277e-02 1.11401401e-02 -2.11684393e-02 -4.80171865e-02 -3.95190762e-06 -4.17930850e-02 -4.19246640e-02 5.75543479e-06 4.51188027e-02 4.53394497e-02 -2.83395511e-02 3.97339830e-06 3.98276739e-06 -1.19632376e-04 4.91444137e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 2 499 + 8.20974861e-06 9.01678303e-05 -1.14892157e-09 3.29264972e-05 3.28961472e-05 4.01550972e-09 -1.15078934e-04 -1.14972860e-04 -1.30380943e-05 -7.88714653e-10 -7.87987654e-10 2.08251874e-08 2.25826322e-05 9.01678303e-05 9.91019828e-04 -1.26276555e-08 3.61891076e-04 3.61557502e-04 4.41608263e-08 -1.26558797e-03 -1.26442142e-03 -1.43798531e-04 -8.69881791e-09 -8.69079976e-09 2.29683210e-07 2.49066256e-04 1.14892157e-09 1.26276555e-08 6.95938620e-06 4.69902220e-09 4.69469087e-09 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 -2.09348108e-09 5.15529041e-06 5.15053852e-06 3.26624168e-09 -3.29264972e-05 -3.61891076e-04 4.69902220e-09 -1.27708066e-04 -1.34543323e-04 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.10670363e-05 3.08936886e-09 3.26624168e-09 5.06896926e-06 -8.84554137e-05 -3.28961472e-05 -3.61557502e-04 4.69469087e-09 -1.34543323e-04 -1.27459921e-04 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.10199652e-05 3.26624168e-09 3.08334476e-09 -5.23678033e-06 -8.83643803e-05 -4.01550972e-09 -4.41608263e-08 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 8.25501551e-05 5.76252238e-08 5.75721076e-08 7.37124160e-09 -1.78684916e-05 -1.78520213e-05 -1.15203707e-08 1.15078934e-04 1.26558797e-03 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.76252238e-08 -1.56890876e-03 -1.64993668e-03 -1.80300415e-04 -1.09075048e-08 -1.15203707e-08 -1.75640280e-05 3.12305810e-04 1.14972860e-04 1.26442142e-03 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.75721076e-08 -1.64993668e-03 -1.56586569e-03 -1.80134223e-04 -1.15203707e-08 -1.08862571e-08 1.81562050e-05 3.11985016e-04 -1.30380943e-05 -1.43798531e-04 2.09348108e-09 -5.10670363e-05 -5.10199652e-05 -7.37124160e-09 1.80300415e-04 1.80134223e-04 1.91798739e-05 1.38189198e-09 1.38061822e-09 -3.03594982e-08 -3.29215468e-05 -7.88714653e-10 -8.69881791e-09 -5.15529041e-06 -3.08936886e-09 -3.26624168e-09 1.78684916e-05 1.09075048e-08 1.15203707e-08 1.38189198e-09 -3.66746168e-06 -3.83652398e-06 1.31909688e-10 -2.12564295e-09 -7.87987654e-10 -8.69079976e-09 -5.15053852e-06 -3.26624168e-09 -3.08334476e-09 1.78520213e-05 1.15203707e-08 1.08862571e-08 1.38061822e-09 -3.83652398e-06 -3.66038577e-06 -1.35951600e-10 -2.12343673e-09 2.08251874e-08 2.29683210e-07 -5.06896926e-06 5.23678033e-06 1.75640280e-05 -1.81562050e-05 -3.03594982e-08 1.31909688e-10 -1.35951600e-10 -7.50039447e-06 5.96600777e-08 2.25826322e-05 2.49066256e-04 -3.26624168e-09 8.84554137e-05 8.83643803e-05 1.15203707e-08 -3.12305810e-04 -3.11985016e-04 -3.29215468e-05 -2.12564295e-09 -2.12343673e-09 5.96600777e-08 5.71943630e-05 1.33751568e-03 9.58431535e-03 1.24264302e-03 3.47648115e-03 3.72955829e-03 -3.62894976e-03 -1.01525339e-02 -1.08916072e-02 -7.80469259e-05 5.09871371e-05 5.46988440e-05 -1.07620232e-05 1.53028260e-04 8.22431014e-06 9.03264335e-05 1.15092237e-09 3.29515519e-05 3.29819549e-05 -4.02255197e-09 -1.15167916e-04 -1.15274176e-04 -1.30567437e-05 7.89159811e-10 7.89887933e-10 -2.08561661e-08 2.26149339e-05 9.58431535e-03 5.71256604e-02 7.77982346e-03 2.17652287e-02 2.33496705e-02 -2.04328387e-02 -5.71639458e-02 -6.13253053e-02 2.13941086e-03 -1.39765191e-03 -1.49939667e-03 2.95006997e-04 -4.19478817e-03 9.03264335e-05 9.92753883e-04 1.26493700e-08 3.62158546e-04 3.62492694e-04 -4.42375729e-08 -1.26654648e-03 -1.26771507e-03 -1.43999445e-04 8.70343917e-09 8.71146944e-09 -2.30017255e-07 2.49414248e-04 -1.24264302e-03 -7.77982346e-03 6.24956661e-04 -3.22719163e-03 -3.46212126e-03 -2.14395977e-03 8.83277749e-03 9.47577655e-03 -1.19639555e-04 1.87058829e-04 2.00676136e-04 -2.13788872e-05 3.03992462e-04 -1.15092237e-09 -1.26493700e-08 6.97476357e-06 -4.70251108e-09 -4.70684987e-09 -2.40384979e-05 1.64675606e-08 1.64827544e-08 2.09658074e-09 5.16093129e-06 5.16569305e-06 -3.27086392e-09 -3.47648115e-03 -2.17652287e-02 -3.22719163e-03 -7.25006205e-03 -9.68580605e-03 8.83277749e-03 1.94098542e-02 2.65099131e-02 -4.83271624e-04 3.14023082e-04 3.03992462e-04 2.59616141e-05 9.42480961e-04 -3.29515519e-05 -3.62158546e-04 -4.70251108e-09 -1.27660762e-04 -1.34759748e-04 1.64675606e-08 4.47436982e-04 4.71910490e-04 5.10872854e-05 -3.08758929e-09 -3.27086392e-09 5.24729515e-06 -8.84809725e-05 -3.72955829e-03 -2.33496705e-02 -3.46212126e-03 -9.68580605e-03 -8.61241001e-03 9.47577655e-03 2.65099131e-02 2.31385811e-02 -5.18452313e-04 3.03992462e-04 3.56780857e-04 -1.56180923e-04 9.98148221e-04 -3.29819549e-05 -3.62492694e-04 -4.70684987e-09 -1.34759748e-04 -1.27909321e-04 1.64827544e-08 4.71910490e-04 4.48307402e-04 5.11344213e-05 -3.27086392e-09 -3.09362226e-09 -5.07924973e-06 -8.85721378e-05 3.62894976e-03 2.04328387e-02 -2.14395977e-03 8.83277749e-03 9.47577655e-03 7.30258139e-03 -2.27417801e-02 -2.43973118e-02 1.06622710e-03 -5.81065912e-04 -6.23365724e-04 1.41846965e-04 -2.01696223e-03 4.02255197e-09 4.42375729e-08 -2.40384979e-05 1.64675606e-08 1.64827544e-08 8.27387335e-05 -5.76693005e-08 -5.77225093e-08 -7.38221994e-09 -1.78886957e-05 -1.79052008e-05 1.15367526e-08 1.01525339e-02 5.71639458e-02 8.83277749e-03 1.94098542e-02 2.65099131e-02 -2.27417801e-02 -4.81920914e-02 -6.82551569e-02 2.82538171e-03 -1.84758355e-03 -2.01696223e-03 4.87799399e-04 -5.54517302e-03 1.15167916e-04 1.26654648e-03 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.76693005e-08 -1.56836563e-03 -1.65262777e-03 -1.80372960e-04 1.09013067e-08 1.15367526e-08 -1.81933121e-05 3.12398486e-04 1.08916072e-02 6.13253053e-02 9.47577655e-03 2.65099131e-02 2.31385811e-02 -2.43973118e-02 -6.82551569e-02 -5.77924565e-02 3.03106082e-03 -2.01696223e-03 -2.13127748e-03 3.28144044e-04 -5.96256999e-03 1.15274176e-04 1.26771507e-03 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.77225093e-08 -1.65262777e-03 -1.57141384e-03 -1.80539382e-04 1.15367526e-08 1.09225858e-08 1.76003043e-05 3.12719748e-04 -7.80469259e-05 2.13941086e-03 1.19639555e-04 4.83271624e-04 5.18452313e-04 -1.06622710e-03 -2.82538171e-03 -3.03106082e-03 -4.01220320e-04 4.65138310e-04 4.98998949e-04 -6.17329286e-05 8.77798022e-04 -1.30567437e-05 -1.43999445e-04 -2.09658074e-09 -5.10872854e-05 -5.11344213e-05 7.38221994e-09 1.80372960e-04 1.80539382e-04 1.91984898e-05 -1.38221596e-09 -1.38349126e-09 3.03902675e-08 -3.29530311e-05 5.09871371e-05 -1.39765191e-03 -1.87058829e-04 -3.14023082e-04 -3.03992462e-04 5.81065912e-04 1.84758355e-03 2.01696223e-03 4.65138310e-04 2.34645233e-05 1.35458040e-05 1.55891489e-04 -6.92209772e-04 7.89159811e-10 8.70343917e-09 -5.16093129e-06 3.08758929e-09 3.27086392e-09 1.78886957e-05 -1.09013067e-08 -1.15367526e-08 -1.38221596e-09 -3.66689421e-06 -3.84347757e-06 -1.36204331e-10 2.12570328e-09 5.46988440e-05 -1.49939667e-03 -2.00676136e-04 -3.03992462e-04 -3.56780857e-04 6.23365724e-04 2.01696223e-03 2.13127748e-03 4.98998949e-04 1.35458040e-05 2.53697956e-05 -4.66526598e-05 -7.57642946e-04 7.89887933e-10 8.71146944e-09 -5.16569305e-06 3.27086392e-09 3.09362226e-09 1.79052008e-05 -1.15367526e-08 -1.09225858e-08 -1.38349126e-09 -3.84347757e-06 -3.67398335e-06 1.32157773e-10 2.12791218e-09 -1.07620232e-05 2.95006997e-04 2.13788872e-05 -2.59616141e-05 1.56180923e-04 -1.41846965e-04 -4.87799399e-04 -3.28144044e-04 -6.17329286e-05 1.55891489e-04 -4.66526598e-05 5.63216592e-04 1.68680505e-04 -2.08561661e-08 -2.30017255e-07 -5.24729515e-06 5.07924973e-06 1.81933121e-05 -1.76003043e-05 3.03902675e-08 -1.36204331e-10 1.32157773e-10 -7.51386306e-06 -5.97266014e-08 1.53028260e-04 -4.19478817e-03 -3.03992462e-04 -9.42480961e-04 -9.98148221e-04 2.01696223e-03 5.54517302e-03 5.96256999e-03 8.77798022e-04 -6.92209772e-04 -7.57642946e-04 1.68680505e-04 -1.82343655e-03 2.26149339e-05 2.49414248e-04 3.27086392e-09 8.84809725e-05 8.85721378e-05 -1.15367526e-08 -3.12398486e-04 -3.12719748e-04 -3.29530311e-05 2.12570328e-09 2.12791218e-09 -5.97266014e-08 5.72493338e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 3 4 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 38 51 64 76 89 102 115 128 141 152 165 191 217 242 268 294 319 345 371 397 423 449 473 499 +0 1 -2 676 + 1.69968586e-04 1.56386115e-03 -3.25031918e-04 -3.24690943e-04 -6.50299618e-04 1.06428280e-03 1.06316632e-03 2.12933765e-03 -4.51727960e-05 5.20923513e-05 1.04331940e-04 -7.83509303e-05 1.04222491e-04 1.01757345e-03 7.56972476e-03 -2.84449741e-03 -7.56640338e-04 -2.84600546e-03 8.45059496e-03 2.24787022e-03 8.45507515e-03 5.14382232e-05 5.10654411e-05 1.92076099e-04 -8.92972253e-05 5.10925142e-05 1.56386115e-03 1.39379141e-02 -2.89071600e-03 -2.88768349e-03 -5.78352895e-03 9.33559857e-03 9.32580505e-03 1.86779693e-02 -2.87283852e-04 3.31289906e-04 6.63516196e-04 -4.98285673e-04 6.62820133e-04 7.56972476e-03 4.83733207e-02 -1.88603795e-02 -5.01688766e-03 -1.88703786e-02 5.14552457e-02 1.36871682e-02 5.14825254e-02 -7.06222228e-04 -7.01104109e-04 -2.63711306e-03 1.22600824e-03 -7.01475809e-04 3.25031918e-04 2.89071600e-03 -4.13274076e-04 -6.40689538e-04 -1.28318997e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -1.33398645e-04 4.04581339e-05 8.10306217e-05 -1.33945083e-04 1.78173892e-04 2.84449741e-03 1.88603795e-02 -6.63410800e-03 -2.12860080e-03 -8.00645854e-03 1.83635173e-02 5.99194989e-03 2.25379500e-02 -2.53336620e-04 -1.43810999e-04 -5.40926602e-04 1.94578336e-04 -1.11330407e-04 3.24690943e-04 2.88768349e-03 -6.40689538e-04 -4.11929137e-04 -1.28184384e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -4.90870753e-05 4.03136771e-05 1.78173892e-04 -1.82401080e-04 8.06565982e-05 7.56640338e-04 5.01688766e-03 -2.12860080e-03 8.01897237e-04 -2.12972931e-03 5.99194989e-03 -2.56862307e-03 5.99512660e-03 -1.10276866e-05 -1.51926966e-04 -1.11330407e-04 1.92185288e-05 -1.52007512e-04 6.50299618e-04 5.78352895e-03 -1.28318997e-03 -1.28184384e-03 -2.33922250e-03 4.14963185e-03 4.14527867e-03 7.53700469e-03 -9.83128941e-05 1.78173892e-04 3.08203844e-04 -1.70656951e-04 3.07880522e-04 2.84600546e-03 1.88703786e-02 -8.00645854e-03 -2.12972931e-03 -6.64259520e-03 2.25379500e-02 5.99512660e-03 1.83874085e-02 -4.14792269e-05 -1.11330407e-04 -5.41083639e-04 3.17074961e-04 -1.43929014e-04 -1.06428280e-03 -9.33559857e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -4.10290906e-03 -6.66159519e-03 -1.33420192e-02 3.95548216e-04 -8.90408852e-05 -1.78333442e-04 3.70593279e-04 -4.92963575e-04 -8.45059496e-03 -5.14552457e-02 1.83635173e-02 5.99194989e-03 2.25379500e-02 -4.80245958e-02 -1.60833530e-02 -6.04954667e-02 1.15447250e-03 1.03318148e-03 3.88617946e-03 -1.74703870e-03 9.99589844e-04 -1.06316632e-03 -9.32580505e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -6.66159519e-03 -4.08892500e-03 -1.33280228e-02 1.22592413e-04 -8.86171635e-05 -4.92963575e-04 5.27556042e-04 -1.77298611e-04 -2.24787022e-03 -1.36871682e-02 5.99194989e-03 -2.56862307e-03 5.99512660e-03 -1.60833530e-02 8.16062070e-03 -1.60918798e-02 2.47991486e-04 3.94026319e-04 9.99589844e-04 -4.30593464e-04 3.94235217e-04 -2.12933765e-03 -1.86779693e-02 4.14963185e-03 4.14527867e-03 7.53700469e-03 -1.33420192e-02 -1.33280228e-02 -2.41280351e-02 2.45531331e-04 -4.92963575e-04 -8.29803722e-04 4.26307571e-04 -8.28933215e-04 -8.45507515e-03 -5.14825254e-02 2.25379500e-02 5.99512660e-03 1.83874085e-02 -6.04954667e-02 -1.60918798e-02 -4.80887238e-02 9.32788125e-04 9.99589844e-04 3.88810372e-03 -1.87630782e-03 1.03424109e-03 -4.51727960e-05 -2.87283852e-04 1.33398645e-04 4.90870753e-05 9.83128941e-05 -3.95548216e-04 -1.22592413e-04 -2.45531331e-04 -2.47997539e-05 1.49666512e-05 2.99756052e-05 -3.44119357e-05 4.57747934e-05 5.14382232e-05 -7.06222228e-04 2.53336620e-04 1.10276866e-05 4.14792269e-05 -1.15447250e-03 -2.47991486e-04 -9.32788125e-04 2.05700403e-04 -1.10043767e-04 -4.13915496e-04 3.65247307e-04 -2.08980773e-04 5.20923513e-05 3.31289906e-04 -4.04581339e-05 -4.03136771e-05 -1.78173892e-04 8.90408852e-05 8.86171635e-05 4.92963575e-04 1.49666512e-05 -2.52508823e-05 -4.97986593e-05 2.59656156e-05 -4.97656043e-05 5.10654411e-05 -7.01104109e-04 1.43810999e-04 1.51926966e-04 1.11330407e-04 -1.03318148e-03 -3.94026319e-04 -9.99589844e-04 -1.10043767e-04 7.48226736e-05 -4.76837615e-04 3.05282129e-04 7.25891165e-05 1.04331940e-04 6.63516196e-04 -8.10306217e-05 -1.78173892e-04 -3.08203844e-04 1.78333442e-04 4.92963575e-04 8.29803722e-04 2.99756052e-05 -4.97986593e-05 -1.00124765e-04 7.03034607e-05 -8.59154247e-05 1.92076099e-04 -2.63711306e-03 5.40926602e-04 1.11330407e-04 5.41083639e-04 -3.88617946e-03 -9.99589844e-04 -3.88810372e-03 -4.13915496e-04 -4.76837615e-04 -1.59196851e-03 7.19051548e-04 -4.77150933e-04 -7.83509303e-05 -4.98285673e-04 1.33945083e-04 1.82401080e-04 1.70656951e-04 -3.70593279e-04 -5.27556042e-04 -4.26307571e-04 -3.44119357e-05 2.59656156e-05 7.03034607e-05 -6.46078809e-05 6.10898878e-05 -8.92972253e-05 1.22600824e-03 -1.94578336e-04 -1.92185288e-05 -3.17074961e-04 1.74703870e-03 4.30593464e-04 1.87630782e-03 3.65247307e-04 3.05282129e-04 7.19051548e-04 -2.17066409e-04 2.48356354e-04 1.04222491e-04 6.62820133e-04 -1.78173892e-04 -8.06565982e-05 -3.07880522e-04 4.92963575e-04 1.77298611e-04 8.28933215e-04 4.57747934e-05 -4.97656043e-05 -8.59154247e-05 6.10898878e-05 -9.99444110e-05 5.10925142e-05 -7.01475809e-04 1.11330407e-04 1.52007512e-04 1.43929014e-04 -9.99589844e-04 -3.94235217e-04 -1.03424109e-03 -2.08980773e-04 7.25891165e-05 -4.77150933e-04 2.48356354e-04 7.48996213e-05 3.24320009e-07 3.31948369e-06 -3.58620831e-07 -1.14844943e-06 -1.79273401e-06 1.13233473e-06 3.62619530e-06 5.66050491e-06 -7.11318921e-07 2.37358032e-07 3.70516807e-07 -5.46042437e-07 1.18654517e-06 1.70719458e-04 1.57005992e-03 -3.26398409e-04 -3.26740866e-04 -6.52560013e-04 1.06854114e-03 1.06966225e-03 2.13630705e-03 -4.52413105e-05 5.23089602e-05 1.04470359e-04 -7.82505410e-05 1.04579970e-04 3.31948369e-06 3.39531922e-05 -3.67482957e-06 -1.17682955e-05 -1.83703549e-05 1.15922505e-05 3.71230904e-05 5.79492879e-05 -7.29688800e-06 2.43487825e-06 3.80085439e-06 -5.60144035e-06 1.21718781e-05 1.57005992e-03 1.39845673e-02 -2.90120743e-03 -2.90425137e-03 -5.80031000e-03 9.36677236e-03 9.37659996e-03 1.87267490e-02 -2.86910970e-04 3.31732532e-04 6.62529264e-04 -4.96248635e-04 6.63224388e-04 3.58620831e-07 3.67482957e-06 -2.88790554e-07 -1.27708987e-06 -1.99354223e-06 9.18906236e-07 4.03856435e-06 6.30421459e-06 -8.22490139e-07 1.91497867e-07 2.98928912e-07 -6.10887007e-07 1.32745182e-06 3.26398409e-04 2.90120743e-03 -4.14764252e-04 -6.44582972e-04 -1.28734761e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -1.33577269e-04 4.04713759e-05 8.08285841e-05 -1.33601047e-04 1.78554592e-04 1.14844943e-06 1.17682955e-05 -1.27708987e-06 -3.97975979e-06 -6.38413121e-06 4.03856435e-06 1.25909249e-05 2.01886534e-05 -2.50569348e-06 8.27261024e-07 1.32745182e-06 -2.03035541e-06 4.13545128e-06 3.26740866e-04 2.90425137e-03 -6.44582972e-04 -4.16116134e-04 -1.28869829e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -4.91269703e-05 4.06162668e-05 1.78554592e-04 -1.82579539e-04 8.12030661e-05 1.79273401e-06 1.83703549e-05 -1.99354223e-06 -6.38413121e-06 -9.85565335e-06 6.30421459e-06 2.01886534e-05 3.11723691e-05 -3.91139723e-06 1.32745182e-06 2.04903504e-06 -2.93821637e-06 6.56184169e-06 6.52560013e-04 5.80031000e-03 -1.28734761e-03 -1.28869829e-03 -2.34461810e-03 4.16200528e-03 4.16637205e-03 7.55231102e-03 -9.81153560e-05 1.78554592e-04 3.07818361e-04 -1.69566300e-04 3.08141323e-04 -1.13233473e-06 -1.15922505e-05 9.18906236e-07 4.03856435e-06 6.30421459e-06 -2.91887598e-06 -1.27541577e-05 -1.99092897e-05 2.60322671e-06 -6.10399668e-07 -9.52836247e-07 1.93455309e-06 -4.20376599e-06 -1.06854114e-03 -9.36677236e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -4.11465939e-03 -6.69832648e-03 -1.33777573e-02 3.95711679e-04 -8.86552125e-05 -1.77060333e-04 3.69076357e-04 -4.93261692e-04 -3.62619530e-06 -3.71230904e-05 4.03856435e-06 1.25909249e-05 2.01886534e-05 -1.27541577e-05 -3.97801846e-05 -6.37576247e-05 7.93730362e-06 -2.62100322e-06 -4.20376599e-06 6.42575115e-06 -1.31023109e-05 -1.06966225e-03 -9.37659996e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -6.69832648e-03 -4.12870777e-03 -1.33917933e-02 1.22350018e-04 -8.90797389e-05 -4.93261692e-04 5.27528724e-04 -1.78094850e-04 -5.66050491e-06 -5.79492879e-05 6.30421459e-06 2.01886534e-05 3.11723691e-05 -1.99092897e-05 -6.37576247e-05 -9.84620951e-05 1.23901617e-05 -4.20376599e-06 -6.49010940e-06 9.31091499e-06 -2.07839640e-05 -2.13630705e-03 -1.87267490e-02 4.16200528e-03 4.16637205e-03 7.55231102e-03 -1.33777573e-02 -1.33917933e-02 -2.41691624e-02 2.44354893e-04 -4.93261692e-04 -8.27232454e-04 4.22200574e-04 -8.28100385e-04 -7.11318921e-07 -7.29688800e-06 8.22490139e-07 2.50569348e-06 3.91139723e-06 -2.60322671e-06 -7.93730362e-06 -1.23901617e-05 1.53545058e-06 -5.42361295e-07 -8.46628083e-07 1.18534388e-06 -2.57574130e-06 -4.52413105e-05 -2.86910970e-04 1.33577269e-04 4.91269703e-05 9.81153560e-05 -3.95711679e-04 -1.22350018e-04 -2.44354893e-04 -2.48554673e-05 1.52245278e-05 3.04061079e-05 -3.45457148e-05 4.61695186e-05 2.37358032e-07 2.43487825e-06 -1.91497867e-07 -8.27261024e-07 -1.32745182e-06 6.10399668e-07 2.62100322e-06 4.20376599e-06 -5.42361295e-07 1.24059189e-07 1.99568397e-07 -4.25056397e-07 8.65206444e-07 5.23089602e-05 3.31732532e-04 -4.04713759e-05 -4.06162668e-05 -1.78554592e-04 8.86552125e-05 8.90797389e-05 4.93261692e-04 1.52245278e-05 -2.55275929e-05 -5.02954556e-05 2.63263767e-05 -5.03291766e-05 3.70516807e-07 3.80085439e-06 -2.98928912e-07 -1.32745182e-06 -2.04903504e-06 9.52836247e-07 4.20376599e-06 6.49010940e-06 -8.46628083e-07 1.99568397e-07 3.07740041e-07 -6.14655125e-07 1.37307555e-06 1.04470359e-04 6.62529264e-04 -8.08285841e-05 -1.78554592e-04 -3.07818361e-04 1.77060333e-04 4.93261692e-04 8.27232454e-04 3.04061079e-05 -5.02954556e-05 -1.00793375e-04 7.07246307e-05 -8.69387726e-05 -5.46042437e-07 -5.60144035e-06 6.10887007e-07 2.03035541e-06 2.93821637e-06 -1.93455309e-06 -6.42575115e-06 -9.31091499e-06 1.18534388e-06 -4.25056397e-07 -6.14655125e-07 7.70698298e-07 -2.04660920e-06 -7.82505410e-05 -4.96248635e-04 1.33601047e-04 1.82579539e-04 1.69566300e-04 -3.69076357e-04 -5.27528724e-04 -4.22200574e-04 -3.45457148e-05 2.63263767e-05 7.07246307e-05 -6.46717736e-05 6.17162441e-05 1.18654517e-06 1.21718781e-05 -1.32745182e-06 -4.13545128e-06 -6.56184169e-06 4.20376599e-06 1.31023109e-05 2.07839640e-05 -2.57574130e-06 8.65206444e-07 1.37307555e-06 -2.04660920e-06 4.27612138e-06 1.04579970e-04 6.63224388e-04 -1.78554592e-04 -8.12030661e-05 -3.08141323e-04 4.93261692e-04 1.78094850e-04 8.28100385e-04 4.61695186e-05 -5.03291766e-05 -8.69387726e-05 6.17162441e-05 -1.00975711e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 -1 676 + 3.90324935e-02 1.43071006e-01 -7.00978352e-02 6.86422865e-05 -7.01535788e-02 1.48682692e-01 -1.45595366e-04 1.48800929e-01 -6.07138617e-03 2.06280218e-05 -2.10821875e-02 1.05494662e-02 2.06444258e-05 1.20397875e-02 6.02120523e-02 -3.30100044e-02 1.32249374e-02 -1.10218598e-02 8.20053125e-02 -3.28541345e-02 2.73811250e-02 -2.86031694e-03 2.29724551e-03 -1.91455862e-03 -1.40547260e-04 7.67037700e-04 1.43071006e-01 2.06868017e-01 -1.43370476e-01 1.40393455e-04 -1.43484488e-01 1.50424335e-01 -1.47300844e-04 1.50543956e-01 -1.38427655e-02 4.70319070e-05 -4.80674051e-02 2.40527917e-02 4.70693080e-05 6.02120523e-02 1.53539095e-01 -1.11561044e-01 4.46951718e-02 -3.72496219e-02 1.70531896e-01 -6.83209134e-02 5.69396668e-02 -3.48353885e-02 2.79778225e-02 -2.33171340e-02 -1.71170485e-03 9.34164179e-03 7.00978352e-02 1.43370476e-01 -6.93202600e-02 1.10463434e-04 -1.12895499e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 7.02935424e-04 4.08315227e-05 -4.17305074e-02 2.82339372e-02 5.52514609e-05 3.30100044e-02 1.11561044e-01 -6.93156585e-02 3.34693760e-02 -2.78938764e-02 1.34131636e-01 -6.71413200e-02 5.59565761e-02 -1.46400324e-02 1.39179997e-02 -1.15994683e-02 -9.52021174e-04 5.19566254e-03 -6.86422865e-05 -1.40393455e-04 1.10463434e-04 4.34854252e-02 1.10551277e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 2.42116850e-05 1.46808232e-02 5.52514609e-05 -4.20237084e-05 1.46924978e-02 -1.32249374e-02 -4.46951718e-02 3.34693760e-02 8.16345489e-04 1.11752414e-02 -6.71413200e-02 -6.55683463e-03 -2.24181193e-02 8.71069385e-03 -2.13371123e-03 5.19566254e-03 -1.26137781e-03 -7.12434502e-04 7.01535788e-02 1.43484488e-01 -1.12895499e-01 1.10551277e-04 -6.94997435e-02 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -2.47447519e-02 5.52514609e-05 -4.17870511e-02 1.35638376e-02 4.09193626e-05 1.10218598e-02 3.72496219e-02 -2.78938764e-02 1.11752414e-02 4.91171019e-03 5.59565761e-02 -2.24181193e-02 -1.47723506e-02 -7.25962199e-03 5.19566254e-03 -2.29668885e-04 -1.68700037e-03 9.20132148e-05 -1.48682692e-01 -1.50424335e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -3.55921032e-02 1.55449069e-04 -1.58871580e-01 -1.91206163e-02 -4.43023376e-05 4.52777390e-02 -4.12440938e-02 -8.07112526e-05 -8.20053125e-02 -1.70531896e-01 1.34131636e-01 -6.71413200e-02 5.59565761e-02 -1.66806170e-01 9.38411264e-02 -7.82085924e-02 4.48140672e-02 -4.47560132e-02 3.73003279e-02 3.14600983e-03 -1.71693717e-02 1.45595366e-04 1.47300844e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 1.55449069e-04 1.23153086e-01 1.55572686e-04 -4.42274240e-05 -3.71153887e-02 -8.07112526e-05 7.67324619e-05 -3.71449038e-02 3.28541345e-02 6.83209134e-02 -6.71413200e-02 -6.55683463e-03 -2.24181193e-02 9.38411264e-02 2.98292939e-02 3.13330385e-02 -2.94990852e-02 3.96378479e-03 -1.71693717e-02 5.40513062e-03 1.32348605e-03 -1.48800929e-01 -1.50543956e-01 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -1.58871580e-01 1.55572686e-04 -3.58446805e-02 4.52011760e-02 -8.07112526e-05 4.53727988e-02 -4.13190929e-03 -4.44306539e-05 -2.73811250e-02 -5.69396668e-02 5.59565761e-02 -2.24181193e-02 -1.47723506e-02 -7.82085924e-02 3.13330385e-02 4.13118395e-02 2.45849770e-02 -1.71693717e-02 -2.32823488e-03 6.60558729e-03 9.32770566e-04 -6.07138617e-03 -1.38427655e-02 -7.02935424e-04 -2.42116850e-05 2.47447519e-02 1.91206163e-02 4.42274240e-05 -4.52011760e-02 -7.63060578e-03 -1.37801588e-05 1.40835555e-02 -1.38310503e-02 -2.70662122e-05 -2.86031694e-03 -3.48353885e-02 1.46400324e-02 -8.71069385e-03 7.25962199e-03 -4.48140672e-02 2.94990852e-02 -2.45849770e-02 3.80995650e-03 -1.27267510e-03 1.06066638e-03 -2.36284940e-05 1.28952679e-04 2.06280218e-05 4.70319070e-05 -4.08315227e-05 -1.46808232e-02 -5.52514609e-05 4.43023376e-05 3.71153887e-02 8.07112526e-05 -1.37801588e-05 -7.76985917e-03 -5.55388330e-05 3.92849961e-05 -7.82683976e-03 2.29724551e-03 2.79778225e-02 -1.39179997e-02 2.13371123e-03 -5.19566254e-03 4.47560132e-02 -3.96378479e-03 1.71693717e-02 -1.27267510e-03 2.86196970e-03 -8.01531681e-04 -9.93121063e-04 9.91210877e-04 -2.10821875e-02 -4.80674051e-02 4.17305074e-02 -5.52514609e-05 4.17870511e-02 -4.52777390e-02 8.07112526e-05 -4.53727988e-02 1.40835555e-02 -5.55388330e-05 4.89917140e-02 -2.44961278e-02 -5.55951839e-05 -1.91455862e-03 -2.33171340e-02 1.15994683e-02 -5.19566254e-03 2.29668885e-04 -3.73003279e-02 1.71693717e-02 2.32823488e-03 1.06066638e-03 -8.01531681e-04 2.56823425e-03 -7.68735185e-04 -1.11860753e-03 1.05494662e-02 2.40527917e-02 -2.82339372e-02 4.20237084e-05 -1.35638376e-02 4.12440938e-02 -7.67324619e-05 4.13190929e-03 -1.38310503e-02 3.92849961e-05 -2.44961278e-02 8.39198690e-03 3.16518569e-05 -1.40547260e-04 -1.71170485e-03 9.52021174e-04 1.26137781e-03 1.68700037e-03 -3.14600983e-03 -5.40513062e-03 -6.60558729e-03 -2.36284940e-05 -9.93121063e-04 -7.68735185e-04 1.62016098e-04 -1.18080328e-05 2.06444258e-05 4.70693080e-05 -5.52514609e-05 -1.46924978e-02 -4.09193626e-05 8.07112526e-05 3.71449038e-02 4.44306539e-05 -2.70662122e-05 -7.82683976e-03 -5.55951839e-05 3.16518569e-05 -7.78230244e-03 7.67037700e-04 9.34164179e-03 -5.19566254e-03 7.12434502e-04 -9.20132148e-05 1.71693717e-02 -1.32348605e-03 -9.32770566e-04 1.28952679e-04 9.91210877e-04 -1.11860753e-03 -1.18080328e-05 2.24294892e-04 1.21013339e-02 6.04567082e-02 -1.10570109e-02 -1.32919255e-02 -3.31565318e-02 2.74551701e-02 3.30045869e-02 8.23295040e-02 1.56592577e-03 -7.72878990e-04 -1.92793638e-03 2.42609122e-03 -2.31762337e-03 3.92374918e-02 1.43569413e-01 -7.04490824e-02 -6.89958744e-05 -7.03930517e-02 1.49282270e-01 1.46202908e-04 1.49163540e-01 -6.14498615e-03 -2.08146796e-05 -2.12361802e-02 1.06096349e-02 -2.07981249e-05 6.04567082e-02 1.53784404e-01 -3.73022976e-02 -4.48420795e-02 -1.11857972e-01 5.69216604e-02 6.84270350e-02 1.70690331e-01 1.89654568e-02 -9.36059892e-03 -2.33498898e-02 2.93832115e-02 -2.80695207e-02 1.43569413e-01 2.07048455e-01 -1.43676788e-01 -1.40713055e-04 -1.43562517e-01 1.50519643e-01 1.47414757e-04 1.50399929e-01 -1.38830541e-02 -4.70255451e-05 -4.79778198e-02 2.39698076e-02 -4.69881440e-05 1.10570109e-02 3.73022976e-02 4.97094572e-03 -1.12085857e-02 -2.79596682e-02 -1.49080059e-02 2.24647070e-02 5.60379136e-02 5.11613809e-03 -8.43793886e-05 -2.10483265e-04 5.46236648e-03 -5.21815012e-03 7.04490824e-02 1.43676788e-01 -6.96334486e-02 -1.10992647e-04 -1.13240266e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 6.53646142e-04 -4.11329686e-05 -4.19659177e-02 2.83467977e-02 -5.55683815e-05 1.32919255e-02 4.48420795e-02 -1.12085857e-02 8.20773533e-04 -3.36110574e-02 2.24647070e-02 -6.59006059e-03 6.73646595e-02 3.28237648e-03 -7.14510136e-04 -5.21815012e-03 8.22222006e-03 -2.14259336e-03 6.89958744e-05 1.40713055e-04 -1.10992647e-04 4.36968444e-02 -1.10904371e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -2.44393156e-05 1.47845630e-02 -5.55683815e-05 4.22417099e-05 1.47728043e-02 3.31565318e-02 1.11857972e-01 -2.79596682e-02 -3.36110574e-02 -6.95474254e-02 5.60379136e-02 6.73646595e-02 1.34444769e-01 8.18784456e-03 -5.21815012e-03 -1.16392431e-02 1.22496527e-02 -1.39918423e-02 7.03930517e-02 1.43562517e-01 -1.13240266e-01 -1.10904371e-04 -6.94532486e-02 1.75005510e-01 1.71395535e-04 9.00027746e-02 -2.49342156e-02 -5.55683815e-05 -4.19090325e-02 1.35513938e-02 -4.10445423e-05 -2.74551701e-02 -5.69216604e-02 -1.49080059e-02 2.24647070e-02 5.60379136e-02 4.15536843e-02 -3.13351132e-02 -7.81650239e-02 -1.80716772e-02 -9.69257016e-04 -2.41779876e-03 -1.80152326e-02 1.72097915e-02 -1.49282270e-01 -1.50519643e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -3.55489594e-02 -1.55719463e-04 -1.58872807e-01 -1.91751556e-02 4.43042779e-05 4.52014465e-02 -4.11852851e-02 8.07357378e-05 -3.30045869e-02 -6.84270350e-02 2.24647070e-02 -6.59006059e-03 6.73646595e-02 -3.13351132e-02 2.99513181e-02 -9.39642447e-02 -1.01052159e-02 1.31871761e-03 1.72097915e-02 -2.83649511e-02 3.95442340e-03 -1.46202908e-04 -1.47414757e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -1.55719463e-04 1.23450153e-01 -1.55595614e-04 4.44328321e-05 -3.72643260e-02 8.07357378e-05 -7.68314473e-05 -3.72346883e-02 -8.23295040e-02 -1.70690331e-01 5.60379136e-02 6.73646595e-02 1.34444769e-01 -7.81650239e-02 -9.39642447e-02 -1.66772474e-01 -2.52073270e-02 1.72097915e-02 3.73491828e-02 -3.72881489e-02 4.48984415e-02 -1.49163540e-01 -1.50399929e-01 1.75005510e-01 1.71395535e-04 9.00027746e-02 -1.58872807e-01 -1.55595614e-04 -3.52961440e-02 4.53326039e-02 8.07357378e-05 4.51062441e-02 -3.91776154e-03 4.41758025e-05 1.56592577e-03 1.89654568e-02 -5.11613809e-03 -3.28237648e-03 -8.18784456e-03 1.80716772e-02 1.01052159e-02 2.52073270e-02 1.06653020e-03 4.44978805e-05 1.10999372e-04 1.59350702e-03 -1.52226309e-03 -6.14498615e-03 -1.38830541e-02 -6.53646142e-04 2.44393156e-05 2.49342156e-02 1.91751556e-02 -4.44328321e-05 -4.53326039e-02 -7.71510376e-03 1.39644645e-05 1.42472471e-02 -1.39829968e-02 2.74109445e-05 -7.72878990e-04 -9.36059892e-03 8.43793886e-05 7.14510136e-04 5.21815012e-03 9.69257016e-04 -1.31871761e-03 -1.72097915e-02 4.44978805e-05 2.24906867e-04 1.12772791e-03 1.02575078e-04 1.00172648e-03 -2.08146796e-05 -4.70255451e-05 4.11329686e-05 -1.47845630e-02 5.55683815e-05 -4.43042779e-05 3.72643260e-02 -8.07357378e-05 1.39644645e-05 -7.87414572e-03 5.60042492e-05 -3.96375293e-05 -7.93332691e-03 -1.92793638e-03 -2.33498898e-02 2.10483265e-04 5.21815012e-03 1.16392431e-02 2.41779876e-03 -1.72097915e-02 -3.73491828e-02 1.10999372e-04 1.12772791e-03 2.58592101e-03 -1.33450608e-03 8.33983349e-04 -2.12361802e-02 -4.79778198e-02 4.19659177e-02 5.55683815e-05 4.19090325e-02 -4.52014465e-02 -8.07357378e-05 -4.51062441e-02 1.42472471e-02 5.60042492e-05 4.92641434e-02 -2.45734168e-02 5.59473429e-05 2.42609122e-03 2.93832115e-02 -5.46236648e-03 -8.22222006e-03 -1.22496527e-02 1.80152326e-02 2.83649511e-02 3.72881489e-02 1.59350702e-03 1.02575078e-04 -1.33450608e-03 2.95404629e-03 -6.48327192e-04 1.06096349e-02 2.39698076e-02 -2.83467977e-02 -4.22417099e-05 -1.35513938e-02 4.11852851e-02 7.68314473e-05 3.91776154e-03 -1.39829968e-02 -3.96375293e-05 -2.45734168e-02 8.37887676e-03 -3.18362629e-05 -2.31762337e-03 -2.80695207e-02 5.21815012e-03 2.14259336e-03 1.39918423e-02 -1.72097915e-02 -3.95442340e-03 -4.48984415e-02 -1.52226309e-03 1.00172648e-03 8.33983349e-04 -6.48327192e-04 2.89471773e-03 -2.07981249e-05 -4.69881440e-05 5.55683815e-05 -1.47728043e-02 4.10445423e-05 -8.07357378e-05 3.72346883e-02 -4.41758025e-05 2.74109445e-05 -7.93332691e-03 5.59473429e-05 -3.18362629e-05 -7.86152136e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 0 676 + 3.90200104e-02 1.43040610e-01 -7.00758462e-02 7.01395746e-02 -6.06185730e-05 1.48644876e-01 -1.48780057e-01 1.28584109e-04 -6.06660721e-03 2.10728168e-02 -1.82123158e-05 -1.05459825e-02 1.82288785e-05 5.94583619e-04 4.74240544e-03 -1.67332813e-03 1.78589267e-03 5.56785059e-04 5.13266744e-03 -5.47794125e-03 -1.70784946e-03 4.15565990e-05 -2.04793963e-04 -6.38483042e-05 9.86627339e-05 6.81433705e-05 1.43040610e-01 2.06856968e-01 -1.43350536e-01 1.43480902e-01 -1.24004281e-04 1.50417204e-01 -1.50553997e-01 1.30117248e-04 -1.38395888e-02 4.80728535e-02 -4.15472691e-05 -2.40582680e-02 4.15850530e-05 4.74240544e-03 3.41609486e-02 -1.22873736e-02 1.31139435e-02 4.08851433e-03 3.57036384e-02 -3.81054171e-02 -1.18800683e-02 -1.13147162e-04 5.57597500e-04 1.73841329e-04 -2.68631423e-04 -1.85535611e-04 7.00758462e-02 1.43350536e-01 -6.92992616e-02 1.12874473e-01 -9.75524806e-05 9.00472379e-02 -1.74722617e-01 1.51005132e-04 7.06744227e-04 4.17155764e-02 -3.60529520e-05 -2.82273075e-02 4.87912961e-05 1.67332813e-03 1.22873736e-02 -3.98225369e-03 5.11582442e-03 1.59495284e-03 1.16156890e-02 -1.51268223e-02 -4.71606651e-03 -1.23664884e-04 3.19928813e-06 9.97437223e-07 6.58815545e-05 4.55023999e-05 -7.01395746e-02 -1.43480902e-01 1.12874473e-01 -6.95044687e-02 9.76411967e-05 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 2.47326054e-02 -4.17802159e-02 4.87912961e-05 1.35651915e-02 -3.61416551e-05 -1.78589267e-03 -1.31139435e-02 5.11582442e-03 -4.64884411e-03 -1.70224509e-03 -1.51268223e-02 1.35867094e-02 5.03331563e-03 -1.10415751e-04 1.48208680e-05 4.55023999e-05 6.96360506e-05 -4.93151208e-06 6.06185730e-05 1.24004281e-04 -9.75524806e-05 9.76411967e-05 4.34725702e-02 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -2.13753113e-05 4.87912961e-05 1.46743990e-02 -3.71118284e-05 -1.46877442e-02 -5.56785059e-04 -4.08851433e-03 1.59495284e-03 -1.70224509e-03 2.80414708e-04 -4.71606651e-03 5.03331563e-03 -9.88462800e-04 -3.44241519e-05 4.55023999e-05 -1.16942241e-04 -6.55533294e-05 1.24808929e-04 -1.48644876e-01 -1.50417204e-01 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -3.55920291e-02 1.58871492e-01 -1.37305696e-04 -1.91183423e-02 -4.52813592e-02 3.91347024e-05 4.12480311e-02 -7.12977992e-05 -5.13266744e-03 -3.57036384e-02 1.16156890e-02 -1.51268223e-02 -4.71606651e-03 -3.27473001e-02 4.34737815e-02 1.35537551e-02 5.31229886e-04 -1.17538048e-03 -3.66446596e-04 4.05821645e-04 2.80288754e-04 1.48780057e-01 1.50553997e-01 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 1.58871492e-01 -3.58808593e-02 1.37430565e-04 -4.51923078e-02 4.53900595e-02 -7.12977992e-05 -4.14573359e-03 3.92643227e-05 5.47794125e-03 3.81054171e-02 -1.51268223e-02 1.35867094e-02 5.03331563e-03 4.34737815e-02 -3.84119210e-02 -1.44655143e-02 9.83779365e-06 1.21105606e-03 2.80288754e-04 -7.66138830e-04 -4.02968138e-04 -1.28584109e-04 -1.30117248e-04 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -1.37305696e-04 1.37430565e-04 1.23134994e-01 3.90577392e-05 -7.12977992e-05 -3.71060027e-02 6.77796089e-05 3.71397476e-02 1.70784946e-03 1.18800683e-02 -4.71606651e-03 5.03331563e-03 -9.88462800e-04 1.35537551e-02 -1.44655143e-02 3.47644401e-03 3.06711406e-06 2.80288754e-04 3.99412771e-04 -3.12091447e-05 -4.26281211e-04 -6.06660721e-03 -1.38395888e-02 -7.06744227e-04 -2.47326054e-02 2.13753113e-05 1.91183423e-02 4.51923078e-02 -3.90577392e-05 -7.62586988e-03 -1.40726582e-02 1.21623842e-05 1.38215649e-02 -2.38907685e-05 4.15565990e-05 -1.13147162e-04 1.23664884e-04 1.10415751e-04 3.44241519e-05 -5.31229886e-04 -9.83779365e-06 -3.06711406e-06 9.89028240e-05 1.83897895e-04 5.73335687e-05 -1.63404529e-04 -1.12858573e-04 2.10728168e-02 4.80728535e-02 -4.17155764e-02 4.17802159e-02 -4.87912961e-05 4.52813592e-02 -4.53900595e-02 7.12977992e-05 -1.40726582e-02 4.89750822e-02 -4.90366322e-05 -2.44919408e-02 4.90935259e-05 -2.04793963e-04 5.57597500e-04 -3.19928813e-06 -1.48208680e-05 -4.55023999e-05 1.17538048e-03 -1.21105606e-03 -2.80288754e-04 1.83897895e-04 -9.81929976e-04 -3.32238599e-04 4.69842767e-04 3.58475166e-04 -1.82123158e-05 -4.15472691e-05 3.60529520e-05 -4.87912961e-05 -1.46743990e-02 -3.91347024e-05 7.12977992e-05 3.71060027e-02 1.21623842e-05 -4.90366322e-05 -7.76340215e-03 3.46850220e-05 7.82037819e-03 -6.38483042e-05 1.73841329e-04 -9.97437223e-07 -4.55023999e-05 1.16942241e-04 3.66446596e-04 -2.80288754e-04 -3.99412771e-04 5.73335687e-05 -3.32238599e-04 -1.98534516e-05 2.02383007e-04 3.08241206e-05 -1.05459825e-02 -2.40582680e-02 2.82273075e-02 -1.35651915e-02 3.71118284e-05 -4.12480311e-02 4.14573359e-03 -6.77796089e-05 1.38215649e-02 -2.44919408e-02 3.46850220e-05 8.39319630e-03 -2.79515653e-05 9.86627339e-05 -2.68631423e-04 -6.58815545e-05 -6.96360506e-05 6.55533294e-05 -4.05821645e-04 7.66138830e-04 3.12091447e-05 -1.63404529e-04 4.69842767e-04 2.02383007e-04 -1.64835224e-04 -1.86166643e-04 1.82288785e-05 4.15850530e-05 -4.87912961e-05 3.61416551e-05 1.46877442e-02 7.12977992e-05 -3.92643227e-05 -3.71397476e-02 -2.38907685e-05 4.90935259e-05 7.82037819e-03 -2.79515653e-05 -7.77761969e-03 6.81433705e-05 -1.85535611e-04 -4.55023999e-05 4.93151208e-06 -1.24808929e-04 -2.80288754e-04 4.02968138e-04 4.26281211e-04 -1.12858573e-04 3.58475166e-04 3.08241206e-05 -1.86166643e-04 -2.38698255e-05 3.08689243e-01 3.37803817e-01 -2.74649246e-01 2.19212078e-01 -2.74212338e-01 2.40318287e-01 -1.91810726e-01 2.39935993e-01 -1.56639160e-02 1.18287935e-01 -1.47966351e-01 2.66595580e-02 1.18099765e-01 3.92500494e-02 1.43599898e-01 -7.04711972e-02 7.04071004e-02 6.09690816e-05 1.49320233e-01 -1.49184420e-01 -1.29186361e-04 -6.14982268e-03 2.12456198e-02 1.83976605e-05 -1.06131400e-02 -1.83809269e-05 3.37803817e-01 3.00707410e-01 -1.95476874e-02 1.56020424e-02 -1.95165912e-02 9.93563702e-02 -7.93015699e-02 9.91983156e-02 1.42548524e-02 -1.07647223e-01 1.34655887e-01 -2.42613702e-02 -1.07475979e-01 1.43599898e-01 2.07059446e-01 -1.43696713e-01 1.43566014e-01 1.24321098e-04 1.50526721e-01 -1.50389810e-01 -1.30230169e-04 -1.38862174e-02 4.79723254e-02 4.15416713e-05 -2.39643282e-02 -4.15038872e-05 2.74649246e-01 1.95476874e-02 5.15296470e-02 1.88058412e-01 -2.35242224e-01 -2.11110311e-01 -4.59525878e-02 5.74820816e-02 1.40621697e-01 3.10391428e-02 -3.88268566e-02 3.18145608e-02 1.40936025e-01 7.04711972e-02 1.43696713e-01 -6.96545637e-02 1.13261353e-01 9.80787537e-05 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 6.49774041e-04 4.19809586e-02 3.63534427e-05 -2.83534715e-02 -4.91054568e-05 -2.19212078e-01 -1.56020424e-02 1.88058412e-01 1.37047330e-01 1.87759251e-01 -4.59525878e-02 -2.32006791e-01 -4.58794871e-02 7.84983186e-02 2.53026434e-02 1.40936025e-01 -1.35514321e-01 2.52623923e-02 -7.04071004e-02 -1.43566014e-01 1.13261353e-01 -6.94484370e-02 -9.79895466e-05 -1.75021767e-01 8.99790234e-02 1.51422380e-04 2.49464601e-02 -4.19158809e-02 -4.91054568e-05 1.35500312e-02 3.62640747e-05 2.74212338e-01 1.95165912e-02 -2.35242224e-01 1.87759251e-01 5.22786829e-02 5.74820816e-02 -4.58794871e-02 -2.11293340e-01 -9.81935287e-02 1.40936025e-01 -3.83264782e-02 -1.05986932e-01 3.05903877e-02 -6.09690816e-05 -1.24321098e-04 9.80787537e-05 -9.79895466e-05 4.37098145e-02 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 2.16024059e-05 -4.91054568e-05 1.47910621e-02 3.73270966e-05 -1.47776090e-02 -2.40318287e-01 -9.93563702e-02 -2.11110311e-01 -4.59525878e-02 5.74820816e-02 1.67910797e-01 9.01103808e-02 -1.12719055e-01 -2.27570528e-02 8.98737795e-02 -1.12423090e-01 1.83940388e-02 8.14841588e-02 -1.49320233e-01 -1.50526721e-01 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -3.55490351e-02 1.58872868e-01 1.37576080e-04 -1.91774349e-02 -4.51977880e-02 -3.91390585e-05 4.11813359e-02 7.13220712e-05 1.91810726e-01 7.93015699e-02 -4.59525878e-02 -2.32006791e-01 -4.58794871e-02 9.01103808e-02 2.08887592e-01 8.99670346e-02 3.85722994e-03 -7.54890702e-02 8.14841588e-02 -6.42146411e-03 -7.53689833e-02 1.49184420e-01 1.50389810e-01 -1.75021767e-01 8.99790234e-02 1.51422380e-04 1.58872868e-01 -3.52598991e-02 -1.37450948e-04 -4.53414527e-02 4.50889048e-02 7.13220712e-05 -3.90395303e-03 -3.90092580e-05 -2.39935993e-01 -9.91983156e-02 5.74820816e-02 -4.58794871e-02 -2.11293340e-01 -1.12719055e-01 8.99670346e-02 1.68269706e-01 -4.82500804e-03 8.14841588e-02 -1.12277148e-01 2.86969477e-02 8.96143254e-02 1.29186361e-04 1.30230169e-04 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 1.37576080e-04 -1.37450948e-04 1.23468348e-01 -3.92634651e-05 7.13220712e-05 -3.72737671e-02 -6.78765160e-05 3.72398649e-02 -1.56639160e-02 1.42548524e-02 -1.40621697e-01 -7.84983186e-02 9.81935287e-02 2.27570528e-02 -3.85722994e-03 4.82500804e-03 -1.68081601e-01 4.33360226e-02 -5.42090208e-02 -3.28746487e-02 -1.45632132e-01 -6.14982268e-03 -1.38862174e-02 -6.49774041e-04 -2.49464601e-02 -2.16024059e-05 1.91774349e-02 4.53414527e-02 3.92634651e-05 -7.71985221e-03 -1.42582602e-02 -1.23469512e-05 1.39925551e-02 2.42337454e-05 1.18287935e-01 -1.07647223e-01 -3.10391428e-02 -2.53026434e-02 -1.40936025e-01 -8.98737795e-02 7.54890702e-02 -8.14841588e-02 4.33360226e-02 1.12750160e-02 -7.73215580e-02 1.42815911e-01 1.21200158e-02 2.12456198e-02 4.79723254e-02 -4.19809586e-02 4.19158809e-02 4.91054568e-05 4.51977880e-02 -4.50889048e-02 -7.13220712e-05 -1.42582602e-02 4.92807889e-02 4.94990683e-05 -2.45775648e-02 -4.94415450e-05 -1.47966351e-01 1.34655887e-01 3.88268566e-02 -1.40936025e-01 3.83264782e-02 1.12423090e-01 -8.14841588e-02 1.12277148e-01 -5.42090208e-02 -7.73215580e-02 4.61837826e-02 9.46351393e-02 -7.68512943e-02 1.83976605e-05 4.15416713e-05 -3.63534427e-05 4.91054568e-05 -1.47910621e-02 3.91390585e-05 -7.13220712e-05 3.72737671e-02 -1.23469512e-05 4.94990683e-05 -7.88069639e-03 -3.50341232e-05 7.93987295e-03 2.66595580e-02 -2.42613702e-02 -3.18145608e-02 1.35514321e-01 1.05986932e-01 -1.83940388e-02 6.42146411e-03 -2.86969477e-02 -3.28746487e-02 1.42815911e-01 9.46351393e-02 -1.29720243e-01 3.35277076e-02 -1.06131400e-02 -2.39643282e-02 2.83534715e-02 -1.35500312e-02 -3.73270966e-05 -4.11813359e-02 3.90395303e-03 6.78765160e-05 1.39925551e-02 -2.45775648e-02 -3.50341232e-05 8.37764785e-03 2.81329305e-05 1.18099765e-01 -1.07475979e-01 -1.40936025e-01 -2.52623923e-02 -3.05903877e-02 -8.14841588e-02 7.53689833e-02 -8.96143254e-02 -1.45632132e-01 1.21200158e-02 -7.68512943e-02 3.35277076e-02 1.12364246e-02 -1.83809269e-05 -4.15038872e-05 4.91054568e-05 -3.62640747e-05 1.47776090e-02 -7.13220712e-05 3.90092580e-05 -3.72398649e-02 2.42337454e-05 -4.94415450e-05 7.93987295e-03 2.81329305e-05 -7.86624645e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 1 507 + 1.69812269e-04 1.56257026e-03 -3.24737940e-04 6.49748532e-04 3.24434356e-04 1.06336506e-03 -2.12762291e-03 -1.06237096e-03 -4.51611142e-05 -1.04287103e-04 -5.20729446e-05 7.83187515e-05 1.04189610e-04 1.56257026e-03 1.39281933e-02 -2.88844641e-03 5.77931796e-03 2.88574612e-03 9.32883121e-03 -1.86654949e-02 -9.32011008e-03 -2.87377701e-04 -6.63619325e-04 -3.31360362e-04 4.98372620e-04 6.62998935e-04 3.24737940e-04 2.88844641e-03 -4.12926346e-04 1.28212806e-03 6.40195973e-04 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -1.33361885e-04 -8.10521596e-05 -4.04712038e-05 1.33922102e-04 1.78160290e-04 -6.49748532e-04 -5.77931796e-03 1.28212806e-03 -2.33746393e-03 -1.28092946e-03 -4.14642043e-03 7.53176319e-03 4.14254411e-03 9.83507742e-05 3.08186714e-04 1.78160290e-04 -1.70681803e-04 -3.07898603e-04 -3.24434356e-04 -2.88574612e-03 6.40195973e-04 -1.28092946e-03 -4.11728801e-04 -2.07040290e-03 4.14254411e-03 1.30390836e-03 4.91087991e-05 1.78160290e-04 4.03425113e-05 -1.82368464e-04 -8.07188943e-05 -1.06336506e-03 -9.32883121e-03 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -4.10007140e-03 1.33325342e-02 6.65724034e-03 3.95514409e-04 1.78547270e-04 8.91527502e-05 -3.70647471e-04 -4.93082622e-04 2.12762291e-03 1.86654949e-02 -4.14642043e-03 7.53176319e-03 4.14254411e-03 1.33325342e-02 -2.41128640e-02 -1.33200701e-02 -2.45770524e-04 -8.30070130e-04 -4.93082622e-04 4.26609392e-04 8.29294132e-04 1.06237096e-03 9.32011008e-03 -2.07040290e-03 4.14254411e-03 1.30390836e-03 6.65724034e-03 -1.33200701e-02 -4.08761842e-03 -1.22718864e-04 -4.93082622e-04 -8.87751887e-05 5.27586074e-04 1.77624913e-04 -4.51611142e-05 -2.87377701e-04 1.33361885e-04 -9.83507742e-05 -4.91087991e-05 -3.95514409e-04 2.45770524e-04 1.22718864e-04 -2.47895715e-05 -2.98834622e-05 -1.49214986e-05 3.43621849e-05 4.57129687e-05 -1.04287103e-04 -6.63619325e-04 8.10521596e-05 -3.08186714e-04 -1.78160290e-04 -1.78547270e-04 8.30070130e-04 4.93082622e-04 -2.98834622e-05 -9.99557848e-05 -4.97128759e-05 7.01632737e-05 8.57249345e-05 -5.20729446e-05 -3.31360362e-04 4.04712038e-05 -1.78160290e-04 -4.03425113e-05 -8.91527502e-05 4.93082622e-04 8.87751887e-05 -1.49214986e-05 -4.97128759e-05 -2.52179989e-05 2.58826758e-05 4.96835272e-05 7.83187515e-05 4.98372620e-04 -1.33922102e-04 1.70681803e-04 1.82368464e-04 3.70647471e-04 -4.26609392e-04 -5.27586074e-04 3.43621849e-05 7.01632737e-05 2.58826758e-05 -6.45321359e-05 -6.09423818e-05 1.04189610e-04 6.62998935e-04 -1.78160290e-04 3.07898603e-04 8.07188943e-05 4.93082622e-04 -8.29294132e-04 -1.77624913e-04 4.57129687e-05 8.57249345e-05 4.96835272e-05 -6.09423818e-05 -9.97954284e-05 2.08444768e-02 9.19397241e-02 -1.89220801e-02 5.29521578e-02 1.89574665e-02 4.42419337e-02 -1.23808051e-01 -4.43246710e-02 3.41776797e-03 4.84743064e-03 1.73543454e-03 -5.91326293e-03 -4.85649586e-03 1.70876587e-04 1.57135665e-03 -3.26693848e-04 6.53113366e-04 3.26999304e-04 1.06946317e-03 -2.13802828e-03 -1.07046310e-03 -4.52529589e-05 -1.04515170e-04 -5.23284157e-05 7.82826168e-05 1.04612890e-04 9.19397241e-02 1.80049656e-01 -5.20587081e-02 1.45682764e-01 5.21560635e-02 6.61417847e-02 -1.85093298e-01 -6.62654770e-02 2.11223239e-02 2.99578558e-02 1.07252484e-02 -3.65448608e-02 -3.00138802e-02 1.57135665e-03 1.39943214e-02 -2.90348621e-03 5.80453430e-03 2.90620094e-03 9.37356333e-03 -1.87392555e-02 -9.38232751e-03 -2.86815690e-04 -6.62422772e-04 -3.31660316e-04 4.96159440e-04 6.63042130e-04 1.89220801e-02 5.20587081e-02 8.45214231e-03 4.37221853e-02 1.56530328e-02 -2.39454193e-02 -7.89400195e-02 -2.82614125e-02 9.40620523e-03 -3.01643097e-04 -1.07991613e-04 -1.01303122e-02 -8.31991062e-03 3.26693848e-04 2.90348621e-03 -4.15113506e-04 1.28841356e-03 6.45079952e-04 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -1.33613851e-04 -8.08065612e-05 -4.04580439e-05 1.33623619e-04 1.78567779e-04 -5.29521578e-02 -1.45682764e-01 4.37221853e-02 -9.82776132e-02 -4.38039506e-02 -7.89400195e-02 1.68754212e-01 7.90876459e-02 -1.14165572e-02 -2.01639438e-02 -8.31991062e-03 1.97429678e-02 2.02016526e-02 -6.53113366e-04 -5.80453430e-03 1.28841356e-03 -2.34638136e-03 -1.28961822e-03 -4.16522749e-03 7.55756377e-03 4.16912193e-03 9.80770187e-05 3.07834441e-04 1.78567779e-04 -1.69540617e-04 -3.08122263e-04 -1.89574665e-02 -5.21560635e-02 1.56530328e-02 -4.38039506e-02 8.39365120e-03 -2.82614125e-02 7.90876459e-02 -2.38398141e-02 -4.08725553e-03 -8.31991062e-03 9.66805138e-05 1.32303099e-02 -2.70553860e-04 -3.26999304e-04 -2.90620094e-03 6.45079952e-04 -1.28961822e-03 -4.16319228e-04 -2.08543656e-03 4.16912193e-03 1.31799284e-03 4.91049770e-05 1.78567779e-04 4.05872025e-05 -1.82611904e-04 -8.11403231e-05 -4.42419337e-02 -6.61417847e-02 -2.39454193e-02 -7.89400195e-02 -2.82614125e-02 5.89867991e-02 8.88351937e-02 3.18039959e-02 -2.67022713e-02 8.48951089e-03 3.03934013e-03 2.53202627e-02 2.07952449e-02 -1.06946317e-03 -9.37356333e-03 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -4.11750559e-03 1.33872685e-02 6.70270695e-03 3.95744275e-04 1.76844079e-04 8.85418883e-05 -3.69020309e-04 -4.93139890e-04 1.23808051e-01 1.85093298e-01 -7.89400195e-02 1.68754212e-01 7.90876459e-02 8.88351937e-02 -1.57867835e-01 -8.90013252e-02 2.40690426e-02 4.76346262e-02 2.07952449e-02 -4.16110986e-02 -4.77237082e-02 2.13802828e-03 1.87392555e-02 -4.16522749e-03 7.55756377e-03 4.16912193e-03 1.33872685e-02 -2.41843553e-02 -1.33997855e-02 -2.44113689e-04 -8.26960857e-04 -4.93139890e-04 4.21895582e-04 8.27734056e-04 4.43246710e-02 6.62654770e-02 -2.82614125e-02 7.90876459e-02 -2.38398141e-02 3.18039959e-02 -8.90013252e-02 5.88679562e-02 8.61698726e-03 2.07952449e-02 -3.00589909e-03 -3.58379885e-02 8.41180473e-03 1.07046310e-03 9.38232751e-03 -2.08543656e-03 4.16912193e-03 1.31799284e-03 6.70270695e-03 -1.33997855e-02 -4.13003365e-03 -1.22222283e-04 -4.93139890e-04 -8.89202386e-05 5.27496964e-04 1.77765809e-04 3.41776797e-03 2.11223239e-02 -9.40620523e-03 1.14165572e-02 4.08725553e-03 2.67022713e-02 -2.40690426e-02 -8.61698726e-03 2.54200794e-03 4.64465649e-03 1.66283912e-03 -5.55623569e-03 -4.56327344e-03 -4.52529589e-05 -2.86815690e-04 1.33613851e-04 -9.80770187e-05 -4.91049770e-05 -3.95744275e-04 2.44113689e-04 1.22222283e-04 -2.48654934e-05 -3.04987563e-05 -1.52700474e-05 3.45954558e-05 4.62316000e-05 4.84743064e-03 2.99578558e-02 3.01643097e-04 2.01639438e-02 8.31991062e-03 -8.48951089e-03 -4.76346262e-02 -2.07952449e-02 4.64465649e-03 5.74892077e-03 2.29119207e-03 -7.93221648e-03 -6.53868565e-03 -1.04515170e-04 -6.62422772e-04 8.08065612e-05 -3.07834441e-04 -1.78567779e-04 -1.76844079e-04 8.26960857e-04 4.93139890e-04 -3.04987563e-05 -1.00963008e-04 -5.03818370e-05 7.08650300e-05 8.71305384e-05 1.73543454e-03 1.07252484e-02 1.07991613e-04 8.31991062e-03 -9.66805138e-05 -3.03934013e-03 -2.07952449e-02 3.00589909e-03 1.66283912e-03 2.29119207e-03 1.69415907e-04 -2.87698715e-03 -2.29567116e-03 -5.23284157e-05 -3.31660316e-04 4.04580439e-05 -1.78567779e-04 -4.05872025e-05 -8.85418883e-05 4.93139890e-04 8.89202386e-05 -1.52700474e-05 -5.03818370e-05 -2.55607884e-05 2.64098346e-05 5.04119965e-05 -5.91326293e-03 -3.65448608e-02 1.01303122e-02 -1.97429678e-02 -1.32303099e-02 -2.53202627e-02 4.16110986e-02 3.58379885e-02 -5.55623569e-03 -7.93221648e-03 -2.87698715e-03 8.94345836e-03 7.99905199e-03 7.82826168e-05 4.96159440e-04 -1.33623619e-04 1.69540617e-04 1.82611904e-04 3.69020309e-04 -4.21895582e-04 -5.27496964e-04 3.45954558e-05 7.08650300e-05 2.64098346e-05 -6.47470438e-05 -6.18643903e-05 -4.85649586e-03 -3.00138802e-02 8.31991062e-03 -2.02016526e-02 2.70553860e-04 -2.07952449e-02 4.77237082e-02 -8.41180473e-03 -4.56327344e-03 -6.53868565e-03 -2.29567116e-03 7.99905199e-03 5.77335405e-03 1.04612890e-04 6.63042130e-04 -1.78567779e-04 3.08122263e-04 8.11403231e-05 4.93139890e-04 -8.27734056e-04 -1.77765809e-04 4.62316000e-05 8.71305384e-05 5.04119965e-05 -6.18643903e-05 -1.01125864e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +0 1 2 169 + 4.81760248e-06 5.28686911e-05 -4.87919842e-06 2.34138655e-05 1.46480828e-05 1.69359590e-05 -8.12707812e-05 -5.08442797e-05 -7.64340014e-06 -4.22955057e-06 -2.64607340e-06 6.17624259e-06 1.26977428e-05 5.28686911e-05 5.79626318e-04 -5.36890443e-05 2.57638234e-04 1.61182534e-04 1.86106503e-04 -8.93071416e-04 -5.58719533e-04 -8.45699515e-05 -4.67976136e-05 -2.92773236e-05 6.83366731e-05 1.40493429e-04 4.87919842e-06 5.36890443e-05 -1.45584224e-06 2.40714796e-05 1.50594965e-05 5.36683805e-06 -8.38397355e-05 -5.24514580e-05 -8.73770683e-06 -1.12081376e-06 -7.01198730e-07 6.42315983e-06 1.32053802e-05 -2.34138655e-05 -2.57638234e-04 2.40714796e-05 -1.11951690e-04 -7.22661788e-05 -8.38397355e-05 3.90218239e-04 2.51699414e-04 3.62523694e-05 2.04247491e-05 1.32053802e-05 -2.75450628e-05 -6.13181490e-05 -1.46480828e-05 -1.61182534e-04 1.50594965e-05 -7.22661788e-05 -4.16504629e-05 -5.24514580e-05 2.51699414e-04 1.45362651e-04 2.26800528e-05 1.32053802e-05 7.57842947e-06 -2.13339465e-05 -3.63666966e-05 -1.69359590e-05 -1.86106503e-04 5.36683805e-06 -8.38397355e-05 -5.24514580e-05 -1.96752888e-05 2.91445484e-04 1.82332881e-04 3.05920293e-05 4.23569094e-06 2.64991491e-06 -2.25419108e-05 -4.63439352e-05 8.12707812e-05 8.93071416e-04 -8.38397355e-05 3.90218239e-04 2.51699414e-04 2.91445484e-04 -1.35750397e-03 -8.74962893e-04 -1.27401228e-04 -7.17431012e-05 -4.63439352e-05 9.69708992e-05 2.15383510e-04 5.08442797e-05 5.58719533e-04 -5.24514580e-05 2.51699414e-04 1.45362651e-04 1.82332881e-04 -8.74962893e-04 -5.06331732e-04 -7.97042132e-05 -4.63439352e-05 -2.66592796e-05 7.46818487e-05 1.27930191e-04 -7.64340014e-06 -8.45699515e-05 8.73770683e-06 -3.62523694e-05 -2.26800528e-05 -3.05920293e-05 1.27401228e-04 7.97042132e-05 1.11343571e-05 7.36172368e-06 4.60561019e-06 -9.14692552e-06 -1.88051726e-05 -4.22955057e-06 -4.67976136e-05 1.12081376e-06 -2.04247491e-05 -1.32053802e-05 -4.23569094e-06 7.17431012e-05 4.63439352e-05 7.36172368e-06 7.76307411e-07 5.19030891e-07 -5.01910939e-06 -1.12253451e-05 -2.64607340e-06 -2.92773236e-05 7.01198730e-07 -1.32053802e-05 -7.57842947e-06 -2.64991491e-06 4.63439352e-05 2.66592796e-05 4.60561019e-06 5.19030891e-07 2.71389217e-07 -3.93309825e-06 -6.63700227e-06 6.17624259e-06 6.83366731e-05 -6.42315983e-06 2.75450628e-05 2.13339465e-05 2.25419108e-05 -9.69708992e-05 -7.46818487e-05 -9.14692552e-06 -5.01910939e-06 -3.93309825e-06 4.10151154e-06 1.69709601e-05 1.26977428e-05 1.40493429e-04 -1.32053802e-05 6.13181490e-05 3.63666966e-05 4.63439352e-05 -2.15383510e-04 -1.27930191e-04 -1.88051726e-05 -1.12253451e-05 -6.63700227e-06 1.69709601e-05 3.07373682e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +0 2 -2 676 + 8.15758664e-06 8.95995828e-05 -3.27062093e-05 1.60140991e-08 -3.27192142e-05 1.14303917e-04 -5.59671786e-08 1.14349367e-04 6.47786822e-06 -1.09961516e-08 2.24667923e-05 -1.12378601e-05 -1.10005239e-08 8.22130806e-07 8.60394759e-06 -4.42386549e-06 1.06343094e-06 -2.65577596e-06 1.44010598e-05 -3.46179888e-06 8.64537781e-06 2.03146849e-06 -1.06942685e-06 2.67074993e-06 -6.73127594e-07 -6.42008243e-07 8.95995828e-05 9.84805909e-04 -3.59497797e-04 1.76022642e-07 -3.59640743e-04 1.25713505e-03 -6.15537104e-07 1.25763492e-03 7.14535282e-05 -1.21292036e-07 2.47817881e-04 -1.23958180e-04 -1.21340265e-07 8.60394759e-06 8.99268630e-05 -4.64049445e-05 1.11550530e-05 -2.78582467e-05 1.50782072e-04 -3.62457495e-05 9.05188918e-05 2.13607873e-05 -1.12449686e-05 2.80827989e-05 -7.07790223e-06 -6.75068385e-06 3.27062093e-05 3.59497797e-04 -1.26810205e-04 6.54713024e-08 -1.33767722e-04 4.44439428e-04 -2.29262375e-07 4.68417529e-04 2.09343890e-05 -4.30569530e-08 8.79718337e-05 -4.65627599e-05 -4.55793850e-08 4.42386549e-06 4.64049445e-05 -2.36011317e-05 5.76106408e-06 -1.43874839e-05 7.70924782e-05 -1.88114453e-05 4.69790583e-05 1.06498610e-05 -5.74489609e-06 1.43471065e-05 -3.67301932e-06 -3.50321202e-06 -1.60140991e-08 -1.76022642e-07 6.54713024e-08 6.90431656e-06 6.54973356e-08 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 -1.45878080e-08 -5.11463775e-06 -4.55793850e-08 2.53030645e-08 -5.11667146e-06 -1.06343094e-06 -1.11550530e-05 5.76106408e-06 -1.02001774e-06 3.45853542e-06 -1.88114453e-05 3.35898305e-06 -1.12930613e-05 -2.71697021e-06 1.02591683e-06 -3.50321202e-06 9.73526929e-07 6.15887908e-07 3.27192142e-05 3.59640743e-04 -1.33767722e-04 6.54973356e-08 -1.26916563e-04 4.68417529e-04 -2.29353536e-07 4.44811865e-04 2.98050867e-05 -4.55793850e-08 8.80108820e-05 -4.14645807e-05 -4.30931929e-08 2.65577596e-06 2.78582467e-05 -1.43874839e-05 3.45853542e-06 -8.27237205e-06 4.69790583e-05 -1.12930613e-05 2.70398976e-05 6.78526821e-06 -3.50321202e-06 8.37195547e-06 -1.97878928e-06 -2.01249258e-06 -1.14303917e-04 -1.25713505e-03 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -1.55776448e-03 8.02824710e-07 -1.64029168e-03 -7.41986551e-05 1.52016335e-07 -3.10592247e-04 1.64227548e-04 1.60759170e-07 -1.44010598e-05 -1.50782072e-04 7.70924782e-05 -1.88114453e-05 4.69790583e-05 -2.51149095e-04 6.12624106e-05 -1.52994643e-04 -3.49208736e-05 1.88255688e-05 -4.70143300e-05 1.20313977e-05 1.14751743e-05 5.59671786e-08 6.15537104e-07 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 8.02824710e-07 8.18748505e-05 8.03143934e-07 5.13626078e-08 1.77252502e-05 1.60759170e-07 -8.90904652e-08 1.77322982e-05 3.46179888e-06 3.62457495e-05 -1.88114453e-05 3.35898305e-06 -1.12930613e-05 6.12624106e-05 -1.10244480e-05 3.67776185e-05 8.89541849e-06 -3.39170953e-06 1.14751743e-05 -3.18139934e-06 -2.03614252e-06 -1.14349367e-04 -1.25763492e-03 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -1.64029168e-03 8.03143934e-07 -1.55906866e-03 -1.04941536e-04 1.60759170e-07 -3.10729845e-04 1.46560472e-04 1.52144154e-07 -8.64537781e-06 -9.05188918e-05 4.69790583e-05 -1.12930613e-05 2.70398976e-05 -1.52994643e-04 3.67776185e-05 -8.81450461e-05 -2.22151131e-05 1.14751743e-05 -2.74545049e-05 6.50048290e-06 6.59965138e-06 6.47786822e-06 7.14535282e-05 -2.09343890e-05 1.45878080e-08 -2.98050867e-05 7.41986551e-05 -5.13626078e-08 1.04941536e-04 -8.22186744e-07 -8.01799705e-09 1.63819744e-05 -1.14964989e-05 -1.12537004e-08 2.03146849e-06 2.13607873e-05 -1.06498610e-05 2.71697021e-06 -6.78526821e-06 3.49208736e-05 -8.89541849e-06 2.22151131e-05 4.59449937e-06 -2.66559661e-06 6.65696956e-06 -1.78050867e-06 -1.69819400e-06 -1.09961516e-08 -1.21292036e-07 4.30569530e-08 5.11463775e-06 4.55793850e-08 -1.52016335e-07 -1.77252502e-05 -1.60759170e-07 -8.01799705e-09 -3.63904034e-06 -2.96775921e-08 1.76437621e-08 -3.81158746e-06 -1.06942685e-06 -1.12449686e-05 5.74489609e-06 -1.02591683e-06 3.50321202e-06 -1.88255688e-05 3.39170953e-06 -1.14751743e-05 -2.66559661e-06 1.02215095e-06 -3.51938298e-06 9.95477457e-07 6.24328517e-07 2.24667923e-05 2.47817881e-04 -8.79718337e-05 4.55793850e-08 -8.80108820e-05 3.10592247e-04 -1.60759170e-07 3.10729845e-04 1.63819744e-05 -2.96775921e-08 5.69967315e-05 -2.84256551e-05 -2.96908766e-08 2.67074993e-06 2.80827989e-05 -1.43471065e-05 3.50321202e-06 -8.37195547e-06 4.70143300e-05 -1.14751743e-05 2.74545049e-05 6.65696956e-06 -3.51938298e-06 8.40209917e-06 -2.01552393e-06 -2.05253227e-06 -1.12378601e-05 -1.23958180e-04 4.65627599e-05 -2.53030645e-08 4.14645807e-05 -1.64227548e-04 8.90904652e-08 -1.46560472e-04 -1.14964989e-05 1.76437621e-08 -2.84256551e-05 1.24829480e-05 1.57844842e-08 -6.73127594e-07 -7.07790223e-06 3.67301932e-06 -9.73526929e-07 1.97878928e-06 -1.20313977e-05 3.18139934e-06 -6.50048290e-06 -1.78050867e-06 9.95477457e-07 -2.01552393e-06 4.08216584e-07 5.41057998e-07 -1.10005239e-08 -1.21340265e-07 4.55793850e-08 5.11667146e-06 4.30931929e-08 -1.60759170e-07 -1.77322982e-05 -1.52144154e-07 -1.12537004e-08 -3.81158746e-06 -2.96908766e-08 1.57844842e-08 -3.64207091e-06 -6.42008243e-07 -6.75068385e-06 3.50321202e-06 -6.15887908e-07 2.01249258e-06 -1.14751743e-05 2.03614252e-06 -6.59965138e-06 -1.69819400e-06 6.24328517e-07 -2.05253227e-06 5.41057998e-07 3.56976839e-07 8.47343647e-07 8.87539818e-06 -2.73264300e-06 -1.09489222e-06 -4.55304093e-06 8.90594867e-06 3.56835998e-06 1.48388021e-05 -4.45271445e-07 6.59820472e-07 2.74382222e-06 -2.15364805e-06 1.09937142e-06 8.27679714e-06 9.08980152e-05 -3.31731044e-05 -1.62438414e-08 -3.31599130e-05 1.15947314e-04 5.67758070e-08 1.15901207e-04 6.56977077e-06 1.11352091e-08 2.27312343e-05 -1.13610948e-05 1.11307811e-08 8.87539818e-06 9.28409779e-05 -2.86904438e-05 -1.14954437e-05 -4.78030847e-05 9.33279063e-05 3.73938340e-05 1.55499923e-04 -4.68652130e-06 6.94466877e-06 2.88789713e-05 -2.26673360e-05 1.15709813e-05 9.08980152e-05 9.99002029e-04 -3.64564650e-04 -1.78516013e-07 -3.64419679e-04 1.27504401e-03 6.24349544e-07 1.27453698e-03 7.24475934e-05 1.22792579e-07 2.50666770e-04 -1.25283515e-04 1.22743750e-07 2.73264300e-06 2.86904438e-05 -8.49333622e-06 -3.55505234e-06 -1.47834631e-05 2.77968524e-05 1.16224295e-05 4.83311471e-05 -1.72755575e-06 2.06385811e-06 8.58242502e-06 -7.04364490e-06 3.59556515e-06 3.31731044e-05 3.64564650e-04 -1.28563202e-04 -6.63959062e-08 -1.35539521e-04 4.50611937e-04 2.32516738e-07 4.74655879e-04 2.12092296e-05 4.35812986e-08 8.89661525e-05 -4.70642248e-05 4.61101322e-08 1.09489222e-06 1.14954437e-05 -3.55505234e-06 -1.04500913e-06 -5.92331262e-06 1.16224295e-05 3.44625272e-06 1.93649141e-05 -5.29149089e-07 6.29719392e-07 3.59556515e-06 -2.91631522e-06 1.04921798e-06 1.62438414e-08 1.78516013e-07 -6.63959062e-08 7.03020590e-06 -6.63695036e-08 2.32516738e-07 -2.42326525e-05 2.32424277e-07 1.47973422e-08 -5.20181119e-06 4.61101322e-08 -2.55930694e-08 -5.19974266e-06 4.55304093e-06 4.78030847e-05 -1.47834631e-05 -5.92331262e-06 -2.42523265e-05 4.83311471e-05 1.93649141e-05 7.93172621e-05 -2.20043344e-06 3.59556515e-06 1.47170092e-05 -1.13444696e-05 5.89668644e-06 3.31599130e-05 3.64419679e-04 -1.35539521e-04 -6.63695036e-08 -1.28455384e-04 4.74655879e-04 2.32424277e-07 4.50234363e-04 3.02070532e-05 4.61101322e-08 8.89266385e-05 -4.18457443e-05 4.35446194e-08 -8.90594867e-06 -9.33279063e-05 2.77968524e-05 1.16224295e-05 4.83311471e-05 -9.07208917e-05 -3.78946500e-05 -1.57582535e-04 5.64344202e-06 -6.77712529e-06 -2.81822522e-05 2.31023894e-05 -1.17930628e-05 -1.15947314e-04 -1.27504401e-03 4.50611937e-04 2.32516738e-07 4.74655879e-04 -1.57956493e-03 -8.14311739e-07 -1.66232271e-03 -7.51733537e-05 -1.53874803e-07 -3.14117514e-04 1.66005504e-04 -1.62640217e-07 -3.56835998e-06 -3.73938340e-05 1.16224295e-05 3.44625272e-06 1.93649141e-05 -3.78946500e-05 -1.13263508e-05 -6.31388338e-05 1.74010972e-06 -2.08511582e-06 -1.17930628e-05 9.55730174e-06 -3.47415219e-06 -5.67758070e-08 -6.24349544e-07 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -8.14311739e-07 8.34186783e-05 -8.13987924e-07 -5.21042689e-08 1.80327429e-05 -1.62640217e-07 9.01178660e-08 1.80255721e-05 -1.48388021e-05 -1.55499923e-04 4.83311471e-05 1.93649141e-05 7.93172621e-05 -1.57582535e-04 -6.31388338e-05 -2.58701941e-04 7.23613758e-06 -1.17930628e-05 -4.82898947e-05 3.72414580e-05 -1.93483855e-05 -1.15901207e-04 -1.27453698e-03 4.74655879e-04 2.32424277e-07 4.50234363e-04 -1.66232271e-03 -8.13987924e-07 -1.57824260e-03 -1.06364805e-04 -1.62640217e-07 -3.13978265e-04 1.47913839e-04 -1.53745428e-07 -4.45271445e-07 -4.68652130e-06 1.72755575e-06 5.29149089e-07 2.20043344e-06 -5.64344202e-06 -1.74010972e-06 -7.23613758e-06 -9.27366502e-08 -3.90827723e-07 -1.62523267e-06 9.43875709e-07 -4.81819662e-07 6.56977077e-06 7.24475934e-05 -2.12092296e-05 -1.47973422e-08 -3.02070532e-05 7.51733537e-05 5.21042689e-08 1.06364805e-04 -8.44098719e-07 8.10990595e-09 1.65554298e-05 -1.16233331e-05 1.13877032e-08 6.59820472e-07 6.94466877e-06 -2.06385811e-06 -6.29719392e-07 -3.59556515e-06 6.77712529e-06 2.08511582e-06 1.17930628e-05 -3.90827723e-07 3.64007278e-07 2.10175769e-06 -1.78512422e-06 6.37245931e-07 1.11352091e-08 1.22792579e-07 -4.35812986e-08 5.20181119e-06 -4.61101322e-08 1.53874803e-07 -1.80327429e-05 1.62640217e-07 8.10990595e-09 -3.69543062e-06 2.99513513e-08 -1.78115422e-08 -3.86851395e-06 2.74382222e-06 2.88789713e-05 -8.58242502e-06 -3.59556515e-06 -1.47170092e-05 2.81822522e-05 1.17930628e-05 4.82898947e-05 -1.62523267e-06 2.10175769e-06 8.59861531e-06 -6.93523297e-06 3.60611560e-06 2.27312343e-05 2.50666770e-04 -8.89661525e-05 -4.61101322e-08 -8.89266385e-05 3.14117514e-04 1.62640217e-07 3.13978265e-04 1.65554298e-05 2.99513513e-08 5.74467552e-05 -2.86231329e-05 2.99379342e-08 -2.15364805e-06 -2.26673360e-05 7.04364490e-06 2.91631522e-06 1.13444696e-05 -2.31023894e-05 -9.55730174e-06 -3.72414580e-05 9.43875709e-07 -1.78512422e-06 -6.93523297e-06 5.20999612e-06 -2.87653314e-06 -1.13610948e-05 -1.25283515e-04 4.70642248e-05 2.55930694e-08 4.18457443e-05 -1.66005504e-04 -9.01178660e-08 -1.47913839e-04 -1.16233331e-05 -1.78115422e-08 -2.86231329e-05 1.25469982e-05 -1.59101603e-08 1.09937142e-06 1.15709813e-05 -3.59556515e-06 -1.04921798e-06 -5.89668644e-06 1.17930628e-05 3.47415219e-06 1.93483855e-05 -4.81819662e-07 6.37245931e-07 3.60611560e-06 -2.87653314e-06 1.04330362e-06 1.11307811e-08 1.22743750e-07 -4.61101322e-08 5.19974266e-06 -4.35446194e-08 1.62640217e-07 -1.80255721e-05 1.53745428e-07 1.13877032e-08 -3.86851395e-06 2.99379342e-08 -1.59101603e-08 -3.69235334e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 2 -1 676 + 1.69438374e-04 1.55948196e-03 -6.48046884e-04 3.24329437e-04 -3.24292434e-04 2.12226517e-03 -1.06213468e-03 1.06201350e-03 9.01124270e-05 -1.04212802e-04 1.04200912e-04 5.95006197e-09 -5.21496576e-05 3.14140416e-07 3.21329148e-06 -1.73842906e-06 1.11324448e-06 -3.48277652e-07 5.48431559e-06 -3.51201221e-06 1.09873023e-06 8.04403664e-07 -1.15140146e-06 3.60215031e-07 3.32580864e-07 -2.30672281e-07 1.55948196e-03 1.39049300e-02 -5.76583102e-03 2.88563802e-03 -2.88530880e-03 1.86246236e-02 -9.32110598e-03 9.32004254e-03 5.74223138e-04 -6.64074910e-04 6.63999146e-04 3.79155613e-08 -3.32313100e-04 3.21329148e-06 3.28470681e-05 -1.78022917e-05 1.14001218e-05 -3.56651905e-06 5.61102930e-05 -3.59315636e-05 1.12411611e-05 8.24616421e-06 -1.18033345e-05 3.69266380e-06 3.40937833e-06 -2.36468529e-06 6.48046884e-04 5.76583102e-03 -2.33022970e-03 1.27999418e-03 -1.27984815e-03 7.50943102e-03 -4.14005158e-03 4.13957924e-03 1.96239779e-04 -3.08003259e-04 3.07968119e-04 2.03596901e-08 -1.78443665e-04 1.73842906e-06 1.78022917e-05 -9.56877547e-06 6.19521191e-06 -1.93816712e-06 3.02376912e-05 -1.95736377e-05 6.12359700e-06 4.37523838e-06 -6.37502375e-06 1.99442111e-06 1.86195796e-06 -1.29142153e-06 -3.24329437e-04 -2.88563802e-03 1.27999418e-03 -4.13258084e-04 6.40528393e-04 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 -1.82369507e-04 8.13796244e-05 -1.78443665e-04 4.85778526e-05 4.07235914e-05 -1.11324448e-06 -1.14001218e-05 6.19521191e-06 -3.86165948e-06 1.24115152e-06 -1.95736377e-05 1.22061819e-05 -3.92139131e-06 -2.92495627e-06 4.01688985e-06 -1.29142153e-06 -1.12123804e-06 8.04745504e-07 3.24292434e-04 2.88530880e-03 -1.27984815e-03 6.40528393e-04 -4.13111920e-04 4.13957924e-03 -2.07174425e-03 1.30864777e-03 1.82348701e-04 -1.78443665e-04 8.13389050e-05 4.85926870e-05 -4.07078591e-05 3.48277652e-07 3.56651905e-06 -1.93816712e-06 1.24115152e-06 -2.82701121e-07 6.12359700e-06 -3.92139131e-06 8.98540606e-07 9.15070244e-07 -1.29142153e-06 2.92973931e-07 3.95272547e-07 -1.87612841e-07 -2.12226517e-03 -1.86246236e-02 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -2.40450711e-02 1.33140646e-02 -1.33125456e-02 -4.90935405e-04 8.30291250e-04 -8.30196522e-04 -5.63909849e-08 4.94242004e-04 -5.48431559e-06 -5.61102930e-05 3.02376912e-05 -1.95736377e-05 6.12359700e-06 -9.54267441e-05 6.17618563e-05 -1.93221476e-05 -1.38492653e-05 2.01732308e-05 -6.31117922e-06 -5.89091529e-06 4.08583600e-06 1.06213468e-03 9.32110598e-03 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.33140646e-02 -4.10538365e-03 6.66255871e-03 5.18277260e-04 -1.79849679e-04 4.94242004e-04 -1.57344614e-04 -8.99994920e-05 3.51201221e-06 3.59315636e-05 -1.95736377e-05 1.22061819e-05 -3.92139131e-06 6.17618563e-05 -3.85308569e-05 1.23733978e-05 9.25189424e-06 -1.27146061e-05 4.08583600e-06 3.55115486e-06 -2.54724986e-06 -1.06201350e-03 -9.32004254e-03 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.33125456e-02 6.66255871e-03 -4.10386331e-03 -5.18218130e-04 4.94242004e-04 -1.79736897e-04 -1.57383100e-04 8.99533169e-05 -1.09873023e-06 -1.12411611e-05 6.12359700e-06 -3.92139131e-06 8.98540606e-07 -1.93221476e-05 1.23733978e-05 -2.85118771e-06 -2.89444776e-06 4.08583600e-06 -9.32775521e-07 -1.24940122e-06 5.97325039e-07 9.01124270e-05 5.74223138e-04 -1.96239779e-04 1.82369507e-04 -1.82348701e-04 4.90935405e-04 -5.18277260e-04 5.18218130e-04 -8.38016586e-05 7.51629141e-05 -7.51543388e-05 -3.38151966e-09 2.96375220e-05 8.04403664e-07 8.24616421e-06 -4.37523838e-06 2.92495627e-06 -9.15070244e-07 1.38492653e-05 -9.25189424e-06 2.89444776e-06 1.93671537e-06 -2.97656138e-06 9.31214862e-07 8.97393393e-07 -6.22416391e-07 -1.04212802e-04 -6.64074910e-04 3.08003259e-04 -8.13796244e-05 1.78443665e-04 -8.30291250e-04 1.79849679e-04 -4.94242004e-04 7.51629141e-05 -9.95895492e-05 8.53756906e-05 9.20586492e-06 -4.96239640e-05 -1.15140146e-06 -1.18033345e-05 6.37502375e-06 -4.01688985e-06 1.29142153e-06 -2.01732308e-05 1.27146061e-05 -4.08583600e-06 -2.97656138e-06 4.15818736e-06 -1.33729152e-06 -1.17341856e-06 8.42489788e-07 1.04200912e-04 6.63999146e-04 -3.07968119e-04 1.78443665e-04 -8.13389050e-05 8.30196522e-04 -4.94242004e-04 1.79736897e-04 -7.51543388e-05 8.53756906e-05 -9.95700672e-05 9.19559131e-06 4.96204019e-05 3.60215031e-07 3.69266380e-06 -1.99442111e-06 1.29142153e-06 -2.92973931e-07 6.31117922e-06 -4.08583600e-06 9.32775521e-07 9.31214862e-07 -1.33729152e-06 3.02001728e-07 4.14149036e-07 -1.95741871e-07 5.95006197e-09 3.79155613e-08 -2.03596901e-08 -4.85778526e-05 -4.85926870e-05 5.63909849e-08 1.57344614e-04 1.57383100e-04 -3.38151966e-09 9.20586492e-06 9.19559131e-06 -5.02786531e-06 2.30800708e-09 3.32580864e-07 3.40937833e-06 -1.86195796e-06 1.12123804e-06 -3.95272547e-07 5.89091529e-06 -3.55115486e-06 1.24940122e-06 8.97393393e-07 -1.17341856e-06 4.14149036e-07 3.08843068e-07 -2.50146702e-07 -5.21496576e-05 -3.32313100e-04 1.78443665e-04 -4.07235914e-05 4.07078591e-05 -4.94242004e-04 8.99994920e-05 -8.99533169e-05 2.96375220e-05 -4.96239640e-05 4.96204019e-05 2.30800708e-09 -2.52565247e-05 -2.30672281e-07 -2.36468529e-06 1.29142153e-06 -8.04745504e-07 1.87612841e-07 -4.08583600e-06 2.54724986e-06 -5.97325039e-07 -6.22416391e-07 8.42489788e-07 -1.95741871e-07 -2.50146702e-07 1.21681575e-07 1.02530213e-03 7.61946018e-03 -2.86558461e-03 7.62320529e-04 -2.86406524e-03 8.50927204e-03 -2.26368914e-03 8.50476032e-03 5.14307720e-05 -5.09471145e-05 1.91410115e-04 -8.88776803e-05 -5.09201018e-05 1.71253570e-04 1.57446716e-03 -6.54828154e-04 3.27104859e-04 -3.27142251e-04 2.14342488e-03 -1.07070029e-03 1.07082268e-03 9.07161630e-05 -1.04589232e-04 1.04601187e-04 -5.97265336e-09 -5.22511997e-05 7.61946018e-03 4.86015527e-02 -1.89710302e-02 5.04679070e-03 -1.89609715e-02 5.17058124e-02 -1.37550998e-02 5.16783973e-02 -7.19174588e-04 7.12411436e-04 -2.67655501e-03 1.24280789e-03 7.12033706e-04 1.57446716e-03 1.40177114e-02 -5.81810678e-03 2.90630600e-03 -2.90663823e-03 1.87803531e-02 -9.38130822e-03 9.38238062e-03 5.74150680e-04 -6.61954567e-04 6.62030237e-04 -3.78014553e-08 -3.30702499e-04 2.86558461e-03 1.89710302e-02 -6.68046238e-03 2.14379347e-03 -8.05430806e-03 1.84770600e-02 -6.03020659e-03 2.26556999e-02 -2.56216110e-04 1.46899009e-04 -5.51904781e-04 1.99746480e-04 1.14439430e-04 6.54828154e-04 5.81810678e-03 -2.35366609e-03 1.29055977e-03 -1.29070730e-03 7.58003755e-03 -4.17162800e-03 4.17210487e-03 1.96612803e-04 -3.08014335e-04 3.08049546e-04 -2.03788294e-08 -1.78282284e-04 -7.62320529e-04 -5.04679070e-03 2.14379347e-03 8.07813250e-04 2.14265681e-03 -6.03020659e-03 -2.58646577e-03 -6.02700930e-03 1.20437061e-05 -1.52248307e-04 1.14439430e-04 -2.07389243e-05 -1.52167583e-04 -3.27104859e-04 -2.90630600e-03 1.29055977e-03 -4.14777029e-04 6.44744162e-04 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 -1.82818190e-04 8.04765421e-05 -1.78282284e-04 4.88566866e-05 4.02048644e-05 2.86406524e-03 1.89609715e-02 -8.05430806e-03 2.14265681e-03 -6.67191913e-03 2.26556999e-02 -6.02700930e-03 1.84530290e-02 -4.52486306e-05 1.14439430e-04 -5.51741268e-04 3.21364271e-04 1.46777622e-04 3.27142251e-04 2.90663823e-03 -1.29070730e-03 6.44744162e-04 -4.14924426e-04 4.17210487e-03 -2.08408231e-03 1.31321506e-03 1.82839088e-04 -1.78282284e-04 8.05172997e-05 4.88419097e-05 -4.02206285e-05 -8.50927204e-03 -5.17058124e-02 1.84770600e-02 -6.03020659e-03 2.26556999e-02 -4.82636087e-02 1.61685369e-02 -6.07457663e-02 1.16758362e-03 -1.04815518e-03 3.93795615e-03 -1.77118105e-03 -1.01475105e-03 -2.14342488e-03 -1.87803531e-02 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -2.42525232e-02 1.34058098e-02 -1.34073423e-02 -4.88811673e-04 8.26719605e-04 -8.26814110e-04 5.62356320e-08 4.91972170e-04 2.26368914e-03 1.37550998e-02 -6.03020659e-03 -2.58646577e-03 -6.02700930e-03 1.61685369e-02 8.21312877e-03 1.61599642e-02 -2.53682551e-04 3.93637081e-04 -1.01475105e-03 4.38314715e-04 3.93428370e-04 1.07070029e-03 9.38130822e-03 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.34058098e-02 -4.11213250e-03 6.69734001e-03 5.17912316e-04 -1.75532526e-04 4.91972170e-04 -1.58070397e-04 -8.76933976e-05 -8.50476032e-03 -5.16783973e-02 2.26556999e-02 -6.02700930e-03 1.84530290e-02 -6.07457663e-02 1.61599642e-02 -4.81991753e-02 9.53094336e-04 -1.01475105e-03 3.93599918e-03 -1.89371997e-03 -1.04707883e-03 -1.07082268e-03 -9.38238062e-03 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.34073423e-02 6.69734001e-03 -4.11366360e-03 -5.17971520e-04 4.91972170e-04 -1.75644997e-04 -1.58032277e-04 8.77395568e-05 5.14307720e-05 -7.19174588e-04 2.56216110e-04 -1.20437061e-05 4.52486306e-05 -1.16758362e-03 2.53682551e-04 -9.53094336e-04 2.07548868e-04 1.11240964e-04 -4.17936243e-04 3.68466765e-04 2.11103227e-04 9.07161630e-05 5.74150680e-04 -1.96612803e-04 1.82818190e-04 -1.82839088e-04 4.88811673e-04 -5.17912316e-04 5.17971520e-04 -8.52979525e-05 7.71688483e-05 -7.71776697e-05 3.51458724e-09 3.07470380e-05 -5.09471145e-05 7.12411436e-04 -1.46899009e-04 1.52248307e-04 -1.14439430e-04 1.04815518e-03 -3.93637081e-04 1.01475105e-03 1.11240964e-04 7.59463477e-05 4.80341255e-04 -3.07544632e-04 7.37264108e-05 -1.04589232e-04 -6.61954567e-04 3.08014335e-04 -8.04765421e-05 1.78282284e-04 -8.26719605e-04 1.75532526e-04 -4.91972170e-04 7.71688483e-05 -1.01330348e-04 8.74817293e-05 9.01559582e-06 -5.04698362e-05 1.91410115e-04 -2.67655501e-03 5.51904781e-04 -1.14439430e-04 5.51741268e-04 -3.93795615e-03 1.01475105e-03 -3.93599918e-03 -4.17936243e-04 4.80341255e-04 -1.60086163e-03 7.21742696e-04 4.80025380e-04 1.04601187e-04 6.62030237e-04 -3.08049546e-04 1.78282284e-04 -8.05172997e-05 8.26814110e-04 -4.91972170e-04 1.75644997e-04 -7.71776697e-05 8.74817293e-05 -1.01350348e-04 9.02610316e-06 5.04735432e-05 -8.88776803e-05 1.24280789e-03 -1.99746480e-04 2.07389243e-05 -3.21364271e-04 1.77118105e-03 -4.38314715e-04 1.89371997e-03 3.68466765e-04 -3.07544632e-04 7.21742696e-04 -2.16898403e-04 -2.49692010e-04 -5.97265336e-09 -3.78014553e-08 2.03788294e-08 -4.88566866e-05 -4.88419097e-05 -5.62356320e-08 1.58070397e-04 1.58032277e-04 3.51458724e-09 9.01559582e-06 9.02610316e-06 -4.81374186e-06 -2.36694876e-09 -5.09201018e-05 7.12033706e-04 -1.14439430e-04 1.52167583e-04 -1.46777622e-04 1.01475105e-03 -3.93428370e-04 1.04707883e-03 2.11103227e-04 7.37264108e-05 4.80025380e-04 -2.49692010e-04 7.58681457e-05 -5.22511997e-05 -3.30702499e-04 1.78282284e-04 -4.02048644e-05 4.02206285e-05 -4.91972170e-04 8.76933976e-05 -8.77395568e-05 3.07470380e-05 -5.04698362e-05 5.04735432e-05 -2.36694876e-09 -2.55207716e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 2 0 507 + 8.15034854e-06 8.95207190e-05 -3.26777168e-05 3.26925762e-05 -1.41342975e-08 1.14203622e-04 -1.14255554e-04 4.93972079e-08 6.47211935e-06 -2.24507007e-05 9.70632845e-09 1.12304527e-05 -9.71074216e-09 8.95207190e-05 9.83943379e-04 -3.59188453e-04 3.59351785e-04 -1.55362031e-07 1.25604163e-03 -1.25661278e-03 5.43283551e-07 7.13912780e-05 -2.47644416e-04 1.07066504e-07 1.23878490e-04 -1.07115190e-07 3.26777168e-05 3.59188453e-04 -1.26702582e-04 1.33660050e-04 -5.77865415e-08 4.44060464e-04 -4.68038392e-04 2.02351562e-07 2.09169040e-05 -8.79108833e-05 3.80073619e-08 4.65324191e-05 -4.02356286e-08 -3.26925762e-05 -3.59351785e-04 1.33660050e-04 -1.26824112e-04 5.78128185e-08 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 -2.97800920e-05 8.79555064e-05 -4.02356286e-08 -4.14419060e-05 3.80439459e-08 1.41342975e-08 1.55362031e-07 -5.77865415e-08 5.78128185e-08 6.89669227e-06 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 1.28751150e-08 -4.02356286e-08 -5.10933177e-06 2.23369374e-08 5.11165511e-06 -1.14203622e-04 -1.25604163e-03 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -1.55642601e-03 1.63895261e-03 -7.08584223e-07 -7.41366515e-05 3.10376134e-04 -1.34187914e-07 -1.64119956e-04 1.41911161e-07 1.14255554e-04 1.25661278e-03 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 1.63895261e-03 -1.55791621e-03 7.08906434e-07 1.04853035e-04 -3.10533377e-04 1.41911161e-07 1.46479937e-04 -1.34316946e-07 -4.93972079e-08 -5.43283551e-07 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -7.08584223e-07 7.08906434e-07 8.17813602e-05 -4.53321263e-08 1.41911161e-07 1.77065360e-05 -7.86465779e-08 -1.77145876e-05 6.47211935e-06 7.13912780e-05 -2.09169040e-05 2.97800920e-05 -1.28751150e-08 7.41366515e-05 -1.04853035e-04 4.53321263e-08 -8.21102025e-07 -1.63709222e-05 7.07779903e-09 1.14886294e-05 -9.93398225e-09 -2.24507007e-05 -2.47644416e-04 8.79108833e-05 -8.79555064e-05 4.02356286e-08 -3.10376134e-04 3.10533377e-04 -1.41911161e-07 -1.63709222e-05 5.69692112e-05 -2.62018624e-08 -2.84138377e-05 2.62152747e-08 9.70632845e-09 1.07066504e-07 -3.80073619e-08 4.02356286e-08 5.10933177e-06 1.34187914e-07 -1.41911161e-07 -1.77065360e-05 7.07779903e-09 -2.62018624e-08 -3.63558527e-06 1.55772517e-08 3.80813104e-06 1.12304527e-05 1.23878490e-04 -4.65324191e-05 4.14419060e-05 -2.23369374e-08 1.64119956e-04 -1.46479937e-04 7.86465779e-08 1.14886294e-05 -2.84138377e-05 1.55772517e-08 1.24792536e-05 -1.39371751e-08 -9.71074216e-09 -1.07115190e-07 4.02356286e-08 -3.80439459e-08 -5.11165511e-06 -1.41911161e-07 1.34316946e-07 1.77145876e-05 -9.93398225e-09 2.62152747e-08 3.80813104e-06 -1.39371751e-08 -3.63904779e-06 1.34432031e-03 9.62626429e-03 -3.74599809e-03 3.49398187e-03 -1.24656360e-03 1.09360727e-02 -1.02003362e-02 3.63921976e-03 4.80079912e-05 -1.52180833e-04 5.42942394e-05 6.19375449e-05 -5.06415336e-05 8.28412077e-06 9.09777564e-05 -3.32019247e-05 3.31868258e-05 1.43620391e-08 1.16048744e-04 -1.15995970e-04 -5.01987947e-08 6.57558171e-06 -2.27474444e-05 -9.84425830e-09 1.13685478e-05 9.83978156e-09 9.62626429e-03 5.72979189e-02 -2.34267559e-02 2.18506947e-02 -7.79577048e-03 6.14815418e-02 -5.73453023e-02 2.04593410e-02 -1.33464434e-03 4.23069750e-03 -1.50940495e-03 -1.72189237e-03 1.40785804e-03 9.09777564e-05 9.99873567e-04 -3.64877315e-04 3.64711384e-04 1.57833689e-07 1.27614898e-03 -1.27556864e-03 -5.52019250e-07 7.25104506e-05 -2.50841297e-04 -1.08554899e-07 1.25363589e-04 1.08505532e-07 3.74599809e-03 2.34267559e-02 -8.64102511e-03 9.72659782e-03 -3.47020199e-03 2.32014078e-02 -2.66071034e-02 9.49273578e-03 -3.96522464e-04 1.00834421e-03 -3.59751493e-04 -3.75796735e-04 3.07259886e-04 3.32019247e-05 3.64877315e-04 -1.28672006e-04 1.35648275e-04 5.87035905e-08 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 2.12268792e-05 -8.90275005e-05 -3.85278318e-08 4.70947387e-05 4.07617534e-08 -3.49398187e-03 -2.18506947e-02 9.72659782e-03 -7.28509092e-03 3.23674026e-03 -2.66071034e-02 1.94922505e-02 -8.85410135e-03 2.22604499e-04 -9.52357513e-04 3.07259886e-04 4.35524492e-04 -3.16917998e-04 -3.31868258e-05 -3.64711384e-04 1.35648275e-04 -1.28548604e-04 -5.86768947e-08 -4.75038761e-04 4.50562840e-04 2.05485837e-07 -3.02322860e-05 8.89822797e-05 4.07617534e-08 -4.18684747e-05 -3.84907500e-08 1.24656360e-03 7.79577048e-03 -3.47020199e-03 3.23674026e-03 6.32352775e-04 9.49273578e-03 -8.85410135e-03 -2.16591271e-03 -7.94196070e-05 3.07259886e-04 -2.00764043e-04 -9.47252988e-05 1.87257417e-04 -1.43620391e-08 -1.57833689e-07 5.87035905e-08 -5.86768947e-08 7.03795935e-06 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 -1.30834228e-08 4.07617534e-08 -5.20719763e-06 -2.26240712e-08 5.20482962e-06 -1.09360727e-02 -6.14815418e-02 2.32014078e-02 -2.66071034e-02 9.49273578e-03 -5.78936510e-02 6.84488788e-02 -2.44208139e-02 1.80654004e-03 -6.00732479e-03 2.14326024e-03 2.48405504e-03 -2.03101942e-03 -1.16048744e-04 -1.27614898e-03 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -1.58091757e-03 1.66367474e-03 7.19977313e-07 -7.52359251e-05 3.14334982e-04 1.36032633e-07 -1.66113681e-04 -1.43775825e-07 1.02003362e-02 5.73453023e-02 -2.66071034e-02 1.94922505e-02 -8.85410135e-03 6.84488788e-02 -4.83515504e-02 2.27778763e-02 -1.85129704e-03 5.58979105e-03 -2.03101942e-03 -2.22092757e-03 1.86012644e-03 1.15995970e-04 1.27556864e-03 -4.75038761e-04 4.50562840e-04 2.05485837e-07 1.66367474e-03 -1.57940409e-03 -7.19649898e-07 1.06454134e-04 -3.14175621e-04 -1.43775825e-07 1.47994545e-04 1.35901837e-07 -3.63921976e-03 -2.04593410e-02 9.49273578e-03 -8.85410135e-03 -2.16591271e-03 -2.44208139e-02 2.27778763e-02 7.36578817e-03 6.60495560e-04 -2.03101942e-03 6.21680971e-04 8.60878060e-04 -5.79856687e-04 5.01987947e-08 5.52019250e-07 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 7.19977313e-07 -7.19649898e-07 8.35137710e-05 4.60694388e-08 -1.43775825e-07 1.80517420e-05 7.96638128e-08 -1.80435329e-05 4.80079912e-05 -1.33464434e-03 3.96522464e-04 -2.22604499e-04 7.94196070e-05 -1.80654004e-03 1.85129704e-03 -6.60495560e-04 2.71215134e-04 5.86178632e-04 -2.09133583e-04 -4.50870287e-04 3.68641715e-04 6.57558171e-06 7.25104506e-05 -2.12268792e-05 3.02322860e-05 1.30834228e-08 7.52359251e-05 -1.06454134e-04 -4.60694388e-08 -8.45204057e-07 -1.65665211e-05 -7.16938176e-09 1.16312371e-05 1.00671462e-08 -1.52180833e-04 4.23069750e-03 -1.00834421e-03 9.52357513e-04 -3.07259886e-04 6.00732479e-03 -5.58979105e-03 2.03101942e-03 5.86178632e-04 -1.83058075e-03 7.59356146e-04 6.79425369e-04 -6.94299133e-04 -2.27474444e-05 -2.50841297e-04 8.90275005e-05 -8.89822797e-05 -4.07617534e-08 -3.14334982e-04 3.14175621e-04 1.43775825e-07 -1.65665211e-05 5.74742044e-05 2.64734900e-08 -2.86348849e-05 -2.64599273e-08 5.42942394e-05 -1.50940495e-03 3.59751493e-04 -3.07259886e-04 2.00764043e-04 -2.14326024e-03 2.03101942e-03 -6.21680971e-04 -2.09133583e-04 7.59356146e-04 2.68928306e-05 -4.57288828e-04 -1.51113252e-05 -9.84425830e-09 -1.08554899e-07 3.85278318e-08 -4.07617534e-08 5.20719763e-06 -1.36032633e-07 1.43775825e-07 -1.80517420e-05 -7.16938176e-09 2.64734900e-08 -3.69892919e-06 -1.57434652e-08 3.87201115e-06 6.19375449e-05 -1.72189237e-03 3.75796735e-04 -4.35524492e-04 9.47252988e-05 -2.48405504e-03 2.22092757e-03 -8.60878060e-04 -4.50870287e-04 6.79425369e-04 -4.57288828e-04 -1.07511075e-04 3.26309004e-04 1.13685478e-05 1.25363589e-04 -4.70947387e-05 4.18684747e-05 2.26240712e-08 1.66113681e-04 -1.47994545e-04 -7.96638128e-08 1.16312371e-05 -2.86348849e-05 -1.57434652e-08 1.25506408e-05 1.40613983e-08 -5.06415336e-05 1.40785804e-03 -3.07259886e-04 3.16917998e-04 -1.87257417e-04 2.03101942e-03 -1.86012644e-03 5.79856687e-04 3.68641715e-04 -6.94299133e-04 -1.51113252e-05 3.26309004e-04 2.47862397e-05 9.83978156e-09 1.08505532e-07 -4.07617534e-08 3.84907500e-08 -5.20482962e-06 1.43775825e-07 -1.35901837e-07 1.80435329e-05 1.00671462e-08 -2.64599273e-08 3.87201115e-06 1.40613983e-08 -3.69540674e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +0 2 1 169 + 4.83764829e-06 5.30911406e-05 -1.46984542e-05 2.35090249e-05 4.90819033e-06 5.10233223e-05 -8.16078028e-05 -1.70379941e-05 -1.53943203e-06 -1.27368643e-05 -2.65918958e-06 9.74182205e-06 4.25316520e-06 5.30911406e-05 5.82098719e-04 -1.61742263e-04 2.58694065e-04 5.40098840e-05 5.60713909e-04 -8.96817926e-04 -1.87236735e-04 -1.70334222e-05 -1.40930150e-04 -2.94232535e-05 1.07790773e-04 4.70601866e-05 1.46984542e-05 1.61742263e-04 -4.17561872e-05 7.25103932e-05 1.51386462e-05 1.45741865e-04 -2.52567568e-04 -5.27308002e-05 -7.18150565e-06 -3.64459676e-05 -7.60915207e-06 3.03954511e-05 1.32702973e-05 -2.35090249e-05 -2.58694065e-04 7.25103932e-05 -1.12395490e-04 -2.42130774e-05 -2.52567568e-04 3.91792067e-04 8.43387797e-05 5.78033861e-06 6.15017715e-05 1.32702973e-05 -4.53208280e-05 -2.05370167e-05 -4.90819033e-06 -5.40098840e-05 1.51386462e-05 -2.42130774e-05 -1.47598382e-06 -5.27308002e-05 8.43387797e-05 5.43821262e-06 1.20681322e-06 1.32702973e-05 7.10869313e-07 -1.08376028e-05 -1.13697972e-06 -5.10233223e-05 -5.60713909e-04 1.45741865e-04 -2.52567568e-04 -5.27308002e-05 -5.07697308e-04 8.78056527e-04 1.83319749e-04 2.49862810e-05 1.28218025e-04 2.67692288e-05 -1.06679408e-04 -4.65749776e-05 8.16078028e-05 8.96817926e-04 -2.52567568e-04 3.91792067e-04 8.43387797e-05 8.78056527e-04 -1.36309607e-03 -2.93205563e-04 -2.04622975e-05 -2.16043222e-04 -4.65749776e-05 1.59366266e-04 7.21423649e-05 1.70379941e-05 1.87236735e-04 -5.27308002e-05 8.43387797e-05 5.43821262e-06 1.83319749e-04 -2.93205563e-04 -1.99286730e-05 -4.27209768e-06 -4.65749776e-05 -2.68440631e-06 3.79736458e-05 4.29349738e-06 -1.53943203e-06 -1.70334222e-05 7.18150565e-06 -5.78033861e-06 -1.20681322e-06 -2.49862810e-05 2.04622975e-05 4.27209768e-06 -2.06595899e-06 5.32876938e-06 1.11253506e-06 -1.54446109e-06 -6.74293591e-07 -1.27368643e-05 -1.40930150e-04 3.64459676e-05 -6.15017715e-05 -1.32702973e-05 -1.28218025e-04 2.16043222e-04 4.65749776e-05 5.32876938e-06 3.07901722e-05 6.66120940e-06 -2.48297491e-05 -1.12756585e-05 -2.65918958e-06 -2.94232535e-05 7.60915207e-06 -1.32702973e-05 -7.10869313e-07 -2.67692288e-05 4.65749776e-05 2.68440631e-06 1.11253506e-06 6.66120940e-06 2.75337517e-07 -5.98176914e-06 -5.26679386e-07 9.74182205e-06 1.07790773e-04 -3.03954511e-05 4.53208280e-05 1.08376028e-05 1.06679408e-04 -1.59366266e-04 -3.79736458e-05 -1.54446109e-06 -2.48297491e-05 -5.98176914e-06 1.73425048e-05 8.92932991e-06 4.25316520e-06 4.70601866e-05 -1.32702973e-05 2.05370167e-05 1.13697972e-06 4.65749776e-05 -7.21423649e-05 -4.29349738e-06 -6.74293591e-07 -1.12756585e-05 -5.26679386e-07 8.92932991e-06 7.88426233e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 -2 -1 169 + 1.20838743e-04 1.14994189e-03 1.16163812e-04 -5.57436619e-04 1.15979020e-04 -3.86103214e-04 1.85279793e-03 -3.85489007e-04 -6.84459616e-05 -5.16604235e-05 1.07483525e-05 1.18586107e-04 -5.15782429e-05 1.14994189e-03 1.07180648e-02 1.07758393e-03 -5.17101439e-03 1.07586972e-03 -3.55311614e-03 1.70503793e-02 -3.54746389e-03 -5.18522314e-04 -3.91361034e-04 8.14257042e-05 8.98366260e-04 -3.90738463e-04 -1.16163812e-04 -1.07758393e-03 4.36273845e-05 5.53633560e-04 -1.15187764e-04 -1.59667926e-04 -1.82421631e-03 3.79542379e-04 8.47263934e-05 -4.37201467e-05 9.09631624e-06 -1.08805118e-04 4.73240665e-05 5.57436619e-04 5.17101439e-03 5.53633560e-04 -2.49772905e-03 5.52752848e-04 -1.82421631e-03 8.21407276e-03 -1.82131438e-03 -2.48753714e-04 -2.08468026e-04 4.73240665e-05 4.31004756e-04 -2.08136398e-04 -1.15979020e-04 -1.07586972e-03 -1.15187764e-04 5.52752848e-04 4.39941544e-05 3.79542379e-04 -1.82131438e-03 -1.60876429e-04 5.17551432e-05 4.73240665e-05 9.14221067e-06 -1.27590177e-04 -4.38708315e-05 3.86103214e-04 3.55311614e-03 -1.59667926e-04 -1.82421631e-03 3.79542379e-04 5.84054395e-04 5.99381872e-03 -1.24706056e-03 -2.63211868e-04 1.60043752e-04 -3.32983463e-05 3.29468945e-04 -1.43300338e-04 -1.85279793e-03 -1.70503793e-02 -1.82421631e-03 8.21407276e-03 -1.82131438e-03 5.99381872e-03 -2.69295049e-02 5.98428385e-03 7.37274974e-04 6.25491403e-04 -1.43300338e-04 -1.27745400e-03 6.24496381e-04 3.85489007e-04 3.54746389e-03 3.79542379e-04 -1.82131438e-03 -1.60876429e-04 -1.24706056e-03 5.98428385e-03 5.88025167e-04 -1.53395787e-04 -1.43300338e-04 -3.34464857e-05 3.92105430e-04 1.60500036e-04 -6.84459616e-05 -5.18522314e-04 -8.47263934e-05 2.48753714e-04 -5.17551432e-05 2.63211868e-04 -7.37274974e-04 1.53395787e-04 -2.29086204e-05 -5.01805165e-06 1.04404464e-06 4.04822140e-05 -1.76074712e-05 -5.16604235e-05 -3.91361034e-04 4.37201467e-05 2.08468026e-04 -4.73240665e-05 -1.60043752e-04 -6.25491403e-04 1.43300338e-04 -5.01805165e-06 -3.99439108e-05 8.72157701e-06 2.32655364e-05 -8.46639708e-06 1.07483525e-05 8.14257042e-05 -9.09631624e-06 -4.73240665e-05 -9.14221067e-06 3.32983463e-05 1.43300338e-04 3.34464857e-05 1.04404464e-06 8.72157701e-06 1.60513338e-07 -1.80929793e-06 8.73086122e-06 1.18586107e-04 8.98366260e-04 1.08805118e-04 -4.31004756e-04 1.27590177e-04 -3.29468945e-04 1.27745400e-03 -3.92105430e-04 4.04822140e-05 2.32655364e-05 -1.80929793e-06 -6.96611350e-05 1.59554123e-05 -5.15782429e-05 -3.90738463e-04 -4.73240665e-05 2.08136398e-04 4.38708315e-05 1.43300338e-04 -6.24496381e-04 -1.60500036e-04 -1.76074712e-05 -8.46639708e-06 8.73086122e-06 1.59554123e-05 -3.99169529e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 -2 0 676 + 1.71672269e-04 1.57792086e-03 3.28189848e-04 -6.56104109e-04 3.27928827e-04 -1.07413122e-03 2.14736046e-03 -1.07327692e-03 -4.53116807e-05 -1.04771720e-04 5.23661820e-05 7.85654639e-05 -1.04688391e-04 1.34722517e-03 9.64416165e-03 1.25121941e-03 -3.50145265e-03 3.75201731e-03 -3.65230825e-03 1.02207369e-02 -1.09521349e-02 -7.73954728e-05 -5.06144404e-05 5.42364199e-05 -1.04985262e-05 -1.51776942e-04 1.57792086e-03 1.40436697e-02 2.91501960e-03 -5.82759139e-03 2.91270117e-03 -9.40792386e-03 1.88079477e-02 -9.40044139e-03 -2.86330751e-04 -6.62066927e-04 3.30909116e-04 4.96465986e-04 -6.61540361e-04 9.64416165e-03 5.73712970e-02 7.82121551e-03 -2.18871411e-02 2.34533893e-02 -2.05195484e-02 5.74225643e-02 -6.15317345e-02 2.16460231e-03 1.41558841e-03 -1.51688820e-03 2.93623556e-04 4.24490875e-03 -3.28189848e-04 -2.91501960e-03 -4.16881756e-04 1.29418310e-03 -6.46848479e-04 1.31924295e-03 -4.18274204e-03 2.09058543e-03 1.33798126e-04 8.07173426e-05 -4.03435112e-05 -1.33942777e-04 1.78478598e-04 -1.25121941e-03 -7.82121551e-03 6.29979656e-04 3.24855868e-03 -3.48102619e-03 -2.16015424e-03 -8.88437554e-03 9.52014323e-03 -1.22784159e-04 -1.87831078e-04 2.01272308e-04 -2.13952185e-05 -3.09310164e-04 6.56104109e-04 5.82759139e-03 1.29418310e-03 -2.35679785e-03 1.29315379e-03 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 -9.79103764e-05 -3.08119111e-04 1.78478598e-04 1.69869761e-04 -3.07874052e-04 3.50145265e-03 2.18871411e-02 3.24855868e-03 -7.30004193e-03 9.74141568e-03 -8.88437554e-03 1.95273992e-02 -2.66414751e-02 4.90277705e-04 3.18914754e-04 -3.09310164e-04 -2.48095308e-05 9.56326017e-04 -3.27928827e-04 -2.91270117e-03 -6.46848479e-04 1.29315379e-03 -4.15852421e-04 2.09058543e-03 -4.17941535e-03 1.31591619e-03 4.89367989e-05 1.78478598e-04 -4.02335566e-05 -1.82769519e-04 8.04333283e-05 -3.75201731e-03 -2.34533893e-02 -3.48102619e-03 9.74141568e-03 -8.64768415e-03 9.52014323e-03 -2.66414751e-02 2.32130212e-02 -5.25362076e-04 -3.09310164e-04 3.61705191e-04 -1.54900099e-04 -1.01220744e-03 1.07413122e-03 9.40792386e-03 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -4.13190580e-03 1.34392678e-02 -6.71710977e-03 -3.95905708e-04 -1.75795878e-04 8.78649213e-05 3.69299930e-04 -4.92091737e-04 3.65230825e-03 2.05195484e-02 -2.16015424e-03 -8.88437554e-03 9.52014323e-03 7.35384112e-03 2.28477230e-02 -2.44827106e-02 1.08144859e-03 5.82573874e-04 -6.24262977e-04 1.41201307e-04 2.04134393e-03 -2.14736046e-03 -1.88079477e-02 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 1.34392678e-02 -2.42766998e-02 1.34285790e-02 2.42960040e-04 8.26143021e-04 -4.92091737e-04 -4.21602203e-04 8.25485959e-04 -1.02207369e-02 -5.74225643e-02 -8.88437554e-03 1.95273992e-02 -2.66414751e-02 2.28477230e-02 -4.84194893e-02 6.85132051e-02 -2.85632217e-03 -1.86993934e-03 2.04134393e-03 -4.93313976e-04 -5.60736566e-03 1.07327692e-03 9.40044139e-03 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -6.71710977e-03 1.34285790e-02 -4.12121681e-03 -1.21434388e-04 -4.92091737e-04 8.75431602e-05 5.27290508e-04 -1.75012809e-04 1.09521349e-02 6.15317345e-02 9.52014323e-03 -2.66414751e-02 2.32130212e-02 -2.44827106e-02 6.85132051e-02 -5.78977100e-02 3.06072115e-03 2.04134393e-03 -2.15234195e-03 3.18221861e-04 6.02318296e-03 -4.53116807e-05 -2.86330751e-04 -1.33798126e-04 9.79103764e-05 -4.89367989e-05 3.95905708e-04 -2.42960040e-04 1.21434388e-04 -2.49156491e-05 -3.09770316e-05 1.54826978e-05 3.49006910e-05 -4.65051310e-05 -7.73954728e-05 2.16460231e-03 1.22784159e-04 -4.90277705e-04 5.25362076e-04 -1.08144859e-03 2.85632217e-03 -3.06072115e-03 -4.02796827e-04 -4.68390859e-04 5.01909003e-04 -6.09837431e-05 -8.81640520e-04 -1.04771720e-04 -6.62066927e-04 -8.07173426e-05 3.08119111e-04 -1.78478598e-04 1.75795878e-04 -8.26143021e-04 4.92091737e-04 -3.09770316e-05 -1.01880734e-04 5.07753127e-05 7.16933507e-05 -8.80483494e-05 -5.06144404e-05 1.41558841e-03 1.87831078e-04 -3.18914754e-04 3.09310164e-04 -5.82573874e-04 1.86993934e-03 -2.04134393e-03 -4.68390859e-04 2.42444883e-05 -1.44064175e-05 -1.56330927e-04 -6.96665863e-04 5.23661820e-05 3.30909116e-04 4.03435112e-05 -1.78478598e-04 4.02335566e-05 -8.78649213e-05 4.92091737e-04 -8.75431602e-05 1.54826978e-05 5.07753127e-05 -2.56700685e-05 -2.68500618e-05 5.07492181e-05 5.42364199e-05 -1.51688820e-03 -2.01272308e-04 3.09310164e-04 -3.61705191e-04 6.24262977e-04 -2.04134393e-03 2.15234195e-03 5.01909003e-04 -1.44064175e-05 2.62374939e-05 -4.82504763e-05 7.61444281e-04 7.85654639e-05 4.96465986e-04 1.33942777e-04 -1.69869761e-04 1.82769519e-04 -3.69299930e-04 4.21602203e-04 -5.27290508e-04 3.49006910e-05 7.16933507e-05 -2.68500618e-05 -6.52724471e-05 6.26569537e-05 -1.04985262e-05 2.93623556e-04 2.13952185e-05 2.48095308e-05 1.54900099e-04 -1.41201307e-04 4.93313976e-04 -3.18221861e-04 -6.09837431e-05 -1.56330927e-04 -4.82504763e-05 5.68535943e-04 -1.66881037e-04 -1.04688391e-04 -6.61540361e-04 -1.78478598e-04 3.07874052e-04 -8.04333283e-05 4.92091737e-04 -8.25485959e-04 1.75012809e-04 -4.65051310e-05 -8.80483494e-05 5.07492181e-05 6.26569537e-05 -1.01740622e-04 -1.51776942e-04 4.24490875e-03 3.09310164e-04 -9.56326017e-04 1.01220744e-03 -2.04134393e-03 5.60736566e-03 -6.02318296e-03 -8.81640520e-04 -6.96665863e-04 7.61444281e-04 -1.66881037e-04 -1.83251594e-03 7.39085069e-08 7.40530621e-07 2.51479709e-07 -4.36042049e-07 8.39676984e-08 -7.70932976e-07 1.33672492e-06 -2.57410301e-07 -5.14251336e-08 -2.76301442e-07 5.32067863e-08 2.30657566e-07 -9.22555390e-08 1.69024978e-04 1.55606641e-03 3.23257248e-04 -6.46785904e-04 3.23514311e-04 -1.05874185e-03 2.11837261e-03 -1.05958378e-03 -4.51020151e-05 -1.04030710e-04 5.20348749e-05 7.80362555e-05 -1.04113438e-04 7.40530621e-07 7.41815338e-06 2.52068792e-06 -4.37063464e-06 8.41643901e-07 -7.72498373e-06 1.33943917e-05 -2.57932978e-06 -5.15627864e-07 -2.77041035e-06 5.33492082e-07 2.31274982e-06 -9.25024852e-07 1.55606641e-03 1.38791892e-02 2.87700957e-03 -5.75643469e-03 2.87929745e-03 -9.29471951e-03 1.85972429e-02 -9.30211091e-03 -2.87847916e-04 -6.63939809e-04 3.32094482e-04 4.98039246e-04 -6.64467791e-04 -2.51479709e-07 -2.52068792e-06 -8.42350776e-07 1.48979629e-06 -2.86886931e-07 2.58404773e-06 -4.56939702e-06 8.79919154e-07 1.88904757e-07 9.29396769e-07 -1.78971977e-07 -7.91467165e-07 3.16561174e-07 -3.23257248e-04 -2.87700957e-03 -4.11174673e-04 1.27641016e-03 -6.38444578e-04 1.30267572e-03 -4.12904699e-03 2.06529824e-03 1.33175778e-04 8.11362673e-05 -4.05833576e-05 -1.33599740e-04 1.78244435e-04 4.36042049e-07 4.37063464e-06 1.48979629e-06 -2.56630250e-06 4.97434826e-07 -4.56939702e-06 7.87162964e-06 -1.52569666e-06 -2.95169977e-07 -1.63311438e-06 3.16561174e-07 1.35363869e-06 -5.45287954e-07 6.46785904e-04 5.75643469e-03 1.27641016e-03 -2.32712940e-03 1.27742520e-03 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 -9.85124053e-05 -3.07892219e-04 1.78244435e-04 1.70345115e-04 -3.08137062e-04 -8.39676984e-08 -8.41643901e-07 -2.86886931e-07 4.97434826e-07 -7.89265136e-08 8.79919154e-07 -1.52569666e-06 2.42527231e-07 5.68402603e-08 3.16561174e-07 -5.01800542e-08 -2.67865758e-07 8.70074717e-08 -3.23514311e-04 -2.87929745e-03 -6.38444578e-04 1.27742520e-03 -4.12189685e-04 2.06529824e-03 -4.13233052e-03 1.30595918e-03 4.92746869e-05 1.78244435e-04 -4.06927391e-05 -1.82207444e-04 8.14196439e-05 7.70932976e-07 7.72498373e-06 2.58404773e-06 -4.56939702e-06 8.79919154e-07 -7.92346974e-06 1.40087894e-05 -2.69764304e-06 -5.79303892e-07 -2.85230428e-06 5.49262224e-07 2.42856754e-06 -9.71348181e-07 1.05874185e-03 9.29471951e-03 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -4.08576704e-03 1.32808933e-02 -6.64293860e-03 -3.95340531e-04 -1.79568636e-04 8.98180109e-05 3.70346319e-04 -4.94104034e-04 -1.33672492e-06 -1.33943917e-05 -4.56939702e-06 7.87162964e-06 -1.52569666e-06 1.40087894e-05 -2.41340596e-05 4.67745809e-06 9.06004138e-07 5.01140264e-06 -9.71348181e-07 -4.15406412e-06 1.67327991e-06 -2.11837261e-03 -1.85972429e-02 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 1.32808933e-02 -2.40210442e-02 1.32914546e-02 2.46901725e-04 8.30831883e-04 -4.94104034e-04 -4.26860795e-04 8.31492582e-04 2.57410301e-07 2.57932978e-06 8.79919154e-07 -1.52569666e-06 2.42527231e-07 -2.69764304e-06 4.67745809e-06 -7.44871054e-07 -1.74467307e-07 -9.71348181e-07 1.54267555e-07 8.21831446e-07 -2.67485361e-07 1.05958378e-03 9.30211091e-03 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -6.64293860e-03 1.32914546e-02 -4.09632811e-03 -1.23497189e-04 -4.94104034e-04 9.01392455e-05 5.27771165e-04 -1.80354172e-04 -5.14251336e-08 -5.15627864e-07 -1.88904757e-07 2.95169977e-07 -5.68402603e-08 5.79303892e-07 -9.06004138e-07 1.74467307e-07 2.01046236e-08 2.02503588e-07 -3.89956891e-08 -1.51710916e-07 6.06794418e-08 -4.51020151e-05 -2.87847916e-04 -1.33175778e-04 9.85124053e-05 -4.92746869e-05 3.95340531e-04 -2.46901725e-04 1.23497189e-04 -2.47376814e-05 -2.94110916e-05 1.47110643e-05 3.40589179e-05 -4.54403024e-05 -2.76301442e-07 -2.77041035e-06 -9.29396769e-07 1.63311438e-06 -3.16561174e-07 2.85230428e-06 -5.01140264e-06 9.71348181e-07 2.02503588e-07 1.02323198e-06 -1.98351667e-07 -8.65243592e-07 3.48556542e-07 -1.04030710e-04 -6.63939809e-04 -8.11362673e-05 3.07892219e-04 -1.78244435e-04 1.79568636e-04 -8.30831883e-04 4.94104034e-04 -2.94110916e-05 -9.90479928e-05 4.93234809e-05 6.93450270e-05 -8.48172275e-05 5.32067863e-08 5.33492082e-07 1.78971977e-07 -3.16561174e-07 5.01800542e-08 -5.49262224e-07 9.71348181e-07 -1.54267555e-07 -3.89956891e-08 -1.98351667e-07 3.13931531e-08 1.71236788e-07 -5.55732295e-08 5.20348749e-05 3.32094482e-04 4.05833576e-05 -1.78244435e-04 4.06927391e-05 -8.98180109e-05 4.94104034e-04 -9.01392455e-05 1.47110643e-05 4.93234809e-05 -2.51090313e-05 -2.54484369e-05 4.93480127e-05 2.30657566e-07 2.31274982e-06 7.91467165e-07 -1.35363869e-06 2.67865758e-07 -2.42856754e-06 4.15406412e-06 -8.21831446e-07 -1.51710916e-07 -8.65243592e-07 1.71236788e-07 7.10868853e-07 -2.92904253e-07 7.80362555e-05 4.98039246e-04 1.33599740e-04 -1.70345115e-04 1.82207444e-04 -3.70346319e-04 4.26860795e-04 -5.27771165e-04 3.40589179e-05 6.93450270e-05 -2.54484369e-05 -6.40115708e-05 6.01592062e-05 -9.22555390e-08 -9.25024852e-07 -3.16561174e-07 5.45287954e-07 -8.70074717e-08 9.71348181e-07 -1.67327991e-06 2.67485361e-07 6.06794418e-08 3.48556542e-07 -5.55732295e-08 -2.92904253e-07 9.57009822e-08 -1.04113438e-04 -6.64467791e-04 -1.78244435e-04 3.08137062e-04 -8.14196439e-05 4.94104034e-04 -8.31492582e-04 1.80354172e-04 -4.54403024e-05 -8.48172275e-05 4.93480127e-05 6.01592062e-05 -9.91828370e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -2 1 676 + 1.71619640e-04 1.57748679e-03 3.28090901e-04 -3.27792487e-04 6.55943768e-04 -1.07382250e-03 1.07284581e-03 -2.14686594e-03 -4.53078102e-05 -5.23517311e-05 1.04760765e-04 -7.85707053e-05 -1.04665480e-04 6.96334772e-05 6.95444137e-04 6.75212880e-05 -5.38923083e-05 3.37536749e-04 -2.29166354e-04 1.82909778e-04 -1.14559524e-03 -5.17844955e-05 -6.06000337e-06 3.79548380e-05 -9.24491033e-05 -3.02937621e-05 1.57748679e-03 1.40404080e-02 2.91425705e-03 -2.91160640e-03 5.82639977e-03 -9.40565257e-03 9.39709770e-03 -1.88044812e-02 -2.86362953e-04 -3.30883268e-04 6.62128712e-04 -4.96597364e-04 -6.61526476e-04 6.95444137e-04 6.88660061e-03 6.64083808e-04 -5.30040383e-04 3.31973361e-03 -2.24957515e-03 1.79550481e-03 -1.12455539e-02 -4.65497926e-04 -5.44742006e-05 3.41181240e-04 -8.31037657e-04 -2.72314778e-04 -3.28090901e-04 -2.91425705e-03 -4.16764814e-04 6.46583847e-04 -1.29387543e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 1.33785987e-04 4.03418768e-05 -8.07279110e-05 1.33962540e-04 1.78453961e-04 -6.75212880e-05 -6.64083808e-04 1.96423715e-05 5.39821159e-05 -3.38099229e-04 -7.20547811e-05 -1.82433542e-04 1.14261249e-03 6.45345109e-05 -3.69209931e-06 2.31242497e-05 9.03749573e-05 2.96141050e-05 3.27792487e-04 2.91160640e-03 6.46583847e-04 -4.15588082e-04 1.29269859e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 -4.89367367e-05 -4.02161581e-05 1.78453961e-04 -1.82758178e-04 -8.04031390e-05 5.38923083e-05 5.30040383e-04 5.39821159e-05 4.41901992e-05 2.69854863e-04 -1.82433542e-04 -1.55014611e-04 -9.11979416e-04 -3.48527551e-05 7.31970459e-06 2.96141050e-05 -8.17491728e-05 3.65909680e-05 -6.55943768e-04 -5.82639977e-03 -1.29387543e-03 1.29269859e-03 -2.35640447e-03 4.18182277e-03 -4.17801921e-03 7.58784400e-03 9.79270385e-05 1.78453961e-04 -3.08141237e-04 1.69939378e-04 3.07860969e-04 -3.37536749e-04 -3.31973361e-03 -3.38099229e-04 2.69854863e-04 -1.60287100e-03 1.14261249e-03 -9.11979416e-04 5.41125867e-03 2.18288769e-04 2.96141050e-05 -1.73430210e-04 3.91553957e-04 1.38423816e-04 1.07382250e-03 9.40565257e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -4.13095396e-03 6.71462401e-03 -1.34365977e-02 -3.95895217e-04 -8.78896388e-05 1.75875480e-04 -3.69394268e-04 -4.92076893e-04 2.29166354e-04 2.24957515e-03 -7.20547811e-05 -1.82433542e-04 1.14261249e-03 2.64023264e-04 6.16527017e-04 -3.86141420e-03 -2.13792340e-04 1.35510228e-05 -8.48723746e-05 -2.96482561e-04 -9.71515335e-05 -1.07284581e-03 -9.39709770e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 6.71462401e-03 -4.11873388e-03 1.34243765e-02 1.21458717e-04 8.75217185e-05 -4.92076893e-04 5.27296378e-04 1.74979939e-04 -1.82909778e-04 -1.79550481e-03 -1.82433542e-04 -1.55014611e-04 -9.11979416e-04 6.16527017e-04 5.44382763e-04 3.08199875e-03 1.13506678e-04 -2.58155417e-05 -9.71515335e-05 2.69623742e-04 -1.29051064e-04 2.14686594e-03 1.88044812e-02 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -1.34365977e-02 1.34243765e-02 -2.42736641e-02 -2.43050381e-04 -4.92076893e-04 8.26310254e-04 -4.21871149e-04 -8.25558687e-04 1.14559524e-03 1.12455539e-02 1.14261249e-03 -9.11979416e-04 5.41125867e-03 -3.86141420e-03 3.08199875e-03 -1.82666200e-02 -7.10911748e-04 -9.71515335e-05 5.67149580e-04 -1.27551396e-03 -4.52672053e-04 -4.53078102e-05 -2.86362953e-04 -1.33785987e-04 4.89367367e-05 -9.79270385e-05 3.95895217e-04 -1.21458717e-04 2.43050381e-04 -2.49123633e-05 -1.54651102e-05 3.09471481e-05 -3.48911273e-05 -4.64791119e-05 -5.17844955e-05 -4.65497926e-04 -6.45345109e-05 3.48527551e-05 -2.18288769e-04 2.13792340e-04 -1.13506678e-04 7.10911748e-04 6.42204398e-06 2.79629402e-06 -1.75136679e-05 1.25069991e-05 4.09829887e-06 -5.23517311e-05 -3.30883268e-04 -4.03418768e-05 4.02161581e-05 -1.78453961e-04 8.78896388e-05 -8.75217185e-05 4.92076893e-04 -1.54651102e-05 -2.56512763e-05 5.07406053e-05 -2.68243330e-05 -5.07108039e-05 -6.06000337e-06 -5.44742006e-05 3.69209931e-06 -7.31970459e-06 -2.96141050e-05 -1.35510228e-05 2.58155417e-05 9.71515335e-05 2.79629402e-06 1.85410148e-07 4.13774999e-06 4.95706949e-06 -5.89656912e-06 1.04760765e-04 6.62128712e-04 8.07279110e-05 -1.78453961e-04 3.08141237e-04 -1.75875480e-04 4.92076893e-04 -8.26310254e-04 3.09471481e-05 5.07406053e-05 -1.01831601e-04 7.16616535e-05 8.79770935e-05 3.79548380e-05 3.41181240e-04 -2.31242497e-05 -2.96141050e-05 1.73430210e-04 8.48723746e-05 9.71515335e-05 -5.67149580e-04 -1.75136679e-05 4.13774999e-06 -2.50693783e-05 -1.67530074e-05 -6.69044673e-06 -7.85707053e-05 -4.96597364e-04 -1.33962540e-04 1.82758178e-04 -1.69939378e-04 3.69394268e-04 -5.27296378e-04 4.21871149e-04 -3.48911273e-05 -2.68243330e-05 7.16616535e-05 -6.52662346e-05 -6.26128393e-05 -9.24491033e-05 -8.31037657e-04 -9.03749573e-05 8.17491728e-05 -3.91553957e-04 2.96482561e-04 -2.69623742e-04 1.27551396e-03 1.25069991e-05 4.95706949e-06 -1.67530074e-05 2.38522113e-05 1.90758458e-05 -1.04665480e-04 -6.61526476e-04 -1.78453961e-04 8.04031390e-05 -3.07860969e-04 4.92076893e-04 -1.74979939e-04 8.25558687e-04 -4.64791119e-05 -5.07108039e-05 8.79770935e-05 -6.26128393e-05 -1.01671490e-04 -3.02937621e-05 -2.72314778e-04 -2.96141050e-05 -3.65909680e-05 -1.38423816e-04 9.71515335e-05 1.29051064e-04 4.52672053e-04 4.09829887e-06 -5.89656912e-06 -6.69044673e-06 1.90758458e-05 -2.81117921e-05 3.86191520e-05 4.02133307e-04 1.13344487e-04 -1.20969155e-04 1.13404578e-04 -3.91248844e-04 4.17568098e-04 -3.91456270e-04 -1.81969364e-06 -4.80115579e-05 4.50092463e-05 3.10409001e-06 -4.80370118e-05 1.69076833e-04 1.55649490e-03 3.23354778e-04 -3.23648843e-04 6.46944120e-04 -1.05904640e-03 1.06000952e-03 -2.11886105e-03 -4.51059212e-05 -5.20492749e-05 1.04041689e-04 -7.80311210e-05 -1.04136307e-04 4.02133307e-04 4.18123409e-03 1.17051129e-03 -1.24925142e-03 1.17113185e-03 -4.04560727e-03 4.31775470e-03 -4.04775210e-03 -1.81483078e-05 -4.78832542e-04 4.48889658e-04 3.09579479e-05 -4.79086401e-04 1.55649490e-03 1.38824192e-02 2.87776317e-03 -2.88038026e-03 5.75761390e-03 -9.29696771e-03 9.30542255e-03 -1.86006795e-02 -2.87817072e-04 -3.32122026e-04 6.63881230e-04 -4.97909991e-04 -6.64484976e-04 -1.13344487e-04 -1.17051129e-03 -2.98152175e-04 3.66055833e-04 -3.43165227e-04 1.02614487e-03 -1.26148781e-03 1.18260306e-03 2.95762245e-05 1.23333054e-04 -1.15620656e-04 -9.41155410e-06 1.45647495e-04 -3.23354778e-04 -2.87776317e-03 -4.11290064e-04 6.38705842e-04 -1.27671394e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 1.33188086e-04 4.05852446e-05 -8.11261525e-05 1.33580368e-04 1.78269465e-04 1.20969155e-04 1.24925142e-03 3.66055833e-04 -3.45849143e-04 3.66249903e-04 -1.26148781e-03 1.19051635e-03 -1.26215660e-03 6.95026062e-06 -1.34527160e-04 1.45647495e-04 -1.21925974e-05 -1.34598481e-04 3.23648843e-04 2.88038026e-03 6.38705842e-04 -4.12451239e-04 1.27787501e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 -4.92750067e-05 -4.07103584e-05 1.78269465e-04 -1.82219018e-04 -8.14502486e-05 -1.13404578e-04 -1.17113185e-03 -3.43165227e-04 3.66249903e-04 -2.98515946e-04 1.18260306e-03 -1.26215660e-03 1.02739848e-03 -6.51563927e-06 1.45647495e-04 -1.15704052e-04 -3.02632440e-05 1.23487447e-04 -6.46944120e-04 -5.75761390e-03 -1.27671394e-03 1.27787501e-03 -2.32751856e-03 4.12995589e-03 -4.13371175e-03 7.50169058e-03 9.84961837e-05 1.78269465e-04 -3.07871094e-04 1.70276298e-04 3.08151078e-04 3.91248844e-04 4.04560727e-03 1.02614487e-03 -1.26148781e-03 1.18260306e-03 -3.53694347e-03 4.35349154e-03 -4.08125421e-03 -1.02750661e-04 -4.21065467e-04 3.94734937e-04 3.22340669e-05 -4.98834843e-04 1.05904640e-03 9.29696771e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -4.08670984e-03 6.64539894e-03 -1.32835382e-02 -3.95352170e-04 -8.97947178e-05 1.79491341e-04 -3.70253734e-04 -4.94121524e-04 -4.17568098e-04 -4.31775470e-03 -1.26148781e-03 1.19051635e-03 -1.26215660e-03 4.35349154e-03 -4.10420214e-03 4.35579960e-03 -2.45800046e-05 4.59489366e-04 -4.98834843e-04 4.31026042e-05 4.59732970e-04 -1.06000952e-03 -9.30542255e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 6.64539894e-03 -4.09879125e-03 1.32956185e-02 1.23474085e-04 9.01621275e-05 -4.94121524e-04 5.27766916e-04 1.80389660e-04 3.91456270e-04 4.04775210e-03 1.18260306e-03 -1.26215660e-03 1.02739848e-03 -4.08125421e-03 4.35579960e-03 -3.54126979e-03 2.30429407e-05 -4.98834843e-04 3.95021232e-04 1.04909577e-04 -4.21594254e-04 2.11886105e-03 1.86006795e-02 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -1.32835382e-02 1.32956185e-02 -2.40240613e-02 -2.46813282e-04 -4.94121524e-04 8.30669595e-04 -4.26594825e-04 -8.31425022e-04 -1.81969364e-06 -1.81483078e-05 -2.95762245e-05 -6.95026062e-06 6.51563927e-06 1.02750661e-04 2.45800046e-05 -2.30429407e-05 -1.74665521e-05 7.55389309e-06 -7.08152473e-06 6.09338233e-07 -9.42974844e-06 -4.51059212e-05 -2.87817072e-04 -1.33188086e-04 4.92750067e-05 -9.84961837e-05 3.95352170e-04 -1.23474085e-04 2.46813282e-04 -2.47411303e-05 -1.47282984e-05 2.94405072e-05 -3.40685171e-05 -4.54660846e-05 -4.80115579e-05 -4.78832542e-04 -1.23333054e-04 1.34527160e-04 -1.45647495e-04 4.21065467e-04 -4.59489366e-04 4.98834843e-04 7.55389309e-06 3.15945630e-05 -3.70478846e-05 6.57119291e-06 4.08180468e-05 -5.20492749e-05 -3.32122026e-04 -4.05852446e-05 4.07103584e-05 -1.78269465e-04 8.97947178e-05 -9.01621275e-05 4.94121524e-04 -1.47282984e-05 -2.51275068e-05 4.93575935e-05 -2.54736713e-05 -4.93856874e-05 4.50092463e-05 4.48889658e-04 1.15620656e-04 -1.45647495e-04 1.15704052e-04 -3.94734937e-04 4.98834843e-04 -3.95021232e-04 -7.08152473e-06 -3.70478846e-05 2.68065895e-05 1.22189974e-05 -3.70779227e-05 1.04041689e-04 6.63881230e-04 8.11261525e-05 -1.78269465e-04 3.07871094e-04 -1.79491341e-04 4.94121524e-04 -8.30669595e-04 2.94405072e-05 4.93575935e-05 -9.90964898e-05 6.93765564e-05 8.48872460e-05 3.10409001e-06 3.09579479e-05 9.41155410e-06 1.21925974e-05 3.02632440e-05 -3.22340669e-05 -4.31026042e-05 -1.04909577e-04 6.09338233e-07 6.57119291e-06 1.22189974e-05 -1.81874420e-05 -3.23314547e-06 -7.80311210e-05 -4.97909991e-04 -1.33580368e-04 1.82219018e-04 -1.70276298e-04 3.70253734e-04 -5.27766916e-04 4.26594825e-04 -3.40685171e-05 -2.54736713e-05 6.93765564e-05 -6.40182947e-05 -6.02027351e-05 -4.80370118e-05 -4.79086401e-04 -1.45647495e-04 1.34598481e-04 -1.23487447e-04 4.98834843e-04 -4.59732970e-04 4.21594254e-04 -9.42974844e-06 4.08180468e-05 -3.70779227e-05 -3.23314547e-06 3.16378320e-05 -1.04136307e-04 -6.64484976e-04 -1.78269465e-04 8.14502486e-05 -3.08151078e-04 4.94121524e-04 -1.80389660e-04 8.31425022e-04 -4.54660846e-05 -4.93856874e-05 8.48872460e-05 -6.02027351e-05 -9.92508158e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -2 2 169 + 8.16831096e-07 8.54692732e-06 2.63784829e-06 -1.05681229e-06 4.39773045e-06 -8.58489187e-06 3.43940146e-06 -1.43124381e-05 -4.31988452e-07 -6.37831912e-07 2.65422047e-06 -2.08474415e-06 -1.06337155e-06 8.54692732e-06 8.93151253e-05 2.76648735e-05 -1.10834951e-05 4.61219310e-05 -8.98690212e-05 3.60046053e-05 -1.49826559e-04 -4.54140484e-06 -6.70539436e-06 2.79032683e-05 -2.19164821e-05 -1.11790041e-05 -2.63784829e-06 -2.76648735e-05 -8.21440228e-06 3.43592632e-06 -1.42979769e-05 2.68433096e-05 -1.12163119e-05 4.66746240e-05 1.67360168e-06 1.99887723e-06 -8.31796084e-06 6.82696681e-06 3.48225094e-06 1.05681229e-06 1.10834951e-05 3.43592632e-06 -1.01473418e-06 5.72825885e-06 -1.12163119e-05 3.34055787e-06 -1.86994516e-05 -5.14881149e-07 -6.12550806e-07 3.48225094e-06 -2.82496433e-06 -1.02122375e-06 -4.39773045e-06 -4.61219310e-05 -1.42979769e-05 5.72825885e-06 -2.34752827e-05 4.66746240e-05 -1.86994516e-05 7.66612564e-05 2.14258343e-06 3.48225094e-06 -1.42664844e-05 1.10078004e-05 5.71564187e-06 8.58489187e-06 8.98690212e-05 2.68433096e-05 -1.12163119e-05 4.66746240e-05 -8.74820600e-05 3.65185528e-05 -1.51965257e-04 -5.45917190e-06 -6.55315199e-06 2.72697396e-05 -2.23563044e-05 -1.14033456e-05 -3.43940146e-06 -3.60046053e-05 -1.12163119e-05 3.34055787e-06 -1.86994516e-05 3.65185528e-05 -1.09607859e-05 6.08824823e-05 1.69036688e-06 2.02443933e-06 -1.14033456e-05 9.24350753e-06 3.37507602e-06 1.43124381e-05 1.49826559e-04 4.66746240e-05 -1.86994516e-05 7.66612564e-05 -1.51965257e-04 6.08824823e-05 -2.49681483e-04 -7.03415164e-06 -1.14033456e-05 4.67370481e-05 -3.60781716e-05 -1.87244609e-05 -4.31988452e-07 -4.54140484e-06 -1.67360168e-06 5.14881149e-07 -2.14258343e-06 5.45917190e-06 -1.69036688e-06 7.03415164e-06 -8.38509941e-08 3.79573347e-07 -1.57952484e-06 9.23191508e-07 4.70894994e-07 -6.37831912e-07 -6.70539436e-06 -1.99887723e-06 6.12550806e-07 -3.48225094e-06 6.55315199e-06 -2.02443933e-06 1.14033456e-05 3.79573347e-07 3.54987214e-07 -2.03977935e-06 1.73163274e-06 6.21321090e-07 2.65422047e-06 2.79032683e-05 8.31796084e-06 -3.48225094e-06 1.42664844e-05 -2.72697396e-05 1.14033456e-05 -4.67370481e-05 -1.57952484e-06 -2.03977935e-06 8.35297827e-06 -6.73919858e-06 -3.50042866e-06 -2.08474415e-06 -2.19164821e-05 -6.82696681e-06 2.82496433e-06 -1.10078004e-05 2.23563044e-05 -9.24350753e-06 3.60781716e-05 9.23191508e-07 1.73163274e-06 -6.73919858e-06 5.06983808e-06 2.79343623e-06 -1.06337155e-06 -1.11790041e-05 -3.48225094e-06 1.02122375e-06 -5.71564187e-06 1.14033456e-05 -3.37507602e-06 1.87244609e-05 4.70894994e-07 6.21321090e-07 -3.50042866e-06 2.79343623e-06 1.01815144e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 -1 -2 169 + 1.20532254e-04 1.14730159e-03 -1.15906276e-04 -5.56045463e-04 -1.16090607e-04 3.85288171e-04 1.84837048e-03 3.85900910e-04 -6.83614235e-05 5.15974292e-05 1.07724588e-05 1.18371222e-04 5.16794867e-05 1.14730159e-03 1.06967980e-02 -1.07551456e-03 -5.15964289e-03 -1.07722500e-03 3.54679998e-03 1.70153171e-02 3.55244061e-03 -5.18423830e-04 3.91292860e-04 8.16937255e-05 8.97676778e-04 3.91915149e-04 1.15906276e-04 1.07551456e-03 4.34146551e-05 -5.52431618e-04 -1.15336112e-04 -1.58917178e-04 1.82049443e-03 3.80080976e-04 -8.46557929e-05 -4.35679035e-05 -9.09606261e-06 1.08683270e-04 4.74498407e-05 5.56045463e-04 5.15964289e-03 -5.52431618e-04 -2.49165205e-03 -5.53310173e-04 1.82049443e-03 8.19519337e-03 1.82338963e-03 -2.48608424e-04 2.08316356e-04 4.74498407e-05 4.30451619e-04 2.08647650e-04 1.16090607e-04 1.07722500e-03 -1.15336112e-04 -5.53310173e-04 4.30480989e-05 3.80080976e-04 1.82338963e-03 -1.57709221e-04 -5.19042142e-05 4.74498407e-05 -9.05018523e-06 1.27842976e-04 -4.34171005e-05 -3.85288171e-04 -3.54679998e-03 -1.58917178e-04 1.82049443e-03 3.80080976e-04 5.81401382e-04 -5.98248174e-03 -1.24901646e-03 2.63097441e-04 1.59509000e-04 3.33021268e-05 -3.29268859e-04 -1.43754920e-04 -1.84837048e-03 -1.70153171e-02 1.82049443e-03 8.19519337e-03 1.82338963e-03 -5.98248174e-03 -2.68717526e-02 -5.99199592e-03 7.37302992e-04 -6.25383703e-04 -1.43754920e-04 -1.27658937e-03 -6.26378276e-04 -3.85900910e-04 -3.55244061e-03 3.80080976e-04 1.82338963e-03 -1.57709221e-04 -1.24901646e-03 -5.99199592e-03 5.77431812e-04 1.53933369e-04 -1.43754920e-04 3.31540146e-05 -3.93059986e-04 1.59052124e-04 -6.83614235e-05 -5.18423830e-04 8.46557929e-05 2.48608424e-04 5.19042142e-05 -2.63097441e-04 -7.37302992e-04 -1.53933369e-04 -2.27214126e-05 4.85692413e-06 1.01402368e-06 4.01180111e-05 1.75150529e-05 5.15974292e-05 3.91292860e-04 4.35679035e-05 -2.08316356e-04 -4.74498407e-05 -1.59509000e-04 6.25383703e-04 1.43754920e-04 4.85692413e-06 -3.98591013e-05 -8.73250585e-06 -2.29921336e-05 -8.37688367e-06 1.07724588e-05 8.16937255e-05 9.09606261e-06 -4.74498407e-05 9.05018523e-06 -3.33021268e-05 1.43754920e-04 -3.31540146e-05 1.01402368e-06 -8.73250585e-06 1.44290958e-07 -1.75539249e-06 -8.72318116e-06 1.18371222e-04 8.97676778e-04 -1.08683270e-04 -4.30451619e-04 -1.27842976e-04 3.29268859e-04 1.27658937e-03 3.93059986e-04 4.01180111e-05 -2.29921336e-05 -1.75539249e-06 -6.90382621e-05 -1.57249844e-05 5.16794867e-05 3.91915149e-04 -4.74498407e-05 -2.08647650e-04 4.34171005e-05 1.43754920e-04 6.26378276e-04 -1.59052124e-04 1.75150529e-05 -8.37688367e-06 -8.72318116e-06 -1.57249844e-05 -3.98857244e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 -1 -1 668 + 2.52078031e-03 1.64759450e-02 -3.25105461e-07 -9.30795141e-03 -4.02813944e-06 9.10374471e-07 2.60645309e-02 1.12797715e-05 3.83352702e-05 -4.63830420e-09 -6.63986110e-05 -5.74697701e-08 2.08895479e-02 9.20873866e-02 -1.89676747e-02 -5.30649289e-02 1.89322130e-02 4.43361936e-02 1.24037184e-01 -4.42533032e-02 3.42700738e-03 -4.86761853e-03 1.73664213e-03 -5.94225059e-03 4.85851810e-03 1.64759450e-02 8.12351455e-02 -1.75399033e-06 -5.02177252e-02 -2.17323868e-05 4.13034744e-06 1.18254160e-01 5.11760565e-05 6.31590129e-03 -7.64180646e-07 -3.30709311e-10 -1.09394579e-02 -9.46839279e-06 9.20873866e-02 1.80152843e-01 -5.21379164e-02 -1.45863680e-01 5.20404401e-02 6.61957604e-02 1.85192617e-01 -6.60720016e-02 2.11152401e-02 -2.99914539e-02 1.07001857e-02 -3.66127159e-02 2.99353823e-02 3.25105461e-07 1.75399033e-06 3.24514969e-03 -1.17551164e-06 -5.08718255e-10 -9.16018014e-03 2.98721950e-06 1.29275887e-09 9.57225318e-08 1.70084588e-04 7.36063615e-08 -1.53914899e-07 -1.33217453e-10 1.89676747e-02 5.21379164e-02 8.46120638e-03 -4.38238460e-02 1.56352304e-02 -2.39746264e-02 7.90875822e-02 -2.82164319e-02 9.42958278e-03 2.99720375e-04 -1.06932584e-04 -1.01724039e-02 8.31718681e-03 9.30795141e-03 5.02177252e-02 -1.17551164e-06 -3.04104068e-02 -1.45648885e-05 2.98721950e-06 7.63655869e-02 3.70124103e-05 2.44599452e-03 -3.01889189e-07 -1.33217453e-10 -4.23658515e-03 -3.74048393e-06 5.30649289e-02 1.45863680e-01 -4.38238460e-02 -9.84780914e-02 4.37419135e-02 7.90875822e-02 1.69015521e-01 -7.89397211e-02 1.14287747e-02 -2.02265482e-02 8.31718681e-03 -1.98263470e-02 2.01887329e-02 4.02813944e-06 2.17323868e-05 -5.08718255e-10 -1.45648885e-05 3.24514343e-03 1.29275887e-09 3.70124103e-05 -9.16016422e-03 1.05853658e-06 -1.33217453e-10 5.94060849e-09 -1.98065116e-06 1.70082948e-04 -1.89322130e-02 -5.20404401e-02 1.56352304e-02 4.37419135e-02 8.51972398e-03 -2.82164319e-02 -7.89397211e-02 -2.40802313e-02 -4.07749528e-03 8.31718681e-03 1.18259547e-04 1.32332365e-02 3.30848907e-04 -9.10374471e-07 -4.13034744e-06 -9.16018014e-03 2.98721950e-06 1.29275887e-09 2.47718463e-02 -6.81630736e-06 -2.94984743e-09 -5.14364745e-07 -1.73655412e-03 -7.51516832e-07 7.69597852e-07 6.66107483e-10 -4.43361936e-02 -6.61957604e-02 -2.39746264e-02 7.90875822e-02 -2.82164319e-02 5.90458816e-02 -8.89277983e-02 3.17271700e-02 -2.67406724e-02 -8.51434677e-03 3.03770174e-03 2.53892258e-02 -2.07588036e-02 -2.60645309e-02 -1.18254160e-01 2.98721950e-06 7.63655869e-02 3.70124103e-05 -6.81630736e-06 -1.70382850e-01 -8.44557838e-05 -1.17187506e-02 1.47854212e-06 6.66107483e-10 2.02974633e-02 1.83195134e-05 -1.24037184e-01 -1.85192617e-01 7.90875822e-02 1.69015521e-01 -7.89397211e-02 -8.89277983e-02 -1.57956440e-01 8.87615401e-02 -2.40411301e-02 4.77072889e-02 -2.07588036e-02 4.17181523e-02 -4.76180960e-02 -1.12797715e-05 -5.11760565e-05 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -2.94984743e-09 -8.44557838e-05 2.47718100e-02 -5.07144479e-06 6.66107483e-10 -6.06535786e-08 1.02870302e-05 -1.73654592e-03 4.42533032e-02 6.60720016e-02 -2.82164319e-02 -7.89397211e-02 -2.40802313e-02 3.17271700e-02 8.87615401e-02 5.91646261e-02 8.57726198e-03 -2.07588036e-02 -3.07116259e-03 -3.57995442e-02 -8.59204024e-03 3.83352702e-05 6.31590129e-03 -9.57225318e-08 -2.44599452e-03 -1.05853658e-06 5.14364745e-07 1.17187506e-02 5.07144479e-06 -1.04934184e-03 1.95795826e-07 1.68503499e-03 1.45844276e-06 3.42700738e-03 2.11152401e-02 -9.42958278e-03 -1.14287747e-02 4.07749528e-03 2.67406724e-02 2.40411301e-02 -8.57726198e-03 2.54489451e-03 -4.67588065e-03 1.66823494e-03 -5.58260993e-03 4.56446778e-03 -4.63830420e-09 -7.64180646e-07 -1.70084588e-04 3.01889189e-07 1.33217453e-10 1.73655412e-03 -1.47854212e-06 -6.66107483e-10 1.95795826e-07 1.21428062e-03 5.58596407e-07 -2.48961148e-07 -2.34993022e-10 -4.86761853e-03 -2.99914539e-02 -2.99720375e-04 2.02265482e-02 -8.31718681e-03 8.51434677e-03 -4.77072889e-02 2.07588036e-02 -4.67588065e-03 5.77315873e-03 -2.29285844e-03 7.98888992e-03 -6.55926547e-03 -3.30709311e-10 -7.36063615e-08 1.33217453e-10 -5.94060849e-09 7.51516832e-07 -6.66107483e-10 6.06535786e-08 5.58596407e-07 -7.64858284e-05 -1.46762231e-10 4.50834198e-08 1.73664213e-03 1.07001857e-02 1.06932584e-04 -8.31718681e-03 -1.18259547e-04 -3.03770174e-03 2.07588036e-02 3.07116259e-03 1.66823494e-03 -2.29285844e-03 1.64559903e-04 -2.89260846e-03 2.28834989e-03 -6.63986110e-05 -1.09394579e-02 1.53914899e-07 4.23658515e-03 1.98065116e-06 -7.69597852e-07 -2.02974633e-02 -1.02870302e-05 1.68503499e-03 -2.48961148e-07 -1.46762231e-10 -2.99505024e-03 -3.64328844e-06 -5.94225059e-03 -3.66127159e-02 1.01724039e-02 1.98263470e-02 -1.32332365e-02 -2.53892258e-02 -4.17181523e-02 3.57995442e-02 -5.58260993e-03 7.98888992e-03 -2.89260846e-03 9.00556807e-03 -8.03323107e-03 -5.74697701e-08 -9.46839279e-06 1.33217453e-10 3.74048393e-06 -1.70082948e-04 -6.66107483e-10 -1.83195134e-05 1.73654592e-03 1.45844276e-06 -2.34993022e-10 4.50834198e-08 -3.64328844e-06 1.21427773e-03 4.85851810e-03 2.99353823e-02 -8.31718681e-03 -2.01887329e-02 -3.30848907e-04 2.07588036e-02 4.76180960e-02 8.59204024e-03 4.56446778e-03 -6.55926547e-03 2.28834989e-03 -8.03323107e-03 5.74860952e-03 2.86743884e-05 3.03601879e-04 2.81631572e-05 -1.46483123e-04 -2.81105037e-05 -9.78381575e-05 5.08878985e-04 9.76552406e-05 -2.99417410e-05 -2.07100671e-05 -3.97431736e-06 5.18754913e-05 2.06713478e-05 2.49376946e-03 1.63259218e-02 3.21649074e-07 -9.21801592e-03 3.98531392e-06 -9.01360150e-07 2.58317306e-02 -1.11680818e-05 3.46712384e-05 4.19087540e-09 -6.00523242e-05 5.19260133e-08 3.03601879e-04 3.21575840e-03 2.96494237e-04 -1.54213540e-03 -2.95939916e-04 -1.03197625e-03 5.36754821e-03 1.03004688e-03 -3.08979967e-04 -2.13714888e-04 -4.10124596e-05 5.35322497e-04 2.13315330e-04 1.63259218e-02 8.07851388e-02 1.74007357e-06 -4.98680929e-02 2.15599546e-05 -4.10635424e-06 1.17682412e-01 -5.08787746e-05 6.23186384e-03 7.53274645e-07 -3.25670509e-10 -1.07939008e-02 9.33326466e-06 -2.81631572e-05 -2.96494237e-04 3.23994267e-06 1.48068019e-04 2.84146495e-05 -1.16058529e-05 -5.14065233e-04 -9.86504956e-05 3.64463602e-05 -5.64931562e-06 -1.08411880e-06 -5.28557929e-05 -2.10619784e-05 -3.21649074e-07 -1.74007357e-06 3.21232643e-03 1.16469636e-06 -5.03544437e-10 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 -9.38408078e-08 1.61686673e-04 -6.99035624e-08 1.51253354e-07 -1.30785673e-10 1.46483123e-04 1.54213540e-03 1.48068019e-04 -7.38428346e-04 -1.47791193e-04 -5.14065233e-04 2.56333156e-03 5.13104143e-04 -1.43232336e-04 -1.04610281e-04 -2.10619784e-05 2.48164512e-04 1.04414703e-04 9.21801592e-03 4.98680929e-02 1.16469636e-06 -3.01662544e-02 1.44308845e-05 -2.96379028e-06 7.58614025e-02 -3.67221163e-05 2.40929773e-03 2.96864946e-07 -1.30785673e-10 -4.17302446e-03 3.67823227e-06 2.81105037e-05 2.95939916e-04 2.84146495e-05 -1.47791193e-04 3.34628948e-06 -9.86504956e-05 5.13104143e-04 -1.19750697e-05 -2.74866691e-05 -2.10619784e-05 1.10130512e-06 5.78905140e-05 -5.72814377e-06 -3.98531392e-06 -2.15599546e-05 -5.03544437e-10 1.44308845e-05 3.21232023e-03 1.28136410e-09 -3.67221163e-05 -9.07669659e-03 -1.04163497e-06 -1.30785673e-10 -5.64176189e-09 1.94397114e-06 1.61685063e-04 9.78381575e-05 1.03197625e-03 -1.16058529e-05 -5.14065233e-04 -9.86504956e-05 4.12502670e-05 1.78748358e-03 3.43022888e-04 -1.26668904e-04 2.03418669e-05 3.90365876e-06 1.83463714e-04 7.31066280e-05 9.01360150e-07 4.10635424e-06 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 2.45811607e-02 6.77897519e-06 -2.93081987e-09 5.06317042e-07 -1.69536494e-03 7.32973512e-07 -7.58652036e-07 6.55990858e-10 -5.08878985e-04 -5.36754821e-03 -5.14065233e-04 2.56333156e-03 5.13104143e-04 1.78748358e-03 -8.91220164e-03 -1.78414172e-03 4.96739673e-04 3.62963852e-04 7.31066280e-05 -8.60651966e-04 -3.62285260e-04 -2.58317306e-02 -1.17682412e-01 -2.96379028e-06 7.58614025e-02 -3.67221163e-05 6.77897519e-06 -1.69694857e-01 8.39932287e-05 -1.15738852e-02 -1.45814709e-06 6.55990858e-10 2.00465492e-02 -1.80668138e-05 -9.76552406e-05 -1.03004688e-03 -9.86504956e-05 5.13104143e-04 -1.19750697e-05 3.43022888e-04 -1.78414172e-03 4.25340904e-05 9.53256741e-05 7.31066280e-05 -3.96357634e-06 -2.01080008e-04 2.06154813e-05 1.11680818e-05 5.08787746e-05 1.28136410e-09 -3.67221163e-05 -9.07669659e-03 -2.93081987e-09 8.39932287e-05 2.45811246e-02 5.00384967e-06 6.55990858e-10 5.91569780e-08 -1.01328654e-05 -1.69535687e-03 -2.99417410e-05 -3.08979967e-04 -3.64463602e-05 1.43232336e-04 2.74866691e-05 1.26668904e-04 -4.96739673e-04 -9.53256741e-05 2.11830416e-05 2.24524588e-05 4.30868700e-06 -3.79536642e-05 -1.51237776e-05 3.46712384e-05 6.23186384e-03 9.38408078e-08 -2.40929773e-03 1.04163497e-06 -5.06317042e-07 1.15738852e-02 -5.00384967e-06 -1.04403562e-03 -1.94273263e-07 1.67802194e-03 -1.45095116e-06 -2.07100671e-05 -2.13714888e-04 5.64931562e-06 1.04610281e-04 2.10619784e-05 -2.03418669e-05 -3.62963852e-04 -7.31066280e-05 2.24524588e-05 -7.98862250e-06 -1.54975750e-06 -3.04690229e-05 -1.30119923e-05 4.19087540e-09 7.53274645e-07 -1.61686673e-04 -2.96864946e-07 1.30785673e-10 1.69536494e-03 1.45814709e-06 -6.55990858e-10 -1.94273263e-07 1.20161446e-03 -5.52030007e-07 2.47383923e-07 -2.33170086e-10 -3.97431736e-06 -4.10124596e-05 1.08411880e-06 2.10619784e-05 -1.10130512e-06 -3.90365876e-06 -7.31066280e-05 3.96357634e-06 4.30868700e-06 -1.54975750e-06 -2.10278033e-07 -7.46477330e-06 1.56260546e-06 -3.25670509e-10 6.99035624e-08 1.30785673e-10 5.64176189e-09 -7.32973512e-07 -6.55990858e-10 -5.91569780e-08 -5.52030007e-07 -7.52286023e-05 -1.45478430e-10 -4.45534560e-08 5.18754913e-05 5.35322497e-04 5.28557929e-05 -2.48164512e-04 -5.78905140e-05 -1.83463714e-04 8.60651966e-04 2.01080008e-04 -3.79536642e-05 -3.04690229e-05 -7.46477330e-06 6.50454066e-05 3.46190392e-05 -6.00523242e-05 -1.07939008e-02 -1.51253354e-07 4.17302446e-03 -1.94397114e-06 7.58652036e-07 -2.00465492e-02 1.01328654e-05 1.67802194e-03 2.47383923e-07 -1.45478430e-10 -2.98164606e-03 3.61717981e-06 2.06713478e-05 2.13315330e-04 2.10619784e-05 -1.04414703e-04 5.72814377e-06 -7.31066280e-05 3.62285260e-04 -2.06154813e-05 -1.51237776e-05 -1.30119923e-05 1.56260546e-06 3.46190392e-05 -8.03732216e-06 5.19260133e-08 9.33326466e-06 1.30785673e-10 -3.67823227e-06 -1.61685063e-04 -6.55990858e-10 1.80668138e-05 1.69535687e-03 -1.45095116e-06 -2.33170086e-10 -4.45534560e-08 3.61717981e-06 1.20161159e-03 + 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 258 282 308 334 359 385 411 437 463 489 515 541 566 592 616 642 668 +1 -1 0 676 + 3.93376184e-02 1.43812330e-01 -4.93149668e-06 -7.05611715e-02 7.05692375e-02 1.04449263e-05 1.49448795e-01 -1.49465879e-01 1.23041896e-02 -1.48928208e-06 1.48945232e-06 2.43604152e-06 2.13114816e-02 1.59214781e-02 7.49621864e-02 -1.45097888e-02 -1.15777953e-02 4.34981874e-02 3.50326952e-02 2.79536374e-02 -1.05022806e-01 2.34372060e-03 -8.49746770e-04 3.19252873e-03 4.44634379e-03 2.54741435e-03 1.43812330e-01 2.07135892e-01 -1.00434680e-05 -1.43704622e-01 1.43721049e-01 1.05141295e-05 1.50438973e-01 -1.50456170e-01 2.76747208e-02 -3.34970988e-06 3.35009279e-06 5.47917180e-06 4.79340224e-02 7.49621864e-02 1.67042811e-01 -4.43509360e-02 -3.53889409e-02 1.32957505e-01 6.16457010e-02 4.91889522e-02 -1.84804637e-01 2.06547652e-02 -7.48865714e-03 2.81351503e-02 3.91847846e-02 2.24498796e-02 4.93149668e-06 1.00434680e-05 4.38001625e-02 -7.92516748e-06 7.92607343e-06 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 3.48998183e-06 1.48228696e-02 -1.48245640e-02 4.54127846e-10 3.97289502e-06 1.45097888e-02 4.43509360e-02 6.48790170e-03 -9.66179294e-03 3.62996985e-02 -1.89218241e-02 1.84117933e-02 -6.91737598e-02 6.99094766e-03 -3.62986870e-07 1.36375454e-06 8.69940048e-03 4.98409000e-03 7.05611715e-02 1.43704622e-01 -7.92516748e-06 -6.95952497e-02 1.13408375e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 2.42616285e-02 -2.93647550e-06 3.97289502e-06 1.48293676e-02 4.20206786e-02 1.15777953e-02 3.53889409e-02 -9.66179294e-03 1.08870402e-02 2.89646172e-02 1.84117933e-02 -2.73049501e-02 -5.51958159e-02 2.69928704e-03 7.56527371e-04 4.98409000e-03 8.60370354e-03 -2.26795646e-03 -7.05692375e-02 -1.43721049e-01 7.92607343e-06 1.13408375e-01 -6.96211764e-02 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 -2.42644019e-02 3.97289502e-06 -2.93738375e-06 1.48180658e-02 -4.20288712e-02 -4.34981874e-02 -1.32957505e-01 3.62996985e-02 2.89646172e-02 -9.02246192e-02 -6.91737598e-02 -5.51958159e-02 1.65376365e-01 -1.01413171e-02 4.98409000e-03 -1.66422736e-02 -1.98345966e-02 -1.32793688e-02 -1.04449263e-05 -1.05141295e-05 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 1.23594998e-01 -1.11023371e-05 1.11036062e-05 -6.33444089e-06 -3.73055268e-02 3.73097913e-02 -6.58066333e-10 -5.75703181e-06 -3.50326952e-02 -6.16457010e-02 -1.89218241e-02 1.84117933e-02 -6.91737598e-02 4.98422119e-02 -2.30269492e-02 8.65130641e-02 -2.23688827e-02 -1.34340094e-03 5.04720493e-03 -2.54143428e-02 -1.45604714e-02 -1.49448795e-01 -1.50438973e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -1.11023371e-05 -3.52602051e-02 1.58873363e-01 -2.60198035e-02 3.14910296e-06 -5.75703181e-06 -3.73149430e-02 -4.50633570e-02 -2.79536374e-02 -4.91889522e-02 1.84117933e-02 -2.73049501e-02 -5.51958159e-02 -2.30269492e-02 6.03266777e-02 6.90313664e-02 -7.10944542e-03 -3.89504815e-03 -1.45604714e-02 -2.64792361e-02 1.16767746e-02 1.49465879e-01 1.50456170e-01 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 1.11036062e-05 1.58873363e-01 -3.52965257e-02 2.60227779e-02 -5.75703181e-06 3.15041910e-06 -3.73003748e-02 4.50770378e-02 1.05022806e-01 1.84804637e-01 -6.91737598e-02 -5.51958159e-02 1.65376365e-01 8.65130641e-02 6.90313664e-02 -1.80652720e-01 2.67104384e-02 -1.45604714e-02 4.69336374e-02 5.28934061e-02 3.74497558e-02 1.23041896e-02 2.76747208e-02 -3.48998183e-06 -2.42616285e-02 2.42644019e-02 6.33444089e-06 2.60198035e-02 -2.60227779e-02 1.65141115e-02 -2.95659433e-06 2.95693230e-06 3.25513784e-06 2.84772691e-02 2.34372060e-03 2.06547652e-02 -6.99094766e-03 -2.69928704e-03 1.01413171e-02 2.23688827e-02 7.10944542e-03 -2.67104384e-02 1.83559694e-03 -4.59919079e-04 1.72793228e-03 3.84583379e-03 2.20336812e-03 -1.48928208e-06 -3.34970988e-06 -1.48228696e-02 2.93647550e-06 -3.97289502e-06 3.73055268e-02 -3.14910296e-06 5.75703181e-06 -2.95659433e-06 -7.91184381e-03 7.98550905e-03 -5.58562361e-07 -4.00482622e-06 -8.49746770e-04 -7.48865714e-03 3.62986870e-07 -7.56527371e-04 -4.98409000e-03 1.34340094e-03 3.89504815e-03 1.45604714e-02 -4.59919079e-04 -6.39026659e-05 -1.22746087e-03 -8.87662295e-04 -1.19619431e-03 1.48945232e-06 3.35009279e-06 1.48245640e-02 -3.97289502e-06 2.93738375e-06 -3.73097913e-02 5.75703181e-06 -3.15041910e-06 2.95693230e-06 7.98550905e-03 -7.91366940e-03 -5.57582947e-07 4.00541161e-06 3.19252873e-03 2.81351503e-02 -1.36375454e-06 -4.98409000e-03 1.66422736e-02 -5.04720493e-03 1.45604714e-02 -4.69336374e-02 1.72793228e-03 -1.22746087e-03 4.22100136e-03 4.52827279e-03 2.41132828e-03 2.43604152e-06 5.47917180e-06 -4.54127846e-10 -1.48293676e-02 -1.48180658e-02 6.58066333e-10 3.73149430e-02 3.73003748e-02 3.25513784e-06 -5.58562361e-07 -5.57582947e-07 -1.58982655e-02 7.46365585e-06 4.44634379e-03 3.91847846e-02 -8.69940048e-03 -8.60370354e-03 1.98345966e-02 2.54143428e-02 2.64792361e-02 -5.28934061e-02 3.84583379e-03 -8.87662295e-04 4.52827279e-03 6.80144856e-03 3.13716200e-03 2.13114816e-02 4.79340224e-02 -3.97289502e-06 -4.20206786e-02 4.20288712e-02 5.75703181e-06 4.50633570e-02 -4.50770378e-02 2.84772691e-02 -4.00482622e-06 4.00541161e-06 7.46365585e-06 4.93968293e-02 2.54741435e-03 2.24498796e-02 -4.98409000e-03 2.26795646e-03 1.32793688e-02 1.45604714e-02 -1.16767746e-02 -3.74497558e-02 2.20336812e-03 -1.19619431e-03 2.41132828e-03 3.13716200e-03 3.12309261e-03 9.13413085e-03 4.82140963e-02 8.36708994e-03 -2.67873350e-02 8.38039646e-03 -2.13033914e-02 6.82030534e-02 -2.13372711e-02 1.01368559e-03 1.21499085e-03 -3.80108923e-04 -1.75454691e-03 1.21692310e-03 3.89331986e-02 1.42829079e-01 4.88176312e-06 -6.99865125e-02 6.99785278e-02 -1.03594733e-05 1.48516712e-01 -1.48499767e-01 1.21287926e-02 1.46551442e-06 -1.46534722e-06 -2.39689066e-06 2.10076849e-02 4.82140963e-02 1.40311851e-01 3.10388719e-02 -9.93713065e-02 3.10882342e-02 -5.20225384e-02 1.66550757e-01 -5.21052719e-02 1.64442577e-02 1.97098813e-02 -6.16622068e-03 -2.84626926e-02 1.97412267e-02 1.42829079e-01 2.06779927e-01 9.99851519e-06 -1.43341901e-01 1.43325548e-01 -1.04981073e-05 1.50504214e-01 -1.50487043e-01 2.77767575e-02 3.35624824e-06 -3.35586533e-06 -5.48923978e-06 4.81107552e-02 -8.36708994e-03 -3.10388719e-02 3.78907840e-03 2.28612530e-02 -7.15212483e-03 -1.16714566e-02 -4.80867174e-02 1.50438913e-02 -3.66479620e-03 -3.48771916e-04 1.09113017e-04 4.58073089e-03 -3.17711497e-03 -4.88176312e-06 -9.99851519e-06 4.33830748e-02 7.86401912e-06 -7.86312192e-06 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 -3.44741836e-06 1.46430081e-02 -1.46413375e-02 4.48205055e-10 -3.92831877e-06 2.67873350e-02 9.93713065e-02 2.28612530e-02 -6.22607183e-02 2.28976102e-02 -4.80867174e-02 1.27258720e-01 -4.81631917e-02 6.84279107e-03 9.27355549e-03 -3.17711497e-03 -1.18419644e-02 9.28830360e-03 6.99865125e-02 1.43341901e-01 7.86401912e-06 -6.93580099e-02 1.12728223e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 2.40608543e-02 2.90737451e-06 -3.92831877e-06 1.46365828e-02 4.16762926e-02 -8.38039646e-03 -3.10882342e-02 -7.15212483e-03 2.28976102e-02 3.76634783e-03 1.50438913e-02 -4.81631917e-02 -1.16236447e-02 -2.14076175e-03 -3.17711497e-03 1.12093704e-04 5.47128247e-03 -3.58869286e-04 -6.99785278e-02 -1.43325548e-01 -7.86312192e-06 1.12728223e-01 -6.93322862e-02 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -2.40581092e-02 -3.92831877e-06 2.90647810e-06 1.46477626e-02 -4.16681967e-02 2.13033914e-02 5.20225384e-02 -1.16714566e-02 -4.80867174e-02 1.50438913e-02 3.41164258e-02 7.47499637e-02 -2.33854667e-02 1.40773202e-02 -8.59733987e-04 2.68967095e-04 -1.66369942e-02 1.15391287e-02 1.03594733e-05 1.04981073e-05 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 1.23008948e-01 1.10829756e-05 -1.10817111e-05 6.30793787e-06 -3.70743003e-02 3.70700705e-02 -6.56460776e-10 5.75358792e-06 -6.82030534e-02 -1.66550757e-01 -4.80867174e-02 1.27258720e-01 -4.81631917e-02 7.47499637e-02 -1.81848111e-01 7.48688416e-02 -2.36249776e-02 -3.30169034e-02 1.15391287e-02 4.08829883e-02 -3.30694115e-02 -1.48516712e-01 -1.50504214e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 1.10829756e-05 -3.58801230e-02 1.58870944e-01 -2.62180358e-02 -3.16820394e-06 5.75358792e-06 -3.70648895e-02 -4.54151998e-02 2.13372711e-02 5.21052719e-02 1.50438913e-02 -4.81631917e-02 -1.16236447e-02 -2.33854667e-02 7.48688416e-02 3.40421031e-02 7.39105545e-03 1.15391287e-02 2.57085073e-04 -2.05366950e-02 -8.23060828e-04 1.48499767e-01 1.50487043e-01 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -1.10817111e-05 1.58870944e-01 -3.58438699e-02 2.62150446e-02 5.75358792e-06 -3.16689102e-06 -3.70794811e-02 4.54015593e-02 1.01368559e-03 1.64442577e-02 3.66479620e-03 -6.84279107e-03 2.14076175e-03 -1.40773202e-02 2.36249776e-02 -7.39105545e-03 4.22755686e-04 -1.07459687e-03 3.36186776e-04 -5.05815484e-04 3.50824789e-04 1.21287926e-02 2.77767575e-02 3.44741836e-06 -2.40608543e-02 2.40581092e-02 -6.30793787e-06 2.62180358e-02 -2.62150446e-02 1.63155837e-02 2.90562388e-06 -2.90529238e-06 -3.21565109e-06 2.81837574e-02 1.21499085e-03 1.97098813e-02 3.48771916e-04 -9.27355549e-03 3.17711497e-03 8.59733987e-04 3.30169034e-02 -1.15391287e-02 -1.07459687e-03 1.78855359e-03 -5.99102215e-04 2.15249823e-04 -4.62502263e-04 1.46551442e-06 3.35624824e-06 -1.46430081e-02 -2.90737451e-06 3.92831877e-06 3.70743003e-02 3.16820394e-06 -5.75358792e-06 2.90562388e-06 -7.73263348e-03 7.77543003e-03 5.41908480e-07 3.94790847e-06 -3.80108923e-04 -6.16622068e-03 -1.09113017e-04 3.17711497e-03 -1.12093704e-04 -2.68967095e-04 -1.15391287e-02 -2.57085073e-04 3.36186776e-04 -5.99102215e-04 6.09950699e-05 -5.82069010e-04 -5.97436336e-04 -1.46534722e-06 -3.35586533e-06 1.46413375e-02 3.92831877e-06 -2.90647810e-06 -3.70700705e-02 -5.75358792e-06 3.16689102e-06 -2.90529238e-06 7.77543003e-03 -7.73085920e-03 5.42871179e-07 -3.94733429e-06 -1.75454691e-03 -2.84626926e-02 -4.58073089e-03 1.18419644e-02 -5.47128247e-03 1.66369942e-02 -4.08829883e-02 2.05366950e-02 -5.05815484e-04 2.15249823e-04 -5.82069010e-04 1.00928788e-03 1.03954640e-03 -2.39689066e-06 -5.48923978e-06 -4.48205055e-10 -1.46365828e-02 -1.46477626e-02 6.56460776e-10 3.70648895e-02 3.70794811e-02 -3.21565109e-06 5.41908480e-07 5.42871179e-07 -1.55071762e-02 -7.34396046e-06 1.21692310e-03 1.97412267e-02 3.17711497e-03 -9.28830360e-03 3.58869286e-04 -1.15391287e-02 3.30694115e-02 8.23060828e-04 3.50824789e-04 -4.62502263e-04 -5.97436336e-04 1.03954640e-03 1.78708369e-03 2.10076849e-02 4.81107552e-02 3.92831877e-06 -4.16762926e-02 4.16681967e-02 -5.75358792e-06 4.54151998e-02 -4.54015593e-02 2.81837574e-02 3.94790847e-06 -3.94733429e-06 -7.34396046e-06 4.88593834e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -1 1 668 + 2.51919723e-03 1.64671600e-02 -3.24902890e-07 4.55704780e-06 9.30268310e-03 9.09846362e-07 -1.27613927e-05 -2.60508990e-02 3.81198897e-05 4.61198093e-09 6.60255543e-05 -6.46870749e-08 5.23188812e-05 5.33933100e-04 -5.09689763e-05 6.12540461e-05 2.54721125e-04 1.74532039e-04 -2.09750997e-04 -8.72236420e-04 -4.39586076e-05 -7.49406223e-06 -3.11635897e-05 -7.33679930e-05 3.74521150e-05 1.64671600e-02 8.12088709e-02 -1.75317606e-06 2.45898309e-05 5.01972800e-02 4.12894643e-06 -5.79120927e-05 -1.18220802e-01 6.31097933e-03 3.74031330e-10 7.63541461e-07 1.09309316e-02 -1.07093382e-05 5.33933100e-04 5.42487621e-03 -5.14203684e-04 6.17965249e-04 2.56976989e-03 1.76077461e-03 -2.11608271e-03 -8.79959777e-03 -4.18595403e-04 -7.13621330e-05 -2.96754973e-04 -6.98645983e-04 3.56637392e-04 3.24902890e-07 1.75317606e-06 3.24322663e-03 5.75530342e-10 1.17487826e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 9.56120788e-08 -8.30764056e-08 -1.69590820e-04 1.53758742e-07 -1.50641723e-10 5.09689763e-05 5.14203684e-04 1.21313927e-05 6.15988994e-05 2.56155176e-04 -4.44544244e-05 -2.10343994e-04 -8.74702363e-04 -5.45557124e-05 3.70261553e-06 1.53970954e-05 -7.31373167e-05 3.73343618e-05 -4.55704780e-06 -2.45898309e-05 5.75530342e-10 3.24321860e-03 -1.64786973e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 -1.19715064e-06 5.92300780e-09 -1.50641723e-10 -2.23967753e-06 -1.69588718e-04 -6.12540461e-05 -6.17965249e-04 6.15988994e-05 -1.06416713e-05 -3.07844930e-04 -2.10343994e-04 3.33095825e-05 1.05120924e-03 4.62121485e-05 -3.19077277e-07 3.73343618e-05 9.90688690e-05 1.59461164e-06 -9.30268310e-03 -5.01972800e-02 1.17487826e-06 -1.64786973e-05 -3.03961175e-02 -2.98584860e-06 4.18791437e-05 7.63361082e-02 -2.44384381e-03 -1.50641723e-10 -3.01594476e-07 -4.23285954e-03 4.23012686e-06 -2.54721125e-04 -2.56976989e-03 2.56155176e-04 -3.07844930e-04 -1.21676659e-03 -8.74702363e-04 1.05120924e-03 4.15190808e-03 1.92170333e-04 3.73343618e-05 1.45955556e-04 3.19046297e-04 -1.75408043e-04 -9.09846362e-07 -4.12894643e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 2.47606941e-02 3.33799472e-09 6.81412802e-06 -5.13892822e-07 8.49490276e-07 1.73413560e-03 -7.68956244e-07 7.53367854e-10 -1.74532039e-04 -1.76077461e-03 -4.44544244e-05 -2.10343994e-04 -8.74702363e-04 1.62545668e-04 7.18879714e-04 2.98941639e-03 1.84493181e-04 -1.35678454e-05 -5.64210375e-05 2.45889231e-04 -1.25518927e-04 1.27613927e-05 5.79120927e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 3.33799472e-09 2.47606475e-02 -9.55741178e-05 5.73643688e-06 -6.05655645e-08 7.53367854e-10 1.16347756e-05 1.73412509e-03 2.09750997e-04 2.11608271e-03 -2.10343994e-04 3.33095825e-05 1.05120924e-03 7.18879714e-04 -1.03223589e-04 -3.59265307e-03 -1.54719851e-04 2.00433142e-06 -1.25518927e-04 -3.34191239e-04 -1.00167904e-05 2.60508990e-02 1.18220802e-01 -2.98584860e-06 4.18791437e-05 7.63361082e-02 6.81412802e-06 -9.55741178e-05 -1.70342752e-01 1.17102688e-02 7.53367854e-10 1.47734692e-06 2.02827699e-02 -2.07210855e-05 8.72236420e-04 8.79959777e-03 -8.74702363e-04 1.05120924e-03 4.15190808e-03 2.98941639e-03 -3.59265307e-03 -1.41791040e-02 -6.43392836e-04 -1.25518927e-04 -4.89774130e-04 -1.06798483e-03 5.88606037e-04 3.81198897e-05 6.31097933e-03 -9.56120788e-08 1.19715064e-06 2.44384381e-03 5.13892822e-07 -5.73643688e-06 -1.17102688e-02 -1.04903361e-03 -1.95706982e-07 -1.68462869e-03 1.65047766e-06 -4.39586076e-05 -4.18595403e-04 5.45557124e-05 -4.62121485e-05 -1.92170333e-04 -1.84493181e-04 1.54719851e-04 6.43392836e-04 1.46018896e-05 5.20693732e-06 2.16527236e-05 2.56290823e-05 -1.30828621e-05 3.74031330e-10 8.30764056e-08 -5.92300780e-09 1.50641723e-10 -8.49490276e-07 6.05655645e-08 -7.53367854e-10 -7.64120124e-05 6.31900794e-07 -1.66051241e-10 -4.50523593e-08 -7.49406223e-06 -7.13621330e-05 -3.70261553e-06 3.19077277e-07 -3.73343618e-05 1.35678454e-05 -2.00433142e-06 1.25518927e-04 5.20693732e-06 -5.65918530e-07 -4.39091325e-06 8.74489962e-06 2.51514338e-06 4.61198093e-09 7.63541461e-07 1.69590820e-04 1.50641723e-10 3.01594476e-07 -1.73413560e-03 -7.53367854e-10 -1.47734692e-06 -1.95706982e-07 6.31900794e-07 1.21353966e-03 -2.48869296e-07 2.65893782e-10 -3.11635897e-05 -2.96754973e-04 -1.53970954e-05 -3.73343618e-05 -1.45955556e-04 5.64210375e-05 1.25518927e-04 4.89774130e-04 2.16527236e-05 -4.39091325e-06 -1.77693524e-05 2.39329384e-05 -1.38953425e-05 6.60255543e-05 1.09309316e-02 -1.53758742e-07 2.23967753e-06 4.23285954e-03 7.68956244e-07 -1.16347756e-05 -2.02827699e-02 -1.68462869e-03 -1.66051241e-10 -2.48869296e-07 -2.99427218e-03 4.12251080e-06 -7.33679930e-05 -6.98645983e-04 7.31373167e-05 -9.90688690e-05 -3.19046297e-04 -2.45889231e-04 3.34191239e-04 1.06798483e-03 2.56290823e-05 8.74489962e-06 2.39329384e-05 3.98514227e-05 -3.62328248e-05 -6.46870749e-08 -1.07093382e-05 1.50641723e-10 1.69588718e-04 -4.23012686e-06 -7.53367854e-10 -1.73412509e-03 2.07210855e-05 1.65047766e-06 -4.50523593e-08 2.65893782e-10 4.12251080e-06 1.21353595e-03 3.74521150e-05 3.56637392e-04 -3.73343618e-05 -1.59461164e-06 1.75408043e-04 1.25518927e-04 1.00167904e-05 -5.88606037e-04 -1.30828621e-05 2.51514338e-06 -1.38953425e-05 -3.62328248e-05 -1.26322554e-05 1.20137032e-02 6.01082515e-02 1.09807340e-02 -1.31965450e-02 3.29565989e-02 -2.72845593e-02 3.27903320e-02 -8.18894506e-02 1.54856066e-03 7.62745269e-04 -1.90485388e-03 2.40019942e-03 2.28923584e-03 2.49533627e-03 1.63346318e-02 3.21849571e-07 -4.51422233e-06 9.22323548e-03 -9.01883251e-07 1.26497031e-05 -2.58452468e-02 3.48831445e-05 -4.21672991e-09 6.04193497e-05 5.91433329e-08 6.01082515e-02 1.53434765e-01 3.71385764e-02 -4.46327989e-02 1.11464421e-01 -5.68116881e-02 6.82757633e-02 -1.70509550e-01 1.89042825e-02 9.31132532e-03 -2.32537845e-02 2.93007883e-02 2.79461840e-02 1.63346318e-02 8.08113414e-02 1.74088221e-06 -2.44173988e-05 4.98884199e-02 -4.10775119e-06 5.76148107e-05 -1.17715728e-01 6.23674190e-03 3.68992533e-10 -7.53907267e-07 1.08023487e-02 1.05742102e-05 -1.09807340e-02 -3.71385764e-02 4.93089213e-03 1.11345143e-02 -2.78069541e-02 -1.48036826e-02 -2.23449951e-02 5.58036244e-02 -5.07388648e-03 -8.69963759e-05 2.17261766e-04 -5.42599424e-03 -5.17514519e-03 -3.21849571e-07 -1.74088221e-06 3.21423107e-03 5.70356528e-10 -1.16532421e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 -9.39497938e-08 7.93736167e-08 -1.62172242e-04 -1.51407575e-07 -1.48209947e-10 1.31965450e-02 4.46327989e-02 1.11345143e-02 8.14471088e-04 3.34181412e-02 -2.23449951e-02 -6.54275578e-03 -6.70642816e-02 3.26186593e-03 7.09859373e-04 -5.17514519e-03 8.15820833e-03 2.13050881e-03 4.51422233e-06 2.44173988e-05 5.70356528e-10 3.21422311e-03 1.63446934e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 1.18024906e-06 -5.65901208e-09 -1.48209947e-10 2.20299756e-06 -1.62170174e-04 -3.29565989e-02 -1.11464421e-01 -2.78069541e-02 3.34181412e-02 -6.92614920e-02 5.58036244e-02 -6.70642816e-02 1.34087272e-01 -8.14607210e-03 -5.17514519e-03 1.15618479e-02 -1.21961637e-02 -1.38949222e-02 -9.22323548e-03 -4.98884199e-02 -1.16532421e-06 1.63446934e-05 -3.01804370e-02 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -2.41142642e-03 -1.48209947e-10 2.97156138e-07 -4.17671101e-03 -4.16787528e-06 2.72845593e-02 5.68116881e-02 -1.48036826e-02 -2.23449951e-02 5.58036244e-02 4.13333807e-02 3.12575333e-02 -7.80614917e-02 1.79649714e-02 -9.44586949e-04 2.35897905e-03 1.79454777e-02 1.71158406e-02 9.01883251e-07 4.10775119e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 2.45922452e-02 3.31896716e-09 -6.78114931e-06 5.06783606e-07 -8.30946994e-07 1.69774974e-03 7.59286878e-07 7.43251239e-10 -3.27903320e-02 -6.82757633e-02 -2.23449951e-02 -6.54275578e-03 -6.70642816e-02 3.12575333e-02 2.97774956e-02 9.38135816e-02 -1.00765461e-02 -1.32233329e-03 1.71158406e-02 -2.82140847e-02 -3.96873358e-03 -1.26497031e-05 -5.76148107e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 3.31896716e-09 2.45921989e-02 9.51115626e-05 -5.66884180e-06 5.92434932e-08 7.43251239e-10 -1.14806110e-05 1.69773937e-03 8.18894506e-02 1.70509550e-01 5.58036244e-02 -6.70642816e-02 1.34087272e-01 -7.80614917e-02 9.38135816e-02 -1.66944310e-01 2.51648207e-02 1.71158406e-02 -3.72132887e-02 3.72590354e-02 4.47225876e-02 2.58452468e-02 1.17715728e-01 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -6.78114931e-06 9.51115626e-05 -1.69734988e-01 1.15822968e-02 7.43251239e-10 -1.45933026e-06 2.00611161e-02 2.04683860e-05 1.54856066e-03 1.89042825e-02 5.07388648e-03 -3.26186593e-03 8.14607210e-03 -1.79649714e-02 1.00765461e-02 -2.51648207e-02 1.04765907e-03 -5.80092890e-05 1.44870409e-04 1.55858346e-03 1.48652862e-03 3.48831445e-05 6.23674190e-03 9.39497938e-08 -1.18024906e-06 2.41142642e-03 -5.06783606e-07 5.66884180e-06 -1.15822968e-02 -1.04434616e-03 1.94361970e-07 -1.67843343e-03 -1.64298602e-06 7.62745269e-04 9.31132532e-03 8.69963759e-05 -7.09859373e-04 5.17514519e-03 9.44586949e-04 1.32233329e-03 -1.71158406e-02 -5.80092890e-05 2.22463031e-04 -1.11427933e-03 -1.23496461e-04 9.84675374e-04 3.68992533e-10 -7.93736167e-08 5.65901208e-09 1.48209947e-10 8.30946994e-07 -5.92434932e-08 -7.43251239e-10 -7.53013993e-05 -6.25334397e-07 -1.64767438e-10 4.45841973e-08 -1.90485388e-03 -2.32537845e-02 -2.17261766e-04 5.17514519e-03 -1.15618479e-02 -2.35897905e-03 -1.71158406e-02 3.72132887e-02 1.44870409e-04 -1.11427933e-03 2.55904414e-03 -1.28714748e-03 -7.86191236e-04 -4.21672991e-09 -7.53907267e-07 1.62172242e-04 1.48209947e-10 -2.97156138e-07 -1.69774974e-03 -7.43251239e-10 1.45933026e-06 1.94361970e-07 -6.25334397e-07 1.20235056e-03 2.47475994e-07 2.64070842e-10 2.40019942e-03 2.93007883e-02 5.42599424e-03 -8.15820833e-03 1.21961637e-02 -1.79454777e-02 2.82140847e-02 -3.72590354e-02 1.55858346e-03 -1.23496461e-04 -1.28714748e-03 2.90539462e-03 5.88115344e-04 6.04193497e-05 1.08023487e-02 1.51407575e-07 -2.20299756e-06 4.17671101e-03 -7.59286878e-07 1.14806110e-05 -2.00611161e-02 -1.67843343e-03 -1.64767438e-10 2.47475994e-07 -2.98243108e-03 -4.09640213e-06 2.28923584e-03 2.79461840e-02 5.17514519e-03 -2.13050881e-03 1.38949222e-02 -1.71158406e-02 3.96873358e-03 -4.47225876e-02 1.48652862e-03 9.84675374e-04 -7.86191236e-04 5.88115344e-04 2.84969841e-03 5.91433329e-08 1.05742102e-05 1.48209947e-10 1.62170174e-04 4.16787528e-06 -7.43251239e-10 -1.69773937e-03 -2.04683860e-05 -1.64298602e-06 4.45841973e-08 2.64070842e-10 -4.09640213e-06 1.20234688e-03 + 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 256 282 308 334 359 385 411 437 463 489 515 541 566 590 616 642 668 +1 -1 2 169 + 6.87819024e-05 6.87613283e-04 6.67269383e-05 5.32434237e-05 3.33703543e-04 -2.26563373e-04 -1.80781705e-04 -1.13305064e-03 -5.14301187e-05 6.01169111e-06 3.76783176e-05 -9.18167788e-05 3.00646587e-05 6.87613283e-04 6.81713437e-03 6.57035650e-04 5.24268434e-04 3.28585621e-03 -2.22683177e-03 -1.77685580e-03 -1.11364566e-02 -4.63619533e-04 5.41927084e-05 3.39653192e-04 -8.27687223e-04 2.71019461e-04 -6.67269383e-05 -6.57035650e-04 1.92258838e-05 -5.33559376e-05 -3.34408725e-04 -7.05363830e-05 1.80405053e-04 1.13068998e-03 6.41045673e-05 3.62818371e-06 2.27396677e-05 8.98689534e-05 -2.94268591e-05 -5.32434237e-05 -5.24268434e-04 -5.33559376e-05 4.35195277e-05 -2.66834743e-04 1.80405053e-04 -1.52677122e-04 9.02211418e-04 3.46750970e-05 7.22612770e-06 -2.94268591e-05 8.12214723e-05 3.61380948e-05 -3.33703543e-04 -3.28585621e-03 -3.34408725e-04 -2.66834743e-04 -1.58629486e-03 1.13068998e-03 9.02211418e-04 5.35798888e-03 2.17326421e-04 -2.94268591e-05 -1.72511779e-04 3.89818831e-04 -1.37652318e-04 2.26563373e-04 2.22683177e-03 -7.05363830e-05 1.80405053e-04 1.13068998e-03 2.58483775e-04 -6.09994620e-04 -3.82314570e-03 -2.12587192e-04 -1.33171633e-05 -8.34654173e-05 -2.95188630e-04 9.66571200e-05 1.80781705e-04 1.77685580e-03 1.80405053e-04 -1.52677122e-04 9.02211418e-04 -6.09994620e-04 5.36222164e-04 -3.05060252e-03 -1.13087588e-04 -2.54896689e-05 9.66571200e-05 -2.68184452e-04 -1.27474646e-04 1.13305064e-03 1.11364566e-02 1.13068998e-03 9.02211418e-04 5.35798888e-03 -3.82314570e-03 -3.05060252e-03 -1.80967183e-02 -7.08777275e-04 9.66571200e-05 5.64887591e-04 -1.27164748e-03 4.50740737e-04 -5.14301187e-05 -4.63619533e-04 -6.41045673e-05 -3.46750970e-05 -2.17326421e-04 2.12587192e-04 1.13087588e-04 7.08777275e-04 6.85432992e-06 -2.83829043e-06 -1.77890058e-05 1.33015139e-05 -4.35547271e-06 6.01169111e-06 5.41927084e-05 -3.62818371e-06 -7.22612770e-06 2.94268591e-05 1.33171633e-05 2.54896689e-05 -9.66571200e-05 -2.83829043e-06 1.75926191e-07 -4.08157180e-06 -5.03221959e-06 -5.84321138e-06 3.76783176e-05 3.39653192e-04 -2.27396677e-05 2.94268591e-05 1.72511779e-04 8.34654173e-05 -9.66571200e-05 -5.64887591e-04 -1.77890058e-05 -4.08157180e-06 -2.47541273e-05 -1.73013905e-05 6.86040720e-06 -9.18167788e-05 -8.27687223e-04 -8.98689534e-05 -8.12214723e-05 -3.89818831e-04 2.95188630e-04 2.68184452e-04 1.27164748e-03 1.33015139e-05 -5.03221959e-06 -1.73013905e-05 2.52509450e-05 -1.94857942e-05 3.00646587e-05 2.71019461e-04 2.94268591e-05 -3.61380948e-05 1.37652318e-04 -9.66571200e-05 1.27474646e-04 -4.50740737e-04 -4.35547271e-06 -5.84321138e-06 6.86040720e-06 -1.94857942e-05 -2.78777589e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 0 -2 676 + 1.70812525e-04 1.57082799e-03 -3.26619005e-04 -6.52872566e-04 -3.26878741e-04 1.06923657e-03 2.13727680e-03 1.07008685e-03 -4.52355680e-05 1.04509065e-04 5.23253592e-05 7.82671141e-05 1.04592173e-04 1.34040550e-03 9.60213460e-03 -3.73555125e-03 -3.48391351e-03 -1.24728012e-03 1.09076056e-02 1.01728372e-02 3.64198981e-03 4.81260500e-05 1.52628664e-04 5.46427738e-05 6.20511120e-05 5.09618755e-05 1.57082799e-03 1.39903450e-02 -2.90296254e-03 -5.80267706e-03 -2.90527106e-03 9.37210352e-03 1.87337209e-02 9.37955646e-03 -2.86774397e-04 6.62543336e-04 3.31720680e-04 4.96180451e-04 6.63070208e-04 9.60213460e-03 5.71988794e-02 -2.33762322e-02 -2.18015403e-02 -7.80519598e-03 6.13754605e-02 5.72410286e-02 2.04929303e-02 -1.32713387e-03 -4.20891950e-03 -1.50684039e-03 -1.71113426e-03 -1.40533518e-03 3.26619005e-04 2.90296254e-03 -4.15151071e-04 -1.28812886e-03 -6.44937408e-04 1.31426206e-03 4.16439840e-03 2.08502145e-03 -1.33596014e-04 8.08634926e-05 4.04865482e-05 1.33628939e-04 1.78574888e-04 3.73555125e-03 2.33762322e-02 -8.61905469e-03 -9.70056309e-03 -3.47291040e-03 2.31501957e-02 2.65441727e-02 9.50311160e-03 -3.94794045e-04 -1.00199122e-03 -3.58724097e-04 -3.72619710e-04 -3.06028347e-04 6.52872566e-04 5.80267706e-03 -1.28812886e-03 -2.34554260e-03 -1.28915322e-03 4.16439840e-03 7.55503474e-03 4.16771003e-03 -9.80472196e-05 3.07854286e-04 1.78574888e-04 1.69538864e-04 3.08099099e-04 3.48391351e-03 2.18015403e-02 -9.70056309e-03 -7.26493933e-03 -3.23896492e-03 2.65441727e-02 1.94448570e-02 8.86295399e-03 -2.20197109e-04 -9.46422121e-04 -3.06028347e-04 -4.32968199e-04 -3.16005166e-04 3.26878741e-04 2.90527106e-03 -6.44937408e-04 -1.28915322e-03 -4.16176405e-04 2.08502145e-03 4.16771003e-03 1.31757687e-03 -4.90900573e-05 1.78574888e-04 4.05964083e-05 1.82586078e-04 8.11473946e-05 1.24728012e-03 7.80519598e-03 -3.47291040e-03 -3.23896492e-03 6.22579463e-04 9.50311160e-03 8.86295399e-03 -2.13818504e-03 -7.88330351e-05 -3.06028347e-04 -2.01182701e-04 -9.38238910e-05 -1.87630442e-04 -1.06923657e-03 -9.37210352e-03 1.31426206e-03 4.16439840e-03 2.08502145e-03 -4.11821518e-03 -1.33849485e-02 -6.70154535e-03 3.95726654e-04 -1.77065778e-04 -8.86528879e-05 -3.69083281e-04 -4.93224043e-04 -1.09076056e-02 -6.13754605e-02 2.31501957e-02 2.65441727e-02 9.50311160e-03 -5.77966664e-02 -6.83193976e-02 -2.44591107e-02 1.79914945e-03 5.97835721e-03 2.14031894e-03 2.46834917e-03 2.02722721e-03 -2.13727680e-03 -1.87337209e-02 4.16439840e-03 7.55503474e-03 4.16771003e-03 -1.33849485e-02 -2.41769159e-02 -1.33955926e-02 2.44087177e-04 -8.27141295e-04 -4.93224043e-04 -4.21987254e-04 -8.27799059e-04 -1.01728372e-02 -5.72410286e-02 2.65441727e-02 1.94448570e-02 8.86295399e-03 -6.83193976e-02 -4.82598647e-02 -2.28114729e-02 1.83921194e-03 5.56264112e-03 2.02722721e-03 2.20897125e-03 1.85733542e-03 -1.07008685e-03 -9.37955646e-03 2.08502145e-03 4.16771003e-03 1.31757687e-03 -6.70154535e-03 -1.33955926e-02 -4.12886944e-03 1.22209008e-04 -4.93224043e-04 -8.89747330e-05 -5.27473959e-04 -1.77849915e-04 -3.64198981e-03 -2.04929303e-02 9.50311160e-03 8.86295399e-03 -2.13818504e-03 -2.44591107e-02 -2.28114729e-02 7.29057368e-03 6.58458507e-04 2.02722721e-03 6.25942781e-04 8.57500066e-04 5.83777430e-04 -4.52355680e-05 -2.86774397e-04 1.33596014e-04 9.80472196e-05 4.90900573e-05 -3.95726654e-04 -2.44087177e-04 -1.22209008e-04 -2.48540403e-05 3.04545512e-05 1.52479149e-05 3.45666355e-05 4.61930859e-05 4.81260500e-05 -1.32713387e-03 3.94794045e-04 2.20197109e-04 7.88330351e-05 -1.79914945e-03 -1.83921194e-03 -6.58458507e-04 2.70312347e-04 -5.84152927e-04 -2.09133301e-04 -4.48700438e-04 -3.68512587e-04 1.04509065e-04 6.62543336e-04 -8.08634926e-05 -3.07854286e-04 -1.78574888e-04 1.77065778e-04 8.27141295e-04 4.93224043e-04 3.04545512e-05 -1.00913456e-04 -5.03546334e-05 -7.08141106e-05 -8.70566197e-05 1.52628664e-04 -4.20891950e-03 1.00199122e-03 9.46422121e-04 3.06028347e-04 -5.97835721e-03 -5.56264112e-03 -2.02722721e-03 -5.84152927e-04 -1.82537010e-03 -7.59726669e-04 -6.76509301e-04 -6.94568981e-04 5.23253592e-05 3.31720680e-04 -4.04865482e-05 -1.78574888e-04 -4.05964083e-05 8.86528879e-05 4.93224043e-04 8.89747330e-05 1.52479149e-05 -5.03546334e-05 -2.55519497e-05 -2.63773034e-05 -5.03802528e-05 5.46427738e-05 -1.50684039e-03 3.58724097e-04 3.06028347e-04 2.01182701e-04 -2.14031894e-03 -2.02722721e-03 -6.25942781e-04 -2.09133301e-04 -7.59726669e-04 2.47142757e-05 -4.56968047e-04 1.28403370e-05 7.82671141e-05 4.96180451e-04 -1.33628939e-04 -1.69538864e-04 -1.82586078e-04 3.69083281e-04 4.21987254e-04 5.27473959e-04 3.45666355e-05 -7.08141106e-05 -2.63773034e-05 -6.47122220e-05 -6.17977590e-05 6.20511120e-05 -1.71113426e-03 3.72619710e-04 4.32968199e-04 9.38238910e-05 -2.46834917e-03 -2.20897125e-03 -8.57500066e-04 -4.48700438e-04 -6.76509301e-04 -4.56968047e-04 -1.06288677e-04 -3.26034042e-04 1.04592173e-04 6.63070208e-04 -1.78574888e-04 -3.08099099e-04 -8.11473946e-05 4.93224043e-04 8.27799059e-04 1.77849915e-04 4.61930859e-05 -8.70566197e-05 -5.03802528e-05 -6.17977590e-05 -1.01051860e-04 5.09618755e-05 -1.40533518e-03 3.06028347e-04 3.16005166e-04 1.87630442e-04 -2.02722721e-03 -1.85733542e-03 -5.83777430e-04 -3.68512587e-04 -6.94568981e-04 1.28403370e-05 -3.26034042e-04 2.29218748e-05 7.64391380e-08 7.66150975e-07 -8.66466883e-08 -4.50795436e-07 -2.59826431e-07 2.65750466e-07 1.38261599e-06 7.96902875e-07 -1.79855778e-07 9.51693451e-08 5.48530649e-08 1.65324440e-07 2.85383225e-07 1.69875966e-04 1.56309629e-03 -3.24812372e-04 -6.49988216e-04 -3.24554036e-04 1.06359050e-03 2.12837118e-03 1.06274459e-03 -4.51784837e-05 1.04293240e-04 5.20760088e-05 7.83342981e-05 1.04210292e-04 7.66150975e-07 7.67741190e-06 -8.68804591e-07 -4.52011672e-06 -2.60527437e-06 2.66382524e-06 1.38590440e-05 7.98798223e-06 -1.80402683e-06 9.54587359e-07 5.50198620e-07 1.65827158e-06 2.86251017e-06 1.56309629e-03 1.39321547e-02 -2.88896783e-03 -5.78116848e-03 -2.88667012e-03 9.33028603e-03 1.86710129e-02 9.32286531e-03 -2.87419685e-04 6.63500139e-04 3.31300849e-04 4.98352698e-04 6.62972432e-04 8.66466883e-08 8.68804591e-07 -8.10366131e-08 -5.13119966e-07 -2.95748623e-07 2.49147492e-07 1.57457959e-06 9.07545559e-07 -2.09936487e-07 8.93058171e-08 5.14734841e-08 1.88998319e-07 3.26249100e-07 3.24812372e-04 2.88896783e-03 -4.12889039e-04 -1.28241153e-03 -6.40337515e-04 1.30761524e-03 4.14724642e-03 2.07081533e-03 -1.33379801e-04 8.09954742e-05 4.04428995e-05 1.33916930e-04 1.78153411e-04 4.50795436e-07 4.52011672e-06 -5.13119966e-07 -2.65201224e-06 -1.53868696e-06 1.57457959e-06 8.13854182e-06 4.72167378e-06 -1.05847327e-06 5.62291473e-07 3.26249100e-07 9.63807299e-07 1.68613699e-06 6.49988216e-04 5.78116848e-03 -1.28241153e-03 -2.33829995e-03 -1.28139158e-03 4.14724642e-03 7.53428530e-03 4.14394796e-03 -9.83807621e-05 3.08167282e-04 1.78153411e-04 1.70683975e-04 3.07922185e-04 2.59826431e-07 2.60527437e-06 -2.95748623e-07 -1.53868696e-06 -8.69268630e-07 9.07545559e-07 4.72167378e-06 2.66794647e-06 -6.10075678e-07 3.26249100e-07 1.84294835e-07 5.77981440e-07 9.58827994e-07 3.24554036e-04 2.88667012e-03 -6.40337515e-04 -1.28139158e-03 -4.11870065e-04 2.07081533e-03 4.14394796e-03 1.30431994e-03 -4.91237728e-05 1.78153411e-04 4.03334217e-05 1.82394415e-04 8.07119774e-05 -2.65750466e-07 -2.66382524e-06 2.49147492e-07 1.57457959e-06 9.07545559e-07 -7.65612413e-07 -4.82964708e-06 -2.78367939e-06 6.44381690e-07 -2.74704997e-07 -1.58332612e-07 -5.80221275e-07 -1.00157859e-06 -1.06359050e-03 -9.33028603e-03 1.30761524e-03 4.14724642e-03 2.07081533e-03 -4.09936647e-03 -1.33348475e-02 -6.65839545e-03 3.95532628e-04 -1.78326504e-04 -8.90425168e-05 -3.70585174e-04 -4.92999747e-04 -1.38261599e-06 -1.38590440e-05 1.57457959e-06 8.13854182e-06 4.72167378e-06 -4.82964708e-06 -2.49644465e-05 -1.44826073e-05 3.24980348e-06 -1.72632759e-06 -1.00157859e-06 -2.95940805e-06 -5.17671876e-06 -2.12837118e-03 -1.86710129e-02 4.14724642e-03 7.53428530e-03 4.14394796e-03 -1.33348475e-02 -2.41202882e-02 -1.33242418e-02 2.45798143e-04 -8.29891702e-04 -4.92999747e-04 -4.26519386e-04 -8.29231658e-04 -7.96902875e-07 -7.98798223e-06 9.07545559e-07 4.72167378e-06 2.66794647e-06 -2.78367939e-06 -1.44826073e-05 -8.18470095e-06 1.87309979e-06 -1.00157859e-06 -5.65885040e-07 -1.77408213e-06 -2.94412168e-06 -1.06274459e-03 -9.32286531e-03 2.07081533e-03 4.14394796e-03 1.30431994e-03 -6.65839545e-03 -1.33242418e-02 -4.08877092e-03 1.22732655e-04 -4.92999747e-04 -8.87213543e-05 -5.27609947e-04 -1.77541990e-04 -1.79855778e-07 -1.80402683e-06 2.09936487e-07 1.05847327e-06 6.10075678e-07 -6.44381690e-07 -3.24980348e-06 -1.87309979e-06 4.20001614e-07 -2.30243255e-07 -1.32706054e-07 -3.87430816e-07 -6.68783488e-07 -4.51784837e-05 -2.87419685e-04 1.33379801e-04 9.83807621e-05 4.91237728e-05 -3.95532628e-04 -2.45798143e-04 -1.22732655e-04 -2.48009597e-05 2.99273523e-05 1.49434139e-05 3.43909079e-05 4.57511797e-05 9.51693451e-08 9.54587359e-07 -8.93058171e-08 -5.62291473e-07 -3.26249100e-07 2.74704997e-07 1.72632759e-06 1.00157859e-06 -2.30243255e-07 9.81955960e-08 5.69902811e-08 2.05262031e-07 3.59115185e-07 1.04293240e-04 6.63500139e-04 -8.09954742e-05 -3.08167282e-04 -1.78153411e-04 1.78326504e-04 8.29891702e-04 4.92999747e-04 2.99273523e-05 -1.00005292e-04 -4.97399685e-05 -7.02141186e-05 -8.57983503e-05 5.48530649e-08 5.50198620e-07 -5.14734841e-08 -3.26249100e-07 -1.84294835e-07 1.58332612e-07 1.00157859e-06 5.65885040e-07 -1.32706054e-07 5.69902811e-08 3.21658824e-08 1.23111354e-07 2.04201507e-07 5.20760088e-05 3.31300849e-04 -4.04428995e-05 -1.78153411e-04 -4.03334217e-05 8.90425168e-05 4.92999747e-04 8.87213543e-05 1.49434139e-05 -4.97399685e-05 -2.52267750e-05 -2.59150043e-05 -4.97149683e-05 1.65324440e-07 1.65827158e-06 -1.88998319e-07 -9.63807299e-07 -5.77981440e-07 5.80221275e-07 2.95940805e-06 1.77408213e-06 -3.87430816e-07 2.05262031e-07 1.23111354e-07 3.35047960e-07 6.28013255e-07 7.83342981e-05 4.98352698e-04 -1.33916930e-04 -1.70683975e-04 -1.82394415e-04 3.70585174e-04 4.26519386e-04 5.27609947e-04 3.43909079e-05 -7.02141186e-05 -2.59150043e-05 -6.45671275e-05 -6.10086414e-05 2.85383225e-07 2.86251017e-06 -3.26249100e-07 -1.68613699e-06 -9.58827994e-07 1.00157859e-06 5.17671876e-06 2.94412168e-06 -6.68783488e-07 3.59115185e-07 2.04201507e-07 6.28013255e-07 1.05531277e-06 1.04210292e-04 6.62972432e-04 -1.78153411e-04 -3.07922185e-04 -8.07119774e-05 4.92999747e-04 8.29231658e-04 1.77541990e-04 4.57511797e-05 -8.57983503e-05 -4.97149683e-05 -6.10086414e-05 -9.98687600e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 -1 676 + 3.92346948e-02 1.43562622e-01 -7.04539945e-02 -7.03800846e-02 -6.09456872e-05 1.49294660e-01 1.49138042e-01 1.29146200e-04 -6.14904967e-03 -2.12340751e-02 -1.83876633e-05 -1.06058918e-02 -1.83683737e-05 1.58811464e-02 7.48155990e-02 -4.34163708e-02 -1.15488161e-02 1.44464114e-02 1.04854529e-01 2.78914531e-02 -3.48894123e-02 -5.00735879e-03 -2.53725212e-03 3.17384809e-03 1.90578541e-04 8.44248085e-04 1.43562622e-01 2.07046006e-01 -1.43692414e-01 -1.43541673e-01 -1.24300020e-04 1.50539086e-01 1.50381163e-01 1.30222681e-04 -1.38939644e-02 -4.79790374e-02 -4.15474836e-05 -2.39643345e-02 -4.15038981e-05 7.48155990e-02 1.66919864e-01 -1.32833127e-01 -3.53337998e-02 4.41990421e-02 1.84790564e-01 4.91545517e-02 -6.14874175e-02 -4.42670639e-02 -2.24303283e-02 2.80580926e-02 1.68479088e-03 7.46349234e-03 7.04539945e-02 1.43692414e-01 -6.96603995e-02 -1.13235554e-01 -9.80564135e-05 9.03265538e-02 1.75001865e-01 1.51542997e-04 6.40862982e-04 -4.19725482e-02 -3.63461597e-05 -2.83413534e-02 -4.90844694e-05 4.34163708e-02 1.32833127e-01 -9.01434410e-02 -2.89129441e-02 3.61671951e-02 1.65322168e-01 5.51240732e-02 -6.89546905e-02 -2.22375486e-02 -1.32543622e-02 1.65798786e-02 1.11994876e-03 4.96128575e-03 7.03800846e-02 1.43541673e-01 -1.13235554e-01 -6.94226948e-02 -9.79535472e-05 1.75001865e-01 8.99591889e-02 1.51384021e-04 -2.49417263e-02 -4.18975121e-02 -4.90844694e-05 -1.35418952e-02 -3.62431213e-05 1.15488161e-02 3.53337998e-02 -2.89129441e-02 1.08603750e-02 9.62052511e-03 5.51240732e-02 -2.72470058e-02 -1.83420453e-02 -8.78347103e-03 2.25930389e-03 4.96128575e-03 1.95389380e-03 -7.51763284e-04 6.09456872e-05 1.24300020e-04 -9.80564135e-05 -9.79535472e-05 4.36939847e-02 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -2.15983067e-05 -4.90844694e-05 1.47851947e-02 -3.73063262e-05 1.47696842e-02 -1.44464114e-02 -4.41990421e-02 3.61671951e-02 9.62052511e-03 6.51694639e-03 -6.89546905e-02 -1.83420453e-02 -1.89660271e-02 1.09872419e-02 4.96128575e-03 1.94063670e-05 1.69881932e-03 5.16212111e-06 -1.49294660e-01 -1.50539086e-01 9.03265538e-02 1.75001865e-01 1.51542997e-04 -3.55933538e-02 -1.58872773e-01 -1.37575997e-04 -1.91573661e-02 4.52189669e-02 3.91573984e-05 4.11804138e-02 7.13204742e-05 -1.04854529e-01 -1.84790564e-01 1.65322168e-01 5.51240732e-02 -6.89546905e-02 -1.80846829e-01 -6.90112897e-02 8.63262064e-02 5.92382269e-02 3.74323846e-02 -4.68241613e-02 -3.27598887e-03 -1.45123754e-02 -1.49138042e-01 -1.50381163e-01 1.75001865e-01 8.99591889e-02 1.51384021e-04 -1.58872773e-01 -3.52598472e-02 -1.37431673e-04 4.53442356e-02 4.50933797e-02 7.13204742e-05 3.90879932e-03 3.90076821e-05 -2.78914531e-02 -4.91545517e-02 5.51240732e-02 -2.72470058e-02 -1.83420453e-02 -6.90112897e-02 6.02356277e-02 2.29628931e-02 2.64653896e-02 -1.16397950e-02 -1.45123754e-02 -7.05364819e-03 3.87303831e-03 -1.29146200e-04 -1.30222681e-04 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -1.37575997e-04 -1.37431673e-04 1.23446141e-01 3.92658750e-05 7.13204742e-05 -3.72674479e-02 6.78607741e-05 -3.72283524e-02 3.48894123e-02 6.14874175e-02 -6.89546905e-02 -1.83420453e-02 -1.89660271e-02 8.63262064e-02 2.29628931e-02 4.98684507e-02 -3.31055497e-02 -1.45123754e-02 -5.08781728e-03 -6.64329455e-03 -1.35336660e-03 -6.14904967e-03 -1.38939644e-02 -6.40862982e-04 2.49417263e-02 2.15983067e-05 1.91573661e-02 -4.53442356e-02 -3.92658750e-05 -7.70714517e-03 1.42605428e-02 1.23489278e-05 1.39848306e-02 2.42203674e-05 -5.00735879e-03 -4.42670639e-02 2.22375486e-02 8.78347103e-03 -1.09872419e-02 -5.92382269e-02 -2.64653896e-02 3.31055497e-02 8.85356280e-03 3.78893571e-03 -4.73957881e-03 -2.22255489e-04 -9.84574499e-04 -2.12340751e-02 -4.79790374e-02 4.19725482e-02 4.18975121e-02 4.90844694e-05 -4.52189669e-02 -4.50933797e-02 -7.13204742e-05 1.42605428e-02 4.92604167e-02 4.94764240e-05 2.45634125e-02 4.94101171e-05 -2.53725212e-03 -2.24303283e-02 1.32543622e-02 -2.25930389e-03 -4.96128575e-03 -3.74323846e-02 1.16397950e-02 1.45123754e-02 3.78893571e-03 3.11966006e-03 -2.38565589e-03 3.45498336e-04 -1.19157591e-03 -1.83876633e-05 -4.15474836e-05 3.63461597e-05 4.90844694e-05 -1.47851947e-02 -3.91573984e-05 -7.13204742e-05 3.72674479e-02 1.23489278e-05 4.94764240e-05 -7.87491896e-03 3.50080332e-05 -7.93188481e-03 3.17384809e-03 2.80580926e-02 -1.65798786e-02 -4.96128575e-03 -1.94063670e-05 4.68241613e-02 1.45123754e-02 5.08781728e-03 -4.73957881e-03 -2.38565589e-03 4.19672455e-03 7.66615478e-04 1.21992795e-03 -1.06058918e-02 -2.39643345e-02 2.83413534e-02 1.35418952e-02 3.73063262e-05 -4.11804138e-02 -3.90879932e-03 -6.78607741e-05 1.39848306e-02 2.45634125e-02 3.50080332e-05 8.37229921e-03 2.81098497e-05 1.90578541e-04 1.68479088e-03 -1.11994876e-03 -1.95389380e-03 -1.69881932e-03 3.27598887e-03 7.05364819e-03 6.64329455e-03 -2.22255489e-04 3.45498336e-04 7.66615478e-04 -2.51944445e-04 4.44796514e-05 -1.83683737e-05 -4.15038981e-05 4.90844694e-05 3.62431213e-05 -1.47696842e-02 -7.13204742e-05 -3.90076821e-05 3.72283524e-02 2.42203674e-05 4.94101171e-05 -7.93188481e-03 2.81098497e-05 -7.85826831e-03 8.44248085e-04 7.46349234e-03 -4.96128575e-03 7.51763284e-04 -5.16212111e-06 1.45123754e-02 -3.87303831e-03 1.35336660e-03 -9.84574499e-04 -1.19157591e-03 1.21992795e-03 4.44796514e-05 -6.49437852e-05 9.15762019e-03 4.83148251e-02 -8.38611084e-03 -2.68557300e-02 -8.37277034e-03 2.13472085e-02 6.83624242e-02 2.13132496e-02 1.01801353e-03 -1.22060292e-03 -3.80545527e-04 -1.76446286e-03 -1.21866120e-03 3.90352750e-02 1.43077779e-01 -7.00929462e-02 -7.01664876e-02 6.06418327e-05 1.48670356e-01 1.48826341e-01 -1.28624111e-04 -6.06735631e-03 -2.10842729e-02 1.82222169e-05 -1.05531894e-02 1.82413356e-05 4.83148251e-02 1.40434369e-01 -3.10832043e-02 -9.95410336e-02 -3.10337576e-02 5.20532728e-02 1.66695703e-01 5.19704673e-02 1.64722383e-02 -1.97502898e-02 -6.15751798e-03 -2.85503599e-02 -1.97188713e-02 1.43077779e-01 2.06870478e-01 -1.43354898e-01 -1.43505305e-01 1.24025372e-04 1.50404918e-01 1.50562723e-01 -1.30124790e-04 -1.38318580e-02 -4.80661849e-02 4.15415057e-05 -2.40582899e-02 4.15850910e-05 8.38611084e-03 3.10832043e-02 3.80236599e-03 -2.29106850e-02 -7.14282961e-03 -1.17058310e-02 4.81700791e-02 1.50179127e-02 3.67570296e-03 -3.46277843e-04 -1.07958520e-04 -4.59900715e-03 -3.17639534e-03 7.00929462e-02 1.43354898e-01 -6.92934363e-02 -1.12900170e-01 9.75746892e-05 9.00183821e-02 1.74742533e-01 -1.51022345e-04 7.15622009e-04 -4.17238982e-02 3.60601441e-05 -2.82393576e-02 4.88121249e-05 2.68557300e-02 9.95410336e-02 -2.29106850e-02 -6.24127339e-02 -2.28742390e-02 4.81700791e-02 1.27512468e-01 4.80934508e-02 6.86041924e-03 -9.30298659e-03 -3.17639534e-03 -1.18927087e-02 -9.28818754e-03 7.01664876e-02 1.43505305e-01 -1.12900170e-01 -6.95302215e-02 9.76770644e-05 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -2.47372636e-02 -4.17984960e-02 4.88121249e-05 -1.35733224e-02 3.61625176e-05 8.37277034e-03 3.10337576e-02 -7.14282961e-03 -2.28742390e-02 3.82510951e-03 1.50179127e-02 4.80934508e-02 -1.17536496e-02 2.13886253e-03 -3.17639534e-03 -1.04972289e-04 -5.47561043e-03 -3.36163867e-04 -6.06418327e-05 -1.24025372e-04 9.75746892e-05 9.76770644e-05 4.34883186e-02 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 2.13793372e-05 4.88121249e-05 1.46802192e-02 3.71324719e-05 1.46956216e-02 -2.13472085e-02 -5.20532728e-02 -1.17058310e-02 4.81700791e-02 1.50179127e-02 3.41922622e-02 -7.48076734e-02 -2.33226752e-02 -1.41091685e-02 -8.77821071e-04 -2.73676948e-04 1.66902967e-02 1.15274838e-02 -1.48670356e-01 -1.50404918e-01 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -3.55477897e-02 -1.58871579e-01 1.37305772e-04 -1.91383675e-02 4.52602299e-02 -3.91164413e-05 4.12489762e-02 -7.12994329e-05 -6.83624242e-02 -1.66695703e-01 4.81700791e-02 1.27512468e-01 4.80934508e-02 -7.48076734e-02 -1.82012429e-01 -7.46886704e-02 -2.36648521e-02 3.30950187e-02 1.15274838e-02 4.10254309e-02 3.30423716e-02 -1.48826341e-01 -1.50562723e-01 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -1.58871579e-01 -3.58809906e-02 1.37449833e-04 4.51895230e-02 4.53856342e-02 -7.12994329e-05 4.14093649e-03 -3.92659774e-05 -2.13132496e-02 -5.19704673e-02 1.50179127e-02 4.80934508e-02 -1.17536496e-02 -2.33226752e-02 -7.46886704e-02 3.42665240e-02 -7.37795517e-03 1.15274838e-02 -2.85574611e-04 2.05370554e-02 -9.14525789e-04 1.28624111e-04 1.30124790e-04 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 1.37305772e-04 1.37449833e-04 1.23157158e-01 -3.90553324e-05 -7.12994329e-05 -3.71123182e-02 -6.77953561e-05 -3.71512564e-02 1.01801353e-03 1.64722383e-02 -3.67570296e-03 -6.86041924e-03 -2.13886253e-03 1.41091685e-02 2.36648521e-02 7.37795517e-03 4.27436915e-04 1.06904007e-03 3.33293007e-04 -5.15884386e-04 -3.56305765e-04 -6.06735631e-03 -1.38318580e-02 -7.15622009e-04 2.47372636e-02 -2.13793372e-05 1.91383675e-02 -4.51895230e-02 3.90553324e-05 -7.63846481e-03 1.40703716e-02 -1.21604081e-05 1.38292143e-02 -2.39039906e-05 -1.22060292e-03 -1.97502898e-02 3.46277843e-04 9.30298659e-03 3.17639534e-03 8.77821071e-04 -3.30950187e-02 -1.15274838e-02 1.06904007e-03 1.79721655e-03 5.99996563e-04 -2.05835279e-04 -4.54095308e-04 -2.10842729e-02 -4.80661849e-02 4.17238982e-02 4.17984960e-02 -4.88121249e-05 -4.52602299e-02 -4.53856342e-02 7.12994329e-05 1.40703716e-02 4.89954008e-02 -4.90591418e-05 2.45060863e-02 -4.91248191e-05 -3.80545527e-04 -6.15751798e-03 1.07958520e-04 3.17639534e-03 1.04972289e-04 2.73676948e-04 -1.15274838e-02 2.85574611e-04 3.33293007e-04 5.99996563e-04 5.97826394e-05 -5.77500748e-04 6.01659247e-04 1.82222169e-05 4.15415057e-05 -3.60601441e-05 -4.88121249e-05 -1.46802192e-02 3.91164413e-05 7.12994329e-05 3.71123182e-02 -1.21604081e-05 -4.90591418e-05 -7.76912846e-03 -3.47109323e-05 -7.82829532e-03 -1.76446286e-03 -2.85503599e-02 4.59900715e-03 1.18927087e-02 5.47561043e-03 -1.66902967e-02 -4.10254309e-02 -2.05370554e-02 -5.15884386e-04 -2.05835279e-04 -5.77500748e-04 1.02067736e-03 -1.02744979e-03 -1.05531894e-02 -2.40582899e-02 2.82393576e-02 1.35733224e-02 -3.71324719e-05 -4.12489762e-02 -4.14093649e-03 6.77953561e-05 1.38292143e-02 2.45060863e-02 -3.47109323e-05 8.39857043e-03 -2.79745566e-05 -1.21866120e-03 -1.97188713e-02 3.17639534e-03 9.28818754e-03 3.36163867e-04 -1.15274838e-02 -3.30423716e-02 9.14525789e-04 -3.56305765e-04 -4.54095308e-04 6.01659247e-04 -1.02744979e-03 1.79866243e-03 1.82413356e-05 4.15850910e-05 -4.88121249e-05 -3.61625176e-05 -1.46956216e-02 7.12994329e-05 3.92659774e-05 3.71512564e-02 -2.39039906e-05 -4.91248191e-05 -7.82829532e-03 -2.79745566e-05 -7.78554672e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 0 676 + 3.92221425e-02 1.43532144e-01 -7.04318857e-02 6.89694006e-05 7.03660418e-02 1.49256702e-01 -1.46157457e-04 -1.49117168e-01 -6.14421454e-03 2.08033691e-05 2.12246406e-02 1.06023891e-02 -2.07839209e-05 7.80942775e-04 6.01613300e-03 -2.18999750e-03 8.77387942e-04 2.18863258e-03 6.61129537e-03 -2.64871117e-03 -6.60717485e-03 4.80726834e-05 -7.93553438e-05 -1.97950852e-04 -8.30175060e-05 7.93058853e-05 1.43532144e-01 2.07035011e-01 -1.43672485e-01 1.40689194e-04 1.43538172e-01 1.50532003e-01 -1.47406277e-04 -1.50391277e-01 -1.38908002e-02 4.70321215e-05 4.79845294e-02 2.39698123e-02 -4.69881531e-05 6.01613300e-03 4.08875310e-02 -1.52952926e-02 6.12781763e-03 1.52857597e-02 4.31188236e-02 -1.72748763e-02 -4.30919497e-02 -3.37847883e-04 5.57697907e-04 1.39117003e-03 5.83435055e-04 -5.57350320e-04 7.04318857e-02 1.43672485e-01 -6.96392838e-02 1.10967367e-04 1.13214473e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 6.44737024e-04 4.11247302e-05 4.19575125e-02 2.83346836e-02 -5.55446341e-05 2.18999750e-03 1.52952926e-02 -5.15923545e-03 2.49119686e-03 6.21425750e-03 1.46684764e-02 -7.19131331e-03 -1.79386356e-02 -1.72706639e-04 8.54131672e-05 2.13062012e-04 3.37640327e-05 -3.22544802e-05 -6.89694006e-05 -1.40689194e-04 1.10967367e-04 4.36810194e-02 -1.10863628e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 2.44346801e-05 1.47786983e-02 -5.55446341e-05 -4.22182061e-05 -1.47648823e-02 -8.77387942e-04 -6.12781763e-03 2.49119686e-03 6.08388128e-05 -2.48964421e-03 -7.19131331e-03 -4.00260266e-04 7.18683130e-03 -2.28465162e-05 -1.45566435e-04 -3.22544802e-05 3.96115447e-05 1.45475710e-04 -7.03660418e-02 -1.43538172e-01 1.13214473e-01 -1.10863628e-04 -6.94275057e-02 -1.74985607e-01 1.71352113e-04 8.99829313e-02 2.49294862e-02 -5.55446341e-05 -4.18906689e-02 -1.35432580e-02 4.10208288e-05 -2.18863258e-03 -1.52857597e-02 6.21425750e-03 -2.48964421e-03 -5.15148692e-03 -1.79386356e-02 7.18683130e-03 1.46461088e-02 -5.69903313e-05 -3.22544802e-05 -2.13094501e-04 -1.66296451e-04 8.53729492e-05 -1.49256702e-01 -1.50532003e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -3.55932735e-02 1.55719370e-04 1.58872712e-01 -1.91550894e-02 -4.43250336e-05 -4.52226225e-02 -4.11843616e-02 8.07339276e-05 -6.61129537e-03 -4.31188236e-02 1.46684764e-02 -7.19131331e-03 -1.79386356e-02 -3.98957702e-02 2.00026915e-02 4.98964485e-02 7.72308287e-04 -8.96716863e-04 -2.23684831e-03 -8.32819515e-04 7.95585077e-04 1.46157457e-04 1.47406277e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 1.55719370e-04 1.23427948e-01 -1.55573794e-04 -4.44355598e-05 -3.72580070e-02 8.07339276e-05 7.68136271e-05 3.72231760e-02 2.64871117e-03 1.72748763e-02 -7.19131331e-03 -4.00260266e-04 7.18683130e-03 2.00026915e-02 2.01803309e-03 -1.99902248e-02 -1.35107113e-04 5.70128173e-04 7.95585077e-04 2.33020372e-04 -5.69772839e-04 1.49117168e-01 1.50391277e-01 -1.74985607e-01 1.71352113e-04 8.99829313e-02 1.58872712e-01 -1.55573794e-04 -3.52960874e-02 -4.53353869e-02 8.07339276e-05 4.51107162e-02 3.92260496e-03 -4.41740133e-05 6.60717485e-03 4.30919497e-02 -1.79386356e-02 7.18683130e-03 1.46461088e-02 4.98964485e-02 -1.99902248e-02 -3.98335545e-02 -3.37022900e-04 7.95585077e-04 2.23576720e-03 1.08333469e-03 -8.95724851e-04 -6.14421454e-03 -1.38908002e-02 -6.44737024e-04 -2.44346801e-05 -2.49294862e-02 1.91550894e-02 4.44355598e-05 4.53353869e-02 -7.70240327e-03 -1.39667020e-05 -1.42495299e-02 -1.39752767e-02 2.73958109e-05 4.80726834e-05 -3.37847883e-04 1.72706639e-04 2.28465162e-05 5.69903313e-05 -7.72308287e-04 1.35107113e-04 3.37022900e-04 1.49054702e-04 1.08920195e-04 2.71699980e-04 2.15185640e-04 -2.05564928e-04 2.08033691e-05 4.70321215e-05 -4.11247302e-05 -1.47786983e-02 5.55446341e-05 4.43250336e-05 3.72580070e-02 -8.07339276e-05 -1.39667020e-05 -7.86837129e-03 5.59786246e-05 3.96080071e-05 7.92534293e-03 -7.93553438e-05 5.57697907e-04 -8.54131672e-05 1.45566435e-04 3.22544802e-05 8.96716863e-04 -5.70128173e-04 -7.95585077e-04 1.08920195e-04 -7.64602679e-05 -5.25496697e-04 -2.99674206e-04 9.35305351e-05 2.12246406e-02 4.79845294e-02 -4.19575125e-02 5.55446341e-05 4.18906689e-02 4.52226225e-02 -8.07339276e-05 -4.51107162e-02 -1.42495299e-02 5.59786246e-05 4.92437744e-02 2.45592648e-02 -5.59117751e-05 -1.97950852e-04 1.39117003e-03 -2.13062012e-04 3.22544802e-05 2.13094501e-04 2.23684831e-03 -7.95585077e-04 -2.23576720e-03 2.71699980e-04 -5.25496697e-04 -1.17664155e-03 -4.68790009e-04 5.25099556e-04 1.06023891e-02 2.39698123e-02 -2.83346836e-02 4.22182061e-05 1.35432580e-02 4.11843616e-02 -7.68136271e-05 -3.92260496e-03 -1.39752767e-02 3.96080071e-05 2.45592648e-02 8.37352664e-03 -3.18101412e-05 -8.30175060e-05 5.83435055e-04 -3.37640327e-05 -3.96115447e-05 1.66296451e-04 8.32819515e-04 -2.33020372e-04 -1.08333469e-03 2.15185640e-04 -2.99674206e-04 -4.68790009e-04 -9.86401444e-05 2.43650376e-04 -2.07839209e-05 -4.69881531e-05 5.55446341e-05 1.47648823e-02 -4.10208288e-05 -8.07339276e-05 -3.72231760e-02 4.41740133e-05 2.73958109e-05 7.92534293e-03 -5.59117751e-05 -3.18101412e-05 -7.85354621e-03 7.93058853e-05 -5.57350320e-04 3.22544802e-05 -1.45475710e-04 -8.53729492e-05 -7.95585077e-04 5.69772839e-04 8.95724851e-04 -2.05564928e-04 9.35305351e-05 5.25099556e-04 2.43650376e-04 -7.63436450e-05 2.18836165e-01 3.26678087e-01 -1.93427521e-01 -2.32524344e-01 1.93789252e-01 2.19209091e-01 2.63517052e-01 -2.19619036e-01 1.14422574e-02 -1.06157222e-01 8.84730102e-02 -1.94879716e-02 1.06355748e-01 3.90477633e-02 1.43108181e-01 -7.01149411e-02 -6.86686256e-05 7.01804978e-02 1.48708178e-01 1.45640659e-04 -1.48847218e-01 -6.07213665e-03 -2.06392362e-05 2.10936488e-02 1.05566754e-02 2.06585336e-05 3.26678087e-01 2.55451704e-01 -6.84024208e-02 -8.22283611e-02 6.85303408e-02 7.63241290e-02 9.17512562e-02 -7.64668634e-02 -7.12665163e-03 6.61185567e-02 -5.51041899e-02 1.21378134e-02 -6.62422056e-02 1.43108181e-01 2.06881524e-01 -1.43374834e-01 -1.40417329e-04 1.43508888e-01 1.50412044e-01 1.47309378e-04 -1.50552678e-01 -1.38350338e-02 -4.70253795e-05 4.80607339e-02 2.40528121e-02 4.70693478e-05 1.93427521e-01 6.84024208e-02 4.85404850e-02 -1.91575569e-01 1.59661933e-01 -1.57845937e-01 9.78762730e-02 -8.15715437e-02 1.09060493e-01 -2.03731420e-02 1.69792800e-02 -2.21030294e-02 1.20627445e-01 7.01149411e-02 1.43374834e-01 -6.93144341e-02 -1.10488583e-04 1.12921202e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 7.11815146e-04 -4.08396703e-05 4.17388344e-02 2.82459912e-02 5.52750497e-05 2.32524344e-01 8.22283611e-02 -1.91575569e-01 -2.23936739e-02 1.91933836e-01 9.78762730e-02 -1.21605559e-01 -9.80593123e-02 -4.21510437e-02 -6.15286071e-02 1.20627445e-01 7.34585011e-02 6.16436723e-02 6.86686256e-05 1.40417329e-04 -1.10488583e-04 4.35011783e-02 1.10591889e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -2.42162472e-05 1.46866461e-02 5.52750497e-05 4.20470853e-05 -1.47003779e-02 -1.93789252e-01 -6.85303408e-02 1.59661933e-01 1.91933836e-01 4.79438719e-02 -8.15715437e-02 -9.80593123e-02 -1.57541127e-01 3.51293076e-02 1.20627445e-01 -1.73225482e-02 1.05510138e-01 -2.08238938e-02 -7.01804978e-02 -1.43508888e-01 1.12921202e-01 1.10591889e-04 -6.95254957e-02 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 2.47494145e-02 5.52750497e-05 -4.18053364e-02 -1.35719689e-02 -4.09429851e-05 -2.19209091e-01 -7.63241290e-02 -1.57845937e-01 9.78762730e-02 -8.15715437e-02 1.69664211e-01 -8.94624005e-02 7.45592970e-02 -3.58898722e-02 -7.25584409e-02 6.04712853e-02 -5.80903396e-03 3.17028455e-02 -1.48708178e-01 -1.50412044e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -3.55478592e-02 -1.55449155e-04 1.58871668e-01 -1.91406441e-02 4.42816606e-05 -4.52566068e-02 -4.12450375e-02 -8.07130995e-05 -2.63517052e-01 -9.17512562e-02 9.78762730e-02 -1.21605559e-01 -9.80593123e-02 -8.94624005e-02 1.36539214e-01 8.96297049e-02 2.77222994e-02 -7.20750226e-02 3.17028455e-02 -4.78979661e-02 7.22098107e-02 -1.45640659e-04 -1.47309378e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -1.55449155e-04 1.23175252e-01 1.55594499e-04 4.42246994e-05 -3.71217044e-02 -8.07130995e-05 -7.67502875e-05 3.71564128e-02 2.19619036e-01 7.64668634e-02 -8.15715437e-02 -9.80593123e-02 -1.57541127e-01 7.45592970e-02 8.96297049e-02 1.69385603e-01 -2.31041772e-02 3.17028455e-02 -6.04569547e-02 -2.82790834e-02 -7.26769058e-02 1.48847218e-01 1.50552678e-01 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 1.58871668e-01 1.55594499e-04 -3.58448071e-02 -4.51983914e-02 -8.07130995e-05 4.53683706e-02 4.12710932e-03 4.44325219e-05 1.14422574e-02 -7.12665163e-03 -1.09060493e-01 4.21510437e-02 -3.51293076e-02 3.58898722e-02 -2.77222994e-02 2.31041772e-02 -1.04054254e-01 -6.60398616e-02 5.50386042e-02 1.48427199e-02 -8.10042529e-02 -6.07213665e-03 -1.38350338e-02 -7.11815146e-04 2.42162472e-05 -2.47494145e-02 1.91406441e-02 -4.42246994e-05 4.51983914e-02 -7.64320723e-03 1.37779217e-05 -1.40812692e-02 -1.38387040e-02 -2.70811900e-05 -1.06157222e-01 6.61185567e-02 2.03731420e-02 6.15286071e-02 -1.20627445e-01 7.25584409e-02 7.20750226e-02 -3.17028455e-02 -6.60398616e-02 3.16796958e-02 -4.70631554e-02 -5.57262889e-02 -8.80364598e-02 -2.06392362e-05 -4.70253795e-05 4.08396703e-05 -1.46866461e-02 -5.52750497e-05 -4.42816606e-05 3.71217044e-02 8.07130995e-05 1.37779217e-05 -7.77558844e-03 -5.55643228e-05 -3.93143386e-05 7.83476102e-03 8.84730102e-02 -5.51041899e-02 -1.69792800e-02 -1.20627445e-01 1.73225482e-02 -6.04712853e-02 -3.17028455e-02 6.04569547e-02 5.50386042e-02 -4.70631554e-02 1.44325709e-02 -9.49184840e-02 4.74686681e-02 2.10936488e-02 4.80607339e-02 -4.17388344e-02 -5.52750497e-05 4.18053364e-02 4.52566068e-02 8.07130995e-05 -4.53683706e-02 -1.40812692e-02 -5.55643228e-05 4.90120357e-02 2.45102737e-02 5.56306169e-05 -1.94879716e-02 1.21378134e-02 2.21030294e-02 -7.34585011e-02 -1.05510138e-01 5.80903396e-03 4.78979661e-02 2.82790834e-02 1.48427199e-02 -5.57262889e-02 -9.49184840e-02 -1.21666576e-01 -2.91367597e-02 1.05566754e-02 2.40528121e-02 -2.82459912e-02 -4.20470853e-05 1.35719689e-02 4.12450375e-02 7.67502875e-05 -4.12710932e-03 -1.38387040e-02 -3.93143386e-05 2.45102737e-02 8.39735954e-03 3.16778891e-05 1.06355748e-01 -6.62422056e-02 -1.20627445e-01 -6.16436723e-02 2.08238938e-02 -3.17028455e-02 -7.22098107e-02 7.26769058e-02 -8.10042529e-02 -8.80364598e-02 4.74686681e-02 -2.91367597e-02 3.20086641e-02 2.06585336e-05 4.70693478e-05 -5.52750497e-05 1.47003779e-02 4.09429851e-05 8.07130995e-05 -3.71564128e-02 -4.44325219e-05 -2.70811900e-05 7.83476102e-03 5.56306169e-05 3.16778891e-05 -7.79023244e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 1 507 + 1.70655454e-04 1.56953167e-03 -3.26323630e-04 3.26620395e-04 6.52319411e-04 1.06831472e-03 -1.06928627e-03 -2.13555614e-03 -4.52239229e-05 -5.23059013e-05 -1.04464250e-04 -7.82350394e-05 1.04559252e-04 1.56953167e-03 1.39805932e-02 -2.90068412e-03 2.90332205e-03 5.79845399e-03 9.36531333e-03 -9.37383033e-03 -1.87212176e-02 -2.86869568e-04 -3.31792785e-04 -6.62649600e-04 -4.96269464e-04 6.63252226e-04 3.26323630e-04 2.90068412e-03 -4.14801776e-04 6.44440531e-04 1.28706313e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -1.33559419e-04 -4.04998597e-05 -8.08854715e-05 -1.33606340e-04 1.78561667e-04 -3.26620395e-04 -2.90332205e-03 6.44440531e-04 -4.15973377e-04 -1.28823361e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 4.91120363e-05 4.06254571e-05 1.78561667e-04 1.82553690e-04 -8.12100987e-05 -6.52319411e-04 -5.79845399e-03 1.28706313e-03 -1.28823361e-03 -2.34377996e-03 -4.16117676e-03 4.16496101e-03 7.54978362e-03 9.80855301e-05 1.78561667e-04 3.07838138e-04 1.69564494e-04 -3.08118091e-04 -1.06831472e-03 -9.36531333e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -4.11536825e-03 6.69716546e-03 1.33754386e-02 3.95693963e-04 8.87661346e-05 1.77281864e-04 3.69139191e-04 -4.93345668e-04 1.06928627e-03 9.37383033e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 6.69716546e-03 -4.12754378e-03 -1.33876024e-02 -1.22336657e-04 -8.91341618e-05 -4.93345668e-04 -5.27505568e-04 1.78178773e-04 2.13555614e-03 1.87212176e-02 -4.16117676e-03 4.16496101e-03 7.54978362e-03 1.33754386e-02 -1.33876024e-02 -2.41617270e-02 -2.44328210e-04 -4.93345668e-04 -8.27412544e-04 -4.22291964e-04 8.28165009e-04 -4.52239229e-05 -2.86869568e-04 1.33559419e-04 -4.91120363e-05 -9.80855301e-05 -3.95693963e-04 1.22336657e-04 2.44328210e-04 -2.48440244e-05 -1.52024209e-05 -3.03619565e-05 -3.45169245e-05 4.61310410e-05 -5.23059013e-05 -3.31792785e-04 4.04998597e-05 -4.06254571e-05 -1.78561667e-04 -8.87661346e-05 8.91341618e-05 4.93345668e-04 -1.52024209e-05 -2.55187535e-05 -5.02682615e-05 -2.62938797e-05 5.02974537e-05 -1.04464250e-04 -6.62649600e-04 8.08854715e-05 -1.78561667e-04 -3.07838138e-04 -1.77281864e-04 4.93345668e-04 8.27412544e-04 -3.03619565e-05 -5.02682615e-05 -1.00743841e-04 -7.06737575e-05 8.68649192e-05 -7.82350394e-05 -4.96269464e-04 1.33606340e-04 -1.82553690e-04 -1.69564494e-04 -3.69139191e-04 5.27505568e-04 4.22291964e-04 -3.45169245e-05 -2.62938797e-05 -7.06737575e-05 -6.46369762e-05 6.16496861e-05 1.04559252e-04 6.63252226e-04 -1.78561667e-04 8.12100987e-05 3.08118091e-04 4.93345668e-04 -1.78178773e-04 -8.28165009e-04 4.61310410e-05 5.02974537e-05 8.68649192e-05 6.16496861e-05 -1.00901762e-04 1.58127633e-02 7.45667574e-02 -1.44078638e-02 1.14996775e-02 4.32545601e-02 3.48128113e-02 -2.77859445e-02 -1.04513262e-01 2.32128546e-03 8.38970501e-04 3.15567979e-03 4.40209780e-03 -2.51871481e-03 1.70032339e-04 1.56438760e-03 -3.25106414e-04 3.24810715e-04 6.50539500e-04 1.06450843e-03 -1.06354021e-03 -2.13008649e-03 -4.51901689e-05 -5.20954131e-05 -1.04338073e-04 -7.83664780e-05 1.04243172e-04 7.45667574e-02 1.66710696e-01 -4.41520937e-02 3.52401194e-02 1.32551183e-01 6.15120390e-02 -4.90960091e-02 -1.84668333e-01 2.06303447e-02 7.45632149e-03 2.80459957e-02 3.91234929e-02 -2.23849913e-02 1.56438760e-03 1.39418779e-02 -2.89123777e-03 2.88860806e-03 5.78538070e-03 9.33705417e-03 -9.32856169e-03 -1.86834904e-02 -2.87325728e-04 -3.31230284e-04 -6.63396783e-04 -4.98265571e-04 6.62793393e-04 1.44078638e-02 4.41520937e-02 6.45127437e-03 9.59643988e-03 3.60957761e-02 -1.88218583e-02 -1.83112117e-02 -6.88752710e-02 6.93669481e-03 1.23281650e-06 4.63708093e-06 8.64032130e-03 -4.94366692e-03 3.25106414e-04 2.89123777e-03 -4.13236729e-04 6.40831182e-04 1.28347366e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -1.33416548e-04 -4.04298092e-05 -8.09738924e-05 -1.33939886e-04 1.78166979e-04 -1.14996775e-02 -3.52401194e-02 9.59643988e-03 1.08151595e-02 -2.88099465e-02 -1.83112117e-02 -2.71486988e-02 5.49729937e-02 -2.68649412e-03 7.47279938e-04 -4.94366692e-03 -8.54177339e-03 -2.24344604e-03 -3.24810715e-04 -2.88860806e-03 6.40831182e-04 -4.12070467e-04 -1.28230628e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 4.91020348e-05 4.03045720e-05 1.78166979e-04 1.82427008e-04 -8.06496427e-05 -4.32545601e-02 -1.32551183e-01 3.60957761e-02 -2.88099465e-02 -8.98903285e-02 -6.88752710e-02 5.49729937e-02 1.65010011e-01 -1.01049026e-02 -4.94366692e-03 -1.65333627e-02 -1.97502878e-02 1.31961505e-02 -6.50539500e-04 -5.78538070e-03 1.28347366e-03 -1.28230628e-03 -2.34005912e-03 -4.15045840e-03 4.14668337e-03 7.53952843e-03 9.83428554e-05 1.78166979e-04 3.08184344e-04 1.70659072e-04 -3.07904036e-04 -3.48128113e-02 -6.15120390e-02 -1.88218583e-02 -1.83112117e-02 -6.88752710e-02 4.96384119e-02 2.29637147e-02 8.63750636e-02 -2.22556282e-02 1.32418474e-03 4.98075082e-03 -2.53288026e-02 1.44921883e-02 -1.06450843e-03 -9.33705417e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -4.10220340e-03 6.66275086e-03 1.33443338e-02 3.95566341e-04 8.89305745e-05 1.78112509e-04 3.70530844e-04 -4.92880524e-04 2.77859445e-02 4.90960091e-02 -1.83112117e-02 -2.71486988e-02 5.49729937e-02 2.29637147e-02 6.00809317e-02 -6.89405030e-02 7.10875952e-03 -3.85421475e-03 1.44921883e-02 2.63677115e-02 1.15709286e-02 1.06354021e-03 9.32856169e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 6.66275086e-03 -4.09007772e-03 -1.33321966e-02 -1.22606118e-04 -8.85632582e-05 -4.92880524e-04 -5.27579766e-04 1.77215506e-04 1.04513262e-01 1.84668333e-01 -6.88752710e-02 5.49729937e-02 1.65010011e-01 8.63750636e-02 -6.89405030e-02 -1.80901362e-01 2.67386859e-02 1.44921883e-02 4.68033905e-02 5.29029404e-02 -3.73562594e-02 2.13008649e-03 1.86834904e-02 -4.15045840e-03 4.14668337e-03 7.53952843e-03 1.33443338e-02 -1.33321966e-02 -2.41354632e-02 -2.45558779e-04 -4.92880524e-04 -8.29624947e-04 -4.26217284e-04 8.28870365e-04 2.32128546e-03 2.06303447e-02 -6.93669481e-03 2.68649412e-03 1.01049026e-02 2.22556282e-02 -7.10875952e-03 -2.67386859e-02 1.81633721e-03 4.43500407e-04 1.66816982e-03 3.79257313e-03 -2.16996772e-03 -4.51901689e-05 -2.87325728e-04 1.33416548e-04 -4.91020348e-05 -9.83428554e-05 -3.95566341e-04 1.22606118e-04 2.45558779e-04 -2.48111523e-05 -1.49885919e-05 -3.00195488e-05 -3.44406887e-05 4.58130407e-05 8.38970501e-04 7.45632149e-03 -1.23281650e-06 -7.47279938e-04 4.94366692e-03 -1.32418474e-03 3.85421475e-03 -1.44921883e-02 4.43500407e-04 -6.29261174e-05 1.21360112e-03 8.56358105e-04 -1.18878603e-03 -5.20954131e-05 -3.31230284e-04 4.04298092e-05 -4.03045720e-05 -1.78166979e-04 -8.89305745e-05 8.85632582e-05 4.92880524e-04 -1.49885919e-05 -2.52596577e-05 -4.98257614e-05 -2.59979782e-05 4.97970660e-05 3.15567979e-03 2.80459957e-02 -4.63708093e-06 4.94366692e-03 1.65333627e-02 -4.98075082e-03 -1.44921883e-02 -4.68033905e-02 1.66816982e-03 1.21360112e-03 4.17923006e-03 4.43417157e-03 -2.35128023e-03 -1.04338073e-04 -6.63396783e-04 8.09738924e-05 -1.78166979e-04 -3.08184344e-04 -1.78112509e-04 4.92880524e-04 8.29624947e-04 -3.00195488e-05 -4.98257614e-05 -1.00174289e-04 -7.03543520e-05 8.59889057e-05 4.40209780e-03 3.91234929e-02 -8.64032130e-03 8.54177339e-03 1.97502878e-02 2.53288026e-02 -2.63677115e-02 -5.29029404e-02 3.79257313e-03 8.56358105e-04 4.43417157e-03 6.70148223e-03 -3.05503084e-03 -7.83664780e-05 -4.98265571e-04 1.33939886e-04 -1.82427008e-04 -1.70659072e-04 -3.70530844e-04 5.27579766e-04 4.26217284e-04 -3.44406887e-05 -2.59979782e-05 -7.03543520e-05 -6.46428973e-05 6.11562205e-05 -2.51871481e-03 -2.23849913e-02 4.94366692e-03 2.24344604e-03 -1.31961505e-02 -1.44921883e-02 -1.15709286e-02 3.73562594e-02 -2.16996772e-03 -1.18878603e-03 -2.35128023e-03 -3.05503084e-03 3.11000888e-03 1.04243172e-04 6.62793393e-04 -1.78166979e-04 8.06496427e-05 3.07904036e-04 4.92880524e-04 -1.77215506e-04 -8.28870365e-04 4.58130407e-05 4.97970660e-05 8.59889057e-05 6.11562205e-05 -1.00017797e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +1 0 2 169 + 2.96547790e-06 3.22477472e-05 -3.04411892e-06 8.51876033e-06 1.52279880e-05 1.04290570e-05 -2.91850086e-05 -5.21706146e-05 -5.08702863e-06 -1.59822079e-06 -2.85695172e-06 -4.90959250e-06 7.99498562e-06 3.22477472e-05 3.50028550e-04 -3.32234720e-05 9.29736329e-05 1.66198052e-04 1.13533863e-04 -3.17716815e-04 -5.67945062e-04 -5.58224670e-05 -1.75380627e-05 -3.13507364e-05 -5.38753731e-05 8.77329093e-05 3.04411892e-06 3.32234720e-05 -1.24374573e-06 8.84207732e-06 1.58059439e-05 4.47033294e-06 -3.04306751e-05 -5.43973464e-05 -5.76648959e-06 -6.18360979e-07 -1.10537135e-06 -5.14466815e-06 8.37779264e-06 -8.51876033e-06 -9.29736329e-05 8.84207732e-06 -2.28280454e-05 -4.42318618e-05 -3.04306751e-05 7.87543261e-05 1.52227284e-04 1.43074191e-05 4.30916895e-06 8.37779264e-06 1.54533889e-05 -2.15563107e-05 -1.52279880e-05 -1.66198052e-04 1.58059439e-05 -4.42318618e-05 -7.71521999e-05 -5.43973464e-05 1.52227284e-04 2.65714996e-04 2.55756940e-05 8.37779264e-06 1.45985053e-05 2.38474621e-05 -4.08529268e-05 -1.04290570e-05 -1.13533863e-04 4.47033294e-06 -3.04306751e-05 -5.43973464e-05 -1.59437137e-05 1.04366396e-04 1.86563558e-04 1.99396745e-05 2.25914750e-06 4.03841285e-06 1.78321445e-05 -2.90386094e-05 2.91850086e-05 3.17716815e-04 -3.04306751e-05 7.87543261e-05 1.52227284e-04 1.04366396e-04 -2.70711400e-04 -5.22085463e-04 -4.96583995e-05 -1.49775745e-05 -2.90386094e-05 -5.34478014e-05 7.49242492e-05 5.21706146e-05 5.67945062e-04 -5.43973464e-05 1.52227284e-04 2.65714996e-04 1.86563558e-04 -5.22085463e-04 -9.11920026e-04 -8.87684926e-05 -2.90386094e-05 -5.06418634e-05 -8.28657029e-05 1.41717820e-04 -5.08702863e-06 -5.58224670e-05 5.76648959e-06 -1.43074191e-05 -2.55756940e-05 -1.99396745e-05 4.96583995e-05 8.87684926e-05 8.16991466e-06 2.96568840e-06 5.30141309e-06 7.99369185e-06 -1.30172619e-05 -1.59822079e-06 -1.75380627e-05 6.18360979e-07 -4.30916895e-06 -8.37779264e-06 -2.25914750e-06 1.49775745e-05 2.90386094e-05 2.96568840e-06 2.68701073e-07 5.47682207e-07 2.95517133e-06 -4.09541424e-06 -2.85695172e-06 -3.13507364e-05 1.10537135e-06 -8.37779264e-06 -1.45985053e-05 -4.03841285e-06 2.90386094e-05 5.06418634e-05 5.30141309e-06 5.47682207e-07 9.41346799e-07 4.53230430e-06 -7.78164390e-06 -4.90959250e-06 -5.38753731e-05 5.14466815e-06 -1.54533889e-05 -2.38474621e-05 -1.78321445e-05 5.34478014e-05 8.28657029e-05 7.99369185e-06 2.95517133e-06 4.53230430e-06 6.00666499e-06 -1.37331901e-05 7.99498562e-06 8.77329093e-05 -8.37779264e-06 2.15563107e-05 4.08529268e-05 2.90386094e-05 -7.49242492e-05 -1.41717820e-04 -1.30172619e-05 -4.09541424e-06 -7.78164390e-06 -1.37331901e-05 1.99370339e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 1 -2 676 + 1.70331981e-04 1.56686156e-03 -6.51407910e-04 -3.25373633e-04 -3.25974342e-04 2.13275773e-03 1.06529736e-03 1.06726413e-03 9.04226467e-05 1.04298820e-04 1.04491378e-04 -9.62701417e-08 5.21927023e-05 6.90889430e-05 6.90437988e-04 -3.35063394e-04 -5.34773979e-05 -6.71267497e-05 1.13749907e-03 1.81549199e-04 2.27887072e-04 1.05470630e-04 3.01454198e-05 3.78396131e-05 -1.38474039e-06 6.03934684e-06 1.56686156e-03 1.39605011e-02 -5.79177921e-03 -2.89295265e-03 -2.89829366e-03 1.87019949e-02 9.34151388e-03 9.35876032e-03 5.74275380e-04 6.62403131e-04 6.63626069e-04 -6.11412895e-07 3.31476517e-04 6.90437988e-04 6.84220743e-03 -3.29785860e-03 -5.26350834e-04 -6.60694463e-04 1.11750831e-02 1.78358597e-03 2.23882114e-03 9.49803118e-04 2.71470965e-04 3.40760101e-04 -1.24701136e-05 5.43866142e-05 6.51407910e-04 5.79177921e-03 -2.34194643e-03 -1.28396912e-03 -1.28633960e-03 7.54477708e-03 4.15163378e-03 4.15929858e-03 1.96475381e-04 3.07730625e-04 3.08298762e-04 -3.28963293e-07 1.78346920e-04 3.35063394e-04 3.29785860e-03 -1.59204853e-03 -2.67905961e-04 -3.36285180e-04 5.37644677e-03 9.05674360e-04 1.13683497e-03 4.46836930e-04 1.37911731e-04 1.73111756e-04 -6.77369774e-06 2.95425123e-05 3.25373633e-04 2.89295265e-03 -1.28396912e-03 -4.12734671e-04 -6.42517511e-04 4.15163378e-03 1.30679162e-03 2.07754015e-03 1.82432375e-04 8.05847531e-05 1.78346920e-04 -4.88316606e-05 4.03258258e-05 5.34773979e-05 5.26350834e-04 -2.67905961e-04 4.37612473e-05 -5.36723997e-05 9.05674360e-04 -1.53519668e-04 1.81443205e-04 8.78576495e-05 -3.62990867e-05 2.95425123e-05 -1.06309250e-05 -7.27217521e-06 3.25974342e-04 2.89829366e-03 -1.28633960e-03 -6.42517511e-04 -4.15104936e-04 4.15929858e-03 2.07754015e-03 1.31445572e-03 1.82769185e-04 1.78346920e-04 8.12426797e-05 4.85925779e-05 4.05801425e-05 6.71267497e-05 6.60694463e-04 -3.36285180e-04 -5.36723997e-05 1.91485394e-05 1.13683497e-03 1.81443205e-04 -7.03147319e-05 1.10282076e-04 2.95425123e-05 -2.27516912e-05 1.06302274e-05 -3.63125685e-06 -2.13275773e-03 -1.87019949e-02 7.54477708e-03 4.15163378e-03 4.15929858e-03 -2.41491129e-02 -1.33465016e-02 -1.33711421e-02 -4.90035601e-04 -8.27789418e-04 -8.29317695e-04 9.09487945e-07 -4.93077425e-04 -1.13749907e-03 -1.11750831e-02 5.37644677e-03 9.05674360e-04 1.13683497e-03 -1.81554630e-02 -3.06172641e-03 -3.84318891e-03 -1.45682118e-03 -4.51376387e-04 -5.66583845e-04 2.22393263e-05 -9.69936354e-05 -1.06529736e-03 -9.34151388e-03 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.33465016e-02 -4.09549370e-03 -6.67879068e-03 -5.17649483e-04 -1.76754004e-04 -4.93077425e-04 1.58001725e-04 -8.84503696e-05 -1.81549199e-04 -1.78358597e-03 9.05674360e-04 -1.53519668e-04 1.81443205e-04 -3.06172641e-03 5.39163955e-04 -6.13387635e-04 -2.89269489e-04 1.28035035e-04 -9.69936354e-05 3.63171474e-05 2.56505959e-05 -1.06726413e-03 -9.35876032e-03 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.33711421e-02 -6.67879068e-03 -4.12013194e-03 -5.18605175e-04 -4.93077425e-04 -1.78572980e-04 -1.57383187e-04 -8.91959377e-05 -2.27887072e-04 -2.23882114e-03 1.13683497e-03 1.81443205e-04 -7.03147319e-05 -3.84318891e-03 -6.13387635e-04 2.57881009e-04 -3.63101447e-04 -9.69936354e-05 8.35563820e-05 -3.66757142e-05 1.33359178e-05 9.04226467e-05 5.74275380e-04 -1.96475381e-04 -1.82432375e-04 -1.82769185e-04 4.90035601e-04 5.17649483e-04 5.18605175e-04 -8.45554756e-05 -7.60865049e-05 -7.62269769e-05 5.56751504e-08 -3.01841932e-05 1.05470630e-04 9.49803118e-04 -4.46836930e-04 -8.78576495e-05 -1.10282076e-04 1.45682118e-03 2.89269489e-04 3.63101447e-04 3.14796982e-05 1.88733263e-05 2.36904767e-05 -1.31956894e-06 5.75511089e-06 1.04298820e-04 6.62403131e-04 -3.07730625e-04 -8.05847531e-05 -1.78346920e-04 8.27789418e-04 1.76754004e-04 4.93077425e-04 -7.60865049e-05 -1.00283317e-04 -8.64065121e-05 -9.02835932e-06 -5.00044961e-05 3.01454198e-05 2.71470965e-04 -1.37911731e-04 3.62990867e-05 -2.95425123e-05 4.51376387e-04 -1.28035035e-04 9.69936354e-05 1.88733263e-05 -2.79585300e-05 6.80982390e-06 -5.97973485e-06 -5.87203907e-06 1.04491378e-04 6.63626069e-04 -3.08298762e-04 -1.78346920e-04 -8.12426797e-05 8.29317695e-04 4.93077425e-04 1.78572980e-04 -7.62269769e-05 -8.64065121e-05 -1.00602073e-04 9.19612793e-06 -5.00631691e-05 3.78396131e-05 3.40760101e-04 -1.73111756e-04 -2.95425123e-05 2.27516912e-05 5.66583845e-04 9.69936354e-05 -8.35563820e-05 2.36904767e-05 6.80982390e-06 -2.48357293e-05 6.77564943e-06 -4.09621064e-06 -9.62701417e-08 -6.11412895e-07 3.28963293e-07 4.88316606e-05 -4.85925779e-05 -9.09487945e-07 -1.58001725e-04 1.57383187e-04 5.56751504e-08 -9.02835932e-06 9.19612793e-06 -4.92142382e-06 3.77367705e-08 -1.38474039e-06 -1.24701136e-05 6.77369774e-06 1.06309250e-05 -1.06302274e-05 -2.22393263e-05 -3.63171474e-05 3.66757142e-05 -1.31956894e-06 -5.97973485e-06 6.77564943e-06 -6.54580906e-08 -5.82816034e-08 5.21927023e-05 3.31476517e-04 -1.78346920e-04 -4.03258258e-05 -4.05801425e-05 4.93077425e-04 8.84503696e-05 8.91959377e-05 -3.01841932e-05 -5.00044961e-05 -5.00631691e-05 3.77367705e-08 -2.53802836e-05 6.03934684e-06 5.43866142e-05 -2.95425123e-05 7.27217521e-06 3.63125685e-06 9.69936354e-05 -2.56505959e-05 -1.33359178e-05 5.75511089e-06 -5.87203907e-06 -4.09621064e-06 -5.82816034e-08 1.75365591e-07 3.89399522e-05 4.05267955e-04 -1.14262710e-04 -1.21960499e-04 -1.14202126e-04 3.94339687e-04 4.20906044e-04 3.94130603e-04 -1.80568929e-06 4.83044511e-05 4.52316205e-05 3.17552305e-06 4.82788395e-05 1.70355257e-04 1.56705372e-03 -6.51449965e-04 -3.26055349e-04 -3.25454559e-04 2.13288205e-03 1.06752266e-03 1.06555564e-03 9.04054609e-05 1.04503554e-04 1.04310995e-04 9.62880926e-08 5.22083963e-05 4.05267955e-04 4.21141460e-03 -1.17930151e-03 -1.25875013e-03 -1.17867623e-03 4.07507107e-03 4.34960542e-03 4.07291041e-03 -1.79889691e-05 4.81227464e-04 4.50614747e-04 3.16357782e-05 4.80972311e-04 1.56705372e-03 1.39619473e-02 -5.79205032e-03 -2.89896245e-03 -2.89362082e-03 1.87027028e-02 9.36083599e-03 9.34358769e-03 5.74116144e-04 6.63645499e-04 6.62422665e-04 6.11473553e-07 3.31547263e-04 1.14262710e-04 1.17930151e-03 -3.00445076e-04 -3.68995448e-04 -3.45522239e-04 1.03377483e-03 1.27132797e-03 1.19045394e-03 -2.97262733e-05 1.23982383e-04 1.16095390e-04 9.62440807e-06 1.46324006e-04 6.51449965e-04 5.79205032e-03 -2.34189260e-03 -1.28656563e-03 -1.28419500e-03 7.54453669e-03 4.15999622e-03 4.15233100e-03 1.96381450e-04 3.08292601e-04 3.07724540e-04 3.28989932e-07 1.78381732e-04 1.21960499e-04 1.25875013e-03 -3.68995448e-04 -3.48593923e-04 -3.68799802e-04 1.27132797e-03 1.19966570e-03 1.27065389e-03 7.10236446e-06 1.35260384e-04 1.46324006e-04 -1.21464494e-05 1.35188667e-04 3.26055349e-04 2.89896245e-03 -1.28656563e-03 -4.15303763e-04 -6.42748746e-04 4.15999622e-03 1.31508200e-03 2.07827125e-03 1.82757759e-04 8.12752461e-05 1.78381732e-04 -4.86026399e-05 4.06038848e-05 1.14202126e-04 1.17867623e-03 -3.45522239e-04 -3.68799802e-04 -3.00078579e-04 1.19045394e-03 1.27065389e-03 1.03251211e-03 6.65055594e-06 1.46324006e-04 1.16011568e-04 3.06123775e-05 1.23827176e-04 3.25454559e-04 2.89362082e-03 -1.28419500e-03 -6.42748746e-04 -4.12932916e-04 4.15233100e-03 2.07827125e-03 1.30741608e-03 1.82421010e-04 1.78381732e-04 8.06172662e-05 4.88418014e-05 4.03495161e-05 -3.94339687e-04 -4.07507107e-03 1.03377483e-03 1.27132797e-03 1.19045394e-03 -3.56229745e-03 -4.38640656e-03 -4.10737049e-03 1.03256208e-04 -4.23073331e-04 -3.96160021e-04 -3.29488681e-05 -5.00935780e-04 -2.13288205e-03 -1.87027028e-02 7.54453669e-03 4.15999622e-03 4.15233100e-03 -2.41480897e-02 -1.33732595e-02 -1.33486179e-02 -4.89739125e-04 -8.29251221e-04 -8.27723241e-04 -9.09518461e-07 -4.93150284e-04 -4.20906044e-04 -4.34960542e-03 1.27132797e-03 1.19966570e-03 1.27065389e-03 -4.38640656e-03 -4.13466337e-03 -4.38408083e-03 -2.51095004e-05 -4.61770109e-04 -5.00935780e-04 4.29595849e-05 -4.61525273e-04 -1.06752266e-03 -9.36083599e-03 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.33732595e-02 -4.12208254e-03 -6.68107836e-03 -5.18554836e-04 -1.78642802e-04 -4.93150284e-04 1.57413656e-04 -8.92472444e-05 -3.94130603e-04 -4.07291041e-03 1.19045394e-03 1.27065389e-03 1.03251211e-03 -4.10737049e-03 -4.38408083e-03 -3.55794074e-03 -2.35121892e-05 -5.00935780e-04 -3.95872373e-04 -1.06089558e-04 -4.22541986e-04 -1.06555564e-03 -9.34358769e-03 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.33486179e-02 -6.68107836e-03 -4.09743867e-03 -5.17599346e-04 -4.93150284e-04 -1.76823765e-04 -1.58032368e-04 -8.85015542e-05 -1.80568929e-06 -1.79889691e-05 2.97262733e-05 -7.10236446e-06 -6.65055594e-06 -1.03256208e-04 2.51095004e-05 2.35121892e-05 -1.75595779e-05 -7.56132592e-06 -7.08032110e-06 6.25635393e-07 9.51180333e-06 9.04054609e-05 5.74116144e-04 -1.96381450e-04 -1.82757759e-04 -1.82421010e-04 4.89739125e-04 5.18554836e-04 5.17599346e-04 -8.45382922e-05 -7.62385145e-05 -7.60980373e-05 -5.56923571e-08 -3.01969701e-05 4.83044511e-05 4.81227464e-04 -1.23982383e-04 -1.35260384e-04 -1.46324006e-04 4.23073331e-04 4.61770109e-04 5.00935780e-04 -7.56132592e-06 3.14969832e-05 3.69526627e-05 -6.57392841e-06 4.07280590e-05 1.04503554e-04 6.63645499e-04 -3.08292601e-04 -8.12752461e-05 -1.78381732e-04 8.29251221e-04 1.78642802e-04 4.93150284e-04 -7.62385145e-05 -1.00634733e-04 -8.64460597e-05 -9.19448866e-06 -5.00888212e-05 4.52316205e-05 4.50614747e-04 -1.16095390e-04 -1.46324006e-04 -1.16011568e-04 3.96160021e-04 5.00935780e-04 3.95872373e-04 -7.08032110e-06 3.69526627e-05 2.66358874e-05 1.23099665e-05 3.69226169e-05 1.04310995e-04 6.62422665e-04 -3.07724540e-04 -1.78381732e-04 -8.06172662e-05 8.27723241e-04 4.93150284e-04 1.76823765e-04 -7.60980373e-05 -8.64460597e-05 -1.00315868e-04 9.02664158e-06 -5.00301015e-05 3.17552305e-06 3.16357782e-05 -9.62440807e-06 1.21464494e-05 -3.06123775e-05 3.29488681e-05 -4.29595849e-05 1.06089558e-04 6.25635393e-07 -6.57392841e-06 1.23099665e-05 -1.82646062e-05 3.28441827e-06 9.62880926e-08 6.11473553e-07 -3.28989932e-07 4.86026399e-05 -4.88418014e-05 9.09518461e-07 -1.57413656e-04 1.58032368e-04 -5.56923571e-08 -9.19448866e-06 9.02664158e-06 -4.92119020e-06 -3.77645891e-08 4.82788395e-05 4.80972311e-04 -1.46324006e-04 -1.35188667e-04 -1.23827176e-04 5.00935780e-04 4.61525273e-04 4.22541986e-04 9.51180333e-06 4.07280590e-05 3.69226169e-05 3.28441827e-06 3.14537827e-05 5.22083963e-05 3.31547263e-04 -1.78381732e-04 -4.06038848e-05 -4.03495161e-05 4.93150284e-04 8.92472444e-05 8.85015542e-05 -3.01969701e-05 -5.00888212e-05 -5.00301015e-05 -3.77645891e-08 -2.53974700e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 1 -1 664 + 2.50627515e-03 1.63954155e-02 -9.25966720e-03 4.53385554e-06 -4.00514183e-06 2.59395698e-02 -1.27009168e-05 1.12198045e-05 -7.27294924e-05 6.16798881e-08 -5.44871132e-08 5.20394647e-05 5.31283806e-04 -2.53475787e-04 6.09317790e-05 5.06060310e-05 8.68105499e-04 -2.08679547e-04 -1.73315859e-04 8.52675168e-05 -3.73241497e-05 -3.09990469e-05 1.39162822e-06 7.45170613e-06 1.63954155e-02 8.09939371e-02 -5.00301775e-02 2.44965173e-05 -2.16398660e-05 1.17947808e-01 -5.77513548e-05 5.10167042e-05 -1.25415667e-02 1.06361588e-05 -9.39582747e-06 -5.71898835e-10 4.60052435e-09 5.31283806e-04 5.40035942e-03 -2.55834318e-03 6.14987346e-04 5.10769079e-04 8.76207104e-03 -2.10627052e-03 -1.74933331e-03 8.12719434e-04 -3.55751674e-04 -2.95464543e-04 1.32641754e-05 7.10252464e-05 9.25966720e-03 5.00301775e-02 -3.02793851e-02 1.64061508e-05 -1.44929542e-05 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -4.85257292e-03 4.19640178e-06 -3.70704010e-06 -2.29996550e-10 1.85016066e-09 2.53475787e-04 2.55834318e-03 -1.21144772e-03 3.06359340e-04 2.54442436e-04 4.13451445e-03 -1.04632116e-03 -8.69007304e-04 3.71674720e-04 -1.74951794e-04 -1.45303749e-04 6.93757469e-06 3.71484045e-05 -4.53385554e-06 -2.44965173e-05 1.64061508e-05 3.22751825e-03 7.09625512e-09 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 2.51640210e-06 1.65565609e-04 1.85016066e-09 -8.10676010e-08 7.16131295e-08 -6.09317790e-05 -6.14987346e-04 3.06359340e-04 -1.06391331e-05 -6.11641470e-05 -1.04632116e-03 3.33454576e-05 2.08896328e-04 -1.08600852e-04 -1.51988342e-06 3.71484045e-05 9.44966503e-06 3.03442267e-07 4.00514183e-06 2.16398660e-05 -1.44929542e-05 7.09625512e-09 3.22752002e-03 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -2.22295290e-06 1.85016066e-09 1.65566069e-04 -7.16141349e-08 -8.10669134e-08 -5.06060310e-05 -5.10769079e-04 2.54442436e-04 -6.11641470e-05 1.22060385e-05 -8.69007304e-04 2.08896328e-04 -4.46785596e-05 -9.01969085e-05 3.71484045e-05 -1.53950328e-05 -1.06184373e-05 3.70073508e-06 -2.59395698e-02 -1.17947808e-01 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -1.70014403e-01 9.53240449e-05 -8.42078704e-05 2.32819729e-02 -2.05842404e-05 1.81838176e-05 1.15193620e-09 -9.26651742e-09 -8.68105499e-04 -8.76207104e-03 4.13451445e-03 -1.04632116e-03 -8.69007304e-04 -1.41224892e-02 3.57662764e-03 2.97051772e-03 -1.24474918e-03 5.87312265e-04 4.87783930e-04 -2.33332277e-05 -1.24941672e-04 1.27009168e-05 5.77513548e-05 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 9.53240449e-05 2.46695060e-02 4.12311060e-08 -1.28536127e-05 -1.71440441e-03 -9.26651742e-09 8.39436678e-07 -7.41542074e-07 2.08679547e-04 2.10627052e-03 -1.04632116e-03 3.33454576e-05 2.08896328e-04 3.57662764e-03 -1.03510146e-04 -7.14067925e-04 3.65896624e-04 9.70942563e-06 -1.24941672e-04 -3.28873613e-05 -1.93847113e-06 -1.12198045e-05 -5.10167042e-05 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -8.42078704e-05 4.12311060e-08 2.46695162e-02 1.13546939e-05 -9.26651742e-09 -1.71440671e-03 7.41547110e-07 8.39433234e-07 1.73315859e-04 1.74933331e-03 -8.69007304e-04 2.08896328e-04 -4.46785596e-05 2.97051772e-03 -7.14067925e-04 1.63198458e-04 3.03890288e-04 -1.24941672e-04 5.63758810e-05 3.66310171e-05 -1.35519166e-05 -7.27294924e-05 -1.25415667e-02 4.85257292e-03 -2.51640210e-06 2.22295290e-06 -2.32819729e-02 1.28536127e-05 -1.13546939e-05 -3.95858081e-03 4.38119900e-06 -3.87028728e-06 -2.94092631e-10 2.36576860e-09 8.52675168e-05 8.12719434e-04 -3.71674720e-04 1.08600852e-04 9.01969085e-05 1.24474918e-03 -3.65896624e-04 -3.03890288e-04 5.62305240e-05 -3.80876720e-05 -3.16331796e-05 1.90122359e-06 1.01804198e-05 6.16798881e-08 1.06361588e-05 -4.19640178e-06 -1.65565609e-04 -1.85016066e-09 2.05842404e-05 1.71440441e-03 9.26651742e-09 4.38119900e-06 1.20748131e-03 3.28228457e-09 -6.28346033e-07 5.55070168e-07 -3.73241497e-05 -3.55751674e-04 1.74951794e-04 1.51988342e-06 -3.71484045e-05 -5.87312265e-04 -9.70942563e-06 1.24941672e-04 -3.80876720e-05 -1.25040988e-05 1.39231378e-05 6.75835118e-06 2.48316896e-06 -5.44871132e-08 -9.39582747e-06 3.70704010e-06 -1.85016066e-09 -1.65566069e-04 -1.81838176e-05 9.26651742e-09 1.71440671e-03 -3.87028728e-06 3.28228457e-09 1.20748213e-03 -5.55072100e-07 -6.28344712e-07 -3.09990469e-05 -2.95464543e-04 1.45303749e-04 -3.71484045e-05 1.53950328e-05 -4.87783930e-04 1.24941672e-04 -5.63758810e-05 -3.16331796e-05 1.39231378e-05 -1.77044733e-05 -6.76221606e-06 4.37347927e-06 -5.71898835e-10 2.29996550e-10 8.10676010e-08 7.16141349e-08 -1.15193620e-09 -8.39436678e-07 -7.41547110e-07 -2.94092631e-10 -6.28346033e-07 -5.55072100e-07 -7.58100897e-05 1.39162822e-06 1.32641754e-05 -6.93757469e-06 -9.44966503e-06 1.06184373e-05 2.33332277e-05 3.28873613e-05 -3.66310171e-05 1.90122359e-06 6.75835118e-06 -6.76221606e-06 -1.27594424e-06 1.38120738e-07 4.60052435e-09 -1.85016066e-09 -7.16131295e-08 8.10669134e-08 9.26651742e-09 7.41542074e-07 -8.39433234e-07 2.36576860e-09 5.55070168e-07 -6.28344712e-07 -7.58100897e-05 7.45170613e-06 7.10252464e-05 -3.71484045e-05 -3.03442267e-07 -3.70073508e-06 1.24941672e-04 1.93847113e-06 1.35519166e-05 1.01804198e-05 2.48316896e-06 4.37347927e-06 1.38120738e-07 -5.62148092e-07 1.20751197e-02 6.03525482e-02 -3.31029126e-02 -1.32633943e-02 -1.10157253e-02 8.22132826e-02 3.29405208e-02 2.73582857e-02 -2.87656255e-03 -2.30954797e-03 -1.91816254e-03 -1.43529571e-04 -7.68553101e-04 2.50820093e-03 1.64061116e-02 -9.26607928e-03 -4.53731191e-06 4.00819514e-06 2.59561676e-02 1.27099310e-05 -1.12277676e-05 -7.32519544e-05 -6.21273115e-08 5.48823605e-08 6.03525482e-02 1.53680068e-01 -1.11761257e-01 -4.47795527e-02 -3.71910269e-02 1.70668246e-01 6.83819054e-02 5.67936285e-02 -3.49215408e-02 -2.80379697e-02 -2.32865409e-02 -1.74245255e-03 -9.33025373e-03 1.64061116e-02 8.10260212e-02 -5.00551051e-02 -2.45104340e-05 2.16521598e-05 1.17988572e-01 5.77753480e-05 -5.10378994e-05 -1.25535498e-02 -1.06470647e-05 9.40546164e-06 -5.72525214e-10 4.60556313e-09 3.31029126e-02 1.11761257e-01 -6.94931772e-02 -3.35596254e-02 -2.78724742e-02 1.34400585e-01 6.72874331e-02 5.58846300e-02 -1.46976571e-02 -1.39686755e-02 -1.16014867e-02 -9.70655567e-04 -5.19753765e-03 9.26607928e-03 5.00551051e-02 -3.02967924e-02 -1.64169660e-05 1.45025082e-05 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -4.85780563e-03 -4.20142599e-06 3.71147842e-06 -2.30298846e-10 1.85259243e-09 1.32633943e-02 4.47795527e-02 -3.35596254e-02 8.18886596e-04 -1.11677066e-02 6.72874331e-02 -6.57590765e-03 2.23913796e-02 -8.74722442e-03 -2.13937840e-03 -5.19753765e-03 1.26132150e-03 -7.11925417e-04 4.53731191e-06 2.45104340e-05 -1.64169660e-05 3.22985843e-03 7.10142892e-09 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -2.51964791e-06 1.66164344e-04 1.85259243e-09 8.13664448e-08 -7.18771226e-08 1.10157253e-02 3.71910269e-02 -2.78724742e-02 -1.11677066e-02 4.99009124e-03 5.58846300e-02 2.23913796e-02 -1.49392207e-02 -7.26488405e-03 -5.19753765e-03 -1.98067265e-04 -1.69358697e-03 -7.93599121e-05 -4.00819514e-06 -2.16521598e-05 1.45025082e-05 7.10142892e-09 3.22986019e-03 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 2.22582020e-06 1.85259243e-09 1.66164805e-04 7.18781294e-08 8.13657562e-08 -8.22132826e-02 -1.70668246e-01 1.34400585e-01 6.72874331e-02 5.58846300e-02 -1.66911225e-01 -9.39367976e-02 -7.80178844e-02 4.49322922e-02 4.48652220e-02 3.72621783e-02 3.20396726e-03 1.71561788e-02 -2.59561676e-02 -1.17988572e-01 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -1.70063455e-01 -9.53613771e-05 8.42408491e-05 2.33026297e-02 2.06046353e-05 -1.82018342e-05 1.15319380e-09 -9.27663400e-09 -3.29405208e-02 -6.83819054e-02 6.72874331e-02 -6.57590765e-03 2.23913796e-02 -9.39367976e-02 2.98993782e-02 -3.12595443e-02 2.95907174e-02 3.95948875e-03 1.71561788e-02 -5.40638149e-03 1.31760734e-03 -1.27099310e-05 -5.77753480e-05 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -9.53613771e-05 2.46831012e-02 4.12501336e-08 1.28671159e-05 -1.71734103e-03 -9.27663400e-09 -8.40933269e-07 7.42864136e-07 -2.73582857e-02 -5.67936285e-02 5.58846300e-02 2.23913796e-02 -1.49392207e-02 -7.80178844e-02 -3.12595443e-02 4.15750034e-02 2.45761536e-02 1.71561788e-02 -2.44844577e-03 6.62257576e-03 -9.81022486e-04 1.12277676e-05 5.10378994e-05 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 8.42408491e-05 4.12501336e-08 2.46831115e-02 -1.13666224e-05 -9.27663400e-09 -1.71734334e-03 -7.42869178e-07 -8.40929821e-07 -2.87656255e-03 -3.49215408e-02 1.46976571e-02 8.74722442e-03 7.26488405e-03 -4.49322922e-02 -2.95907174e-02 -2.45761536e-02 3.84290610e-03 1.30233128e-03 1.08163290e-03 -2.20730228e-05 -1.18193694e-04 -7.32519544e-05 -1.25535498e-02 4.85780563e-03 2.51964791e-06 -2.22582020e-06 -2.33026297e-02 -1.28671159e-05 1.13666224e-05 -3.95982519e-03 -4.38332623e-06 3.87216643e-06 -2.94276912e-10 2.36725102e-09 -2.30954797e-03 -2.80379697e-02 1.39686755e-02 2.13937840e-03 5.19753765e-03 -4.48652220e-02 -3.95948875e-03 -1.71561788e-02 1.30233128e-03 2.88233782e-03 8.18454532e-04 9.94377636e-04 9.95130233e-04 -6.21273115e-08 -1.06470647e-05 4.20142599e-06 -1.66164344e-04 -1.85259243e-09 -2.06046353e-05 1.71734103e-03 9.27663400e-09 -4.38332623e-06 1.20838436e-03 3.28410752e-09 6.28875997e-07 -5.55538330e-07 -1.91816254e-03 -2.32865409e-02 1.16014867e-02 5.19753765e-03 1.98067265e-04 -3.72621783e-02 -1.71561788e-02 2.44844577e-03 1.08163290e-03 8.18454532e-04 2.57664020e-03 -7.63719720e-04 1.12335131e-03 5.48823605e-08 9.40546164e-06 -3.71147842e-06 -1.85259243e-09 -1.66164805e-04 1.82018342e-05 9.27663400e-09 1.71734334e-03 3.87216643e-06 3.28410752e-09 1.20838518e-03 5.55540262e-07 6.28874675e-07 -1.43529571e-04 -1.74245255e-03 9.70655567e-04 -1.26132150e-03 1.69358697e-03 -3.20396726e-03 5.40638149e-03 -6.62257576e-03 -2.20730228e-05 9.94377636e-04 -7.63719720e-04 1.58722078e-04 1.24501907e-05 -5.72525214e-10 2.30298846e-10 -8.13664448e-08 -7.18781294e-08 -1.15319380e-09 8.40933269e-07 7.42869178e-07 -2.94276912e-10 6.28875997e-07 5.55540262e-07 -7.58997251e-05 -7.68553101e-04 -9.33025373e-03 5.19753765e-03 7.11925417e-04 7.93599121e-05 -1.71561788e-02 -1.31760734e-03 9.81022486e-04 -1.18193694e-04 9.95130233e-04 1.12335131e-03 1.24501907e-05 2.23063597e-04 4.60556313e-09 -1.85259243e-09 7.18771226e-08 -8.13657562e-08 9.27663400e-09 -7.42864136e-07 8.40929821e-07 2.36725102e-09 -5.55538330e-07 6.28874675e-07 -7.58997251e-05 + 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 25 + 0 24 50 76 102 128 154 180 206 232 258 284 308 332 356 382 408 434 460 486 512 538 564 590 616 640 664 +1 1 0 507 + 1.70227538e-04 1.56599930e-03 -6.51015093e-04 3.25814943e-04 3.25214596e-04 2.13153159e-03 -1.06677226e-03 -1.06480662e-03 9.03864428e-05 -1.04469411e-04 -1.04276916e-04 9.62499139e-08 5.21876954e-05 1.56599930e-03 1.39540110e-02 -5.78874775e-03 2.89710721e-03 2.89176899e-03 1.86929580e-02 -9.35530547e-03 -9.33806736e-03 5.74270178e-04 -6.63746306e-04 -6.62523286e-04 6.11523737e-07 3.31574473e-04 6.51015093e-04 5.78874775e-03 -2.34057715e-03 1.28572766e-03 1.28335857e-03 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 1.96448112e-04 -3.08295628e-04 -3.07727561e-04 3.28946782e-07 1.78358336e-04 -3.25814943e-04 -2.89710721e-03 1.28572766e-03 -4.15018849e-04 -6.42285263e-04 -4.15746882e-03 1.31425191e-03 2.07686359e-03 -1.82741080e-04 8.12948157e-05 1.78358336e-04 4.85777434e-05 -4.06108259e-05 -3.25214596e-04 -2.89176899e-03 1.28335857e-03 -6.42285263e-04 -4.12649712e-04 -4.14980826e-03 2.07686359e-03 1.30659118e-03 -1.82404361e-04 1.78358336e-04 8.06369221e-05 -4.88168847e-05 -4.03565362e-05 -2.13153159e-03 -1.86929580e-02 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -2.41369597e-02 1.33658221e-02 1.33411942e-02 -4.90141923e-04 8.29516416e-04 8.27987948e-04 -9.09635785e-07 -4.93213898e-04 1.06677226e-03 9.35530547e-03 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.33658221e-02 -4.11975812e-03 -6.67689653e-03 5.18619923e-04 -1.78822237e-04 -4.93213898e-04 -1.57344700e-04 8.93306502e-05 1.06480662e-03 9.33806736e-03 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.33411942e-02 -6.67689653e-03 -4.09512968e-03 5.17664313e-04 -4.93213898e-04 -1.77002966e-04 1.57963593e-04 8.85850601e-05 9.03864428e-05 5.74270178e-04 -1.96448112e-04 1.82741080e-04 1.82404361e-04 4.90141923e-04 -5.18619923e-04 -5.17664313e-04 -8.44672508e-05 7.61101121e-05 7.59698714e-05 -5.55509065e-08 -3.01202741e-05 -1.04469411e-04 -6.63746306e-04 3.08295628e-04 -8.12948157e-05 -1.78358336e-04 -8.29516416e-04 1.78822237e-04 4.93213898e-04 7.61101121e-05 -1.00501109e-04 -8.62860668e-05 9.20640124e-06 5.00150775e-05 -1.04276916e-04 -6.62523286e-04 3.07727561e-04 -1.78358336e-04 -8.06369221e-05 -8.27987948e-04 4.93213898e-04 1.77002966e-04 7.59698714e-05 -8.62860668e-05 -1.00182833e-04 -9.03884807e-06 4.99565381e-05 9.62499139e-08 6.11523737e-07 -3.28946782e-07 -4.85777434e-05 4.88168847e-05 9.09635785e-07 1.57344700e-04 -1.57963593e-04 -5.55509065e-08 9.20640124e-06 -9.03884807e-06 -4.93388686e-06 -3.76829102e-08 5.21876954e-05 3.31574473e-04 -1.78358336e-04 4.06108259e-05 4.03565362e-05 4.93213898e-04 -8.93306502e-05 -8.85850601e-05 -3.01202741e-05 5.00150775e-05 4.99565381e-05 -3.76829102e-08 -2.53658797e-05 1.58529231e-02 7.47129421e-02 -4.33360959e-02 1.15285361e-02 1.44710323e-02 1.04681120e-01 -2.78479186e-02 -3.49557072e-02 -4.98802469e-03 2.52880716e-03 3.17424953e-03 1.93617154e-04 -8.44433479e-04 1.70459777e-04 1.56791653e-03 -6.51843036e-04 3.25613709e-04 3.26214862e-04 2.13410893e-03 -1.06604671e-03 -1.06801486e-03 9.04416656e-05 -1.04332897e-04 -1.04525518e-04 -9.63083198e-08 5.22134005e-05 7.47129421e-02 1.66833644e-01 -1.32675530e-01 3.52951644e-02 4.43037575e-02 1.84682661e-01 -4.91304228e-02 -6.16702705e-02 -4.41928165e-02 2.24046828e-02 2.81231621e-02 1.71540597e-03 -7.48149740e-03 1.56791653e-03 1.39684405e-02 -5.79508335e-03 2.89480516e-03 2.90014959e-03 1.87117436e-02 -9.34703588e-03 -9.36429252e-03 5.74121068e-04 -6.62302200e-04 -6.63524952e-04 -6.11362418e-07 3.31449151e-04 4.33360959e-02 1.32675530e-01 -8.99714007e-02 2.88614507e-02 3.62279290e-02 1.65064487e-01 -5.50446034e-02 -6.90939623e-02 -2.21670899e-02 1.32210668e-02 1.65955576e-02 1.13872361e-03 -4.96637989e-03 6.51843036e-04 5.79508335e-03 -2.34326261e-03 1.28480592e-03 1.28717795e-03 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 1.96408637e-04 -3.07727515e-04 -3.08295646e-04 -3.29006363e-07 1.78370270e-04 -1.15285361e-02 -3.52951644e-02 2.88614507e-02 1.08417141e-02 -9.63757757e-03 -5.50446034e-02 -2.72064416e-02 1.83808029e-02 8.75776196e-03 2.25205532e-03 -4.96637989e-03 -1.95457682e-03 -7.52018949e-04 -3.25613709e-04 -2.89480516e-03 1.28480592e-03 -4.13017927e-04 -6.42981152e-04 -4.15415752e-03 1.30761661e-03 2.07894822e-03 -1.82448989e-04 8.05650461e-05 1.78370270e-04 4.88565785e-05 -4.03187791e-05 -1.44710323e-02 -4.43037575e-02 3.62279290e-02 -9.63757757e-03 6.42218226e-03 -6.90939623e-02 1.83808029e-02 -1.87775036e-02 1.09930572e-02 -4.96637989e-03 -2.53919045e-05 1.69295704e-03 6.75491138e-06 -3.26214862e-04 -2.90014959e-03 1.28717795e-03 -6.42981152e-04 -4.15389902e-04 -4.16182699e-03 2.07894822e-03 1.31528590e-03 -1.82785829e-04 1.78370270e-04 8.12230588e-05 -4.86174757e-05 -4.05731748e-05 -1.04681120e-01 -1.84682661e-01 1.65064487e-01 -5.50446034e-02 -6.90939623e-02 -1.80707780e-01 6.89606206e-02 8.65618467e-02 5.91094241e-02 -3.73738984e-02 -4.69130590e-02 -3.33388609e-03 1.45402666e-02 -2.13410893e-03 -1.87117436e-02 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -2.41602476e-02 1.33539278e-02 1.33785820e-02 -4.89632371e-04 8.27524231e-04 8.29052018e-04 9.09370158e-07 -4.93013567e-04 2.78479186e-02 4.91304228e-02 -5.50446034e-02 -2.72064416e-02 1.83808029e-02 6.89606206e-02 6.01718298e-02 -2.30277174e-02 -2.64105968e-02 -1.16077536e-02 1.45402666e-02 7.05643278e-03 3.87612622e-03 1.06604671e-03 9.34703588e-03 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.33539278e-02 -4.09780267e-03 -6.68297344e-03 5.17584298e-04 -1.76574575e-04 -4.93013567e-04 -1.58070488e-04 8.83667499e-05 3.49557072e-02 6.16702705e-02 -6.90939623e-02 1.83808029e-02 -1.87775036e-02 8.65618467e-02 -2.30277174e-02 4.96119427e-02 -3.31515293e-02 1.45402666e-02 -4.93998140e-03 -6.63094784e-03 1.31416438e-03 1.06801486e-03 9.36429252e-03 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.33785820e-02 -6.68297344e-03 -4.12245634e-03 5.18539870e-04 -4.93013567e-04 -1.78393315e-04 1.57452132e-04 8.91124179e-05 -4.98802469e-03 -4.41928165e-02 2.21670899e-02 -8.75776196e-03 -1.09930572e-02 -5.91094241e-02 2.64105968e-02 3.31515293e-02 8.80157938e-03 -3.76012261e-03 -4.71984089e-03 -2.24095588e-04 9.77360801e-04 9.04416656e-05 5.74121068e-04 -1.96408637e-04 1.82448989e-04 1.82785829e-04 4.89632371e-04 -5.17584298e-04 -5.18539870e-04 -8.46265595e-05 7.62147618e-05 7.63554706e-05 5.58167229e-08 -3.02609464e-05 2.52880716e-03 2.24046828e-02 -1.32210668e-02 -2.25205532e-03 4.96637989e-03 3.73738984e-02 1.16077536e-02 -1.45402666e-02 -3.76012261e-03 3.11345474e-03 2.37673575e-03 -3.45898515e-04 -1.19339749e-03 -1.04332897e-04 -6.62302200e-04 3.07727515e-04 -8.05650461e-05 -1.78370270e-04 -8.27524231e-04 1.76574575e-04 4.93013567e-04 7.62147618e-05 -1.00416407e-04 -8.65665973e-05 9.01613453e-06 5.00780865e-05 3.17424953e-03 2.81231621e-02 -1.65955576e-02 4.96637989e-03 2.53919045e-05 4.69130590e-02 -1.45402666e-02 4.93998140e-03 -4.71984089e-03 2.37673575e-03 4.20336134e-03 7.73532946e-04 -1.22108219e-03 -1.04525518e-04 -6.63524952e-04 3.08295646e-04 -1.78370270e-04 -8.12230588e-05 -8.29052018e-04 4.93013567e-04 1.78393315e-04 7.63554706e-05 -8.65665973e-05 -1.00735753e-04 -9.18419723e-06 5.01369399e-05 1.93617154e-04 1.71540597e-03 -1.13872361e-03 1.95457682e-03 -1.69295704e-03 3.33388609e-03 -7.05643278e-03 6.63094784e-03 -2.24095588e-04 -3.45898515e-04 7.73532946e-04 -2.48394277e-04 -4.51378209e-05 -9.63083198e-08 -6.11362418e-07 3.29006363e-07 -4.88565785e-05 4.86174757e-05 -9.09370158e-07 1.58070488e-04 -1.57452132e-04 5.58167229e-08 9.01613453e-06 -9.18419723e-06 -4.90871085e-06 3.78184949e-08 -8.44433479e-04 -7.48149740e-03 4.96637989e-03 7.52018949e-04 -6.75491138e-06 -1.45402666e-02 -3.87612622e-03 -1.31416438e-03 9.77360801e-04 -1.19339749e-03 -1.22108219e-03 -4.51378209e-05 -6.18816283e-05 5.22134005e-05 3.31449151e-04 -1.78370270e-04 4.03187791e-05 4.05731748e-05 4.93013567e-04 -8.83667499e-05 -8.91124179e-05 -3.02609464e-05 5.00780865e-05 5.01369399e-05 3.78184949e-08 -2.54118772e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +1 1 1 169 + 9.12807568e-05 8.91196786e-04 -2.64442740e-04 2.46652059e-04 2.64607571e-04 8.88867447e-04 -8.29067894e-04 -8.89421489e-04 3.03309659e-06 -7.60999548e-05 -8.16397976e-05 -5.35521977e-06 7.61473888e-05 8.91196786e-04 8.58207172e-03 -2.53108248e-03 2.36080108e-03 2.53266014e-03 8.46982650e-03 -7.90000944e-03 -8.47510584e-03 2.53772079e-05 -6.36710476e-04 -6.83061042e-04 -4.48058680e-05 6.37107345e-04 2.64442740e-04 2.53108248e-03 -6.74171276e-04 7.38400520e-04 7.92153808e-04 2.24240770e-03 -2.46661971e-03 -2.64618205e-03 -4.39276203e-05 -1.75104105e-04 -1.87851146e-04 -1.53121755e-05 2.17728167e-04 -2.46652059e-04 -2.36080108e-03 7.38400520e-04 -5.71234716e-04 -7.38860774e-04 -2.46661971e-03 1.89854913e-03 2.46815719e-03 -3.26197848e-05 1.57400690e-04 2.17728167e-04 5.67704650e-05 -1.57498800e-04 -2.64607571e-04 -2.53266014e-03 7.92153808e-04 -7.38860774e-04 -6.75158485e-04 -2.64618205e-03 2.46815719e-03 2.24570546e-03 -3.49944049e-05 2.17728167e-04 1.88025041e-04 -3.02597409e-05 -1.75375446e-04 -8.88867447e-04 -8.46982650e-03 2.24240770e-03 -2.46661971e-03 -2.64618205e-03 -7.44666136e-03 8.23029398e-03 8.82943409e-03 1.50706526e-04 5.46964554e-04 5.86781892e-04 4.86223601e-05 -6.91375130e-04 8.29067894e-04 7.90000944e-03 -2.46661971e-03 1.89854913e-03 2.46815719e-03 8.23029398e-03 -6.29931908e-03 -8.23542402e-03 1.08812930e-04 -4.90095415e-04 -6.91375130e-04 -1.89331138e-04 4.90400897e-04 8.89421489e-04 8.47510584e-03 -2.64618205e-03 2.46815719e-03 2.24570546e-03 8.82943409e-03 -8.23542402e-03 -7.45766491e-03 1.16734176e-04 -6.91375130e-04 -5.87340135e-04 1.05808529e-04 5.47826170e-04 3.03309659e-06 2.53772079e-05 4.39276203e-05 3.26197848e-05 3.49944049e-05 -1.50706526e-04 -1.08812930e-04 -1.16734176e-04 -2.42672827e-05 7.04413418e-06 7.55692549e-06 -1.08102400e-06 1.53713869e-05 -7.60999548e-05 -6.36710476e-04 1.75104105e-04 -1.57400690e-04 -2.17728167e-04 -5.46964554e-04 4.90095415e-04 6.91375130e-04 7.04413418e-06 -1.24251976e-05 -1.51777582e-06 1.36855994e-05 3.22014098e-06 -8.16397976e-05 -6.83061042e-04 1.87851146e-04 -2.17728167e-04 -1.88025041e-04 -5.86781892e-04 6.91375130e-04 5.87340135e-04 7.55692549e-06 -1.51777582e-06 -1.26386789e-05 -1.30737023e-05 1.50259042e-06 -5.35521977e-06 -4.48058680e-05 1.53121755e-05 -5.67704650e-05 3.02597409e-05 -4.86223601e-05 1.89331138e-04 -1.05808529e-04 -1.08102400e-06 1.36855994e-05 -1.30737023e-05 -2.30407539e-05 -7.49987690e-07 7.61473888e-05 6.37107345e-04 -2.17728167e-04 1.57498800e-04 1.75375446e-04 6.91375130e-04 -4.90400897e-04 -5.47826170e-04 1.53713869e-05 3.22014098e-06 1.50259042e-06 -7.49987690e-07 -1.24292107e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 2 -2 169 + 8.41941522e-07 8.81721179e-06 -4.52646423e-06 -1.08815492e-06 -2.71438800e-06 1.47485447e-05 3.54552706e-06 8.84427020e-06 2.07758981e-06 1.09322589e-06 2.72703746e-06 -6.86257345e-07 6.55575540e-07 8.81721179e-06 9.22160680e-05 -4.75149375e-05 -1.14225166e-05 -2.84933161e-05 1.54525653e-04 3.71477252e-05 9.26645074e-05 2.18623372e-05 1.15039421e-05 2.86964310e-05 -7.22143968e-06 6.89857711e-06 4.52646423e-06 4.75149375e-05 -2.41247122e-05 -5.88999828e-06 -1.46925225e-05 7.88792374e-05 1.92509959e-05 4.80213538e-05 1.08789021e-05 5.86708428e-06 1.46353639e-05 -3.74159018e-06 3.57430783e-06 1.08815492e-06 1.14225166e-05 -5.88999828e-06 -1.03967439e-06 -3.53205943e-06 1.92509959e-05 3.42760758e-06 1.15442583e-05 2.77698686e-06 1.04450008e-06 3.57430783e-06 -9.92839091e-07 6.26356103e-07 2.71438800e-06 2.84933161e-05 -1.46925225e-05 -3.53205943e-06 -8.43440339e-06 4.80213538e-05 1.15442583e-05 2.75966975e-05 6.92715687e-06 3.57430783e-06 8.52768045e-06 -2.01082012e-06 2.05004104e-06 -1.47485447e-05 -1.54525653e-04 7.88792374e-05 1.92509959e-05 4.80213538e-05 -2.57208764e-04 -6.27517796e-05 -1.56533481e-04 -3.57092401e-05 -1.92458751e-05 -4.80085801e-05 1.22686078e-05 -1.17200920e-05 -3.54552706e-06 -3.71477252e-05 1.92509959e-05 3.42760758e-06 1.15442583e-05 -6.27517796e-05 -1.12617980e-05 -3.76304040e-05 -9.10118160e-06 -3.45738451e-06 -1.17200920e-05 3.24769188e-06 -2.07329221e-06 -8.84427020e-06 -9.26645074e-05 4.80213538e-05 1.15442583e-05 2.75966975e-05 -1.56533481e-04 -3.76304040e-05 -9.00449118e-05 -2.27027767e-05 -1.17200920e-05 -2.79946001e-05 6.61292516e-06 -6.72985808e-06 2.07758981e-06 2.18623372e-05 -1.08789021e-05 -2.77698686e-06 -6.92715687e-06 3.57092401e-05 9.10118160e-06 2.27027767e-05 4.68820997e-06 2.72102836e-06 6.78756914e-06 -1.81359460e-06 1.73251080e-06 1.09322589e-06 1.15039421e-05 -5.86708428e-06 -1.04450008e-06 -3.57430783e-06 1.92458751e-05 3.45738451e-06 1.17200920e-05 2.72102836e-06 1.03930704e-06 3.58696009e-06 -1.01433837e-06 6.34227920e-07 2.72703746e-06 2.86964310e-05 -1.46353639e-05 -3.57430783e-06 -8.52768045e-06 4.80085801e-05 1.17200920e-05 2.79946001e-05 6.78756914e-06 3.58696009e-06 8.54897621e-06 -2.04613221e-06 2.08885206e-06 -6.86257345e-07 -7.22143968e-06 3.74159018e-06 9.92839091e-07 2.01082012e-06 -1.22686078e-05 -3.24769188e-06 -6.61292516e-06 -1.81359460e-06 -1.01433837e-06 -2.04613221e-06 4.12345725e-07 -5.50077995e-07 6.55575540e-07 6.89857711e-06 -3.57430783e-06 -6.26356103e-07 -2.05004104e-06 1.17200920e-05 2.07329221e-06 6.72985808e-06 1.73251080e-06 6.34227920e-07 2.08885206e-06 -5.50077995e-07 3.62007967e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 2 -1 169 + 6.93241889e-05 6.92601249e-04 -3.36167729e-04 5.36566511e-05 -6.71190925e-05 1.14111868e-03 -1.82137075e-04 2.27835226e-04 1.05715176e-04 -3.02127936e-05 3.77931766e-05 -1.36171071e-06 -6.03227233e-06 6.92601249e-04 6.86139740e-03 -3.30766416e-03 5.27945326e-04 -6.60406688e-04 1.12067356e-02 -1.78873773e-03 2.23753162e-03 9.51263104e-04 -2.71865564e-04 3.40076571e-04 -1.22531618e-05 -5.42805521e-05 3.36167729e-04 3.30766416e-03 -1.59708271e-03 2.68776579e-04 -3.36212561e-04 5.39270070e-03 -9.08495511e-04 1.13643683e-03 4.47662261e-04 -1.38164808e-04 1.72830327e-04 -6.65888882e-06 -2.94983586e-05 -5.36566511e-05 -5.27945326e-04 2.68776579e-04 4.39465190e-05 5.36638068e-05 -9.08495511e-04 -1.54165395e-04 -1.81389791e-04 -8.80430335e-05 -3.64291137e-05 -2.94983586e-05 1.06413356e-05 -7.27341990e-06 6.71190925e-05 6.60406688e-04 -3.36212561e-04 5.36638068e-05 1.97186405e-05 1.13643683e-03 -1.81389791e-04 -7.22724013e-05 1.10133010e-04 -2.94983586e-05 -2.31113360e-05 1.06522230e-05 3.68886358e-06 -1.14111868e-03 -1.12067356e-02 5.39270070e-03 -9.08495511e-04 1.13643683e-03 -1.82075979e-02 3.07081454e-03 -3.84128121e-03 -1.45894989e-03 4.52041059e-04 -5.65458057e-04 2.18548942e-05 9.68154785e-05 1.82137075e-04 1.78873773e-03 -9.08495511e-04 -1.54165395e-04 -1.81389791e-04 3.07081454e-03 5.41418306e-04 6.13117404e-04 2.89785285e-04 1.28487876e-04 9.68154785e-05 -3.63501155e-05 2.56538297e-05 -2.27835226e-04 -2.23753162e-03 1.13643683e-03 -1.81389791e-04 -7.22724013e-05 -3.84128121e-03 6.13117404e-04 2.64610997e-04 -3.62492346e-04 9.68154785e-05 8.47780880e-05 -3.67432751e-05 -1.35316626e-05 1.05715176e-04 9.51263104e-04 -4.47662261e-04 8.80430335e-05 -1.10133010e-04 1.45894989e-03 -2.89785285e-04 3.62492346e-04 3.10252241e-05 -1.87515517e-05 2.34563117e-05 -1.28981632e-06 -5.71378579e-06 -3.02127936e-05 -2.71865564e-04 1.38164808e-04 3.64291137e-05 2.94983586e-05 -4.52041059e-04 -1.28487876e-04 -9.68154785e-05 -1.87515517e-05 -2.80311257e-05 -6.74209048e-06 5.98009101e-06 -5.86771422e-06 3.77931766e-05 3.40076571e-04 -1.72830327e-04 2.94983586e-05 2.31113360e-05 5.65458057e-04 -9.68154785e-05 -8.47780880e-05 2.34563117e-05 -6.74209048e-06 -2.49872390e-05 6.77023581e-06 4.12299665e-06 -1.36171071e-06 -1.22531618e-05 6.65888882e-06 -1.06413356e-05 -1.06522230e-05 -2.18548942e-05 3.63501155e-05 3.67432751e-05 -1.28981632e-06 5.98009101e-06 6.77023581e-06 -5.23772353e-08 5.66831635e-08 -6.03227233e-06 -5.42805521e-05 2.94983586e-05 7.27341990e-06 -3.68886358e-06 -9.68154785e-05 -2.56538297e-05 1.35316626e-05 -5.71378579e-06 -5.86771422e-06 4.12299665e-06 5.66831635e-08 1.85929241e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +1 2 0 169 + 2.99405489e-06 3.25663426e-05 -1.53642323e-05 8.59819172e-06 3.07824909e-06 5.26542705e-05 -2.94665886e-05 -1.05493693e-05 6.84719200e-06 -8.06102185e-06 -2.88593625e-06 1.96646925e-06 1.61503892e-06 3.25663426e-05 3.53574880e-04 -1.67724141e-04 9.38624391e-05 3.36038061e-05 5.73351504e-04 -3.20861209e-04 -1.14871912e-04 7.51562105e-05 -8.84794606e-05 -3.16766394e-05 2.15843775e-05 1.77270047e-05 1.53642323e-05 1.67724141e-04 -7.77865843e-05 4.46167092e-05 1.59732824e-05 2.67983048e-04 -1.53599212e-04 -5.49902410e-05 3.36659705e-05 -4.11617669e-05 -1.47363743e-05 1.03020981e-05 8.46099651e-06 -8.59819172e-06 -9.38624391e-05 4.46167092e-05 -2.30289229e-05 -8.93903071e-06 -1.53599212e-04 7.94722007e-05 3.07738536e-05 -2.06917860e-05 2.17231767e-05 8.46099651e-06 -4.69633410e-06 -4.35227400e-06 -3.07824909e-06 -3.36038061e-05 1.59732824e-05 -8.93903071e-06 -1.26061899e-06 -5.49902410e-05 3.07738536e-05 4.53179412e-06 -7.40789149e-06 8.46099651e-06 1.11898038e-06 -2.44674416e-06 -6.26208172e-07 -5.26542705e-05 -5.73351504e-04 2.67983048e-04 -1.53599212e-04 -5.49902410e-05 -9.20007385e-04 5.26963496e-04 1.88658843e-04 -1.16970864e-04 1.42836450e-04 5.11370515e-05 -3.57202705e-05 -2.93366535e-05 2.94665886e-05 3.20861209e-04 -1.53599212e-04 7.94722007e-05 3.07738536e-05 5.26963496e-04 -2.73270116e-04 -1.05577999e-04 7.16766700e-05 -7.55294884e-05 -2.93366535e-05 1.64005435e-05 1.51324566e-05 1.05493693e-05 1.14871912e-04 -5.49902410e-05 3.07738536e-05 4.53179412e-06 1.88658843e-04 -1.05577999e-04 -1.61668526e-05 2.56610519e-05 -2.93366535e-05 -4.08894742e-06 8.44165074e-06 2.28827274e-06 6.84719200e-06 7.51562105e-05 -3.36659705e-05 2.06917860e-05 7.40789149e-06 1.16970864e-04 -7.16766700e-05 -2.56610519e-05 1.35338886e-05 -1.85159251e-05 -6.62890888e-06 4.96541331e-06 4.07803771e-06 -8.06102185e-06 -8.84794606e-05 4.11617669e-05 -2.17231767e-05 -8.46099651e-06 -1.42836450e-04 7.55294884e-05 2.93366535e-05 -1.85159251e-05 2.00669398e-05 7.84967262e-06 -4.43220843e-06 -4.13186612e-06 -2.88593625e-06 -3.16766394e-05 1.47363743e-05 -8.46099651e-06 -1.11898038e-06 -5.11370515e-05 2.93366535e-05 4.08894742e-06 -6.62890888e-06 7.84967262e-06 9.51437810e-07 -2.34679878e-06 -5.53856970e-07 1.96646925e-06 2.15843775e-05 -1.03020981e-05 4.69633410e-06 2.44674416e-06 3.57202705e-05 -1.64005435e-05 -8.44165074e-06 4.96541331e-06 -4.43220843e-06 -2.34679878e-06 7.07897977e-07 1.10066246e-06 1.61503892e-06 1.77270047e-05 -8.46099651e-06 4.35227400e-06 6.26208172e-07 2.93366535e-05 -1.51324566e-05 -2.28827274e-06 4.07803771e-06 -4.13186612e-06 -5.53856970e-07 1.10066246e-06 2.71694436e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 -2 -1 169 + 4.87189063e-06 5.34710795e-05 -4.93427935e-06 -2.36715710e-05 1.47922351e-05 1.71309338e-05 8.21834531e-05 -5.13559899e-05 -7.71445824e-06 4.27317685e-06 -2.67028481e-06 6.24745013e-06 -1.28103482e-05 5.34710795e-05 5.86321127e-04 -5.42999976e-05 -2.60497260e-04 1.62783311e-04 1.88273161e-04 9.03216293e-04 -5.64414916e-04 -8.53623278e-05 4.72837251e-05 -2.95473409e-05 6.91295318e-05 -1.41749571e-04 4.93427935e-06 5.42999976e-05 -1.46211773e-06 -2.43393491e-05 1.52095260e-05 5.39197486e-06 8.47885247e-05 -5.29838848e-05 -8.82394259e-06 1.12227292e-06 -7.01302200e-07 6.49831983e-06 -1.33247546e-05 2.36715710e-05 2.60497260e-04 -2.43393491e-05 -1.13153541e-04 7.29657462e-05 8.47885247e-05 3.94480070e-04 -2.54183378e-04 -3.65769992e-05 2.06306400e-05 -1.33247546e-05 2.78523586e-05 -6.18475882e-05 -1.47922351e-05 -1.62783311e-04 1.52095260e-05 7.29657462e-05 -4.19845370e-05 -5.29838848e-05 -2.54183378e-04 1.46555821e-04 2.28567666e-05 -1.33247546e-05 7.63400033e-06 -2.15572050e-05 3.66231354e-05 -1.71309338e-05 -1.88273161e-04 5.39197486e-06 8.47885247e-05 -5.29838848e-05 -1.97768317e-05 -2.94811969e-04 1.84226385e-04 3.08998677e-05 -4.24368479e-06 2.65185539e-06 -2.28099046e-05 4.67715329e-05 -8.21834531e-05 -9.03216293e-04 8.47885247e-05 3.94480070e-04 -2.54183378e-04 -2.94811969e-04 -1.37264655e-03 8.83802407e-04 1.28565508e-04 -7.24795372e-05 4.67715329e-05 -9.80695841e-05 2.17282865e-04 5.13559899e-05 5.64414916e-04 -5.29838848e-05 -2.54183378e-04 1.46555821e-04 1.84226385e-04 8.83802407e-04 -5.10607304e-04 -8.03398822e-05 4.67715329e-05 -2.68597281e-05 7.54782518e-05 -1.28856093e-04 -7.71445824e-06 -8.53623278e-05 8.82394259e-06 3.65769992e-05 -2.28567666e-05 -3.08998677e-05 -1.28565508e-04 8.03398822e-05 1.12097928e-05 -7.42554800e-06 4.64018429e-06 -9.23004629e-06 1.89261386e-05 4.27317685e-06 4.72837251e-05 -1.12227292e-06 -2.06306400e-05 1.33247546e-05 4.24368479e-06 7.24795372e-05 -4.67715329e-05 -7.42554800e-06 7.73160612e-07 -5.16739674e-07 5.07102185e-06 -1.13136018e-05 -2.67028481e-06 -2.95473409e-05 7.01302200e-07 1.33247546e-05 -7.63400033e-06 -2.65185539e-06 -4.67715329e-05 2.68597281e-05 4.64018429e-06 -5.16739674e-07 2.69145374e-07 -3.97146117e-06 6.67838603e-06 6.24745013e-06 6.91295318e-05 -6.49831983e-06 -2.78523586e-05 2.15572050e-05 2.28099046e-05 9.80695841e-05 -7.54782518e-05 -9.23004629e-06 5.07102185e-06 -3.97146117e-06 4.14901778e-06 -1.71273716e-05 -1.28103482e-05 -1.41749571e-04 1.33247546e-05 6.18475882e-05 -3.66231354e-05 -4.67715329e-05 -2.17282865e-04 1.28856093e-04 1.89261386e-05 -1.13136018e-05 6.67838603e-06 -1.71273716e-05 3.09157513e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -2 0 668 + 8.33525886e-06 9.15344711e-05 -1.16616523e-09 -3.33879637e-05 3.33898711e-05 4.07619778e-09 1.16703825e-04 -1.16710492e-04 -1.31985289e-05 7.98420174e-10 -7.98465787e-10 -1.30595078e-09 -2.28605226e-05 3.03078852e-06 3.29758925e-05 -3.10985195e-06 -8.70027955e-06 1.55417088e-05 1.06619878e-05 2.98285179e-05 -5.32840509e-05 -5.18136276e-06 1.63020078e-06 -2.91210249e-06 -4.99635463e-06 -8.14704564e-06 9.15344711e-05 1.00595728e-03 -1.28147373e-08 -3.66893104e-04 3.66914064e-04 4.48219880e-08 1.28327862e-03 -1.28335193e-03 -1.45525993e-04 8.80332117e-09 -8.80382409e-09 -1.43993157e-08 -2.52058414e-04 3.29758925e-05 3.58134117e-04 -3.39587527e-05 -9.50047290e-05 1.69711309e-04 1.16134253e-04 3.24903077e-04 -5.80389282e-04 -5.68893957e-05 1.78989855e-05 -3.19737796e-05 -5.48580767e-05 -8.94514676e-05 1.16616523e-09 1.28147373e-08 7.09211384e-06 -4.76412594e-09 4.76439811e-09 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 -2.12015265e-09 -5.24241994e-06 5.24271943e-06 -3.30600061e-09 3.10985195e-06 3.39587527e-05 -1.25673782e-06 -9.02802959e-06 1.61271837e-05 4.52273325e-06 3.10923337e-05 -5.55416630e-05 -5.87627149e-06 6.22743877e-07 -1.11243598e-06 -5.23454912e-06 -8.53544509e-06 3.33879637e-05 3.66893104e-04 -4.76412594e-09 -1.29307480e-04 1.36407386e-04 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.16210197e-05 3.12270601e-09 -3.30600061e-09 -5.24782727e-06 -8.94099293e-05 8.70027955e-06 9.50047290e-05 -9.02802959e-06 -2.32870075e-05 4.51182272e-05 3.10923337e-05 8.03944933e-05 -1.55386174e-04 -1.45601778e-05 4.39027139e-06 -8.53544509e-06 -1.57296147e-05 -2.19406970e-05 -3.33898711e-05 -3.66914064e-04 4.76439811e-09 1.36407386e-04 -1.29323065e-04 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.16239687e-05 -3.30600061e-09 3.12308373e-09 -5.23731202e-06 8.94156361e-05 -1.55417088e-05 -1.69711309e-04 1.61271837e-05 4.51182272e-05 -7.86264945e-05 -5.55416630e-05 -1.55386174e-04 2.70982459e-04 2.60095140e-05 -8.53544509e-06 1.48593696e-05 2.42215386e-05 4.15713262e-05 -4.07619778e-09 -4.48219880e-08 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 8.41779804e-05 -5.84346084e-08 5.84379467e-08 7.46569843e-09 1.81761239e-05 -1.81771622e-05 1.16612681e-08 -1.06619878e-05 -1.16134253e-04 4.52273325e-06 3.10923337e-05 -5.55416630e-05 -1.61514754e-05 -1.06714788e-04 1.90629525e-04 2.03341743e-05 -2.27869979e-06 4.07054604e-06 1.81571636e-05 2.96070338e-05 -1.16703825e-04 -1.28327862e-03 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.84346084e-08 -1.58883758e-03 1.67311114e-03 1.82265156e-04 -1.10257515e-08 1.16612681e-08 1.81951971e-05 3.15691473e-04 -2.98285179e-05 -3.24903077e-04 3.10923337e-05 8.03944933e-05 -1.55386174e-04 -1.06714788e-04 -2.76557750e-04 5.33314827e-04 5.05735808e-05 -1.52709889e-05 2.96070338e-05 5.44429857e-05 7.63178656e-05 1.16710492e-04 1.28335193e-03 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.84379467e-08 1.67311114e-03 -1.58902874e-03 -1.82275569e-04 1.16612681e-08 -1.10270838e-08 1.81580887e-05 -3.15711584e-04 5.32840509e-05 5.80389282e-04 -5.55416630e-05 -1.55386174e-04 2.70982459e-04 1.90629525e-04 5.33314827e-04 -9.30691807e-04 -9.03419091e-05 2.96070338e-05 -5.15853161e-05 -8.42294570e-05 -1.44317697e-04 -1.31985289e-05 -1.45525993e-04 2.12015265e-09 5.16210197e-05 -5.16239687e-05 -7.46569843e-09 -1.82265156e-04 1.82275569e-04 1.93393473e-05 -1.39493296e-09 1.39501265e-09 1.89611125e-09 3.31912158e-05 -5.18136276e-06 -5.68893957e-05 5.87627149e-06 1.45601778e-05 -2.60095140e-05 -2.03341743e-05 -5.05735808e-05 9.03419091e-05 8.28642377e-06 -3.01654914e-06 5.38860021e-06 8.10181255e-06 1.32107990e-05 7.98420174e-10 8.80332117e-09 5.24241994e-06 -3.12270601e-09 3.30600061e-09 -1.81761239e-05 1.10257515e-08 -1.16612681e-08 -1.39493296e-09 -3.71979589e-06 3.89640841e-06 -1.36215115e-10 -2.14391725e-09 1.63020078e-06 1.78989855e-05 -6.22743877e-07 -4.39027139e-06 8.53544509e-06 2.27869979e-06 1.52709889e-05 -2.96070338e-05 -3.01654914e-06 2.68921036e-07 -5.48963898e-07 -3.00432370e-06 -4.16279116e-06 -7.98465787e-10 -8.80382409e-09 -5.24271943e-06 3.30600061e-09 -3.12308373e-09 1.81771622e-05 -1.16612681e-08 1.10270838e-08 1.39501265e-09 3.89640841e-06 -3.72024107e-06 -1.35962382e-10 2.14405527e-09 -2.91210249e-06 -3.19737796e-05 1.11243598e-06 8.53544509e-06 -1.48593696e-05 -4.07054604e-06 -2.96070338e-05 5.15853161e-05 5.38860021e-06 -5.48963898e-07 9.42249365e-07 4.59715836e-06 7.90816090e-06 -1.30595078e-09 -1.43993157e-08 5.24782727e-06 5.23731202e-06 -1.81951971e-05 -1.81580887e-05 1.89611125e-09 -1.36215115e-10 -1.35962382e-10 -7.61642683e-06 3.72934049e-09 -4.99635463e-06 -5.48580767e-05 5.23454912e-06 1.57296147e-05 -2.42215386e-05 -1.81571636e-05 -5.44429857e-05 8.42294570e-05 8.10181255e-06 -3.00432370e-06 4.59715836e-06 6.06053698e-06 1.39377836e-05 -2.28605226e-05 -2.52058414e-04 3.30600061e-09 8.94099293e-05 -8.94156361e-05 -1.16612681e-08 -3.15691473e-04 3.15711584e-04 3.31912158e-05 -2.14391725e-09 2.14405527e-09 3.72934049e-09 5.76652620e-05 -8.14704564e-06 -8.94514676e-05 8.53544509e-06 2.19406970e-05 -4.15713262e-05 -2.96070338e-05 -7.63178656e-05 1.44317697e-04 1.32107990e-05 -4.16279116e-06 7.90816090e-06 1.39377836e-05 2.02398065e-05 7.28503538e-08 7.29821548e-07 8.26478194e-08 -4.29870507e-07 2.48051817e-07 -2.53312569e-07 1.31753751e-06 -7.60269824e-07 -1.71682167e-07 -9.08173182e-08 5.24050858e-08 1.57539001e-07 -2.72571025e-07 8.10007911e-06 8.89729151e-05 1.13385085e-09 -3.24945913e-05 3.24927368e-05 -3.96246025e-09 1.13558610e-04 -1.13552129e-04 -1.28973321e-05 -7.79525178e-10 7.79480688e-10 1.27497202e-09 -2.23388344e-05 7.29821548e-07 7.30982289e-06 8.28289708e-07 -4.30812718e-06 2.48595509e-06 -2.53789584e-06 1.32001858e-05 -7.61701494e-06 -1.72115246e-06 -9.10464107e-07 5.25372810e-07 1.57936404e-06 -2.73258603e-06 8.89729151e-05 9.77951145e-04 1.24640330e-08 -3.57201882e-04 3.57181495e-04 -4.35824782e-08 1.24901332e-03 -1.24894204e-03 -1.42281146e-04 -8.59958750e-09 8.59909670e-09 1.40652718e-08 -2.46438174e-04 -8.26478194e-08 -8.28289708e-07 -7.75870454e-08 4.89690578e-07 -2.82570299e-07 2.38358612e-07 -1.50163088e-06 8.66498779e-07 2.00488276e-07 8.55416144e-08 -4.93608018e-08 -1.80232277e-07 3.11834504e-07 -1.13385085e-09 -1.24640330e-08 6.84375556e-06 4.63803227e-09 -4.63776757e-09 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 2.07009141e-09 -5.07478398e-06 5.07449435e-06 3.23134929e-09 4.29870507e-07 4.30812718e-06 4.89690578e-07 -2.53043254e-06 1.46971377e-06 -1.50163088e-06 7.75998291e-06 -4.50686143e-06 -1.01098943e-06 -5.36875545e-07 3.11834504e-07 9.19072127e-07 -1.61133053e-06 3.24945913e-05 3.57201882e-04 4.63803227e-09 -1.26075811e-04 1.32911980e-04 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 -5.05361622e-05 -3.05445661e-09 3.23134929e-09 -5.06949868e-06 -8.75314902e-05 -2.48051817e-07 -2.48595509e-06 -2.82570299e-07 1.46971377e-06 -8.31519466e-07 8.66498779e-07 -4.50686143e-06 2.55028426e-06 5.83379787e-07 3.11834504e-07 -1.76410991e-07 -5.51526297e-07 9.17554545e-07 -3.24927368e-05 -3.57181495e-04 -4.63776757e-09 1.32911980e-04 -1.26060639e-04 1.62395923e-08 -4.65404170e-04 4.41797865e-04 5.05332780e-05 3.23134929e-09 -3.05408776e-09 -5.07977958e-06 8.75259153e-05 2.53312569e-07 2.53789584e-06 2.38358612e-07 -1.50163088e-06 8.66498779e-07 -7.31910117e-07 4.60273833e-06 -2.65595705e-06 -6.14944494e-07 -2.62919439e-07 1.51714629e-07 5.52913645e-07 -9.56640816e-07 3.96246025e-09 4.35824782e-08 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 8.11322711e-05 5.68674213e-08 -5.68641757e-08 -7.28839261e-09 1.75845446e-05 -1.75835410e-05 -1.13966928e-08 -1.31753751e-06 -1.32001858e-05 -1.50163088e-06 7.75998291e-06 -4.50686143e-06 4.60273833e-06 -2.37868891e-05 1.38142496e-05 3.10178343e-06 1.64711347e-06 -9.56640816e-07 -2.82001078e-06 4.94349994e-06 -1.13558610e-04 -1.24901332e-03 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.68674213e-08 -1.54860907e-03 1.62964833e-03 1.78417889e-04 1.07837565e-08 -1.13966928e-08 1.75659038e-05 3.09029852e-04 7.60269824e-07 7.61701494e-06 8.66498779e-07 -4.50686143e-06 2.55028426e-06 -2.65595705e-06 1.38142496e-05 -7.81833122e-06 -1.78984835e-06 -9.56640816e-07 5.41286180e-07 1.69167703e-06 -2.81535516e-06 1.13552129e-04 1.24894204e-03 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.68641757e-08 1.62964833e-03 -1.54842305e-03 -1.78407706e-04 -1.13966928e-08 1.07824556e-08 1.76021816e-05 -3.09010207e-04 -1.71682167e-07 -1.72115246e-06 -2.00488276e-07 1.01098943e-06 -5.83379787e-07 6.14944494e-07 -3.10178343e-06 1.78984835e-06 4.01608353e-07 2.19986511e-07 -1.26940678e-07 -3.69807706e-07 6.39834354e-07 -1.28973321e-05 -1.42281146e-04 -2.07009141e-09 5.05361622e-05 -5.05332780e-05 7.28839261e-09 -1.78417889e-04 1.78407706e-04 1.90386979e-05 1.36919555e-09 -1.36911740e-09 -1.86534278e-09 3.26827434e-05 -9.08173182e-08 -9.10464107e-07 -8.55416144e-08 5.36875545e-07 -3.11834504e-07 2.62919439e-07 -1.64711347e-06 9.56640816e-07 2.19986511e-07 9.41015718e-08 -5.46718897e-08 -1.95856737e-07 3.43395909e-07 -7.79525178e-10 -8.59958750e-09 5.07478398e-06 3.05445661e-09 -3.23134929e-09 -1.75845446e-05 -1.07837565e-08 1.13966928e-08 1.36919555e-09 -3.61501287e-06 3.78410410e-06 1.31920456e-10 2.10742724e-09 5.24050858e-08 5.25372810e-07 4.93608018e-08 -3.11834504e-07 1.76410991e-07 -1.51714629e-07 9.56640816e-07 -5.41286180e-07 -1.26940678e-07 -5.46718897e-08 3.09036958e-08 1.17548796e-07 -1.95533312e-07 7.79480688e-10 8.59909670e-09 -5.07449435e-06 -3.23134929e-09 3.05408776e-09 1.75835410e-05 1.13966928e-08 -1.07824556e-08 -1.36911740e-09 3.78410410e-06 -3.61458092e-06 1.32168544e-10 -2.10729189e-09 1.57539001e-07 1.57936404e-06 1.80232277e-07 -9.19072127e-07 5.51526297e-07 -5.52913645e-07 2.82001078e-06 -1.69167703e-06 -3.69807706e-07 -1.95856737e-07 1.17548796e-07 3.19446098e-07 -5.99612796e-07 1.27497202e-09 1.40652718e-08 5.06949868e-06 5.07977958e-06 -1.75659038e-05 -1.76021816e-05 -1.86534278e-09 1.31920456e-10 1.32168544e-10 -7.39890095e-06 -3.66281821e-09 -2.72571025e-07 -2.73258603e-06 -3.11834504e-07 1.61133053e-06 -9.17554545e-07 9.56640816e-07 -4.94349994e-06 2.81535516e-06 6.39834354e-07 3.43395909e-07 -1.95533312e-07 -5.99612796e-07 1.01032422e-06 -2.23388344e-05 -2.46438174e-04 -3.23134929e-09 8.75314902e-05 -8.75259153e-05 1.13966928e-08 -3.09029852e-04 3.09010207e-04 3.26827434e-05 2.10742724e-09 -2.10729189e-09 -3.66281821e-09 5.67774792e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 360 386 411 437 463 488 514 540 566 592 618 642 668 +2 -2 1 169 + 3.08462320e-07 3.15409966e-06 3.41585595e-07 -1.09359022e-06 1.70828044e-06 -1.07709367e-06 3.44832780e-06 -5.38657973e-06 -6.78759036e-07 -2.26328440e-07 3.53544169e-07 -5.21746268e-07 -1.13187574e-06 3.15409966e-06 3.22309239e-05 3.49670173e-06 -1.11947309e-05 1.74871167e-05 -1.10158810e-05 3.52674703e-05 -5.50907720e-05 -6.95547193e-06 -2.31926358e-06 3.62288590e-06 -5.34650934e-06 -1.15987110e-05 -3.41585595e-07 -3.49670173e-06 -2.77231079e-07 1.21779934e-06 -1.90230558e-06 8.80645566e-07 -3.84565583e-06 6.00723972e-06 7.85446193e-07 1.84061522e-07 -2.87519668e-07 5.84490191e-07 1.26799233e-06 1.09359022e-06 1.11947309e-05 1.21779934e-06 -3.79564709e-06 6.09025327e-06 -3.84565583e-06 1.19913570e-05 -1.92322473e-05 -2.39426416e-06 -7.90027207e-07 1.26799233e-06 -1.94073671e-06 -3.95095122e-06 -1.70828044e-06 -1.74871167e-05 -1.90230558e-06 6.09025327e-06 -9.41033926e-06 6.00723972e-06 -1.92322473e-05 2.97218427e-05 3.74004315e-06 1.26799233e-06 -1.95900759e-06 2.81451321e-06 6.27178541e-06 1.07709367e-06 1.10158810e-05 8.80645566e-07 -3.84565583e-06 6.00723972e-06 -2.79286024e-06 1.21284827e-05 -1.89457159e-05 -2.48239091e-06 -5.85663140e-07 9.14855367e-07 -1.84824741e-06 -4.00958575e-06 -3.44832780e-06 -3.52674703e-05 -3.84565583e-06 1.19913570e-05 -1.92322473e-05 1.21284827e-05 -3.78339761e-05 6.06549282e-05 7.57312680e-06 2.49932151e-06 -4.00958575e-06 6.13327398e-06 1.24991865e-05 5.38657973e-06 5.50907720e-05 6.00723972e-06 -1.92322473e-05 2.97218427e-05 -1.89457159e-05 6.06549282e-05 -9.37526276e-05 -1.18298647e-05 -4.00958575e-06 6.19581633e-06 -8.90559558e-06 -1.98359775e-05 -6.78759036e-07 -6.95547193e-06 -7.85446193e-07 2.39426416e-06 -3.74004315e-06 2.48239091e-06 -7.57312680e-06 1.18298647e-05 1.47065971e-06 5.18565300e-07 -8.10042865e-07 1.13673871e-06 2.46603962e-06 -2.26328440e-07 -2.31926358e-06 -1.84061522e-07 7.90027207e-07 -1.26799233e-06 5.85663140e-07 -2.49932151e-06 4.00958575e-06 5.18565300e-07 1.19449934e-07 -1.92174647e-07 4.06784631e-07 8.27629618e-07 3.53544169e-07 3.62288590e-06 2.87519668e-07 -1.26799233e-06 1.95900759e-06 -9.14855367e-07 4.00958575e-06 -6.19581633e-06 -8.10042865e-07 -1.92174647e-07 2.96618508e-07 -5.89510339e-07 -1.31399540e-06 -5.21746268e-07 -5.34650934e-06 -5.84490191e-07 1.94073671e-06 -2.81451321e-06 1.84824741e-06 -6.13327398e-06 8.90559558e-06 1.13673871e-06 4.06784631e-07 -5.89510339e-07 7.42990635e-07 1.96083353e-06 -1.13187574e-06 -1.15987110e-05 -1.26799233e-06 3.95095122e-06 -6.27178541e-06 4.00958575e-06 -1.24991865e-05 1.98359775e-05 2.46603962e-06 8.27629618e-07 -1.31399540e-06 1.96083353e-06 4.09296024e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 -1 -2 169 + 4.85174195e-06 5.32475257e-05 -1.47416558e-05 -2.35759274e-05 4.90515490e-06 5.11762258e-05 8.18447402e-05 -1.70284342e-05 -1.54079586e-06 1.27711042e-05 -2.65712746e-06 9.77017128e-06 -4.24947138e-06 5.32475257e-05 5.83836750e-04 -1.62221424e-04 -2.59436293e-04 5.39777366e-05 5.62412921e-04 8.99451624e-04 -1.87137899e-04 -1.70488320e-05 1.41311652e-04 -2.94009873e-05 1.08106474e-04 -4.70201960e-05 1.47416558e-05 1.62221424e-04 -4.18785615e-05 -7.27205119e-05 1.51300676e-05 1.46175787e-04 2.53311717e-04 -5.27034711e-05 -7.19466627e-06 3.65437842e-05 -7.60321827e-06 3.04858780e-05 -1.32596310e-05 2.35759274e-05 2.59436293e-04 -7.27205119e-05 -1.12707500e-04 2.41971038e-05 2.53311717e-04 3.92898475e-04 -8.42872220e-05 -5.78023180e-06 6.16633927e-05 -1.32596310e-05 4.54493235e-05 -2.05179457e-05 -4.90515490e-06 -5.39777366e-05 1.51300676e-05 2.41971038e-05 -1.44196735e-06 -5.27034711e-05 -8.42872220e-05 5.32057478e-06 1.20262214e-06 -1.32596310e-05 6.91636798e-07 -1.08317248e-05 1.10611584e-06 -5.11762258e-05 -5.62412921e-04 1.46175787e-04 2.53311717e-04 -5.27034711e-05 -5.09238956e-04 -8.80696539e-04 1.83235758e-04 2.50332622e-05 -1.28568053e-04 2.67495825e-05 -1.07001922e-04 4.65397781e-05 -8.18447402e-05 -8.99451624e-04 2.53311717e-04 3.92898475e-04 -8.42872220e-05 -8.80696539e-04 -1.36702722e-03 2.93043944e-04 2.04632189e-05 -2.16621232e-04 4.65397781e-05 -1.59825471e-04 7.20787890e-05 1.70284342e-05 1.87137899e-04 -5.27034711e-05 -8.42872220e-05 5.32057478e-06 1.83235758e-04 2.93043944e-04 -1.95233641e-05 -4.25753169e-06 4.65397781e-05 -2.61738794e-06 3.79549453e-05 -4.18591705e-06 -1.54079586e-06 -1.70488320e-05 7.19466627e-06 5.78023180e-06 -1.20262214e-06 -2.50332622e-05 -2.04632189e-05 4.25753169e-06 -2.07503469e-06 -5.33544500e-06 1.11008079e-06 -1.54122270e-06 6.70344618e-07 1.27711042e-05 1.41311652e-04 -3.65437842e-05 -6.16633927e-05 1.32596310e-05 1.28568053e-04 2.16621232e-04 -4.65397781e-05 -5.33544500e-06 3.08630249e-05 -6.65415974e-06 2.48956001e-05 -1.12631806e-05 -2.65712746e-06 -2.94009873e-05 7.60321827e-06 1.32596310e-05 -6.91636798e-07 -2.67495825e-05 -4.65397781e-05 2.61738794e-06 1.11008079e-06 -6.65415974e-06 2.65204781e-07 -5.97753437e-06 5.09104496e-07 9.77017128e-06 1.08106474e-04 -3.04858780e-05 -4.54493235e-05 1.08317248e-05 1.07001922e-04 1.59825471e-04 -3.79549453e-05 -1.54122270e-06 2.48956001e-05 -5.97753437e-06 1.73930476e-05 -8.92174853e-06 -4.24947138e-06 -4.70201960e-05 1.32596310e-05 2.05179457e-05 -1.10611584e-06 -4.65397781e-05 -7.20787890e-05 4.18591705e-06 6.70344618e-07 -1.12631806e-05 5.09104496e-07 -8.92174853e-06 7.61066682e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -1 -1 676 + 1.71607917e-04 1.57739011e-03 -3.28114677e-04 -6.55862237e-04 3.27807936e-04 1.07390369e-03 2.14660583e-03 -1.07289974e-03 -4.52942728e-05 1.04765636e-04 -5.23631411e-05 7.85499319e-05 -1.04667695e-04 9.18819074e-05 8.96549768e-04 -2.66181767e-04 -2.48250979e-04 2.66015869e-04 8.94489506e-04 8.34234056e-04 -8.93932012e-04 3.10913754e-06 7.64248648e-05 -8.18938434e-05 -5.28307109e-06 -7.63772327e-05 1.57739011e-03 1.40396814e-02 -2.91449415e-03 -5.82572737e-03 2.91176951e-03 9.40646010e-03 1.88023956e-02 -9.39766638e-03 -2.86290008e-04 6.62188680e-04 -3.30969969e-04 4.96487949e-04 -6.61569627e-04 8.96549768e-04 8.62740033e-03 -2.54595335e-03 -2.37445043e-03 2.54436658e-03 8.51685293e-03 7.94313261e-03 -8.51154477e-03 2.59615120e-05 6.38152871e-04 -6.83819218e-04 -4.41140065e-05 -6.37755140e-04 3.28114677e-04 2.91449415e-03 -4.16919525e-04 -1.29389719e-03 6.46705581e-04 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -1.33780351e-04 8.07745132e-05 -4.03720857e-05 1.33948236e-04 -1.78485871e-04 2.66181767e-04 2.54595335e-03 -6.78529947e-04 -7.43182319e-04 7.96364594e-04 2.25616286e-03 2.48184216e-03 -2.65944328e-03 -4.40069587e-05 1.75662356e-04 -1.88232790e-04 -1.50962295e-05 -2.18245830e-04 6.55862237e-04 5.82572737e-03 -1.29389719e-03 -2.35595549e-03 1.29268758e-03 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -9.78807044e-05 3.08139304e-04 -1.78485871e-04 1.69868227e-04 -3.07851237e-04 2.48250979e-04 2.37445043e-03 -7.43182319e-04 -5.74788074e-04 7.42719127e-04 2.48184216e-03 1.90971900e-03 -2.48029534e-03 3.29499656e-05 1.57865935e-04 -2.18245830e-04 -5.67988846e-05 -1.57767545e-04 -3.27807936e-04 -2.91176951e-03 6.46705581e-04 1.29268758e-03 -4.15709803e-04 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 4.89219685e-05 -1.78485871e-04 4.02428327e-05 -1.82743816e-04 8.04406389e-05 -2.66015869e-04 -2.54436658e-03 7.96364594e-04 7.42719127e-04 -6.77536964e-04 -2.65944328e-03 -2.48029534e-03 2.25284682e-03 -3.53078717e-05 -2.18245830e-04 1.88058394e-04 -3.06897827e-05 1.75390226e-04 -1.07390369e-03 -9.40646010e-03 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -4.13261909e-03 -1.34369406e-02 6.71594663e-03 3.95888562e-04 -1.76018488e-04 8.79761846e-05 -3.69363699e-04 4.92176709e-04 -8.94489506e-04 -8.51685293e-03 2.25616286e-03 2.48184216e-03 -2.65944328e-03 -7.48958431e-03 -8.27831157e-03 8.87070921e-03 1.50985335e-04 -5.48092189e-04 5.87313775e-04 4.78920306e-05 6.92373945e-04 -2.14660583e-03 -1.88023956e-02 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -1.34369406e-02 -2.42692352e-02 1.34243790e-02 2.42934386e-04 -8.26325317e-04 4.92176709e-04 -4.21695362e-04 8.25552819e-04 -8.34234056e-04 -7.94313261e-03 2.48184216e-03 1.90971900e-03 -2.48029534e-03 -8.27831157e-03 -6.33400305e-03 8.27315209e-03 -1.09836703e-04 -4.90970313e-04 6.92373945e-04 1.89379432e-04 4.90664314e-04 1.07289974e-03 9.39766638e-03 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 6.71594663e-03 1.34243790e-02 -4.12005630e-03 -1.21421566e-04 4.92176709e-04 -8.75979182e-05 5.27268313e-04 -1.75097826e-04 8.93932012e-04 8.51154477e-03 -2.65944328e-03 -2.48029534e-03 2.25284682e-03 8.87070921e-03 8.27315209e-03 -7.47852346e-03 1.17696640e-04 6.92373945e-04 -5.86754375e-04 1.07207099e-04 -5.47228870e-04 -4.52942728e-05 -2.86290008e-04 1.33780351e-04 9.78807044e-05 -4.89219685e-05 -3.95888562e-04 -2.42934386e-04 1.21421566e-04 -2.49041449e-05 3.09325422e-05 -1.54604614e-05 3.48716743e-05 -4.64664662e-05 3.10913754e-06 2.59615120e-05 4.40069587e-05 -3.29499656e-05 3.53078717e-05 -1.50985335e-04 1.09836703e-04 -1.17696640e-04 -2.42702964e-05 -7.06548330e-06 7.57109070e-06 -1.06200644e-06 -1.53534017e-05 1.04765636e-04 6.62188680e-04 -8.07745132e-05 -3.08139304e-04 1.78485871e-04 1.76018488e-04 8.26325317e-04 -4.92176709e-04 3.09325422e-05 -1.01831063e-04 5.07480848e-05 -7.16420931e-05 8.79741411e-05 7.64248648e-05 6.38152871e-04 -1.75662356e-04 -1.57865935e-04 2.18245830e-04 5.48092189e-04 4.90970313e-04 -6.92373945e-04 -7.06548330e-06 -1.29931481e-05 2.12406844e-06 -1.36468913e-05 3.78743844e-06 -5.23631411e-05 -3.30969969e-04 4.03720857e-05 1.78485871e-04 -4.02428327e-05 -8.79761846e-05 -4.92176709e-04 8.75979182e-05 -1.54604614e-05 5.07480848e-05 -2.56612647e-05 2.68173507e-05 -5.07174502e-05 -8.18938434e-05 -6.83819218e-04 1.88232790e-04 2.18245830e-04 -1.88058394e-04 -5.87313775e-04 -6.92373945e-04 5.86754375e-04 7.57109070e-06 2.12406844e-06 -1.32869950e-05 -1.31279665e-05 -2.13888070e-06 7.85499319e-05 4.96487949e-04 -1.33948236e-04 -1.69868227e-04 1.82743816e-04 3.69363699e-04 4.21695362e-04 -5.27268313e-04 3.48716743e-05 -7.16420931e-05 2.68173507e-05 -6.52373474e-05 6.25899070e-05 -5.28307109e-06 -4.41140065e-05 1.50962295e-05 5.67988846e-05 3.06897827e-05 -4.78920306e-05 -1.89379432e-04 -1.07207099e-04 -1.06200644e-06 -1.36468913e-05 -1.31279665e-05 -2.30221774e-05 6.97378894e-07 -1.04667695e-04 -6.61569627e-04 1.78485871e-04 3.07851237e-04 -8.04406389e-05 -4.92176709e-04 -8.25552819e-04 1.75097826e-04 -4.64664662e-05 8.79741411e-05 -5.07174502e-05 6.25899070e-05 -1.01666499e-04 -7.63772327e-05 -6.37755140e-04 2.18245830e-04 1.57767545e-04 -1.75390226e-04 -6.92373945e-04 -4.90664314e-04 5.47228870e-04 -1.53534017e-05 3.78743844e-06 -2.13888070e-06 6.97378894e-07 -1.29884256e-05 2.86047247e-05 3.02901620e-04 -2.80877649e-05 -1.46131797e-04 2.81402921e-05 9.75806511e-05 5.07681402e-04 -9.77631376e-05 -2.98941544e-05 2.06650036e-05 -3.97941619e-06 5.17633244e-05 -2.07036494e-05 1.69088388e-04 1.55659037e-03 -3.23331355e-04 -6.47024526e-04 3.23633666e-04 1.05896638e-03 2.11911776e-03 -1.05995650e-03 -4.51193676e-05 1.04036868e-04 -5.20379546e-05 7.80517727e-05 -1.04134141e-04 3.02901620e-04 3.20877362e-03 -2.95742560e-04 -1.53865542e-03 2.96295631e-04 1.02940955e-03 5.35569375e-03 -1.03133466e-03 -3.08563012e-04 2.13301091e-04 -4.10749416e-05 5.34293329e-04 -2.13699988e-04 1.55659037e-03 1.38831389e-02 -2.87752923e-03 -5.75827848e-03 2.88021968e-03 9.29617039e-03 1.86027434e-02 -9.30486221e-03 -2.87890442e-04 6.63821800e-04 -3.32035455e-04 4.98020264e-04 -6.64442466e-04 2.80877649e-05 2.95742560e-04 3.23326128e-06 -1.47673677e-04 2.84372088e-05 -1.15773689e-05 5.12723617e-04 -9.87341064e-05 -3.63743023e-05 -5.63304714e-06 1.08474402e-06 5.27293276e-05 -2.10900193e-05 3.23331355e-04 2.87752923e-03 -4.11137569e-04 -1.27669244e-03 6.38585770e-04 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -1.33193756e-04 8.10798203e-05 -4.05551234e-05 1.33594706e-04 -1.78237719e-04 1.46131797e-04 1.53865542e-03 -1.47673677e-04 -7.36682256e-04 1.47949843e-04 5.12723617e-04 2.55741236e-03 -5.13682466e-04 -1.43026518e-04 1.04391083e-04 -2.10900193e-05 2.47650389e-04 -1.04586306e-04 6.47024526e-04 5.75827848e-03 -1.27669244e-03 -2.32796184e-03 1.27788613e-03 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -9.85425184e-05 3.07873132e-04 -1.78237719e-04 1.70347504e-04 -3.08160990e-04 -2.81402921e-05 -2.96295631e-04 2.84372088e-05 1.47949843e-04 3.12699919e-06 -9.87341064e-05 -5.13682466e-04 -1.12084265e-05 2.75423152e-05 -2.10900193e-05 -1.06757172e-06 -5.79663609e-05 -5.55423949e-06 -3.23633666e-04 -2.88021968e-03 6.38585770e-04 1.27788613e-03 -4.12331153e-04 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 4.92897491e-05 -1.78237719e-04 4.06837196e-05 -1.82233517e-04 8.14129653e-05 -9.75806511e-05 -1.02940955e-03 -1.15773689e-05 5.12723617e-04 -9.87341064e-05 4.11331303e-05 -1.78291256e-03 3.43331714e-04 1.26428543e-04 2.02786122e-05 -3.90500960e-06 -1.83041722e-04 7.32107471e-05 -1.05896638e-03 -9.29617039e-03 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -4.08506578e-03 -1.32831996e-02 6.64409216e-03 3.95359218e-04 -1.79348778e-04 8.97080408e-05 -3.70284810e-04 4.94021970e-04 -5.07681402e-04 -5.35569375e-03 5.12723617e-04 2.55741236e-03 -5.13682466e-04 -1.78291256e-03 -8.89210867e-03 1.78624680e-03 4.96076275e-04 -3.62238307e-04 7.32107471e-05 -8.58955744e-04 3.62915732e-04 -2.11911776e-03 -1.86027434e-02 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -1.32831996e-02 -2.40284433e-02 1.32956192e-02 2.46930191e-04 -8.30655294e-04 4.94021970e-04 -4.26772258e-04 8.31431947e-04 9.77631376e-05 1.03133466e-03 -9.87341064e-05 -5.13682466e-04 -1.12084265e-05 3.43331714e-04 1.78624680e-03 3.98501933e-05 -9.55283627e-05 7.32107471e-05 3.84513825e-06 2.01360764e-04 2.00050436e-05 1.05995650e-03 9.30486221e-03 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 6.64409216e-03 1.32956192e-02 -4.09748428e-03 -1.23511428e-04 4.94021970e-04 -9.00856744e-05 5.27795838e-04 -1.80272157e-04 -2.98941544e-05 -3.08563012e-04 3.63743023e-05 1.43026518e-04 -2.75423152e-05 -1.26428543e-04 -4.96076275e-04 9.55283627e-05 2.11921154e-05 -2.24320413e-05 4.31969092e-06 -3.79448557e-05 1.51767105e-05 -4.51193676e-05 -2.87890442e-04 1.33193756e-04 9.85425184e-05 -4.92897491e-05 -3.95359218e-04 -2.46930191e-04 1.23511428e-04 -2.47490182e-05 2.94546993e-05 -1.47328764e-05 3.40874454e-05 -4.54783628e-05 2.06650036e-05 2.13301091e-04 5.63304714e-06 -1.04391083e-04 2.10900193e-05 -2.02786122e-05 3.62238307e-04 -7.32107471e-05 -2.24320413e-05 -7.96350257e-06 1.55019683e-06 3.04330388e-05 -1.30443894e-05 1.04036868e-04 6.63821800e-04 -8.10798203e-05 -3.07873132e-04 1.78237719e-04 1.79348778e-04 8.30655294e-04 -4.94021970e-04 2.94546993e-05 -9.90973788e-05 4.93505482e-05 -6.93955351e-05 8.48903546e-05 -3.97941619e-06 -4.10749416e-05 -1.08474402e-06 2.10900193e-05 1.06757172e-06 3.90500960e-06 -7.32107471e-05 -3.84513825e-06 4.31969092e-06 1.55019683e-06 -2.11889346e-07 -7.48000800e-06 -1.53735271e-06 -5.20379546e-05 -3.32035455e-04 4.05551234e-05 1.78237719e-04 -4.06837196e-05 -8.97080408e-05 -4.94021970e-04 9.00856744e-05 -1.47328764e-05 4.93505482e-05 -2.51178417e-05 2.54805866e-05 -4.93794285e-05 5.17633244e-05 5.34293329e-04 -5.27293276e-05 -2.47650389e-04 5.79663609e-05 1.83041722e-04 8.58955744e-04 -2.01360764e-04 -3.79448557e-05 3.04330388e-05 -7.48000800e-06 6.49697908e-05 -3.47030391e-05 7.80517727e-05 4.98020264e-04 -1.33594706e-04 -1.70347504e-04 1.82233517e-04 3.70284810e-04 4.26772258e-04 -5.27795838e-04 3.40874454e-05 -6.93955351e-05 2.54805866e-05 -6.40462852e-05 6.02250529e-05 -2.07036494e-05 -2.13699988e-04 2.10900193e-05 1.04586306e-04 5.55423949e-06 -7.32107471e-05 -3.62915732e-04 -2.00050436e-05 1.51767105e-05 -1.30443894e-05 -1.53735271e-06 -3.47030391e-05 -7.91475924e-06 -1.04134141e-04 -6.64442466e-04 1.78237719e-04 3.08160990e-04 -8.14129653e-05 -4.94021970e-04 -8.31431947e-04 1.80272157e-04 -4.54783628e-05 8.48903546e-05 -4.93794285e-05 6.02250529e-05 -9.92560478e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +2 -1 0 676 + 1.71555307e-04 1.57695618e-03 -3.28015751e-04 -3.27671645e-04 6.55701953e-04 1.07359504e-03 1.07246878e-03 -2.14611147e-03 -4.52904035e-05 5.23486899e-05 -1.04754679e-04 -7.85551705e-05 -1.04644786e-04 1.72085808e-06 1.84191054e-05 -5.40518451e-06 -1.43778673e-06 9.00510433e-06 1.81348291e-05 4.82389021e-06 -3.02128498e-05 -7.69616465e-07 8.37909016e-07 -5.24796755e-06 -4.26014697e-06 -1.39596680e-06 1.57695618e-03 1.40364205e-02 -2.91373172e-03 -2.91067506e-03 5.82453608e-03 9.40418907e-03 9.39432358e-03 -1.87989300e-02 -2.86322174e-04 3.30944075e-04 -6.62250393e-04 -4.96619271e-04 -6.61555658e-04 1.84191054e-05 1.96775931e-04 -5.80537959e-05 -1.54423919e-05 9.67183429e-05 1.94257344e-04 5.16727287e-05 -3.23635141e-04 -8.30076904e-06 9.03734462e-06 -5.66024357e-05 -4.59482062e-05 -1.50563280e-05 3.28015751e-04 2.91373172e-03 -4.16802569e-04 -6.46441005e-04 1.29358959e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -1.33768209e-04 4.03704402e-05 -8.07850690e-05 -1.33967991e-04 -1.78461223e-04 5.40518451e-06 5.80537959e-05 -1.61705710e-05 -4.55396187e-06 2.85222424e-05 5.45886201e-05 1.53471159e-05 -9.61216127e-05 -3.12157602e-06 2.52283058e-06 -1.58009196e-05 -1.36042971e-05 -4.45786196e-06 3.27671645e-04 2.91067506e-03 -6.46441005e-04 -4.15445557e-04 1.29223255e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -4.89219038e-05 4.02254279e-05 -1.78461223e-04 -1.82732469e-04 -8.04104422e-05 1.43778673e-06 1.54423919e-05 -4.55396187e-06 -2.61865013e-07 7.58695686e-06 1.53471159e-05 9.75357482e-07 -2.55684851e-05 -5.65448944e-07 1.36809812e-07 -4.45786196e-06 -3.77169933e-06 -2.27926841e-07 -6.55701953e-04 -5.82453608e-03 1.29358959e-03 1.29223255e-03 -2.35556224e-03 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 9.78973564e-05 -1.78461223e-04 3.08161409e-04 1.69937822e-04 3.07838132e-04 -9.00510433e-06 -9.67183429e-05 2.85222424e-05 7.58695686e-06 -4.65689137e-05 -9.61216127e-05 -2.55684851e-05 1.57032800e-04 3.54150349e-06 -4.45786196e-06 2.73454041e-05 2.17070568e-05 7.27391621e-06 -1.07359504e-03 -9.40418907e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -4.13166701e-03 -6.71346123e-03 1.34342709e-02 3.95878040e-04 -8.80008593e-05 1.76098042e-04 3.69458003e-04 4.92161796e-04 -1.81348291e-05 -1.94257344e-04 5.45886201e-05 1.53471159e-05 -9.61216127e-05 -1.83568887e-04 -5.15281990e-05 3.22729928e-04 1.05071432e-05 -8.56536851e-06 5.36463686e-05 4.61005048e-05 1.51062333e-05 -1.07246878e-03 -9.39432358e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -6.71346123e-03 -4.11757408e-03 1.34201776e-02 1.21445868e-04 -8.75764397e-05 4.92161796e-04 5.27274139e-04 1.75064894e-04 -4.82389021e-06 -5.16727287e-05 1.53471159e-05 9.75357482e-07 -2.55684851e-05 -5.15281990e-05 -3.56145784e-06 8.58466176e-05 1.92554493e-06 -5.24965805e-07 1.51062333e-05 1.27647306e-05 8.74599531e-07 2.14611147e-03 1.87989300e-02 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 1.34342709e-02 1.34201776e-02 -2.42662003e-02 -2.43024669e-04 4.92161796e-04 -8.26492446e-04 -4.21964222e-04 -8.25625413e-04 3.02128498e-05 3.23635141e-04 -9.61216127e-05 -2.55684851e-05 1.57032800e-04 3.22729928e-04 8.58466176e-05 -5.27526940e-04 -1.20600174e-05 1.51062333e-05 -9.27259754e-05 -7.36603319e-05 -2.46652407e-05 -4.52904035e-05 -2.86322174e-04 1.33768209e-04 4.89219038e-05 -9.78973564e-05 -3.95878040e-04 -1.21445868e-04 2.43024669e-04 -2.49008625e-05 1.54428858e-05 -3.09026749e-05 -3.48621147e-05 -4.64404637e-05 -7.69616465e-07 -8.30076904e-06 3.12157602e-06 5.65448944e-07 -3.54150349e-06 -1.05071432e-05 -1.92554493e-06 1.20600174e-05 -4.29451949e-07 -4.41051922e-07 2.76238366e-06 1.42043756e-06 4.65449593e-07 5.23486899e-05 3.30944075e-04 -4.03704402e-05 -4.02254279e-05 1.78461223e-04 8.80008593e-05 8.75764397e-05 -4.92161796e-04 1.54428858e-05 -2.56424764e-05 5.07133837e-05 2.67916323e-05 5.06790535e-05 8.37909016e-07 9.03734462e-06 -2.52283058e-06 -1.36809812e-07 4.45786196e-06 8.56536851e-06 5.24965805e-07 -1.51062333e-05 -4.41051922e-07 6.15327829e-08 -2.48451942e-06 -2.23643919e-06 -1.17636364e-07 -1.04754679e-04 -6.62250393e-04 8.07850690e-05 1.78461223e-04 -3.08161409e-04 -1.76098042e-04 -4.92161796e-04 8.26492446e-04 -3.09026749e-05 5.07133837e-05 -1.01781931e-04 -7.16103976e-05 -8.79029123e-05 -5.24796755e-06 -5.66024357e-05 1.58009196e-05 4.45786196e-06 -2.73454041e-05 -5.36463686e-05 -1.51062333e-05 9.27259754e-05 2.76238366e-06 -2.48451942e-06 1.52258159e-05 1.28379718e-05 4.30497731e-06 -7.85551705e-05 -4.96619271e-04 1.33967991e-04 1.82732469e-04 -1.69937822e-04 -3.69458003e-04 -5.27274139e-04 4.21964222e-04 -3.48621147e-05 2.67916323e-05 -7.16103976e-05 -6.52311227e-05 -6.25458112e-05 -4.26014697e-06 -4.59482062e-05 1.36042971e-05 3.77169933e-06 -2.17070568e-05 -4.61005048e-05 -1.27647306e-05 7.36603319e-05 1.42043756e-06 -2.23643919e-06 1.28379718e-05 9.91301205e-06 3.57042703e-06 -1.04644786e-04 -6.61555658e-04 1.78461223e-04 8.04104422e-05 -3.07838132e-04 -4.92161796e-04 -1.75064894e-04 8.25625413e-04 -4.64404637e-05 5.06790535e-05 -8.79029123e-05 -6.25458112e-05 -1.01597405e-04 -1.39596680e-06 -1.50563280e-05 4.45786196e-06 2.27926841e-07 -7.27391621e-06 -1.51062333e-05 -8.74599531e-07 2.46652407e-05 4.65449593e-07 -1.17636364e-07 4.30497731e-06 3.57042703e-06 1.86906885e-07 5.92062699e-04 4.72480806e-03 -5.55339758e-04 -1.77842326e-03 1.66721294e-03 1.70383133e-03 5.45635934e-03 -5.11515627e-03 -1.06152809e-04 6.81944120e-05 -6.39300039e-05 1.32293777e-05 -2.04729815e-04 1.69140261e-04 1.55701900e-03 -3.23428906e-04 -3.23768247e-04 6.47182798e-04 1.05927099e-03 1.06038238e-03 -2.11960636e-03 -4.51232749e-05 5.20523543e-05 -1.04047845e-04 -7.80466354e-05 -1.04157012e-04 4.72480806e-03 3.40637241e-02 -4.08098087e-03 -1.30689568e-02 1.22517144e-02 1.18634774e-02 3.79916687e-02 -3.56159318e-02 2.83214868e-04 -1.81942161e-04 1.70564753e-04 -3.52958768e-05 5.46217554e-04 1.55701900e-03 1.38863696e-02 -2.87828294e-03 -2.88130283e-03 5.75945802e-03 9.29841885e-03 9.30817474e-03 -1.86061809e-02 -2.87859563e-04 3.32062954e-04 -6.63763150e-04 -4.97890953e-04 -6.64459569e-04 5.55339758e-04 4.08098087e-03 2.77496976e-04 -1.69805254e-03 1.59186805e-03 -9.79269286e-04 5.02272612e-03 -4.70863948e-03 -7.45163790e-05 -1.24376298e-04 1.16598662e-04 3.00218458e-06 -4.64599854e-05 3.23428906e-04 2.87828294e-03 -4.11252946e-04 -6.38847089e-04 1.27699628e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -1.33206059e-04 4.05569994e-05 -8.10696930e-05 -1.33575327e-04 -1.78262737e-04 1.77842326e-03 1.30689568e-02 -1.69805254e-03 -4.63011355e-03 5.09780747e-03 5.02272612e-03 1.35371152e-02 -1.50789744e-02 3.59886299e-06 5.88818995e-06 -4.64599854e-05 -1.30237658e-04 -1.76772261e-05 3.23768247e-04 2.88130283e-03 -6.38847089e-04 -4.12592798e-04 1.27833610e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -4.92900665e-05 4.07013328e-05 -1.78262737e-04 -1.82245085e-04 -8.14435629e-05 -1.66721294e-03 -1.22517144e-02 1.59186805e-03 5.09780747e-03 -3.97128601e-03 -4.70863948e-03 -1.50789744e-02 1.15883473e-02 -3.37381493e-06 -4.64599854e-05 -1.16179215e-07 -1.40119507e-04 -3.72052992e-07 -6.47182798e-04 -5.75945802e-03 1.27699628e-03 1.27833610e-03 -2.32835114e-03 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 9.85262868e-05 -1.78262737e-04 3.07851986e-04 1.70278665e-04 3.08174984e-04 -1.70383133e-03 -1.18634774e-02 -9.79269286e-04 5.02272612e-03 -4.70863948e-03 3.44784686e-03 -1.44420250e-02 1.35389204e-02 -2.26202011e-05 4.25415323e-04 -3.98812783e-04 1.78102703e-05 -2.75620926e-04 -1.05927099e-03 -9.29841885e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -4.08600834e-03 -6.64655287e-03 1.32858448e-02 3.95370826e-04 -8.96847052e-05 1.79271436e-04 3.70192191e-04 4.94039393e-04 -5.45635934e-03 -3.79916687e-02 5.02272612e-03 1.35371152e-02 -1.50789744e-02 -1.44420250e-02 -3.82916354e-02 4.33571171e-02 -6.50264132e-04 3.98180047e-04 -2.75620926e-04 3.90643172e-04 -1.19539600e-03 -1.06038238e-03 -9.30817474e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -6.64655287e-03 -4.09994813e-03 1.32997843e-02 1.23488297e-04 -9.01085203e-05 4.94039393e-04 5.27791545e-04 1.80307583e-04 5.11515627e-03 3.56159318e-02 -4.70863948e-03 -1.50789744e-02 1.15883473e-02 1.35389204e-02 4.33571171e-02 -3.26882730e-02 6.09601099e-04 -2.75620926e-04 3.62559506e-04 2.59276857e-04 1.16106267e-03 2.11960636e-03 1.86061809e-02 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 1.32858448e-02 1.32997843e-02 -2.40314612e-02 -2.46841691e-04 4.94039393e-04 -8.30492903e-04 -4.26506203e-04 -8.31364255e-04 -1.06152809e-04 2.83214868e-04 7.45163790e-05 -3.59886299e-06 3.37381493e-06 2.26202011e-05 6.50264132e-04 -6.09601099e-04 -2.39239075e-04 2.16746947e-04 -2.03193089e-04 3.20943771e-05 -4.96673088e-04 -4.51232749e-05 -2.87859563e-04 1.33206059e-04 4.92900665e-05 -9.85262868e-05 -3.95370826e-04 -1.23488297e-04 2.46841691e-04 -2.47524705e-05 1.47501223e-05 -2.94841310e-05 -3.40970488e-05 -4.55041615e-05 6.81944120e-05 -1.81942161e-04 1.24376298e-04 -5.88818995e-06 4.64599854e-05 -4.25415323e-04 -3.98180047e-04 2.75620926e-04 2.16746947e-04 -2.43547439e-05 3.13034616e-05 4.74172809e-06 3.57270523e-04 5.20523543e-05 3.32062954e-04 -4.05569994e-05 -4.07013328e-05 1.78262737e-04 8.96847052e-05 9.01085203e-05 -4.94039393e-04 1.47501223e-05 -2.51363211e-05 4.93846671e-05 2.55058314e-05 4.94171207e-05 -6.39300039e-05 1.70564753e-04 -1.16598662e-04 4.64599854e-05 1.16179215e-07 3.98812783e-04 2.75620926e-04 -3.62559506e-04 -2.03193089e-04 3.13034616e-05 -2.03091649e-05 5.10951320e-05 -3.31340343e-04 -1.04047845e-04 -6.63763150e-04 8.10696930e-05 1.78262737e-04 -3.07851986e-04 -1.79271436e-04 -4.94039393e-04 8.30492903e-04 -2.94841310e-05 4.93846671e-05 -9.91458775e-05 -6.94270663e-05 -8.49604000e-05 1.32293777e-05 -3.52958768e-05 -3.00218458e-06 1.30237658e-04 1.40119507e-04 -1.78102703e-05 -3.90643172e-04 -2.59276857e-04 3.20943771e-05 4.74172809e-06 5.10951320e-05 1.73193615e-04 7.46959854e-05 -7.80466354e-05 -4.97890953e-04 1.33575327e-04 1.82245085e-04 -1.70278665e-04 -3.70192191e-04 -5.27791545e-04 4.26506203e-04 -3.40970488e-05 2.55058314e-05 -6.94270663e-05 -6.40529973e-05 -6.02686003e-05 -2.04729815e-04 5.46217554e-04 4.64599854e-05 1.76772261e-05 3.72052992e-07 2.75620926e-04 1.19539600e-03 -1.16106267e-03 -4.96673088e-04 3.57270523e-04 -3.31340343e-04 7.46959854e-05 -9.77929331e-04 -1.04157012e-04 -6.64459569e-04 1.78262737e-04 8.14435629e-05 -3.08174984e-04 -4.94039393e-04 -1.80307583e-04 8.31364255e-04 -4.55041615e-05 4.94171207e-05 -8.49604000e-05 -6.02686003e-05 -9.93240647e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +2 -1 1 169 + 5.16849134e-05 5.27919969e-04 -5.03464554e-05 -6.05228069e-05 2.51854556e-04 1.72460600e-04 2.07319453e-04 -8.62721865e-04 -4.36437814e-05 7.42745124e-06 -3.09079755e-05 -7.28431049e-05 -3.71552957e-05 5.27919969e-04 5.36920334e-03 -5.08436757e-04 -6.11205287e-04 2.54341866e-03 1.74175000e-03 2.09380379e-03 -8.71298030e-03 -4.16481170e-04 7.08782210e-05 -2.94946711e-04 -6.95122663e-04 -3.54563251e-04 5.03464554e-05 5.08436757e-04 1.18971292e-05 -6.08553310e-05 2.53238294e-04 -4.35844971e-05 2.07888315e-04 -8.65089078e-04 -5.41347455e-05 -3.63941051e-06 1.51447391e-05 -7.26432869e-05 -3.70533739e-05 6.05228069e-05 6.11205287e-04 -6.08553310e-05 -1.06356068e-05 3.04424458e-04 2.07888315e-04 3.33897374e-05 -1.03994648e-03 -4.59437335e-05 -2.84879266e-07 -3.70533739e-05 -9.83729058e-05 1.42508823e-06 -2.51854556e-04 -2.54341866e-03 2.53238294e-04 3.04424458e-04 -1.20428633e-03 -8.65089078e-04 -1.03994648e-03 4.11102817e-03 1.91186417e-04 -3.70533739e-05 1.45001695e-04 3.17424937e-04 1.74310376e-04 -1.72460600e-04 -1.74175000e-03 -4.35844971e-05 2.07888315e-04 -8.65089078e-04 1.59314984e-04 -7.10794113e-04 2.95783928e-03 1.83204796e-04 1.33334831e-05 -5.54848433e-05 2.44440916e-04 1.24682693e-04 -2.07319453e-04 -2.09380379e-03 2.07888315e-04 3.33897374e-05 -1.03994648e-03 -7.10794113e-04 -1.03868797e-04 3.55569691e-03 1.53970684e-04 1.86288018e-06 1.24682693e-04 3.32106811e-04 -9.31892537e-06 8.62721865e-04 8.71298030e-03 -8.65089078e-04 -1.03994648e-03 4.11102817e-03 2.95783928e-03 3.55569691e-03 -1.40457847e-02 -6.40720750e-04 1.24682693e-04 -4.87018952e-04 -1.06359498e-03 -5.85458376e-04 -4.36437814e-05 -4.16481170e-04 5.41347455e-05 4.59437335e-05 -1.91186417e-04 -1.83204796e-04 -1.53970684e-04 6.40720750e-04 1.48711166e-05 -5.22964786e-06 2.17622200e-05 2.60823255e-05 1.33038881e-05 7.42745124e-06 7.08782210e-05 3.63941051e-06 2.84879266e-07 3.70533739e-05 -1.33334831e-05 -1.86288018e-06 -1.24682693e-04 -5.22964786e-06 -5.61283237e-07 4.32617101e-06 -8.78246290e-06 2.45210245e-06 -3.09079755e-05 -2.94946711e-04 -1.51447391e-05 3.70533739e-05 -1.45001695e-04 5.54848433e-05 -1.24682693e-04 4.87018952e-04 2.17622200e-05 4.32617101e-06 -1.75242342e-05 2.41967878e-05 1.40078970e-05 -7.28431049e-05 -6.95122663e-04 7.26432869e-05 9.83729058e-05 -3.17424937e-04 -2.44440916e-04 -3.32106811e-04 1.06359498e-03 2.60823255e-05 -8.78246290e-06 2.41967878e-05 4.06185712e-05 3.65106221e-05 -3.71552957e-05 -3.54563251e-04 3.70533739e-05 -1.42508823e-06 -1.74310376e-04 -1.24682693e-04 9.31892537e-06 5.85458376e-04 1.33038881e-05 2.45210245e-06 1.40078970e-05 3.65106221e-05 -1.23375687e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 0 -2 676 + 8.27516628e-06 9.08802576e-05 -3.31690024e-05 -3.31516038e-05 -1.43467963e-08 1.15932821e-04 1.15872009e-04 5.01451490e-08 6.57122653e-06 2.27276232e-05 9.83568045e-09 1.13578487e-05 9.83052120e-09 3.00197366e-06 3.26546287e-05 -1.54044205e-05 -8.62020051e-06 3.07546765e-06 5.27966418e-05 2.95446127e-05 -1.05407642e-05 6.86551279e-06 8.08058691e-06 -2.88294728e-06 1.97313064e-06 -1.61327611e-06 9.08802576e-05 9.98807942e-04 -3.64520473e-04 -3.64329266e-04 -1.57668323e-07 1.27488695e-03 1.27421822e-03 5.51434836e-07 7.24639184e-05 2.50627890e-04 1.08462544e-07 1.25248189e-04 1.08405650e-07 3.26546287e-05 3.54557664e-04 -1.68173591e-04 -9.41087052e-05 3.35755854e-05 5.74940591e-04 3.21732529e-04 -1.14785959e-04 7.53624049e-05 8.87002152e-05 -3.16459742e-05 2.16589604e-05 -1.77088545e-05 3.31690024e-05 3.64520473e-04 -1.28557904e-04 -1.35515297e-04 -5.86460424e-08 4.50592934e-04 4.74570596e-04 2.05376721e-07 2.12181717e-05 8.89594229e-05 3.84983703e-08 4.70541429e-05 4.07266167e-08 1.54044205e-05 1.68173591e-04 -7.79876553e-05 -4.47304231e-05 1.59586739e-05 2.68698546e-04 1.54003718e-04 -5.49445981e-05 3.37545532e-05 4.12606910e-05 -1.47207621e-05 1.03369758e-05 -8.45174457e-06 3.31516038e-05 3.64329266e-04 -1.35515297e-04 -1.28415700e-04 -5.86152800e-08 4.74570596e-04 4.50094936e-04 2.05268992e-07 3.02107103e-05 8.89073048e-05 4.07266167e-08 4.18311905e-05 3.84556333e-08 8.62020051e-06 9.41087052e-05 -4.47304231e-05 -2.30845710e-05 8.93035664e-06 1.54003718e-04 7.96710675e-05 -3.07465933e-05 2.07463501e-05 2.17728225e-05 -8.45174457e-06 4.71203860e-06 -4.34690881e-06 1.43467963e-08 1.57668323e-07 -5.86460424e-08 -5.86152800e-08 7.02848825e-06 2.05376721e-07 2.05268992e-07 -2.42266373e-05 1.30740856e-08 4.07266167e-08 -5.20098097e-06 2.26022436e-08 -5.19825282e-06 -3.07546765e-06 -3.35755854e-05 1.59586739e-05 8.93035664e-06 -1.23987845e-06 -5.49445981e-05 -3.07465933e-05 4.46131908e-06 -7.40176849e-06 -8.45174457e-06 1.09887083e-06 -2.44638585e-06 6.14920040e-07 -1.15932821e-04 -1.27488695e-03 4.50592934e-04 4.74570596e-04 2.05376721e-07 -1.57949590e-03 -1.66202156e-03 -7.19261877e-07 -7.52048490e-05 -3.14093514e-04 -1.35928135e-07 -1.65969820e-04 -1.43651310e-07 -5.27966418e-05 -5.74940591e-04 2.68698546e-04 1.54003718e-04 -5.49445981e-05 -9.22547022e-04 -5.28398788e-04 1.88519209e-04 -1.17289247e-04 -1.43192665e-04 5.10874902e-05 -3.58444286e-05 2.93072132e-05 -1.15872009e-04 -1.27421822e-03 4.74570596e-04 4.50094936e-04 2.05268992e-07 -1.66202156e-03 -1.57775183e-03 -7.18884592e-07 -1.06377644e-04 -3.13909848e-04 -1.43651310e-07 -1.47862365e-04 -1.35777392e-07 -2.95446127e-05 -3.21732529e-04 1.54003718e-04 7.96710675e-05 -3.07465933e-05 -5.28398788e-04 -2.73978974e-04 1.05493964e-04 -7.18721434e-05 -7.57090313e-05 2.93072132e-05 -1.64568009e-05 1.51151857e-05 -5.01451490e-08 -5.51434836e-07 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -7.19261877e-07 -7.18884592e-07 8.33976123e-05 -4.60363367e-08 -1.43651310e-07 1.80297925e-05 -7.95865317e-08 1.80203351e-05 1.05407642e-05 1.14785959e-04 -5.49445981e-05 -3.07465933e-05 4.46131908e-06 1.88519209e-04 1.05493964e-04 -1.59284508e-05 2.56421474e-05 2.93072132e-05 -4.02017412e-06 8.44119764e-06 -2.24965989e-06 6.57122653e-06 7.24639184e-05 -2.12181717e-05 -3.02107103e-05 -1.30740856e-08 7.52048490e-05 1.06377644e-04 4.60363367e-08 -8.39846215e-07 1.65608232e-05 7.16691593e-09 1.16238799e-05 1.00607783e-08 6.86551279e-06 7.53624049e-05 -3.37545532e-05 -2.07463501e-05 7.40176849e-06 1.17289247e-04 7.18721434e-05 -2.56421474e-05 1.35697123e-05 1.85614856e-05 -6.62226458e-06 4.98272726e-06 -4.07399018e-06 2.27276232e-05 2.50627890e-04 -8.89594229e-05 -8.89073048e-05 -4.07266167e-08 3.14093514e-04 3.13909848e-04 1.43651310e-07 1.65608232e-05 5.74406352e-05 2.64573468e-08 2.86159769e-05 2.64417132e-08 8.08058691e-06 8.87002152e-05 -4.12606910e-05 -2.17728225e-05 8.45174457e-06 1.43192665e-04 7.57090313e-05 -2.93072132e-05 1.85614856e-05 2.01094217e-05 -7.83985319e-06 4.44637876e-06 -4.12618461e-06 9.83568045e-09 1.08462544e-07 -3.84983703e-08 -4.07266167e-08 5.20098097e-06 1.35928135e-07 1.43651310e-07 -1.80297925e-05 7.16691593e-09 2.64573468e-08 -3.69519580e-06 1.57315850e-08 -3.86773918e-06 -2.88294728e-06 -3.16459742e-05 1.47207621e-05 8.45174457e-06 -1.09887083e-06 -5.10874902e-05 -2.93072132e-05 4.02017412e-06 -6.62226458e-06 -7.83985319e-06 9.32227628e-07 -2.34616322e-06 5.42827125e-07 1.13578487e-05 1.25248189e-04 -4.70541429e-05 -4.18311905e-05 -2.26022436e-08 1.65969820e-04 1.47862365e-04 7.95865317e-08 1.16238799e-05 2.86159769e-05 1.57315850e-08 1.25421922e-05 1.40503904e-08 1.97313064e-06 2.16589604e-05 -1.03369758e-05 -4.71203860e-06 2.44638585e-06 3.58444286e-05 1.64568009e-05 -8.44119764e-06 4.98272726e-06 4.44637876e-06 -2.34616322e-06 7.12052440e-07 -1.10030401e-06 9.83052120e-09 1.08405650e-07 -4.07266167e-08 -3.84556333e-08 5.19825282e-06 1.43651310e-07 1.35777392e-07 -1.80203351e-05 1.00607783e-08 2.64417132e-08 -3.86773918e-06 1.40503904e-08 -3.69113714e-06 -1.61327611e-06 -1.77088545e-05 8.45174457e-06 4.34690881e-06 -6.14920040e-07 -2.93072132e-05 -1.51151857e-05 2.24965989e-06 -4.07399018e-06 -4.12618461e-06 5.42827125e-07 -1.10030401e-06 2.65949928e-07 7.53554557e-08 7.55178124e-07 -2.56321546e-07 -4.44478713e-07 -8.52966559e-08 7.85992544e-07 1.36296367e-06 2.61556380e-07 -5.23921785e-08 2.81570943e-07 5.40342184e-08 2.35140889e-07 9.36989506e-08 8.15919978e-06 8.96171586e-05 -3.27102754e-05 -3.27274346e-05 1.41493681e-08 1.14318287e-04 1.14378256e-04 -4.94502572e-08 6.47643325e-06 2.24703773e-05 -9.71483541e-09 1.12410803e-05 -9.71993163e-09 7.55178124e-07 7.56635972e-06 -2.56974278e-06 -4.45610595e-06 -8.55138672e-07 7.87745480e-06 1.36600338e-05 2.62139708e-06 -5.25433673e-07 2.82383476e-06 5.41901457e-07 2.35819438e-06 9.39693390e-07 8.96171586e-05 9.84998131e-04 -3.59541633e-04 -3.59730242e-04 1.55525653e-07 1.25729095e-03 1.25795050e-03 -5.43861897e-07 7.14374404e-05 2.47856525e-04 -1.07158207e-07 1.23993250e-04 -1.07214420e-07 2.56321546e-07 2.56974278e-06 -8.58216184e-07 -1.51816500e-06 -2.91339932e-07 2.63346742e-06 4.65772303e-06 8.93829529e-07 -1.92475721e-07 9.46749854e-07 1.81683834e-07 8.06624395e-07 3.21423720e-07 3.27102754e-05 3.59541633e-04 -1.26815516e-04 -1.33791713e-04 5.78434647e-08 4.44458492e-04 4.68502006e-04 -2.02552001e-07 2.09255703e-05 8.79785547e-05 -3.80366190e-08 4.65727721e-05 -4.02705210e-08 4.44478713e-07 4.45610595e-06 -1.51816500e-06 -2.61532200e-06 -5.05202938e-07 4.65772303e-06 8.02425972e-06 1.54996022e-06 -3.00601125e-07 1.66388883e-06 3.21423720e-07 1.37959306e-06 5.53695760e-07 3.27274346e-05 3.59730242e-04 -1.33791713e-04 -1.26955848e-04 5.78738083e-08 4.68502006e-04 4.44949898e-04 -2.02658256e-07 2.98014781e-05 8.80300750e-05 -4.02705210e-08 4.14790332e-05 -3.80788582e-08 8.52966559e-08 8.55138672e-07 -2.91339932e-07 -5.05202938e-07 -7.96720857e-08 8.93829529e-07 1.54996022e-06 2.44897812e-07 -5.76861613e-08 3.21423720e-07 5.06400406e-08 2.72096564e-07 8.78132193e-08 -1.41493681e-08 -1.55525653e-07 5.78434647e-08 5.78738083e-08 6.90602458e-06 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 -1.28843611e-08 -4.02705210e-08 -5.11546916e-06 -2.23586072e-08 -5.11815264e-06 -7.85992544e-07 -7.87745480e-06 2.63346742e-06 4.65772303e-06 8.93829529e-07 -8.07725544e-06 -1.42835249e-05 -2.74104670e-06 5.90420581e-07 -2.90640671e-06 -5.57747234e-07 -2.47579122e-06 -9.86553381e-07 -1.14318287e-04 -1.25729095e-03 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -1.55783378e-03 -1.64059005e-03 7.09292153e-07 -7.41676003e-05 -3.10616227e-04 1.34291716e-07 -1.64262990e-04 1.42034839e-07 -1.36296367e-06 -1.36600338e-05 4.65772303e-06 8.02425972e-06 1.54996022e-06 -1.42835249e-05 -2.46088344e-05 -4.75315841e-06 9.22945279e-07 -5.10731593e-06 -9.86553381e-07 -4.23494252e-06 -1.69957219e-06 -1.14378256e-04 -1.25795050e-03 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -1.64059005e-03 -1.55955457e-03 7.09664234e-07 -1.04928872e-04 -3.10797775e-04 1.42034839e-07 -1.46611593e-04 1.34440694e-07 -2.61556380e-07 -2.62139708e-06 8.93829529e-07 1.54996022e-06 2.44897812e-07 -2.74104670e-06 -4.75315841e-06 -7.52390225e-07 1.77115672e-07 -9.86553381e-07 -1.55733495e-07 -8.35051609e-07 -2.70052301e-07 4.94502572e-08 5.43861897e-07 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 7.09292153e-07 7.09664234e-07 8.18957947e-05 4.53649137e-08 1.42034839e-07 1.77282045e-05 7.87233138e-08 1.77375044e-05 -5.23921785e-08 -5.25433673e-07 1.92475721e-07 3.00601125e-07 5.76861613e-08 -5.90420581e-07 -9.22945279e-07 -1.77115672e-07 2.03711025e-08 -2.06266156e-07 -3.95830280e-08 -1.54486566e-07 -6.15598127e-08 6.47643325e-06 7.14374404e-05 -2.09255703e-05 -2.98014781e-05 1.28843611e-08 7.41676003e-05 1.04928872e-04 -4.53649137e-08 -8.26388656e-07 1.63766450e-05 -7.08027324e-09 1.14959603e-05 -9.94032116e-09 2.81570943e-07 2.82383476e-06 -9.46749854e-07 -1.66388883e-06 -3.21423720e-07 2.90640671e-06 5.10731593e-06 9.86553381e-07 -2.06266156e-07 1.04215488e-06 2.01329269e-07 8.81629697e-07 3.53849281e-07 2.24703773e-05 2.47856525e-04 -8.79785547e-05 -8.80300750e-05 4.02705210e-08 3.10616227e-04 3.10797775e-04 -1.42034839e-07 1.63766450e-05 5.70028575e-05 -2.62180073e-08 2.84327888e-05 -2.62334905e-08 5.40342184e-08 5.41901457e-07 -1.81683834e-07 -3.21423720e-07 -5.06400406e-08 5.57747234e-07 9.86553381e-07 1.55733495e-07 -3.95830280e-08 2.01329269e-07 3.16687921e-08 1.73901485e-07 5.60737096e-08 -9.71483541e-09 -1.07158207e-07 3.80366190e-08 4.02705210e-08 5.11546916e-06 -1.34291716e-07 -1.42034839e-07 -1.77282045e-05 -7.08027324e-09 -2.62180073e-08 -3.63928211e-06 -1.55891033e-08 -3.81236177e-06 2.35140889e-07 2.35819438e-06 -8.06624395e-07 -1.37959306e-06 -2.72096564e-07 2.47579122e-06 4.23494252e-06 8.35051609e-07 -1.54486566e-07 8.81629697e-07 1.73901485e-07 7.24542127e-07 2.97469283e-07 1.12410803e-05 1.23993250e-04 -4.65727721e-05 -4.14790332e-05 2.23586072e-08 1.64262990e-04 1.46611593e-04 -7.87233138e-08 1.14959603e-05 2.84327888e-05 -1.55891033e-08 1.24877430e-05 -1.39481760e-08 9.36989506e-08 9.39693390e-07 -3.21423720e-07 -5.53695760e-07 -8.78132193e-08 9.86553381e-07 1.69957219e-06 2.70052301e-07 -6.15598127e-08 3.53849281e-07 5.60737096e-08 2.97469283e-07 9.65678254e-08 -9.71993163e-09 -1.07214420e-07 4.02705210e-08 3.80788582e-08 5.11815264e-06 -1.42034839e-07 -1.34440694e-07 -1.77375044e-05 -9.94032116e-09 -2.62334905e-08 -3.81236177e-06 -1.39481760e-08 -3.64328085e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +2 0 -1 676 + 1.71125195e-04 1.57340803e-03 -6.54391095e-04 -3.26863713e-04 3.26901077e-04 2.14206805e-03 1.06994780e-03 -1.07007011e-03 9.06971384e-05 1.04555142e-04 -1.04567094e-04 -5.97028977e-09 -5.22305220e-05 1.71091240e-06 1.83093242e-05 -8.95839359e-06 -1.42979385e-06 5.37178616e-06 3.00488970e-05 4.79591878e-06 -1.80184368e-05 4.05776295e-06 1.38917934e-06 -5.21919602e-06 -1.45395291e-06 -8.33003627e-07 1.57340803e-03 1.40097483e-02 -5.81479070e-03 -2.90444673e-03 2.90477875e-03 1.87705742e-02 9.37576874e-03 -9.37684052e-03 5.74307103e-04 6.62057940e-04 -6.62133622e-04 -3.78047189e-08 -3.30731050e-04 1.83093242e-05 1.95568163e-04 -9.61985000e-05 -1.53536482e-05 5.76842003e-05 3.21819416e-04 5.13636084e-05 -1.92974897e-04 4.37564431e-05 1.49800635e-05 -5.62806296e-05 -1.56785422e-05 -8.98260354e-06 6.54391095e-04 5.81479070e-03 -2.35234431e-03 -1.28971937e-03 1.28986680e-03 7.57613124e-03 4.16909440e-03 -4.16957098e-03 1.96680176e-04 3.08018123e-04 -3.08053333e-04 -2.03762001e-08 -1.78259282e-04 8.95839359e-06 9.61985000e-05 -4.63567584e-05 -7.54912661e-06 2.83623362e-05 1.56278233e-04 2.54346765e-05 -9.55589809e-05 2.05019813e-05 7.24310010e-06 -2.72125838e-05 -7.73973312e-06 -4.43427412e-06 3.26863713e-04 2.90444673e-03 -1.28971937e-03 -4.14492578e-04 6.44279323e-04 4.16909440e-03 1.31191054e-03 -2.08267114e-03 1.82801830e-04 8.04965969e-05 -1.78259282e-04 -4.88317689e-05 -4.02120757e-05 1.42979385e-06 1.53536482e-05 -7.54912661e-06 -2.62468204e-07 4.52673723e-06 2.54346765e-05 9.76378855e-07 -1.52515785e-05 3.53516852e-06 2.28977735e-07 -4.43427412e-06 -1.38711907e-06 -1.37303571e-07 -3.26901077e-04 -2.90477875e-03 1.28986680e-03 6.44279323e-04 -4.14639869e-04 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 -1.82822726e-04 -1.78259282e-04 8.05373493e-05 -4.88169931e-05 4.02278350e-05 -5.37178616e-06 -5.76842003e-05 2.83623362e-05 4.52673723e-06 -1.60647110e-05 -9.55589809e-05 -1.52515785e-05 5.42176282e-05 -1.32817534e-05 -4.43427412e-06 1.57084440e-05 4.07060847e-06 2.50712768e-06 -2.14206805e-03 -1.87705742e-02 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -2.42413527e-02 -1.33983586e-02 1.33998902e-02 -4.89218183e-04 -8.26988668e-04 8.27083203e-04 5.62431431e-08 4.92037880e-04 -3.00488970e-05 -3.21819416e-04 1.56278233e-04 2.54346765e-05 -9.55589809e-05 -5.24863017e-04 -8.53765342e-05 3.20762665e-04 -6.95729467e-05 -2.45540925e-05 9.22505957e-05 2.62203837e-05 1.50222711e-05 -1.06994780e-03 -9.37576874e-03 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.33983586e-02 -4.10981645e-03 6.69315015e-03 -5.17979214e-04 -1.75713806e-04 4.92037880e-04 1.58001634e-04 8.77778333e-05 -4.79591878e-06 -5.13636084e-05 2.54346765e-05 9.76378855e-07 -1.52515785e-05 -8.53765342e-05 -3.56155457e-06 5.11949469e-05 -1.19669703e-05 -8.77122891e-07 1.50222711e-05 4.68304715e-06 5.25955525e-07 1.07007011e-03 9.37684052e-03 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.33998902e-02 6.69315015e-03 -4.11134659e-03 5.18038425e-04 4.92037880e-04 -1.75826292e-04 1.57963503e-04 -8.78239864e-05 1.80184368e-05 1.92974897e-04 -9.55589809e-05 -1.52515785e-05 5.42176282e-05 3.20762665e-04 5.11949469e-05 -1.82276363e-04 4.49603317e-05 1.50222711e-05 -5.33178903e-05 -1.38510614e-05 -8.50973902e-06 9.06971384e-05 5.74307103e-04 -1.96680176e-04 -1.82801830e-04 1.82822726e-04 4.89218183e-04 5.17979214e-04 -5.18038425e-04 -8.52265465e-05 -7.70397886e-05 7.70485953e-05 3.50576416e-09 3.06698501e-05 4.05776295e-06 4.37564431e-05 -2.05019813e-05 -3.53516852e-06 1.32817534e-05 6.95729467e-05 1.19669703e-05 -4.49603317e-05 8.54343973e-06 3.31464506e-06 -1.24532390e-05 -3.74922604e-06 -2.14801929e-06 1.04555142e-04 6.62057940e-04 -3.08018123e-04 -8.04965969e-05 1.78259282e-04 8.26988668e-04 1.75713806e-04 -4.92037880e-04 -7.70397886e-05 -1.01196560e-04 8.73209439e-05 -9.02782116e-06 5.03959572e-05 1.38917934e-06 1.49800635e-05 -7.24310010e-06 -2.28977735e-07 4.43427412e-06 2.45540925e-05 8.77122891e-07 -1.50222711e-05 3.31464506e-06 1.88411795e-07 -4.28546332e-06 -1.37411125e-06 -1.18403833e-07 -1.04567094e-04 -6.62133622e-04 3.08053333e-04 1.78259282e-04 -8.05373493e-05 -8.27083203e-04 -4.92037880e-04 1.75826292e-04 7.70485953e-05 8.73209439e-05 -1.01216522e-04 -9.03831022e-06 -5.03996529e-05 -5.21919602e-06 -5.62806296e-05 2.72125838e-05 4.43427412e-06 -1.57084440e-05 -9.22505957e-05 -1.50222711e-05 5.33178903e-05 -1.24532390e-05 -4.28546332e-06 1.51483992e-05 4.00187243e-06 2.47079408e-06 -5.97028977e-09 -3.78047189e-08 2.03762001e-08 4.88317689e-05 4.88169931e-05 -5.62431431e-08 -1.58001634e-04 -1.57963503e-04 3.50576416e-09 -9.02782116e-06 -9.03831022e-06 -4.82657881e-06 -2.36186727e-09 -1.45395291e-06 -1.56785422e-05 7.73973312e-06 1.38711907e-06 -4.07060847e-06 -2.62203837e-05 -4.68304715e-06 1.38510614e-05 -3.74922604e-06 -1.37411125e-06 4.00187243e-06 9.19457376e-07 7.31341186e-07 -5.22305220e-05 -3.30731050e-04 1.78259282e-04 4.02120757e-05 -4.02278350e-05 -4.92037880e-04 -8.77778333e-05 8.78239864e-05 3.06698501e-05 5.03959572e-05 -5.03996529e-05 -2.36186727e-09 -2.54891536e-05 -8.33003627e-07 -8.98260354e-06 4.43427412e-06 1.37303571e-07 -2.50712768e-06 -1.50222711e-05 -5.25955525e-07 8.50973902e-06 -2.14801929e-06 -1.18403833e-07 2.47079408e-06 7.31341186e-07 6.19520250e-08 5.93543166e-04 4.73514383e-03 -1.67028414e-03 -1.78280988e-03 5.57750654e-04 5.12384518e-03 5.46903463e-03 -1.71098314e-03 4.14790056e-05 2.04703950e-04 -6.40414680e-05 9.85548043e-05 -6.83558917e-05 1.69565517e-04 1.56053224e-03 -6.48479832e-04 -3.24568776e-04 3.24531747e-04 2.12361003e-03 1.06288195e-03 -1.06276069e-03 9.01314392e-05 1.04246931e-04 -1.04235037e-04 5.95242619e-09 -5.21703789e-05 4.73514383e-03 3.41208438e-02 -1.22688396e-02 -1.30953818e-02 4.09687978e-03 3.56563533e-02 3.80584939e-02 -1.19065696e-02 -1.11998561e-04 -5.52726550e-04 1.72920062e-04 -2.66110435e-04 1.84569552e-04 1.56053224e-03 1.39128426e-02 -5.76912170e-03 -2.88748651e-03 2.88715708e-03 1.86343382e-02 9.32661905e-03 -9.32555499e-03 5.74071199e-04 6.63976534e-04 -6.63900782e-04 3.79125915e-08 -3.32287071e-04 1.67028414e-03 1.22688396e-02 -3.97474675e-03 -5.10679853e-03 1.59765786e-03 1.15955919e-02 1.51023750e-02 -4.72476602e-03 -1.23436117e-04 -2.11782009e-06 6.62558332e-07 6.63398381e-05 -4.60121535e-05 6.48479832e-04 5.76912170e-03 -2.33153957e-03 -1.28082856e-03 1.28068243e-03 7.51330575e-03 4.14256914e-03 -4.14209652e-03 1.96173742e-04 3.08000907e-04 -3.07965767e-04 2.03623990e-08 -1.78467408e-04 1.78280988e-03 1.30953818e-02 -5.10679853e-03 -4.64111395e-03 1.70529083e-03 1.51023750e-02 1.35662448e-02 -5.04306982e-03 1.10578360e-04 1.59957689e-05 -4.60121535e-05 -6.91003464e-05 -5.34139690e-06 3.24568776e-04 2.88748651e-03 -1.28082856e-03 -4.13541800e-04 6.40990681e-04 4.14256914e-03 1.30994752e-03 -2.07314882e-03 1.82386438e-04 8.13604017e-05 -1.78467408e-04 -4.86027490e-05 -4.07168149e-05 -5.57750654e-04 -4.09687978e-03 1.59765786e-03 1.70529083e-03 2.76226740e-04 -4.72476602e-03 -5.04306982e-03 -9.75845097e-04 -3.45943520e-05 -4.60121535e-05 -1.16683907e-04 -6.59231305e-05 -1.24544811e-04 -3.24531747e-04 -2.88715708e-03 1.28068243e-03 6.40990681e-04 -4.13395531e-04 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 -1.82365630e-04 -1.78467408e-04 8.13196769e-05 -4.86175846e-05 4.07010777e-05 -5.12384518e-03 -3.56563533e-02 1.15955919e-02 1.51023750e-02 -4.72476602e-03 -3.26976101e-02 -4.34121317e-02 1.35814509e-02 5.29864027e-04 1.16894937e-03 -3.65704880e-04 4.02341988e-04 -2.79057379e-04 -2.12361003e-03 -1.86343382e-02 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -2.40561655e-02 -1.33214770e-02 1.33199571e-02 -4.90535867e-04 -8.30029912e-04 8.29935214e-04 -5.63839373e-08 4.94180235e-04 -5.46903463e-03 -3.80584939e-02 1.51023750e-02 1.35662448e-02 -5.04306982e-03 -4.34121317e-02 -3.83622981e-02 1.44964226e-02 -1.16663489e-05 1.20421443e-03 -2.79057379e-04 7.62709561e-04 -4.02118042e-04 -1.06288195e-03 -9.32661905e-03 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.33214770e-02 -4.10770096e-03 6.66673345e-03 -5.18213874e-04 -1.79672091e-04 4.94180235e-04 1.57413568e-04 8.99169018e-05 1.71098314e-03 1.19065696e-02 -4.72476602e-03 -5.04306982e-03 -9.75845097e-04 1.35814509e-02 1.44964226e-02 3.43928063e-03 3.64980798e-06 -2.79057379e-04 3.99530458e-04 -3.00915094e-05 4.26446513e-04 1.06276069e-03 9.32555499e-03 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.33199571e-02 6.66673345e-03 -4.10617966e-03 5.18154752e-04 4.94180235e-04 -1.79559323e-04 1.57452044e-04 -8.98707205e-05 4.14790056e-05 -1.11998561e-04 1.23436117e-04 -1.10578360e-04 3.45943520e-05 -5.29864027e-04 1.16663489e-05 -3.64980798e-06 9.86661635e-05 -1.83151977e-04 5.72989504e-05 -1.62667418e-04 1.12823281e-04 9.01314392e-05 5.74071199e-04 -1.96173742e-04 -1.82386438e-04 1.82365630e-04 4.90535867e-04 5.18213874e-04 -5.18154752e-04 -8.38723793e-05 -7.52905161e-05 7.52819262e-05 -3.39022091e-09 2.97137846e-05 2.04703950e-04 -5.52726550e-04 2.11782009e-06 -1.59957689e-05 4.60121535e-05 -1.16894937e-03 -1.20421443e-03 2.79057379e-04 -1.83151977e-04 -9.79609707e-04 3.32574320e-04 -4.68383060e-04 3.58871778e-04 1.04246931e-04 6.63976534e-04 -3.08000907e-04 -8.13604017e-05 1.78467408e-04 8.30029912e-04 1.79672091e-04 -4.94180235e-04 -7.52905161e-05 -9.97224729e-05 8.55349841e-05 -9.19395180e-06 4.96974181e-05 -6.40414680e-05 1.72920062e-04 -6.62558332e-07 4.60121535e-05 1.16683907e-04 3.65704880e-04 2.79057379e-04 -3.99530458e-04 5.72989504e-05 3.32574320e-04 -2.06054057e-05 2.02424534e-04 -3.16893126e-05 -1.04235037e-04 -6.63900782e-04 3.07965767e-04 1.78467408e-04 -8.13196769e-05 -8.29935214e-04 -4.94180235e-04 1.79559323e-04 7.52819262e-05 8.55349841e-05 -9.97029545e-05 -9.18366007e-06 -4.96938449e-05 9.85548043e-05 -2.66110435e-04 -6.63398381e-05 6.91003464e-05 6.59231305e-05 -4.02341988e-04 -7.62709561e-04 3.00915094e-05 -1.62667418e-04 -4.68383060e-04 2.02424534e-04 -1.64081552e-04 1.86233408e-04 5.95242619e-09 3.79125915e-08 -2.03623990e-08 4.86027490e-05 4.86175846e-05 5.63839373e-08 -1.57413568e-04 -1.57452044e-04 -3.39022091e-09 -9.19395180e-06 -9.18366007e-06 -5.01529191e-06 2.31304312e-09 -6.83558917e-05 1.84569552e-04 4.60121535e-05 5.34139690e-06 1.24544811e-04 2.79057379e-04 4.02118042e-04 -4.26446513e-04 1.12823281e-04 3.58871778e-04 -3.16893126e-05 1.86233408e-04 -2.47404266e-05 -5.21703789e-05 -3.32287071e-04 1.78467408e-04 4.07168149e-05 -4.07010777e-05 -4.94180235e-04 -8.99169018e-05 8.98707205e-05 2.97137846e-05 4.96974181e-05 -4.96938449e-05 2.31304312e-09 -2.52880900e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +2 0 0 507 + 8.26784870e-06 9.08005784e-05 -3.31402035e-05 1.62265978e-08 3.31247122e-05 1.15831465e-04 -5.67151192e-08 -1.15777320e-04 6.56541801e-06 -1.11255035e-08 -2.27114216e-05 -1.13503999e-05 1.11203030e-08 9.08005784e-05 9.97937040e-04 -3.64208022e-04 1.78328932e-07 3.64037775e-04 1.27378273e-03 -6.23688385e-07 -1.27318730e-03 7.24010828e-05 -1.22688076e-07 -2.50453438e-04 -1.25168152e-04 1.22630726e-07 3.31402035e-05 3.64208022e-04 -1.28449169e-04 6.63308026e-08 1.35406619e-04 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 2.12005244e-05 -4.35479613e-08 -8.88980985e-05 -4.70236432e-05 4.60703732e-08 -1.62265978e-08 -1.78328932e-07 6.63308026e-08 7.02074294e-06 -6.62997966e-08 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 -1.47867785e-08 -5.19559917e-06 4.60703732e-08 2.55683707e-08 5.19317051e-06 -3.31247122e-05 -3.64037775e-04 1.35406619e-04 -6.62997966e-08 -1.28322549e-04 -4.74187979e-04 2.32178949e-07 4.49766695e-04 -3.01854886e-05 4.60703732e-08 8.88516872e-05 4.18084691e-05 -4.35048805e-08 -1.15831465e-04 -1.27378273e-03 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -1.57814407e-03 8.13502356e-07 1.66067045e-03 -7.51422849e-05 1.53756556e-07 3.13876127e-04 1.65861691e-04 -1.62499319e-07 5.67151192e-08 6.23688385e-07 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 8.13502356e-07 8.33026208e-05 -8.13122088e-07 5.20668178e-08 1.80108098e-05 -1.62499319e-07 -9.00304191e-08 -1.80023907e-05 1.15777320e-04 1.27318730e-03 -4.74187979e-04 2.32178949e-07 4.49766695e-04 1.66067045e-03 -8.13122088e-07 -1.57659116e-03 1.06288353e-04 -1.62499319e-07 -3.13712572e-04 -1.47781689e-04 1.53604601e-07 6.56541801e-06 7.24010828e-05 -2.12005244e-05 1.47867785e-08 3.01854886e-05 7.51422849e-05 -5.20668178e-08 -1.06288353e-04 -8.38745046e-07 -8.10711403e-09 -1.65497304e-05 -1.16159774e-05 1.13804966e-08 -1.11255035e-08 -1.22688076e-07 4.35479613e-08 5.19559917e-06 -4.60703732e-08 -1.53756556e-07 -1.80108098e-05 1.62499319e-07 -8.10711403e-09 -3.69169936e-06 2.99330769e-08 1.77980956e-08 3.86424439e-06 -2.27114216e-05 -2.50453438e-04 8.88980985e-05 -4.60703732e-08 -8.88516872e-05 -3.13876127e-04 1.62499319e-07 3.13712572e-04 -1.65497304e-05 2.99330769e-08 5.74131813e-05 2.86042224e-05 -2.99173155e-08 -1.13503999e-05 -1.25168152e-04 4.70236432e-05 -2.55683707e-08 -4.18084691e-05 -1.65861691e-04 9.00304191e-08 1.47781689e-04 -1.16159774e-05 1.77980956e-08 2.86042224e-05 1.25385472e-05 -1.58976997e-08 1.11203030e-08 1.22630726e-07 -4.60703732e-08 -5.19317051e-06 4.35048805e-08 1.62499319e-07 1.80023907e-05 -1.53604601e-07 1.13804966e-08 3.86424439e-06 -2.99173155e-08 -1.58976997e-08 -3.68808587e-06 7.75959531e-04 5.98270974e-03 -2.17599507e-03 -8.71859251e-04 2.17735139e-03 6.57152594e-03 2.63302329e-03 -6.57562205e-03 4.79125927e-05 7.93365250e-05 -1.98132317e-04 -8.32339644e-05 -7.93859763e-05 8.16644387e-06 8.96960839e-05 -3.27387890e-05 -1.60311706e-08 3.27540937e-05 1.14418655e-04 5.60272701e-08 -1.14472143e-04 6.48218452e-06 1.10057862e-08 -2.24864773e-05 -1.12484919e-05 -1.10109312e-08 5.98270974e-03 4.07183314e-02 -1.52159792e-02 -6.09660951e-03 1.52254635e-02 4.29273639e-02 1.71997721e-02 -4.29541210e-02 -3.30803889e-04 -5.47764784e-04 1.36796899e-03 5.74673954e-04 5.48106212e-04 8.96960839e-05 9.85861294e-04 -3.59851191e-04 -1.76207978e-07 3.60019413e-04 1.25838511e-03 6.16192197e-07 -1.25897338e-03 7.14997122e-05 1.21395888e-07 -2.48030066e-04 -1.24072977e-04 -1.21452638e-07 2.17599507e-03 1.52159792e-02 -5.12680496e-03 -2.47580126e-03 6.18298116e-03 1.45853104e-02 7.15105608e-03 -1.78588022e-02 -1.71200742e-04 -8.29193518e-05 2.07079946e-04 3.12092770e-05 2.97664415e-05 3.27387890e-05 3.59851191e-04 -1.26923207e-04 -6.55357811e-08 1.33899462e-04 4.44837691e-04 2.29489416e-07 -4.68881408e-04 2.09430578e-05 4.30900857e-08 -8.80395289e-05 -4.66031270e-05 -4.56188997e-08 8.71859251e-04 6.09660951e-03 -2.47580126e-03 6.03416177e-05 2.47734446e-03 7.15105608e-03 -3.97142624e-04 -7.15551341e-03 2.35003961e-05 -1.44624981e-04 2.97664415e-05 -4.06667841e-05 1.44715127e-04 1.60311706e-08 1.76207978e-07 -6.55357811e-08 6.91365691e-06 6.55664176e-08 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 1.45982806e-08 -5.12077974e-06 -4.56188997e-08 -2.53276054e-08 5.12317359e-06 -2.17735139e-03 -1.52254635e-02 6.18298116e-03 2.47734446e-03 -5.13451041e-03 -1.78588022e-02 -7.15551341e-03 1.46075667e-02 -5.86890834e-05 2.97664415e-05 -2.07043535e-04 -1.64017292e-04 -8.29564478e-05 -3.27540937e-05 -3.60019413e-04 1.33899462e-04 6.55664176e-08 -1.27048368e-04 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 -2.98264839e-05 -4.56188997e-08 8.80854743e-05 4.15017171e-05 4.31327274e-08 -6.57152594e-03 -4.29273639e-02 1.45853104e-02 7.15105608e-03 -1.78588022e-02 -3.97047653e-02 -1.99068630e-02 4.97147169e-02 7.64768271e-04 8.83590716e-04 -2.20664915e-03 -8.20540247e-04 -7.82605865e-04 -1.14418655e-04 -1.25838511e-03 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -1.55917305e-03 -8.03626587e-07 1.64193004e-03 -7.42296114e-05 -1.52133886e-07 3.10832420e-04 1.64370629e-04 1.60899230e-07 -2.63302329e-03 -1.71997721e-02 7.15105608e-03 -3.97142624e-04 -7.15551341e-03 -1.99068630e-02 2.00287017e-03 1.99192712e-02 1.30665591e-04 5.66628274e-04 -7.82605865e-04 -2.27294753e-04 -5.66981460e-04 -5.60272701e-08 -6.16192197e-07 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -8.03626587e-07 8.19893849e-05 8.04002265e-07 -5.13997441e-08 1.77469351e-05 1.60899230e-07 8.91773670e-08 -1.77552314e-05 6.57562205e-03 4.29541210e-02 -1.78588022e-02 -7.15551341e-03 1.46075667e-02 4.97147169e-02 1.99192712e-02 -3.97667215e-02 -3.26319765e-04 -7.82605865e-04 2.20770877e-03 1.07446528e-03 8.84566027e-04 1.14472143e-04 1.25897338e-03 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 1.64193004e-03 8.04002265e-07 -1.56070783e-03 1.05017411e-04 1.60899230e-07 -3.10994324e-04 -1.46692159e-04 -1.52284284e-07 4.79125927e-05 -3.30803889e-04 1.71200742e-04 -2.35003961e-05 5.86890834e-05 -7.64768271e-04 -1.30665591e-04 3.26319765e-04 1.47861325e-04 -1.07688129e-04 2.68936641e-04 2.13379704e-04 2.03514950e-04 6.48218452e-06 7.14997122e-05 -2.09430578e-05 -1.45982806e-08 2.98264839e-05 7.42296114e-05 5.13997441e-08 -1.05017411e-04 -8.27477510e-07 8.02079735e-09 -1.63876959e-05 -1.15038314e-05 -1.12608781e-08 7.93365250e-05 -5.47764784e-04 8.29193518e-05 1.44624981e-04 -2.97664415e-05 -8.83590716e-04 -5.66628274e-04 7.82605865e-04 -1.07688129e-04 -7.62092083e-05 5.21950139e-04 2.97745580e-04 9.32968683e-05 1.10057862e-08 1.21395888e-07 -4.30900857e-08 5.12077974e-06 4.56188997e-08 1.52133886e-07 -1.77469351e-05 -1.60899230e-07 8.02079735e-09 -3.64273931e-06 -2.96958683e-08 -1.76571801e-08 3.81582059e-06 -1.98132317e-04 1.36796899e-03 -2.07079946e-04 -2.97664415e-05 2.07043535e-04 2.20664915e-03 7.82605865e-04 -2.20770877e-03 2.68936641e-04 5.21950139e-04 -1.17070930e-03 -4.67608464e-04 -5.22344377e-04 -2.24864773e-05 -2.48030066e-04 8.80395289e-05 4.56188997e-08 -8.80854743e-05 -3.10832420e-04 -1.60899230e-07 3.10994324e-04 -1.63876959e-05 -2.96958683e-08 5.70303735e-05 2.84446038e-05 2.97114970e-08 -8.32339644e-05 5.74673954e-04 -3.12092770e-05 4.06667841e-05 1.64017292e-04 8.20540247e-04 2.27294753e-04 -1.07446528e-03 2.13379704e-04 2.97745580e-04 -4.67608464e-04 -9.93045879e-05 -2.42644281e-04 -1.12484919e-05 -1.24072977e-04 4.66031270e-05 2.53276054e-08 -4.15017171e-05 -1.64370629e-04 -8.91773670e-08 1.46692159e-04 -1.15038314e-05 -1.76571801e-08 2.84446038e-05 1.24914350e-05 1.57969378e-08 -7.93859763e-05 5.48106212e-04 -2.97664415e-05 -1.44715127e-04 8.29564478e-05 7.82605865e-04 5.66981460e-04 -8.84566027e-04 2.03514950e-04 9.32968683e-05 -5.22344377e-04 -2.42644281e-04 -7.63254781e-05 -1.10109312e-08 -1.21452638e-07 4.56188997e-08 -5.12317359e-06 -4.31327274e-08 -1.60899230e-07 1.77552314e-05 1.52284284e-07 -1.12608781e-08 3.81582059e-06 2.97114970e-08 1.57969378e-08 -3.64630610e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +2 0 1 169 + 1.67734723e-06 1.79389669e-05 -5.27319121e-06 1.40280692e-06 8.79210250e-06 1.76731528e-05 -4.70152134e-06 -2.94668190e-05 -7.55718436e-07 -8.18622424e-07 -5.13072197e-06 -4.16839277e-06 1.36490637e-06 1.79389669e-05 1.91495204e-04 -5.65888818e-05 1.50541241e-05 9.43518317e-05 1.89157298e-04 -5.03207936e-05 -3.15385938e-04 -8.14351419e-06 -8.82135860e-06 -5.52879289e-05 -4.49180066e-05 1.47080365e-05 5.27319121e-06 5.65888818e-05 -1.57968362e-05 4.44672971e-06 2.78699107e-05 5.32671588e-05 -1.49692712e-05 -9.38200158e-05 -3.05795371e-06 -2.46806453e-06 -1.54686123e-05 -1.33213889e-05 4.36198064e-06 -1.40280692e-06 -1.50541241e-05 4.44672971e-06 -2.64398856e-07 -7.41412588e-06 -1.49692712e-05 9.79459319e-07 2.49585804e-05 5.56984681e-07 1.39267549e-07 4.36198064e-06 3.69193495e-06 -2.32203710e-07 -8.79210250e-06 -9.43518317e-05 2.78699107e-05 -7.41412588e-06 -4.55495400e-05 -9.38200158e-05 2.49585804e-05 1.53425325e-04 3.49090552e-06 4.36198064e-06 2.67820454e-05 2.12828343e-05 -7.12472525e-06 -1.76731528e-05 -1.89157298e-04 5.32671588e-05 -1.49692712e-05 -9.38200158e-05 -1.78928251e-04 5.02054113e-05 3.14662779e-04 1.02818847e-05 8.36925427e-06 5.24543617e-05 4.50882523e-05 -1.47637821e-05 4.70152134e-06 5.03207936e-05 -1.49692712e-05 9.79459319e-07 2.49585804e-05 5.02054113e-05 -3.56063222e-06 -8.37085371e-05 -1.89427309e-06 -5.30453481e-07 -1.47637821e-05 -1.24801941e-05 8.84436235e-07 2.94668190e-05 3.15385938e-04 -9.38200158e-05 2.49585804e-05 1.53425325e-04 3.14662779e-04 -8.37085371e-05 -5.14848541e-04 -1.18723703e-05 -1.47637821e-05 -9.07069580e-05 -7.21334740e-05 2.41304256e-05 -7.55718436e-07 -8.14351419e-06 3.05795371e-06 -5.56984681e-07 -3.49090552e-06 -1.02818847e-05 1.89427309e-06 1.18723703e-05 -4.09711420e-07 4.33225983e-07 2.71524699e-06 1.40811295e-06 -4.61075150e-07 -8.18622424e-07 -8.82135860e-06 2.46806453e-06 -1.39267549e-07 -4.36198064e-06 -8.36925427e-06 5.30453481e-07 1.47637821e-05 4.33225983e-07 6.37041655e-08 2.43582462e-06 2.19196385e-06 -1.21130647e-07 -5.13072197e-06 -5.52879289e-05 1.54686123e-05 -4.36198064e-06 -2.67820454e-05 -5.24543617e-05 1.47637821e-05 9.07069580e-05 2.71524699e-06 2.43582462e-06 1.49416093e-05 1.26041729e-05 -4.22232506e-06 -4.16839277e-06 -4.49180066e-05 1.33213889e-05 -3.69193495e-06 -2.12828343e-05 -4.50882523e-05 1.24801941e-05 7.21334740e-05 1.40811295e-06 2.19196385e-06 1.26041729e-05 9.74645293e-06 -3.50387368e-06 1.36490637e-06 1.47080365e-05 -4.36198064e-06 2.32203710e-07 7.12472525e-06 1.47637821e-05 -8.84436235e-07 -2.41304256e-05 -4.61075150e-07 -1.21130647e-07 -4.22232506e-06 -3.50387368e-06 1.93017973e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 1 -2 169 + 3.18521019e-07 3.25897778e-06 -1.76199593e-06 -1.12839912e-06 -3.51799289e-07 5.56073350e-06 3.56114716e-06 1.11025347e-06 8.15137800e-07 1.16666064e-06 3.63728023e-07 3.37259456e-07 2.32934920e-07 3.25897778e-06 3.33228321e-05 -1.80487082e-05 -1.15585661e-05 -3.60359669e-06 5.69075890e-05 3.64441667e-05 1.13621428e-05 8.35866066e-06 1.19632783e-05 3.72977319e-06 3.45835679e-06 2.38858259e-06 1.76199593e-06 1.80487082e-05 -9.69442865e-06 -6.27723902e-06 -1.95704532e-06 3.06467244e-05 1.98405085e-05 6.18564534e-06 4.43147217e-06 6.45690778e-06 2.01306038e-06 1.88749077e-06 1.30363287e-06 1.12839912e-06 1.15585661e-05 -6.27723902e-06 -3.91252019e-06 -1.25331062e-06 1.98405085e-05 1.23718103e-05 3.96134670e-06 2.96330847e-06 4.06840503e-06 1.30363287e-06 1.13639572e-06 8.12295857e-07 3.51799289e-07 3.60359669e-06 -1.95704532e-06 -1.25331062e-06 -2.83258775e-07 6.18564534e-06 3.96134670e-06 9.00781153e-07 9.23866203e-07 1.30363287e-06 2.93423499e-07 3.99418683e-07 1.87911228e-07 -5.56073350e-06 -5.69075890e-05 3.06467244e-05 1.98405085e-05 6.18564534e-06 -9.67540019e-05 -6.26273777e-05 -1.95252429e-05 -1.40330259e-05 -2.04406674e-05 -6.37275599e-06 -5.97411644e-06 -4.12614180e-06 -3.56114716e-06 -3.64441667e-05 1.98405085e-05 1.23718103e-05 3.96134670e-06 -6.26273777e-05 -3.90684870e-05 -1.25041531e-05 -9.37697984e-06 -1.28829502e-05 -4.12614180e-06 -3.60065997e-06 -2.57220385e-06 -1.11025347e-06 -1.13621428e-05 6.18564534e-06 3.96134670e-06 9.00781153e-07 -1.95252429e-05 -1.25041531e-05 -2.85971356e-06 -2.92344683e-06 -4.12614180e-06 -9.34717338e-07 -1.26300631e-06 -5.98601963e-07 8.15137800e-07 8.35866066e-06 -4.43147217e-06 -2.96330847e-06 -9.23866203e-07 1.40330259e-05 9.37697984e-06 2.92344683e-06 1.96075211e-06 3.01423273e-06 9.39742782e-07 9.09663752e-07 6.28277280e-07 1.16666064e-06 1.19632783e-05 -6.45690778e-06 -4.06840503e-06 -1.30363287e-06 2.04406674e-05 1.28829502e-05 4.12614180e-06 3.01423273e-06 4.20993129e-06 1.34943521e-06 1.18889496e-06 8.50121664e-07 3.63728023e-07 3.72977319e-06 -2.01306038e-06 -1.30363287e-06 -2.93423499e-07 6.37275599e-06 4.12614180e-06 9.34717338e-07 9.39742782e-07 1.34943521e-06 3.02318078e-07 4.18363644e-07 1.95972454e-07 3.37259456e-07 3.45835679e-06 -1.88749077e-06 -1.13639572e-06 -3.99418683e-07 5.97411644e-06 3.60065997e-06 1.26300631e-06 9.09663752e-07 1.18889496e-06 4.18363644e-07 3.13115574e-07 2.52649156e-07 2.32934920e-07 2.38858259e-06 -1.30363287e-06 -8.12295857e-07 -1.87911228e-07 4.12614180e-06 2.57220385e-06 5.98601963e-07 6.28277280e-07 8.50121664e-07 1.95972454e-07 2.52649156e-07 1.21809611e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 1 -1 169 + 5.19625974e-05 5.30554725e-04 -2.53092819e-04 -6.08431177e-05 5.07075605e-05 8.66830630e-04 2.08384727e-04 -1.73670935e-04 8.51557479e-05 3.72829468e-05 -3.10721631e-05 1.36870167e-06 -7.46969941e-06 5.30554725e-04 5.39360918e-03 -2.55479080e-03 -6.14167713e-04 5.11856519e-04 8.75034495e-03 2.10356924e-03 -1.75314593e-03 8.11863180e-04 3.55450483e-04 -2.96237727e-04 1.30490133e-05 -7.12150860e-05 2.53092819e-04 2.55479080e-03 -1.20957852e-03 -3.05901827e-04 2.54943138e-04 4.12834199e-03 1.04480943e-03 -8.70759741e-04 3.71205620e-04 1.74766717e-04 -1.45653185e-04 6.82346343e-06 -3.72391017e-05 6.08431177e-05 6.14167713e-04 -3.05901827e-04 -1.06383978e-05 6.12879316e-05 1.04480943e-03 3.33551759e-05 -2.09329279e-04 1.08466479e-04 -1.49911805e-06 -3.72391017e-05 -9.46165055e-06 3.00350755e-07 -5.07075605e-05 -5.11856519e-04 2.54943138e-04 6.12879316e-05 1.18216478e-05 -8.70759741e-04 -2.09329279e-04 -4.33572375e-05 -9.03975793e-05 -3.72391017e-05 -1.51460449e-05 -1.06196646e-05 -3.64108550e-06 -8.66830630e-04 -8.75034495e-03 4.12834199e-03 1.04480943e-03 -8.70759741e-04 -1.41021682e-02 -3.57164721e-03 2.97666398e-03 -1.24332243e-03 -5.86755758e-04 4.89010988e-04 -2.29518575e-05 1.25259931e-04 -2.08384727e-04 -2.10356924e-03 1.04480943e-03 3.33551759e-05 -2.09329279e-04 -3.57164721e-03 -1.03588375e-04 7.15585364e-04 -3.65480902e-04 9.62345984e-06 1.25259931e-04 3.29270874e-05 -1.92807593e-06 1.73670935e-04 1.75314593e-03 -8.70759741e-04 -2.09329279e-04 -4.33572375e-05 2.97666398e-03 7.15585364e-04 1.58650526e-04 3.04597227e-04 1.25259931e-04 5.55271748e-05 3.66388095e-05 1.33486460e-05 8.51557479e-05 8.11863180e-04 -3.71205620e-04 -1.08466479e-04 9.03975793e-05 1.24332243e-03 3.65480902e-04 -3.04597227e-04 5.62793061e-05 3.81062248e-05 -3.17582953e-05 1.87221750e-06 -1.02176407e-05 3.72829468e-05 3.55450483e-04 -1.74766717e-04 1.49911805e-06 3.72391017e-05 5.86755758e-04 -9.62345984e-06 -1.25259931e-04 3.81062248e-05 -1.24648972e-05 -1.39812208e-05 -6.76183022e-06 2.48385633e-06 -3.10721631e-05 -2.96237727e-04 1.45653185e-04 3.72391017e-05 1.51460449e-05 -4.89010988e-04 -1.25259931e-04 -5.55271748e-05 -3.17582953e-05 -1.39812208e-05 -1.75885626e-05 -6.77143911e-06 -4.34343740e-06 1.36870167e-06 1.30490133e-05 -6.82346343e-06 9.46165055e-06 1.06196646e-05 2.29518575e-05 -3.29270874e-05 -3.66388095e-05 1.87221750e-06 -6.76183022e-06 -6.77143911e-06 -1.28525833e-06 -1.36549809e-07 -7.46969941e-06 -7.12150860e-05 3.72391017e-05 -3.00350755e-07 3.64108550e-06 -1.25259931e-04 1.92807593e-06 -1.33486460e-05 -1.02176407e-05 2.48385633e-06 -4.34343740e-06 -1.36549809e-07 -5.65057294e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +2 1 0 169 + 1.68716785e-06 1.80473051e-05 -8.83829730e-06 1.41070482e-06 5.30618499e-06 2.96288397e-05 -4.72914017e-06 -1.77880534e-05 4.00411283e-06 -1.37163068e-06 -5.15921264e-06 -1.43923483e-06 8.23476046e-07 1.80473051e-05 1.92686388e-04 -9.48656396e-05 1.51417643e-05 5.69538018e-05 3.17179177e-04 -5.06258363e-05 -1.90422581e-04 4.31566421e-05 -1.47835430e-05 -5.56063984e-05 -1.55121859e-05 8.87548941e-06 8.83829730e-06 9.48656396e-05 -4.57597237e-05 7.45155832e-06 2.80280796e-05 1.54172333e-04 -2.50908893e-05 -9.43761578e-05 2.02442746e-05 -7.15531129e-06 -2.69137845e-05 -7.66451791e-06 4.38534891e-06 -1.41070482e-06 -1.51417643e-05 7.45155832e-06 -2.63850868e-07 -4.47363848e-06 -2.50908893e-05 9.78616887e-07 1.50636368e-05 -3.48964298e-06 2.31211865e-07 4.38534891e-06 1.37254136e-06 -1.38811004e-07 -5.30618499e-06 -5.69538018e-05 2.80280796e-05 -4.47363848e-06 -1.59015039e-05 -9.43761578e-05 1.50636368e-05 5.36337265e-05 -1.31258439e-05 4.38534891e-06 1.55602477e-05 4.04034496e-06 -2.48361371e-06 -2.96288397e-05 -3.17179177e-04 1.54172333e-04 -2.50908893e-05 -9.43761578e-05 -5.17483661e-04 8.41729960e-05 3.16605914e-04 -6.86530752e-05 2.42406520e-05 9.11780994e-05 2.59487525e-05 -1.48469003e-05 4.72914017e-06 5.06258363e-05 -2.50908893e-05 9.78616887e-07 1.50636368e-05 8.41729960e-05 -3.56110241e-06 -5.05343363e-05 1.18052732e-05 -8.82109247e-07 -1.48469003e-05 -4.63097951e-06 5.29585585e-07 1.77880534e-05 1.90422581e-04 -9.43761578e-05 1.50636368e-05 5.36337265e-05 3.16605914e-04 -5.05343363e-05 -1.80204436e-04 4.44040189e-05 -1.48469003e-05 -5.27796141e-05 -1.37384971e-05 8.42429863e-06 4.00411283e-06 4.31566421e-05 -2.02442746e-05 3.48964298e-06 1.31258439e-05 6.86530752e-05 -1.18052732e-05 -4.44040189e-05 8.44113450e-06 -3.27511852e-06 -1.23189377e-05 -3.71252378e-06 2.12416649e-06 -1.37163068e-06 -1.47835430e-05 7.15531129e-06 -2.31211865e-07 -4.38534891e-06 -2.42406520e-05 8.82109247e-07 1.48469003e-05 -3.27511852e-06 1.91574120e-07 4.24171652e-06 1.36057332e-06 -1.20402711e-07 -5.15921264e-06 -5.56063984e-05 2.69137845e-05 -4.38534891e-06 -1.55602477e-05 -9.11780994e-05 1.48469003e-05 5.27796141e-05 -1.23189377e-05 4.24171652e-06 1.50185413e-05 3.97526019e-06 -2.44944817e-06 -1.43923483e-06 -1.55121859e-05 7.66451791e-06 -1.37254136e-06 -4.04034496e-06 -2.59487525e-05 4.63097951e-06 1.37384971e-05 -3.71252378e-06 1.36057332e-06 3.97526019e-06 9.16402068e-07 -7.25669887e-07 8.23476046e-07 8.87548941e-06 -4.38534891e-06 1.38811004e-07 2.48361371e-06 1.48469003e-05 -5.29585585e-07 -8.42429863e-06 2.12416649e-06 -1.20402711e-07 -2.44944817e-06 -7.25669887e-07 6.33095135e-08 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +IONIC_STEP: 2 +Matrix Dimension of S_async(R): 26 +Matrix number of S_async(R): 93 +-3 0 1 169 + 1.68020213e-06 1.79704594e-05 8.79657498e-06 1.47559147e-06 -5.27848835e-06 -2.94838959e-05 -4.94580962e-06 1.76921587e-05 3.97745272e-06 1.43397143e-06 -5.12960507e-06 -1.41876836e-06 -8.60471433e-07 1.79704594e-05 1.91841444e-04 9.44050684e-05 1.58360855e-05 -5.66488724e-05 -3.15585851e-04 -5.29383072e-05 1.89371004e-04 4.28630375e-05 1.54531997e-05 -5.52792126e-05 -1.52893638e-05 -9.27287434e-06 -8.79657498e-06 -9.44050684e-05 -4.55160276e-05 -7.78956004e-06 2.78648276e-05 1.53323946e-04 2.62243435e-05 -9.38097669e-05 -2.00956761e-05 -7.47593367e-06 2.67429228e-05 7.55087962e-06 4.57954686e-06 -1.47559147e-06 -1.58360855e-05 -7.78956004e-06 -3.86097363e-07 4.67421718e-06 2.62243435e-05 1.38946126e-06 -1.57362260e-05 -3.64092729e-06 -3.51069074e-07 4.57954686e-06 1.42248963e-06 2.10663130e-07 5.27848835e-06 5.66488724e-05 2.78648276e-05 4.67421718e-06 -1.58000465e-05 -9.38097669e-05 -1.57362260e-05 5.32820837e-05 1.30243314e-05 4.57954686e-06 -1.54528283e-05 -3.97345603e-06 -2.59215225e-06 2.94838959e-05 3.15585851e-04 1.53323946e-04 2.62243435e-05 -9.38097669e-05 -5.14546116e-04 -8.79600832e-05 3.14650962e-04 6.81361293e-05 2.53219728e-05 -9.05818049e-05 -2.55591114e-05 -1.55013925e-05 4.94580962e-06 5.29383072e-05 2.62243435e-05 1.38946126e-06 -1.57362260e-05 -8.79600832e-05 -4.93679389e-06 5.27814831e-05 1.23146882e-05 1.28698514e-06 -1.55013925e-05 -4.79846401e-06 -7.72270582e-07 -1.76921587e-05 -1.89371004e-04 -9.38097669e-05 -1.57362260e-05 5.32820837e-05 3.14650962e-04 5.27814831e-05 -1.78991843e-04 -4.40521239e-05 -1.55013925e-05 5.24052080e-05 1.35090175e-05 8.79077117e-06 3.97745272e-06 4.28630375e-05 2.00956761e-05 3.64092729e-06 -1.30243314e-05 -6.81361293e-05 -1.23146882e-05 4.40521239e-05 8.35902368e-06 3.41507701e-06 -1.22164194e-05 -3.65057610e-06 -2.21404460e-06 1.43397143e-06 1.54531997e-05 7.47593367e-06 3.51069074e-07 -4.57954686e-06 -2.53219728e-05 -1.28698514e-06 1.55013925e-05 3.41507701e-06 3.07607183e-07 -4.42724079e-06 -1.40937014e-06 -1.91444880e-07 -5.12960507e-06 -5.52792126e-05 -2.67429228e-05 -4.57954686e-06 1.54528283e-05 9.05818049e-05 1.55013925e-05 -5.24052080e-05 -1.22164194e-05 -4.42724079e-06 1.49071138e-05 3.90726724e-06 2.55515739e-06 -1.41876836e-06 -1.52893638e-05 -7.55087962e-06 -1.42248963e-06 3.97345603e-06 2.55591114e-05 4.79846401e-06 -1.35090175e-05 -3.65057610e-06 -1.40937014e-06 3.90726724e-06 8.85788363e-07 7.50569063e-07 -8.60471433e-07 -9.27287434e-06 -4.57954686e-06 -2.10663130e-07 2.59215225e-06 1.55013925e-05 7.72270582e-07 -8.79077117e-06 -2.21404460e-06 -1.91444880e-07 2.55515739e-06 7.50569063e-07 1.03443981e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 0 2 169 + 2.66142787e-06 2.88592938e-05 1.37004610e-05 7.78266508e-06 -2.73665718e-06 -4.67610013e-05 -2.65629902e-05 9.34047621e-06 6.11669150e-06 7.35094246e-06 -2.58484841e-06 1.82972235e-06 -1.46834544e-06 2.88592938e-05 3.12336818e-04 1.49110519e-04 8.47035170e-05 -2.97847184e-05 -5.07578049e-04 -2.88334090e-04 1.01388348e-04 6.69221508e-05 8.04259754e-05 -2.82805852e-05 2.00188214e-05 -1.60650305e-05 -1.37004610e-05 -1.49110519e-04 -6.95961486e-05 -4.04817100e-05 1.42347848e-05 2.38811397e-04 1.38811095e-04 -4.88108349e-05 -3.02042161e-05 -3.76513127e-05 1.32395181e-05 -9.60507949e-06 7.70804092e-06 -7.78266508e-06 -8.47035170e-05 -4.04817100e-05 -2.13288728e-05 8.08619232e-06 1.38811095e-04 7.33037292e-05 -2.77274159e-05 -1.87811598e-05 -2.02706280e-05 7.70804092e-06 -4.51898123e-06 4.04904329e-06 2.73665718e-06 2.97847184e-05 1.42347848e-05 8.08619232e-06 -1.17627614e-06 -4.88108349e-05 -2.77274159e-05 4.20081784e-06 6.60411250e-06 7.70804092e-06 -1.06046897e-06 2.24818356e-06 -6.02408550e-07 4.67610013e-05 5.07578049e-04 2.38811397e-04 1.38811095e-04 -4.88108349e-05 -8.16430466e-04 -4.74246765e-04 1.66761746e-04 1.04493978e-04 1.30098449e-04 -4.57471637e-05 3.31624017e-05 -2.66127053e-05 2.65629902e-05 2.88334090e-04 1.38811095e-04 7.33037292e-05 -2.77274159e-05 -4.74246765e-04 -2.50975119e-04 9.47304486e-05 6.47836573e-05 7.01690746e-05 -2.66127053e-05 1.57060912e-05 -1.40162219e-05 -9.34047621e-06 -1.01388348e-04 -4.88108349e-05 -2.77274159e-05 4.20081784e-06 1.66761746e-04 9.47304486e-05 -1.48856897e-05 -2.27801992e-05 -2.66127053e-05 3.84427119e-06 -7.72552068e-06 2.18377142e-06 6.11669150e-06 6.69221508e-05 3.02042161e-05 1.87811598e-05 -6.60411250e-06 -1.04493978e-04 -6.47836573e-05 2.27801992e-05 1.22078917e-05 1.69708410e-05 -5.96754111e-06 4.62743732e-06 -3.71350141e-06 7.35094246e-06 8.04259754e-05 3.76513127e-05 2.02706280e-05 -7.70804092e-06 -1.30098449e-04 -7.01690746e-05 2.66127053e-05 1.69708410e-05 1.88979543e-05 -7.21306642e-06 4.30282816e-06 -3.87469038e-06 -2.58484841e-06 -2.82805852e-05 -1.32395181e-05 -7.70804092e-06 1.06046897e-06 4.57471637e-05 2.66127053e-05 -3.84427119e-06 -5.96754111e-06 -7.21306642e-06 9.21382270e-07 -2.17078698e-06 5.42831568e-07 1.82972235e-06 2.00188214e-05 9.60507949e-06 4.51898123e-06 -2.24818356e-06 -3.31624017e-05 -1.57060912e-05 7.72552068e-06 4.62743732e-06 4.30282816e-06 -2.17078698e-06 7.38311070e-07 -1.04631055e-06 -1.46834544e-06 -1.60650305e-05 -7.70804092e-06 -4.04904329e-06 6.02408550e-07 2.66127053e-05 1.40162219e-05 -2.18377142e-06 -3.71350141e-06 -3.87469038e-06 5.42831568e-07 -1.04631055e-06 2.74151682e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 1 0 169 + 1.67040746e-06 1.78624206e-05 5.24561892e-06 1.46731805e-06 -8.75052771e-06 -1.75777090e-05 -4.91688211e-06 2.93224178e-05 -7.60063885e-07 8.55391824e-07 -5.10123203e-06 -4.13519749e-06 -1.42692978e-06 1.78624206e-05 1.90653702e-04 5.62853712e-05 1.57442892e-05 -9.38929624e-05 -1.88110844e-04 -5.26188505e-05 3.13798844e-04 -8.18914084e-06 9.21623071e-06 -5.49621004e-05 -4.45537741e-05 -1.53741405e-05 -5.24561892e-06 -5.62853712e-05 -1.56959014e-05 -4.64606177e-06 2.77073482e-05 5.29173994e-05 1.56375033e-05 -9.32561316e-05 3.06498792e-06 -2.57589943e-06 1.53616861e-05 1.32005509e-05 4.55510513e-06 -1.46731805e-06 -1.57442892e-05 -4.64606177e-06 -3.85975541e-07 7.75037090e-06 1.56375033e-05 1.38794758e-06 -2.60858457e-05 5.89366463e-07 -2.10702238e-07 4.55510513e-06 3.84721041e-06 3.51484888e-07 8.75052771e-06 9.38929624e-05 2.77073482e-05 7.75037090e-06 -4.53066363e-05 -9.32561316e-05 -2.60858457e-05 1.52579863e-04 -3.51475779e-06 4.55510513e-06 -2.66118041e-05 -2.10979403e-05 -7.44392249e-06 1.75777090e-05 1.88110844e-04 5.29173994e-05 1.56375033e-05 -9.32561316e-05 -1.77722414e-04 -5.24374254e-05 3.12716894e-04 -1.03041973e-05 8.73324516e-06 -5.20817580e-05 -4.46706489e-05 -1.54144704e-05 4.91688211e-06 5.26188505e-05 1.56375033e-05 1.38794758e-06 -2.60858457e-05 -5.24374254e-05 -4.92809090e-06 8.74739761e-05 -2.00388657e-06 7.71661783e-07 -1.54144704e-05 -1.30025510e-05 -1.28725474e-06 -2.93224178e-05 -3.13798844e-04 -9.32561316e-05 -2.60858457e-05 1.52579863e-04 3.12716894e-04 8.74739761e-05 -5.11921737e-04 1.19504186e-05 -1.54144704e-05 9.01129596e-05 7.14932354e-05 2.52066295e-05 -7.60063885e-07 -8.18914084e-06 -3.06498792e-06 -5.89366463e-07 3.51475779e-06 1.03041973e-05 2.00388657e-06 -1.19504186e-05 -3.99586945e-07 -4.56556858e-07 2.72273174e-06 1.41664599e-06 4.88841067e-07 8.55391824e-07 9.21623071e-06 2.57589943e-06 2.10702238e-07 -4.55510513e-06 -8.73324516e-06 -7.71661783e-07 1.54144704e-05 -4.56556858e-07 1.03594882e-07 -2.54092234e-06 -2.28180598e-06 -1.91807958e-07 -5.10123203e-06 -5.49621004e-05 -1.53616861e-05 -4.55510513e-06 2.66118041e-05 5.20817580e-05 1.54144704e-05 -9.01129596e-05 2.72273174e-06 -2.54092234e-06 1.48306204e-05 1.24818306e-05 4.40696451e-06 -4.13519749e-06 -4.45537741e-05 -1.32005509e-05 -3.84721041e-06 2.10979403e-05 4.46706489e-05 1.30025510e-05 -7.14932354e-05 1.41664599e-06 -2.28180598e-06 1.24818306e-05 9.62393666e-06 3.64893279e-06 -1.42692978e-06 -1.53741405e-05 -4.55510513e-06 -3.51484888e-07 7.44392249e-06 1.54144704e-05 1.28725474e-06 -2.52066295e-05 4.88841067e-07 -1.91807958e-07 4.40696451e-06 3.64893279e-06 3.08579298e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 1 1 169 + 8.57768566e-05 8.41990614e-04 2.48427046e-04 2.35324440e-04 -2.48582088e-04 -8.36983153e-04 -7.92838764e-04 8.37505510e-04 2.29053933e-06 7.40843478e-05 -7.82580927e-05 -4.06498094e-06 -7.41305834e-05 8.41990614e-04 8.16293541e-03 2.39332587e-03 2.26709644e-03 -2.39481953e-03 -8.03279270e-03 -7.60912500e-03 8.03780592e-03 1.95176894e-05 6.31272850e-04 -6.66837338e-04 -3.46377093e-05 -6.31666824e-04 -2.48427046e-04 -2.39332587e-03 -6.33685904e-04 -7.04258034e-04 7.43934342e-04 2.11421572e-03 2.35921009e-03 -2.49212266e-03 4.32954611e-05 -1.72052334e-04 1.81745375e-04 1.16856650e-05 2.13104361e-04 -2.35324440e-04 -2.26709644e-03 -7.04258034e-04 -5.57329426e-04 7.04697558e-04 2.35921009e-03 1.85842741e-03 -2.36068246e-03 -2.98620206e-05 -1.58541406e-04 2.13104361e-04 5.19884484e-05 1.58640351e-04 2.48582088e-04 2.39481953e-03 7.43934342e-04 7.04697558e-04 -6.34614185e-04 -2.49212266e-03 -2.36068246e-03 2.11732539e-03 3.15443794e-05 2.13104361e-04 -1.81912736e-04 3.15314443e-05 -1.72318246e-04 8.36983153e-04 8.03279270e-03 2.11421572e-03 2.35921009e-03 -2.49212266e-03 -7.04497929e-03 -7.89645526e-03 8.34132372e-03 -1.48471421e-04 5.42920590e-04 -5.73507511e-04 -3.74220438e-05 -6.82443038e-04 7.92838764e-04 7.60912500e-03 2.35921009e-03 1.85842741e-03 -2.36068246e-03 -7.89645526e-03 -6.18883640e-03 7.90138339e-03 1.00282031e-04 4.99204689e-04 -6.82443038e-04 -1.74545125e-04 -4.99516240e-04 -8.37505510e-04 -8.03780592e-03 -2.49212266e-03 -2.36068246e-03 2.11732539e-03 8.34132372e-03 7.90138339e-03 -7.05538759e-03 -1.05931694e-04 -6.82443038e-04 5.74048777e-04 -1.09487806e-04 5.43772143e-04 2.29053933e-06 1.95176894e-05 -4.32954611e-05 2.98620206e-05 -3.15443794e-05 1.48471421e-04 -1.00282031e-04 1.05931694e-04 -2.41677159e-05 -6.98949032e-06 7.38326243e-06 -8.48298003e-07 -1.54698944e-05 7.40843478e-05 6.31272850e-04 1.72052334e-04 1.58541406e-04 -2.13104361e-04 -5.42920590e-04 -4.99204689e-04 6.82443038e-04 -6.98949032e-06 -7.27060136e-06 -3.90008217e-06 -1.38376198e-05 -2.28822006e-06 -7.82580927e-05 -6.66837338e-04 -1.81745375e-04 -2.13104361e-04 1.81912736e-04 5.73507511e-04 6.82443038e-04 -5.74048777e-04 7.38326243e-06 -3.90008217e-06 -6.84287615e-06 -1.27659499e-05 3.91869947e-06 -4.06498094e-06 -3.46377093e-05 -1.16856650e-05 -5.19884484e-05 -3.15314443e-05 3.74220438e-05 1.74545125e-04 1.09487806e-04 -8.48298003e-07 -1.38376198e-05 -1.27659499e-05 -2.32094341e-05 8.76805483e-07 -7.41305834e-05 -6.31666824e-04 -2.13104361e-04 -1.58640351e-04 1.72318246e-04 6.82443038e-04 4.99516240e-04 -5.43772143e-04 -1.54698944e-05 -2.28822006e-06 3.91869947e-06 8.76805483e-07 -7.26774612e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 1 2 169 + 3.94871045e-06 4.32077606e-05 1.20434277e-05 1.94476414e-05 -4.01153259e-06 -4.16140141e-05 -6.71980139e-05 1.38611679e-05 -1.37449783e-06 1.07009451e-05 -2.20732114e-06 8.27228784e-06 -3.56436646e-06 4.32077606e-05 4.72113427e-04 1.32206630e-04 2.13486325e-04 -4.40365665e-05 -4.55922748e-04 -7.36220810e-04 1.51862826e-04 -1.51741934e-05 1.18136389e-04 -2.43684035e-05 9.13244769e-05 -3.93499246e-05 -1.20434277e-05 -1.32206630e-04 -3.44580142e-05 -6.01065369e-05 1.23983843e-05 1.19793072e-04 2.08518529e-04 -4.30118419e-05 6.14988584e-06 -3.08304303e-05 6.35950003e-06 -2.58400981e-05 1.11339911e-05 -1.94476414e-05 -2.13486325e-04 -6.01065369e-05 -9.42951789e-05 2.00208228e-05 2.08518529e-04 3.27377109e-04 -6.94552163e-05 5.43430056e-06 -5.23691755e-05 1.11339911e-05 -3.91303561e-05 1.74435933e-05 4.01153259e-06 4.40365665e-05 1.23983843e-05 2.00208228e-05 -1.36533544e-06 -4.30118419e-05 -6.94552163e-05 4.98963986e-06 -1.12095207e-06 1.11339911e-05 -6.88979274e-07 9.14254730e-06 -1.11255883e-06 4.16140141e-05 4.55922748e-04 1.19793072e-04 2.08518529e-04 -4.30118419e-05 -4.15310618e-04 -7.21441628e-04 1.48814272e-04 -2.13075514e-05 1.08026825e-04 -2.22830686e-05 9.03202781e-05 -3.89172350e-05 6.71980139e-05 7.36220810e-04 2.08518529e-04 3.27377109e-04 -6.94552163e-05 -7.21441628e-04 -1.13351905e-03 2.40304228e-04 -1.91469746e-05 1.83212005e-04 -3.89172350e-05 1.37038000e-04 -6.10258930e-05 -1.38611679e-05 -1.51862826e-04 -4.30118419e-05 -6.94552163e-05 4.98963986e-06 1.48814272e-04 2.40304228e-04 -1.81086280e-05 3.94951302e-06 -3.89172350e-05 2.57144916e-06 -3.19020671e-05 4.15235781e-06 -1.37449783e-06 -1.51741934e-05 -6.14988584e-06 -5.43430056e-06 1.12095207e-06 2.13075514e-05 1.91469746e-05 -3.94951302e-06 -1.55492865e-06 -4.75485994e-06 9.80801488e-07 -1.63767176e-06 7.05640619e-07 1.07009451e-05 1.18136389e-04 3.08304303e-05 5.23691755e-05 -1.11339911e-05 -1.08026825e-04 -1.83212005e-04 3.89172350e-05 -4.75485994e-06 2.68341828e-05 -5.71761474e-06 2.18056205e-05 -9.73749195e-06 -2.20732114e-06 -2.43684035e-05 -6.35950003e-06 -1.11339911e-05 6.88979274e-07 2.22830686e-05 3.89172350e-05 -2.57144916e-06 9.80801488e-07 -5.71761474e-06 2.94961635e-07 -5.12586607e-06 5.51232994e-07 8.27228784e-06 9.13244769e-05 2.58400981e-05 3.91303561e-05 -9.14254730e-06 -9.03202781e-05 -1.37038000e-04 3.19020671e-05 -1.63767176e-06 2.18056205e-05 -5.12586607e-06 1.55290310e-05 -7.77021155e-06 -3.56436646e-06 -3.93499246e-05 -1.11339911e-05 -1.74435933e-05 1.11255883e-06 3.89172350e-05 6.10258930e-05 -4.15235781e-06 7.05640619e-07 -9.73749195e-06 5.51232994e-07 -7.77021155e-06 8.43724235e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 2 0 169 + 2.63503108e-06 2.85652760e-05 2.70535954e-06 7.70810135e-06 -1.35742788e-05 -9.23033468e-06 -2.62990388e-05 4.63136728e-05 -4.60543832e-06 1.45253494e-06 -2.55797288e-06 -4.34810055e-06 -7.28816780e-06 2.85652760e-05 3.09068983e-04 2.94361332e-05 8.38693324e-05 -1.47697293e-04 -1.00164911e-04 -2.85389530e-04 5.02582525e-04 -5.03730829e-05 1.58874482e-05 -2.79784401e-05 -4.75583895e-05 -7.97160781e-05 -2.70535954e-06 -2.94361332e-05 -1.16053378e-06 -7.99596130e-06 1.40812118e-05 4.14342179e-06 2.74083197e-05 -4.82671615e-05 5.19651135e-06 -5.94871449e-07 1.04759272e-06 4.55192766e-06 7.62981725e-06 -7.70810135e-06 -8.38693324e-05 -7.99596130e-06 -2.11362085e-05 4.01201417e-05 2.74083197e-05 7.26154489e-05 -1.37522635e-04 1.32024292e-05 -4.00764433e-06 7.62981725e-06 1.38950915e-05 2.01085589e-05 1.35742788e-05 1.47697293e-04 1.40812118e-05 4.01201417e-05 -6.90073374e-05 -4.82671615e-05 -1.37522635e-04 2.36706689e-04 -2.32500127e-05 7.62981725e-06 -1.31114996e-05 -2.12092371e-05 -3.73572410e-05 9.23033468e-06 1.00164911e-04 4.14342179e-06 2.74083197e-05 -4.82671615e-05 -1.46775064e-05 -9.36059416e-05 1.64843856e-04 -1.78930078e-05 2.15575124e-06 -3.79636528e-06 -1.57099826e-05 -2.63326453e-05 2.62990388e-05 2.85389530e-04 2.74083197e-05 7.26154489e-05 -1.37522635e-04 -9.36059416e-05 -2.48525792e-04 4.69672564e-04 -4.56245801e-05 1.38675469e-05 -2.63326453e-05 -4.78531861e-05 -6.95811205e-05 -4.63136728e-05 -5.02582525e-04 -4.82671615e-05 -1.37522635e-04 2.36706689e-04 1.64843856e-04 4.69672564e-04 -8.08936470e-04 8.03467343e-05 -2.63326453e-05 4.52875121e-05 7.33798707e-05 1.29033028e-04 -4.60543832e-06 -5.03730829e-05 -5.19651135e-06 -1.32024292e-05 2.32500127e-05 1.78930078e-05 4.56245801e-05 -8.03467343e-05 7.56918948e-06 -2.73747313e-06 4.82080109e-06 7.23910413e-06 1.21339893e-05 1.45253494e-06 1.58874482e-05 5.94871449e-07 4.00764433e-06 -7.62981725e-06 -2.15575124e-06 -1.38675469e-05 2.63326453e-05 -2.73747313e-06 2.71133710e-07 -5.36788055e-07 -2.66833755e-06 -3.83922168e-06 -2.55797288e-06 -2.79784401e-05 -1.04759272e-06 -7.62981725e-06 1.31114996e-05 3.79636528e-06 2.63326453e-05 -4.52875121e-05 4.82080109e-06 -5.36788055e-07 9.11626218e-07 4.05003892e-06 7.14822346e-06 -4.34810055e-06 -4.75583895e-05 -4.55192766e-06 -1.38950915e-05 2.12092371e-05 1.57099826e-05 4.78531861e-05 -7.33798707e-05 7.23910413e-06 -2.66833755e-06 4.05003892e-06 5.31370153e-06 1.24639382e-05 -7.28816780e-06 -7.97160781e-05 -7.62981725e-06 -2.01085589e-05 3.73572410e-05 2.63326453e-05 6.95811205e-05 -1.29033028e-04 1.21339893e-05 -3.83922168e-06 7.14822346e-06 1.24639382e-05 1.87694649e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-3 2 1 169 + 3.93137622e-06 4.30147049e-05 3.98691170e-06 1.93645635e-05 -1.19994638e-05 -1.37745286e-05 -6.69033461e-05 4.14573911e-05 -6.45530137e-06 3.54372306e-06 -2.19590680e-06 5.30146504e-06 -1.06655928e-05 4.30147049e-05 4.69962951e-04 4.37632686e-05 2.12559660e-04 -1.31714921e-04 -1.50901407e-04 -7.32933180e-04 4.54170072e-04 -7.12603879e-05 3.91193324e-05 -2.42407227e-05 5.85231322e-05 -1.17738001e-04 -3.98691170e-06 -4.37632686e-05 -1.34810769e-06 -1.98995693e-05 1.23309860e-05 4.92841635e-06 6.90275021e-05 -4.27736476e-05 7.31824678e-06 -1.09830174e-06 6.80574698e-07 -5.50601590e-06 1.10771123e-05 -1.93645635e-05 -2.12559660e-04 -1.98995693e-05 -9.39039190e-05 5.98920116e-05 6.90275021e-05 3.25985439e-04 -2.07753037e-04 3.10725514e-05 -1.73444543e-05 1.10771123e-05 -2.41607517e-05 5.22018463e-05 1.19994638e-05 1.31714921e-04 1.23309860e-05 5.98920116e-05 -3.43637861e-05 -4.27736476e-05 -2.07753037e-04 1.19452996e-04 -1.92544468e-05 1.10771123e-05 -6.33242248e-06 1.81715916e-05 -3.07567878e-05 1.37745286e-05 1.50901407e-04 4.92841635e-06 6.90275021e-05 -4.27736476e-05 -1.78910138e-05 -2.38796332e-04 1.47972762e-04 -2.55147211e-05 4.10116117e-06 -2.54132943e-06 1.92434368e-05 -3.87143288e-05 6.69033461e-05 7.32933180e-04 6.90275021e-05 3.25985439e-04 -2.07753037e-04 -2.38796332e-04 -1.12856773e-03 7.18708658e-04 -1.08749686e-04 6.06726568e-05 -3.87143288e-05 8.47040518e-05 -1.82607343e-04 -4.14573911e-05 -4.54170072e-04 -4.27736476e-05 -2.07753037e-04 1.19452996e-04 1.47972762e-04 7.18708658e-04 -4.14081646e-04 6.73879341e-05 -3.87143288e-05 2.21857833e-05 -6.33466876e-05 1.07757092e-04 -6.45530137e-06 -7.12603879e-05 -7.31824678e-06 -3.10725514e-05 1.92544468e-05 2.55147211e-05 1.08749686e-04 -6.73879341e-05 9.82079520e-06 -6.34537097e-06 3.93197861e-06 -8.18820356e-06 1.64731908e-05 3.54372306e-06 3.91193324e-05 1.09830174e-06 1.73444543e-05 -1.10771123e-05 -4.10116117e-06 -6.06726568e-05 3.87143288e-05 -6.34537097e-06 8.32578561e-07 -5.44340934e-07 4.46899670e-06 -9.69172218e-06 -2.19590680e-06 -2.42407227e-05 -6.80574698e-07 -1.10771123e-05 6.33242248e-06 2.54132943e-06 3.87143288e-05 -2.21857833e-05 3.93197861e-06 -5.44340934e-07 2.91435750e-07 -3.39322013e-06 5.69543604e-06 5.30146504e-06 5.85231322e-05 5.50601590e-06 2.41607517e-05 -1.81715916e-05 -1.92434368e-05 -8.47040518e-05 6.33466876e-05 -8.18820356e-06 4.46899670e-06 -3.39322013e-06 4.11234768e-06 -1.49656927e-05 -1.06655928e-05 -1.17738001e-04 -1.10771123e-05 -5.22018463e-05 3.07567878e-05 3.87143288e-05 1.82607343e-04 -1.07757092e-04 1.64731908e-05 -9.69172218e-06 5.69543604e-06 -1.49656927e-05 2.67817429e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 -1 1 169 + 5.46238784e-05 5.55731924e-04 2.65655619e-04 -6.17825591e-05 -5.30645179e-05 -9.08538817e-04 2.11295562e-04 1.81479972e-04 8.82636592e-05 -3.73072772e-05 -3.20429051e-05 1.13793518e-06 7.45210165e-06 5.55731924e-04 5.62590488e-03 2.67039496e-03 -6.21044024e-04 -5.33409463e-04 -9.13048702e-03 2.12344409e-03 1.82380818e-03 8.34032707e-04 -3.52528885e-04 -3.02784080e-04 1.07527285e-05 7.04173900e-05 -2.65655619e-04 -2.67039496e-03 -1.26728728e-03 3.10204618e-04 2.66432125e-04 4.31785735e-03 -1.05773821e-03 -9.08482410e-04 -3.82608687e-04 1.74072610e-04 1.49509494e-04 -5.65243454e-06 -3.70166222e-05 6.17825591e-05 6.21044024e-04 3.10204618e-04 -5.59770587e-06 -6.19631482e-05 -1.05773821e-03 1.57380451e-05 2.11282443e-04 1.08455034e-04 5.24426253e-06 -3.70166222e-05 -9.92824866e-06 -1.04753765e-06 5.30645179e-05 5.33409463e-04 2.66432125e-04 -6.19631482e-05 1.33258273e-05 -9.08482410e-04 2.11282443e-04 -4.87875712e-05 9.31511125e-05 -3.70166222e-05 1.65491316e-05 1.07854283e-05 -3.84877123e-06 9.08538817e-04 9.13048702e-03 4.31785735e-03 -1.05773821e-03 -9.08482410e-04 -1.47221012e-02 3.60934185e-03 3.10003321e-03 1.27629834e-03 -5.82178463e-04 -5.00028161e-04 1.89432904e-05 1.24055683e-04 -2.11295562e-04 -2.12344409e-03 -1.05773821e-03 1.57380451e-05 2.11282443e-04 3.60934185e-03 -4.18909996e-05 -7.20963426e-04 -3.64163618e-04 -2.27347526e-05 1.24055683e-04 3.44729435e-05 4.54125041e-06 -1.81479972e-04 -1.82380818e-03 -9.08482410e-04 2.11282443e-04 -4.87875712e-05 3.10003321e-03 -7.20963426e-04 1.78291087e-04 -3.12777054e-04 1.24055683e-04 -6.06213335e-05 -3.71763370e-05 1.40984826e-05 8.82636592e-05 8.34032707e-04 3.82608687e-04 -1.08455034e-04 -9.31511125e-05 -1.27629834e-03 3.64163618e-04 3.12777054e-04 5.29450630e-05 -3.56876375e-05 -3.06518102e-05 1.47927228e-06 9.68744753e-06 -3.73072772e-05 -3.52528885e-04 -1.74072610e-04 -5.24426253e-06 3.70166222e-05 5.82178463e-04 2.27347526e-05 -1.24055683e-04 -3.56876375e-05 -1.48230071e-05 1.30287548e-05 6.88093296e-06 2.97880140e-06 -3.20429051e-05 -3.02784080e-04 -1.49509494e-04 3.70166222e-05 -1.65491316e-05 5.00028161e-04 -1.24055683e-04 6.06213335e-05 -3.06518102e-05 1.30287548e-05 -1.88019862e-05 -6.79489752e-06 4.49850014e-06 1.13793518e-06 1.07527285e-05 5.65243454e-06 9.92824866e-06 -1.07854283e-05 -1.89432904e-05 -3.44729435e-05 3.71763370e-05 1.47927228e-06 6.88093296e-06 -6.79489752e-06 -1.16348685e-06 1.02901584e-07 7.45210165e-06 7.04173900e-05 3.70166222e-05 1.04753765e-06 3.84877123e-06 -1.24055683e-04 -4.54125041e-06 -1.40984826e-05 9.68744753e-06 2.97880140e-06 4.49850014e-06 1.02901584e-07 -5.05318773e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 -1 2 169 + 6.84702008e-05 6.84744258e-04 3.31840575e-04 5.56649743e-05 6.65550125e-05 -1.12689524e-03 -1.89032323e-04 -2.26013733e-04 1.04514564e-04 3.14408846e-05 3.75918339e-05 -1.13272607e-06 6.30588490e-06 6.84744258e-04 6.79164985e-03 3.26891143e-03 5.48347264e-04 6.55623386e-04 -1.10810958e-02 -1.85881101e-03 -2.22246020e-03 9.43126427e-04 2.83718631e-04 3.39224032e-04 -1.02215791e-05 5.69035208e-05 -3.31840575e-04 -3.26891143e-03 -1.57561988e-03 -2.78673485e-04 -3.33191876e-04 5.32289812e-03 9.42408354e-04 1.12677677e-03 -4.42708517e-04 -1.43832812e-04 -1.71971598e-04 5.54034224e-06 -3.08430798e-05 -5.56649743e-05 -5.48347264e-04 -2.78673485e-04 3.89148080e-05 -5.58916500e-05 9.42408354e-04 -1.37079468e-04 1.89012449e-04 -9.14957253e-05 3.35165948e-05 -3.08430798e-05 1.08788955e-05 6.72219600e-06 -6.65550125e-05 -6.55623386e-04 -3.33191876e-04 -5.58916500e-05 1.88351745e-05 1.12677677e-03 1.89012449e-04 -6.91748580e-05 -1.09395526e-04 -3.08430798e-05 2.24359103e-05 -1.07848146e-05 3.76353727e-06 1.12689524e-03 1.10810958e-02 5.32289812e-03 9.42408354e-04 1.12677677e-03 -1.79817595e-02 -3.18713765e-03 -3.81065452e-03 1.44478763e-03 4.71200375e-04 5.63383838e-04 -1.82063719e-05 1.01354854e-04 1.89032323e-04 1.85881101e-03 9.42408354e-04 -1.37079468e-04 1.89012449e-04 -3.18713765e-03 4.83378241e-04 -6.39222572e-04 3.01508446e-04 -1.18815441e-04 1.01354854e-04 -3.72048380e-05 -2.38300068e-05 2.26013733e-04 2.22246020e-03 1.12677677e-03 1.89012449e-04 -6.91748580e-05 -3.81065452e-03 -6.39222572e-04 2.53731147e-04 3.60494164e-04 1.01354854e-04 -8.24026971e-05 3.71803635e-05 -1.38227341e-05 1.04514564e-04 9.43126427e-04 4.42708517e-04 9.14957253e-05 1.09395526e-04 -1.44478763e-03 -3.01508446e-04 -3.60494164e-04 3.22685180e-05 2.00641382e-05 2.39893934e-05 -1.09400414e-06 6.09031999e-06 3.14408846e-05 2.83718631e-04 1.43832812e-04 -3.35165948e-05 3.08430798e-05 -4.71200375e-04 1.18815441e-04 -1.01354854e-04 2.00641382e-05 -2.71447379e-05 7.25889567e-06 -6.20250478e-06 -5.69368044e-06 3.75918339e-05 3.39224032e-04 1.71971598e-04 3.08430798e-05 -2.24359103e-05 -5.63383838e-04 -1.01354854e-04 8.24026971e-05 2.39893934e-05 7.25889567e-06 -2.45369071e-05 6.80694440e-06 -4.25271016e-06 -1.13272607e-06 -1.02215791e-05 -5.54034224e-06 -1.08788955e-05 1.07848146e-05 1.82063719e-05 3.72048380e-05 -3.71803635e-05 -1.09400414e-06 -6.20250478e-06 6.80694440e-06 -1.73397737e-07 -5.10778372e-08 6.30588490e-06 5.69035208e-05 3.08430798e-05 -6.72219600e-06 -3.76353727e-06 -1.01354854e-04 2.38300068e-05 1.38227341e-05 6.09031999e-06 -5.69368044e-06 -4.25271016e-06 -5.10778372e-08 1.01777421e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 0 0 507 + 8.16644387e-06 8.96960839e-05 3.27387890e-05 1.60311706e-08 -3.27540937e-05 -1.14418655e-04 -5.60272701e-08 1.14472143e-04 6.48218452e-06 1.10057862e-08 -2.24864773e-05 -1.12484919e-05 -1.10109312e-08 8.96960839e-05 9.85861294e-04 3.59851191e-04 1.76207978e-07 -3.60019413e-04 -1.25838511e-03 -6.16192197e-07 1.25897338e-03 7.14997122e-05 1.21395888e-07 -2.48030066e-04 -1.24072977e-04 -1.21452638e-07 -3.27387890e-05 -3.59851191e-04 -1.26923207e-04 -6.55357811e-08 1.33899462e-04 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -2.09430578e-05 -4.30900857e-08 8.80395289e-05 4.66031270e-05 4.56188997e-08 -1.60311706e-08 -1.76207978e-07 -6.55357811e-08 6.91365691e-06 6.55664176e-08 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -1.45982806e-08 5.12077974e-06 4.56188997e-08 2.53276054e-08 -5.12317359e-06 3.27540937e-05 3.60019413e-04 1.33899462e-04 6.55664176e-08 -1.27048368e-04 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 2.98264839e-05 4.56188997e-08 -8.80854743e-05 -4.15017171e-05 -4.31327274e-08 1.14418655e-04 1.25838511e-03 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -1.55917305e-03 -8.03626587e-07 1.64193004e-03 7.42296114e-05 1.52133886e-07 -3.10832420e-04 -1.64370629e-04 -1.60899230e-07 5.60272701e-08 6.16192197e-07 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -8.03626587e-07 8.19893849e-05 8.04002265e-07 5.13997441e-08 -1.77469351e-05 -1.60899230e-07 -8.91773670e-08 1.77552314e-05 -1.14472143e-04 -1.25897338e-03 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 1.64193004e-03 8.04002265e-07 -1.56070783e-03 -1.05017411e-04 -1.60899230e-07 3.10994324e-04 1.46692159e-04 1.52284284e-07 6.48218452e-06 7.14997122e-05 2.09430578e-05 1.45982806e-08 -2.98264839e-05 -7.42296114e-05 -5.13997441e-08 1.05017411e-04 -8.27477510e-07 8.02079735e-09 -1.63876959e-05 -1.15038314e-05 -1.12608781e-08 1.10057862e-08 1.21395888e-07 4.30900857e-08 -5.12077974e-06 -4.56188997e-08 -1.52133886e-07 1.77469351e-05 1.60899230e-07 8.02079735e-09 -3.64273931e-06 -2.96958683e-08 -1.76571801e-08 3.81582059e-06 -2.24864773e-05 -2.48030066e-04 -8.80395289e-05 -4.56188997e-08 8.80854743e-05 3.10832420e-04 1.60899230e-07 -3.10994324e-04 -1.63876959e-05 -2.96958683e-08 5.70303735e-05 2.84446038e-05 2.97114970e-08 -1.12484919e-05 -1.24072977e-04 -4.66031270e-05 -2.53276054e-08 4.15017171e-05 1.64370629e-04 8.91773670e-08 -1.46692159e-04 -1.15038314e-05 -1.76571801e-08 2.84446038e-05 1.24914350e-05 1.57969378e-08 -1.10109312e-08 -1.21452638e-07 -4.56188997e-08 5.12317359e-06 4.31327274e-08 1.60899230e-07 -1.77552314e-05 -1.52284284e-07 -1.12608781e-08 3.81582059e-06 2.97114970e-08 1.57969378e-08 -3.64630610e-06 8.13218304e-04 6.23184515e-03 2.27628656e-03 -8.82772549e-04 -2.27770718e-03 -6.85520397e-03 2.65853429e-03 6.85948226e-03 4.83816740e-05 -7.66155436e-05 -1.97681468e-04 -8.40461845e-05 7.66633589e-05 8.26784870e-06 9.08005784e-05 3.31402035e-05 -1.62265978e-08 -3.31247122e-05 -1.15831465e-04 5.67151192e-08 1.15777320e-04 6.56541801e-06 -1.11255035e-08 -2.27114216e-05 -1.13503999e-05 1.11203030e-08 6.23184515e-03 4.19707653e-02 1.57754805e-02 -6.11792970e-03 -1.57853259e-02 -4.42603329e-02 1.71647136e-02 4.42879555e-02 -3.79416821e-04 6.00831339e-04 1.55024967e-03 6.59103613e-04 -6.01206315e-04 9.08005784e-05 9.97937040e-04 3.64208022e-04 -1.78328932e-07 -3.64037775e-04 -1.27378273e-03 6.23688385e-07 1.27318730e-03 7.24010828e-05 -1.22688076e-07 -2.50453438e-04 -1.25168152e-04 1.22630726e-07 -2.27628656e-03 -1.57754805e-02 -5.34418710e-03 2.49968112e-03 6.44961337e-03 1.51333674e-02 -7.18895392e-03 -1.85487552e-02 1.81970643e-04 -9.83022381e-05 -2.53636923e-04 -5.17735002e-05 4.72255874e-05 -3.31402035e-05 -3.64208022e-04 -1.28449169e-04 6.63308026e-08 1.35406619e-04 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -2.12005244e-05 4.35479613e-08 8.88980985e-05 4.70236432e-05 -4.60703732e-08 8.82772549e-04 6.11792970e-03 2.49968112e-03 1.31995840e-04 -2.50124116e-03 -7.18895392e-03 -6.15852202e-04 7.19344051e-03 1.79478680e-05 1.50083678e-04 4.72255874e-05 -3.10276912e-05 -1.50177345e-04 1.62265978e-08 1.78328932e-07 6.63308026e-08 7.02074294e-06 -6.62997966e-08 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 1.47867785e-08 5.19559917e-06 -4.60703732e-08 -2.55683707e-08 -5.19317051e-06 2.27770718e-03 1.57853259e-02 6.44961337e-03 -2.50124116e-03 -5.35223493e-03 -1.85487552e-02 7.19344051e-03 1.51565125e-02 4.63086306e-05 4.72255874e-05 2.53630679e-04 1.83668480e-04 -9.83611662e-05 3.31247122e-05 3.64037775e-04 1.35406619e-04 -6.62997966e-08 -1.28322549e-04 -4.74187979e-04 2.32178949e-07 4.49766695e-04 3.01854886e-05 -4.60703732e-08 -8.88516872e-05 -4.18084691e-05 4.35048805e-08 6.85520397e-03 4.42603329e-02 1.51333674e-02 -7.18895392e-03 -1.85487552e-02 -4.09230602e-02 1.98927024e-02 5.13266426e-02 -8.13301097e-04 9.46753191e-04 2.44278840e-03 9.37835283e-04 -8.55453503e-04 1.15831465e-04 1.27378273e-03 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -1.57814407e-03 8.13502356e-07 1.66067045e-03 7.51422849e-05 -1.53756556e-07 -3.13876127e-04 -1.65861691e-04 1.62499319e-07 -2.65853429e-03 -1.71647136e-02 -7.18895392e-03 -6.15852202e-04 7.19344051e-03 1.98927024e-02 2.65692953e-03 -1.99051173e-02 1.56348555e-04 -5.68346701e-04 -8.55453503e-04 -2.71871075e-04 5.68701403e-04 -5.67151192e-08 -6.23688385e-07 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 8.13502356e-07 8.33026208e-05 -8.13122088e-07 -5.20668178e-08 -1.80108098e-05 1.62499319e-07 9.00304191e-08 1.80023907e-05 -6.85948226e-03 -4.42879555e-02 -1.85487552e-02 7.19344051e-03 1.51565125e-02 5.13266426e-02 -1.99051173e-02 -4.09871056e-02 4.03406546e-04 -8.55453503e-04 -2.44401727e-03 -1.17536636e-03 9.47820626e-04 -1.15777320e-04 -1.27318730e-03 -4.74187979e-04 2.32178949e-07 4.49766695e-04 1.66067045e-03 -8.13122088e-07 -1.57659116e-03 -1.06288353e-04 1.62499319e-07 3.13712572e-04 1.47781689e-04 -1.53604601e-07 4.83816740e-05 -3.79416821e-04 -1.81970643e-04 -1.79478680e-05 -4.63086306e-05 8.13301097e-04 -1.56348555e-04 -4.03406546e-04 1.58605468e-04 1.10903694e-04 2.86150877e-04 2.31482344e-04 -2.11148360e-04 6.56541801e-06 7.24010828e-05 2.12005244e-05 -1.47867785e-08 -3.01854886e-05 -7.51422849e-05 5.20668178e-08 1.06288353e-04 -8.38745046e-07 -8.10711403e-09 -1.65497304e-05 -1.16159774e-05 1.13804966e-08 -7.66155436e-05 6.00831339e-04 9.83022381e-05 -1.50083678e-04 -4.72255874e-05 -9.46753191e-04 5.68346701e-04 8.55453503e-04 1.10903694e-04 -6.32348218e-05 -5.31651989e-04 -3.08426898e-04 7.94762484e-05 -1.11255035e-08 -1.22688076e-07 -4.35479613e-08 -5.19559917e-06 4.60703732e-08 1.53756556e-07 1.80108098e-05 -1.62499319e-07 -8.10711403e-09 -3.69169936e-06 2.99330769e-08 1.77980956e-08 3.86424439e-06 -1.97681468e-04 1.55024967e-03 2.53636923e-04 -4.72255874e-05 -2.53630679e-04 -2.44278840e-03 8.55453503e-04 2.44401727e-03 2.86150877e-04 -5.31651989e-04 -1.22893697e-03 -4.97525740e-04 5.32055958e-04 -2.27114216e-05 -2.50453438e-04 -8.88980985e-05 4.60703732e-08 8.88516872e-05 3.13876127e-04 -1.62499319e-07 -3.13712572e-04 -1.65497304e-05 2.99330769e-08 5.74131813e-05 2.86042224e-05 -2.99173155e-08 -8.40461845e-05 6.59103613e-04 5.17735002e-05 3.10276912e-05 -1.83668480e-04 -9.37835283e-04 2.71871075e-04 1.17536636e-03 2.31482344e-04 -3.08426898e-04 -4.97525740e-04 -1.09514280e-04 2.50783062e-04 -1.13503999e-05 -1.25168152e-04 -4.70236432e-05 2.55683707e-08 4.18084691e-05 1.65861691e-04 -9.00304191e-08 -1.47781689e-04 -1.16159774e-05 1.77980956e-08 2.86042224e-05 1.25385472e-05 -1.58976997e-08 7.66633589e-05 -6.01206315e-04 -4.72255874e-05 1.50177345e-04 9.83611662e-05 8.55453503e-04 -5.68701403e-04 -9.47820626e-04 -2.11148360e-04 7.94762484e-05 5.32055958e-04 2.50783062e-04 -6.33339923e-05 1.11203030e-08 1.22630726e-07 4.60703732e-08 5.19317051e-06 -4.35048805e-08 -1.62499319e-07 -1.80023907e-05 1.53604601e-07 1.13804966e-08 3.86424439e-06 -2.99173155e-08 -1.58976997e-08 -3.68808587e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +-2 0 1 507 + 1.69565517e-04 1.56053224e-03 6.48479832e-04 3.24568776e-04 -3.24531747e-04 -2.12361003e-03 -1.06288195e-03 1.06276069e-03 9.01314392e-05 1.04246931e-04 -1.04235037e-04 5.95242619e-09 -5.21703789e-05 1.56053224e-03 1.39128426e-02 5.76912170e-03 2.88748651e-03 -2.88715708e-03 -1.86343382e-02 -9.32661905e-03 9.32555499e-03 5.74071199e-04 6.63976534e-04 -6.63900782e-04 3.79125915e-08 -3.32287071e-04 -6.48479832e-04 -5.76912170e-03 -2.33153957e-03 -1.28082856e-03 1.28068243e-03 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -1.96173742e-04 -3.08000907e-04 3.07965767e-04 -2.03623990e-08 1.78467408e-04 -3.24568776e-04 -2.88748651e-03 -1.28082856e-03 -4.13541800e-04 6.40990681e-04 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.82386438e-04 -8.13604017e-05 1.78467408e-04 4.86027490e-05 4.07168149e-05 3.24531747e-04 2.88715708e-03 1.28068243e-03 6.40990681e-04 -4.13395531e-04 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.82365630e-04 1.78467408e-04 -8.13196769e-05 4.86175846e-05 -4.07010777e-05 2.12361003e-03 1.86343382e-02 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -2.40561655e-02 -1.33214770e-02 1.33199571e-02 4.90535867e-04 8.30029912e-04 -8.29935214e-04 5.63839373e-08 -4.94180235e-04 1.06288195e-03 9.32661905e-03 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.33214770e-02 -4.10770096e-03 6.66673345e-03 5.18213874e-04 1.79672091e-04 -4.94180235e-04 -1.57413568e-04 -8.99169018e-05 -1.06276069e-03 -9.32555499e-03 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.33199571e-02 6.66673345e-03 -4.10617966e-03 -5.18154752e-04 -4.94180235e-04 1.79559323e-04 -1.57452044e-04 8.98707205e-05 9.01314392e-05 5.74071199e-04 1.96173742e-04 1.82386438e-04 -1.82365630e-04 -4.90535867e-04 -5.18213874e-04 5.18154752e-04 -8.38723793e-05 -7.52905161e-05 7.52819262e-05 -3.39022091e-09 2.97137846e-05 1.04246931e-04 6.63976534e-04 3.08000907e-04 8.13604017e-05 -1.78467408e-04 -8.30029912e-04 -1.79672091e-04 4.94180235e-04 -7.52905161e-05 -9.97224729e-05 8.55349841e-05 -9.19395180e-06 4.96974181e-05 -1.04235037e-04 -6.63900782e-04 -3.07965767e-04 -1.78467408e-04 8.13196769e-05 8.29935214e-04 4.94180235e-04 -1.79559323e-04 7.52819262e-05 8.55349841e-05 -9.97029545e-05 -9.18366007e-06 -4.96938449e-05 5.95242619e-09 3.79125915e-08 2.03623990e-08 -4.86027490e-05 -4.86175846e-05 -5.63839373e-08 1.57413568e-04 1.57452044e-04 -3.39022091e-09 -9.19395180e-06 -9.18366007e-06 -5.01529191e-06 2.31304312e-09 -5.21703789e-05 -3.32287071e-04 -1.78467408e-04 -4.07168149e-05 4.07010777e-05 4.94180235e-04 8.99169018e-05 -8.98707205e-05 2.97137846e-05 4.96974181e-05 -4.96938449e-05 2.31304312e-09 -2.52880900e-05 1.56636817e-02 7.40229425e-02 4.27711333e-02 1.19640517e-02 -1.42465915e-02 -1.03452337e-01 -2.89379546e-02 3.44588295e-02 -4.84926548e-03 -2.59490782e-03 3.08997258e-03 1.51690694e-04 8.64335101e-04 1.71125195e-04 1.57340803e-03 6.54391095e-04 3.26863713e-04 -3.26901077e-04 -2.14206805e-03 -1.06994780e-03 1.07007011e-03 9.06971384e-05 1.04555142e-04 -1.04567094e-04 -5.97028977e-09 -5.22305220e-05 7.40229425e-02 1.66251562e-01 1.31532582e-01 3.67926330e-02 -4.38120484e-02 -1.83839036e-01 -5.14239293e-02 6.12347499e-02 -4.36012777e-02 -2.33316359e-02 2.77829195e-02 1.36389894e-03 7.77150990e-03 1.57340803e-03 1.40097483e-02 5.81479070e-03 2.90444673e-03 -2.90477875e-03 -1.87705742e-02 -9.37576874e-03 9.37684052e-03 5.74307103e-04 6.62057940e-04 -6.62133622e-04 -3.78047189e-08 -3.30731050e-04 -4.27711333e-02 -1.31532582e-01 -8.86841338e-02 -2.99279431e-02 3.56376911e-02 1.63077642e-01 5.72094649e-02 -6.81240684e-02 2.16237958e-02 1.36312740e-02 -1.62318917e-02 -8.96456045e-04 -5.10801557e-03 -6.54391095e-04 -5.81479070e-03 -2.35234431e-03 -1.28971937e-03 1.28986680e-03 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -1.96680176e-04 -3.08018123e-04 3.08053333e-04 2.03762001e-08 1.78259282e-04 -1.19640517e-02 -3.67926330e-02 -2.99279431e-02 9.93586168e-03 9.96866689e-03 5.72094649e-02 -2.54417348e-02 -1.90558401e-02 9.00010657e-03 -1.80218090e-03 -5.10801557e-03 -1.95477519e-03 6.00286528e-04 -3.26863713e-04 -2.90444673e-03 -1.28971937e-03 -4.14492578e-04 6.44279323e-04 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.82801830e-04 -8.04965969e-05 1.78259282e-04 4.88317689e-05 4.02120757e-05 1.42465915e-02 4.38120484e-02 3.56376911e-02 9.96866689e-03 6.43686229e-03 -6.81240684e-02 -1.90558401e-02 -1.87531400e-02 -1.07171755e-02 -5.10801557e-03 -9.26880819e-06 -1.73051422e-03 -2.59269494e-06 3.26901077e-04 2.90477875e-03 1.28986680e-03 6.44279323e-04 -4.14639869e-04 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.82822726e-04 1.78259282e-04 -8.05373493e-05 4.88169931e-05 -4.02278350e-05 1.03452337e-01 1.83839036e-01 1.63077642e-01 5.72094649e-02 -6.81240684e-02 -1.79448338e-01 -7.20164250e-02 8.57559473e-02 -5.80315077e-02 -3.87781055e-02 4.61763157e-02 2.64036605e-03 1.50448323e-02 2.14206805e-03 1.87705742e-02 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -2.42413527e-02 -1.33983586e-02 1.33998902e-02 4.89218183e-04 8.26988668e-04 -8.27083203e-04 -5.62431431e-08 -4.92037880e-04 2.89379546e-02 5.14239293e-02 5.72094649e-02 -2.54417348e-02 -1.90558401e-02 -7.20164250e-02 5.78636443e-02 2.39878748e-02 -2.72996742e-02 1.02078994e-02 1.50448323e-02 7.12807723e-03 -3.40013841e-03 1.06994780e-03 9.37576874e-03 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.33983586e-02 -4.10981645e-03 6.69315015e-03 5.17979214e-04 1.75713806e-04 -4.92037880e-04 -1.58001634e-04 -8.77778333e-05 -3.44588295e-02 -6.12347499e-02 -6.81240684e-02 -1.90558401e-02 -1.87531400e-02 8.57559473e-02 2.39878748e-02 4.94439067e-02 3.25079927e-02 1.50448323e-02 4.92716732e-03 6.72904099e-03 1.37823995e-03 -1.07007011e-03 -9.37684052e-03 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.33998902e-02 6.69315015e-03 -4.11134659e-03 -5.18038425e-04 -4.92037880e-04 1.75826292e-04 -1.57963503e-04 8.78239864e-05 -4.84926548e-03 -4.36012777e-02 -2.16237958e-02 -9.00010657e-03 1.07171755e-02 5.80315077e-02 2.72996742e-02 -3.25079927e-02 8.42958736e-03 3.73921296e-03 -4.45259189e-03 -1.66145016e-04 -9.46695976e-04 9.06971384e-05 5.74307103e-04 1.96680176e-04 1.82801830e-04 -1.82822726e-04 -4.89218183e-04 -5.17979214e-04 5.18038425e-04 -8.52265465e-05 -7.70397886e-05 7.70485953e-05 3.50576416e-09 3.06698501e-05 -2.59490782e-03 -2.33316359e-02 -1.36312740e-02 1.80218090e-03 5.10801557e-03 3.87781055e-02 -1.02078994e-02 -1.50448323e-02 3.73921296e-03 3.25250977e-03 -2.36461866e-03 4.10293537e-04 -1.22989747e-03 1.04555142e-04 6.62057940e-04 3.08018123e-04 8.04965969e-05 -1.78259282e-04 -8.26988668e-04 -1.75713806e-04 4.92037880e-04 -7.70397886e-05 -1.01196560e-04 8.73209439e-05 -9.02782116e-06 5.03959572e-05 3.08997258e-03 2.77829195e-02 1.62318917e-02 5.10801557e-03 9.26880819e-06 -4.61763157e-02 -1.50448323e-02 -4.92716732e-03 -4.45259189e-03 -2.36461866e-03 4.08249028e-03 7.44859222e-04 1.24807445e-03 -1.04567094e-04 -6.62133622e-04 -3.08053333e-04 -1.78259282e-04 8.05373493e-05 8.27083203e-04 4.92037880e-04 -1.75826292e-04 7.70485953e-05 8.73209439e-05 -1.01216522e-04 -9.03831022e-06 -5.03996529e-05 1.51690694e-04 1.36389894e-03 8.96456045e-04 1.95477519e-03 1.73051422e-03 -2.64036605e-03 -7.12807723e-03 -6.72904099e-03 -1.66145016e-04 4.10293537e-04 7.44859222e-04 -2.28178138e-04 3.58448514e-05 -5.97028977e-09 -3.78047189e-08 -2.03762001e-08 -4.88317689e-05 -4.88169931e-05 5.62431431e-08 1.58001634e-04 1.57963503e-04 3.50576416e-09 -9.02782116e-06 -9.03831022e-06 -4.82657881e-06 -2.36186727e-09 8.64335101e-04 7.77150990e-03 5.10801557e-03 -6.00286528e-04 2.59269494e-06 -1.50448323e-02 3.40013841e-03 -1.37823995e-03 -9.46695976e-04 -1.22989747e-03 1.24807445e-03 3.58448514e-05 -3.02245805e-05 -5.22305220e-05 -3.30731050e-04 -1.78259282e-04 -4.02120757e-05 4.02278350e-05 4.92037880e-04 8.77778333e-05 -8.78239864e-05 3.06698501e-05 5.03959572e-05 -5.03996529e-05 -2.36186727e-09 -2.54891536e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +-2 0 2 507 + 8.15919978e-06 8.96171586e-05 3.27102754e-05 3.27274346e-05 -1.41493681e-08 -1.14318287e-04 -1.14378256e-04 4.94502572e-08 6.47643325e-06 2.24703773e-05 -9.71483541e-09 1.12410803e-05 -9.71993163e-09 8.96171586e-05 9.84998131e-04 3.59541633e-04 3.59730242e-04 -1.55525653e-07 -1.25729095e-03 -1.25795050e-03 5.43861897e-07 7.14374404e-05 2.47856525e-04 -1.07158207e-07 1.23993250e-04 -1.07214420e-07 -3.27102754e-05 -3.59541633e-04 -1.26815516e-04 -1.33791713e-04 5.78434647e-08 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -2.09255703e-05 -8.79785547e-05 3.80366190e-08 -4.65727721e-05 4.02705210e-08 -3.27274346e-05 -3.59730242e-04 -1.33791713e-04 -1.26955848e-04 5.78738083e-08 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -2.98014781e-05 -8.80300750e-05 4.02705210e-08 -4.14790332e-05 3.80788582e-08 1.41493681e-08 1.55525653e-07 5.78434647e-08 5.78738083e-08 6.90602458e-06 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 1.28843611e-08 4.02705210e-08 5.11546916e-06 2.23586072e-08 5.11815264e-06 1.14318287e-04 1.25729095e-03 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -1.55783378e-03 -1.64059005e-03 7.09292153e-07 7.41676003e-05 3.10616227e-04 -1.34291716e-07 1.64262990e-04 -1.42034839e-07 1.14378256e-04 1.25795050e-03 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -1.64059005e-03 -1.55955457e-03 7.09664234e-07 1.04928872e-04 3.10797775e-04 -1.42034839e-07 1.46611593e-04 -1.34440694e-07 -4.94502572e-08 -5.43861897e-07 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 7.09292153e-07 7.09664234e-07 8.18957947e-05 -4.53649137e-08 -1.42034839e-07 -1.77282045e-05 -7.87233138e-08 -1.77375044e-05 6.47643325e-06 7.14374404e-05 2.09255703e-05 2.98014781e-05 -1.28843611e-08 -7.41676003e-05 -1.04928872e-04 4.53649137e-08 -8.26388656e-07 1.63766450e-05 -7.08027324e-09 1.14959603e-05 -9.94032116e-09 2.24703773e-05 2.47856525e-04 8.79785547e-05 8.80300750e-05 -4.02705210e-08 -3.10616227e-04 -3.10797775e-04 1.42034839e-07 1.63766450e-05 5.70028575e-05 -2.62180073e-08 2.84327888e-05 -2.62334905e-08 -9.71483541e-09 -1.07158207e-07 -3.80366190e-08 -4.02705210e-08 -5.11546916e-06 1.34291716e-07 1.42034839e-07 1.77282045e-05 -7.08027324e-09 -2.62180073e-08 -3.63928211e-06 -1.55891033e-08 -3.81236177e-06 1.12410803e-05 1.23993250e-04 4.65727721e-05 4.14790332e-05 -2.23586072e-08 -1.64262990e-04 -1.46611593e-04 7.87233138e-08 1.14959603e-05 2.84327888e-05 -1.55891033e-08 1.24877430e-05 -1.39481760e-08 -9.71993163e-09 -1.07214420e-07 -4.02705210e-08 -3.80788582e-08 -5.11815264e-06 1.42034839e-07 1.34440694e-07 1.77375044e-05 -9.94032116e-09 -2.62334905e-08 -3.81236177e-06 -1.39481760e-08 -3.64328085e-06 1.25169292e-03 9.05223723e-03 3.48615601e-03 3.30228823e-03 1.16593167e-03 -1.02237949e-02 -9.68456873e-03 -3.41930945e-03 4.94798864e-05 1.63862739e-04 5.78546582e-05 6.79354878e-05 5.48032723e-05 8.27516628e-06 9.08802576e-05 3.31690024e-05 3.31516038e-05 1.43467963e-08 -1.15932821e-04 -1.15872009e-04 -5.01451490e-08 6.57122653e-06 2.27276232e-05 9.83568045e-09 1.13578487e-05 9.83052120e-09 9.05223723e-03 5.49071970e-02 2.21396978e-02 2.09719999e-02 7.40453804e-03 -5.87119722e-02 -5.56153696e-02 -1.96359966e-02 -1.13537275e-03 -3.76001852e-03 -1.32754150e-03 -1.55885769e-03 -1.25752395e-03 9.08802576e-05 9.98807942e-04 3.64520473e-04 3.64329266e-04 1.57668323e-07 -1.27488695e-03 -1.27421822e-03 -5.51434836e-07 7.24639184e-05 2.50627890e-04 1.08462544e-07 1.25248189e-04 1.08405650e-07 -3.48615601e-03 -2.21396978e-02 -8.04999795e-03 -9.20655549e-03 -3.25053837e-03 2.17878225e-02 2.53758307e-02 8.95938891e-03 3.50104163e-04 8.67259756e-04 3.06201501e-04 3.19668178e-04 2.57874975e-04 -3.31690024e-05 -3.64520473e-04 -1.28557904e-04 -1.35515297e-04 -5.86460424e-08 4.50592934e-04 4.74570596e-04 2.05376721e-07 -2.12181717e-05 -8.89594229e-05 -3.84983703e-08 -4.70541429e-05 -4.07266167e-08 -3.30228823e-03 -2.09719999e-02 -9.20655549e-03 -7.05181246e-03 -3.07909760e-03 2.53758307e-02 1.90365453e-02 8.48685042e-03 1.64999848e-04 8.31949611e-04 2.57874975e-04 3.99017241e-04 2.78242395e-04 -3.31516038e-05 -3.64329266e-04 -1.35515297e-04 -1.28415700e-04 -5.86152800e-08 4.74570596e-04 4.50094936e-04 2.05268992e-07 -3.02107103e-05 -8.89073048e-05 -4.07266167e-08 -4.18311905e-05 -3.84556333e-08 -1.16593167e-03 -7.40453804e-03 -3.25053837e-03 -3.07909760e-03 5.82038175e-04 8.95938891e-03 8.48685042e-03 -2.00447282e-03 5.82561346e-05 2.57874975e-04 1.92613256e-04 7.29434793e-05 1.82454396e-04 -1.43467963e-08 -1.57668323e-07 -5.86460424e-08 -5.86152800e-08 7.02848825e-06 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -1.30740856e-08 -4.07266167e-08 5.20098097e-06 -2.26022436e-08 5.19825282e-06 1.02237949e-02 5.87119722e-02 2.17878225e-02 2.53758307e-02 8.95938891e-03 -5.50538468e-02 -6.60315567e-02 -2.33136170e-02 -1.59337390e-03 -5.36665398e-03 -1.89479276e-03 -2.23721786e-03 -1.80475424e-03 1.15932821e-04 1.27488695e-03 4.50592934e-04 4.74570596e-04 2.05376721e-07 -1.57949590e-03 -1.66202156e-03 -7.19261877e-07 7.52048490e-05 3.14093514e-04 1.35928135e-07 1.65969820e-04 1.43651310e-07 9.68456873e-03 5.56153696e-02 2.53758307e-02 1.90365453e-02 8.48685042e-03 -6.60315567e-02 -4.78946284e-02 -2.20840039e-02 -1.56059172e-03 -5.08039601e-03 -1.80475424e-03 -2.08962927e-03 -1.69911920e-03 1.15872009e-04 1.27421822e-03 4.74570596e-04 4.50094936e-04 2.05268992e-07 -1.66202156e-03 -1.57775183e-03 -7.18884592e-07 1.06377644e-04 3.13909848e-04 1.43651310e-07 1.47862365e-04 1.35777392e-07 3.41930945e-03 1.96359966e-02 8.95938891e-03 8.48685042e-03 -2.00447282e-03 -2.33136170e-02 -2.20840039e-02 6.85712334e-03 -5.50994697e-04 -1.80475424e-03 -6.05960288e-04 -7.58677249e-04 -5.74000568e-04 5.01451490e-08 5.51434836e-07 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -7.19261877e-07 -7.18884592e-07 8.33976123e-05 4.60363367e-08 1.43651310e-07 -1.80297925e-05 7.95865317e-08 -1.80203351e-05 4.94798864e-05 -1.13537275e-03 -3.50104163e-04 -1.64999848e-04 -5.82561346e-05 1.59337390e-03 1.56059172e-03 5.50994697e-04 2.56560689e-04 -5.29286787e-04 -1.86874126e-04 -4.17387686e-04 -3.36704891e-04 6.57122653e-06 7.24639184e-05 2.12181717e-05 3.02107103e-05 1.30740856e-08 -7.52048490e-05 -1.06377644e-04 -4.60363367e-08 -8.39846215e-07 1.65608232e-05 7.16691593e-09 1.16238799e-05 1.00607783e-08 1.63862739e-04 -3.76001852e-03 -8.67259756e-04 -8.31949611e-04 -2.57874975e-04 5.36665398e-03 5.08039601e-03 1.80475424e-03 -5.29286787e-04 -1.74924598e-03 -7.12770120e-04 -6.69560310e-04 -6.65181086e-04 2.27276232e-05 2.50627890e-04 8.89594229e-05 8.89073048e-05 4.07266167e-08 -3.14093514e-04 -3.13909848e-04 -1.43651310e-07 1.65608232e-05 5.74406352e-05 2.64573468e-08 2.86159769e-05 2.64417132e-08 5.78546582e-05 -1.32754150e-03 -3.06201501e-04 -2.57874975e-04 -1.92613256e-04 1.89479276e-03 1.80475424e-03 6.05960288e-04 -1.86874126e-04 -7.12770120e-04 1.78888525e-05 -4.31057440e-04 6.44789808e-06 9.83568045e-09 1.08462544e-07 3.84983703e-08 4.07266167e-08 -5.20098097e-06 -1.35928135e-07 -1.43651310e-07 1.80297925e-05 7.16691593e-09 2.64573468e-08 -3.69519580e-06 1.57315850e-08 -3.86773918e-06 6.79354878e-05 -1.55885769e-03 -3.19668178e-04 -3.99017241e-04 -7.29434793e-05 2.23721786e-03 2.08962927e-03 7.58677249e-04 -4.17387686e-04 -6.69560310e-04 -4.31057440e-04 -1.19670827e-04 -3.16127201e-04 1.13578487e-05 1.25248189e-04 4.70541429e-05 4.18311905e-05 2.26022436e-08 -1.65969820e-04 -1.47862365e-04 -7.95865317e-08 1.16238799e-05 2.86159769e-05 1.57315850e-08 1.25421922e-05 1.40503904e-08 5.48032723e-05 -1.25752395e-03 -2.57874975e-04 -2.78242395e-04 -1.82454396e-04 1.80475424e-03 1.69911920e-03 5.74000568e-04 -3.36704891e-04 -6.65181086e-04 6.44789808e-06 -3.16127201e-04 1.71897639e-05 9.83052120e-09 1.08405650e-07 4.07266167e-08 3.84556333e-08 -5.19825282e-06 -1.43651310e-07 -1.35777392e-07 1.80203351e-05 1.00607783e-08 2.64417132e-08 -3.86773918e-06 1.40503904e-08 -3.69113714e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +-2 1 -1 169 + 5.43332578e-05 5.52988907e-04 5.26875387e-05 -6.14587983e-05 -2.64362400e-04 -1.80218965e-04 2.10221265e-04 9.04257808e-04 -4.49966214e-05 -7.41027543e-06 -3.18749838e-05 -7.56452170e-05 3.71814332e-05 5.52988907e-04 5.60067676e-03 5.29859586e-04 -6.18068982e-04 -2.65859737e-03 -1.81201067e-03 2.11366864e-03 9.09185551e-03 -4.25601334e-04 -7.00902203e-05 -3.01490094e-04 -7.15491613e-04 3.51681238e-04 -5.26875387e-05 -5.29859586e-04 1.34008375e-05 6.15269629e-05 2.64655607e-04 -4.90106887e-05 -2.09833081e-04 -9.02588049e-04 5.56509495e-05 -3.84629180e-06 -1.65446602e-05 7.49389586e-05 -3.68342903e-05 6.14587983e-05 6.18068982e-04 6.15269629e-05 -5.62297012e-06 -3.08714660e-04 -2.09833081e-04 1.58685769e-05 1.05284813e-03 -4.55384355e-05 1.02753215e-06 -3.68342903e-05 -9.86019477e-05 -5.15569475e-06 2.64362400e-04 2.65859737e-03 2.64655607e-04 -3.08714660e-04 -1.26177613e-03 -9.02588049e-04 1.05284813e-03 4.29988448e-03 -1.95881638e-04 -3.68342903e-05 -1.48850385e-04 -3.27887984e-04 1.73630540e-04 1.80218965e-04 1.81201067e-03 -4.90106887e-05 -2.09833081e-04 -9.02588049e-04 1.78932162e-04 7.16157506e-04 3.08052097e-03 -1.87753689e-04 1.40802398e-05 6.05655509e-05 -2.51247751e-04 1.23494278e-04 -2.10221265e-04 -2.11366864e-03 -2.09833081e-04 1.58685769e-05 1.05284813e-03 7.16157506e-04 -4.24999066e-05 -3.59335664e-03 1.51992621e-04 -4.46069846e-06 1.23494278e-04 3.31767407e-04 2.23817810e-05 -9.04257808e-04 -9.09185551e-03 -9.02588049e-04 1.05284813e-03 4.29988448e-03 3.08052097e-03 -3.59335664e-03 -1.46637891e-02 6.53789776e-04 1.23494278e-04 4.98034804e-04 1.09421334e-03 -5.80946108e-04 -4.49966214e-05 -4.25601334e-04 -5.56509495e-05 4.55384355e-05 1.95881638e-04 1.87753689e-04 -1.51992621e-04 -6.53789776e-04 1.37991933e-05 4.93773813e-06 2.12394700e-05 2.44096380e-05 -1.19979208e-05 -7.41027543e-06 -7.00902203e-05 3.84629180e-06 -1.02753215e-06 3.68342903e-05 -1.40802398e-05 4.46069846e-06 -1.23494278e-04 4.93773813e-06 -5.01791981e-07 -4.48054080e-06 8.34420803e-06 2.94550211e-06 -3.18749838e-05 -3.01490094e-04 1.65446602e-05 3.68342903e-05 1.48850385e-04 -6.05655509e-05 -1.23494278e-04 -4.98034804e-04 2.12394700e-05 -4.48054080e-06 -1.87330140e-05 2.32438211e-05 -1.30631480e-05 -7.56452170e-05 -7.15491613e-04 -7.49389586e-05 9.86019477e-05 3.27887984e-04 2.51247751e-04 -3.31767407e-04 -1.09421334e-03 2.44096380e-05 8.34420803e-06 2.32438211e-05 3.85235775e-05 -3.44904342e-05 3.71814332e-05 3.51681238e-04 3.68342903e-05 5.15569475e-06 -1.73630540e-04 -1.23494278e-04 -2.23817810e-05 5.80946108e-04 -1.19979208e-05 2.94550211e-06 -1.30631480e-05 -3.44904342e-05 -1.46939585e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 1 0 507 + 1.69140261e-04 1.55701900e-03 3.23428906e-04 3.23768247e-04 -6.47182798e-04 -1.05927099e-03 -1.06038238e-03 2.11960636e-03 -4.51232749e-05 5.20523543e-05 -1.04047845e-04 -7.80466354e-05 -1.04157012e-04 1.55701900e-03 1.38863696e-02 2.87828294e-03 2.88130283e-03 -5.75945802e-03 -9.29841885e-03 -9.30817474e-03 1.86061809e-02 -2.87859563e-04 3.32062954e-04 -6.63763150e-04 -4.97890953e-04 -6.64459569e-04 -3.23428906e-04 -2.87828294e-03 -4.11252946e-04 -6.38847089e-04 1.27699628e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 1.33206059e-04 -4.05569994e-05 8.10696930e-05 1.33575327e-04 1.78262737e-04 -3.23768247e-04 -2.88130283e-03 -6.38847089e-04 -4.12592798e-04 1.27833610e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 4.92900665e-05 -4.07013328e-05 1.78262737e-04 1.82245085e-04 8.14435629e-05 6.47182798e-04 5.75945802e-03 1.27699628e-03 1.27833610e-03 -2.32835114e-03 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 -9.85262868e-05 1.78262737e-04 -3.07851986e-04 -1.70278665e-04 -3.08174984e-04 1.05927099e-03 9.29841885e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -4.08600834e-03 -6.64655287e-03 1.32858448e-02 -3.95370826e-04 8.96847052e-05 -1.79271436e-04 -3.70192191e-04 -4.94039393e-04 1.06038238e-03 9.30817474e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -6.64655287e-03 -4.09994813e-03 1.32997843e-02 -1.23488297e-04 9.01085203e-05 -4.94039393e-04 -5.27791545e-04 -1.80307583e-04 -2.11960636e-03 -1.86061809e-02 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 1.32858448e-02 1.32997843e-02 -2.40314612e-02 2.46841691e-04 -4.94039393e-04 8.30492903e-04 4.26506203e-04 8.31364255e-04 -4.51232749e-05 -2.87859563e-04 -1.33206059e-04 -4.92900665e-05 9.85262868e-05 3.95370826e-04 1.23488297e-04 -2.46841691e-04 -2.47524705e-05 1.47501223e-05 -2.94841310e-05 -3.40970488e-05 -4.55041615e-05 5.20523543e-05 3.32062954e-04 4.05569994e-05 4.07013328e-05 -1.78262737e-04 -8.96847052e-05 -9.01085203e-05 4.94039393e-04 1.47501223e-05 -2.51363211e-05 4.93846671e-05 2.55058314e-05 4.94171207e-05 -1.04047845e-04 -6.63763150e-04 -8.10696930e-05 -1.78262737e-04 3.07851986e-04 1.79271436e-04 4.94039393e-04 -8.30492903e-04 -2.94841310e-05 4.93846671e-05 -9.91458775e-05 -6.94270663e-05 -8.49604000e-05 -7.80466354e-05 -4.97890953e-04 -1.33575327e-04 -1.82245085e-04 1.70278665e-04 3.70192191e-04 5.27791545e-04 -4.26506203e-04 -3.40970488e-05 2.55058314e-05 -6.94270663e-05 -6.40529973e-05 -6.02686003e-05 -1.04157012e-04 -6.64459569e-04 -1.78262737e-04 -8.14435629e-05 3.08174984e-04 4.94039393e-04 1.80307583e-04 -8.31364255e-04 -4.55041615e-05 4.94171207e-05 -8.49604000e-05 -6.02686003e-05 -9.93240647e-05 1.56239965e-02 7.38778744e-02 1.41842934e-02 1.19340952e-02 -4.26906661e-02 -3.43176363e-02 -2.88734819e-02 1.03286269e-01 2.28822325e-03 -8.58733936e-04 3.07186452e-03 4.26146465e-03 2.58454352e-03 1.71555307e-04 1.57695618e-03 3.28015751e-04 3.27671645e-04 -6.55701953e-04 -1.07359504e-03 -1.07246878e-03 2.14611147e-03 -4.52904035e-05 5.23486899e-05 -1.04754679e-04 -7.85551705e-05 -1.04644786e-04 7.38778744e-02 1.66128611e-01 4.36615885e-02 3.67351083e-02 -1.31408893e-01 -6.10770168e-02 -5.13877507e-02 1.83824351e-01 2.06380637e-02 -7.74513834e-03 2.77059223e-02 3.84352264e-02 2.33106511e-02 1.57695618e-03 1.40364205e-02 2.91373172e-03 2.91067506e-03 -5.82453608e-03 -9.40418907e-03 -9.39432358e-03 1.87989300e-02 -2.86322174e-04 3.30944075e-04 -6.62250393e-04 -4.96619271e-04 -6.61555658e-04 -1.41842934e-02 -4.36615885e-02 6.46524765e-03 -9.92604055e-03 3.55074494e-02 -1.87964941e-02 1.89835159e-02 -6.79078659e-02 -6.83153404e-03 -8.23690569e-06 2.94650733e-05 -8.38364846e-03 -5.08461436e-03 -3.28015751e-04 -2.91373172e-03 -4.16802569e-04 -6.46441005e-04 1.29358959e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 1.33768209e-04 -4.03704402e-05 8.07850690e-05 1.33967991e-04 1.78461223e-04 -1.19340952e-02 -3.67351083e-02 -9.92604055e-03 9.91149142e-03 2.98745429e-02 1.89835159e-02 -2.53874226e-02 -5.71349530e-02 -2.80738314e-03 -5.96336891e-04 -5.08461436e-03 -8.75130344e-03 1.79480347e-03 -3.27671645e-04 -2.91067506e-03 -6.46441005e-04 -4.15445557e-04 1.29223255e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 4.89219038e-05 -4.02254279e-05 1.78461223e-04 1.82732469e-04 8.04104422e-05 4.26906661e-02 1.31408893e-01 3.55074494e-02 2.98745429e-02 -8.86044030e-02 -6.79078659e-02 -5.71349530e-02 1.63023862e-01 1.00425758e-02 -5.08461436e-03 1.61709600e-02 1.91595899e-02 1.36055968e-02 6.55701953e-04 5.82453608e-03 1.29358959e-03 1.29223255e-03 -2.35556224e-03 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 -9.78973564e-05 1.78461223e-04 -3.08161409e-04 -1.69937822e-04 -3.07838132e-04 3.43176363e-02 6.10770168e-02 -1.87964941e-02 1.89835159e-02 -6.79078659e-02 4.94697065e-02 -2.39209963e-02 8.55702293e-02 2.20188804e-02 1.38859484e-03 -4.96728388e-03 2.47237307e-02 1.49947408e-02 1.07359504e-03 9.40418907e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -4.13166701e-03 -6.71346123e-03 1.34342709e-02 -3.95878040e-04 8.80008593e-05 -1.76098042e-04 -3.69458003e-04 -4.92161796e-04 2.88734819e-02 5.13877507e-02 1.89835159e-02 -2.53874226e-02 -5.71349530e-02 -2.39209963e-02 5.77748896e-02 7.19953567e-02 7.49140933e-03 3.38016865e-03 1.49947408e-02 2.71722645e-02 -1.01733408e-02 1.07246878e-03 9.39432358e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -6.71346123e-03 -4.11757408e-03 1.34201776e-02 -1.21445868e-04 8.75764397e-05 -4.92161796e-04 -5.27274139e-04 -1.75064894e-04 -1.03286269e-01 -1.83824351e-01 -6.79078659e-02 -5.71349530e-02 1.63023862e-01 8.55702293e-02 7.19953567e-02 -1.79640859e-01 -2.67982824e-02 1.49947408e-02 -4.60672927e-02 -5.16220436e-02 -3.87591712e-02 -2.14611147e-03 -1.87989300e-02 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 1.34342709e-02 1.34201776e-02 -2.42662003e-02 2.43024669e-04 -4.92161796e-04 8.26492446e-04 4.21964222e-04 8.25625413e-04 2.28822325e-03 2.06380637e-02 6.83153404e-03 2.80738314e-03 -1.00425758e-02 -2.20188804e-02 -7.49140933e-03 2.67982824e-02 1.78835262e-03 -4.36083159e-04 1.55995743e-03 3.65184025e-03 2.21481131e-03 -4.52904035e-05 -2.86322174e-04 -1.33768209e-04 -4.89219038e-05 9.78973564e-05 3.95878040e-04 1.21445868e-04 -2.43024669e-04 -2.49008625e-05 1.54428858e-05 -3.09026749e-05 -3.48621147e-05 -4.64404637e-05 -8.58733936e-04 -7.74513834e-03 8.23690569e-06 5.96336891e-04 5.08461436e-03 -1.38859484e-03 -3.38016865e-03 -1.49947408e-02 -4.36083159e-04 -3.14657535e-05 -1.24054453e-03 -8.25159042e-04 -1.22461693e-03 5.23486899e-05 3.30944075e-04 4.03704402e-05 4.02254279e-05 -1.78461223e-04 -8.80008593e-05 -8.75764397e-05 4.92161796e-04 1.54428858e-05 -2.56424764e-05 5.07133837e-05 2.67916323e-05 5.06790535e-05 3.07186452e-03 2.77059223e-02 -2.94650733e-05 5.08461436e-03 -1.61709600e-02 4.96728388e-03 -1.49947408e-02 4.60672927e-02 1.55995743e-03 -1.24054453e-03 4.05942041e-03 4.19013176e-03 2.33884183e-03 -1.04754679e-04 -6.62250393e-04 -8.07850690e-05 -1.78461223e-04 3.08161409e-04 1.76098042e-04 4.92161796e-04 -8.26492446e-04 -3.09026749e-05 5.07133837e-05 -1.01781931e-04 -7.16103976e-05 -8.79029123e-05 4.26146465e-03 3.84352264e-02 8.38364846e-03 8.75130344e-03 -1.91595899e-02 -2.47237307e-02 -2.71722645e-02 5.16220436e-02 3.65184025e-03 -8.25159042e-04 4.19013176e-03 6.37903682e-03 3.00445070e-03 -7.85551705e-05 -4.96619271e-04 -1.33967991e-04 -1.82732469e-04 1.69937822e-04 3.69458003e-04 5.27274139e-04 -4.21964222e-04 -3.48621147e-05 2.67916323e-05 -7.16103976e-05 -6.52311227e-05 -6.25458112e-05 2.58454352e-03 2.33106511e-02 5.08461436e-03 -1.79480347e-03 -1.36055968e-02 -1.49947408e-02 1.01733408e-02 3.87591712e-02 2.21481131e-03 -1.22461693e-03 2.33884183e-03 3.00445070e-03 3.24739280e-03 -1.04644786e-04 -6.61555658e-04 -1.78461223e-04 -8.04104422e-05 3.07838132e-04 4.92161796e-04 1.75064894e-04 -8.25625413e-04 -4.64404637e-05 5.06790535e-05 -8.79029123e-05 -6.25458112e-05 -1.01597405e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +-2 1 1 507 + 1.69088388e-04 1.55659037e-03 3.23331355e-04 6.47024526e-04 -3.23633666e-04 -1.05896638e-03 -2.11911776e-03 1.05995650e-03 -4.51193676e-05 1.04036868e-04 -5.20379546e-05 7.80517727e-05 -1.04134141e-04 1.55659037e-03 1.38831389e-02 2.87752923e-03 5.75827848e-03 -2.88021968e-03 -9.29617039e-03 -1.86027434e-02 9.30486221e-03 -2.87890442e-04 6.63821800e-04 -3.32035455e-04 4.98020264e-04 -6.64442466e-04 -3.23331355e-04 -2.87752923e-03 -4.11137569e-04 -1.27669244e-03 6.38585770e-04 1.30251061e-03 4.12986990e-03 -2.06570985e-03 1.33193756e-04 -8.10798203e-05 4.05551234e-05 -1.33594706e-04 1.78237719e-04 -6.47024526e-04 -5.75827848e-03 -1.27669244e-03 -2.32796184e-03 1.27788613e-03 4.12986990e-03 7.50309160e-03 -4.13373129e-03 9.85425184e-05 -3.07873132e-04 1.78237719e-04 -1.70347504e-04 3.08160990e-04 3.23633666e-04 2.88021968e-03 6.38585770e-04 1.27788613e-03 -4.12331153e-04 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 -4.92897491e-05 1.78237719e-04 -4.06837196e-05 1.82233517e-04 -8.14129653e-05 1.05896638e-03 9.29617039e-03 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -4.08506578e-03 -1.32831996e-02 6.64409216e-03 -3.95359218e-04 1.79348778e-04 -8.97080408e-05 3.70284810e-04 -4.94021970e-04 2.11911776e-03 1.86027434e-02 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -1.32831996e-02 -2.40284433e-02 1.32956192e-02 -2.46930191e-04 8.30655294e-04 -4.94021970e-04 4.26772258e-04 -8.31431947e-04 -1.05995650e-03 -9.30486221e-03 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 6.64409216e-03 1.32956192e-02 -4.09748428e-03 1.23511428e-04 -4.94021970e-04 9.00856744e-05 -5.27795838e-04 1.80272157e-04 -4.51193676e-05 -2.87890442e-04 -1.33193756e-04 -9.85425184e-05 4.92897491e-05 3.95359218e-04 2.46930191e-04 -1.23511428e-04 -2.47490182e-05 2.94546993e-05 -1.47328764e-05 3.40874454e-05 -4.54783628e-05 1.04036868e-04 6.63821800e-04 8.10798203e-05 3.07873132e-04 -1.78237719e-04 -1.79348778e-04 -8.30655294e-04 4.94021970e-04 2.94546993e-05 -9.90973788e-05 4.93505482e-05 -6.93955351e-05 8.48903546e-05 -5.20379546e-05 -3.32035455e-04 -4.05551234e-05 -1.78237719e-04 4.06837196e-05 8.97080408e-05 4.94021970e-04 -9.00856744e-05 -1.47328764e-05 4.93505482e-05 -2.51178417e-05 2.54805866e-05 -4.93794285e-05 7.80517727e-05 4.98020264e-04 1.33594706e-04 1.70347504e-04 -1.82233517e-04 -3.70284810e-04 -4.26772258e-04 5.27795838e-04 3.40874454e-05 -6.93955351e-05 2.54805866e-05 -6.40462852e-05 6.02250529e-05 -1.04134141e-04 -6.64442466e-04 -1.78237719e-04 -3.08160990e-04 8.14129653e-05 4.94021970e-04 8.31431947e-04 -1.80272157e-04 -4.54783628e-05 8.48903546e-05 -4.93794285e-05 6.02250529e-05 -9.92560478e-05 1.94069976e-02 8.71601541e-02 1.75692252e-02 5.00581778e-02 -1.76022057e-02 -4.14508190e-02 -1.18101535e-01 4.15286295e-02 3.10823884e-03 -4.30769562e-03 1.51473641e-03 -5.37794607e-03 4.31578191e-03 1.71607917e-04 1.57739011e-03 3.28114677e-04 6.55862237e-04 -3.27807936e-04 -1.07390369e-03 -2.14660583e-03 1.07289974e-03 -4.52942728e-05 1.04765636e-04 -5.23631411e-05 7.85499319e-05 -1.04667695e-04 8.71601541e-02 1.76621156e-01 4.97545082e-02 1.41760379e-01 -4.98479061e-02 -6.47155763e-02 -1.84387404e-01 6.48370588e-02 2.12014515e-02 -2.93830058e-02 1.03320923e-02 -3.66832372e-02 2.94381628e-02 1.57739011e-03 1.40396814e-02 2.91449415e-03 5.82572737e-03 -2.91176951e-03 -9.40646010e-03 -1.88023956e-02 9.39766638e-03 -2.86290008e-04 6.62188680e-04 -3.30969969e-04 4.96487949e-04 -6.61569627e-04 -1.75692252e-02 -4.97545082e-02 7.99247736e-03 -4.12912335e-02 1.45194415e-02 -2.27031984e-02 7.56650641e-02 -2.66064823e-02 -8.68434876e-03 -2.74194000e-04 9.64161981e-05 9.49857284e-03 -7.62256972e-03 -3.28114677e-04 -2.91449415e-03 -4.16919525e-04 -1.29389719e-03 6.46705581e-04 1.31941097e-03 4.18190984e-03 -2.09016949e-03 1.33780351e-04 -8.07745132e-05 4.03720857e-05 -1.33948236e-04 1.78485871e-04 -5.00581778e-02 -1.41760379e-01 -4.12912335e-02 -9.51621301e-02 4.13687443e-02 7.56650641e-02 1.66324819e-01 -7.58071006e-02 -1.10905588e-02 1.89109449e-02 -7.62256972e-03 1.91808204e-02 -1.89464440e-02 -6.55862237e-04 -5.82572737e-03 -1.29389719e-03 -2.35595549e-03 1.29268758e-03 4.18190984e-03 7.58642632e-03 -4.17800035e-03 9.78807044e-05 -3.08139304e-04 1.78485871e-04 -1.69868227e-04 3.07851237e-04 1.76022057e-02 4.98479061e-02 1.45194415e-02 4.13687443e-02 7.93801738e-03 -2.66064823e-02 -7.58071006e-02 -2.26034019e-02 3.89982829e-03 -7.62256972e-03 -8.62007958e-05 -1.22881595e-02 -2.45603020e-04 3.27807936e-04 2.91176951e-03 6.46705581e-04 1.29268758e-03 -4.15709803e-04 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 -4.89219685e-05 1.78485871e-04 -4.02428327e-05 1.82743816e-04 -8.04406389e-05 4.14508190e-02 6.47155763e-02 -2.27031984e-02 7.56650641e-02 -2.66064823e-02 5.67093740e-02 -8.75280199e-02 3.07779124e-02 2.55055437e-02 7.59686824e-03 -2.67132451e-03 -2.48473639e-02 1.99399180e-02 1.07390369e-03 9.40646010e-03 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -4.13261909e-03 -1.34369406e-02 6.71594663e-03 -3.95888562e-04 1.76018488e-04 -8.79761846e-05 3.69363699e-04 -4.92176709e-04 1.18101535e-01 1.84387404e-01 7.56650641e-02 1.66324819e-01 -7.58071006e-02 -8.75280199e-02 -1.61954923e-01 8.76923253e-02 2.50399074e-02 -4.70546584e-02 1.99399180e-02 -4.32956006e-02 4.71429883e-02 2.14660583e-03 1.88023956e-02 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -1.34369406e-02 -2.42692352e-02 1.34243790e-02 -2.42934386e-04 8.26325317e-04 -4.92176709e-04 4.21695362e-04 -8.25552819e-04 -4.15286295e-02 -6.48370588e-02 -2.66064823e-02 -7.58071006e-02 -2.26034019e-02 3.07779124e-02 8.76923253e-02 5.65939312e-02 -8.80490704e-03 1.99399180e-02 2.64006941e-03 3.45637664e-02 7.52207695e-03 -1.07289974e-03 -9.39766638e-03 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 6.71594663e-03 1.34243790e-02 -4.12005630e-03 1.21421566e-04 -4.92176709e-04 8.75979182e-05 -5.27268313e-04 1.75097826e-04 3.10823884e-03 2.12014515e-02 8.68434876e-03 1.10905588e-02 -3.89982829e-03 -2.55055437e-02 -2.50399074e-02 8.80490704e-03 2.39568271e-03 -3.73280064e-03 1.31258323e-03 -5.02829481e-03 4.03518807e-03 -4.52942728e-05 -2.86290008e-04 -1.33780351e-04 -9.78807044e-05 4.89219685e-05 3.95888562e-04 2.42934386e-04 -1.21421566e-04 -2.49041449e-05 3.09325422e-05 -1.54604614e-05 3.48716743e-05 -4.64664662e-05 -4.30769562e-03 -2.93830058e-02 2.74194000e-04 -1.89109449e-02 7.62256972e-03 -7.59686824e-03 4.70546584e-02 -1.99399180e-02 -3.73280064e-03 5.22424450e-03 -2.03753429e-03 6.79883432e-03 -5.37929462e-03 1.04765636e-04 6.62188680e-04 8.07745132e-05 3.08139304e-04 -1.78485871e-04 -1.76018488e-04 -8.26325317e-04 4.92176709e-04 3.09325422e-05 -1.01831063e-04 5.07480848e-05 -7.16420931e-05 8.79741411e-05 1.51473641e-03 1.03320923e-02 -9.64161981e-05 7.62256972e-03 8.62007958e-05 2.67132451e-03 -1.99399180e-02 -2.64006941e-03 1.31258323e-03 -2.03753429e-03 1.46254107e-04 -2.27099842e-03 2.04071944e-03 -5.23631411e-05 -3.30969969e-04 -4.03720857e-05 -1.78485871e-04 4.02428327e-05 8.79761846e-05 4.92176709e-04 -8.75979182e-05 -1.54604614e-05 5.07480848e-05 -2.56612647e-05 2.68173507e-05 -5.07174502e-05 -5.37794607e-03 -3.66832372e-02 -9.49857284e-03 -1.91808204e-02 1.22881595e-02 2.48473639e-02 4.32956006e-02 -3.45637664e-02 -5.02829481e-03 6.79883432e-03 -2.27099842e-03 8.19049685e-03 -6.64105902e-03 7.85499319e-05 4.96487949e-04 1.33948236e-04 1.69868227e-04 -1.82743816e-04 -3.69363699e-04 -4.21695362e-04 5.27268313e-04 3.48716743e-05 -7.16420931e-05 2.68173507e-05 -6.52373474e-05 6.25899070e-05 4.31578191e-03 2.94381628e-02 7.62256972e-03 1.89464440e-02 2.45603020e-04 -1.99399180e-02 -4.71429883e-02 -7.52207695e-03 4.03518807e-03 -5.37929462e-03 2.04071944e-03 -6.64105902e-03 5.24442133e-03 -1.04667695e-04 -6.61569627e-04 -1.78485871e-04 -3.07851237e-04 8.04406389e-05 4.92176709e-04 8.25552819e-04 -1.75097826e-04 -4.64664662e-05 8.79741411e-05 -5.07174502e-05 6.25899070e-05 -1.01666499e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 195 221 247 273 299 325 351 377 403 429 455 481 507 +-2 1 2 169 + 1.05965214e-04 1.02082766e-03 1.01694893e-04 4.93935496e-04 1.02300956e-04 -3.39838113e-04 -1.65060509e-03 -3.41863419e-04 -6.44207984e-05 4.79542328e-05 9.93199291e-06 1.11462065e-04 4.82400218e-05 1.02082766e-03 9.66576073e-03 9.57664026e-04 4.65140621e-03 9.63371339e-04 -3.18043370e-03 -1.54474729e-02 -3.19938787e-03 -5.13214149e-04 3.82031757e-04 7.91241247e-05 8.87972675e-04 3.84308521e-04 -1.01694893e-04 -9.57664026e-04 3.72403567e-05 -4.89836406e-04 -1.01451977e-04 -1.36191874e-04 1.62471832e-03 3.36501907e-04 7.97639146e-05 3.82202747e-05 7.91595393e-06 -1.03900325e-04 -4.49673526e-05 -4.93935496e-04 -4.65140621e-03 -4.89836406e-04 -2.24106051e-03 -4.92755645e-04 1.62471832e-03 7.42061098e-03 1.63440102e-03 2.43792224e-04 -2.00041617e-04 -4.49673526e-05 -4.21726129e-04 -2.01233789e-04 -1.02300956e-04 -9.63371339e-04 -1.01451977e-04 -4.92755645e-04 3.60347082e-05 3.36501907e-04 1.63440102e-03 -1.32192908e-04 5.04927823e-05 -4.49673526e-05 7.75903359e-06 -1.21693679e-04 3.76858858e-05 3.39838113e-04 3.18043370e-03 -1.36191874e-04 1.62471832e-03 3.36501907e-04 4.97824822e-04 -5.37840882e-03 -1.11394376e-03 -2.52565448e-04 -1.39941874e-04 -2.89839211e-05 3.22378687e-04 1.39523298e-04 1.65060509e-03 1.54474729e-02 1.62471832e-03 7.42061098e-03 1.63440102e-03 -5.37840882e-03 -2.45179424e-02 -5.41046209e-03 -7.44102630e-04 6.16286541e-04 1.39523298e-04 1.28716548e-03 6.19959374e-04 3.41863419e-04 3.19938787e-03 3.36501907e-04 1.63440102e-03 -1.32192908e-04 -1.11394376e-03 -5.41046209e-03 4.84586790e-04 -1.54114071e-04 1.39523298e-04 -2.84708330e-05 3.82009894e-04 -1.38283788e-04 -6.44207984e-05 -5.13214149e-04 -7.97639146e-05 -2.43792224e-04 -5.04927823e-05 2.52565448e-04 7.44102630e-04 1.54114071e-04 -1.39503959e-05 -2.48704087e-06 -5.15100978e-07 2.43374034e-05 1.05330623e-05 4.79542328e-05 3.82031757e-04 -3.82202747e-05 2.00041617e-04 4.49673526e-05 1.39941874e-04 -6.16286541e-04 -1.39523298e-04 -2.48704087e-06 -3.60440215e-05 -7.80819344e-06 -1.06512274e-05 -2.92144268e-06 9.93199291e-06 7.91241247e-05 -7.91595393e-06 4.49673526e-05 -7.75903359e-06 2.89839211e-05 -1.39523298e-04 2.84708330e-05 -5.15100978e-07 -7.80819344e-06 3.87715323e-08 8.92876332e-07 -7.76529218e-06 1.11462065e-04 8.87972675e-04 1.03900325e-04 4.21726129e-04 1.21693679e-04 -3.22378687e-04 -1.28716548e-03 -3.82009894e-04 2.43374034e-05 -1.06512274e-05 8.92876332e-07 -4.20669538e-05 -3.18898723e-06 4.82400218e-05 3.84308521e-04 4.49673526e-05 2.01233789e-04 -3.76858858e-05 -1.39523298e-04 -6.19959374e-04 1.38283788e-04 1.05330623e-05 -2.92144268e-06 -7.76529218e-06 -3.18898723e-06 -3.60787397e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 2 -1 169 + 6.79341206e-05 6.79806554e-04 -6.61652308e-05 5.52358974e-05 -3.29405918e-04 2.24748589e-04 -1.87624072e-04 1.11891872e-03 -5.10290678e-05 -6.28421786e-06 3.74766891e-05 -9.06664166e-05 -3.12861986e-05 6.79806554e-04 6.74774724e-03 -6.52265469e-04 5.44522676e-04 -3.24732647e-03 2.21178901e-03 -1.84644033e-03 1.10114690e-02 -4.61299386e-04 -5.68089124e-05 3.38786782e-04 -8.19618388e-04 -2.82825159e-04 6.61652308e-05 6.52265469e-04 1.83516750e-05 5.55702059e-05 -3.31399607e-04 -6.74700968e-05 -1.87983247e-04 1.12106070e-03 -6.38493414e-05 3.70057052e-06 -2.20687974e-05 -8.91627445e-05 -3.07673275e-05 -5.52358974e-05 -5.44522676e-04 5.55702059e-05 3.85263783e-05 2.76658215e-04 -1.87983247e-04 -1.35717212e-04 -9.35881177e-04 3.61889086e-05 -6.67643041e-06 -3.07673275e-05 8.43151927e-05 -3.32388425e-05 3.29405918e-04 3.24732647e-03 -3.31399607e-04 2.76658215e-04 -1.56496718e-03 1.12106070e-03 -9.35881177e-04 5.28859104e-03 -2.15816909e-04 -3.07673275e-05 1.71649059e-04 -3.84975897e-04 -1.43295650e-04 -2.24748589e-04 -2.21178901e-03 -6.74700968e-05 -1.87983247e-04 1.12106070e-03 2.47709311e-04 6.35954842e-04 -3.79259319e-03 2.11959358e-04 -1.35999106e-05 8.11047028e-05 2.93229975e-04 1.01184668e-04 1.87624072e-04 1.84644033e-03 -1.87983247e-04 -1.35717212e-04 -9.35881177e-04 6.35954842e-04 4.78592030e-04 3.16612344e-03 -1.18189139e-04 2.36695508e-05 1.01184668e-04 -2.78717632e-04 1.17839687e-04 -1.11891872e-03 -1.10114690e-02 1.12106070e-03 -9.35881177e-04 5.28859104e-03 -3.79259319e-03 3.16612344e-03 -1.78720597e-02 7.04835148e-04 1.01184668e-04 -5.62790400e-04 1.25754527e-03 4.69827316e-04 -5.10290678e-05 -4.61299386e-04 6.38493414e-05 -3.61889086e-05 2.15816909e-04 -2.11959358e-04 1.18189139e-04 -7.04835148e-04 7.23823259e-06 3.03220813e-06 -1.80829379e-05 1.39773625e-05 4.82315897e-06 -6.28421786e-06 -5.68089124e-05 -3.70057052e-06 6.67643041e-06 3.07673275e-05 1.35999106e-05 -2.36695508e-05 -1.01184668e-04 3.03220813e-06 9.26813907e-08 4.20922881e-06 5.35675534e-06 -5.66718176e-06 3.74766891e-05 3.38786782e-04 2.20687974e-05 3.07673275e-05 -1.71649059e-04 -8.11047028e-05 -1.01184668e-04 5.62790400e-04 -1.80829379e-05 4.20922881e-06 -2.43037432e-05 -1.77365596e-05 -7.38058940e-06 -9.06664166e-05 -8.19618388e-04 8.91627445e-05 -8.43151927e-05 3.84975897e-04 -2.93229975e-04 2.78717632e-04 -1.25754527e-03 1.39773625e-05 5.35675534e-06 -1.77365596e-05 2.59582351e-05 2.07377928e-05 -3.12861986e-05 -2.82825159e-04 3.07673275e-05 3.32388425e-05 1.43295650e-04 -1.01184668e-04 -1.17839687e-04 -4.69827316e-04 4.82315897e-06 -5.66718176e-06 -7.38058940e-06 2.07377928e-05 -2.69832582e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-2 2 0 499 + 8.10007911e-06 8.89729151e-05 -1.13385085e-09 3.24945913e-05 -3.24927368e-05 3.96246025e-09 -1.13558610e-04 1.13552129e-04 -1.28973321e-05 -7.79525178e-10 7.79480688e-10 1.27497202e-09 -2.23388344e-05 8.89729151e-05 9.77951145e-04 -1.24640330e-08 3.57201882e-04 -3.57181495e-04 4.35824782e-08 -1.24901332e-03 1.24894204e-03 -1.42281146e-04 -8.59958750e-09 8.59909670e-09 1.40652718e-08 -2.46438174e-04 1.13385085e-09 1.24640330e-08 6.84375556e-06 4.63803227e-09 -4.63776757e-09 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 -2.07009141e-09 5.07478398e-06 -5.07449435e-06 -3.23134929e-09 -3.24945913e-05 -3.57201882e-04 4.63803227e-09 -1.26075811e-04 1.32911980e-04 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.05361622e-05 3.05445661e-09 -3.23134929e-09 5.06949868e-06 8.75314902e-05 3.24927368e-05 3.57181495e-04 -4.63776757e-09 1.32911980e-04 -1.26060639e-04 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.05332780e-05 -3.23134929e-09 3.05408776e-09 5.07977958e-06 -8.75259153e-05 -3.96246025e-09 -4.35824782e-08 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 8.11322711e-05 5.68674213e-08 -5.68641757e-08 7.28839261e-09 -1.75845446e-05 1.75835410e-05 1.13966928e-08 1.13558610e-04 1.24901332e-03 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.68674213e-08 -1.54860907e-03 1.62964833e-03 -1.78417889e-04 -1.07837565e-08 1.13966928e-08 -1.75659038e-05 -3.09029852e-04 -1.13552129e-04 -1.24894204e-03 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.68641757e-08 1.62964833e-03 -1.54842305e-03 1.78407706e-04 1.13966928e-08 -1.07824556e-08 -1.76021816e-05 3.09010207e-04 -1.28973321e-05 -1.42281146e-04 2.07009141e-09 -5.05361622e-05 5.05332780e-05 -7.28839261e-09 1.78417889e-04 -1.78407706e-04 1.90386979e-05 1.36919555e-09 -1.36911740e-09 -1.86534278e-09 3.26827434e-05 -7.79525178e-10 -8.59958750e-09 -5.07478398e-06 -3.05445661e-09 3.23134929e-09 1.75845446e-05 1.07837565e-08 -1.13966928e-08 1.36919555e-09 -3.61501287e-06 3.78410410e-06 1.31920456e-10 2.10742724e-09 7.79480688e-10 8.59909670e-09 5.07449435e-06 3.23134929e-09 -3.05408776e-09 -1.75835410e-05 -1.13966928e-08 1.07824556e-08 -1.36911740e-09 3.78410410e-06 -3.61458092e-06 1.32168544e-10 -2.10729189e-09 1.27497202e-09 1.40652718e-08 -5.06949868e-06 -5.07977958e-06 1.75659038e-05 1.76021816e-05 -1.86534278e-09 1.31920456e-10 1.32168544e-10 -7.39890095e-06 -3.66281821e-09 -2.23388344e-05 -2.46438174e-04 3.23134929e-09 -8.75314902e-05 8.75259153e-05 -1.13966928e-08 3.09029852e-04 -3.09010207e-04 3.26827434e-05 2.10742724e-09 -2.10729189e-09 -3.66281821e-09 5.67774792e-05 1.24536723e-03 9.01279369e-03 -1.16226758e-03 3.28577893e-03 -3.47089230e-03 3.40965672e-03 -9.63924177e-03 1.01822949e-02 -8.39046569e-05 -5.51093043e-05 5.82140381e-05 -9.02445613e-06 -1.64573514e-04 8.33525886e-06 9.15344711e-05 1.16616523e-09 3.33879637e-05 -3.33898711e-05 -4.07619778e-09 -1.16703825e-04 1.16710492e-04 -1.31985289e-05 7.98420174e-10 -7.98465787e-10 -1.30595078e-09 -2.28605226e-05 9.01279369e-03 5.47402123e-02 -7.38925408e-03 2.08897295e-02 -2.20666097e-02 1.96097004e-02 -5.54374412e-02 5.85606615e-02 1.90007492e-03 1.24798564e-03 -1.31829433e-03 2.04364613e-04 3.72687308e-03 9.15344711e-05 1.00595728e-03 1.28147373e-08 3.66893104e-04 -3.66914064e-04 -4.48219880e-08 -1.28327862e-03 1.28335193e-03 -1.45525993e-04 8.80332117e-09 -8.80382409e-09 -1.43993157e-08 -2.52058414e-04 1.16226758e-03 7.38925408e-03 5.75144799e-04 3.07001180e-03 -3.24296933e-03 -1.98387705e-03 -8.46630185e-03 8.94327419e-03 9.03859080e-05 1.82194626e-04 -1.92459060e-04 1.39761499e-05 2.54874539e-04 -1.16616523e-09 -1.28147373e-08 7.09211384e-06 -4.76412594e-09 4.76439811e-09 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 2.12015265e-09 5.24241994e-06 -5.24271943e-06 3.30600061e-09 -3.28577893e-03 -2.08897295e-02 3.07001180e-03 -7.01796163e-03 9.16800958e-03 -8.46630185e-03 1.89559549e-02 -2.52830092e-02 -4.23268660e-04 -2.75538661e-04 2.54874539e-04 5.73358429e-05 -8.22844098e-04 -3.33879637e-05 -3.66893104e-04 -4.76412594e-09 -1.29307480e-04 1.36407386e-04 1.66844065e-08 4.53234446e-04 -4.77711192e-04 5.16210197e-05 -3.12270601e-09 3.30600061e-09 5.24782727e-06 8.94099293e-05 3.47089230e-03 2.20666097e-02 -3.24296933e-03 9.16800958e-03 -8.02342476e-03 8.94327419e-03 -2.52830092e-02 2.17287632e-02 4.47114661e-04 2.54874539e-04 -3.03490961e-04 1.44040271e-04 8.57981608e-04 3.33898711e-05 3.66914064e-04 4.76439811e-09 1.36407386e-04 -1.29323065e-04 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 -5.16239687e-05 3.30600061e-09 -3.12308373e-09 5.23731202e-06 -8.94156361e-05 -3.40965672e-03 -1.96097004e-02 -1.98387705e-03 -8.46630185e-03 8.94327419e-03 6.79730079e-03 2.20480791e-02 -2.32902181e-02 -9.23729286e-04 -5.74856584e-04 6.07242707e-04 -9.82492296e-05 -1.79171141e-03 4.07619778e-09 4.48219880e-08 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 8.41779804e-05 -5.84346084e-08 5.84379467e-08 -7.46569843e-09 -1.81761239e-05 1.81771622e-05 -1.16612681e-08 9.63924177e-03 5.54374412e-02 -8.46630185e-03 1.89559549e-02 -2.52830092e-02 2.20480791e-02 -4.77345453e-02 6.58424181e-02 2.56791512e-03 1.68726892e-03 -1.79171141e-03 3.02872934e-04 5.03870952e-03 1.16703825e-04 1.28327862e-03 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.84346084e-08 -1.58883758e-03 1.67311114e-03 -1.82265156e-04 1.10257515e-08 -1.16612681e-08 -1.81951971e-05 -3.15691473e-04 -1.01822949e-02 -5.85606615e-02 8.94327419e-03 -2.52830092e-02 2.17287632e-02 -2.32902181e-02 6.58424181e-02 -5.49555373e-02 -2.71258566e-03 -1.79171141e-03 1.88376738e-03 -2.66869372e-04 -5.32548897e-03 -1.16710492e-04 -1.28335193e-03 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.84379467e-08 1.67311114e-03 -1.58902874e-03 1.82275569e-04 -1.16612681e-08 1.10270838e-08 -1.81580887e-05 3.15711584e-04 -8.39046569e-05 1.90007492e-03 -9.03859080e-05 4.23268660e-04 -4.47114661e-04 9.23729286e-04 -2.56791512e-03 2.71258566e-03 -3.85070245e-04 -4.40407590e-04 4.65219160e-04 -4.61108159e-05 -8.40894886e-04 -1.31985289e-05 -1.45525993e-04 -2.12015265e-09 -5.16210197e-05 5.16239687e-05 7.46569843e-09 1.82265156e-04 -1.82275569e-04 1.93393473e-05 -1.39493296e-09 1.39501265e-09 1.89611125e-09 3.31912158e-05 -5.51093043e-05 1.24798564e-03 -1.82194626e-04 2.75538661e-04 -2.54874539e-04 5.74856584e-04 -1.68726892e-03 1.79171141e-03 -4.40407590e-04 1.59491888e-05 -5.00815429e-06 -1.33371658e-04 -6.63126188e-04 7.98420174e-10 8.80332117e-09 -5.24241994e-06 3.12270601e-09 -3.30600061e-09 1.81761239e-05 -1.10257515e-08 1.16612681e-08 -1.39493296e-09 -3.71979589e-06 3.89640841e-06 -1.36215115e-10 -2.14391725e-09 5.82140381e-05 -1.31829433e-03 1.92459060e-04 -2.54874539e-04 3.03490961e-04 -6.07242707e-04 1.79171141e-03 -1.88376738e-03 4.65219160e-04 -5.00815429e-06 1.64984372e-05 -5.28411653e-05 7.11108302e-04 -7.98465787e-10 -8.80382409e-09 5.24271943e-06 -3.30600061e-09 3.12308373e-09 -1.81771622e-05 1.16612681e-08 -1.10270838e-08 1.39501265e-09 3.89640841e-06 -3.72024107e-06 -1.35962382e-10 2.14405527e-09 -9.02445613e-06 2.04364613e-04 -1.39761499e-05 -5.73358429e-05 -1.44040271e-04 9.82492296e-05 -3.02872934e-04 2.66869372e-04 -4.61108159e-05 -1.33371658e-04 -5.28411653e-05 5.20444142e-04 -1.24452527e-04 -1.30595078e-09 -1.43993157e-08 -5.24782727e-06 -5.23731202e-06 1.81951971e-05 1.81580887e-05 1.89611125e-09 -1.36215115e-10 -1.35962382e-10 -7.61642683e-06 3.72934049e-09 -1.64573514e-04 3.72687308e-03 -2.54874539e-04 8.22844098e-04 -8.57981608e-04 1.79171141e-03 -5.03870952e-03 5.32548897e-03 -8.40894886e-04 -6.63126188e-04 7.11108302e-04 -1.24452527e-04 -1.74229644e-03 -2.28605226e-05 -2.52058414e-04 -3.30600061e-09 -8.94099293e-05 8.94156361e-05 1.16612681e-08 3.15691473e-04 -3.15711584e-04 3.31912158e-05 -2.14391725e-09 2.14405527e-09 3.72934049e-09 5.76652620e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 3 4 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 38 51 64 76 89 102 115 128 141 152 165 191 217 242 268 294 319 345 371 397 423 449 473 499 +-2 2 1 169 + 1.05694937e-04 1.01846201e-03 -1.02234563e-04 4.92695537e-04 -1.01630021e-04 3.41676576e-04 -1.64663026e-03 3.39656147e-04 -6.42072371e-05 -4.82545062e-05 9.95362474e-06 1.11328264e-04 -4.79691639e-05 1.01846201e-03 9.64623719e-03 -9.63021322e-04 4.64105578e-03 -9.57326709e-04 3.19865698e-03 -1.54151784e-02 3.17974243e-03 -5.11976979e-04 -3.84772768e-04 7.93684164e-05 8.87711588e-04 -3.82497499e-04 1.02234563e-04 9.63021322e-04 3.55266455e-05 4.92456733e-04 -1.01580762e-04 -1.30465172e-04 -1.63361432e-03 3.36971304e-04 -8.01689519e-05 3.74037657e-05 -7.71540478e-06 1.04625144e-04 -4.50809210e-05 -4.92695537e-04 -4.64105578e-03 4.92456733e-04 -2.23556826e-03 4.89544699e-04 -1.63361432e-03 7.40338077e-03 -1.62395430e-03 2.43023355e-04 2.01378030e-04 -4.50809210e-05 -4.21463536e-04 2.00187226e-04 1.01630021e-04 9.57326709e-04 -1.01580762e-04 4.89544699e-04 3.67315693e-05 3.36971304e-04 -1.62395430e-03 -1.34462236e-04 -5.01292722e-05 -4.50809210e-05 -7.87225786e-06 1.21076184e-04 3.79385035e-05 -3.41676576e-04 -3.19865698e-03 -1.30465172e-04 -1.63361432e-03 3.36971304e-04 4.78709131e-04 5.40861892e-03 -1.11565463e-03 2.53943149e-04 -1.37347290e-04 2.83311030e-05 -3.24768438e-04 1.39936346e-04 1.64663026e-03 1.54151784e-02 -1.63361432e-03 7.40338077e-03 -1.62395430e-03 5.40861892e-03 -2.44645724e-02 5.37663625e-03 -7.42108438e-04 -6.20692820e-04 1.39936346e-04 1.28702941e-03 -6.17022490e-04 -3.39656147e-04 -3.17974243e-03 3.36971304e-04 -1.62395430e-03 -1.34462236e-04 -1.11565463e-03 5.37663625e-03 4.91942728e-04 1.53077287e-04 1.39936346e-04 2.88440567e-05 -3.80215955e-04 -1.39007178e-04 -6.42072371e-05 -5.11976979e-04 8.01689519e-05 -2.43023355e-04 5.01292722e-05 -2.53943149e-04 7.42108438e-04 -1.53077287e-04 -1.38041243e-05 2.64080377e-06 -5.44727773e-07 2.40405692e-05 -1.03586094e-05 -4.82545062e-05 -3.84772768e-04 -3.74037657e-05 -2.01378030e-04 4.50809210e-05 1.37347290e-04 6.20692820e-04 -1.39936346e-04 2.64080377e-06 -3.60026661e-05 7.76173436e-06 1.05107228e-05 -2.83515079e-06 9.95362474e-06 7.93684164e-05 7.71540478e-06 4.50809210e-05 7.87225786e-06 -2.83311030e-05 -1.39936346e-04 -2.88440567e-05 -5.44727773e-07 7.76173436e-06 2.46623871e-08 9.42846477e-07 7.80475496e-06 1.11328264e-04 8.87711588e-04 -1.04625144e-04 4.21463536e-04 -1.21076184e-04 3.24768438e-04 -1.28702941e-03 3.80215955e-04 2.40405692e-05 1.05107228e-05 9.42846477e-07 -4.15488683e-05 2.95237108e-06 -4.79691639e-05 -3.82497499e-04 4.50809210e-05 -2.00187226e-04 -3.79385035e-05 -1.39936346e-04 6.17022490e-04 1.39007178e-04 -1.03586094e-05 -2.83515079e-06 7.80475496e-06 2.95237108e-06 -3.59690363e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 -2 1 169 + 4.65392247e-07 4.80012061e-06 2.54741091e-06 -1.61220248e-06 5.10916922e-07 -8.12903714e-06 5.14469566e-06 -1.63038582e-06 1.17368773e-06 -1.65025534e-06 5.22976106e-07 4.69760964e-07 -3.30980516e-07 4.80012061e-06 4.94661558e-05 2.63146656e-05 -1.66539952e-05 5.27775392e-06 -8.38686265e-05 5.30786797e-05 -1.68209614e-05 1.21421163e-05 -1.70723368e-05 5.41032894e-06 4.85980393e-06 -3.42408275e-06 -2.54741091e-06 -2.63146656e-05 -1.38532533e-05 8.87817958e-06 -2.81354993e-06 4.43073921e-05 -2.83886138e-05 8.99652702e-06 -6.29450610e-06 9.03141129e-06 -2.86211000e-06 -2.60380433e-06 1.83456815e-06 1.61220248e-06 1.66539952e-05 8.87817958e-06 -5.44382032e-06 1.78063624e-06 -2.83886138e-05 1.74176289e-05 -5.69371166e-06 4.18400711e-06 -5.60622571e-06 1.83456815e-06 1.53222210e-06 -1.12440265e-06 -5.10916922e-07 -5.27775392e-06 -2.81354993e-06 1.78063624e-06 -3.89302872e-07 8.99652702e-06 -5.69371166e-06 1.25544811e-06 -1.32593769e-06 1.83456815e-06 -3.98617045e-07 -5.58884092e-07 2.52276296e-07 8.12903714e-06 8.38686265e-05 4.43073921e-05 -2.83886138e-05 8.99652702e-06 -1.41458118e-04 9.06146246e-05 -2.87163341e-05 2.01795922e-05 -2.89419304e-05 9.17187644e-06 8.34198936e-06 -5.87753380e-06 -5.14469566e-06 -5.30786797e-05 -2.83886138e-05 1.74176289e-05 -5.69371166e-06 9.06146246e-05 -5.56277279e-05 1.81739604e-05 -1.34003408e-05 1.79726991e-05 -5.87753380e-06 -4.91625544e-06 3.60466232e-06 1.63038582e-06 1.68209614e-05 8.99652702e-06 -5.69371166e-06 1.25544811e-06 -2.87163341e-05 1.81739604e-05 -4.03908894e-06 4.24665073e-06 -5.87753380e-06 1.28872042e-06 1.78820071e-06 -8.15603894e-07 1.17368773e-06 1.21421163e-05 6.29450610e-06 -4.18400711e-06 1.32593769e-06 -2.01795922e-05 1.34003408e-05 -4.24665073e-06 2.75576318e-06 -4.20150163e-06 1.33148181e-06 1.25592006e-06 -8.84886360e-07 -1.65025534e-06 -1.70723368e-05 -9.03141129e-06 5.60622571e-06 -1.83456815e-06 2.89419304e-05 -1.79726991e-05 5.87753380e-06 -4.20150163e-06 5.73914410e-06 -1.87901100e-06 -1.58817302e-06 1.16609774e-06 5.22976106e-07 5.41032894e-06 2.86211000e-06 -1.83456815e-06 3.98617045e-07 -9.17187644e-06 5.87753380e-06 -1.28872042e-06 1.33148181e-06 -1.87901100e-06 4.05379873e-07 5.80332529e-07 -2.60213840e-07 4.69760964e-07 4.85980393e-06 2.60380433e-06 -1.53222210e-06 5.58884092e-07 -8.34198936e-06 4.91625544e-06 -1.78820071e-06 1.25592006e-06 -1.58817302e-06 5.80332529e-07 4.03988503e-07 -3.42904635e-07 -3.30980516e-07 -3.42408275e-06 -1.83456815e-06 1.12440265e-06 -2.52276296e-07 5.87753380e-06 -3.60466232e-06 8.15603894e-07 -8.84886360e-07 1.16609774e-06 -2.60213840e-07 -3.42904635e-07 1.58904699e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 -2 2 169 + 9.38151096e-07 9.85545732e-06 5.02063362e-06 -1.16763047e-06 3.01677678e-06 -1.64280515e-05 3.82061208e-06 -9.87121708e-06 2.29599919e-06 -1.16712666e-06 3.01547510e-06 -7.70245670e-07 -7.01298055e-07 9.85545732e-06 1.03387001e-04 5.28760761e-05 -1.22971963e-05 3.17719496e-05 -1.72667064e-04 4.01565498e-05 -1.03751444e-04 2.42458447e-05 -1.23249049e-05 3.18435395e-05 -8.13382555e-06 -7.40573594e-06 -5.02063362e-06 -5.28760761e-05 -2.66231070e-05 6.29230223e-06 -1.62572593e-05 8.74393501e-05 -2.06576948e-05 5.33727543e-05 -1.19505203e-05 6.23258402e-06 -1.61029669e-05 4.18152145e-06 3.80721758e-06 1.16763047e-06 1.22971963e-05 6.29230223e-06 -1.03054104e-06 3.78089155e-06 -2.06576948e-05 3.41868542e-06 -1.24127070e-05 2.95860988e-06 -1.02839968e-06 3.80721758e-06 -1.07601219e-06 -6.17940387e-07 -3.01677678e-06 -3.17719496e-05 -1.62572593e-05 3.78089155e-06 -9.33575543e-06 5.33727543e-05 -1.24127070e-05 3.06847921e-05 -7.64408419e-06 3.80721758e-06 -9.39144258e-06 2.24508433e-06 2.18413358e-06 1.64280515e-05 1.72667064e-04 8.74393501e-05 -2.06576948e-05 5.33727543e-05 -2.86348971e-04 6.76251628e-05 -1.74721392e-04 3.94173245e-05 -2.05430093e-05 5.30764444e-05 -1.37764913e-05 -1.25433052e-05 -3.82061208e-06 -4.01565498e-05 -2.06576948e-05 3.41868542e-06 -1.24127070e-05 6.76251628e-05 -1.12983818e-05 4.06343175e-05 -9.74223980e-06 3.42714512e-06 -1.25433052e-05 3.53598037e-06 2.05928825e-06 9.87121708e-06 1.03751444e-04 5.33727543e-05 -1.24127070e-05 3.06847921e-05 -1.74721392e-04 4.06343175e-05 -1.00556884e-04 2.51707742e-05 -1.25433052e-05 3.09801277e-05 -7.42009640e-06 -7.20493539e-06 2.29599919e-06 2.42458447e-05 1.19505203e-05 -2.95860988e-06 7.64408419e-06 -3.94173245e-05 9.74223980e-06 -2.51707742e-05 5.11487143e-06 -2.88005699e-06 7.44112911e-06 -2.02327104e-06 -1.84216037e-06 -1.16712666e-06 -1.23249049e-05 -6.23258402e-06 1.02839968e-06 -3.80721758e-06 2.05430093e-05 -3.42714512e-06 1.25433052e-05 -2.88005699e-06 1.01541745e-06 -3.79943167e-06 1.09418562e-06 6.21546102e-07 3.01547510e-06 3.18435395e-05 1.61029669e-05 -3.80721758e-06 9.39144258e-06 -5.30764444e-05 1.25433052e-05 -3.09801277e-05 7.44112911e-06 -3.79943167e-06 9.36135759e-06 -2.27290081e-06 -2.21446883e-06 -7.70245670e-07 -8.13382555e-06 -4.18152145e-06 1.07601219e-06 -2.24508433e-06 1.37764913e-05 -3.53598037e-06 7.42009640e-06 -2.02327104e-06 1.09418562e-06 -2.27290081e-06 4.65877559e-07 5.93034907e-07 -7.01298055e-07 -7.40573594e-06 -3.80721758e-06 6.17940387e-07 -2.18413358e-06 1.25433052e-05 -2.05928825e-06 7.20493539e-06 -1.84216037e-06 6.21546102e-07 -2.21446883e-06 5.93034907e-07 3.54488950e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 -1 0 676 + 1.70459777e-04 1.56791653e-03 6.51843036e-04 -3.25613709e-04 -3.26214862e-04 -2.13410893e-03 1.06604671e-03 1.06801486e-03 9.04416656e-05 -1.04332897e-04 -1.04525518e-04 -9.63083198e-08 5.22134005e-05 1.54917794e-06 1.65268354e-05 8.14861929e-06 -1.36476701e-06 -4.88866902e-06 -2.72196659e-05 4.55887073e-06 1.63301208e-05 3.70720664e-06 -1.33426066e-06 -4.77939364e-06 -1.32193676e-06 8.00474108e-07 1.56791653e-03 1.39684405e-02 5.79508335e-03 -2.89480516e-03 -2.90014959e-03 -1.87117436e-02 9.34703588e-03 9.36429252e-03 5.74121068e-04 -6.62302200e-04 -6.63524952e-04 -6.11362418e-07 3.31449151e-04 1.65268354e-05 1.75988914e-04 8.72188641e-05 -1.46078034e-05 -5.23259394e-05 -2.90594864e-04 4.86701205e-05 1.74338996e-04 3.98359713e-05 -1.43373635e-05 -5.13572094e-05 -1.42049364e-05 8.60153389e-06 -6.51843036e-04 -5.79508335e-03 -2.34326261e-03 1.28480592e-03 1.28717795e-03 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -1.96408637e-04 3.07727515e-04 3.08295646e-04 3.29006363e-07 -1.78370270e-04 -8.14861929e-06 -8.72188641e-05 -4.23780469e-05 7.23646537e-06 2.59214092e-05 1.42249135e-04 -2.42768857e-05 -8.69611138e-05 -1.88449162e-05 6.99095125e-06 2.50419644e-05 7.06581405e-06 -4.27857170e-06 3.25613709e-04 2.89480516e-03 1.28480592e-03 -4.13017927e-04 -6.42981152e-04 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.82448989e-04 -8.05650461e-05 -1.78370270e-04 -4.88565785e-05 4.03187791e-05 1.36476701e-06 1.46078034e-05 7.23646537e-06 -3.83252426e-07 -4.34143293e-06 -2.42768857e-05 1.36504706e-06 1.45646342e-05 3.39998997e-06 -3.54161607e-07 -4.27857170e-06 -1.32414862e-06 2.12475122e-07 3.26214862e-04 2.90014959e-03 1.28717795e-03 -6.42981152e-04 -4.15389902e-04 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.82785829e-04 -1.78370270e-04 -8.12230588e-05 4.86174757e-05 4.05731748e-05 4.88866902e-06 5.23259394e-05 2.59214092e-05 -4.34143293e-06 -1.47225039e-05 -8.69611138e-05 1.45646342e-05 4.94703514e-05 1.21789474e-05 -4.27857170e-06 -1.44857897e-05 -3.73493356e-06 2.42614450e-06 2.13410893e-03 1.87117436e-02 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -2.41602476e-02 1.33539278e-02 1.33785820e-02 4.89632371e-04 -8.27524231e-04 -8.29052018e-04 -9.09370158e-07 4.93013567e-04 2.72196659e-05 2.90594864e-04 1.42249135e-04 -2.42768857e-05 -8.69611138e-05 -4.75732124e-04 8.11490441e-05 2.90680252e-04 6.36480888e-05 -2.35888913e-05 -8.44966808e-05 -2.38266875e-05 1.44278055e-05 -1.06604671e-03 -9.34703588e-03 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.33539278e-02 -4.09780267e-03 -6.68297344e-03 -5.17584298e-04 1.76574575e-04 4.93013567e-04 1.58070488e-04 -8.83667499e-05 -4.55887073e-06 -4.86701205e-05 -2.42768857e-05 1.36504706e-06 1.45646342e-05 8.11490441e-05 -4.80643689e-06 -4.86844218e-05 -1.14566753e-05 1.28173764e-06 1.44278055e-05 4.45052276e-06 -7.68963535e-07 -1.06801486e-03 -9.36429252e-03 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.33785820e-02 -6.68297344e-03 -4.12245634e-03 -5.18539870e-04 4.93013567e-04 1.78393315e-04 -1.57452132e-04 -8.91124179e-05 -1.63301208e-05 -1.74338996e-04 -8.69611138e-05 1.45646342e-05 4.94703514e-05 2.90680252e-04 -4.86844218e-05 -1.65605458e-04 -4.10384288e-05 1.44278055e-05 4.89351126e-05 1.26470735e-05 -8.19587035e-06 9.04416656e-05 5.74121068e-04 1.96408637e-04 -1.82448989e-04 -1.82785829e-04 -4.89632371e-04 5.17584298e-04 5.18539870e-04 -8.46265595e-05 7.62147618e-05 7.63554706e-05 5.58167229e-08 -3.02609464e-05 3.70720664e-06 3.98359713e-05 1.88449162e-05 -3.39998997e-06 -1.21789474e-05 -6.36480888e-05 1.14566753e-05 4.10384288e-05 7.91745545e-06 -3.21375708e-06 -1.15118512e-05 -3.43085394e-06 2.07748951e-06 -1.04332897e-04 -6.62302200e-04 -3.07727515e-04 8.05650461e-05 1.78370270e-04 8.27524231e-04 -1.76574575e-04 -4.93013567e-04 7.62147618e-05 -1.00416407e-04 -8.65665973e-05 9.01613453e-06 5.00780865e-05 -1.33426066e-06 -1.43373635e-05 -6.99095125e-06 3.54161607e-07 4.27857170e-06 2.35888913e-05 -1.28173764e-06 -1.44278055e-05 -3.21375708e-06 3.17144018e-07 4.16399463e-06 1.31939320e-06 -1.96728993e-07 -1.04525518e-04 -6.63524952e-04 -3.08295646e-04 1.78370270e-04 8.12230588e-05 8.29052018e-04 -4.93013567e-04 -1.78393315e-04 7.63554706e-05 -8.65665973e-05 -1.00735753e-04 -9.18419723e-06 5.01369399e-05 -4.77939364e-06 -5.13572094e-05 -2.50419644e-05 4.27857170e-06 1.44857897e-05 8.44966808e-05 -1.44278055e-05 -4.89351126e-05 -1.15118512e-05 4.16399463e-06 1.40703373e-05 3.69588729e-06 -2.40609272e-06 -9.63083198e-08 -6.11362418e-07 -3.29006363e-07 4.88565785e-05 -4.86174757e-05 9.09370158e-07 -1.58070488e-04 1.57452132e-04 5.58167229e-08 9.01613453e-06 -9.18419723e-06 -4.90871085e-06 3.78184949e-08 -1.32193676e-06 -1.42049364e-05 -7.06581405e-06 1.32414862e-06 3.73493356e-06 2.38266875e-05 -4.45052276e-06 -1.26470735e-05 -3.43085394e-06 1.31939320e-06 3.69588729e-06 8.44913030e-07 -7.05279096e-07 5.22134005e-05 3.31449151e-04 1.78370270e-04 -4.03187791e-05 -4.05731748e-05 -4.93013567e-04 8.83667499e-05 8.91124179e-05 -3.02609464e-05 5.00780865e-05 5.01369399e-05 3.78184949e-08 -2.54118772e-05 8.00474108e-07 8.60153389e-06 4.27857170e-06 -2.12475122e-07 -2.42614450e-06 -1.44278055e-05 7.68963535e-07 8.19587035e-06 2.07748951e-06 -1.96728993e-07 -2.40609272e-06 -7.05279096e-07 1.07253919e-07 6.52816183e-04 5.14598777e-03 1.83244406e-03 -1.93386568e-03 -6.10366854e-04 -5.59049427e-03 5.89991542e-03 1.86213182e-03 4.35268461e-05 -2.05247358e-04 -6.47801892e-05 9.75148842e-05 6.83656254e-05 1.70227538e-04 1.56599930e-03 6.51015093e-04 -3.25814943e-04 -3.25214596e-04 -2.13153159e-03 1.06677226e-03 1.06480662e-03 9.03864428e-05 -1.04469411e-04 -1.04276916e-04 9.62499139e-08 5.21876954e-05 5.14598777e-03 3.63570199e-02 1.32316138e-02 -1.39639536e-02 -4.40730425e-03 -3.80643669e-02 4.01711431e-02 1.26788197e-02 -1.74473072e-04 8.22713804e-04 2.59665003e-04 -3.90878801e-04 -2.74036870e-04 1.56599930e-03 1.39540110e-02 5.78874775e-03 -2.89710721e-03 -2.89176899e-03 -1.86929580e-02 9.35530547e-03 9.33806736e-03 5.74270178e-04 -6.63746306e-04 -6.62523286e-04 6.11523737e-07 3.31574473e-04 -1.83244406e-03 -1.32316138e-02 -4.33758697e-03 5.51586552e-03 1.74091796e-03 1.25437761e-02 -1.61793373e-02 -5.10652387e-03 1.37594005e-04 -6.72141510e-05 -2.12141362e-05 -3.45003151e-05 -2.41874422e-05 -6.51015093e-04 -5.78874775e-03 -2.34057715e-03 1.28572766e-03 1.28335857e-03 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -1.96448112e-04 3.08295628e-04 3.07727561e-04 -3.28946782e-07 -1.78358336e-04 1.93386568e-03 1.39639536e-02 5.51586552e-03 -4.93215723e-03 -1.83727381e-03 -1.61793373e-02 1.42877913e-02 5.38915835e-03 9.69826545e-05 5.58616730e-05 -2.41874422e-05 -1.03419888e-04 -1.86069055e-05 3.25814943e-04 2.89710721e-03 1.28572766e-03 -4.15018849e-04 -6.42285263e-04 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.82741080e-04 -8.12948157e-05 -1.78358336e-04 -4.85777434e-05 4.06108259e-05 6.10366854e-04 4.40730425e-03 1.74091796e-03 -1.83727381e-03 3.09118385e-04 -5.10652387e-03 5.38915835e-03 -1.08610900e-03 3.06096739e-05 -2.41874422e-05 1.24862303e-04 5.56247411e-05 -1.31773148e-04 3.25214596e-04 2.89176899e-03 1.28335857e-03 -6.42285263e-04 -4.12649712e-04 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.82404361e-04 -1.78358336e-04 -8.06369221e-05 4.88168847e-05 4.03565362e-05 5.59049427e-03 3.80643669e-02 1.25437761e-02 -1.61793373e-02 -5.10652387e-03 -3.49452933e-02 4.59996355e-02 1.45184090e-02 -5.97170549e-04 1.51353952e-03 4.77703477e-04 -5.70330471e-04 -3.99846645e-04 2.13153159e-03 1.86929580e-02 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -2.41369597e-02 1.33658221e-02 1.33411942e-02 4.90141923e-04 -8.29516416e-04 -8.27987948e-04 9.09635785e-07 4.93213898e-04 -5.89991542e-03 -4.01711431e-02 -1.61793373e-02 1.42877913e-02 5.38915835e-03 4.59996355e-02 -3.99037200e-02 -1.53219699e-02 8.78837518e-05 -1.56355849e-03 -3.99846645e-04 9.15016435e-04 5.20804042e-04 -1.06677226e-03 -9.35530547e-03 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.33658221e-02 -4.11975812e-03 -6.67689653e-03 -5.18619923e-04 1.78822237e-04 4.93213898e-04 1.57344700e-04 -8.93306502e-05 -1.86213182e-03 -1.26788197e-02 -5.10652387e-03 5.38915835e-03 -1.08610900e-03 1.45184090e-02 -1.53219699e-02 3.80596920e-03 2.77378774e-05 -3.99846645e-04 -4.22897547e-04 9.11439787e-05 4.46303965e-04 -1.06480662e-03 -9.33806736e-03 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.33411942e-02 -6.67689653e-03 -4.09512968e-03 -5.17664313e-04 4.93213898e-04 1.77002966e-04 -1.57963593e-04 -8.85850601e-05 4.35268461e-05 -1.74473072e-04 -1.37594005e-04 -9.69826545e-05 -3.06096739e-05 5.97170549e-04 -8.78837518e-05 -2.77378774e-05 1.15988275e-04 2.09825232e-04 6.62250580e-05 -1.87050790e-04 -1.31137357e-04 9.03864428e-05 5.74270178e-04 1.96448112e-04 -1.82741080e-04 -1.82404361e-04 -4.90141923e-04 5.18619923e-04 5.17664313e-04 -8.44672508e-05 7.61101121e-05 7.59698714e-05 -5.55509065e-08 -3.01202741e-05 -2.05247358e-04 8.22713804e-04 6.72141510e-05 -5.58616730e-05 2.41874422e-05 -1.51353952e-03 1.56355849e-03 3.99846645e-04 2.09825232e-04 -1.06750700e-03 -3.68137532e-04 5.01233522e-04 3.92324757e-04 -1.04469411e-04 -6.63746306e-04 -3.08295628e-04 8.12948157e-05 1.78358336e-04 8.29516416e-04 -1.78822237e-04 -4.93213898e-04 7.61101121e-05 -1.00501109e-04 -8.62860668e-05 9.20640124e-06 5.00150775e-05 -6.47801892e-05 2.59665003e-04 2.12141362e-05 2.41874422e-05 -1.24862303e-04 -4.77703477e-04 3.99846645e-04 4.22897547e-04 6.62250580e-05 -3.68137532e-04 -1.73041102e-05 2.25212181e-04 2.82403045e-05 -1.04276916e-04 -6.62523286e-04 -3.07727561e-04 1.78358336e-04 8.06369221e-05 8.27987948e-04 -4.93213898e-04 -1.77002966e-04 7.59698714e-05 -8.62860668e-05 -1.00182833e-04 -9.03884807e-06 4.99565381e-05 9.75148842e-05 -3.90878801e-04 3.45003151e-05 1.03419888e-04 -5.56247411e-05 5.70330471e-04 -9.15016435e-04 -9.11439787e-05 -1.87050790e-04 5.01233522e-04 2.25212181e-04 -1.67087006e-04 -2.02316254e-04 9.62499139e-08 6.11523737e-07 3.28946782e-07 4.85777434e-05 -4.88168847e-05 -9.09635785e-07 -1.57344700e-04 1.57963593e-04 -5.55509065e-08 9.20640124e-06 -9.03884807e-06 -4.93388686e-06 -3.76829102e-08 6.83656254e-05 -2.74036870e-04 2.41874422e-05 1.86069055e-05 1.31773148e-04 3.99846645e-04 -5.20804042e-04 -4.46303965e-04 -1.31137357e-04 3.92324757e-04 2.82403045e-05 -2.02316254e-04 -2.03482101e-05 5.21876954e-05 3.31574473e-04 1.78358336e-04 -4.06108259e-05 -4.03565362e-05 -4.93213898e-04 8.93306502e-05 8.85850601e-05 -3.01202741e-05 5.00150775e-05 4.99565381e-05 -3.76829102e-08 -2.53658797e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 -1 1 664 + 2.50820093e-03 1.64061116e-02 9.26607928e-03 4.53731191e-06 -4.00819514e-06 -2.59561676e-02 -1.27099310e-05 1.12277676e-05 -7.32519544e-05 -6.21273115e-08 5.48823605e-08 5.29685325e-05 5.40087053e-04 2.58127029e-04 5.99380116e-05 -5.16900231e-05 -8.83584532e-04 -2.05171462e-04 1.76938096e-04 8.66376762e-05 3.65634888e-05 -3.15320366e-05 1.08793549e-06 -7.32185074e-06 1.64061116e-02 8.10260212e-02 5.00551051e-02 2.45104340e-05 -2.16521598e-05 -1.17988572e-01 -5.77753480e-05 5.10378994e-05 -1.25535498e-02 -1.06470647e-05 9.40546164e-06 -5.72525213e-10 4.60556313e-09 5.40087053e-04 5.48175383e-03 2.60145270e-03 6.04066544e-04 -5.20941766e-04 -8.90431324e-03 -2.06761312e-03 1.78309168e-03 8.23213736e-04 3.47418900e-04 -2.99611056e-04 1.03373437e-05 -6.95707499e-05 -9.26607928e-03 -5.00551051e-02 -3.02967924e-02 -1.64169660e-05 1.45025082e-05 7.61311007e-02 4.17454737e-05 -3.68773424e-05 4.85780563e-03 4.20142599e-06 -3.71147842e-06 2.30298846e-10 -1.85259243e-09 -2.58127029e-04 -2.60145270e-03 -1.23426507e-03 -3.01525975e-04 2.60033395e-04 4.20984652e-03 1.02921026e-03 -8.87582033e-04 -3.77467627e-04 -1.71305676e-04 1.47732535e-04 -5.42224830e-06 3.64919549e-05 -4.53731191e-06 -2.45104340e-05 -1.64169660e-05 3.22985843e-03 7.10142892e-09 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 2.51964791e-06 -1.66164344e-04 -1.85259243e-09 -8.13664448e-08 7.18771226e-08 -5.99380116e-05 -6.04066544e-04 -3.01525975e-04 -5.73882627e-06 6.03806765e-05 1.02921026e-03 1.64704278e-05 -2.06099696e-04 -1.06573720e-04 4.73872980e-06 3.64919549e-05 9.66694122e-06 -9.48932214e-07 4.00819514e-06 2.16521598e-05 1.45025082e-05 7.10142892e-09 3.22986019e-03 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 -2.22582020e-06 -1.85259243e-09 -1.66164805e-04 -7.18781294e-08 -8.13657562e-08 5.16900231e-05 5.20941766e-04 2.60033395e-04 6.03806765e-05 1.22048011e-05 -8.87582033e-04 -2.06099696e-04 -4.47772488e-05 9.19082550e-05 3.64919549e-05 1.55832264e-05 1.05083006e-05 3.61848044e-06 2.59561676e-02 1.17988572e-01 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -1.70063455e-01 -9.53613771e-05 8.42408491e-05 -2.33026297e-02 -2.06046353e-05 1.82018342e-05 -1.15319380e-09 9.27663400e-09 8.83584532e-04 8.90431324e-03 4.20984652e-03 1.02921026e-03 -8.87582033e-04 -1.43704396e-02 -3.51591755e-03 3.03209690e-03 1.26237663e-03 5.74304067e-04 -4.95274863e-04 1.82134334e-05 -1.22577159e-04 1.27099310e-05 5.77753480e-05 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -9.53613771e-05 2.46831012e-02 4.12501336e-08 -1.28671159e-05 1.71734103e-03 9.27663400e-09 8.40933269e-07 -7.42864136e-07 2.05171462e-04 2.06761312e-03 1.02921026e-03 1.64704278e-05 -2.06099696e-04 -3.51591755e-03 -4.53155957e-05 7.04063654e-04 3.58626808e-04 -2.07188854e-05 -1.22577159e-04 -3.35863392e-05 4.14896366e-06 -1.12277676e-05 -5.10378994e-05 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 8.42408491e-05 4.12501336e-08 2.46831115e-02 1.13666224e-05 9.27663400e-09 1.71734334e-03 7.42869178e-07 8.40929821e-07 -1.76938096e-04 -1.78309168e-03 -8.87582033e-04 -2.06099696e-04 -4.47772488e-05 3.03209690e-03 7.04063654e-04 1.63914519e-04 -3.09276659e-04 -1.22577159e-04 -5.71457522e-05 -3.62590608e-05 -1.32694463e-05 -7.32519544e-05 -1.25535498e-02 -4.85780563e-03 -2.51964791e-06 2.22582020e-06 2.33026297e-02 1.28671159e-05 -1.13666224e-05 -3.95982519e-03 -4.38332623e-06 3.87216643e-06 -2.94276911e-10 2.36725102e-09 8.66376762e-05 8.23213736e-04 3.77467627e-04 1.06573720e-04 -9.19082550e-05 -1.26237663e-03 -3.58626808e-04 3.09276659e-04 5.56549809e-05 3.66023661e-05 -3.15655642e-05 1.46433070e-06 -9.85500605e-06 -6.21273115e-08 -1.06470647e-05 -4.20142599e-06 1.66164344e-04 1.85259243e-09 2.06046353e-05 -1.71734103e-03 -9.27663400e-09 -4.38332623e-06 1.20838436e-03 3.28410752e-09 6.28875997e-07 -5.55538330e-07 3.65634888e-05 3.47418900e-04 1.71305676e-04 -4.73872980e-06 -3.64919549e-05 -5.74304067e-04 2.07188854e-05 1.22577159e-04 3.66023661e-05 -1.40701793e-05 -1.33934603e-05 -6.76858822e-06 2.83050622e-06 5.48823605e-08 9.40546164e-06 3.71147842e-06 1.85259243e-09 1.66164805e-04 -1.82018342e-05 -9.27663400e-09 -1.71734334e-03 3.87216643e-06 3.28410752e-09 1.20838518e-03 5.55540262e-07 6.28874675e-07 -3.15320366e-05 -2.99611056e-04 -1.47732535e-04 -3.64919549e-05 -1.55832264e-05 4.95274863e-04 1.22577159e-04 5.71457522e-05 -3.15655642e-05 -1.33934603e-05 -1.80503808e-05 -6.72097472e-06 -4.30698770e-06 -5.72525213e-10 -2.30298846e-10 8.13664448e-08 7.18781294e-08 1.15319380e-09 -8.40933269e-07 -7.42869178e-07 -2.94276911e-10 6.28875997e-07 5.55540262e-07 -7.58997251e-05 1.08793549e-06 1.03373437e-05 5.42224830e-06 -9.66694122e-06 -1.05083006e-05 -1.82134334e-05 3.35863392e-05 3.62590608e-05 1.46433070e-06 -6.76858822e-06 -6.72097472e-06 -1.17747996e-06 -1.02611066e-07 4.60556313e-09 1.85259243e-09 -7.18771226e-08 8.13657562e-08 -9.27663400e-09 7.42864136e-07 -8.40929821e-07 2.36725102e-09 -5.55538330e-07 6.28874675e-07 -7.58997251e-05 -7.32185074e-06 -6.95707499e-05 -3.64919549e-05 9.48932214e-07 -3.61848044e-06 1.22577159e-04 -4.14896366e-06 1.32694463e-05 -9.85500605e-06 2.83050622e-06 -4.30698770e-06 -1.02611066e-07 -5.02149975e-07 1.25348575e-02 6.21696002e-02 3.43082474e-02 -1.33051697e-02 1.14742634e-02 -8.49025200e-02 3.29262648e-02 -2.83953261e-02 -3.09097591e-03 2.38957985e-03 -2.06075300e-03 -1.18749038e-04 7.99185926e-04 2.50627515e-03 1.63954155e-02 9.25966720e-03 -4.53385554e-06 4.00514183e-06 -2.59395698e-02 1.27009168e-05 -1.12198045e-05 -7.27294924e-05 6.16798881e-08 -5.44871132e-08 6.21696002e-02 1.55478993e-01 1.14330614e-01 -4.43388495e-02 3.82374406e-02 -1.72390312e-01 6.68551305e-02 -5.76552866e-02 -3.60150937e-02 2.78426441e-02 -2.40112556e-02 -1.38362700e-03 9.31186682e-03 1.63954155e-02 8.09939371e-02 5.00301775e-02 -2.44965173e-05 2.16398660e-05 -1.17947808e-01 5.77513548e-05 -5.10167042e-05 -1.25415667e-02 1.06361588e-05 -9.39582747e-06 -5.71898835e-10 4.60052435e-09 -3.43082474e-02 -1.14330614e-01 -7.17850561e-02 3.35728936e-02 -2.89529732e-02 1.37848658e-01 -6.68678020e-02 5.76662144e-02 1.54463932e-02 -1.41409224e-02 1.21950093e-02 7.86690705e-04 -5.29446092e-03 -9.25966720e-03 -5.00301775e-02 -3.02793851e-02 1.64061508e-05 -1.44929542e-05 7.60951540e-02 -4.17220445e-05 3.68566454e-05 4.85257292e-03 -4.19640178e-06 3.70704010e-06 2.29996550e-10 -1.85016066e-09 1.33051697e-02 4.43388495e-02 3.35728936e-02 1.76484815e-03 1.12283271e-02 -6.68678020e-02 -8.64215419e-03 -2.23636830e-02 -8.91679241e-03 1.78251437e-03 -5.29446092e-03 1.38451946e-03 5.96155178e-04 4.53385554e-06 2.44965173e-05 1.64061508e-05 3.22751825e-03 7.09625512e-09 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 -2.51640210e-06 -1.65565609e-04 -1.85016066e-09 8.10676010e-08 -7.16131295e-08 -1.14742634e-02 -3.82374406e-02 -2.89529732e-02 1.12283271e-02 5.10162621e-03 5.76662144e-02 -2.23636830e-02 -1.52880816e-02 7.68976470e-03 -5.29446092e-03 2.09132959e-04 1.72020906e-03 -8.11043912e-05 -4.00514183e-06 -2.16398660e-05 -1.44929542e-05 7.09625512e-09 3.22752002e-03 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 2.22295290e-06 -1.85016066e-09 -1.65566069e-04 7.16141349e-08 8.10669134e-08 8.49025200e-02 1.72390312e-01 1.37848658e-01 -6.68678020e-02 5.76662144e-02 -1.68208862e-01 9.19832552e-02 -7.93255642e-02 -4.64303995e-02 4.47162644e-02 -3.85629199e-02 -2.55890361e-03 1.72215269e-02 2.59395698e-02 1.17947808e-01 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -1.70014403e-01 9.53240449e-05 -8.42078704e-05 -2.32819729e-02 2.05842404e-05 -1.81838176e-05 -1.15193620e-09 9.26651742e-09 -3.29262648e-02 -6.68551305e-02 -6.68678020e-02 -8.64215419e-03 -2.23636830e-02 9.19832552e-02 3.33036943e-02 3.07634512e-02 2.97433638e-02 -2.49611106e-03 1.72215269e-02 -5.78402617e-03 -8.34814886e-04 -1.27009168e-05 -5.77513548e-05 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 9.53240449e-05 2.46695060e-02 4.12311060e-08 1.28536127e-05 1.71440441e-03 9.26651742e-09 -8.39436678e-07 7.41542074e-07 2.83953261e-02 5.76552866e-02 5.76662144e-02 -2.23636830e-02 -1.52880816e-02 -7.93255642e-02 3.07634512e-02 4.24458229e-02 -2.56504199e-02 1.72215269e-02 2.62169616e-03 -6.69972540e-03 -1.01672673e-03 1.12198045e-05 5.10167042e-05 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -8.42078704e-05 4.12311060e-08 2.46695162e-02 -1.13546939e-05 9.26651742e-09 1.71440671e-03 -7.41547110e-07 -8.39433234e-07 -3.09097591e-03 -3.60150937e-02 -1.54463932e-02 8.91679241e-03 -7.68976470e-03 4.64303995e-02 -2.97433638e-02 2.56504199e-02 4.28637318e-03 -1.64682255e-03 1.42020553e-03 3.27581665e-06 -2.20463813e-05 -7.27294924e-05 -1.25415667e-02 -4.85257292e-03 2.51640210e-06 -2.22295290e-06 2.32819729e-02 -1.28536127e-05 1.13546939e-05 -3.95858081e-03 4.38119900e-06 -3.87028728e-06 -2.94092631e-10 2.36576860e-09 2.38957985e-03 2.78426441e-02 1.41409224e-02 -1.78251437e-03 5.29446092e-03 -4.47162644e-02 2.49611106e-03 -1.72215269e-02 -1.64682255e-03 3.06726892e-03 -1.05186769e-03 -9.55757605e-04 1.07667837e-03 6.16798881e-08 1.06361588e-05 4.19640178e-06 1.65565609e-04 1.85016066e-09 -2.05842404e-05 -1.71440441e-03 -9.26651742e-09 4.38119900e-06 1.20748131e-03 3.28228457e-09 -6.28346033e-07 5.55070168e-07 -2.06075300e-03 -2.40112556e-02 -1.21950093e-02 5.29446092e-03 -2.09132959e-04 3.85629199e-02 -1.72215269e-02 -2.62169616e-03 1.42020553e-03 -1.05186769e-03 2.75468015e-03 -7.50032544e-04 -1.16243491e-03 -5.44871132e-08 -9.39582747e-06 -3.70704010e-06 1.85016066e-09 1.65566069e-04 1.81838176e-05 -9.26651742e-09 -1.71440671e-03 -3.87028728e-06 3.28228457e-09 1.20748213e-03 -5.55072100e-07 -6.28344712e-07 -1.18749038e-04 -1.38362700e-03 -7.86690705e-04 -1.38451946e-03 -1.72020906e-03 2.55890361e-03 5.78402617e-03 6.69972540e-03 3.27581665e-06 -9.55757605e-04 -7.50032544e-04 1.13374084e-04 -1.43887294e-05 -5.71898835e-10 -2.29996550e-10 -8.10676010e-08 -7.16141349e-08 1.15193620e-09 8.39436678e-07 7.41547110e-07 -2.94092631e-10 -6.28346033e-07 -5.55072100e-07 -7.58100897e-05 7.99185926e-04 9.31186682e-03 5.29446092e-03 -5.96155178e-04 8.11043912e-05 -1.72215269e-02 8.34814886e-04 1.01672673e-03 -2.20463813e-05 1.07667837e-03 -1.16243491e-03 -1.43887294e-05 2.08072841e-04 4.60052435e-09 1.85016066e-09 7.16131295e-08 -8.10669134e-08 -9.26651742e-09 -7.41542074e-07 8.39433234e-07 2.36576860e-09 5.55070168e-07 -6.28344712e-07 -7.58100897e-05 + 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 25 + 0 24 50 76 102 128 154 180 206 232 258 284 308 332 356 382 408 434 460 486 512 538 564 590 616 640 664 +-1 -1 2 676 + 1.70355257e-04 1.56705372e-03 6.51449965e-04 3.26055349e-04 3.25454559e-04 -2.13288205e-03 -1.06752266e-03 -1.06555564e-03 9.04054609e-05 1.04503554e-04 1.04310995e-04 9.62880926e-08 5.22083963e-05 4.25955339e-07 4.38461509e-06 2.34089453e-06 1.47919145e-06 4.66862535e-07 -7.44955330e-06 -4.70730972e-06 -1.48572151e-06 1.08395201e-06 1.52004922e-06 4.79758069e-07 4.32412210e-07 3.03155066e-07 1.56705372e-03 1.39619473e-02 5.79205032e-03 2.89896245e-03 2.89362082e-03 -1.87027028e-02 -9.36083599e-03 -9.34358769e-03 5.74116144e-04 6.63645499e-04 6.62422665e-04 6.11473553e-07 3.31547263e-04 4.38461509e-06 4.50968444e-05 2.41308007e-05 1.52480489e-05 4.81259052e-06 -7.67037380e-05 -4.84684433e-05 -1.52976143e-05 1.11891140e-05 1.56907352e-05 4.95231122e-06 4.46358275e-06 3.12932358e-06 -6.51449965e-04 -5.79205032e-03 -2.34189260e-03 -1.28656563e-03 -1.28419500e-03 7.54453669e-03 4.15999622e-03 4.15233100e-03 -1.96381450e-04 -3.08292601e-04 -3.07724540e-04 -3.28989932e-07 -1.78381732e-04 -2.34089453e-06 -2.41308007e-05 -1.27852314e-05 -8.17754160e-06 -2.58099640e-06 4.07733653e-05 2.60731641e-05 8.22921433e-06 -5.84207448e-06 -8.35397799e-06 -2.63668326e-06 -2.40588100e-06 -1.68671235e-06 -3.26055349e-04 -2.89896245e-03 -1.28656563e-03 -4.15303763e-04 -6.42748746e-04 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.82757759e-04 -8.12752461e-05 -1.78381732e-04 4.86026399e-05 -4.06038848e-05 -1.47919145e-06 -1.52480489e-05 -8.17754160e-06 -5.01118181e-06 -1.63090979e-06 2.60731641e-05 1.59866897e-05 5.19997093e-06 -3.87058759e-06 -5.18054503e-06 -1.68671235e-06 -1.41689276e-06 -1.03319580e-06 -3.25454559e-04 -2.89362082e-03 -1.28419500e-03 -6.42748746e-04 -4.12932916e-04 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.82421010e-04 -1.78381732e-04 -8.06172662e-05 -4.88418014e-05 -4.03495161e-05 -4.66862535e-07 -4.81259052e-06 -2.58099640e-06 -1.63090979e-06 -3.58610331e-07 8.22921433e-06 5.19997093e-06 1.15249312e-06 -1.22163519e-06 -1.68671235e-06 -3.68783024e-07 -5.12446756e-07 -2.33030874e-07 2.13288205e-03 1.87027028e-02 7.54453669e-03 4.15999622e-03 4.15233100e-03 -2.41480897e-02 -1.33732595e-02 -1.33486179e-02 4.89739125e-04 8.29251221e-04 8.27723241e-04 9.09518461e-07 4.93150284e-04 7.44955330e-06 7.67037380e-05 4.07733653e-05 2.60731641e-05 8.22921433e-06 -1.29814203e-04 -8.29943124e-05 -2.61946721e-05 1.86717431e-05 2.66898096e-05 8.42384004e-06 7.68464101e-06 5.38753948e-06 1.06752266e-03 9.36083599e-03 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.33732595e-02 -4.12208254e-03 -6.68107836e-03 5.18554836e-04 1.78642802e-04 4.93150284e-04 -1.57413656e-04 8.92472444e-05 4.70730972e-06 4.84684433e-05 2.60731641e-05 1.59866897e-05 5.19997093e-06 -8.29943124e-05 -5.09149524e-05 -1.65521918e-05 1.23594266e-05 1.65572022e-05 5.38753948e-06 4.53201809e-06 3.30212973e-06 1.06555564e-03 9.34358769e-03 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.33486179e-02 -6.68107836e-03 -4.09743867e-03 5.17599346e-04 4.93150284e-04 1.76823765e-04 1.58032368e-04 8.85015542e-05 1.48572151e-06 1.52976143e-05 8.22921433e-06 5.19997093e-06 1.15249312e-06 -2.61946721e-05 -1.65521918e-05 -3.69575262e-06 3.90088330e-06 5.38753948e-06 1.18792019e-06 1.63481775e-06 7.50636722e-07 9.04054609e-05 5.74116144e-04 1.96381450e-04 1.82757759e-04 1.82421010e-04 -4.89739125e-04 -5.18554836e-04 -5.17599346e-04 -8.45382922e-05 -7.62385145e-05 -7.60980373e-05 -5.56923571e-08 -3.01969701e-05 1.08395201e-06 1.11891140e-05 5.84207448e-06 3.87058759e-06 1.22163519e-06 -1.86717431e-05 -1.23594266e-05 -3.90088330e-06 2.57652339e-06 3.90553575e-06 1.23266553e-06 1.16468609e-06 8.16536816e-07 1.04503554e-04 6.63645499e-04 3.08292601e-04 8.12752461e-05 1.78381732e-04 -8.29251221e-04 -1.78642802e-04 -4.93150284e-04 -7.62385145e-05 -1.00634733e-04 -8.64460597e-05 -9.19448866e-06 -5.00888212e-05 1.52004922e-06 1.56907352e-05 8.35397799e-06 5.18054503e-06 1.68671235e-06 -2.66898096e-05 -1.65572022e-05 -5.38753948e-06 3.90553575e-06 5.32549175e-06 1.73470375e-06 1.47416780e-06 1.07549317e-06 1.04310995e-04 6.62422665e-04 3.07724540e-04 1.78381732e-04 8.06172662e-05 -8.27723241e-04 -4.93150284e-04 -1.76823765e-04 -7.60980373e-05 -8.64460597e-05 -1.00315868e-04 9.02664158e-06 -5.00301015e-05 4.79758069e-07 4.95231122e-06 2.63668326e-06 1.68671235e-06 3.68783024e-07 -8.42384004e-06 -5.38753948e-06 -1.18792019e-06 1.23266553e-06 1.73470375e-06 3.76822455e-07 5.34033447e-07 2.41374865e-07 9.62880926e-08 6.11473553e-07 3.28989932e-07 -4.86026399e-05 4.88418014e-05 -9.09518461e-07 1.57413656e-04 -1.58032368e-04 -5.56923571e-08 -9.19448866e-06 9.02664158e-06 -4.92119020e-06 -3.77645891e-08 4.32412210e-07 4.46358275e-06 2.40588100e-06 1.41689276e-06 5.12446756e-07 -7.68464101e-06 -4.53201809e-06 -1.63481775e-06 1.16468609e-06 1.47416780e-06 5.34033447e-07 3.76352982e-07 3.15727900e-07 5.22083963e-05 3.31547263e-04 1.78381732e-04 4.06038848e-05 4.03495161e-05 -4.93150284e-04 -8.92472444e-05 -8.85015542e-05 -3.01969701e-05 -5.00888212e-05 -5.00301015e-05 -3.77645891e-08 -2.53974700e-05 3.03155066e-07 3.12932358e-06 1.68671235e-06 1.03319580e-06 2.33030874e-07 -5.38753948e-06 -3.30212973e-06 -7.50636722e-07 8.16536816e-07 1.07549317e-06 2.41374865e-07 3.15727900e-07 1.47357382e-07 1.00290138e-03 7.47514576e-03 2.80017721e-03 7.83272793e-04 2.80572538e-03 -8.32636664e-03 -2.32907275e-03 -8.34286421e-03 5.09296223e-05 5.37707300e-05 1.92609654e-04 -8.89751985e-05 5.38772693e-05 1.70331981e-04 1.56686156e-03 6.51407910e-04 3.25373633e-04 3.25974342e-04 -2.13275773e-03 -1.06529736e-03 -1.06726413e-03 9.04226467e-05 1.04298820e-04 1.04491378e-04 -9.62701417e-08 5.21927023e-05 7.47514576e-03 4.79374688e-02 1.86211962e-02 5.20876903e-03 1.86580916e-02 -5.08990549e-02 -1.42376149e-02 -5.09999045e-02 -6.75074262e-04 -7.12733262e-04 -2.55304898e-03 1.17936996e-03 -7.14145446e-04 1.56686156e-03 1.39605011e-02 5.79177921e-03 2.89295265e-03 2.89829366e-03 -1.87019949e-02 -9.34151388e-03 -9.35876032e-03 5.74275380e-04 6.62403131e-04 6.63626069e-04 -6.11412895e-07 3.31476517e-04 -2.80017721e-03 -1.86211962e-02 -6.52195395e-03 -2.20170871e-03 -7.88663932e-03 1.80795636e-02 6.20661890e-03 2.22324436e-02 2.46496442e-04 1.44574278e-04 5.17872860e-04 -1.82234345e-04 1.10348603e-04 -6.51407910e-04 -5.79177921e-03 -2.34194643e-03 -1.28396912e-03 -1.28633960e-03 7.54477708e-03 4.15163378e-03 4.15929858e-03 -1.96475381e-04 -3.07730625e-04 -3.08298762e-04 3.28963293e-07 -1.78346920e-04 -7.83272793e-04 -5.20876903e-03 -2.20170871e-03 7.33222324e-04 -2.20607109e-03 6.20661890e-03 -2.37278512e-03 6.21891647e-03 9.29206491e-06 1.53941828e-04 1.10348603e-04 -1.65311777e-05 1.54246843e-04 -3.25373633e-04 -2.89295265e-03 -1.28396912e-03 -4.12734671e-04 -6.42517511e-04 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.82432375e-04 -8.05847531e-05 -1.78346920e-04 4.88316606e-05 -4.03258258e-05 -2.80572538e-03 -1.86580916e-02 -7.88663932e-03 -2.20607109e-03 -6.55317566e-03 2.22324436e-02 6.21891647e-03 1.81675776e-02 3.32846776e-05 1.10348603e-04 5.18410518e-04 -3.05975264e-04 1.45011127e-04 -3.25974342e-04 -2.89829366e-03 -1.28633960e-03 -6.42517511e-04 -4.15104936e-04 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.82769185e-04 -1.78346920e-04 -8.12426797e-05 -4.85925779e-05 -4.05801425e-05 8.32636664e-03 5.08990549e-02 1.80795636e-02 6.20661890e-03 2.22324436e-02 -4.73857583e-02 -1.66940183e-02 -5.97988739e-02 -1.11843781e-03 -1.05219107e-03 -3.76900515e-03 1.67769231e-03 -1.01589524e-03 2.13275773e-03 1.87019949e-02 7.54477708e-03 4.15163378e-03 4.15929858e-03 -2.41491129e-02 -1.33465016e-02 -1.33711421e-02 4.90035601e-04 8.27789418e-04 8.29317695e-04 -9.09487945e-07 4.93077425e-04 2.32907275e-03 1.42376149e-02 6.20661890e-03 -2.37278512e-03 6.21891647e-03 -1.66940183e-02 7.62517269e-03 -1.67270952e-02 -2.46506614e-04 -4.20545105e-04 -1.01589524e-03 4.30983716e-04 -4.21378358e-04 1.06529736e-03 9.34151388e-03 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.33465016e-02 -4.09549370e-03 -6.67879068e-03 5.17649483e-04 1.76754004e-04 4.93077425e-04 -1.58001725e-04 8.84503696e-05 8.34286421e-03 5.09999045e-02 2.22324436e-02 6.21891647e-03 1.81675776e-02 -5.97988739e-02 -1.67270952e-02 -4.76224907e-02 -8.82999985e-04 -1.01589524e-03 -3.77592973e-03 1.81822595e-03 -1.05621280e-03 1.06726413e-03 9.35876032e-03 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.33711421e-02 -6.67879068e-03 -4.12013194e-03 5.18605175e-04 4.93077425e-04 1.78572980e-04 1.57383187e-04 8.91959377e-05 5.09296223e-05 -6.75074262e-04 -2.46496442e-04 -9.29206491e-06 -3.32846776e-05 1.11843781e-03 2.46506614e-04 8.82999985e-04 2.04300104e-04 -1.11558636e-04 -3.99609050e-04 3.52293629e-04 -2.13324826e-04 9.04226467e-05 5.74275380e-04 1.96475381e-04 1.82432375e-04 1.82769185e-04 -4.90035601e-04 -5.17649483e-04 -5.18605175e-04 -8.45554756e-05 -7.60865049e-05 -7.62269769e-05 5.56751504e-08 -3.01841932e-05 5.37707300e-05 -7.12733262e-04 -1.44574278e-04 -1.53941828e-04 -1.10348603e-04 1.05219107e-03 4.20545105e-04 1.01589524e-03 -1.11558636e-04 5.96970841e-05 -4.91031458e-04 3.12423597e-04 5.58383181e-05 1.04298820e-04 6.62403131e-04 3.07730625e-04 8.05847531e-05 1.78346920e-04 -8.27789418e-04 -1.76754004e-04 -4.93077425e-04 -7.60865049e-05 -1.00283317e-04 -8.64065121e-05 -9.02835932e-06 -5.00044961e-05 1.92609654e-04 -2.55304898e-03 -5.17872860e-04 -1.10348603e-04 -5.18410518e-04 3.76900515e-03 1.01589524e-03 3.77592973e-03 -3.99609050e-04 -4.91031458e-04 -1.56212310e-03 6.99937705e-04 -4.92236464e-04 1.04491378e-04 6.63626069e-04 3.08298762e-04 1.78346920e-04 8.12426797e-05 -8.29317695e-04 -4.93077425e-04 -1.78572980e-04 -7.62269769e-05 -8.64065121e-05 -1.00602073e-04 9.19612793e-06 -5.00631691e-05 -8.89751985e-05 1.17936996e-03 1.82234345e-04 1.65311777e-05 3.05975264e-04 -1.67769231e-03 -4.30983716e-04 -1.81822595e-03 3.52293629e-04 3.12423597e-04 6.99937705e-04 -2.06177814e-04 2.54415501e-04 -9.62701417e-08 -6.11412895e-07 -3.28963293e-07 -4.88316606e-05 4.85925779e-05 9.09487945e-07 1.58001725e-04 -1.57383187e-04 5.56751504e-08 -9.02835932e-06 9.19612793e-06 -4.92142382e-06 3.77367705e-08 5.38772693e-05 -7.14145446e-04 -1.10348603e-04 -1.54246843e-04 -1.45011127e-04 1.01589524e-03 4.21378358e-04 1.05621280e-03 -2.13324826e-04 5.58383181e-05 -4.92236464e-04 2.54415501e-04 5.99181374e-05 5.21927023e-05 3.31476517e-04 1.78346920e-04 4.03258258e-05 4.05801425e-05 -4.93077425e-04 -8.84503696e-05 -8.91959377e-05 -3.01841932e-05 -5.00044961e-05 -5.00631691e-05 3.77367705e-08 -2.53802836e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 -1 676 + 1.70032339e-04 1.56438760e-03 3.25106414e-04 -3.24810715e-04 -6.50539500e-04 -1.06450843e-03 1.06354021e-03 2.13008649e-03 -4.51901689e-05 -5.20954131e-05 -1.04338073e-04 -7.83664780e-05 1.04243172e-04 1.55851385e-06 1.66295777e-05 4.92005788e-06 -1.37267483e-06 -8.19277196e-06 -1.64391057e-05 4.58643928e-06 2.73740367e-05 -7.08847200e-07 -8.05353630e-07 -4.80673098e-06 -3.88968617e-06 1.34105712e-06 1.56438760e-03 1.39418779e-02 2.89123777e-03 -2.88860806e-03 -5.78538070e-03 -9.33705417e-03 9.32856169e-03 1.86834904e-02 -2.87325728e-04 -3.31230284e-04 -6.63396783e-04 -4.98265571e-04 6.62793393e-04 1.66295777e-05 1.77115785e-04 5.26723064e-05 -1.46953453e-05 -8.77087640e-05 -1.75536251e-04 4.89738535e-05 2.92299097e-04 -7.61857792e-06 -8.65581381e-06 -5.16619865e-05 -4.18057335e-05 1.44134704e-05 -3.25106414e-04 -2.89123777e-03 -4.13236729e-04 6.40831182e-04 1.28347366e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 1.33416548e-04 4.04298092e-05 8.09738924e-05 1.33939886e-04 -1.78166979e-04 -4.92005788e-06 -5.26723064e-05 -1.48222952e-05 4.36837728e-06 2.60725395e-05 4.98188420e-05 -1.46588531e-05 -8.74909612e-05 2.86090047e-06 2.44180532e-06 1.45738479e-05 1.24782749e-05 -4.30216698e-06 3.24810715e-04 2.88860806e-03 6.40831182e-04 -4.12070467e-04 -1.28230628e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 -4.91020348e-05 -4.03045720e-05 -1.78166979e-04 -1.82427008e-04 8.06496427e-05 1.37267483e-06 1.46953453e-05 4.36837728e-06 -3.83544228e-07 -7.27412558e-06 -1.46588531e-05 1.36709060e-06 2.44095992e-05 -5.52569527e-07 -2.12554477e-07 -4.30216698e-06 -3.62318724e-06 3.53941031e-07 6.50539500e-04 5.78538070e-03 1.28347366e-03 -1.28230628e-03 -2.34005912e-03 -4.15045840e-03 4.14668337e-03 7.53952843e-03 -9.83428554e-05 -1.78166979e-04 -3.08184344e-04 -1.70659072e-04 3.07904036e-04 8.19277196e-06 8.77087640e-05 2.60725395e-05 -7.27412558e-06 -4.25802042e-05 -8.74909612e-05 2.44095992e-05 1.42965355e-04 -3.29799602e-06 -4.30216698e-06 -2.51691043e-05 -1.99322035e-05 7.02207106e-06 1.06450843e-03 9.33705417e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -4.10220340e-03 6.66275086e-03 1.33443338e-02 -3.95566341e-04 -8.89305745e-05 -1.78112509e-04 -3.70530844e-04 4.92880524e-04 1.64391057e-05 1.75536251e-04 4.98188420e-05 -1.46588531e-05 -8.74909612e-05 -1.66815030e-04 4.90118334e-05 2.92525779e-04 -9.58879795e-06 -8.25113481e-06 -4.92466711e-05 -4.20899467e-05 1.45114593e-05 -1.06354021e-03 -9.32856169e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 6.66275086e-03 -4.09007772e-03 -1.33321966e-02 1.22606118e-04 8.85632582e-05 4.92880524e-04 5.27579766e-04 -1.77215506e-04 -4.58643928e-06 -4.89738535e-05 -1.46588531e-05 1.36709060e-06 2.44095992e-05 4.90118334e-05 -4.81673791e-06 -8.16134250e-05 1.87238440e-06 7.69946923e-07 1.45114593e-05 1.22064377e-05 -1.28209865e-06 -2.13008649e-03 -1.86834904e-02 -4.15045840e-03 4.14668337e-03 7.53952843e-03 1.33443338e-02 -1.33321966e-02 -2.41354632e-02 2.45558779e-04 4.92880524e-04 8.29624947e-04 4.26217284e-04 -8.28870365e-04 -2.73740367e-05 -2.92299097e-04 -8.74909612e-05 2.44095992e-05 1.42965355e-04 2.92525779e-04 -8.16134250e-05 -4.78250130e-04 1.11752748e-05 1.45114593e-05 8.49498403e-05 6.73207161e-05 -2.37006374e-05 -4.51901689e-05 -2.87325728e-04 -1.33416548e-04 4.91020348e-05 9.83428554e-05 3.95566341e-04 -1.22606118e-04 -2.45558779e-04 -2.48111523e-05 -1.49885919e-05 -3.00195488e-05 -3.44406887e-05 4.58130407e-05 -7.08847200e-07 -7.61857792e-06 -2.86090047e-06 5.52569527e-07 3.29799602e-06 9.58879795e-06 -1.87238440e-06 -1.11752748e-05 -3.65465272e-07 4.28432282e-07 2.55708629e-06 1.34172841e-06 -4.62591160e-07 -5.20954131e-05 -3.31230284e-04 -4.04298092e-05 4.03045720e-05 1.78166979e-04 8.89305745e-05 -8.85632582e-05 -4.92880524e-04 -1.49885919e-05 -2.52596577e-05 -4.98257614e-05 -2.59979782e-05 4.97970660e-05 -8.05353630e-07 -8.65581381e-06 -2.44180532e-06 2.12554477e-07 4.30216698e-06 8.25113481e-06 -7.69946923e-07 -1.45114593e-05 4.28432282e-07 1.07184747e-07 2.41993310e-06 2.16240153e-06 -1.96499380e-07 -1.04338073e-04 -6.63396783e-04 -8.09738924e-05 1.78166979e-04 3.08184344e-04 1.78112509e-04 -4.92880524e-04 -8.29624947e-04 -3.00195488e-05 -4.98257614e-05 -1.00174289e-04 -7.03543520e-05 8.59889057e-05 -4.80673098e-06 -5.16619865e-05 -1.45738479e-05 4.30216698e-06 2.51691043e-05 4.92466711e-05 -1.45114593e-05 -8.49498403e-05 2.55708629e-06 2.41993310e-06 1.41450362e-05 1.18681262e-05 -4.18379404e-06 -7.83664780e-05 -4.98265571e-04 -1.33939886e-04 1.82427008e-04 1.70659072e-04 3.70530844e-04 -5.27579766e-04 -4.26217284e-04 -3.44406887e-05 -2.59979782e-05 -7.03543520e-05 -6.46428973e-05 6.11562205e-05 -3.88968617e-06 -4.18057335e-05 -1.24782749e-05 3.62318724e-06 1.99322035e-05 4.20899467e-05 -1.22064377e-05 -6.73207161e-05 1.34172841e-06 2.16240153e-06 1.18681262e-05 9.14877353e-06 -3.45596958e-06 1.04243172e-04 6.62793393e-04 1.78166979e-04 -8.06496427e-05 -3.07904036e-04 -4.92880524e-04 1.77215506e-04 8.28870365e-04 4.58130407e-05 4.97970660e-05 8.59889057e-05 6.11562205e-05 -1.00017797e-04 1.34105712e-06 1.44134704e-05 4.30216698e-06 -3.53941031e-07 -7.02207106e-06 -1.45114593e-05 1.28209865e-06 2.37006374e-05 -4.62591160e-07 -1.96499380e-07 -4.18379404e-06 -3.45596958e-06 3.16386152e-07 6.51185581e-04 5.13476040e-03 6.07721589e-04 -1.92909898e-03 -1.82906816e-03 -1.85433090e-03 5.88622801e-03 5.58100560e-03 -1.06291332e-04 -6.82123778e-05 -6.46753170e-05 1.09366409e-05 2.05299746e-04 1.70655454e-04 1.56953167e-03 3.26323630e-04 -3.26620395e-04 -6.52319411e-04 -1.06831472e-03 1.06928627e-03 2.13555614e-03 -4.52239229e-05 -5.23059013e-05 -1.04464250e-04 -7.82350394e-05 1.04559252e-04 5.13476040e-03 3.62967791e-02 4.39019907e-03 -1.39358691e-02 -1.32132435e-02 -1.26330562e-02 4.01012837e-02 3.80218858e-02 4.22166662e-04 2.70925119e-04 2.56876663e-04 -4.34380215e-05 -8.15407115e-04 1.56953167e-03 1.39805932e-02 2.90068412e-03 -2.90332205e-03 -5.79845399e-03 -9.36531333e-03 9.37383033e-03 1.87212176e-02 -2.86869568e-04 -3.31792785e-04 -6.62649600e-04 -4.96269464e-04 6.63252226e-04 -6.07721589e-04 -4.39019907e-03 3.10492248e-04 1.82945805e-03 1.73459397e-03 -1.08977034e-03 -5.36740048e-03 -5.08908117e-03 6.36747860e-05 -1.31571261e-04 -1.24748811e-04 -1.31918523e-06 -2.47633981e-05 -3.26323630e-04 -2.90068412e-03 -4.14801776e-04 6.44440531e-04 1.28706313e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 1.33559419e-04 4.04998597e-05 8.08854715e-05 1.33606340e-04 -1.78561667e-04 1.92909898e-03 1.39358691e-02 1.82945805e-03 -4.92044970e-03 -5.50614543e-03 -5.36740048e-03 1.42571573e-02 1.61543402e-02 4.00153716e-05 1.79230314e-05 -2.47633981e-05 -1.35611577e-04 -5.39431980e-05 3.26620395e-04 2.90332205e-03 6.44440531e-04 -4.15973377e-04 -1.28823361e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 -4.91120363e-05 -4.06254571e-05 -1.78561667e-04 -1.82553690e-04 8.12100987e-05 1.82906816e-03 1.32132435e-02 1.73459397e-03 -5.50614543e-03 -4.33380761e-03 -5.08908117e-03 1.61543402e-02 1.25360230e-02 3.79404286e-05 -2.47633981e-05 2.05614019e-05 1.36520363e-04 -6.52683401e-05 6.52319411e-04 5.79845399e-03 1.28706313e-03 -1.28823361e-03 -2.34377996e-03 -4.16117676e-03 4.16496101e-03 7.54978362e-03 -9.80855301e-05 -1.78561667e-04 -3.07838138e-04 -1.69564494e-04 3.08118091e-04 1.85433090e-03 1.26330562e-02 -1.08977034e-03 -5.36740048e-03 -5.08908117e-03 3.81496142e-03 1.52646006e-02 1.44730753e-02 9.08343437e-05 4.45122659e-04 4.22041425e-04 -2.10845372e-05 -3.95793388e-04 1.06831472e-03 9.36531333e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -4.11536825e-03 6.69716546e-03 1.33754386e-02 -3.95693963e-04 -8.87661346e-05 -1.77281864e-04 -3.69139191e-04 4.93345668e-04 -5.88622801e-03 -4.01012837e-02 -5.36740048e-03 1.42571573e-02 1.61543402e-02 1.52646006e-02 -3.98308820e-02 -4.59420816e-02 -8.31537876e-04 -5.16237601e-04 -3.95793388e-04 3.80546279e-04 1.55372752e-03 -1.06928627e-03 -9.37383033e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 6.69716546e-03 -4.12754378e-03 -1.33876024e-02 1.22336657e-04 8.91341618e-05 4.93345668e-04 5.27505568e-04 -1.78178773e-04 -5.58100560e-03 -3.80218858e-02 -5.08908117e-03 1.61543402e-02 1.25360230e-02 1.44730753e-02 -4.59420816e-02 -3.49360679e-02 -7.88419602e-04 -3.95793388e-04 -4.74068527e-04 -2.33896713e-04 1.50484223e-03 -2.13555614e-03 -1.87212176e-02 -4.16117676e-03 4.16496101e-03 7.54978362e-03 1.33754386e-02 -1.33876024e-02 -2.41617270e-02 2.44328210e-04 4.93345668e-04 8.27412544e-04 4.22291964e-04 -8.28165009e-04 -1.06291332e-04 4.22166662e-04 -6.36747860e-05 -4.00153716e-05 -3.79404286e-05 -9.08343437e-05 8.31537876e-04 7.88419602e-04 -2.58318558e-04 -2.39753339e-04 -2.27321253e-04 2.86852491e-05 5.38471952e-04 -4.52239229e-05 -2.86869568e-04 -1.33559419e-04 4.91120363e-05 9.80855301e-05 3.95693963e-04 -1.22336657e-04 -2.44328210e-04 -2.48440244e-05 -1.52024209e-05 -3.03619565e-05 -3.45169245e-05 4.61310410e-05 -6.82123778e-05 2.70925119e-04 1.31571261e-04 -1.79230314e-05 2.47633981e-05 -4.45122659e-04 5.16237601e-04 3.95793388e-04 -2.39753339e-04 -1.99394457e-05 -2.78203501e-05 -1.25449301e-05 3.90601740e-04 -5.23059013e-05 -3.31792785e-04 -4.04998597e-05 4.06254571e-05 1.78561667e-04 8.87661346e-05 -8.91341618e-05 -4.93345668e-04 -1.52024209e-05 -2.55187535e-05 -5.02682615e-05 -2.62938797e-05 5.02974537e-05 -6.46753170e-05 2.56876663e-04 1.24748811e-04 2.47633981e-05 -2.05614019e-05 -4.22041425e-04 3.95793388e-04 4.74068527e-04 -2.27321253e-04 -2.78203501e-05 -1.69753779e-05 5.47169206e-05 3.66799122e-04 -1.04464250e-04 -6.62649600e-04 -8.08854715e-05 1.78561667e-04 3.07838138e-04 1.77281864e-04 -4.93345668e-04 -8.27412544e-04 -3.03619565e-05 -5.02682615e-05 -1.00743841e-04 -7.06737575e-05 8.68649192e-05 1.09366409e-05 -4.34380215e-05 1.31918523e-06 1.35611577e-04 -1.36520363e-04 2.10845372e-05 -3.80546279e-04 2.33896713e-04 2.86852491e-05 -1.25449301e-05 5.47169206e-05 2.06460806e-04 -6.79660102e-05 -7.82350394e-05 -4.96269464e-04 -1.33606340e-04 1.82553690e-04 1.69564494e-04 3.69139191e-04 -5.27505568e-04 -4.22291964e-04 -3.45169245e-05 -2.62938797e-05 -7.06737575e-05 -6.46369762e-05 6.16496861e-05 2.05299746e-04 -8.15407115e-04 2.47633981e-05 5.39431980e-05 6.52683401e-05 3.95793388e-04 -1.55372752e-03 -1.50484223e-03 5.38471952e-04 3.90601740e-04 3.66799122e-04 -6.79660102e-05 -1.06575861e-03 1.04559252e-04 6.63252226e-04 1.78561667e-04 -8.12100987e-05 -3.08118091e-04 -4.93345668e-04 1.78178773e-04 8.28165009e-04 4.61310410e-05 5.02974537e-05 8.68649192e-05 6.16496861e-05 -1.00901762e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 0 676 + 3.90477633e-02 1.43108181e-01 7.01149411e-02 6.86686256e-05 -7.01804978e-02 -1.48708178e-01 -1.45640658e-04 1.48847218e-01 -6.07213665e-03 -2.06392362e-05 2.10936488e-02 1.05566754e-02 2.06585336e-05 7.94007971e-04 6.10361191e-03 2.22896721e-03 8.62175147e-04 -2.22757974e-03 -6.72229135e-03 -2.60021436e-03 6.71810691e-03 4.88278053e-05 7.68246190e-05 -1.98489791e-04 -8.43250536e-05 -7.67767978e-05 1.43108181e-01 2.06881524e-01 1.43374834e-01 1.40417329e-04 -1.43508888e-01 -1.50412044e-01 -1.47309378e-04 1.50552678e-01 -1.38350338e-02 -4.70253795e-05 4.80607339e-02 2.40528121e-02 4.70693478e-05 6.10361191e-03 4.13286412e-02 1.55183640e-02 6.00257723e-03 -1.55087043e-02 -4.36624646e-02 -1.68888496e-02 4.36352859e-02 -3.59102661e-04 -5.65004406e-04 1.45978734e-03 6.20166132e-04 5.64652706e-04 -7.01149411e-02 -1.43374834e-01 -6.93144341e-02 -1.10488583e-04 1.12921202e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -7.11815146e-04 4.08396703e-05 -4.17388344e-02 -2.82459912e-02 -5.52750497e-05 -2.22896721e-03 -1.55183640e-02 -5.25705846e-03 -2.44970269e-03 6.32923379e-03 1.49230913e-02 7.06077634e-03 -1.82427461e-02 1.77058410e-04 8.90249758e-05 -2.30011539e-04 -4.14365150e-05 -3.77273752e-05 -6.86686256e-05 -1.40417329e-04 -1.10488583e-04 4.35011783e-02 1.10591889e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 2.42162472e-05 -1.46866461e-02 -5.52750497e-05 -4.20470853e-05 1.47003779e-02 -8.62175147e-04 -6.00257723e-03 -2.44970269e-03 1.28560878e-04 2.44817782e-03 7.06077634e-03 -5.99875540e-04 -7.05638119e-03 -2.03223120e-05 1.47160309e-04 -3.77273752e-05 3.52462601e-05 -1.47068706e-04 7.01804978e-02 1.43508888e-01 1.12921202e-01 1.10591889e-04 -6.95254957e-02 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 -2.47494145e-02 -5.52750497e-05 4.18053364e-02 1.35719689e-02 4.09429851e-05 2.22757974e-03 1.55087043e-02 6.32923379e-03 2.44817782e-03 -5.24917645e-03 -1.82427461e-02 -7.05638119e-03 1.49003730e-02 5.25062345e-05 -3.77273752e-05 2.30033339e-04 1.73886299e-04 8.89779927e-05 1.48708178e-01 1.50412044e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -3.55478592e-02 -1.55449155e-04 1.58871668e-01 1.91406441e-02 -4.42816606e-05 4.52566068e-02 4.12450375e-02 8.07130995e-05 6.72229135e-03 4.36624646e-02 1.49230913e-02 7.06077634e-03 -1.82427461e-02 -4.04969260e-02 -1.95981352e-02 5.06351974e-02 -7.96761349e-04 -9.01954522e-04 2.33035668e-03 8.85605054e-04 8.06331182e-04 1.45640658e-04 1.47309378e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -1.55449155e-04 1.23175252e-01 1.55594499e-04 -4.42246994e-05 3.71217044e-02 8.07130995e-05 7.67502875e-05 -3.71564128e-02 2.60021436e-03 1.68888496e-02 7.06077634e-03 -5.99875540e-04 -7.05638119e-03 -1.95981352e-02 2.58915792e-03 1.95859359e-02 -1.43436498e-04 -5.58002047e-04 8.06331182e-04 2.47435150e-04 5.57654706e-04 -1.48847218e-01 -1.50552678e-01 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 1.58871668e-01 1.55594499e-04 -3.58448071e-02 4.51983914e-02 8.07130995e-05 -4.53683706e-02 -4.12710932e-03 -4.44325219e-05 -6.71810691e-03 -4.36352859e-02 -1.82427461e-02 -7.05638119e-03 1.49003730e-02 5.06351974e-02 1.95859359e-02 -4.04338683e-02 3.70593187e-04 8.06331182e-04 -2.32921215e-03 -1.13081575e-03 -9.00950371e-04 -6.07213665e-03 -1.38350338e-02 7.11815146e-04 -2.42162472e-05 2.47494145e-02 -1.91406441e-02 4.42246994e-05 -4.51983914e-02 -7.64320723e-03 1.37779217e-05 -1.40812692e-02 -1.38387040e-02 -2.70811900e-05 4.88278053e-05 -3.59102661e-04 -1.77058410e-04 2.03223120e-05 -5.25062345e-05 7.96761349e-04 1.43436498e-04 -3.70593187e-04 1.51172622e-04 -1.09553462e-04 2.83050459e-04 2.26032678e-04 2.05799634e-04 -2.06392362e-05 -4.70253795e-05 -4.08396703e-05 1.46866461e-02 5.52750497e-05 4.42816606e-05 -3.71217044e-02 -8.07130995e-05 1.37779217e-05 -7.77558844e-03 -5.55643228e-05 -3.93143386e-05 7.83476102e-03 7.68246190e-05 -5.65004406e-04 -8.90249758e-05 -1.47160309e-04 3.77273752e-05 9.01954522e-04 5.58002047e-04 -8.06331182e-04 -1.09553462e-04 -6.31855478e-05 5.20328768e-04 3.00318452e-04 7.90145647e-05 2.10936488e-02 4.80607339e-02 4.17388344e-02 5.52750497e-05 -4.18053364e-02 -4.52566068e-02 -8.07130995e-05 4.53683706e-02 -1.40812692e-02 -5.55643228e-05 4.90120357e-02 2.45102737e-02 5.56306169e-05 -1.98489791e-04 1.45978734e-03 2.30011539e-04 3.77273752e-05 -2.30033339e-04 -2.33035668e-03 -8.06331182e-04 2.32921215e-03 2.83050459e-04 5.20328768e-04 -1.20615458e-03 -4.88404682e-04 -5.19935628e-04 1.05566754e-02 2.40528121e-02 2.82459912e-02 4.20470853e-05 -1.35719689e-02 -4.12450375e-02 -7.67502875e-05 4.12710932e-03 -1.38387040e-02 -3.93143386e-05 2.45102737e-02 8.39735954e-03 3.16778891e-05 -8.43250536e-05 6.20166132e-04 4.14365150e-05 -3.52462601e-05 -1.73886299e-04 -8.85605054e-04 -2.47435150e-04 1.13081575e-03 2.26032678e-04 3.00318452e-04 -4.88404682e-04 -1.09015694e-04 -2.44524386e-04 2.06585336e-05 4.70693478e-05 5.52750497e-05 -1.47003779e-02 -4.09429851e-05 -8.07130995e-05 3.71564128e-02 4.44325219e-05 -2.70811900e-05 7.83476102e-03 5.56306169e-05 3.16778891e-05 -7.79023244e-03 -7.67767978e-05 5.64652706e-04 3.77273752e-05 1.47068706e-04 -8.89779927e-05 -8.06331182e-04 -5.57654706e-04 9.00950371e-04 2.05799634e-04 7.90145647e-05 -5.19935628e-04 -2.44524386e-04 -6.30871483e-05 2.29054795e-01 3.29433197e-01 2.01813597e-01 -2.35410905e-01 -2.02192437e-01 -2.21907085e-01 2.58849494e-01 2.22323643e-01 9.88571216e-03 1.09613748e-01 9.41463221e-02 -1.67694287e-02 -1.09819513e-01 3.92221425e-02 1.43532144e-01 7.04318857e-02 -6.89694006e-05 -7.03660418e-02 -1.49256702e-01 1.46157457e-04 1.49117168e-01 -6.14421454e-03 2.08033691e-05 2.12246406e-02 1.06023891e-02 -2.07839209e-05 3.29433197e-01 2.59747786e-01 6.36379969e-02 -7.42322551e-02 -6.37574565e-02 -7.75677445e-02 9.04809843e-02 7.77133527e-02 -6.56006730e-03 -7.27386712e-02 -6.24746300e-02 1.11280380e-02 7.28752144e-02 1.43532144e-01 2.07035011e-01 1.43672485e-01 -1.40689194e-04 -1.43538172e-01 -1.50532003e-01 1.47406277e-04 1.50391277e-01 -1.38908002e-02 4.70321215e-05 4.79845294e-02 2.39698123e-02 -4.69881531e-05 -2.01813597e-01 -6.36379969e-02 5.04786051e-02 1.94092737e-01 1.66704612e-01 -1.64384703e-01 -9.25096806e-02 -7.94557828e-02 -1.13498424e-01 -2.10636636e-02 -1.80914027e-02 1.90295578e-02 1.24620630e-01 -7.04318857e-02 -1.43672485e-01 -6.96392838e-02 1.10967367e-04 1.13214473e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -6.44737024e-04 -4.11247302e-05 -4.19575125e-02 -2.83346836e-02 5.55446341e-05 2.35410905e-01 7.42322551e-02 1.94092737e-01 -9.53383055e-03 -1.94457083e-01 -9.25096806e-02 -1.35781205e-01 9.26833375e-02 -4.65682059e-02 5.65173415e-02 1.24620630e-01 8.11259297e-02 -5.66234345e-02 6.89694006e-05 1.40689194e-04 1.10967367e-04 4.36810194e-02 -1.10863628e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 -2.44346801e-05 -1.47786983e-02 5.55446341e-05 4.22182061e-05 1.47648823e-02 2.02192437e-01 6.37574565e-02 1.66704612e-01 -1.94457083e-01 4.98533241e-02 -7.94557828e-02 9.26833375e-02 -1.64086678e-01 -3.99970385e-02 1.24620630e-01 1.84582259e-02 -1.07808935e-01 -2.15310947e-02 7.03660418e-02 1.43538172e-01 1.13214473e-01 -1.10863628e-04 -6.94275057e-02 -1.74985607e-01 1.71352113e-04 8.99829313e-02 -2.49294862e-02 5.55446341e-05 4.18906689e-02 1.35432580e-02 -4.10208288e-05 2.21907085e-01 7.75677445e-02 -1.64384703e-01 -9.25096806e-02 -7.94557828e-02 1.71388589e-01 8.96538179e-02 7.70029065e-02 3.38932590e-02 -7.53940006e-02 -6.47552699e-02 5.77044721e-03 3.77894628e-02 1.49256702e-01 1.50532003e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -3.55932735e-02 1.55719370e-04 1.58872712e-01 1.91550894e-02 4.43250336e-05 4.52226225e-02 4.11843616e-02 -8.07339276e-05 -2.58849494e-01 -9.04809843e-02 -9.25096806e-02 -1.35781205e-01 9.26833375e-02 8.96538179e-02 1.43668109e-01 -8.98221138e-02 2.57199025e-02 7.62963480e-02 3.77894628e-02 -4.44064359e-02 -7.64395696e-02 -1.46157457e-04 -1.47406277e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 1.55719370e-04 1.23427948e-01 -1.55573794e-04 4.44355598e-05 3.72580070e-02 -8.07339276e-05 -7.68136271e-05 -3.72231760e-02 -2.22323643e-01 -7.77133527e-02 -7.94557828e-02 9.26833375e-02 -1.64086678e-01 7.70029065e-02 -8.98221138e-02 1.71099764e-01 2.20906068e-02 3.77894628e-02 6.47554536e-02 2.65777538e-02 -7.55357426e-02 -1.49117168e-01 -1.50391277e-01 -1.74985607e-01 1.71352113e-04 8.99829313e-02 1.58872712e-01 -1.55573794e-04 -3.52960874e-02 4.53353869e-02 -8.07339276e-05 -4.51107162e-02 -3.92260496e-03 4.41740133e-05 9.88571216e-03 -6.56006730e-03 1.13498424e-01 4.65682059e-02 3.99970385e-02 -3.38932590e-02 -2.57199025e-02 -2.20906068e-02 -1.10719633e-01 6.59703251e-02 5.66613547e-02 1.34862915e-02 8.83189281e-02 -6.14421454e-03 -1.38908002e-02 6.44737024e-04 2.44346801e-05 2.49294862e-02 -1.91550894e-02 -4.44355598e-05 -4.53353869e-02 -7.70240327e-03 -1.39667020e-05 -1.42495299e-02 -1.39752767e-02 2.73958109e-05 1.09613748e-01 -7.27386712e-02 2.10636636e-02 -5.65173415e-02 -1.24620630e-01 7.53940006e-02 -7.62963480e-02 -3.77894628e-02 6.59703251e-02 3.15563840e-02 4.98516513e-02 6.42242232e-02 -8.57156399e-02 2.08033691e-05 4.70321215e-05 4.11247302e-05 1.47786983e-02 -5.55446341e-05 -4.43250336e-05 -3.72580070e-02 8.07339276e-05 -1.39667020e-05 -7.86837129e-03 5.59786246e-05 3.96080071e-05 7.92534293e-03 9.41463221e-02 -6.24746300e-02 1.80914027e-02 -1.24620630e-01 -1.84582259e-02 6.47552699e-02 -3.77894628e-02 -6.47554536e-02 5.66613547e-02 4.98516513e-02 1.63316996e-02 -9.76925418e-02 -5.02796199e-02 2.12246406e-02 4.79845294e-02 4.19575125e-02 -5.55446341e-05 -4.18906689e-02 -4.52226225e-02 8.07339276e-05 4.51107162e-02 -1.42495299e-02 5.59786246e-05 4.92437744e-02 2.45592648e-02 -5.59117751e-05 -1.67694287e-02 1.11280380e-02 -1.90295578e-02 -8.11259297e-02 1.07808935e-01 -5.77044721e-03 4.44064359e-02 -2.65777538e-02 1.34862915e-02 6.42242232e-02 -9.76925418e-02 -1.26781392e-01 2.48056564e-02 1.06023891e-02 2.39698123e-02 2.83346836e-02 -4.22182061e-05 -1.35432580e-02 -4.11843616e-02 7.68136271e-05 3.92260496e-03 -1.39752767e-02 3.96080071e-05 2.45592648e-02 8.37352664e-03 -3.18101412e-05 -1.09819513e-01 7.28752144e-02 -1.24620630e-01 5.66234345e-02 2.15310947e-02 -3.77894628e-02 7.64395696e-02 7.55357426e-02 8.83189281e-02 -8.57156399e-02 -5.02796199e-02 2.48056564e-02 3.18778890e-02 -2.07839209e-05 -4.69881531e-05 -5.55446341e-05 -1.47648823e-02 4.10208288e-05 8.07339276e-05 3.72231760e-02 -4.41740133e-05 2.73958109e-05 7.92534293e-03 -5.59117751e-05 -3.18101412e-05 -7.85354621e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 1 676 + 3.90352750e-02 1.43077779e-01 7.00929462e-02 7.01664876e-02 -6.06418327e-05 -1.48670356e-01 -1.48826341e-01 1.28624111e-04 -6.06735631e-03 -2.10842729e-02 1.82222169e-05 -1.05531894e-02 1.82413356e-05 6.40928035e-04 5.06403815e-03 1.80420044e-03 1.89911078e-03 -6.01839932e-04 -5.51020033e-03 -5.80006556e-03 1.83807659e-03 4.39388935e-05 2.05207882e-04 -6.50316449e-05 9.71549090e-05 -6.84526480e-05 1.43077779e-01 2.06870478e-01 1.43354898e-01 1.43505305e-01 -1.24025372e-04 -1.50404918e-01 -1.50562723e-01 1.30124790e-04 -1.38318580e-02 -4.80661849e-02 4.15415057e-05 -2.40582899e-02 4.15850910e-05 5.06403815e-03 3.59162160e-02 1.30711897e-02 1.37588024e-02 -4.36024943e-03 -3.76780554e-02 -3.96601173e-02 1.25685361e-02 -1.64433980e-04 -7.67956269e-04 2.43370084e-04 -3.63586042e-04 2.56172617e-04 -7.00929462e-02 -1.43354898e-01 -6.92934363e-02 -1.12900170e-01 9.75746892e-05 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -7.15622009e-04 4.17238982e-02 -3.60601441e-05 2.82393576e-02 -4.88121249e-05 -1.80420044e-03 -1.30711897e-02 -4.28933746e-03 -5.43404580e-03 1.72208267e-03 1.24264610e-02 1.59647875e-02 -5.05933974e-03 1.34660600e-04 5.33478689e-05 -1.69062691e-05 -4.08296338e-05 2.87674249e-05 -7.01664876e-02 -1.43505305e-01 -1.12900170e-01 -6.95302215e-02 9.76770644e-05 1.74742533e-01 9.03848691e-02 -1.51180797e-04 2.47372636e-02 4.17984960e-02 -4.88121249e-05 1.35733224e-02 -3.61625176e-05 -1.89911078e-03 -1.37588024e-02 -5.43404580e-03 -4.84676952e-03 1.81267318e-03 1.59647875e-02 1.40641513e-02 -5.32548736e-03 -1.00027465e-04 4.18352057e-05 2.87674249e-05 9.66095944e-05 -1.39552662e-05 6.06418327e-05 1.24025372e-04 9.75746892e-05 9.76770644e-05 4.34883186e-02 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 -2.13793372e-05 -4.88121249e-05 -1.46802192e-02 -3.71324719e-05 -1.46956216e-02 6.01839932e-04 4.36024943e-03 1.72208267e-03 1.81267318e-03 2.98688065e-04 -5.05933974e-03 -5.32548736e-03 -1.05278730e-03 3.16993212e-05 2.87674249e-05 1.23494473e-04 5.78558379e-05 1.29990926e-04 1.48670356e-01 1.50404918e-01 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -3.55477897e-02 -1.58871579e-01 1.37305772e-04 1.91383675e-02 -4.52602299e-02 3.91164413e-05 -4.12489762e-02 7.12994329e-05 5.51020033e-03 3.76780554e-02 1.24264610e-02 1.59647875e-02 -5.05933974e-03 -3.47049294e-02 -4.54875742e-02 1.44152931e-02 -5.89087085e-04 -1.44546888e-03 4.58078013e-04 -5.34422901e-04 3.76539519e-04 1.48826341e-01 1.50562723e-01 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -1.58871579e-01 -3.58809906e-02 1.37449833e-04 -4.51895230e-02 -4.53856342e-02 7.12994329e-05 -4.14093649e-03 3.92659774e-05 5.80006556e-03 3.96601173e-02 1.59647875e-02 1.40641513e-02 -5.32548736e-03 -4.54875742e-02 -3.93711087e-02 1.51736126e-02 -7.15776042e-05 -1.48902302e-03 3.76539519e-04 -8.79212102e-04 4.96703967e-04 -1.28624111e-04 -1.30124790e-04 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 1.37305772e-04 1.37449833e-04 1.23157158e-01 3.90553324e-05 7.12994329e-05 3.71123182e-02 6.77953561e-05 3.71512564e-02 -1.83807659e-03 -1.25685361e-02 -5.05933974e-03 -5.32548736e-03 -1.05278730e-03 1.44152931e-02 1.51736126e-02 3.70073721e-03 2.26833848e-05 3.76539519e-04 -4.20177221e-04 7.79147281e-05 -4.42280730e-04 -6.06735631e-03 -1.38318580e-02 7.15622009e-04 -2.47372636e-02 2.13793372e-05 -1.91383675e-02 4.51895230e-02 -3.90553324e-05 -7.63846481e-03 1.40703716e-02 -1.21604081e-05 1.38292143e-02 -2.39039906e-05 4.39388935e-05 -1.64433980e-04 -1.34660600e-04 1.00027465e-04 -3.16993212e-05 5.89087085e-04 7.15776042e-05 -2.26833848e-05 1.10930679e-04 -2.09274876e-04 6.63205005e-05 -1.83349362e-04 1.29182863e-04 -2.10842729e-02 -4.80661849e-02 -4.17238982e-02 -4.17984960e-02 4.88121249e-05 4.52602299e-02 4.53856342e-02 -7.12994329e-05 1.40703716e-02 4.89954008e-02 -4.90591418e-05 2.45060863e-02 -4.91248191e-05 2.05207882e-04 -7.67956269e-04 -5.33478689e-05 -4.18352057e-05 -2.87674249e-05 1.44546888e-03 1.48902302e-03 -3.76539519e-04 -2.09274876e-04 -1.05007348e-03 3.63268862e-04 -4.91159663e-04 3.85895119e-04 1.82222169e-05 4.15415057e-05 3.60601441e-05 4.88121249e-05 1.46802192e-02 -3.91164413e-05 -7.12994329e-05 -3.71123182e-02 -1.21604081e-05 -4.90591418e-05 -7.76912846e-03 -3.47109323e-05 -7.82829532e-03 -6.50316449e-05 2.43370084e-04 1.69062691e-05 -2.87674249e-05 -1.23494473e-04 -4.58078013e-04 -3.76539519e-04 4.20177221e-04 6.63205005e-05 3.63268862e-04 -1.88977879e-05 2.20783908e-04 -2.98500991e-05 -1.05531894e-02 -2.40582899e-02 -2.82393576e-02 -1.35733224e-02 3.71324719e-05 4.12489762e-02 4.14093649e-03 -6.77953561e-05 1.38292143e-02 2.45060863e-02 -3.47109323e-05 8.39857043e-03 -2.79745566e-05 9.71549090e-05 -3.63586042e-04 4.08296338e-05 -9.66095944e-05 -5.78558379e-05 5.34422901e-04 8.79212102e-04 -7.79147281e-05 -1.83349362e-04 -4.91159663e-04 2.20783908e-04 -1.63561165e-04 1.98118951e-04 1.82413356e-05 4.15850910e-05 4.88121249e-05 3.61625176e-05 1.46956216e-02 -7.12994329e-05 -3.92659774e-05 -3.71512564e-02 -2.39039906e-05 -4.91248191e-05 -7.82829532e-03 -2.79745566e-05 -7.78554672e-03 -6.84526480e-05 2.56172617e-04 -2.87674249e-05 1.39552662e-05 -1.29990926e-04 -3.76539519e-04 -4.96703967e-04 4.42280730e-04 1.29182863e-04 3.85895119e-04 -2.98500991e-05 1.98118951e-04 -2.19598530e-05 3.00147527e-01 3.37844187e-01 2.65846355e-01 2.23672454e-01 2.67430698e-01 -2.38278391e-01 -2.00477875e-01 -2.39698439e-01 -1.14126464e-02 -1.18728363e-01 -1.41955831e-01 2.14542770e-02 -1.19435939e-01 3.92346948e-02 1.43562622e-01 7.04539945e-02 7.03800846e-02 6.09456872e-05 -1.49294660e-01 -1.49138042e-01 -1.29146200e-04 -6.14904967e-03 -2.12340751e-02 -1.83876633e-05 -1.06058918e-02 -1.83683737e-05 3.37844187e-01 2.95762552e-01 2.48977502e-02 2.09479678e-02 2.50461313e-02 -9.59141523e-02 -8.06983184e-02 -9.64857642e-02 1.01413263e-02 1.05502530e-01 1.26142557e-01 -1.90643621e-02 1.06131285e-01 1.43562622e-01 2.07046006e-01 1.43692414e-01 1.43541673e-01 1.24300020e-04 -1.50539086e-01 -1.50381163e-01 -1.30222681e-04 -1.38939644e-02 -4.79790374e-02 -4.15474836e-05 -2.39643345e-02 -4.15038981e-05 -2.65846355e-01 -2.48977502e-02 5.32326332e-02 -1.90415277e-01 -2.27667241e-01 -2.06359190e-01 5.08045524e-02 6.07437201e-02 -1.38717305e-01 2.94043583e-02 3.51568910e-02 -2.53534041e-02 1.41142376e-01 -7.04539945e-02 -1.43692414e-01 -6.96603995e-02 -1.13235554e-01 -9.80564135e-05 9.03265538e-02 1.75001865e-01 1.51542997e-04 -6.40862982e-04 4.19725482e-02 3.63461597e-05 2.83413534e-02 4.90844694e-05 -2.23672454e-01 -2.09479678e-02 -1.90415277e-01 1.19343330e-01 -1.91550080e-01 5.08045524e-02 -2.23998134e-01 5.11073283e-02 7.53764587e-02 -1.37646079e-02 1.41142376e-01 -1.32233183e-01 -1.38466397e-02 -7.03800846e-02 -1.43541673e-01 -1.13235554e-01 -6.94226948e-02 -9.79535472e-05 1.75001865e-01 8.99591889e-02 1.51384021e-04 2.49417263e-02 4.18975121e-02 4.90844694e-05 1.35418952e-02 3.62431213e-05 -2.67430698e-01 -2.50461313e-02 -2.27667241e-01 -1.91550080e-01 5.05270510e-02 6.07437201e-02 5.11073283e-02 -2.05637316e-01 9.01227605e-02 1.41142376e-01 3.69422004e-02 1.07093669e-01 3.10816848e-02 -6.09456872e-05 -1.24300020e-04 -9.80564135e-05 -9.79535472e-05 4.36939847e-02 1.51542997e-04 1.51384021e-04 -8.48589593e-02 2.15983067e-05 4.90844694e-05 -1.47851947e-02 3.73063262e-05 -1.47696842e-02 2.38278391e-01 9.59141523e-02 -2.06359190e-01 5.08045524e-02 6.07437201e-02 1.70024418e-01 -9.01663293e-02 -1.07806053e-01 2.30222926e-02 8.87474230e-02 1.06109558e-01 -1.39849680e-02 7.78543033e-02 1.49294660e-01 1.50539086e-01 9.03265538e-02 1.75001865e-01 1.51542997e-04 -3.55933538e-02 -1.58872773e-01 -1.37575997e-04 1.91573661e-02 -4.52189669e-02 -3.91573984e-05 -4.11804138e-02 -7.13204742e-05 2.00477875e-01 8.06983184e-02 5.08045524e-02 -2.23998134e-01 5.11073283e-02 -9.01663293e-02 2.01329463e-01 -9.07036863e-02 -2.96283102e-04 7.86106626e-02 7.78543033e-02 -4.12037926e-04 7.90791522e-02 1.49138042e-01 1.50381163e-01 1.75001865e-01 8.99591889e-02 1.51384021e-04 -1.58872773e-01 -3.52598472e-02 -1.37431673e-04 -4.53442356e-02 -4.50933797e-02 -7.13204742e-05 -3.90879932e-03 -3.90076821e-05 2.39698439e-01 9.64857642e-02 6.07437201e-02 5.11073283e-02 -2.05637316e-01 -1.07806053e-01 -9.07036863e-02 1.68743258e-01 -3.54246557e-04 7.78543033e-02 1.06580599e-01 -2.76439791e-02 8.96726383e-02 1.29146200e-04 1.30222681e-04 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -1.37575997e-04 -1.37431673e-04 1.23446141e-01 -3.92658750e-05 -7.13204742e-05 3.72674479e-02 -6.78607741e-05 3.72283524e-02 -1.14126464e-02 1.01413263e-02 1.38717305e-01 -7.53764587e-02 -9.01227605e-02 -2.30222926e-02 2.96283102e-04 3.54246557e-04 -1.61559835e-01 -4.77041734e-02 -5.70367973e-02 -2.52085878e-02 1.40336183e-01 -6.14904967e-03 -1.38939644e-02 6.40862982e-04 -2.49417263e-02 -2.15983067e-05 -1.91573661e-02 4.53442356e-02 3.92658750e-05 -7.70714517e-03 1.42605428e-02 1.23489278e-05 1.39848306e-02 2.42203674e-05 -1.18728363e-01 1.05502530e-01 -2.94043583e-02 1.37646079e-02 -1.41142376e-01 -8.87474230e-02 -7.86106626e-02 -7.78543033e-02 -4.77041734e-02 1.54718337e-02 7.41014246e-02 -1.35716984e-01 2.45960041e-02 -2.12340751e-02 -4.79790374e-02 -4.19725482e-02 -4.18975121e-02 -4.90844694e-05 4.52189669e-02 4.50933797e-02 7.13204742e-05 1.42605428e-02 4.92604167e-02 4.94764240e-05 2.45634125e-02 4.94101171e-05 -1.41955831e-01 1.26142557e-01 -3.51568910e-02 -1.41142376e-01 -3.69422004e-02 -1.06109558e-01 -7.78543033e-02 -1.06580599e-01 -5.70367973e-02 7.41014246e-02 4.20935106e-02 9.61928165e-02 7.58351725e-02 -1.83876633e-05 -4.15474836e-05 -3.63461597e-05 -4.90844694e-05 1.47851947e-02 3.91573984e-05 7.13204742e-05 -3.72674479e-02 1.23489278e-05 4.94764240e-05 -7.87491896e-03 3.50080332e-05 -7.93188481e-03 2.14542770e-02 -1.90643621e-02 2.53534041e-02 1.32233183e-01 -1.07093669e-01 1.39849680e-02 4.12037926e-04 2.76439791e-02 -2.52085878e-02 -1.35716984e-01 9.61928165e-02 -1.33985954e-01 -2.77965152e-02 -1.06058918e-02 -2.39643345e-02 -2.83413534e-02 -1.35418952e-02 -3.73063262e-05 4.11804138e-02 3.90879932e-03 6.78607741e-05 1.39848306e-02 2.45634125e-02 3.50080332e-05 8.37229921e-03 2.81098497e-05 -1.19435939e-01 1.06131285e-01 -1.41142376e-01 1.38466397e-02 -3.10816848e-02 -7.78543033e-02 -7.90791522e-02 -8.96726383e-02 1.40336183e-01 2.45960041e-02 7.58351725e-02 -2.77965152e-02 1.57641310e-02 -1.83683737e-05 -4.15038981e-05 -4.90844694e-05 -3.62431213e-05 1.47696842e-02 7.13204742e-05 3.90076821e-05 -3.72283524e-02 2.42203674e-05 4.94101171e-05 -7.93188481e-03 2.81098497e-05 -7.85826831e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 0 2 676 + 1.69875966e-04 1.56309629e-03 3.24812372e-04 6.49988216e-04 3.24554036e-04 -1.06359050e-03 -2.12837118e-03 -1.06274459e-03 -4.51784837e-05 1.04293240e-04 5.20760088e-05 7.83342981e-05 1.04210292e-04 1.64403073e-07 1.66340445e-06 5.53781437e-07 9.51621148e-07 1.83979123e-07 -1.72083694e-06 -2.95709591e-06 -5.71702208e-07 -1.06845465e-07 5.98164385e-07 1.15644507e-07 4.94734625e-07 1.98724174e-07 1.56309629e-03 1.39321547e-02 2.88896783e-03 5.78116848e-03 2.88667012e-03 -9.33028603e-03 -1.86710129e-02 -9.32286531e-03 -2.87419685e-04 6.63500139e-04 3.31300849e-04 4.98352698e-04 6.62972432e-04 1.66340445e-06 1.68234338e-05 5.60694767e-06 9.63501052e-06 1.86275892e-06 -1.74134566e-05 -2.99233822e-05 -5.78515686e-06 -1.08246142e-06 6.06005942e-06 1.17160534e-06 5.01220283e-06 2.01329323e-06 -3.24812372e-04 -2.88896783e-03 -4.12889039e-04 -1.28241153e-03 -6.40337515e-04 1.30761524e-03 4.14724642e-03 2.07081533e-03 1.33379801e-04 -8.09954742e-05 -4.04428995e-05 -1.33916930e-04 -1.78153411e-04 -5.53781437e-07 -5.60694767e-06 -1.82833588e-06 -3.22122833e-06 -6.22767541e-07 5.68832386e-06 1.00188249e-05 1.93696264e-06 3.97507109e-07 -1.98477847e-06 -3.83721824e-07 -1.68338089e-06 -6.76177612e-07 -6.49988216e-04 -5.78116848e-03 -1.28241153e-03 -2.33829995e-03 -1.28139158e-03 4.14724642e-03 7.53428530e-03 4.14394796e-03 9.83807621e-05 -3.08167282e-04 -1.78153411e-04 -1.70683975e-04 -3.07922185e-04 -9.51621148e-07 -9.63501052e-06 -3.22122833e-06 -5.48916804e-06 -1.07016726e-06 1.00188249e-05 1.70744265e-05 3.32848754e-06 5.95554712e-07 -3.46808252e-06 -6.76177612e-07 -2.84219936e-06 -1.15217798e-06 -3.24554036e-04 -2.88667012e-03 -6.40337515e-04 -1.28139158e-03 -4.11870065e-04 2.07081533e-03 4.14394796e-03 1.30431994e-03 4.91237728e-05 -1.78153411e-04 -4.03334217e-05 -1.82394415e-04 -8.07119774e-05 -1.83979123e-07 -1.86275892e-06 -6.22767541e-07 -1.07016726e-06 -1.60689017e-07 1.93696264e-06 3.32848754e-06 5.01525476e-07 1.15139973e-07 -6.76177612e-07 -1.01320739e-07 -5.69027876e-07 -1.74110130e-07 1.06359050e-03 9.33028603e-03 1.30761524e-03 4.14724642e-03 2.07081533e-03 -4.09936647e-03 -1.33348475e-02 -6.65839545e-03 -3.95532628e-04 1.78326504e-04 8.90425168e-05 3.70585174e-04 4.92999747e-04 1.72083694e-06 1.74134566e-05 5.68832386e-06 1.00188249e-05 1.93696264e-06 -1.76833023e-05 -3.11364053e-05 -6.01967344e-06 -1.23601462e-06 6.18004320e-06 1.19480208e-06 5.23991199e-06 2.10475906e-06 2.12837118e-03 1.86710129e-02 4.14724642e-03 7.53428530e-03 4.14394796e-03 -1.33348475e-02 -2.41202882e-02 -1.33242418e-02 -2.45798143e-04 8.29891702e-04 4.92999747e-04 4.26519386e-04 8.29231658e-04 2.95709591e-06 2.99233822e-05 1.00188249e-05 1.70744265e-05 3.32848754e-06 -3.11364053e-05 -5.30689199e-05 -1.03442408e-05 -1.85493418e-06 1.07963497e-05 2.10475906e-06 8.84896384e-06 3.58679944e-06 1.06274459e-03 9.32286531e-03 2.07081533e-03 4.14394796e-03 1.30431994e-03 -6.65839545e-03 -1.33242418e-02 -4.08877092e-03 -1.22732655e-04 4.92999747e-04 8.87213543e-05 5.27609947e-04 1.77541990e-04 5.71702208e-07 5.78515686e-06 1.93696264e-06 3.32848754e-06 5.01525476e-07 -6.01967344e-06 -1.03442408e-05 -1.56382132e-06 -3.58618725e-07 2.10475906e-06 3.16525727e-07 1.77085151e-06 5.43919597e-07 -4.51784837e-05 -2.87419685e-04 -1.33379801e-04 -9.83807621e-05 -4.91237728e-05 3.95532628e-04 2.45798143e-04 1.22732655e-04 -2.48009597e-05 2.99273523e-05 1.49434139e-05 3.43909079e-05 4.57511797e-05 -1.06845465e-07 -1.08246142e-06 -3.97507109e-07 -5.95554712e-07 -1.15139973e-07 1.23601462e-06 1.85493418e-06 3.58618725e-07 2.70139281e-08 -4.15541564e-07 -8.03376141e-08 -2.97411032e-07 -1.19463565e-07 1.04293240e-04 6.63500139e-04 8.09954742e-05 3.08167282e-04 1.78153411e-04 -1.78326504e-04 -8.29891702e-04 -4.92999747e-04 2.99273523e-05 -1.00005292e-04 -4.97399685e-05 -7.02141186e-05 -8.57983503e-05 5.98164385e-07 6.06005942e-06 1.98477847e-06 3.46808252e-06 6.76177612e-07 -6.18004320e-06 -1.07963497e-05 -2.10475906e-06 -4.15541564e-07 2.14802410e-06 4.18843129e-07 1.80544690e-06 7.31939446e-07 5.20760088e-05 3.31300849e-04 4.04428995e-05 1.78153411e-04 4.03334217e-05 -8.90425168e-05 -4.92999747e-04 -8.87213543e-05 1.49434139e-05 -4.97399685e-05 -2.52267750e-05 -2.59150043e-05 -4.97149683e-05 1.15644507e-07 1.17160534e-06 3.83721824e-07 6.76177612e-07 1.01320739e-07 -1.19480208e-06 -2.10475906e-06 -3.16525727e-07 -8.03376141e-08 4.18843129e-07 6.25586601e-08 3.61542337e-07 1.10410273e-07 7.83342981e-05 4.98352698e-04 1.33916930e-04 1.70683975e-04 1.82394415e-04 -3.70585174e-04 -4.26519386e-04 -5.27609947e-04 3.43909079e-05 -7.02141186e-05 -2.59150043e-05 -6.45671275e-05 -6.10086414e-05 4.94734625e-07 5.01220283e-06 1.68338089e-06 2.84219936e-06 5.69027876e-07 -5.23991199e-06 -8.84896384e-06 -1.77085151e-06 -2.97411032e-07 1.80544690e-06 3.61542337e-07 1.46277688e-06 6.10544002e-07 1.04210292e-04 6.62972432e-04 1.78153411e-04 3.07922185e-04 8.07119774e-05 -4.92999747e-04 -8.29231658e-04 -1.77541990e-04 4.57511797e-05 -8.57983503e-05 -4.97149683e-05 -6.10086414e-05 -9.98687600e-05 1.98724174e-07 2.01329323e-06 6.76177612e-07 1.15217798e-06 1.74110130e-07 -2.10475906e-06 -3.58679944e-06 -5.43919597e-07 -1.19463565e-07 7.31939446e-07 1.10410273e-07 6.10544002e-07 1.88036720e-07 1.24166683e-03 8.98970522e-03 1.14984027e-03 3.27612104e-03 3.46538447e-03 -3.37383450e-03 -9.61271800e-03 -1.01680503e-02 -8.43957108e-05 5.47979606e-05 5.79636708e-05 -9.28026836e-06 1.65149897e-04 1.70812525e-04 1.57082799e-03 3.26619005e-04 6.52872566e-04 3.26878741e-04 -1.06923657e-03 -2.13727680e-03 -1.07008685e-03 -4.52355680e-05 1.04509065e-04 5.23253592e-05 7.82671141e-05 1.04592173e-04 8.98970522e-03 5.46423018e-02 7.31488549e-03 2.08415473e-02 2.20455757e-02 -1.94206065e-02 -5.53331271e-02 -5.85297541e-02 1.89649782e-03 -1.23139212e-03 -1.30253036e-03 2.08541507e-04 -3.71116515e-03 1.57082799e-03 1.39903450e-02 2.90296254e-03 5.80267706e-03 2.90527106e-03 -9.37210352e-03 -1.87337209e-02 -9.37955646e-03 -2.86774397e-04 6.62543336e-04 3.31720680e-04 4.96180451e-04 6.63070208e-04 -1.14984027e-03 -7.31488549e-03 5.90262354e-04 -3.03752927e-03 -3.21300911e-03 -2.02464935e-03 8.37933323e-03 8.86341220e-03 -8.89310520e-05 1.80542301e-04 1.90972335e-04 -1.41114106e-05 2.51123989e-04 -3.26619005e-04 -2.90296254e-03 -4.15151071e-04 -1.28812886e-03 -6.44937408e-04 1.31426206e-03 4.16439840e-03 2.08502145e-03 1.33596014e-04 -8.08634926e-05 -4.04865482e-05 -1.33628939e-04 -1.78574888e-04 -3.27612104e-03 -2.08415473e-02 -3.03752927e-03 -6.99815565e-03 -9.15449482e-03 8.37933323e-03 1.89087730e-02 2.52536044e-02 -4.21767703e-04 2.71529768e-04 2.51123989e-04 5.70113147e-05 8.18335442e-04 -6.52872566e-04 -5.80267706e-03 -1.28812886e-03 -2.34554260e-03 -1.28915322e-03 4.16439840e-03 7.55503474e-03 4.16771003e-03 9.80472196e-05 -3.07854286e-04 -1.78574888e-04 -1.69538864e-04 -3.08099099e-04 -3.46538447e-03 -2.20455757e-02 -3.21300911e-03 -9.15449482e-03 -8.02699272e-03 8.86341220e-03 2.52536044e-02 2.17469247e-02 -4.46133470e-04 2.51123989e-04 2.99752590e-04 -1.45362729e-04 8.54054077e-04 -3.26878741e-04 -2.90527106e-03 -6.44937408e-04 -1.28915322e-03 -4.16176405e-04 2.08502145e-03 4.16771003e-03 1.31757687e-03 4.90900573e-05 -1.78574888e-04 -4.05964083e-05 -1.82586078e-04 -8.11473946e-05 3.37383450e-03 1.94206065e-02 -2.02464935e-03 8.37933323e-03 8.86341220e-03 6.89989769e-03 -2.18317801e-02 -2.30930147e-02 9.13644374e-04 -5.64793667e-04 -5.97422127e-04 9.94624346e-05 -1.77001464e-03 1.06923657e-03 9.37210352e-03 1.31426206e-03 4.16439840e-03 2.08502145e-03 -4.11821518e-03 -1.33849485e-02 -6.70154535e-03 -3.95726654e-04 1.77065778e-04 8.86528879e-05 3.69083281e-04 4.93224043e-04 9.61271800e-03 5.53331271e-02 8.37933323e-03 1.89087730e-02 2.52536044e-02 -2.18317801e-02 -4.76407036e-02 -6.57965404e-02 2.56416349e-03 -1.66544397e-03 -1.77001464e-03 3.05898353e-04 -5.01930905e-03 2.13727680e-03 1.87337209e-02 4.16439840e-03 7.55503474e-03 4.16771003e-03 -1.33849485e-02 -2.41769159e-02 -1.33955926e-02 -2.44087177e-04 8.27141295e-04 4.93224043e-04 4.21987254e-04 8.27799059e-04 1.01680503e-02 5.85297541e-02 8.86341220e-03 2.52536044e-02 2.17469247e-02 -2.30930147e-02 -6.57965404e-02 -5.50353137e-02 2.71229671e-03 -1.77001464e-03 -1.86436884e-03 2.75948778e-04 -5.31195346e-03 1.07008685e-03 9.37955646e-03 2.08502145e-03 4.16771003e-03 1.31757687e-03 -6.70154535e-03 -1.33955926e-02 -4.12886944e-03 -1.22209008e-04 4.93224043e-04 8.89747330e-05 5.27473959e-04 1.77849915e-04 -8.43957108e-05 1.89649782e-03 8.89310520e-05 4.21767703e-04 4.46133470e-04 -9.13644374e-04 -2.56416349e-03 -2.71229671e-03 -3.88654675e-04 4.36868693e-04 4.62106853e-04 -4.74111545e-05 8.43719923e-04 -4.52355680e-05 -2.86774397e-04 -1.33596014e-04 -9.80472196e-05 -4.90900573e-05 3.95726654e-04 2.44087177e-04 1.22209008e-04 -2.48540403e-05 3.04545512e-05 1.52479149e-05 3.45666355e-05 4.61930859e-05 5.47979606e-05 -1.23139212e-03 -1.80542301e-04 -2.71529768e-04 -2.51123989e-04 5.64793667e-04 1.66544397e-03 1.77001464e-03 4.36868693e-04 1.91388257e-05 8.91541424e-06 1.32882700e-04 -6.56704038e-04 1.04509065e-04 6.62543336e-04 8.08634926e-05 3.07854286e-04 1.78574888e-04 -1.77065778e-04 -8.27141295e-04 -4.93224043e-04 3.04545512e-05 -1.00913456e-04 -5.03546334e-05 -7.08141106e-05 -8.70566197e-05 5.79636708e-05 -1.30253036e-03 -1.90972335e-04 -2.51123989e-04 -2.99752590e-04 5.97422127e-04 1.77001464e-03 1.86436884e-03 4.62106853e-04 8.91541424e-06 2.01407935e-05 -5.10992902e-05 -7.05412091e-04 5.23253592e-05 3.31720680e-04 4.04865482e-05 1.78574888e-04 4.05964083e-05 -8.86528879e-05 -4.93224043e-04 -8.89747330e-05 1.52479149e-05 -5.03546334e-05 -2.55519497e-05 -2.63773034e-05 -5.03802528e-05 -9.28026836e-06 2.08541507e-04 1.41114106e-05 -5.70113147e-05 1.45362729e-04 -9.94624346e-05 -3.05898353e-04 -2.75948778e-04 -4.74111545e-05 1.32882700e-04 -5.10992902e-05 5.18686747e-04 1.27444739e-04 7.82671141e-05 4.96180451e-04 1.33628939e-04 1.69538864e-04 1.82586078e-04 -3.69083281e-04 -4.21987254e-04 -5.27473959e-04 3.45666355e-05 -7.08141106e-05 -2.63773034e-05 -6.47122220e-05 -6.17977590e-05 1.65149897e-04 -3.71116515e-03 -2.51123989e-04 -8.18335442e-04 -8.54054077e-04 1.77001464e-03 5.01930905e-03 5.31195346e-03 8.43719923e-04 -6.56704038e-04 -7.05412091e-04 1.27444739e-04 -1.74213418e-03 1.04592173e-04 6.63070208e-04 1.78574888e-04 3.08099099e-04 8.11473946e-05 -4.93224043e-04 -8.27799059e-04 -1.77849915e-04 4.61930859e-05 -8.70566197e-05 -5.03802528e-05 -6.17977590e-05 -1.01051860e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 1 -2 169 + 4.52491277e-07 4.66406907e-06 -4.98071733e-07 -1.56874203e-06 -2.47966756e-06 1.58799484e-06 5.00159732e-06 7.90588791e-06 -9.67947813e-07 3.22905154e-07 5.10407333e-07 -7.62024393e-07 1.60759461e-06 4.66406907e-06 4.80342040e-05 -5.14160192e-06 -1.61941473e-05 -2.55976451e-05 1.63730087e-05 5.15689312e-05 8.15135972e-05 -1.00065894e-05 3.33817511e-06 5.27656197e-06 -7.87776482e-06 1.66192216e-05 4.98071733e-07 5.14160192e-06 -3.82779516e-07 -1.73717555e-06 -2.74590582e-06 1.23295009e-06 5.54960935e-06 8.77211550e-06 -1.11975496e-06 2.48285459e-07 3.92458025e-07 -8.49322304e-07 1.79176149e-06 1.56874203e-06 1.61941473e-05 -1.73717555e-06 -5.30269204e-06 -8.64858932e-06 5.54960935e-06 1.69501828e-05 2.76289244e-05 -3.33349717e-06 1.09810721e-06 1.79176149e-06 -2.78666349e-06 5.46696518e-06 2.47966756e-06 2.55976451e-05 -2.74590582e-06 -8.64858932e-06 -1.35018188e-05 8.77211550e-06 2.76289244e-05 4.31432469e-05 -5.26916768e-06 1.79176149e-06 2.79675182e-06 -4.05195898e-06 8.80873542e-06 -1.58799484e-06 -1.63730087e-05 1.23295009e-06 5.54960935e-06 8.77211550e-06 -3.96225917e-06 -1.76982805e-05 -2.79751873e-05 3.58138134e-06 -8.01692152e-07 -1.26721283e-06 2.71839064e-06 -5.73481661e-06 -5.00159732e-06 -5.15689312e-05 5.54960935e-06 1.69501828e-05 2.76289244e-05 -1.76982805e-05 -5.40861465e-05 -8.81115091e-05 1.06734362e-05 -3.51689346e-06 -5.73481661e-06 8.91214295e-06 -1.75089772e-05 -7.90588791e-06 -8.15135972e-05 8.77211550e-06 2.76289244e-05 4.31432469e-05 -2.79751873e-05 -8.81115091e-05 -1.37618548e-04 1.68712083e-05 -5.73481661e-06 -8.95367473e-06 1.29800256e-05 -2.82007689e-05 -9.67947813e-07 -1.00065894e-05 1.11975496e-06 3.33349717e-06 5.26916768e-06 -3.58138134e-06 -1.06734362e-05 -1.68712083e-05 2.03021692e-06 -7.22481196e-07 -1.14200624e-06 1.60862407e-06 -3.39361234e-06 3.22905154e-07 3.33817511e-06 -2.48285459e-07 -1.09810721e-06 -1.79176149e-06 8.01692152e-07 3.51689346e-06 5.73481661e-06 -7.22481196e-07 1.56602173e-07 2.56426559e-07 -5.81638295e-07 1.14004791e-06 5.10407333e-07 5.27656197e-06 -3.92458025e-07 -1.79176149e-06 -2.79675182e-06 1.26721283e-06 5.73481661e-06 8.95367473e-06 -1.14200624e-06 2.56426559e-07 3.99702381e-07 -8.44852264e-07 1.83736966e-06 -7.62024393e-07 -7.87776482e-06 8.49322304e-07 2.78666349e-06 4.05195898e-06 -2.71839064e-06 -8.91214295e-06 -1.29800256e-05 1.60862407e-06 -5.81638295e-07 -8.44852264e-07 1.05906615e-06 -2.77833963e-06 1.60759461e-06 1.66192216e-05 -1.79176149e-06 -5.46696518e-06 -8.80873542e-06 5.73481661e-06 1.75089772e-05 2.82007689e-05 -3.39361234e-06 1.14004791e-06 1.83736966e-06 -2.77833963e-06 5.60337794e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 1 -1 668 + 2.49533627e-03 1.63346318e-02 -3.21849571e-07 4.51422233e-06 -9.22323548e-03 9.01883251e-07 -1.26497031e-05 2.58452468e-02 3.48831445e-05 -4.21672991e-09 6.04193497e-05 5.91433329e-08 5.32524882e-05 5.42774378e-04 5.20599247e-05 6.02544989e-05 -2.59393037e-04 -1.78176672e-04 -2.06222851e-04 8.87780538e-04 -4.43808186e-05 7.36328467e-06 -3.16986251e-05 -7.47094012e-05 -3.66881970e-05 1.63346318e-02 8.08113414e-02 -1.74088221e-06 2.44173988e-05 -4.98884199e-02 4.10775119e-06 -5.76148107e-05 1.17715728e-01 6.23674190e-03 3.68992533e-10 -7.53907267e-07 1.08023487e-02 1.05742102e-05 5.42774378e-04 5.50656007e-03 5.24434879e-04 6.06984375e-04 -2.61304173e-03 -1.79471631e-03 -2.07721645e-03 8.94232786e-03 -4.21297010e-04 6.98979855e-05 -3.00907833e-04 -7.09199341e-04 -3.48272704e-04 3.21849571e-07 1.74088221e-06 3.21423107e-03 5.70356528e-10 -1.16532421e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 9.39497938e-08 -7.93736167e-08 1.62172242e-04 1.51407575e-07 1.48209947e-10 -5.20599247e-05 -5.24434879e-04 1.21265770e-05 -6.08088620e-05 2.61779546e-04 -4.45421064e-05 2.07524222e-04 -8.93382888e-04 5.53178821e-05 3.62020382e-06 -1.55848224e-05 7.46794385e-05 3.66734829e-05 -4.51422233e-06 -2.44173988e-05 5.70356528e-10 3.21422311e-03 1.63446934e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 -1.18024906e-06 5.65901208e-09 1.48209947e-10 -2.20299756e-06 1.62170174e-04 -6.02544989e-05 -6.06984375e-04 -6.08088620e-05 -5.71510464e-06 3.02985367e-04 2.07524222e-04 1.63467344e-05 -1.03400723e-03 4.50064351e-05 9.68293312e-07 3.66734829e-05 9.74150082e-05 -4.82460442e-06 9.22323548e-03 4.98884199e-02 -1.16532421e-06 1.63446934e-05 -3.01804370e-02 2.96515158e-06 -4.15888498e-05 7.58907191e-02 2.41142642e-03 1.48209947e-10 -2.97156138e-07 4.17671101e-03 4.16787528e-06 2.59393037e-04 2.61304173e-03 2.61779546e-04 3.02985367e-04 -1.23967355e-03 -8.93382888e-04 -1.03400723e-03 4.22751365e-03 -1.93750775e-04 3.66734829e-05 -1.48390584e-04 -3.24825968e-04 -1.71748237e-04 -9.01883251e-07 -4.10775119e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 2.45922452e-02 3.31896716e-09 -6.78114931e-06 -5.06783606e-07 8.30946994e-07 -1.69774974e-03 -7.59286878e-07 -7.43251239e-10 1.78176672e-04 1.79471631e-03 -4.45421064e-05 2.07524222e-04 -8.93382888e-04 1.63228542e-04 -7.08793754e-04 3.05132675e-03 -1.86867785e-04 -1.32848681e-05 5.71907879e-05 -2.50751530e-04 -1.23138740e-04 1.26497031e-05 5.76148107e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 3.31896716e-09 2.45921989e-02 9.51115626e-05 5.66884180e-06 -5.92434932e-08 -7.43251239e-10 1.14806110e-05 -1.69773937e-03 2.06222851e-04 2.07721645e-03 2.07524222e-04 1.63467344e-05 -1.03400723e-03 -7.08793754e-04 -4.47357598e-05 3.53162563e-03 -1.50466339e-04 -4.22695177e-06 -1.23138740e-04 -3.28220159e-04 2.10611495e-05 -2.58452468e-02 -1.17715728e-01 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -6.78114931e-06 9.51115626e-05 -1.69734988e-01 -1.15822968e-02 -7.43251239e-10 1.45933026e-06 -2.00611161e-02 -2.04683860e-05 -8.87780538e-04 -8.94232786e-03 -8.93382888e-04 -1.03400723e-03 4.22751365e-03 3.05132675e-03 3.53162563e-03 -1.44278703e-02 6.47751144e-04 -1.23138740e-04 4.97276108e-04 1.08580825e-03 5.75550635e-04 3.48831445e-05 6.23674190e-03 -9.39497938e-08 1.18024906e-06 -2.41142642e-03 5.06783606e-07 -5.66884180e-06 1.15822968e-02 -1.04434616e-03 1.94361970e-07 -1.67843343e-03 -1.64298602e-06 -4.43808186e-05 -4.21297010e-04 -5.53178821e-05 -4.50064351e-05 1.93750775e-04 1.86867785e-04 1.50466339e-04 -6.47751144e-04 1.41498048e-05 -5.01265909e-06 2.15792826e-05 2.51107285e-05 1.23313443e-05 3.68992533e-10 7.93736167e-08 -5.65901208e-09 -1.48209947e-10 -8.30946994e-07 5.92434932e-08 7.43251239e-10 -7.53013993e-05 -6.25334397e-07 -1.64767438e-10 4.45841973e-08 7.36328467e-06 6.98979855e-05 -3.62020382e-06 -9.68293312e-07 -3.66734829e-05 1.32848681e-05 4.22695177e-06 1.23138740e-04 -5.01265909e-06 -5.05706469e-07 4.32434166e-06 -8.47934604e-06 2.86304145e-06 -4.21672991e-09 -7.53907267e-07 -1.62172242e-04 -1.48209947e-10 2.97156138e-07 1.69774974e-03 7.43251239e-10 -1.45933026e-06 1.94361970e-07 -6.25334397e-07 1.20235056e-03 2.47475994e-07 2.64070842e-10 -3.16986251e-05 -3.00907833e-04 1.55848224e-05 -3.66734829e-05 1.48390584e-04 -5.71907879e-05 1.23138740e-04 -4.97276108e-04 2.15792826e-05 4.32434166e-06 -1.81173093e-05 2.38881257e-05 1.33632702e-05 6.04193497e-05 1.08023487e-02 -1.51407575e-07 2.20299756e-06 -4.17671101e-03 7.59286878e-07 -1.14806110e-05 2.00611161e-02 -1.67843343e-03 -1.64767438e-10 2.47475994e-07 -2.98243108e-03 -4.09640213e-06 -7.47094012e-05 -7.09199341e-04 -7.46794385e-05 -9.74150082e-05 3.24825968e-04 2.50751530e-04 3.28220159e-04 -1.08580825e-03 2.51107285e-05 -8.47934604e-06 2.38881257e-05 3.98081515e-05 3.49486710e-05 5.91433329e-08 1.05742102e-05 -1.48209947e-10 -1.62170174e-04 -4.16787528e-06 7.43251239e-10 1.69773937e-03 2.04683860e-05 -1.64298602e-06 4.45841973e-08 2.64070842e-10 -4.09640213e-06 1.20234688e-03 -3.66881970e-05 -3.48272704e-04 -3.66734829e-05 4.82460442e-06 1.71748237e-04 1.23138740e-04 -2.10611495e-05 -5.75550635e-04 1.23313443e-05 2.86304145e-06 1.33632702e-05 3.49486710e-05 -1.41964463e-05 1.24711616e-02 6.19190671e-02 -1.14378084e-02 -1.32381946e-02 -3.41568515e-02 2.83190335e-02 3.27766354e-02 8.45694373e-02 1.63359495e-03 -7.93167422e-04 -2.04651032e-03 2.59674941e-03 -2.36864449e-03 2.51919723e-03 1.64671600e-02 3.24902890e-07 -4.55704780e-06 -9.30268310e-03 -9.09846362e-07 1.27613927e-05 2.60508990e-02 3.81198897e-05 4.61198093e-09 6.60255543e-05 -6.46870749e-08 6.19190671e-02 1.55233588e-01 -3.81840082e-02 -4.41944220e-02 -1.14029319e-01 5.76745151e-02 6.67528627e-02 1.72234031e-01 1.91416963e-02 -9.29396234e-03 -2.39800442e-02 3.04274867e-02 -2.77546607e-02 1.64671600e-02 8.12088709e-02 1.75317606e-06 -2.45898309e-05 -5.01972800e-02 -4.12894643e-06 5.79120927e-05 1.18220802e-01 6.31097933e-03 3.74031330e-10 7.63541461e-07 1.09309316e-02 -1.07093382e-05 1.14378084e-02 3.81840082e-02 5.04045975e-03 -1.11949249e-02 -2.88848593e-02 -1.51486421e-02 2.23174654e-02 5.75829541e-02 5.30833333e-03 -8.88407690e-05 -2.29224682e-04 5.77942325e-03 -5.27174436e-03 -3.24902890e-07 -1.75317606e-06 3.24322663e-03 5.75530342e-10 1.17487826e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 -9.56120788e-08 8.30764056e-08 1.69590820e-04 -1.53758742e-07 1.50641723e-10 1.32381946e-02 4.41944220e-02 -1.11949249e-02 1.75580222e-03 -3.34315260e-02 2.23174654e-02 -8.60056502e-03 6.66468894e-02 3.24018164e-03 -5.94708958e-04 -5.27174436e-03 8.36560495e-03 -1.77598582e-03 4.55704780e-06 2.45898309e-05 5.75530342e-10 3.24321860e-03 -1.64786973e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 1.19715064e-06 -5.92300780e-09 1.50641723e-10 2.23967753e-06 1.69588718e-04 3.41568515e-02 1.14029319e-01 -2.88848593e-02 -3.34315260e-02 -7.15462873e-02 5.75829541e-02 6.66468894e-02 1.37529655e-01 8.36023388e-03 -5.27174436e-03 -1.21535555e-02 1.29335887e-02 -1.40666049e-02 9.30268310e-03 5.01972800e-02 1.17487826e-06 -1.64786973e-05 -3.03961175e-02 -2.98584860e-06 4.18791437e-05 7.63361082e-02 2.44384381e-03 1.50641723e-10 3.01594476e-07 4.23285954e-03 -4.23012686e-06 -2.83190335e-02 -5.76745151e-02 -1.51486421e-02 2.23174654e-02 5.75829541e-02 4.22002898e-02 -3.07618203e-02 -7.93708630e-02 -1.85681925e-02 -9.79846177e-04 -2.52817407e-03 -1.88372004e-02 1.71824940e-02 9.09846362e-07 4.12894643e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 2.47606941e-02 3.33799472e-09 6.81412802e-06 5.13892822e-07 -8.49490276e-07 -1.73413560e-03 7.68956244e-07 -7.53367854e-10 -3.27766354e-02 -6.67528627e-02 2.23174654e-02 -8.60056502e-03 6.66468894e-02 -3.07618203e-02 3.31745888e-02 -9.18643583e-02 -9.82801276e-03 8.41597522e-04 1.71824940e-02 -2.85358984e-02 2.51327182e-03 -1.27613927e-05 -5.79120927e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 3.33799472e-09 2.47606475e-02 -9.55741178e-05 -5.73643688e-06 6.05655645e-08 -7.53367854e-10 -1.16347756e-05 -1.73412509e-03 -8.45694373e-02 -1.72234031e-01 5.75829541e-02 6.66468894e-02 1.37529655e-01 -7.93708630e-02 -9.18643583e-02 -1.68247549e-01 -2.53579874e-02 1.71824940e-02 3.85159984e-02 -3.88798767e-02 4.45786696e-02 -2.60508990e-02 -1.18220802e-01 -2.98584860e-06 4.18791437e-05 7.63361082e-02 6.81412802e-06 -9.55741178e-05 -1.70342752e-01 -1.17102688e-02 -7.53367854e-10 -1.47734692e-06 -2.02827699e-02 2.07210855e-05 1.63359495e-03 1.91416963e-02 -5.30833333e-03 -3.24018164e-03 -8.36023388e-03 1.85681925e-02 9.82801276e-03 2.53579874e-02 1.14583317e-03 -1.31949045e-05 -3.40451556e-05 1.78087290e-03 -1.62443660e-03 3.81198897e-05 6.31097933e-03 9.56120788e-08 -1.19715064e-06 -2.44384381e-03 -5.13892822e-07 5.73643688e-06 1.17102688e-02 -1.04903361e-03 -1.95706982e-07 -1.68462869e-03 1.65047766e-06 -7.93167422e-04 -9.29396234e-03 8.88407690e-05 5.94708958e-04 5.27174436e-03 9.79846177e-04 -8.41597522e-04 -1.71824940e-02 -1.31949045e-05 2.07718940e-04 1.15329076e-03 4.22959209e-06 1.06632496e-03 3.74031330e-10 -8.30764056e-08 5.92300780e-09 -1.50641723e-10 8.49490276e-07 -6.05655645e-08 7.53367854e-10 -7.64120124e-05 6.31900794e-07 -1.66051241e-10 -4.50523593e-08 -2.04651032e-03 -2.39800442e-02 2.29224682e-04 5.27174436e-03 1.21535555e-02 2.52817407e-03 -1.71824940e-02 -3.85159984e-02 -3.40451556e-05 1.15329076e-03 2.73642859e-03 -1.57041360e-03 1.01769300e-03 4.61198093e-09 7.63541461e-07 -1.69590820e-04 -1.50641723e-10 -3.01594476e-07 1.73413560e-03 7.53367854e-10 1.47734692e-06 -1.95706982e-07 6.31900794e-07 1.21353966e-03 -2.48869296e-07 2.65893782e-10 2.59674941e-03 3.04274867e-02 -5.77942325e-03 -8.36560495e-03 -1.29335887e-02 1.88372004e-02 2.85358984e-02 3.88798767e-02 1.78087290e-03 4.22959209e-06 -1.57041360e-03 3.20121386e-03 -9.02488072e-04 6.60255543e-05 1.09309316e-02 1.53758742e-07 -2.23967753e-06 -4.23285954e-03 -7.68956244e-07 1.16347756e-05 2.02827699e-02 -1.68462869e-03 -1.66051241e-10 -2.48869296e-07 -2.99427218e-03 4.12251080e-06 -2.36864449e-03 -2.77546607e-02 5.27174436e-03 1.77598582e-03 1.40666049e-02 -1.71824940e-02 -2.51327182e-03 -4.45786696e-02 -1.62443660e-03 1.06632496e-03 1.01769300e-03 -9.02488072e-04 3.03502577e-03 -6.46870749e-08 -1.07093382e-05 -1.50641723e-10 -1.69588718e-04 4.23012686e-06 7.53367854e-10 1.73412509e-03 -2.07210855e-05 1.65047766e-06 -4.50523593e-08 2.65893782e-10 4.12251080e-06 1.21353595e-03 + 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 256 282 308 334 359 385 411 437 463 489 515 541 566 590 616 642 668 +-1 1 0 676 + 3.89331986e-02 1.42829079e-01 -4.88176312e-06 6.99865125e-02 -6.99785278e-02 1.03594733e-05 -1.48516712e-01 1.48499767e-01 1.21287926e-02 1.46551442e-06 -1.46534722e-06 -2.39689066e-06 2.10076849e-02 6.42532556e-04 5.07511162e-03 6.04452428e-04 1.90380193e-03 -1.80753131e-03 -1.84578789e-03 -5.81355023e-03 5.51957316e-03 -1.06032758e-04 6.86072489e-05 -6.51379475e-05 1.06507418e-05 -2.05160480e-04 1.42829079e-01 2.06779927e-01 -9.99851519e-06 1.43341901e-01 -1.43325548e-01 1.04981073e-05 -1.50504214e-01 1.50487043e-01 2.77767575e-02 3.35624824e-06 -3.35586533e-06 -5.48923978e-06 4.81107552e-02 5.07511162e-03 3.59759293e-02 4.37719419e-03 1.37865453e-02 -1.30893933e-02 -1.26139618e-02 -3.97293214e-02 3.77203064e-02 4.00605355e-04 -2.59206984e-04 2.46099518e-04 -4.02398682e-05 7.75122601e-04 4.88176312e-06 9.99851519e-06 4.33830748e-02 7.86401912e-06 -7.86312192e-06 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 3.44741836e-06 -1.46430081e-02 1.46413375e-02 -4.48205055e-10 3.92831877e-06 -6.04452428e-04 -4.37719419e-03 2.97306159e-04 -1.82039627e-03 1.72834327e-03 -1.04909434e-03 5.34701922e-03 -5.07663349e-03 6.57679237e-05 1.30188444e-04 -1.23605132e-04 -1.46455660e-06 2.82110993e-05 -6.99865125e-02 -1.43341901e-01 7.86401912e-06 -6.93580099e-02 1.12728223e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 -2.40608543e-02 -2.90737451e-06 3.92831877e-06 -1.46365828e-02 -4.16762926e-02 -1.90380193e-03 -1.37865453e-02 -1.82039627e-03 -4.85829851e-03 5.44364304e-03 5.34701922e-03 1.40943762e-02 -1.59895208e-02 -3.46885111e-05 1.46161394e-05 2.82110993e-05 1.35009641e-04 -4.37075416e-05 6.99785278e-02 1.43325548e-01 -7.86312192e-06 1.12728223e-01 -6.93322862e-02 1.21794940e-05 -1.74609109e-01 9.02112683e-02 2.40581092e-02 3.92831877e-06 -2.90647810e-06 -1.46477626e-02 4.16681967e-02 1.80753131e-03 1.30893933e-02 1.72834327e-03 5.44364304e-03 -4.29309378e-03 -5.07663349e-03 -1.59895208e-02 1.24342099e-02 3.29343976e-05 2.82110993e-05 1.75452526e-05 1.36941640e-04 5.52610666e-05 -1.03594733e-05 -1.04981073e-05 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 1.23008948e-01 1.10829756e-05 -1.10817111e-05 -6.30793787e-06 3.70743003e-02 -3.70700705e-02 6.56460776e-10 -5.75358792e-06 1.84578789e-03 1.26139618e-02 -1.04909434e-03 5.34701922e-03 -5.07663349e-03 3.69162581e-03 -1.52305105e-02 1.44603407e-02 8.07280792e-05 -4.43448271e-04 4.21024172e-04 -1.97534059e-05 3.80501032e-04 1.48516712e-01 1.50504214e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 1.10829756e-05 -3.58801230e-02 1.58870944e-01 2.62180358e-02 3.16820394e-06 -5.75358792e-06 3.70648895e-02 4.54151998e-02 5.81355023e-03 3.97293214e-02 5.34701922e-03 1.40943762e-02 -1.59895208e-02 -1.52305105e-02 -3.94432082e-02 4.55447332e-02 8.01948127e-04 -5.01161394e-04 3.80501032e-04 -3.78421721e-04 1.49865377e-03 -1.48499767e-01 -1.50487043e-01 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -1.10817111e-05 1.58870944e-01 -3.58438699e-02 -2.62150446e-02 -5.75358792e-06 3.16689102e-06 3.70794811e-02 -4.54015593e-02 -5.51957316e-03 -3.77203064e-02 -5.07663349e-03 -1.59895208e-02 1.24342099e-02 1.44603407e-02 4.55447332e-02 -3.47143716e-02 -7.61395564e-04 3.80501032e-04 -4.61654582e-04 -2.41146205e-04 -1.45404145e-03 1.21287926e-02 2.77767575e-02 -3.44741836e-06 2.40608543e-02 -2.40581092e-02 6.30793787e-06 -2.62180358e-02 2.62150446e-02 1.63155837e-02 2.90562388e-06 -2.90529238e-06 -3.21565109e-06 2.81837574e-02 -1.06032758e-04 4.00605355e-04 -6.57679237e-05 3.46885111e-05 -3.29343976e-05 -8.07280792e-05 -8.01948127e-04 7.61395564e-04 -2.53714756e-04 2.37178393e-04 -2.25184860e-04 2.75411598e-05 -5.30513056e-04 1.46551442e-06 3.35624824e-06 1.46430081e-02 2.90737451e-06 -3.92831877e-06 -3.70743003e-02 -3.16820394e-06 5.75358792e-06 2.90562388e-06 -7.73263348e-03 7.77543003e-03 5.41908480e-07 3.94790847e-06 6.86072489e-05 -2.59206984e-04 -1.30188444e-04 -1.46161394e-05 -2.82110993e-05 4.43448271e-04 5.01161394e-04 -3.80501032e-04 2.37178393e-04 -2.23696430e-05 3.02704483e-05 1.26859109e-05 3.87597996e-04 -1.46534722e-06 -3.35586533e-06 -1.46413375e-02 -3.92831877e-06 2.90647810e-06 3.70700705e-02 5.75358792e-06 -3.16689102e-06 -2.90529238e-06 7.77543003e-03 -7.73085920e-03 5.42871179e-07 -3.94733429e-06 -6.51379475e-05 2.46099518e-04 1.23605132e-04 -2.82110993e-05 -1.75452526e-05 -4.21024172e-04 -3.80501032e-04 4.61654582e-04 -2.25184860e-04 3.02704483e-05 -1.92267109e-05 5.34828434e-05 -3.64596315e-04 -2.39689066e-06 -5.48923978e-06 4.48205055e-10 1.46365828e-02 1.46477626e-02 -6.56460776e-10 -3.70648895e-02 -3.70794811e-02 -3.21565109e-06 5.41908480e-07 5.42871179e-07 -1.55071762e-02 -7.34396046e-06 1.06507418e-05 -4.02398682e-05 1.46455660e-06 -1.35009641e-04 -1.36941640e-04 1.97534059e-05 3.78421721e-04 2.41146205e-04 2.75411598e-05 1.26859109e-05 5.34828434e-05 2.01833408e-04 6.52578730e-05 2.10076849e-02 4.81107552e-02 -3.92831877e-06 4.16762926e-02 -4.16681967e-02 5.75358792e-06 -4.54151998e-02 4.54015593e-02 2.81837574e-02 3.94790847e-06 -3.94733429e-06 -7.34396046e-06 4.88593834e-02 -2.05160480e-04 7.75122601e-04 -2.82110993e-05 4.37075416e-05 -5.52610666e-05 -3.80501032e-04 -1.49865377e-03 1.45404145e-03 -5.30513056e-04 3.87597996e-04 -3.64596315e-04 6.52578730e-05 -1.05181203e-03 2.99188764e-01 3.37836548e-01 -2.67051895e-01 2.22939615e-01 -2.65472743e-01 2.40007252e-01 -2.00362272e-01 2.38588022e-01 -1.29669484e-02 1.19093219e-01 -1.41814201e-01 2.07772513e-02 1.18388987e-01 3.93376184e-02 1.43812330e-01 4.93149668e-06 7.05611715e-02 -7.05692375e-02 -1.04449263e-05 -1.49448795e-01 1.49465879e-01 1.23041896e-02 -1.48928208e-06 1.48945232e-06 2.43604152e-06 2.13114816e-02 3.37836548e-01 2.95214746e-01 -2.56969699e-02 2.14522820e-02 -2.55450165e-02 9.63297845e-02 -8.04177969e-02 9.57601596e-02 1.14904457e-02 -1.05532476e-01 1.25666297e-01 -1.84114158e-02 -1.04908433e-01 1.43812330e-01 2.07135892e-01 1.00434680e-05 1.43704622e-01 -1.43721049e-01 -1.05141295e-05 -1.50438973e-01 1.50456170e-01 2.76747208e-02 -3.34970988e-06 3.35009279e-06 5.47917180e-06 4.79340224e-02 2.67051895e-01 2.56969699e-02 4.96737976e-02 1.91194831e-01 -2.27671588e-01 -2.04824043e-01 -5.15005212e-02 6.13259542e-02 1.37233944e-01 3.13721543e-02 -3.73574335e-02 2.47294080e-02 1.40908416e-01 -4.93149668e-06 -1.00434680e-05 4.38001625e-02 -7.92516748e-06 7.92607343e-06 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 -3.48998183e-06 -1.48228696e-02 1.48245640e-02 -4.54127846e-10 -3.97289502e-06 -2.22939615e-01 -2.14522820e-02 1.91194831e-01 1.19086875e-01 1.90064242e-01 -5.15005212e-02 -2.23521252e-01 -5.11959842e-02 7.66088443e-02 1.38812989e-02 1.40908416e-01 -1.31018993e-01 1.37992149e-02 -7.05611715e-02 -1.43704622e-01 -7.92516748e-06 -6.95952497e-02 1.13408375e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -2.42616285e-02 2.93647550e-06 -3.97289502e-06 -1.48293676e-02 -4.20206786e-02 2.65472743e-01 2.55450165e-02 -2.27671588e-01 1.90064242e-01 5.23743770e-02 6.13259542e-02 -5.11959842e-02 -2.05551475e-01 -9.12245230e-02 1.40908416e-01 -3.55775170e-02 -1.06848860e-01 2.97007364e-02 7.05692375e-02 1.43721049e-01 7.92607343e-06 1.13408375e-01 -6.96211764e-02 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 2.42644019e-02 -3.97289502e-06 2.93738375e-06 -1.48180658e-02 4.20288712e-02 -2.40007252e-01 -9.63297845e-02 -2.04824043e-01 -5.15005212e-02 6.13259542e-02 1.68473869e-01 9.04232705e-02 -1.07674509e-01 -2.45728579e-02 8.94038606e-02 -1.06460613e-01 1.35660655e-02 7.72995777e-02 1.04449263e-05 1.05141295e-05 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 1.23594998e-01 -1.11023371e-05 1.11036062e-05 6.33444089e-06 3.73055268e-02 -3.73097913e-02 6.58066333e-10 5.75703181e-06 2.00362272e-01 8.04177969e-02 -5.15005212e-02 -2.23521252e-01 -5.11959842e-02 9.04232705e-02 2.01301940e-01 8.98885725e-02 3.45039972e-04 -7.88634261e-02 7.72995777e-02 3.19280116e-04 -7.83970847e-02 1.49448795e-01 1.50438973e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -1.11023371e-05 -3.52602051e-02 1.58873363e-01 2.60198035e-02 -3.14910296e-06 5.75703181e-06 3.73149430e-02 4.50633570e-02 -2.38588022e-01 -9.57601596e-02 6.13259542e-02 -5.11959842e-02 -2.05551475e-01 -1.07674509e-01 8.98885725e-02 1.69751075e-01 -4.10867794e-04 7.72995777e-02 -1.05995557e-01 2.73518845e-02 8.84869537e-02 -1.49465879e-01 -1.50456170e-01 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 1.11036062e-05 1.58873363e-01 -3.52965257e-02 -2.60227779e-02 5.75703181e-06 -3.15041910e-06 3.73003748e-02 -4.50770378e-02 -1.29669484e-02 1.14904457e-02 -1.37233944e-01 -7.66088443e-02 9.12245230e-02 2.45728579e-02 -3.45039972e-04 4.10867794e-04 -1.62410215e-01 4.57066430e-02 -5.44267016e-02 -2.47348883e-02 -1.40939643e-01 1.23041896e-02 2.76747208e-02 3.48998183e-06 2.42616285e-02 -2.42644019e-02 -6.33444089e-06 -2.60198035e-02 2.60227779e-02 1.65141115e-02 -2.95659433e-06 2.95693230e-06 3.25513784e-06 2.84772691e-02 1.19093219e-01 -1.05532476e-01 -3.13721543e-02 -1.38812989e-02 -1.40908416e-01 -8.94038606e-02 7.88634261e-02 -7.72995777e-02 4.57066430e-02 1.56402795e-02 -7.60018985e-02 1.35144522e-01 2.43821172e-02 -1.48928208e-06 -3.34970988e-06 1.48228696e-02 -2.93647550e-06 3.97289502e-06 -3.73055268e-02 3.14910296e-06 -5.75703181e-06 -2.95659433e-06 -7.91184381e-03 7.98550905e-03 -5.58562361e-07 -4.00482622e-06 -1.41814201e-01 1.25666297e-01 3.73574335e-02 -1.40908416e-01 3.55775170e-02 1.06460613e-01 -7.72995777e-02 1.05995557e-01 -5.44267016e-02 -7.60018985e-02 4.23169254e-02 9.68632034e-02 -7.42761054e-02 1.48945232e-06 3.35009279e-06 -1.48245640e-02 3.97289502e-06 -2.93738375e-06 3.73097913e-02 -5.75703181e-06 3.15041910e-06 2.95693230e-06 7.98550905e-03 -7.91366940e-03 -5.57582947e-07 4.00541161e-06 2.07772513e-02 -1.84114158e-02 -2.47294080e-02 1.31018993e-01 1.06848860e-01 -1.35660655e-02 -3.19280116e-04 -2.73518845e-02 -2.47348883e-02 1.35144522e-01 9.68632034e-02 -1.32327126e-01 2.67411351e-02 2.43604152e-06 5.47917180e-06 4.54127846e-10 1.48293676e-02 1.48180658e-02 -6.58066333e-10 -3.73149430e-02 -3.73003748e-02 3.25513784e-06 -5.58562361e-07 -5.57582947e-07 -1.58982655e-02 7.46365585e-06 1.18388987e-01 -1.04908433e-01 -1.40908416e-01 -1.37992149e-02 -2.97007364e-02 -7.72995777e-02 7.83970847e-02 -8.84869537e-02 -1.40939643e-01 2.43821172e-02 -7.42761054e-02 2.67411351e-02 1.53510654e-02 2.13114816e-02 4.79340224e-02 3.97289502e-06 4.20206786e-02 -4.20288712e-02 -5.75703181e-06 -4.50633570e-02 4.50770378e-02 2.84772691e-02 -4.00482622e-06 4.00541161e-06 7.46365585e-06 4.93968293e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 1 1 668 + 2.49376946e-03 1.63259218e-02 -3.21649074e-07 9.21801592e-03 -3.98531392e-06 9.01360150e-07 -2.58317306e-02 1.11680818e-05 3.46712384e-05 4.19087540e-09 -6.00523242e-05 5.19260133e-08 3.33606344e-05 3.50374283e-04 3.28256531e-05 1.68784744e-04 -3.27645127e-05 -1.13688913e-04 -5.84571891e-04 1.13477159e-04 -3.31108290e-05 2.31872694e-05 -4.50111525e-06 5.73664211e-05 -2.31440813e-05 1.63259218e-02 8.07851388e-02 -1.74007357e-06 4.98680929e-02 -2.15599546e-05 4.10635424e-06 -1.17682412e-01 5.08787746e-05 6.23186384e-03 7.53274645e-07 -3.25670509e-10 -1.07939008e-02 9.33326466e-06 3.50374283e-04 3.67824742e-03 3.42370911e-04 1.76042153e-03 -3.41733219e-04 -1.18773504e-03 -6.10716120e-03 1.18552279e-03 -3.36216588e-04 2.35449998e-04 -4.57055790e-05 5.82514632e-04 -2.35011454e-04 3.21649074e-07 1.74007357e-06 3.21232643e-03 1.16469636e-06 -5.03544437e-10 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 9.38408078e-08 -1.61686673e-04 6.99035624e-08 -1.51253354e-07 1.30785673e-10 -3.28256531e-05 -3.42370911e-04 4.56849254e-06 -1.71094309e-04 3.32128458e-05 -1.65917061e-05 5.91891919e-04 -1.14898123e-04 4.07019730e-05 7.34711513e-06 -1.42622279e-06 -5.84654113e-05 2.35874612e-05 -9.21801592e-03 -4.98680929e-02 1.16469636e-06 -3.01662544e-02 1.44308845e-05 -2.96379028e-06 7.58614025e-02 -3.67221162e-05 -2.40929773e-03 -2.96864946e-07 1.30785673e-10 4.17302446e-03 -3.67823227e-06 -1.68784744e-04 -1.76042153e-03 -1.71094309e-04 -8.41898788e-04 1.70775632e-04 5.91891919e-04 2.91171810e-03 -5.90789474e-04 1.55627143e-04 -1.15484834e-04 2.35874612e-05 -2.69642067e-04 1.15269734e-04 3.98531392e-06 2.15599546e-05 -5.03544437e-10 1.44308845e-05 3.21232023e-03 1.28136410e-09 -3.67221162e-05 -9.07669659e-03 1.04163497e-06 1.30785673e-10 5.64176189e-09 -1.94397114e-06 -1.61685063e-04 3.27645127e-05 3.41733219e-04 3.32128458e-05 1.70775632e-04 4.69233101e-06 -1.14898123e-04 -5.90789474e-04 -1.70201189e-05 -3.02103578e-05 2.35874612e-05 1.44598871e-06 6.43700825e-05 7.43506409e-06 -9.01360150e-07 -4.10635424e-06 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 2.45811607e-02 6.77897519e-06 -2.93081987e-09 -5.06317042e-07 1.69536494e-03 -7.32973512e-07 7.58652036e-07 -6.55990858e-10 1.13688913e-04 1.18773504e-03 -1.65917061e-05 5.91891919e-04 -1.14898123e-04 5.98807016e-05 -2.05076768e-03 3.98095244e-04 -1.40695861e-04 -2.66954372e-05 5.18212116e-06 2.01662792e-04 -8.13594426e-05 2.58317306e-02 1.17682412e-01 -2.96379028e-06 7.58614025e-02 -3.67221162e-05 6.77897519e-06 -1.69694857e-01 8.39932287e-05 1.15738852e-02 1.45814709e-06 -6.55990858e-10 -2.00465492e-02 1.80668138e-05 5.84571891e-04 6.10716120e-03 5.91891919e-04 2.91171810e-03 -5.90789474e-04 -2.05076768e-03 -1.00860309e-02 2.04694796e-03 -5.36018193e-04 3.98074794e-04 -8.13594426e-05 9.28714104e-04 -3.97333349e-04 -1.11680818e-05 -5.08787746e-05 1.28136410e-09 -3.67221162e-05 -9.07669659e-03 -2.93081987e-09 8.39932287e-05 2.45811246e-02 -5.00384967e-06 -6.55990858e-10 -5.91569780e-08 1.01328654e-05 1.69535687e-03 -1.13477159e-04 -1.18552279e-03 -1.14898123e-04 -5.90789474e-04 -1.70201189e-05 3.98095244e-04 2.04694796e-03 6.13650522e-05 1.04051910e-04 -8.13594426e-05 -5.25078932e-06 -2.22292276e-04 -2.69987966e-05 3.46712384e-05 6.23186384e-03 -9.38408078e-08 2.40929773e-03 -1.04163497e-06 5.06317042e-07 -1.15738852e-02 5.00384967e-06 -1.04403562e-03 -1.94273263e-07 1.67802194e-03 -1.45095116e-06 -3.31108290e-05 -3.36216588e-04 -4.07019730e-05 -1.55627143e-04 3.02103578e-05 1.40695861e-04 5.36018193e-04 -1.04051910e-04 2.05421039e-05 -2.31363560e-05 4.49123193e-06 -3.69308277e-05 1.48994841e-05 4.19087540e-09 7.53274645e-07 1.61686673e-04 2.96864946e-07 -1.30785673e-10 -1.69536494e-03 -1.45814709e-06 6.55990858e-10 -1.94273263e-07 1.20161446e-03 -5.52030007e-07 2.47383923e-07 -2.33170086e-10 2.31872694e-05 2.35449998e-04 -7.34711513e-06 1.15484834e-04 -2.35874612e-05 2.66954372e-05 -3.98074794e-04 8.13594426e-05 -2.31363560e-05 -9.93582364e-06 1.95748636e-06 3.06046683e-05 -1.33393269e-05 -3.25670509e-10 -6.99035624e-08 -1.30785673e-10 -5.64176189e-09 7.32973512e-07 6.55990858e-10 5.91569780e-08 -5.52030007e-07 -7.52286023e-05 -1.45478430e-10 -4.45534560e-08 -4.50111525e-06 -4.57055790e-05 1.42622279e-06 -2.35874612e-05 -1.44598871e-06 -5.18212116e-06 8.13594426e-05 5.25078932e-06 4.49123193e-06 1.95748636e-06 -2.31918317e-07 -7.78104913e-06 -1.97147935e-06 -6.00523242e-05 -1.07939008e-02 1.51253354e-07 -4.17302446e-03 1.94397114e-06 -7.58652036e-07 2.00465492e-02 -1.01328654e-05 1.67802194e-03 2.47383923e-07 -1.45478430e-10 -2.98164606e-03 3.61717981e-06 5.73664211e-05 5.82514632e-04 5.84654113e-05 2.69642067e-04 -6.43700825e-05 -2.01662792e-04 -9.28714104e-04 2.22292276e-04 -3.69308277e-05 3.06046683e-05 -7.78104913e-06 6.32248316e-05 -3.52783450e-05 5.19260133e-08 9.33326466e-06 -1.30785673e-10 3.67823227e-06 1.61685063e-04 6.55990858e-10 -1.80668138e-05 -1.69535687e-03 -1.45095116e-06 -2.33170086e-10 -4.45534560e-08 3.61717981e-06 1.20161159e-03 -2.31440813e-05 -2.35011454e-04 -2.35874612e-05 -1.15269734e-04 -7.43506409e-06 8.13594426e-05 3.97333349e-04 2.69987966e-05 1.48994841e-05 -1.33393269e-05 -1.97147935e-06 -3.52783450e-05 -9.98556108e-06 1.92513510e-02 8.66342784e-02 -1.75669055e-02 4.96623746e-02 1.75341858e-02 4.14865029e-02 -1.17284074e-01 -4.14092311e-02 3.05345915e-03 4.27892344e-03 1.51075012e-03 -5.29437942e-03 -4.27095361e-03 2.52078031e-03 1.64759450e-02 3.25105461e-07 9.30795141e-03 4.02813944e-06 -9.10374471e-07 -2.60645309e-02 -1.12797715e-05 3.83352702e-05 -4.63830420e-09 -6.63986110e-05 -5.74697701e-08 8.66342784e-02 1.76233276e-01 -4.99078543e-02 1.41091586e-01 4.98148970e-02 6.50881881e-02 -1.84007023e-01 -6.49669562e-02 2.10562425e-02 2.95068789e-02 1.04179291e-02 -3.65093264e-02 -2.94519201e-02 1.64759450e-02 8.12351455e-02 1.75399033e-06 5.02177252e-02 2.17323868e-05 -4.13034744e-06 -1.18254160e-01 -5.11760565e-05 6.31590129e-03 -7.64180646e-07 -3.30709311e-10 -1.09394579e-02 -9.46839279e-06 1.75669055e-02 4.99078543e-02 7.70355088e-03 4.12985845e-02 1.45812007e-02 -2.21293801e-02 -7.58032293e-02 -2.67636800e-02 8.63920236e-03 -1.45383338e-04 -5.13301765e-05 -9.46118283e-03 -7.63229640e-03 -3.25105461e-07 -1.75399033e-06 3.24514969e-03 -1.17551164e-06 -5.08718255e-10 -9.16018014e-03 2.98721950e-06 1.29275887e-09 -9.57225318e-08 -1.70084588e-04 -7.36063615e-08 1.53914899e-07 1.33217453e-10 -4.96623746e-02 -1.41091586e-01 4.12985845e-02 -9.44408602e-02 -4.12216626e-02 -7.58032293e-02 1.65355889e-01 7.56620398e-02 -1.09273807e-02 -1.88608733e-02 -7.63229640e-03 1.89552365e-02 1.88257435e-02 -9.30795141e-03 -5.02177252e-02 -1.17551164e-06 -3.04104068e-02 -1.45648885e-05 2.98721950e-06 7.63655869e-02 3.70124103e-05 -2.44599452e-03 3.01889189e-07 1.33217453e-10 4.23658515e-03 3.74048393e-06 -1.75341858e-02 -4.98148970e-02 1.45812007e-02 -4.12216626e-02 7.75791880e-03 -2.67636800e-02 7.56620398e-02 -2.22291720e-02 -3.85810634e-03 -7.63229640e-03 6.14923226e-05 1.21946375e-02 -1.73841361e-04 -4.02813944e-06 -2.17323868e-05 -5.08718255e-10 -1.45648885e-05 3.24514343e-03 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -1.05853658e-06 1.33217453e-10 -5.94060849e-09 1.98065116e-06 -1.70082948e-04 -4.14865029e-02 -6.50881881e-02 -2.21293801e-02 -7.58032293e-02 -2.67636800e-02 5.59477659e-02 8.79627814e-02 3.10568264e-02 -2.54796519e-02 7.16039797e-03 2.52810602e-03 2.48719613e-02 2.00641066e-02 9.10374471e-07 4.13034744e-06 -9.16018014e-03 2.98721950e-06 1.29275887e-09 2.47718463e-02 -6.81630736e-06 -2.94984743e-09 5.14364745e-07 1.73655412e-03 7.51516832e-07 -7.69597852e-07 -6.66107483e-10 1.17284074e-01 1.84007023e-01 -7.58032293e-02 1.65355889e-01 7.56620398e-02 8.79627814e-02 -1.61611907e-01 -8.77989439e-02 2.48129646e-02 4.71846362e-02 2.00641066e-02 -4.30521270e-02 -4.70967511e-02 2.60645309e-02 1.18254160e-01 2.98721950e-06 7.63655869e-02 3.70124103e-05 -6.81630736e-06 -1.70382850e-01 -8.44557838e-05 1.17187506e-02 -1.47854212e-06 -6.66107483e-10 -2.02974633e-02 -1.83195134e-05 4.14092311e-02 6.49669562e-02 -2.67636800e-02 7.56620398e-02 -2.22291720e-02 3.10568264e-02 -8.77989439e-02 5.60635653e-02 8.76065901e-03 2.00641066e-02 -2.55928648e-03 -3.44509506e-02 7.23520964e-03 1.12797715e-05 5.11760565e-05 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -2.94984743e-09 -8.44557838e-05 2.47718100e-02 5.07144479e-06 -6.66107483e-10 6.06535786e-08 -1.02870302e-05 1.73654592e-03 3.05345915e-03 2.10562425e-02 -8.63920236e-03 1.09273807e-02 3.85810634e-03 2.54796519e-02 -2.48129646e-02 -8.76065901e-03 2.34064452e-03 3.63414704e-03 1.28310033e-03 -4.91175923e-03 -3.96229551e-03 3.83352702e-05 6.31590129e-03 9.57225318e-08 2.44599452e-03 1.05853658e-06 -5.14364745e-07 -1.17187506e-02 -5.07144479e-06 -1.04934184e-03 1.95795826e-07 1.68503499e-03 1.45844276e-06 4.27892344e-03 2.95068789e-02 1.45383338e-04 1.88608733e-02 7.63229640e-03 -7.16039797e-03 -4.71846362e-02 -2.00641066e-02 3.63414704e-03 5.23639869e-03 2.04675821e-03 -6.68888885e-03 -5.30801922e-03 -4.63830420e-09 -7.64180646e-07 1.70084588e-04 -3.01889189e-07 -1.33217453e-10 -1.73655412e-03 1.47854212e-06 6.66107483e-10 1.95795826e-07 1.21428062e-03 5.58596407e-07 -2.48961148e-07 -2.34993022e-10 1.51075012e-03 1.04179291e-02 5.13301765e-05 7.63229640e-03 -6.14923226e-05 -2.52810602e-03 -2.00641066e-02 2.55928648e-03 1.28310033e-03 2.04675821e-03 1.61974783e-04 -2.22483488e-03 -2.04366695e-03 -3.30709311e-10 7.36063615e-08 -1.33217453e-10 5.94060849e-09 -7.51516832e-07 6.66107483e-10 -6.06535786e-08 5.58596407e-07 -7.64858284e-05 -1.46762231e-10 4.50834198e-08 -5.29437942e-03 -3.65093264e-02 9.46118283e-03 -1.89552365e-02 -1.21946375e-02 -2.48719613e-02 4.30521270e-02 3.44509506e-02 -4.91175923e-03 -6.68888885e-03 -2.22483488e-03 8.02331330e-03 6.48306565e-03 -6.63986110e-05 -1.09394579e-02 -1.53914899e-07 -4.23658515e-03 -1.98065116e-06 7.69597852e-07 2.02974633e-02 1.02870302e-05 1.68503499e-03 -2.48961148e-07 -1.46762231e-10 -2.99505024e-03 -3.64328844e-06 -4.27095361e-03 -2.94519201e-02 7.63229640e-03 -1.88257435e-02 1.73841361e-04 -2.00641066e-02 4.70967511e-02 -7.23520964e-03 -3.96229551e-03 -5.30801922e-03 -2.04366695e-03 6.48306565e-03 5.21660704e-03 -5.74697701e-08 -9.46839279e-06 -1.33217453e-10 -3.74048393e-06 1.70082948e-04 6.66107483e-10 1.83195134e-05 -1.73654592e-03 1.45844276e-06 -2.34993022e-10 4.50834198e-08 -3.64328844e-06 1.21427773e-03 + 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 258 282 308 334 359 385 411 437 463 489 515 541 566 592 616 642 668 +-1 1 2 169 + 3.83955512e-06 4.19919069e-05 -3.92683227e-06 1.89244487e-05 1.17426483e-05 1.35585435e-05 -6.53422258e-05 -4.05449474e-05 -6.31890728e-06 -3.49681725e-06 -2.16978025e-06 5.18183225e-06 1.04567479e-05 4.19919069e-05 4.58569112e-04 -4.30873073e-05 2.07649189e-04 1.28846628e-04 1.48469277e-04 -7.15512919e-04 -4.43976821e-04 -6.97279786e-05 -3.85867346e-05 -2.39431257e-05 5.71805650e-05 1.15388288e-04 3.92683227e-06 4.30873073e-05 -1.40149387e-06 1.96084533e-05 1.21670742e-05 5.10560836e-06 -6.79795362e-05 -4.21814024e-05 -7.21752600e-06 -1.15275871e-06 -7.15288480e-07 5.42582220e-06 1.09491107e-05 -1.89244487e-05 -2.07649189e-04 1.96084533e-05 -9.18310798e-05 -5.86363651e-05 -6.79795362e-05 3.18611280e-04 2.03283392e-04 3.04379662e-05 1.71250255e-05 1.09491107e-05 -2.36397712e-05 -5.12100181e-05 -1.17426483e-05 -1.28846628e-04 1.21670742e-05 -5.86363651e-05 -3.37166812e-05 -4.21814024e-05 2.03283392e-04 1.17137466e-04 1.88868028e-05 1.09491107e-05 6.27338109e-06 -1.77818275e-05 -3.02330913e-05 -1.35585435e-05 -1.48469277e-04 5.10560836e-06 -6.79795362e-05 -4.21814024e-05 -1.84724174e-05 2.35020262e-04 1.45830419e-04 2.51488080e-05 4.28398501e-06 2.65821901e-06 -1.89521527e-05 -3.82447507e-05 6.53422258e-05 7.15512919e-04 -6.79795362e-05 3.18611280e-04 2.03283392e-04 2.35020262e-04 -1.10233072e-03 -7.02795558e-04 -1.06467085e-04 -5.98703642e-05 -3.82447507e-05 8.28301074e-05 1.79034036e-04 4.05449474e-05 4.43976821e-04 -4.21814024e-05 2.03283392e-04 1.17137466e-04 1.45830419e-04 -7.02795558e-04 -4.05791278e-04 -6.60629829e-05 -3.82447507e-05 -2.19660589e-05 6.19513742e-05 1.05860278e-04 -6.31890728e-06 -6.97279786e-05 7.21752600e-06 -3.04379662e-05 -1.88868028e-05 -2.51488080e-05 1.06467085e-04 6.60629829e-05 9.63911023e-06 6.27171598e-06 3.89160901e-06 -8.02686959e-06 -1.61979292e-05 -3.49681725e-06 -3.85867346e-05 1.15275871e-06 -1.71250255e-05 -1.09491107e-05 -4.28398501e-06 5.98703642e-05 3.82447507e-05 6.27171598e-06 8.87315045e-07 5.79560922e-07 -4.41578077e-06 -9.60072217e-06 -2.16978025e-06 -2.39431257e-05 7.15288480e-07 -1.09491107e-05 -6.27338109e-06 -2.65821901e-06 3.82447507e-05 2.19660589e-05 3.89160901e-06 5.79560922e-07 3.12913232e-07 -3.35260274e-06 -5.65368674e-06 5.18183225e-06 5.71805650e-05 -5.42582220e-06 2.36397712e-05 1.77818275e-05 1.89521527e-05 -8.28301074e-05 -6.19513742e-05 -8.02686959e-06 -4.41578077e-06 -3.35260274e-06 4.03592852e-06 1.46809325e-05 1.04567479e-05 1.15388288e-04 -1.09491107e-05 5.12100181e-05 3.02330913e-05 3.82447507e-05 -1.79034036e-04 -1.05860278e-04 -1.61979292e-05 -9.60072217e-06 -5.65368674e-06 1.46809325e-05 2.63863900e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 2 -2 169 + 9.11252803e-07 9.56477318e-06 -2.93516093e-06 -1.13533425e-06 -4.88359185e-06 9.59313637e-06 3.71067090e-06 1.59612927e-05 -4.67987968e-07 6.83137386e-07 2.93848633e-06 -2.31244197e-06 1.13662053e-06 9.56477318e-06 1.00255147e-04 -3.08847491e-05 -1.19463683e-05 -5.13867937e-05 1.00742118e-04 3.89675316e-05 1.67617176e-04 -4.93724183e-06 7.20705383e-06 3.10008347e-05 -2.43961085e-05 1.19912707e-05 2.93516093e-06 3.08847491e-05 -9.10286800e-06 -3.68226825e-06 -1.58391198e-05 2.98824311e-05 1.20743208e-05 5.19371761e-05 -1.82689002e-06 2.13217309e-06 9.17145163e-06 -7.55524124e-06 3.71358175e-06 1.13533425e-06 1.19463683e-05 -3.68226825e-06 -1.00747946e-06 -6.12664710e-06 1.20743208e-05 3.33729323e-06 2.00895474e-05 -5.33821442e-07 6.05365050e-07 3.71358175e-06 -3.02218583e-06 1.00722103e-06 4.88359185e-06 5.13867937e-05 -1.58391198e-05 -6.12664710e-06 -2.59366718e-05 5.19371761e-05 2.00895474e-05 8.50812200e-05 -2.29621017e-06 3.71358175e-06 1.57158475e-05 -1.21413833e-05 6.07896478e-06 -9.59313637e-06 -1.00742118e-04 2.98824311e-05 1.20743208e-05 5.19371761e-05 -9.78118163e-05 -3.94807942e-05 -1.69824953e-04 5.98536037e-06 -7.02424381e-06 -3.02144852e-05 2.48594519e-05 -1.22190151e-05 -3.71067090e-06 -3.89675316e-05 1.20743208e-05 3.33729323e-06 2.00895474e-05 -3.94807942e-05 -1.10141288e-05 -6.56891018e-05 1.76144646e-06 -2.01417913e-06 -1.22190151e-05 9.93544465e-06 -3.35124002e-06 -1.59612927e-05 -1.67617176e-04 5.19371761e-05 2.00895474e-05 8.50812200e-05 -1.69824953e-04 -6.56891018e-05 -2.78301639e-04 7.57678682e-06 -1.22190151e-05 -5.17330829e-05 3.99866249e-05 -2.00106032e-05 -4.67987968e-07 -4.93724183e-06 1.82689002e-06 5.33821442e-07 2.29621017e-06 -5.98536037e-06 -1.76144646e-06 -7.57678682e-06 -1.17535291e-07 -3.97200528e-07 -1.70854113e-06 9.79936031e-07 -4.81661994e-07 6.83137386e-07 7.20705383e-06 -2.13217309e-06 -6.05365050e-07 -3.71358175e-06 7.02424381e-06 2.01417913e-06 1.22190151e-05 -3.97200528e-07 3.48259502e-07 2.16511122e-06 -1.84744381e-06 6.10005644e-07 2.93848633e-06 3.10008347e-05 -9.17145163e-06 -3.71358175e-06 -1.57158475e-05 3.02144852e-05 1.22190151e-05 5.17330829e-05 -1.70854113e-06 2.16511122e-06 9.15804943e-06 -7.41171842e-06 3.71232899e-06 -2.31244197e-06 -2.43961085e-05 7.55524124e-06 3.02218583e-06 1.21413833e-05 -2.48594519e-05 -9.93544465e-06 -3.99866249e-05 9.79936031e-07 -1.84744381e-06 -7.41171842e-06 5.57972692e-06 -2.97035490e-06 1.13662053e-06 1.19912707e-05 -3.71358175e-06 -1.00722103e-06 -6.07896478e-06 1.22190151e-05 3.35124002e-06 2.00106032e-05 -4.81661994e-07 6.10005644e-07 3.71232899e-06 -2.97035490e-06 9.96573009e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +-1 2 -1 676 + 1.69076833e-04 1.55649490e-03 -3.23354778e-04 3.23648843e-04 -6.46944120e-04 1.05904640e-03 -1.06000952e-03 2.11886105e-03 -4.51059212e-05 -5.20492749e-05 1.04041689e-04 -7.80311210e-05 -1.04136307e-04 4.38363308e-07 4.51521917e-06 -4.79187413e-07 1.52109118e-06 -2.40630342e-06 1.52628498e-06 -4.84490735e-06 7.66444334e-06 -9.41387813e-07 -3.10924702e-07 4.91870038e-07 -7.41509184e-07 -1.56134981e-06 1.55649490e-03 1.38824192e-02 -2.87776317e-03 2.88038026e-03 -5.75761390e-03 9.29696771e-03 -9.30542255e-03 1.86006795e-02 -2.87817072e-04 -3.32122026e-04 6.63881230e-04 -4.97909991e-04 -6.64484976e-04 4.51521917e-06 4.64689687e-05 -4.94295089e-06 1.56904769e-05 -2.48216864e-05 1.57254058e-05 -4.99173713e-05 7.89672198e-05 -9.72433996e-06 -3.21178739e-06 5.08091501e-06 -7.65963537e-06 -1.61284182e-05 3.23354778e-04 2.87776317e-03 -4.11290064e-04 6.38705842e-04 -1.27671394e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -1.33188086e-04 -4.05852446e-05 8.11261525e-05 -1.33580368e-04 -1.78269465e-04 4.79187413e-07 4.94295089e-06 -3.64936589e-07 1.67271221e-06 -2.64616164e-06 1.17420366e-06 -5.33816927e-06 8.44476332e-06 -1.08090228e-06 -2.36920844e-07 3.74798990e-07 -8.20684715e-07 -1.72806481e-06 -3.23648843e-04 -2.88038026e-03 6.38705842e-04 -4.12451239e-04 1.27787501e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 4.92750067e-05 4.07103584e-05 -1.78269465e-04 1.82219018e-04 8.14502486e-05 -1.52109118e-06 -1.56904769e-05 1.67271221e-06 -5.14769753e-06 8.39974720e-06 -5.33816927e-06 1.64375510e-05 -2.68063281e-05 3.24544151e-06 1.05858563e-06 -1.72806481e-06 2.71231397e-06 5.31582877e-06 6.46944120e-04 5.75761390e-03 -1.27671394e-03 1.27787501e-03 -2.32751856e-03 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -9.84961837e-05 -1.78269465e-04 3.07871094e-04 -1.70276298e-04 -3.08151078e-04 2.40630342e-06 2.48216864e-05 -2.64616164e-06 8.39974720e-06 -1.31260374e-05 8.44476332e-06 -2.68063281e-05 4.18990309e-05 -5.13415444e-06 -1.72806481e-06 2.69995506e-06 -3.95158656e-06 -8.57050441e-06 -1.05904640e-03 -9.29696771e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -4.08670984e-03 6.64539894e-03 -1.32835382e-02 3.95352170e-04 8.97947178e-05 -1.79491341e-04 3.70253734e-04 4.94121524e-04 -1.52628498e-06 -1.57254058e-05 1.17420366e-06 -5.33816927e-06 8.44476332e-06 -3.76957244e-06 1.70071384e-05 -2.69045905e-05 3.45344291e-06 7.64118956e-07 -1.20880463e-06 2.62389032e-06 5.52496280e-06 1.06000952e-03 9.30542255e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 6.64539894e-03 -4.09879125e-03 1.32956185e-02 -1.23474085e-04 -9.01621275e-05 4.94121524e-04 -5.27766916e-04 -1.80389660e-04 4.84490735e-06 4.99173713e-05 -5.33816927e-06 1.64375510e-05 -2.68063281e-05 1.70071384e-05 -5.23978281e-05 8.54036109e-05 -1.03801459e-05 -3.38659699e-06 5.52496280e-06 -8.66516435e-06 -1.70062479e-05 -2.11886105e-03 -1.86006795e-02 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -1.32835382e-02 1.32956185e-02 -2.40240613e-02 2.46813282e-04 4.94121524e-04 -8.30669595e-04 4.26594825e-04 8.31425022e-04 -7.66444334e-06 -7.89672198e-05 8.44476332e-06 -2.68063281e-05 4.18990309e-05 -2.69045905e-05 8.54036109e-05 -1.33516821e-04 1.64209621e-05 5.52496280e-06 -8.63437763e-06 1.26444974e-05 2.74082234e-05 -4.51059212e-05 -2.87817072e-04 1.33188086e-04 -4.92750067e-05 9.84961837e-05 -3.95352170e-04 1.23474085e-04 -2.46813282e-04 -2.47411303e-05 -1.47282984e-05 2.94405072e-05 -3.40685171e-05 -4.54660846e-05 -9.41387813e-07 -9.72433996e-06 1.08090228e-06 -3.24544151e-06 5.13415444e-06 -3.45344291e-06 1.03801459e-05 -1.64209621e-05 1.98336950e-06 6.98100783e-07 -1.10436661e-06 1.57201552e-06 3.31009540e-06 -5.20492749e-05 -3.32122026e-04 4.05852446e-05 -4.07103584e-05 1.78269465e-04 -8.97947178e-05 9.01621275e-05 -4.94121524e-04 -1.47282984e-05 -2.51275068e-05 4.93575935e-05 -2.54736713e-05 -4.93856874e-05 -3.10924702e-07 -3.21178739e-06 2.36920844e-07 -1.05858563e-06 1.72806481e-06 -7.64118956e-07 3.38659699e-06 -5.52496280e-06 6.98100783e-07 1.49619549e-07 -2.45094864e-07 5.62133663e-07 1.10075876e-06 1.04041689e-04 6.63881230e-04 -8.11261525e-05 1.78269465e-04 -3.07871094e-04 1.79491341e-04 -4.94121524e-04 8.30669595e-04 2.94405072e-05 4.93575935e-05 -9.90964898e-05 6.93765564e-05 8.48872460e-05 4.91870038e-07 5.08091501e-06 -3.74798990e-07 1.72806481e-06 -2.69995506e-06 1.20880463e-06 -5.52496280e-06 8.63437763e-06 -1.10436661e-06 -2.45094864e-07 3.82418235e-07 -8.18152527e-07 -1.77513074e-06 -7.80311210e-05 -4.97909991e-04 1.33580368e-04 -1.82219018e-04 1.70276298e-04 -3.70253734e-04 5.27766916e-04 -4.26594825e-04 -3.40685171e-05 -2.54736713e-05 6.93765564e-05 -6.40182947e-05 -6.02027351e-05 -7.41509184e-07 -7.65963537e-06 8.20684715e-07 -2.71231397e-06 3.95158656e-06 -2.62389032e-06 8.66516435e-06 -1.26444974e-05 1.57201552e-06 5.62133663e-07 -8.18152527e-07 1.03884529e-06 2.70995093e-06 -1.04136307e-04 -6.64484976e-04 1.78269465e-04 -8.14502486e-05 3.08151078e-04 -4.94121524e-04 1.80389660e-04 -8.31425022e-04 -4.54660846e-05 -4.93856874e-05 8.48872460e-05 -6.02027351e-05 -9.92508158e-05 -1.56134981e-06 -1.61284182e-05 1.72806481e-06 -5.31582877e-06 8.57050441e-06 -5.52496280e-06 1.70062479e-05 -2.74082234e-05 3.31009540e-06 1.10075876e-06 -1.77513074e-06 2.70995093e-06 5.45802294e-06 9.95345080e-04 7.42635303e-03 -2.78656541e-03 7.77439677e-04 -2.78105856e-03 8.28974459e-03 -2.31280283e-03 8.27336227e-03 5.17611903e-05 -5.40169166e-05 1.93229408e-04 -8.88885295e-05 -5.39101676e-05 1.71619640e-04 1.57748679e-03 -3.28090901e-04 3.27792487e-04 -6.55943768e-04 1.07382250e-03 -1.07284581e-03 2.14686594e-03 -4.53078102e-05 -5.23517311e-05 1.04760765e-04 -7.85707053e-05 -1.04665480e-04 7.42635303e-03 4.77116671e-02 -1.85589990e-02 5.17788031e-03 -1.85223224e-02 5.07788860e-02 -1.41670892e-02 5.06785360e-02 -6.73638275e-04 7.02995089e-04 -2.51475525e-03 1.15682648e-03 7.01605820e-04 1.57748679e-03 1.40404080e-02 -2.91425705e-03 2.91160640e-03 -5.82639977e-03 9.40565257e-03 -9.39709770e-03 1.88044812e-02 -2.86362953e-04 -3.30883268e-04 6.62128712e-04 -4.96597364e-04 -6.61526476e-04 2.78656541e-03 1.85589990e-02 -6.51604059e-03 2.19160263e-03 -7.83980473e-03 1.80793532e-02 -6.18271911e-03 2.21168335e-02 -2.46046287e-04 1.41994680e-04 -5.07943615e-04 1.76759062e-04 1.07202928e-04 3.28090901e-04 2.91425705e-03 -4.16764814e-04 6.46583847e-04 -1.29387543e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -1.33785987e-04 -4.03418768e-05 8.07279110e-05 -1.33962540e-04 -1.78453961e-04 -7.77439677e-04 -5.17788031e-03 2.19160263e-03 7.27840315e-04 2.18727155e-03 -6.18271911e-03 -2.35632260e-03 -6.17050073e-03 8.75243829e-06 -1.53911076e-04 1.07202928e-04 -1.47355362e-05 -1.53606915e-04 -3.27792487e-04 -2.91160640e-03 6.46583847e-04 -4.15588082e-04 1.29269859e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 4.89367367e-05 4.02161581e-05 -1.78453961e-04 1.82758178e-04 8.04031390e-05 2.78105856e-03 1.85223224e-02 -7.83980473e-03 2.18727155e-03 -6.48502363e-03 2.21168335e-02 -6.17050073e-03 1.79918514e-02 -3.13092374e-05 1.07202928e-04 -5.07429200e-04 3.00107510e-04 1.41570548e-04 6.55943768e-04 5.82639977e-03 -1.29387543e-03 1.29269859e-03 -2.35640447e-03 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -9.79270385e-05 -1.78453961e-04 3.08141237e-04 -1.69939378e-04 -3.07860969e-04 -8.28974459e-03 -5.07788860e-02 1.80793532e-02 -6.18271911e-03 2.21168335e-02 -4.74490791e-02 1.66475478e-02 -5.95516367e-02 1.12433377e-03 -1.04202156e-03 3.72752132e-03 -1.64961662e-03 -1.00047902e-03 -1.07382250e-03 -9.40565257e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -4.13095396e-03 6.71462401e-03 -1.34365977e-02 3.95895217e-04 8.78896388e-05 -1.75875480e-04 3.69394268e-04 4.92076893e-04 2.31280283e-03 1.41670892e-02 -6.18271911e-03 -2.35632260e-03 -6.17050073e-03 1.66475478e-02 7.57588371e-03 1.66146486e-02 -2.45161784e-04 4.21481590e-04 -1.00047902e-03 4.20674427e-04 4.20648652e-04 1.07284581e-03 9.39709770e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 6.71462401e-03 -4.11873388e-03 1.34243765e-02 -1.21458717e-04 -8.75217185e-05 4.92076893e-04 -5.27296378e-04 -1.74979939e-04 -8.27336227e-03 -5.06785360e-02 2.21168335e-02 -6.17050073e-03 1.79918514e-02 -5.95516367e-02 1.66146486e-02 -4.72134724e-02 8.76993157e-04 -1.00047902e-03 3.72071484e-03 -1.78787597e-03 -1.03806332e-03 -2.14686594e-03 -1.88044812e-02 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -1.34365977e-02 1.34243765e-02 -2.42736641e-02 2.43050381e-04 4.92076893e-04 -8.26310254e-04 4.21871149e-04 8.25558687e-04 5.17611903e-05 -6.73638275e-04 2.46046287e-04 -8.75243829e-06 3.13092374e-05 -1.12433377e-03 2.45161784e-04 -8.76993157e-04 1.98976966e-04 1.13003602e-04 -4.04236679e-04 3.51208311e-04 2.13004974e-04 -4.53078102e-05 -2.86362953e-04 1.33785987e-04 -4.89367367e-05 9.79270385e-05 -3.95895217e-04 1.21458717e-04 -2.43050381e-04 -2.49123633e-05 -1.54651102e-05 3.09471481e-05 -3.48911273e-05 -4.64791119e-05 -5.40169166e-05 7.02995089e-04 -1.41994680e-04 1.53911076e-04 -1.07202928e-04 1.04202156e-03 -4.21481590e-04 1.00047902e-03 1.13003602e-04 5.89912027e-05 4.88951386e-04 -3.09523252e-04 5.48444344e-05 -5.23517311e-05 -3.30883268e-04 4.03418768e-05 -4.02161581e-05 1.78453961e-04 -8.78896388e-05 8.75217185e-05 -4.92076893e-04 -1.54651102e-05 -2.56512763e-05 5.07406053e-05 -2.68243330e-05 -5.07108039e-05 1.93229408e-04 -2.51475525e-03 5.07943615e-04 -1.07202928e-04 5.07429200e-04 -3.72752132e-03 1.00047902e-03 -3.72071484e-03 -4.04236679e-04 4.88951386e-04 -1.55340110e-03 6.92419575e-04 4.87756180e-04 1.04760765e-04 6.62128712e-04 -8.07279110e-05 1.78453961e-04 -3.08141237e-04 1.75875480e-04 -4.92076893e-04 8.26310254e-04 3.09471481e-05 5.07406053e-05 -1.01831601e-04 7.16616535e-05 8.79770935e-05 -8.88885295e-05 1.15682648e-03 -1.76759062e-04 1.47355362e-05 -3.00107510e-04 1.64961662e-03 -4.20674427e-04 1.78787597e-03 3.51208311e-04 -3.09523252e-04 6.92419575e-04 -2.02900654e-04 -2.51046814e-04 -7.85707053e-05 -4.96597364e-04 1.33962540e-04 -1.82758178e-04 1.69939378e-04 -3.69394268e-04 5.27296378e-04 -4.21871149e-04 -3.48911273e-05 -2.68243330e-05 7.16616535e-05 -6.52662346e-05 -6.26128393e-05 -5.39101676e-05 7.01605820e-04 -1.07202928e-04 1.53606915e-04 -1.41570548e-04 1.00047902e-03 -4.20648652e-04 1.03806332e-03 2.13004974e-04 5.48444344e-05 4.87756180e-04 -2.51046814e-04 5.87742193e-05 -1.04665480e-04 -6.61526476e-04 1.78453961e-04 -8.04031390e-05 3.07860969e-04 -4.92076893e-04 1.74979939e-04 -8.25558687e-04 -4.64791119e-05 -5.07108039e-05 8.79770935e-05 -6.26128393e-05 -1.01671490e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 2 0 676 + 1.69024978e-04 1.55606641e-03 -3.23257248e-04 6.46785904e-04 -3.23514311e-04 1.05874185e-03 -2.11837261e-03 1.05958378e-03 -4.51020151e-05 -1.04030710e-04 5.20348749e-05 7.80362555e-05 -1.04113438e-04 1.68795702e-07 1.70850623e-06 -1.88454833e-07 9.76601309e-07 -5.67964499e-07 5.85923203e-07 -3.03634223e-06 1.76585325e-06 -3.84682231e-07 -2.03479644e-07 1.18338173e-07 3.48907492e-07 -6.13246222e-07 1.55606641e-03 1.38791892e-02 -2.87700957e-03 5.75643469e-03 -2.87929745e-03 9.29471951e-03 -1.85972429e-02 9.30211091e-03 -2.87847916e-04 -6.63939809e-04 3.32094482e-04 4.98039246e-04 -6.64467791e-04 1.70850623e-06 1.72861068e-05 -1.90883623e-06 9.89187668e-06 -5.75284380e-06 5.93136098e-06 -3.07372054e-05 1.78759145e-05 -3.89885878e-06 -2.06232140e-06 1.19938949e-06 3.53627209e-06 -6.21541685e-06 3.23257248e-04 2.87700957e-03 -4.11174673e-04 1.27641016e-03 -6.38444578e-04 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -1.33175778e-04 -8.11362673e-05 4.05833576e-05 1.33599740e-04 -1.78244435e-04 1.88454833e-07 1.90883623e-06 -1.63660712e-07 1.09573145e-06 -6.37247316e-07 5.11130515e-07 -3.40988315e-06 1.98309439e-06 -4.45506182e-07 -1.77255275e-07 1.03086800e-07 3.93517133e-07 -6.91652948e-07 -6.46785904e-04 -5.75643469e-03 1.27641016e-03 -2.32712940e-03 1.27742520e-03 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 9.85124053e-05 3.07892219e-04 -1.78244435e-04 -1.70345115e-04 3.08137062e-04 -9.76601309e-07 -9.89187668e-06 1.09573145e-06 -5.63046262e-06 3.30231151e-06 -3.40988315e-06 1.75236528e-05 -1.02766936e-05 2.21819723e-06 1.17919981e-06 -6.91652948e-07 -1.98702471e-06 3.55386816e-06 3.23514311e-04 2.87929745e-03 -6.38444578e-04 1.27742520e-03 -4.12189685e-04 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -4.92746869e-05 -1.78244435e-04 4.06927391e-05 1.82207444e-04 -8.14196439e-05 5.67964499e-07 5.75284380e-06 -6.37247316e-07 3.30231151e-06 -1.87275100e-06 1.98309439e-06 -1.02766936e-05 5.82976785e-06 -1.29004259e-06 -6.91652948e-07 3.92165543e-07 1.21636205e-06 -2.03226087e-06 -1.05874185e-03 -9.29471951e-03 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -4.08576704e-03 1.32808933e-02 -6.64293860e-03 3.95340531e-04 1.79568636e-04 -8.98180109e-05 -3.70346319e-04 4.94104034e-04 -5.85923203e-07 -5.93136098e-06 5.11130515e-07 -3.40988315e-06 1.98309439e-06 -1.59476564e-06 1.06028909e-05 -6.16635017e-06 1.38707452e-06 5.54115547e-07 -3.22258384e-07 -1.22561170e-06 2.15415766e-06 2.11837261e-03 1.85972429e-02 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 1.32808933e-02 -2.40210442e-02 1.32914546e-02 -2.46901725e-04 -8.30831883e-04 4.94104034e-04 4.26860795e-04 -8.31492582e-04 3.03634223e-06 3.07372054e-05 -3.40988315e-06 1.75236528e-05 -1.02766936e-05 1.06028909e-05 -5.44945017e-05 3.19549547e-05 -6.90977509e-06 -3.67302171e-06 2.15415766e-06 6.19065438e-06 -1.10697396e-05 -1.05958378e-03 -9.30211091e-03 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -6.64293860e-03 1.32914546e-02 -4.09632811e-03 1.23497189e-04 4.94104034e-04 -9.01392455e-05 -5.27771165e-04 1.80354172e-04 -1.76585325e-06 -1.78759145e-05 1.98309439e-06 -1.02766936e-05 5.82976785e-06 -6.16635017e-06 3.19549547e-05 -1.81328490e-05 4.01853542e-06 2.15415766e-06 -1.22179830e-06 -3.78717375e-06 6.33154269e-06 -4.51020151e-05 -2.87847916e-04 1.33175778e-04 -9.85124053e-05 4.92746869e-05 -3.95340531e-04 2.46901725e-04 -1.23497189e-04 -2.47376814e-05 -2.94110916e-05 1.47110643e-05 3.40589179e-05 -4.54403024e-05 -3.84682231e-07 -3.89885878e-06 4.45506182e-07 -2.21819723e-06 1.29004259e-06 -1.38707452e-06 6.90977509e-06 -4.01853542e-06 8.67117729e-07 4.79893762e-07 -2.79093032e-07 -7.89992316e-07 1.38850502e-06 -1.04030710e-04 -6.63939809e-04 8.11362673e-05 -3.07892219e-04 1.78244435e-04 -1.79568636e-04 8.30831883e-04 -4.94104034e-04 -2.94110916e-05 -9.90479928e-05 4.93234809e-05 6.93450270e-05 -8.48172275e-05 -2.03479644e-07 -2.06232140e-06 1.77255275e-07 -1.17919981e-06 6.91652948e-07 -5.54115547e-07 3.67302171e-06 -2.15415766e-06 4.79893762e-07 1.91344710e-07 -1.12292036e-07 -4.18394382e-07 7.48398996e-07 5.20348749e-05 3.32094482e-04 -4.05833576e-05 1.78244435e-04 -4.06927391e-05 8.98180109e-05 -4.94104034e-04 9.01392455e-05 1.47110643e-05 4.93234809e-05 -2.51090313e-05 -2.54484369e-05 4.93480127e-05 1.18338173e-07 1.19938949e-06 -1.03086800e-07 6.91652948e-07 -3.92165543e-07 3.22258384e-07 -2.15415766e-06 1.22179830e-06 -2.79093032e-07 -1.12292036e-07 6.35672157e-08 2.56205181e-07 -4.27921057e-07 7.80362555e-05 4.98039246e-04 -1.33599740e-04 1.70345115e-04 -1.82207444e-04 3.70346319e-04 -4.26860795e-04 5.27771165e-04 3.40589179e-05 6.93450270e-05 -2.54484369e-05 -6.40115708e-05 6.01592062e-05 3.48907492e-07 3.53627209e-06 -3.93517133e-07 1.98702471e-06 -1.21636205e-06 1.22561170e-06 -6.19065438e-06 3.78717375e-06 -7.89992316e-07 -4.18394382e-07 2.56205181e-07 6.60022018e-07 -1.29432465e-06 -1.04113438e-04 -6.64467791e-04 1.78244435e-04 -3.08137062e-04 8.14196439e-05 -4.94104034e-04 8.31492582e-04 -1.80354172e-04 -4.54403024e-05 -8.48172275e-05 4.93480127e-05 6.01592062e-05 -9.91828370e-05 -6.13246222e-07 -6.21541685e-06 6.91652948e-07 -3.55386816e-06 2.03226087e-06 -2.15415766e-06 1.10697396e-05 -6.33154269e-06 1.38850502e-06 7.48398996e-07 -4.27921057e-07 -1.29432465e-06 2.19854258e-06 1.23539293e-03 8.95053459e-03 -3.45021112e-03 3.25974602e-03 -1.14624069e-03 1.01267710e-02 -9.56773377e-03 3.36434975e-03 5.05204254e-05 -1.65846305e-04 5.83173599e-05 6.86582771e-05 -5.50980145e-05 1.71672269e-04 1.57792086e-03 -3.28189848e-04 6.56104109e-04 -3.27928827e-04 1.07413122e-03 -2.14736046e-03 1.07327692e-03 -4.53116807e-05 -1.04771720e-04 5.23661820e-05 7.85654639e-05 -1.04688391e-04 8.95053459e-03 5.44759122e-02 -2.19727430e-02 2.07597620e-02 -7.29985823e-03 5.83786039e-02 -5.51558776e-02 1.93947352e-02 -1.12049027e-03 3.67829781e-03 -1.29341813e-03 -1.52276887e-03 1.22201641e-03 1.57792086e-03 1.40436697e-02 -2.91501960e-03 5.82759139e-03 -2.91270117e-03 9.40792386e-03 -1.88079477e-02 9.40044139e-03 -2.86330751e-04 -6.62066927e-04 3.30909116e-04 4.96465986e-04 -6.61540361e-04 3.45021112e-03 2.19727430e-02 -8.00046852e-03 9.11616195e-03 -3.20556131e-03 2.16878623e-02 -2.51611824e-02 8.84755155e-03 -3.47132377e-04 8.44845629e-04 -2.97077265e-04 -3.09250432e-04 2.48172332e-04 3.28189848e-04 2.91501960e-03 -4.16881756e-04 1.29418310e-03 -6.46848479e-04 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -1.33798126e-04 -8.07173426e-05 4.03435112e-05 1.33942777e-04 -1.78478598e-04 -3.25974602e-03 -2.07597620e-02 9.11616195e-03 -6.96456876e-03 3.02860184e-03 -2.51611824e-02 1.88287136e-02 -8.35913224e-03 1.58503494e-04 -8.09324874e-04 2.48172332e-04 3.90019742e-04 -2.68876619e-04 -6.56104109e-04 -5.82759139e-03 1.29418310e-03 -2.35679785e-03 1.29315379e-03 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 9.79103764e-05 3.08119111e-04 -1.78478598e-04 -1.69869761e-04 3.07874052e-04 1.14624069e-03 7.29985823e-03 -3.20556131e-03 3.02860184e-03 5.83383234e-04 8.84755155e-03 -8.35913224e-03 -2.00411033e-03 -5.57353711e-05 2.48172332e-04 -1.90824010e-04 -6.83358480e-05 1.80289782e-04 3.27928827e-04 2.91270117e-03 -6.46848479e-04 1.29315379e-03 -4.15852421e-04 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -4.89367989e-05 -1.78478598e-04 4.02335566e-05 1.82769519e-04 -8.04333283e-05 -1.01267710e-02 -5.83786039e-02 2.16878623e-02 -2.51611824e-02 8.84755155e-03 -5.49364915e-02 6.56077406e-02 -2.30699757e-02 1.58906128e-03 -5.27103575e-03 1.85348049e-03 2.18963740e-03 -1.75717595e-03 -1.07413122e-03 -9.40792386e-03 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -4.13190580e-03 1.34392678e-02 -6.71710977e-03 3.95905708e-04 1.75795878e-04 -8.78649213e-05 -3.69299930e-04 4.92091737e-04 9.56773377e-03 5.51558776e-02 -2.51611824e-02 1.88287136e-02 -8.35913224e-03 6.56077406e-02 -4.74812660e-02 2.17964232e-02 -1.53269720e-03 4.97799675e-03 -1.75717595e-03 -2.05065617e-03 1.65380674e-03 2.14736046e-03 1.88079477e-02 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 1.34392678e-02 -2.42766998e-02 1.34285790e-02 -2.42960040e-04 -8.26143021e-04 4.92091737e-04 4.21602203e-04 -8.25485959e-04 -3.36434975e-03 -1.93947352e-02 8.84755155e-03 -8.35913224e-03 -2.00411033e-03 -2.30699757e-02 2.17964232e-02 6.84028716e-03 5.38949929e-04 -1.75717595e-03 5.98721945e-04 7.33814919e-04 -5.65670162e-04 -1.07327692e-03 -9.40044139e-03 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -6.71710977e-03 1.34285790e-02 -4.12121681e-03 1.21434388e-04 4.92091737e-04 -8.75431602e-05 -5.27290508e-04 1.75012809e-04 5.05204254e-05 -1.12049027e-03 3.47132377e-04 -1.58503494e-04 5.57353711e-05 -1.58906128e-03 1.53269720e-03 -5.38949929e-04 2.48387812e-04 5.31143823e-04 -1.86768741e-04 -4.14364578e-04 3.32526048e-04 -4.53116807e-05 -2.86330751e-04 1.33798126e-04 -9.79103764e-05 4.89367989e-05 -3.95905708e-04 2.42960040e-04 -1.21434388e-04 -2.49156491e-05 -3.09770316e-05 1.54826978e-05 3.49006910e-05 -4.65051310e-05 -1.65846305e-04 3.67829781e-03 -8.44845629e-04 8.09324874e-04 -2.48172332e-04 5.27103575e-03 -4.97799675e-03 1.75717595e-03 5.31143823e-04 -1.73519276e-03 7.03766636e-04 6.63422635e-04 -6.54676965e-04 -1.04771720e-04 -6.62066927e-04 8.07173426e-05 -3.08119111e-04 1.78478598e-04 -1.75795878e-04 8.26143021e-04 -4.92091737e-04 -3.09770316e-05 -1.01880734e-04 5.07753127e-05 7.16933507e-05 -8.80483494e-05 5.83173599e-05 -1.29341813e-03 2.97077265e-04 -2.48172332e-04 1.90824010e-04 -1.85348049e-03 1.75717595e-03 -5.98721945e-04 -1.86768741e-04 7.03766636e-04 1.87508299e-05 -4.24023668e-04 -7.47735576e-06 5.23661820e-05 3.30909116e-04 -4.03435112e-05 1.78478598e-04 -4.02335566e-05 8.78649213e-05 -4.92091737e-04 8.75431602e-05 1.54826978e-05 5.07753127e-05 -2.56700685e-05 -2.68500618e-05 5.07492181e-05 6.86582771e-05 -1.52276887e-03 3.09250432e-04 -3.90019742e-04 6.83358480e-05 -2.18963740e-03 2.05065617e-03 -7.33814919e-04 -4.14364578e-04 6.63422635e-04 -4.24023668e-04 -1.19845928e-04 3.10510199e-04 7.85654639e-05 4.96465986e-04 -1.33942777e-04 1.69869761e-04 -1.82769519e-04 3.69299930e-04 -4.21602203e-04 5.27290508e-04 3.49006910e-05 7.16933507e-05 -2.68500618e-05 -6.52724471e-05 6.26569537e-05 -5.50980145e-05 1.22201641e-03 -2.48172332e-04 2.68876619e-04 -1.80289782e-04 1.75717595e-03 -1.65380674e-03 5.65670162e-04 3.32526048e-04 -6.54676965e-04 -7.47735576e-06 3.10510199e-04 1.79011531e-05 -1.04688391e-04 -6.61540361e-04 1.78478598e-04 -3.07874052e-04 8.04333283e-05 -4.92091737e-04 8.25485959e-04 -1.75012809e-04 -4.65051310e-05 -8.80483494e-05 5.07492181e-05 6.26569537e-05 -1.01740622e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +-1 2 1 169 + 3.82255989e-06 4.18025678e-05 -1.16993790e-05 1.88429793e-05 3.90264479e-06 4.03907697e-05 -6.50532340e-05 -1.34734354e-05 -1.31746015e-06 -1.04218335e-05 -2.15850761e-06 8.03267015e-06 3.47648489e-06 4.18025678e-05 4.56459779e-04 -1.28362359e-04 2.06739971e-04 4.28187420e-05 4.42250814e-04 -7.12287633e-04 -1.47524740e-04 -1.45368463e-05 -1.14994440e-04 -2.38169583e-05 8.86324281e-05 3.83595107e-05 1.16993790e-05 1.28362359e-04 -3.36233530e-05 5.84252861e-05 1.21006946e-05 1.16800407e-04 -2.02529868e-04 -4.19467708e-05 -5.91690015e-06 -3.01598311e-05 -6.24652321e-06 2.51689570e-05 1.08929530e-05 -1.88429793e-05 -2.06739971e-04 5.84252861e-05 -9.14473601e-05 -1.94893369e-05 -2.02529868e-04 3.17245956e-04 6.75593240e-05 5.20801513e-06 5.10447895e-05 1.08929530e-05 -3.80418867e-05 -1.70273723e-05 -3.90264479e-06 -4.28187420e-05 1.21006946e-05 -1.94893369e-05 -1.38431081e-06 -4.19467708e-05 6.75593240e-05 5.04453213e-06 1.07865284e-06 1.08929530e-05 7.06875461e-07 -8.91256759e-06 -1.13849117e-06 -4.03907697e-05 -4.42250814e-04 1.16800407e-04 -2.02529868e-04 -4.19467708e-05 -4.04572893e-04 7.00104958e-04 1.45001537e-04 2.04812854e-05 1.05591679e-04 2.18695148e-05 -8.79042438e-05 -3.80443575e-05 6.50532340e-05 7.12287633e-04 -2.02529868e-04 3.17245956e-04 6.75593240e-05 7.00104958e-04 -1.09747278e-03 -2.33538974e-04 -1.83374140e-05 -1.78436541e-04 -3.80443575e-05 1.33120278e-04 5.95223420e-05 1.34734354e-05 1.47524740e-04 -4.19467708e-05 6.75593240e-05 5.04453213e-06 1.45001537e-04 -2.33538974e-04 -1.82553453e-05 -3.79793514e-06 -3.80443575e-05 -2.62805304e-06 3.10746106e-05 4.23273313e-06 -1.31746015e-06 -1.45368463e-05 5.91690015e-06 -5.20801513e-06 -1.07865284e-06 -2.04812854e-05 1.83374140e-05 3.79793514e-06 -1.51153884e-06 4.58486163e-06 9.49589024e-07 -1.57210461e-06 -6.80396158e-07 -1.04218335e-05 -1.14994440e-04 3.01598311e-05 -5.10447895e-05 -1.08929530e-05 -1.05591679e-04 1.78436541e-04 3.80443575e-05 4.58486163e-06 2.63338443e-05 5.63160846e-06 -2.13121547e-05 -9.55537989e-06 -2.15850761e-06 -2.38169583e-05 6.24652321e-06 -1.08929530e-05 -7.06875461e-07 -2.18695148e-05 3.80443575e-05 2.62805304e-06 9.49589024e-07 5.63160846e-06 3.09365703e-07 -5.02273353e-06 -5.72635299e-07 8.03267015e-06 8.86324281e-05 -2.51689570e-05 3.80418867e-05 8.91256759e-06 8.79042438e-05 -1.33120278e-04 -3.10746106e-05 -1.57210461e-06 -2.13121547e-05 -5.02273353e-06 1.51461445e-05 7.59942190e-06 3.47648489e-06 3.83595107e-05 -1.08929530e-05 1.70273723e-05 1.13849117e-06 3.80443575e-05 -5.95223420e-05 -4.23273313e-06 -6.80396158e-07 -9.55537989e-06 -5.72635299e-07 7.59942190e-06 8.76107774e-07 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 26 39 52 65 78 91 104 117 130 143 156 169 +0 -2 0 676 + 8.28412077e-06 9.09777564e-05 3.32019247e-05 -3.31868258e-05 -1.43620391e-08 -1.16048744e-04 1.15995970e-04 5.01987947e-08 6.57558171e-06 -2.27474444e-05 -9.84425830e-09 1.13685478e-05 9.83978156e-09 2.51171570e-06 2.71922122e-05 1.29759073e-05 -7.35957704e-06 -2.59842973e-06 -4.41944156e-05 2.50658547e-05 8.84994638e-06 5.82774978e-06 -6.98933223e-06 -2.46770821e-06 1.73499863e-06 1.39961610e-06 9.09777564e-05 9.99873567e-04 3.64877315e-04 -3.64711384e-04 -1.57833689e-07 -1.27614898e-03 1.27556864e-03 5.52019250e-07 7.25104506e-05 -2.50841297e-04 -1.08554899e-07 1.25363589e-04 1.08505532e-07 2.71922122e-05 2.93815321e-04 1.40999315e-04 -7.99709259e-05 -2.82351595e-05 -4.78932914e-04 2.71637551e-04 9.59064748e-05 6.36516336e-05 -7.63386265e-05 -2.69527115e-05 1.89499380e-05 1.52868353e-05 -3.32019247e-05 -3.64877315e-04 -1.28672006e-04 1.35648275e-04 5.87035905e-08 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -2.12268792e-05 8.90275005e-05 3.85278318e-08 -4.70947387e-05 -4.07617534e-08 -1.29759073e-05 -1.40999315e-04 -6.61650330e-05 3.84045902e-05 1.35594245e-05 2.26561172e-04 -1.31413853e-04 -4.63980012e-05 -2.89104146e-05 3.59303796e-05 1.26858604e-05 -9.13571978e-06 -7.36974673e-06 3.31868258e-05 3.64711384e-04 1.35648275e-04 -1.28548604e-04 -5.86768947e-08 -4.75038761e-04 4.50562840e-04 2.05485837e-07 3.02322860e-05 -8.89822797e-05 -4.07617534e-08 4.18684747e-05 3.84907500e-08 7.35957704e-06 7.99709259e-05 3.84045902e-05 -2.02346886e-05 -7.69053193e-06 -1.31413853e-04 6.93954914e-05 2.63156677e-05 1.79080407e-05 -1.93354978e-05 -7.36974673e-06 4.30923879e-06 3.87193984e-06 1.43620391e-08 1.57833689e-07 5.87035905e-08 -5.86768947e-08 7.03795935e-06 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 1.30834228e-08 -4.07617534e-08 5.20719763e-06 2.26240712e-08 -5.20482962e-06 2.59842973e-06 2.82351595e-05 1.35594245e-05 -7.69053193e-06 -1.16794251e-06 -4.63980012e-05 2.63156677e-05 4.15239009e-06 6.32275266e-06 -7.36974673e-06 -1.06405821e-06 2.13740834e-06 6.03504497e-07 1.16048744e-04 1.27614898e-03 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -1.58091757e-03 1.66367474e-03 7.19977313e-07 7.52359251e-05 -3.14334982e-04 -1.36032633e-07 1.66113681e-04 1.43775825e-07 4.41944156e-05 4.78932914e-04 2.26561172e-04 -1.31413853e-04 -4.63980012e-05 -7.72871435e-04 4.48007261e-04 1.58176942e-04 9.97895809e-05 -1.23871976e-04 -4.37352072e-05 3.14712599e-05 2.53877331e-05 -1.15995970e-04 -1.27556864e-03 -4.75038761e-04 4.50562840e-04 2.05485837e-07 1.66367474e-03 -1.57940409e-03 -7.19649898e-07 -1.06454134e-04 3.14175621e-04 1.43775825e-07 -1.47994545e-04 -1.35901837e-07 -2.50658547e-05 -2.71637551e-04 -1.31413853e-04 6.93954914e-05 2.63156677e-05 4.48007261e-04 -2.37072780e-04 -8.97136026e-05 -6.16347107e-05 6.67789161e-05 2.53877331e-05 -1.49416277e-05 -1.33725001e-05 -5.01987947e-08 -5.52019250e-07 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 7.19977313e-07 -7.19649898e-07 8.35137710e-05 -4.60694388e-08 1.43775825e-07 -1.80517420e-05 -7.96638128e-08 1.80435329e-05 -8.84994638e-06 -9.59064748e-05 -4.63980012e-05 2.63156677e-05 4.15239009e-06 1.58176942e-04 -8.97136026e-05 -1.46503916e-05 -2.17612322e-05 2.53877331e-05 3.83639621e-06 -7.32885275e-06 -2.17589821e-06 6.57558171e-06 7.25104506e-05 2.12268792e-05 -3.02322860e-05 -1.30834228e-08 -7.52359251e-05 1.06454134e-04 4.60694388e-08 -8.45204057e-07 -1.65665211e-05 -7.16938176e-09 1.16312371e-05 1.00671462e-08 5.82774978e-06 6.36516336e-05 2.89104146e-05 -1.79080407e-05 -6.32275266e-06 -9.97895809e-05 6.16347107e-05 2.17612322e-05 1.17957565e-05 -1.62952327e-05 -5.75332210e-06 4.42089925e-06 3.56632083e-06 -2.27474444e-05 -2.50841297e-04 -8.90275005e-05 8.89822797e-05 4.07617534e-08 3.14334982e-04 -3.14175621e-04 -1.43775825e-07 -1.65665211e-05 5.74742044e-05 2.64734900e-08 -2.86348849e-05 -2.64599273e-08 -6.98933223e-06 -7.63386265e-05 -3.59303796e-05 1.93354978e-05 7.36974673e-06 1.23871976e-04 -6.67789161e-05 -2.53877331e-05 -1.62952327e-05 1.81401656e-05 6.93872782e-06 -4.12740682e-06 -3.72610274e-06 -9.84425830e-09 -1.08554899e-07 -3.85278318e-08 4.07617534e-08 -5.20719763e-06 1.36032633e-07 -1.43775825e-07 1.80517420e-05 -7.16938176e-09 2.64734900e-08 -3.69892919e-06 -1.57434652e-08 3.87201115e-06 -2.46770821e-06 -2.69527115e-05 -1.26858604e-05 7.36974673e-06 1.06405821e-06 4.37352072e-05 -2.53877331e-05 -3.83639621e-06 -5.75332210e-06 6.93872782e-06 9.37329410e-07 -2.07452622e-06 -5.50381660e-07 1.13685478e-05 1.25363589e-04 4.70947387e-05 -4.18684747e-05 -2.26240712e-08 -1.66113681e-04 1.47994545e-04 7.96638128e-08 1.16312371e-05 -2.86348849e-05 -1.57434652e-08 1.25506408e-05 1.40613983e-08 1.73499863e-06 1.89499380e-05 9.13571978e-06 -4.30923879e-06 -2.13740834e-06 -3.14712599e-05 1.49416277e-05 7.32885275e-06 4.42089925e-06 -4.12740682e-06 -2.07452622e-06 7.12701208e-07 1.00156434e-06 9.83978156e-09 1.08505532e-07 4.07617534e-08 -3.84907500e-08 5.20482962e-06 -1.43775825e-07 1.35901837e-07 -1.80435329e-05 1.00671462e-08 -2.64599273e-08 3.87201115e-06 1.40613983e-08 -3.69540674e-06 1.39961610e-06 1.52868353e-05 7.36974673e-06 -3.87193984e-06 -6.03504497e-07 -2.53877331e-05 1.33725001e-05 2.17589821e-06 3.56632083e-06 -3.72610274e-06 -5.50381660e-07 1.00156434e-06 2.79095092e-07 1.75931096e-07 1.78182256e-06 5.90372646e-07 -1.01714292e-06 1.97447895e-07 -1.83708661e-06 3.16508507e-06 -6.14406656e-07 -1.15297428e-07 -6.37044826e-07 1.23663211e-07 5.28097466e-07 -2.13057228e-07 8.15034854e-06 8.95207190e-05 3.26777168e-05 -3.26925762e-05 1.41342975e-08 -1.14203622e-04 1.14255554e-04 -4.93972079e-08 6.47211935e-06 -2.24507007e-05 9.70632845e-09 1.12304527e-05 -9.71074216e-09 1.78182256e-06 1.80387413e-05 5.98362008e-06 -1.03090766e-05 2.00119906e-06 -1.86085179e-05 3.20602969e-05 -6.22354832e-06 -1.16933979e-06 -6.46087147e-06 1.25418507e-06 5.35593369e-06 -2.16081398e-06 8.95207190e-05 9.83943379e-04 3.59188453e-04 -3.59351785e-04 1.55362031e-07 -1.25604163e-03 1.25661278e-03 -5.43283551e-07 7.13912780e-05 -2.47644416e-04 1.07066504e-07 1.23878490e-04 -1.07115190e-07 -5.90372646e-07 -5.98362008e-06 -1.94062845e-06 3.43024706e-06 -6.65879931e-07 6.04646212e-06 -1.06842412e-05 2.07402605e-06 4.27776731e-07 2.10470040e-06 -4.08564670e-07 -1.79038291e-06 7.22317461e-07 -3.26777168e-05 -3.59188453e-04 -1.26702582e-04 1.33660050e-04 -5.77865415e-08 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -2.09169040e-05 8.79108833e-05 -3.80073619e-08 -4.65324191e-05 4.02356286e-08 1.01714292e-06 1.03090766e-05 3.43024706e-06 -5.85954978e-06 1.14723313e-06 -1.06842412e-05 1.82527843e-05 -3.57330397e-06 -6.41674718e-07 -3.68903490e-06 7.22317461e-07 3.02957867e-06 -1.23378375e-06 3.26925762e-05 3.59351785e-04 1.33660050e-04 -1.26824112e-04 5.78128185e-08 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 2.97800920e-05 -8.79555064e-05 4.02356286e-08 4.14419060e-05 -3.80439459e-08 -1.97447895e-07 -2.00119906e-06 -6.65879931e-07 1.14723313e-06 -1.72336868e-07 2.07402605e-06 -3.57330397e-06 5.38738243e-07 1.24561966e-07 7.22317461e-07 -1.08269081e-07 -6.09471422e-07 1.86534945e-07 -1.41342975e-08 -1.55362031e-07 -5.77865415e-08 5.78128185e-08 6.89669227e-06 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -1.28751150e-08 4.02356286e-08 5.10933177e-06 -2.23369374e-08 -5.11165511e-06 1.83708661e-06 1.86085179e-05 6.04646212e-06 -1.06842412e-05 2.07402605e-06 -1.88231481e-05 3.32506481e-05 -6.45461941e-06 -1.33204848e-06 -6.56327528e-06 1.27406371e-06 5.58123533e-06 -2.25171035e-06 1.14203622e-04 1.25604163e-03 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -1.55642601e-03 1.63895261e-03 -7.08584223e-07 7.41366515e-05 -3.10376134e-04 1.34187914e-07 1.64119956e-04 -1.41911161e-07 -3.16508507e-06 -3.20602969e-05 -1.06842412e-05 1.82527843e-05 -3.57330397e-06 3.32506481e-05 -5.68106959e-05 1.11205533e-05 2.00159237e-06 1.15012622e-05 -2.25171035e-06 -9.44643689e-06 3.84655356e-06 -1.14255554e-04 -1.25661278e-03 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 1.63895261e-03 -1.55791621e-03 7.08906434e-07 -1.04853035e-04 3.10533377e-04 -1.41911161e-07 -1.46479937e-04 1.34316946e-07 6.14406656e-07 6.22354832e-06 2.07402605e-06 -3.57330397e-06 5.38738243e-07 -6.45461941e-06 1.11205533e-05 -1.68244658e-06 -3.88549329e-07 -2.25171035e-06 3.38791506e-07 1.89950267e-06 -5.83698085e-07 4.93972079e-08 5.43283551e-07 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -7.08584223e-07 7.08906434e-07 8.17813602e-05 4.53321263e-08 -1.41911161e-07 -1.77065360e-05 7.86465779e-08 1.77145876e-05 -1.15297428e-07 -1.16933979e-06 -4.27776731e-07 6.41674718e-07 -1.24561966e-07 1.33204848e-06 -2.00159237e-06 3.88549329e-07 2.95435607e-08 4.46629121e-07 -8.66996933e-08 -3.19881744e-07 1.29054052e-07 6.47211935e-06 7.13912780e-05 2.09169040e-05 -2.97800920e-05 1.28751150e-08 -7.41366515e-05 1.04853035e-04 -4.53321263e-08 -8.21102025e-07 -1.63709222e-05 7.07779903e-09 1.14886294e-05 -9.93398225e-09 -6.37044826e-07 -6.46087147e-06 -2.10470040e-06 3.68903490e-06 -7.22317461e-07 6.56327528e-06 -1.15012622e-05 2.25171035e-06 4.46629121e-07 2.27546399e-06 -4.45583184e-07 -1.91786162e-06 7.81090289e-07 -2.24507007e-05 -2.47644416e-04 -8.79108833e-05 8.79555064e-05 -4.02356286e-08 3.10376134e-04 -3.10533377e-04 1.41911161e-07 -1.63709222e-05 5.69692112e-05 -2.62018624e-08 -2.84138377e-05 2.62152747e-08 1.23663211e-07 1.25418507e-06 4.08564670e-07 -7.22317461e-07 1.08269081e-07 -1.27406371e-06 2.25171035e-06 -3.38791506e-07 -8.66996933e-08 -4.45583184e-07 6.65612199e-08 3.85913833e-07 -1.17870063e-07 9.70632845e-09 1.07066504e-07 3.80073619e-08 -4.02356286e-08 -5.10933177e-06 -1.34187914e-07 1.41911161e-07 1.77065360e-05 7.07779903e-09 -2.62018624e-08 -3.63558527e-06 1.55772517e-08 3.80813104e-06 5.28097466e-07 5.35593369e-06 1.79038291e-06 -3.02957867e-06 6.09471422e-07 -5.58123533e-06 9.44643689e-06 -1.89950267e-06 -3.19881744e-07 -1.91786162e-06 3.85913833e-07 1.55666036e-06 -6.53152945e-07 1.12304527e-05 1.23878490e-04 4.65324191e-05 -4.14419060e-05 2.23369374e-08 -1.64119956e-04 1.46479937e-04 -7.86465779e-08 1.14886294e-05 -2.84138377e-05 1.55772517e-08 1.24792536e-05 -1.39371751e-08 -2.13057228e-07 -2.16081398e-06 -7.22317461e-07 1.23378375e-06 -1.86534945e-07 2.25171035e-06 -3.84655356e-06 5.83698085e-07 1.29054052e-07 7.81090289e-07 -1.17870063e-07 -6.53152945e-07 2.01223096e-07 -9.71074216e-09 -1.07115190e-07 -4.02356286e-08 3.80439459e-08 5.11165511e-06 1.41911161e-07 -1.34316946e-07 -1.77145876e-05 -9.93398225e-09 2.62152747e-08 3.80813104e-06 -1.39371751e-08 -3.63904779e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -2 1 676 + 1.71253570e-04 1.57446716e-03 6.54828154e-04 -3.27104859e-04 3.27142251e-04 -2.14342488e-03 1.07070029e-03 -1.07082268e-03 9.07161630e-05 -1.04589232e-04 1.04601187e-04 -5.97265336e-09 -5.22511997e-05 6.68123100e-05 6.69459754e-04 3.24435045e-04 -5.43378247e-05 6.47045675e-05 -1.10263798e-03 1.84674714e-04 -2.19907542e-04 1.03146910e-04 -3.09724238e-05 3.68814412e-05 -1.08407458e-06 -6.17706785e-06 1.57446716e-03 1.40177114e-02 5.81810678e-03 -2.90630600e-03 2.90663823e-03 -1.87803531e-02 9.38130822e-03 -9.38238062e-03 5.74150680e-04 -6.61954567e-04 6.62030237e-04 -3.78014553e-08 -3.30702499e-04 6.69459754e-04 6.65557416e-03 3.20330600e-03 -5.36503939e-04 6.38859865e-04 -1.08695467e-02 1.82048003e-03 -2.16779700e-03 9.35917804e-04 -2.81032587e-04 3.34648876e-04 -9.83650113e-06 -5.60484825e-05 -6.54828154e-04 -5.81810678e-03 -2.35366609e-03 1.29055977e-03 -1.29070730e-03 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -1.96612803e-04 3.08014335e-04 -3.08049546e-04 2.03788294e-08 1.78282284e-04 -3.24435045e-04 -3.20330600e-03 -1.54391930e-03 2.72544245e-04 -3.24541102e-04 5.22095451e-03 -9.22561107e-04 1.09857025e-03 -4.39125390e-04 1.42277515e-04 -1.69421671e-04 5.32065699e-06 3.03171571e-05 3.27104859e-04 2.90630600e-03 1.29055977e-03 -4.14777029e-04 6.44744162e-04 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.82818190e-04 -8.04765421e-05 1.78282284e-04 -4.88566866e-05 -4.02048644e-05 5.43378247e-05 5.36503939e-04 2.72544245e-04 3.77146844e-05 5.43555875e-05 -9.22561107e-04 -1.32869771e-04 -1.83993432e-04 9.04093720e-05 3.26690329e-05 3.03171571e-05 -1.06268106e-05 6.51543560e-06 -3.27142251e-04 -2.90663823e-03 -1.29070730e-03 6.44744162e-04 -4.14924426e-04 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.82839088e-04 1.78282284e-04 -8.05172997e-05 -4.88419097e-05 4.02206285e-05 -6.47045675e-05 -6.38859865e-04 -3.24541102e-04 5.43555875e-05 1.86358878e-05 1.09857025e-03 -1.83993432e-04 -6.82881256e-05 -1.07657959e-04 3.03171571e-05 2.20277189e-05 -1.05319485e-05 -3.68930036e-06 2.14342488e-03 1.87803531e-02 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -2.42525232e-02 1.34058098e-02 -1.34073423e-02 4.88811673e-04 -8.26719605e-04 8.26814110e-04 -5.62356320e-08 -4.91972170e-04 1.10263798e-03 1.08695467e-02 5.22095451e-03 -9.22561107e-04 1.09857025e-03 -1.76563665e-02 3.12325812e-03 -3.71912322e-03 1.43700599e-03 -4.67292242e-04 5.56443740e-04 -1.75265240e-05 -9.98663103e-05 -1.07070029e-03 -9.38130822e-03 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.34058098e-02 -4.11213250e-03 6.69734001e-03 -5.17912316e-04 1.75532526e-04 -4.91972170e-04 1.58070397e-04 8.76933976e-05 -1.84674714e-04 -1.82048003e-03 -9.22561107e-04 -1.32869771e-04 -1.83993432e-04 3.12325812e-03 4.68584797e-04 6.22895302e-04 -2.98608456e-04 -1.15837418e-04 -9.98663103e-05 3.63826495e-05 -2.31023440e-05 1.07082268e-03 9.38238062e-03 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.34073423e-02 6.69734001e-03 -4.11366360e-03 5.17971520e-04 -4.91972170e-04 1.75644997e-04 1.58032277e-04 -8.77395568e-05 2.19907542e-04 2.16779700e-03 1.09857025e-03 -1.83993432e-04 -6.82881256e-05 -3.71912322e-03 6.22895302e-04 2.49948714e-04 3.55577926e-04 -9.98663103e-05 -8.07843699e-05 3.63329489e-05 1.35301256e-05 9.07161630e-05 5.74150680e-04 1.96612803e-04 -1.82818190e-04 1.82839088e-04 -4.88811673e-04 5.17912316e-04 -5.17971520e-04 -8.52979525e-05 7.71688483e-05 -7.71776697e-05 3.51458724e-09 3.07470380e-05 1.03146910e-04 9.35917804e-04 4.39125390e-04 -9.04093720e-05 1.07657959e-04 -1.43700599e-03 2.98608456e-04 -3.55577926e-04 3.58666862e-05 -2.10425587e-05 2.50571249e-05 -1.09401336e-06 -6.23369915e-06 -1.04589232e-04 -6.61954567e-04 -3.08014335e-04 8.04765421e-05 -1.78282284e-04 8.26719605e-04 -1.75532526e-04 4.91972170e-04 7.71688483e-05 -1.01330348e-04 8.74817293e-05 9.01559582e-06 -5.04698362e-05 -3.09724238e-05 -2.81032587e-04 -1.42277515e-04 -3.26690329e-05 -3.03171571e-05 4.67292242e-04 1.15837418e-04 9.98663103e-05 -2.10425587e-05 -2.66637012e-05 -7.56530920e-06 6.15389156e-06 -5.55794511e-06 1.04601187e-04 6.62030237e-04 3.08049546e-04 -1.78282284e-04 8.05172997e-05 -8.26814110e-04 4.91972170e-04 -1.75644997e-04 -7.71776697e-05 8.74817293e-05 -1.01350348e-04 9.02610316e-06 5.04735432e-05 3.68814412e-05 3.34648876e-04 1.69421671e-04 -3.03171571e-05 -2.20277189e-05 -5.56443740e-04 9.98663103e-05 8.07843699e-05 2.50571249e-05 -7.56530920e-06 -2.40082797e-05 6.71603126e-06 4.15359062e-06 -5.97265336e-09 -3.78014553e-08 -2.03788294e-08 4.88566866e-05 4.88419097e-05 5.62356320e-08 -1.58070397e-04 -1.58032277e-04 3.51458724e-09 9.01559582e-06 9.02610316e-06 -4.81374186e-06 -2.36694876e-09 -1.08407458e-06 -9.83650113e-06 -5.32065699e-06 1.06268106e-05 1.05319485e-05 1.75265240e-05 -3.63826495e-05 -3.63329489e-05 -1.09401336e-06 6.15389156e-06 6.71603126e-06 -1.87075779e-07 5.12434813e-08 -5.22511997e-05 -3.30702499e-04 -1.78282284e-04 4.02048644e-05 -4.02206285e-05 4.91972170e-04 -8.76933976e-05 8.77395568e-05 3.07470380e-05 -5.04698362e-05 5.04735432e-05 -2.36694876e-09 -2.55207716e-05 -6.17706785e-06 -5.60484825e-05 -3.03171571e-05 -6.51543560e-06 3.68930036e-06 9.98663103e-05 2.31023440e-05 -1.35301256e-05 -6.23369915e-06 -5.55794511e-06 4.15359062e-06 5.12434813e-08 9.59168692e-08 4.27528697e-05 4.42336404e-04 1.25133893e-04 -1.32059770e-04 1.25381829e-04 -4.30853287e-04 4.54700037e-04 -4.31706964e-04 -1.64395317e-06 -5.10511092e-05 4.84695790e-05 2.65552855e-06 -5.11522600e-05 1.69438374e-04 1.55948196e-03 6.48046884e-04 -3.24329437e-04 3.24292434e-04 -2.12226517e-03 1.06213468e-03 -1.06201350e-03 9.01124270e-05 -1.04212802e-04 1.04200912e-04 5.95006197e-09 -5.21496576e-05 4.42336404e-04 4.56598541e-03 1.28272385e-03 -1.35371970e-03 1.28526539e-03 -4.42070625e-03 4.66538229e-03 -4.42946528e-03 -1.61669669e-05 -5.02046901e-04 4.76659613e-04 2.61150032e-05 -5.03041639e-04 1.55948196e-03 1.39049300e-02 5.76583102e-03 -2.88563802e-03 2.88530880e-03 -1.86246236e-02 9.32110598e-03 -9.32004254e-03 5.74223138e-04 -6.64074910e-04 6.63999146e-04 3.79155613e-08 -3.32313100e-04 -1.25133893e-04 -1.28272385e-03 -3.27415119e-04 3.98710005e-04 -3.78548212e-04 1.12326614e-03 -1.37006036e-03 1.30077975e-03 3.14957453e-05 1.29717138e-04 -1.23157658e-04 -8.00913612e-06 1.54276410e-04 -6.48046884e-04 -5.76583102e-03 -2.33022970e-03 1.27999418e-03 -1.27984815e-03 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -1.96239779e-04 3.08003259e-04 -3.07968119e-04 -2.03596901e-08 1.78443665e-04 1.32059770e-04 1.35371970e-03 3.98710005e-04 -3.70393163e-04 3.99499995e-04 -1.37006036e-03 1.27094870e-03 -1.37277495e-03 8.77054214e-06 -1.39511113e-04 1.54276410e-04 -1.58017756e-05 -1.39787536e-04 3.24329437e-04 2.88563802e-03 1.27999418e-03 -4.13258084e-04 6.40528393e-04 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.82369507e-04 -8.13796244e-05 1.78443665e-04 -4.85778526e-05 -4.07235914e-05 -1.25381829e-04 -1.28526539e-03 -3.78548212e-04 3.99499995e-04 -3.28913719e-04 1.30077975e-03 -1.37277495e-03 1.12841568e-03 -8.32703720e-06 1.54276410e-04 -1.23492841e-04 -3.10527286e-05 1.30327889e-04 -3.24292434e-04 -2.88530880e-03 -1.27984815e-03 6.40528393e-04 -4.13111920e-04 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.82348701e-04 1.78443665e-04 -8.13389050e-05 -4.85926870e-05 4.07078591e-05 4.30853287e-04 4.42070625e-03 1.12326614e-03 -1.37006036e-03 1.30077975e-03 -3.85866176e-03 4.71387848e-03 -4.47550913e-03 -1.09205058e-04 -4.40046165e-04 4.17794103e-04 2.72788161e-05 -5.25459647e-04 2.12226517e-03 1.86246236e-02 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -2.40450711e-02 1.33140646e-02 -1.33125456e-02 4.90935405e-04 -8.30291250e-04 8.30196522e-04 5.63909849e-08 -4.94242004e-04 -4.54700037e-04 -4.66538229e-03 -1.37006036e-03 1.27094870e-03 -1.37277495e-03 4.71387848e-03 -4.36678364e-03 4.72321838e-03 -3.08914624e-05 4.73496669e-04 -5.25459647e-04 5.55857773e-05 4.74434838e-04 -1.06213468e-03 -9.32110598e-03 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.33140646e-02 -4.10538365e-03 6.66255871e-03 -5.18277260e-04 1.79849679e-04 -4.94242004e-04 1.57344614e-04 8.99994920e-05 4.31706964e-04 4.42946528e-03 1.30077975e-03 -1.37277495e-03 1.12841568e-03 -4.47550913e-03 4.72321838e-03 -3.87637945e-03 2.93293564e-05 -5.25459647e-04 4.18939037e-04 1.07440671e-04 -4.42126360e-04 1.06201350e-03 9.32004254e-03 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.33125456e-02 6.66255871e-03 -4.10386331e-03 5.18218130e-04 -4.94242004e-04 1.79736897e-04 1.57383100e-04 -8.99533169e-05 -1.64395317e-06 -1.61669669e-05 -3.14957453e-05 -8.77054214e-06 8.32703720e-06 1.09205058e-04 3.08914624e-05 -2.93293564e-05 -1.85965399e-05 7.55355996e-06 -7.17159484e-06 5.42118830e-07 -1.04425928e-05 9.01124270e-05 5.74223138e-04 1.96239779e-04 -1.82369507e-04 1.82348701e-04 -4.90935405e-04 5.18277260e-04 -5.18218130e-04 -8.38016586e-05 7.51629141e-05 -7.51543388e-05 -3.38151966e-09 2.96375220e-05 -5.10511092e-05 -5.02046901e-04 -1.29717138e-04 1.39511113e-04 -1.54276410e-04 4.40046165e-04 -4.73496669e-04 5.25459647e-04 7.55355996e-06 2.91180029e-05 -3.56464936e-05 7.85545774e-06 3.87403530e-05 -1.04212802e-04 -6.64074910e-04 -3.08003259e-04 8.13796244e-05 -1.78443665e-04 8.30291250e-04 -1.79849679e-04 4.94242004e-04 7.51629141e-05 -9.95895492e-05 8.53756906e-05 9.20586492e-06 -4.96239640e-05 4.84695790e-05 4.76659613e-04 1.23157658e-04 -1.54276410e-04 1.23492841e-04 -4.17794103e-04 5.25459647e-04 -4.18939037e-04 -7.17159484e-06 -3.56464936e-05 2.54168847e-05 1.22485000e-05 -3.57582889e-05 1.04200912e-04 6.63999146e-04 3.07968119e-04 -1.78443665e-04 8.13389050e-05 -8.30196522e-04 4.94242004e-04 -1.79736897e-04 -7.51543388e-05 8.53756906e-05 -9.95700672e-05 9.19559131e-06 4.96204019e-05 2.65552855e-06 2.61150032e-05 8.00913612e-06 1.58017756e-05 3.10527286e-05 -2.72788161e-05 -5.55857773e-05 -1.07440671e-04 5.42118830e-07 7.85545774e-06 1.22485000e-05 -1.92874058e-05 -2.52770220e-06 5.95006197e-09 3.79155613e-08 2.03596901e-08 4.85778526e-05 4.85926870e-05 -5.63909849e-08 -1.57344614e-04 -1.57383100e-04 -3.38151966e-09 9.20586492e-06 9.19559131e-06 -5.02786531e-06 2.30800708e-09 -5.11522600e-05 -5.03041639e-04 -1.54276410e-04 1.39787536e-04 -1.30327889e-04 5.25459647e-04 -4.74434838e-04 4.42126360e-04 -1.04425928e-05 3.87403530e-05 -3.57582889e-05 -2.52770220e-06 2.92713686e-05 -5.21496576e-05 -3.32313100e-04 -1.78443665e-04 4.07235914e-05 -4.07078591e-05 4.94242004e-04 -8.99994920e-05 8.99533169e-05 2.96375220e-05 -4.96239640e-05 4.96204019e-05 2.30800708e-09 -2.52565247e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -2 2 676 + 8.27679714e-06 9.08980152e-05 3.31731044e-05 1.62438414e-08 3.31599130e-05 -1.15947314e-04 -5.67758070e-08 -1.15901207e-04 6.56977077e-06 1.11352091e-08 2.27312343e-05 -1.13610948e-05 1.11307811e-08 8.90254449e-07 9.33806657e-06 4.78068480e-06 1.11009197e-06 2.86423093e-06 -1.56106705e-05 -3.62485305e-06 -9.35275324e-06 2.19749181e-06 1.11371546e-06 2.87358018e-06 -7.31513469e-07 6.67255509e-07 9.08980152e-05 9.99002029e-04 3.64564650e-04 1.78516013e-07 3.64419679e-04 -1.27504401e-03 -6.24349544e-07 -1.27453698e-03 7.24475934e-05 1.22792579e-07 2.50666770e-04 -1.25283515e-04 1.22743750e-07 9.33806657e-06 9.78148514e-05 5.02681700e-05 1.16724474e-05 3.01169505e-05 -1.63823142e-04 -3.80403146e-05 -9.81506479e-05 2.31657426e-05 1.17406789e-05 3.02929997e-05 -7.71154306e-06 7.03414196e-06 -3.31731044e-05 -3.64564650e-04 -1.28563202e-04 -6.63959062e-08 -1.35539521e-04 4.50611937e-04 2.32516738e-07 4.74655879e-04 -2.12092296e-05 -4.35812986e-08 -8.89661525e-05 4.70642248e-05 -4.61101322e-08 -4.78068480e-06 -5.02681700e-05 -2.54448777e-05 -6.00230520e-06 -1.54869945e-05 8.33870125e-05 1.96628832e-05 5.07336689e-05 -1.14873170e-05 -5.96918927e-06 -1.54015497e-05 3.98432869e-06 -3.63433536e-06 -1.62438414e-08 -1.78516013e-07 -6.63959062e-08 7.03020590e-06 -6.63695036e-08 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -1.47973422e-08 5.20181119e-06 -4.61101322e-08 2.55930694e-08 5.19974266e-06 -1.11009197e-06 -1.16724474e-05 -6.00230520e-06 -9.89308139e-07 -3.59613506e-06 1.96628832e-05 3.27329090e-06 1.17805379e-05 -2.83518991e-06 -9.91358903e-07 -3.63433536e-06 1.02205126e-06 -5.93948556e-07 -3.31599130e-05 -3.64419679e-04 -1.35539521e-04 -6.63695036e-08 -1.28455384e-04 4.74655879e-04 2.32424277e-07 4.50234363e-04 -3.02070532e-05 -4.61101322e-08 -8.89266385e-05 4.18457443e-05 -4.35446194e-08 -2.86423093e-06 -3.01169505e-05 -1.54869945e-05 -3.59613506e-06 -8.87420739e-06 5.07336689e-05 1.17805379e-05 2.91033425e-05 -7.31528458e-06 -3.63433536e-06 -8.96001628e-06 2.13715655e-06 -2.08054756e-06 1.15947314e-04 1.27504401e-03 4.50611937e-04 2.32516738e-07 4.74655879e-04 -1.57956493e-03 -8.14311739e-07 -1.66232271e-03 7.51733537e-05 1.53874803e-07 3.14117514e-04 -1.66005504e-04 1.62640217e-07 1.56106705e-05 1.63823142e-04 8.33870125e-05 1.96628832e-05 5.07336689e-05 -2.72506438e-04 -6.42346849e-05 -1.65736693e-04 3.77998022e-05 1.96288821e-05 5.06459400e-05 -1.30963945e-05 1.19459747e-05 5.67758070e-08 6.24349544e-07 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -8.14311739e-07 8.34186783e-05 -8.13987924e-07 5.21042689e-08 -1.80327429e-05 1.62640217e-07 -9.01178660e-08 -1.80255721e-05 3.62485305e-06 3.80403146e-05 1.96628832e-05 3.27329090e-06 1.17805379e-05 -6.42346849e-05 -1.07910216e-05 -3.84846479e-05 9.31441188e-06 3.29430718e-06 1.19459747e-05 -3.35116090e-06 1.97370396e-06 1.15901207e-04 1.27453698e-03 4.74655879e-04 2.32424277e-07 4.50234363e-04 -1.66232271e-03 -8.13987924e-07 -1.57824260e-03 1.06364805e-04 1.62640217e-07 3.13978265e-04 -1.47913839e-04 1.53745428e-07 9.35275324e-06 9.81506479e-05 5.07336689e-05 1.17805379e-05 2.91033425e-05 -1.65736693e-04 -3.84846479e-05 -9.51726054e-05 2.40328076e-05 1.19459747e-05 2.94870963e-05 -7.04619228e-06 6.84700834e-06 6.56977077e-06 7.24475934e-05 2.12092296e-05 1.47973422e-08 3.02070532e-05 -7.51733537e-05 -5.21042689e-08 -1.06364805e-04 -8.44098719e-07 8.10990595e-09 1.65554298e-05 -1.16233331e-05 1.13877032e-08 2.19749181e-06 2.31657426e-05 1.14873170e-05 2.83518991e-06 7.31528458e-06 -3.77998022e-05 -9.31441188e-06 -2.40328076e-05 4.95338539e-06 2.77264013e-06 7.15389523e-06 -1.93561526e-06 1.76558601e-06 1.11352091e-08 1.22792579e-07 4.35812986e-08 -5.20181119e-06 4.61101322e-08 -1.53874803e-07 1.80327429e-05 -1.62640217e-07 8.10990595e-09 -3.69543062e-06 2.99513513e-08 -1.78115422e-08 -3.86851395e-06 1.11371546e-06 1.17406789e-05 5.96918927e-06 9.91358903e-07 3.63433536e-06 -1.96288821e-05 -3.29430718e-06 -1.19459747e-05 2.77264013e-06 9.83389299e-07 3.64136447e-06 -1.04294324e-06 5.99892467e-07 2.27312343e-05 2.50666770e-04 8.89661525e-05 4.61101322e-08 8.89266385e-05 -3.14117514e-04 -1.62640217e-07 -3.13978265e-04 1.65554298e-05 2.99513513e-08 5.74467552e-05 -2.86231329e-05 2.99379342e-08 2.87358018e-06 3.02929997e-05 1.54015497e-05 3.63433536e-06 8.96001628e-06 -5.06459400e-05 -1.19459747e-05 -2.94870963e-05 7.15389523e-06 3.64136447e-06 8.96745872e-06 -2.17168563e-06 2.11712569e-06 -1.13610948e-05 -1.25283515e-04 -4.70642248e-05 -2.55930694e-08 -4.18457443e-05 1.66005504e-04 9.01178660e-08 1.47913839e-04 -1.16233331e-05 -1.78115422e-08 -2.86231329e-05 1.25469982e-05 -1.59101603e-08 -7.31513469e-07 -7.71154306e-06 -3.98432869e-06 -1.02205126e-06 -2.13715655e-06 1.30963945e-05 3.35116090e-06 7.04619228e-06 -1.93561526e-06 -1.04294324e-06 -2.17168563e-06 4.45481592e-07 -5.64563582e-07 1.11307811e-08 1.22743750e-07 4.61101322e-08 -5.19974266e-06 4.35446194e-08 -1.62640217e-07 1.80255721e-05 -1.53745428e-07 1.13877032e-08 -3.86851395e-06 2.99379342e-08 -1.59101603e-08 -3.69235334e-06 6.67255509e-07 7.03414196e-06 3.63433536e-06 5.93948556e-07 2.08054756e-06 -1.19459747e-05 -1.97370396e-06 -6.84700834e-06 1.76558601e-06 5.99892467e-07 2.11712569e-06 -5.64563582e-07 3.41520390e-07 9.16761611e-07 9.62428037e-06 2.94459776e-06 -1.14195204e-06 4.91605460e-06 -9.62626350e-06 3.73318602e-06 -1.60712059e-05 -4.78233232e-07 -6.85165928e-07 2.94960997e-06 -2.32935330e-06 -1.14389583e-06 8.15758664e-06 8.95995828e-05 3.27062093e-05 -1.60140991e-08 3.27192142e-05 -1.14303917e-04 5.59671786e-08 -1.14349367e-04 6.47786822e-06 -1.09961516e-08 2.24667923e-05 -1.12378601e-05 -1.10005239e-08 9.62428037e-06 1.00896020e-04 3.09897727e-05 -1.20182235e-05 5.17379373e-05 -1.01107935e-04 3.92109283e-05 -1.68801367e-04 -5.04632645e-06 -7.22988431e-06 3.11243423e-05 -2.45793817e-05 -1.20704113e-05 8.95995828e-05 9.84805909e-04 3.59497797e-04 -1.76022642e-07 3.59640743e-04 -1.25713505e-03 6.15537104e-07 -1.25763492e-03 7.14535282e-05 -1.21292036e-07 2.47817881e-04 -1.23958180e-04 -1.21340265e-07 -2.94459776e-06 -3.09897727e-05 -9.10343176e-06 3.69334707e-06 -1.58997009e-05 2.98920798e-05 -1.21136743e-05 5.21488488e-05 1.85749851e-06 2.13177469e-06 -9.17719874e-06 7.58920977e-06 3.72689940e-06 -3.27062093e-05 -3.59497797e-04 -1.26810205e-04 6.54713024e-08 -1.33767722e-04 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -2.09343890e-05 4.30569530e-08 -8.79718337e-05 4.65627599e-05 4.55793850e-08 1.14195204e-06 1.20182235e-05 3.69334707e-06 -1.01222203e-06 6.16610393e-06 -1.21136743e-05 3.35401630e-06 -2.02239792e-05 -5.46207240e-07 -6.06453501e-07 3.72689940e-06 -3.04373885e-06 -1.01248414e-06 1.60140991e-08 1.76022642e-07 6.54713024e-08 6.90431656e-06 6.54973356e-08 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 1.45878080e-08 5.11463775e-06 4.55793850e-08 -2.53030645e-08 5.11667146e-06 -4.91605460e-06 -5.17379373e-05 -1.58997009e-05 6.16610393e-06 -2.61247089e-05 5.21488488e-05 -2.02239792e-05 8.57195455e-05 2.35139877e-06 3.72689940e-06 -1.57848730e-05 1.22374567e-05 6.12157223e-06 -3.27192142e-05 -3.59640743e-04 -1.33767722e-04 6.54973356e-08 -1.26916563e-04 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -2.98050867e-05 4.55793850e-08 -8.80108820e-05 4.14645807e-05 4.30931929e-08 9.62626350e-06 1.01107935e-04 2.98920798e-05 -1.21136743e-05 5.21488488e-05 -9.78678196e-05 3.96189578e-05 -1.70557916e-04 -6.08750964e-06 -7.02489317e-06 3.02418642e-05 -2.49778859e-05 -1.22661082e-05 1.14303917e-04 1.25713505e-03 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -1.55776448e-03 8.02824710e-07 -1.64029168e-03 7.41986551e-05 -1.52016335e-07 3.10592247e-04 -1.64227548e-04 -1.60759170e-07 -3.73318602e-06 -3.92109283e-05 -1.21136743e-05 3.35401630e-06 -2.02239792e-05 3.96189578e-05 -1.10724844e-05 6.61445044e-05 1.80273068e-06 2.01846201e-06 -1.22661082e-05 1.00089470e-05 3.36985567e-06 -5.59671786e-08 -6.15537104e-07 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 8.02824710e-07 8.18748505e-05 8.03143934e-07 -5.13626078e-08 -1.77252502e-05 -1.60759170e-07 8.90904652e-08 -1.77322982e-05 1.60712059e-05 1.68801367e-04 5.21488488e-05 -2.02239792e-05 8.57195455e-05 -1.70557916e-04 6.61445044e-05 -2.80457013e-04 -7.76067834e-06 -1.22661082e-05 5.19742337e-05 -4.03138977e-05 -2.01562613e-05 1.14349367e-04 1.25763492e-03 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -1.64029168e-03 8.03143934e-07 -1.55906866e-03 1.04941536e-04 -1.60759170e-07 3.10729845e-04 -1.46560472e-04 -1.52144154e-07 -4.78233232e-07 -5.04632645e-06 -1.85749851e-06 5.46207240e-07 -2.35139877e-06 6.08750964e-06 -1.80273068e-06 7.76067834e-06 -1.09979622e-07 4.04167804e-07 -1.73992508e-06 1.00607242e-06 4.94060754e-07 6.47786822e-06 7.14535282e-05 2.09343890e-05 -1.45878080e-08 2.98050867e-05 -7.41986551e-05 5.13626078e-08 -1.04941536e-04 -8.22186744e-07 -8.01799705e-09 1.63819744e-05 -1.14964989e-05 -1.12537004e-08 -6.85165928e-07 -7.22988431e-06 -2.13177469e-06 6.06453501e-07 -3.72689940e-06 7.02489317e-06 -2.01846201e-06 1.22661082e-05 4.04167804e-07 3.47729970e-07 -2.16593938e-06 1.85535788e-06 6.11418306e-07 -1.09961516e-08 -1.21292036e-07 -4.30569530e-08 -5.11463775e-06 -4.55793850e-08 1.52016335e-07 1.77252502e-05 1.60759170e-07 -8.01799705e-09 -3.63904034e-06 -2.96775921e-08 1.76437621e-08 -3.81158746e-06 2.94960997e-06 3.11243423e-05 9.17719874e-06 -3.72689940e-06 1.57848730e-05 -3.02418642e-05 1.22661082e-05 -5.19742337e-05 -1.73992508e-06 -2.16593938e-06 9.16887942e-06 -7.44919516e-06 -3.72776060e-06 2.24667923e-05 2.47817881e-04 8.79718337e-05 -4.55793850e-08 8.80108820e-05 -3.10592247e-04 1.60759170e-07 -3.10729845e-04 1.63819744e-05 -2.96775921e-08 5.69967315e-05 -2.84256551e-05 -2.96908766e-08 -2.32935330e-06 -2.45793817e-05 -7.58920977e-06 3.04373885e-06 -1.22374567e-05 2.49778859e-05 -1.00089470e-05 4.03138977e-05 1.00607242e-06 1.85535788e-06 -7.44919516e-06 5.62756709e-06 2.99322109e-06 -1.12378601e-05 -1.23958180e-04 -4.65627599e-05 2.53030645e-08 -4.14645807e-05 1.64227548e-04 -8.90904652e-08 1.46560472e-04 -1.14964989e-05 1.76437621e-08 -2.84256551e-05 1.24829480e-05 1.57844842e-08 -1.14389583e-06 -1.20704113e-05 -3.72689940e-06 1.01248414e-06 -6.12157223e-06 1.22661082e-05 -3.36985567e-06 2.01562613e-05 4.94060754e-07 6.11418306e-07 -3.72776060e-06 2.99322109e-06 1.00227816e-06 -1.10005239e-08 -1.21340265e-07 -4.55793850e-08 -5.11667146e-06 -4.30931929e-08 1.60759170e-07 1.77322982e-05 1.52144154e-07 -1.12537004e-08 -3.81158746e-06 -2.96908766e-08 1.57844842e-08 -3.64207091e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 -1 676 + 1.70876587e-04 1.57135665e-03 3.26693848e-04 -6.53113366e-04 -3.26999304e-04 -1.06946317e-03 2.13802828e-03 1.07046310e-03 -4.52529589e-05 -1.04515170e-04 -5.23284157e-05 7.82826168e-05 1.04612890e-04 8.36920400e-05 8.23256641e-04 2.43113770e-04 -2.29692943e-04 -2.42962439e-04 -8.19823849e-04 7.74566379e-04 8.19313531e-04 2.42590059e-06 -7.31058928e-05 -7.73292628e-05 -4.10548237e-06 7.30603863e-05 1.57135665e-03 1.39943214e-02 2.90348621e-03 -5.80453430e-03 -2.90620094e-03 -9.37356333e-03 1.87392555e-02 9.38232751e-03 -2.86815690e-04 -6.62422772e-04 -3.31660316e-04 4.96159440e-04 6.63042130e-04 8.23256641e-04 8.00216601e-03 2.34807832e-03 -2.21845525e-03 -2.34661671e-03 -7.89001119e-03 7.45445184e-03 7.88509987e-03 2.08144515e-05 -6.27255324e-04 -6.63492230e-04 -3.52254186e-05 6.26864874e-04 -3.26693848e-04 -2.90348621e-03 -4.15113506e-04 1.28841356e-03 6.45079952e-04 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 1.33613851e-04 8.08065612e-05 4.04580439e-05 -1.33623619e-04 -1.78567779e-04 -2.43113770e-04 -2.34807832e-03 -6.22857584e-04 6.89443159e-04 7.29272692e-04 2.08061681e-03 -2.31210382e-03 -2.44567540e-03 4.19748553e-05 1.71149765e-04 1.81037186e-04 1.18622288e-05 -2.11097976e-04 6.53113366e-04 5.80453430e-03 1.28841356e-03 -2.34638136e-03 -1.28961822e-03 -4.16522749e-03 7.55756377e-03 4.16912193e-03 -9.80770187e-05 -3.07834441e-04 -1.78567779e-04 1.69540617e-04 3.08122263e-04 2.29692943e-04 2.21845525e-03 6.89443159e-04 -5.44513868e-04 -6.89013999e-04 -2.31210382e-03 1.81788477e-03 2.31066460e-03 2.97623893e-05 -1.57147242e-04 -2.11097976e-04 -5.12870831e-05 1.57049422e-04 3.26999304e-04 2.90620094e-03 6.45079952e-04 -1.28961822e-03 -4.16319228e-04 -2.08543656e-03 4.16912193e-03 1.31799284e-03 -4.91049770e-05 -1.78567779e-04 -4.05872025e-05 1.82611904e-04 8.11403231e-05 2.42962439e-04 2.34661671e-03 7.29272692e-04 -6.89013999e-04 -6.21949397e-04 -2.44567540e-03 2.31066460e-03 2.07757112e-03 3.14817799e-05 -2.11097976e-04 -1.80871700e-04 3.05402781e-05 1.70886877e-04 1.06946317e-03 9.37356333e-03 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -4.11750559e-03 1.33872685e-02 6.70270695e-03 -3.95744275e-04 -1.76844079e-04 -8.85418883e-05 3.69020309e-04 4.93139890e-04 8.19823849e-04 7.89001119e-03 2.08061681e-03 -2.31210382e-03 -2.44567540e-03 -6.94238781e-03 7.74809042e-03 8.19570212e-03 -1.44191298e-04 -5.42185781e-04 -5.73508170e-04 -3.81082817e-05 6.78167761e-04 -2.13802828e-03 -1.87392555e-02 -4.16522749e-03 7.55756377e-03 4.16912193e-03 1.33872685e-02 -2.41843553e-02 -1.33997855e-02 2.44113689e-04 8.26960857e-04 4.93139890e-04 -4.21895582e-04 -8.27734056e-04 -7.74566379e-04 -7.45445184e-03 -2.31210382e-03 1.81788477e-03 2.31066460e-03 7.74809042e-03 -6.06194656e-03 -7.74326744e-03 -1.00027946e-04 4.96754931e-04 6.78167761e-04 1.72408940e-04 -4.96445715e-04 -1.07046310e-03 -9.38232751e-03 -2.08543656e-03 4.16912193e-03 1.31799284e-03 6.70270695e-03 -1.33997855e-02 -4.13003365e-03 1.22222283e-04 4.93139890e-04 8.89202386e-05 -5.27496964e-04 -1.77765809e-04 -8.19313531e-04 -7.88509987e-03 -2.44567540e-03 2.31066460e-03 2.07757112e-03 8.19570212e-03 -7.74326744e-03 -6.93218143e-03 -1.05806619e-04 6.78167761e-04 5.72971495e-04 -1.06199984e-04 -5.41341236e-04 -4.52529589e-05 -2.86815690e-04 -1.33613851e-04 9.80770187e-05 4.91049770e-05 3.95744275e-04 -2.44113689e-04 -1.22222283e-04 -2.48654934e-05 -3.04987563e-05 -1.52700474e-05 3.45954558e-05 4.62316000e-05 2.42590059e-06 2.08144515e-05 -4.19748553e-05 -2.97623893e-05 -3.14817799e-05 1.44191298e-04 1.00027946e-04 1.05806619e-04 -2.41776686e-05 6.86878223e-06 7.26559579e-06 -8.71383884e-07 1.55069825e-05 -1.04515170e-04 -6.62422772e-04 -8.08065612e-05 3.07834441e-04 1.78567779e-04 1.76844079e-04 -8.26960857e-04 -4.93139890e-04 -3.04987563e-05 -1.00963008e-04 -5.03818370e-05 7.08650300e-05 8.71305384e-05 -7.31058928e-05 -6.27255324e-04 -1.71149765e-04 1.57147242e-04 2.11097976e-04 5.42185781e-04 -4.96754931e-04 -6.78167761e-04 6.86878223e-06 -5.35277731e-06 5.98740490e-06 1.39278394e-05 -4.18916780e-06 -5.23284157e-05 -3.31660316e-04 -4.04580439e-05 1.78567779e-04 4.05872025e-05 8.85418883e-05 -4.93139890e-04 -8.89202386e-05 -1.52700474e-05 -5.03818370e-05 -2.55607884e-05 2.64098346e-05 5.04119965e-05 -7.73292628e-05 -6.63492230e-04 -1.81037186e-04 2.11097976e-04 1.80871700e-04 5.73508170e-04 -6.78167761e-04 -5.72971495e-04 7.26559579e-06 5.98740490e-06 -4.67987681e-06 -1.26092823e-05 -5.96759295e-06 7.82826168e-05 4.96159440e-04 1.33623619e-04 -1.69540617e-04 -1.82611904e-04 -3.69020309e-04 4.21895582e-04 5.27496964e-04 3.45954558e-05 7.08650300e-05 2.64098346e-05 -6.47470438e-05 -6.18643903e-05 -4.10548237e-06 -3.52254186e-05 -1.18622288e-05 5.12870831e-05 -3.05402781e-05 3.81082817e-05 -1.72408940e-04 1.06199984e-04 -8.71383884e-07 1.39278394e-05 -1.26092823e-05 -2.31505545e-05 -1.00298443e-06 1.04612890e-04 6.63042130e-04 1.78567779e-04 -3.08122263e-04 -8.11403231e-05 -4.93139890e-04 8.27734056e-04 1.77765809e-04 4.62316000e-05 8.71305384e-05 5.04119965e-05 -6.18643903e-05 -1.01125864e-04 7.30603863e-05 6.26864874e-04 2.11097976e-04 -1.57049422e-04 -1.70886877e-04 -6.78167761e-04 4.96445715e-04 5.41341236e-04 1.55069825e-05 -4.18916780e-06 -5.96759295e-06 -1.00298443e-06 -5.35799422e-06 3.36589120e-05 3.53329930e-04 3.28578603e-05 -1.70274378e-04 -3.29195403e-05 -1.13778534e-04 5.89617490e-04 1.13992116e-04 -3.33667472e-05 -2.31639258e-05 -4.47833547e-06 5.77761039e-05 2.32074085e-05 1.69812269e-04 1.56257026e-03 3.24737940e-04 -6.49748532e-04 -3.24434356e-04 -1.06336506e-03 2.12762291e-03 1.06237096e-03 -4.51611142e-05 -1.04287103e-04 -5.20729446e-05 7.83187515e-05 1.04189610e-04 3.53329930e-04 3.70721251e-03 3.42508765e-04 -1.77493198e-03 -3.43151714e-04 -1.18796203e-03 6.15619805e-03 1.19019204e-03 -3.38468571e-04 -2.34972286e-04 -4.54277368e-05 5.86074369e-04 2.35413370e-04 1.56257026e-03 1.39281933e-02 2.88844641e-03 -5.77931796e-03 -2.88574612e-03 -9.32883121e-03 1.86654949e-02 9.32011008e-03 -2.87377701e-04 -6.63619325e-04 -3.31360362e-04 4.98372620e-04 6.62998935e-04 -3.28578603e-05 -3.42508765e-04 5.19054377e-06 1.71251854e-04 3.31085179e-05 -1.87690470e-05 -5.92304589e-04 -1.14511620e-04 4.06984097e-05 -7.83940667e-06 -1.51561067e-06 -5.84110525e-05 -2.34624536e-05 -3.24737940e-04 -2.88844641e-03 -4.12926346e-04 1.28212806e-03 6.40195973e-04 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 1.33361885e-04 8.10521596e-05 4.04712038e-05 -1.33922102e-04 -1.78160290e-04 1.70274378e-04 1.77493198e-03 1.71251854e-04 -8.49215854e-04 -1.71573323e-04 -5.92304589e-04 2.93634542e-03 5.93416448e-04 -1.56765014e-04 -1.15326316e-04 -2.34624536e-05 2.71436966e-04 1.15542804e-04 6.49748532e-04 5.77931796e-03 1.28212806e-03 -2.33746393e-03 -1.28092946e-03 -4.14642043e-03 7.53176319e-03 4.14254411e-03 -9.83507742e-05 -3.08186714e-04 -1.78160290e-04 1.70681803e-04 3.07898603e-04 3.29195403e-05 3.43151714e-04 3.31085179e-05 -1.71573323e-04 5.06635927e-06 -1.14511620e-04 5.93416448e-04 -1.83395331e-05 -3.03077437e-05 -2.34624536e-05 1.49578885e-06 6.45638624e-05 -7.75140294e-06 3.24434356e-04 2.88574612e-03 6.40195973e-04 -1.28092946e-03 -4.11728801e-04 -2.07040290e-03 4.14254411e-03 1.30390836e-03 -4.91087991e-05 -1.78160290e-04 -4.03425113e-05 1.82368464e-04 8.07188943e-05 1.13778534e-04 1.18796203e-03 -1.87690470e-05 -5.92304589e-04 -1.14511620e-04 6.75139874e-05 2.05173191e-03 3.96666087e-04 -1.40634442e-04 2.84257238e-05 5.49561109e-06 2.01394393e-04 8.08957618e-05 1.06336506e-03 9.32883121e-03 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -4.10007140e-03 1.33325342e-02 6.65724034e-03 -3.95514409e-04 -1.78547270e-04 -8.91527502e-05 3.70647471e-04 4.93082622e-04 -5.89617490e-04 -6.15619805e-03 -5.92304589e-04 2.93634542e-03 5.93416448e-04 2.05173191e-03 -1.01689467e-02 -2.05558337e-03 5.39701008e-04 3.97362023e-04 8.08957618e-05 -9.34486141e-04 -3.98107941e-04 -2.12762291e-03 -1.86654949e-02 -4.14642043e-03 7.53176319e-03 4.14254411e-03 1.33325342e-02 -2.41128640e-02 -1.33200701e-02 2.45770524e-04 8.30070130e-04 4.93082622e-04 -4.26609392e-04 -8.29294132e-04 -1.13992116e-04 -1.19019204e-03 -1.14511620e-04 5.93416448e-04 -1.83395331e-05 3.96666087e-04 -2.05558337e-03 6.60261595e-05 1.04341647e-04 8.08957618e-05 -5.42676198e-06 -2.22878518e-04 2.81222974e-05 -1.06237096e-03 -9.32011008e-03 -2.07040290e-03 4.14254411e-03 1.30390836e-03 6.65724034e-03 -1.33200701e-02 -4.08761842e-03 1.22718864e-04 4.93082622e-04 8.87751887e-05 -5.27586074e-04 -1.77624913e-04 -3.33667472e-05 -3.38468571e-04 -4.06984097e-05 1.56765014e-04 3.03077437e-05 1.40634442e-04 -5.39701008e-04 -1.04341647e-04 2.06102268e-05 2.30280306e-05 4.45206254e-06 -3.69806551e-05 -1.48543275e-05 -4.51611142e-05 -2.87377701e-04 -1.33361885e-04 9.83507742e-05 4.91087991e-05 3.95514409e-04 -2.45770524e-04 -1.22718864e-04 -2.47895715e-05 -2.98834622e-05 -1.49214986e-05 3.43621849e-05 4.57129687e-05 -2.31639258e-05 -2.34972286e-04 7.83940667e-06 1.15326316e-04 2.34624536e-05 -2.84257238e-05 -3.97362023e-04 -8.08957618e-05 2.30280306e-05 -1.02826640e-05 -2.02025239e-06 -3.04051856e-05 -1.31996553e-05 -1.04287103e-04 -6.63619325e-04 -8.10521596e-05 3.08186714e-04 1.78160290e-04 1.78547270e-04 -8.30070130e-04 -4.93082622e-04 -2.98834622e-05 -9.99557848e-05 -4.97128759e-05 7.01632737e-05 8.57249345e-05 -4.47833547e-06 -4.54277368e-05 1.51561067e-06 2.34624536e-05 -1.49578885e-06 -5.49561109e-06 -8.08957618e-05 5.42676198e-06 4.45206254e-06 -2.02025239e-06 -2.23607923e-07 -7.70922334e-06 2.00625063e-06 -5.20729446e-05 -3.31360362e-04 -4.04712038e-05 1.78160290e-04 4.03425113e-05 8.91527502e-05 -4.93082622e-04 -8.87751887e-05 -1.49214986e-05 -4.97128759e-05 -2.52179989e-05 2.58826758e-05 4.96835272e-05 5.77761039e-05 5.86074369e-04 5.84110525e-05 -2.71436966e-04 -6.45638624e-05 -2.01394393e-04 9.34486141e-04 2.22878518e-04 -3.69806551e-05 -3.04051856e-05 -7.70922334e-06 6.32732520e-05 3.52063086e-05 7.83187515e-05 4.98372620e-04 1.33922102e-04 -1.70681803e-04 -1.82368464e-04 -3.70647471e-04 4.26609392e-04 5.27586074e-04 3.43621849e-05 7.01632737e-05 2.58826758e-05 -6.45321359e-05 -6.09423818e-05 2.32074085e-05 2.35413370e-04 2.34624536e-05 -1.15542804e-04 7.75140294e-06 -8.08957618e-05 3.98107941e-04 -2.81222974e-05 -1.48543275e-05 -1.31996553e-05 2.00625063e-06 3.52063086e-05 -1.02331543e-05 1.04189610e-04 6.62998935e-04 1.78160290e-04 -3.07898603e-04 -8.07188943e-05 -4.93082622e-04 8.29294132e-04 1.77624913e-04 4.57129687e-05 8.57249345e-05 4.96835272e-05 -6.09423818e-05 -9.97954284e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 0 676 + 3.92500494e-02 1.43599898e-01 7.04711972e-02 -7.04071004e-02 -6.09690816e-05 -1.49320233e-01 1.49184420e-01 1.29186361e-04 -6.14982268e-03 2.12456198e-02 1.83976605e-05 -1.06131400e-02 -1.83809269e-05 1.53743222e-02 7.29622311e-02 4.20995346e-02 -1.17455878e-02 -1.40434402e-02 -1.02034176e-01 2.84670929e-02 3.40362633e-02 -4.71173969e-03 2.51465171e-03 3.00660654e-03 1.50679064e-04 -8.38830200e-04 1.43599898e-01 2.07059446e-01 1.43696713e-01 -1.43566014e-01 -1.24321098e-04 -1.50526721e-01 1.50389810e-01 1.30230169e-04 -1.38862174e-02 4.79723254e-02 4.15416713e-05 -2.39643282e-02 -4.15038872e-05 7.29622311e-02 1.65347928e-01 1.30364916e-01 -3.63712467e-02 -4.34867492e-02 -1.83364298e-01 5.11578448e-02 6.11661289e-02 -4.33380961e-02 2.31295073e-02 2.76544571e-02 1.38593050e-03 -7.71547373e-03 -7.04711972e-02 -1.43696713e-01 -6.96545637e-02 1.13261353e-01 9.80787537e-05 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -6.49774041e-04 -4.19809586e-02 -3.63534427e-05 2.83534715e-02 4.91054568e-05 -4.20995346e-02 -1.30364916e-01 -8.76787727e-02 2.94790858e-02 3.52462378e-02 1.61872875e-01 -5.65511903e-02 -6.76146037e-02 2.13225981e-02 -1.33837026e-02 -1.60020283e-02 -9.01283632e-04 5.01744509e-03 7.04071004e-02 1.43566014e-01 1.13261353e-01 -6.94484370e-02 -9.79895466e-05 -1.75021767e-01 8.99790234e-02 1.51422380e-04 -2.49464601e-02 4.19158809e-02 4.91054568e-05 -1.35500312e-02 -3.62640747e-05 1.17455878e-02 3.63712467e-02 2.94790858e-02 9.75813647e-03 -9.83354765e-03 -5.65511903e-02 -2.50451736e-02 1.88641815e-02 -8.82001777e-03 -1.74496303e-03 5.01744509e-03 1.90908763e-03 5.82079688e-04 6.09690816e-05 1.24321098e-04 9.80787537e-05 -9.79895466e-05 4.37098145e-02 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 -2.16024059e-05 4.91054568e-05 -1.47910621e-02 -3.73270966e-05 1.47776090e-02 1.40434402e-02 4.34867492e-02 3.52462378e-02 -9.83354765e-03 6.22533626e-03 -6.76146037e-02 1.88641815e-02 -1.82680280e-02 -1.05455253e-02 5.01744509e-03 5.76042379e-05 -1.68127756e-03 -1.60713328e-05 1.49320233e-01 1.50526721e-01 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -3.55490351e-02 1.58872868e-01 1.37576080e-04 1.91774349e-02 4.51977880e-02 3.91390585e-05 -4.11813359e-02 -7.13220712e-05 1.02034176e-01 1.83364298e-01 1.61872875e-01 -5.65511903e-02 -6.76146037e-02 -1.79837830e-01 7.17187514e-02 8.57494762e-02 -5.78963933e-02 3.84573830e-02 4.59810076e-02 2.67902238e-03 -1.49141150e-02 -1.49184420e-01 -1.50389810e-01 -1.75021767e-01 8.99790234e-02 1.51422380e-04 1.58872868e-01 -3.52598991e-02 -1.37450948e-04 4.53414527e-02 -4.50889048e-02 -7.13220712e-05 3.90395303e-03 3.90092580e-05 -2.84670929e-02 -5.11578448e-02 -5.65511903e-02 -2.50451736e-02 1.88641815e-02 7.17187514e-02 5.72133970e-02 -2.39237324e-02 2.69820870e-02 9.93610849e-03 -1.49141150e-02 -6.99970265e-03 -3.31445815e-03 -1.29186361e-04 -1.30230169e-04 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 1.37576080e-04 -1.37450948e-04 1.23468348e-01 3.92634651e-05 -7.13220712e-05 3.72737671e-02 6.78765160e-05 -3.72398649e-02 -3.40362633e-02 -6.11661289e-02 -6.76146037e-02 1.88641815e-02 -1.82680280e-02 8.57494762e-02 -2.39237324e-02 4.86185572e-02 3.22607378e-02 -1.49141150e-02 4.57806373e-03 6.58177113e-03 -1.27725995e-03 -6.14982268e-03 -1.38862174e-02 6.49774041e-04 2.49464601e-02 2.16024059e-05 -1.91774349e-02 -4.53414527e-02 -3.92634651e-05 -7.71985221e-03 -1.42582602e-02 -1.23469512e-05 1.39925551e-02 2.42337454e-05 -4.71173969e-03 -4.33380961e-02 -2.13225981e-02 8.82001777e-03 1.05455253e-02 5.78963933e-02 -2.69820870e-02 -3.22607378e-02 8.08020420e-03 -3.49362686e-03 -4.17710386e-03 -1.53438515e-04 8.54192060e-04 2.12456198e-02 4.79723254e-02 4.19809586e-02 -4.19158809e-02 -4.91054568e-05 -4.51977880e-02 4.50889048e-02 7.13220712e-05 -1.42582602e-02 4.92807889e-02 4.94990683e-05 -2.45775648e-02 -4.94415450e-05 2.51465171e-03 2.31295073e-02 1.33837026e-02 1.74496303e-03 -5.01744509e-03 -3.84573830e-02 -9.93610849e-03 1.49141150e-02 -3.49362686e-03 3.20044897e-03 2.21055368e-03 -4.36843862e-04 -1.21060436e-03 1.83976605e-05 4.15416713e-05 3.63534427e-05 -4.91054568e-05 1.47910621e-02 -3.91390585e-05 7.13220712e-05 -3.72737671e-02 -1.23469512e-05 4.94990683e-05 -7.88069639e-03 -3.50341232e-05 7.93987295e-03 3.00660654e-03 2.76544571e-02 1.60020283e-02 -5.01744509e-03 -5.76042379e-05 -4.59810076e-02 1.49141150e-02 -4.57806373e-03 -4.17710386e-03 2.21055368e-03 3.99461246e-03 7.65688611e-04 -1.21607893e-03 -1.06131400e-02 -2.39643282e-02 -2.83534715e-02 1.35500312e-02 3.73270966e-05 4.11813359e-02 -3.90395303e-03 -6.78765160e-05 1.39925551e-02 -2.45775648e-02 -3.50341232e-05 8.37764785e-03 2.81329305e-05 1.50679064e-04 1.38593050e-03 9.01283632e-04 -1.90908763e-03 1.68127756e-03 -2.67902238e-03 6.99970265e-03 -6.58177113e-03 -1.53438515e-04 -4.36843862e-04 7.65688611e-04 -2.07788783e-04 -3.39513506e-05 -1.83809269e-05 -4.15038872e-05 -4.91054568e-05 3.62640747e-05 -1.47776090e-02 7.13220712e-05 -3.90092580e-05 3.72398649e-02 2.42337454e-05 -4.94415450e-05 7.93987295e-03 2.81329305e-05 -7.86624645e-03 -8.38830200e-04 -7.71547373e-03 -5.01744509e-03 -5.82079688e-04 1.60713328e-05 1.49141150e-02 3.31445815e-03 1.27725995e-03 8.54192060e-04 -1.21060436e-03 -1.21607893e-03 -3.39513506e-05 -2.48803285e-05 9.99378977e-03 5.18590704e-02 9.11151051e-03 -2.89227928e-02 9.16581164e-03 -2.30209885e-02 7.30758397e-02 -2.31581848e-02 1.17096127e-03 1.41678534e-03 -4.48988024e-04 -2.02282867e-03 1.42522885e-03 3.90200104e-02 1.43040610e-01 7.00758462e-02 -7.01395746e-02 6.06185730e-05 -1.48644876e-01 1.48780057e-01 -1.28584109e-04 -6.06660721e-03 2.10728168e-02 -1.82123158e-05 -1.05459825e-02 1.82288785e-05 5.18590704e-02 1.44607428e-01 3.28085725e-02 -1.04144702e-01 3.30040991e-02 -5.33871165e-02 1.69467457e-01 -5.37052834e-02 1.73495615e-02 2.09918168e-02 -6.65243636e-03 -2.99712649e-02 2.11169200e-02 1.43040610e-01 2.06856968e-01 1.43350536e-01 -1.43480902e-01 1.24004281e-04 -1.50417204e-01 1.50553997e-01 -1.30117248e-04 -1.38395888e-02 4.80728535e-02 -4.15472691e-05 -2.40582680e-02 4.15850530e-05 -9.11151051e-03 -3.28085725e-02 4.19206060e-03 2.44897752e-02 -7.76096100e-03 -1.27469896e-02 -5.07391252e-02 1.60795421e-02 -4.07579921e-03 -2.87225012e-04 9.10233799e-05 5.01441593e-03 -3.53301806e-03 -7.00758462e-02 -1.43350536e-01 -6.92992616e-02 1.12874473e-01 -9.75524806e-05 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -7.06744227e-04 -4.17155764e-02 3.60529520e-05 2.82273075e-02 -4.87912961e-05 2.89227928e-02 1.04144702e-01 2.44897752e-02 -6.58311864e-02 2.46357250e-02 -5.07391252e-02 1.32330630e-01 -5.10415110e-02 7.35223992e-03 1.01325428e-02 -3.53301806e-03 -1.26924669e-02 1.01929289e-02 7.01395746e-02 1.43480902e-01 1.12874473e-01 -6.95044687e-02 9.76411967e-05 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 -2.47326054e-02 4.17802159e-02 -4.87912961e-05 -1.35651915e-02 3.61416551e-05 -9.16581164e-03 -3.30040991e-02 -7.76096100e-03 2.46357250e-02 4.09982986e-03 1.60795421e-02 -5.10415110e-02 -1.25559014e-02 -2.32997023e-03 -3.53301806e-03 1.03710972e-04 6.06627873e-03 -3.29211161e-04 -6.06185730e-05 -1.24004281e-04 -9.75524806e-05 9.76411967e-05 4.34725702e-02 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 2.13753113e-05 -4.87912961e-05 -1.46743990e-02 3.71118284e-05 1.46877442e-02 2.30209885e-02 5.33871165e-02 -1.27469896e-02 -5.07391252e-02 1.60795421e-02 3.65649381e-02 7.62372868e-02 -2.41600669e-02 1.52636792e-02 -1.39121977e-03 4.40886135e-04 -1.77023407e-02 1.24725772e-02 1.48644876e-01 1.50417204e-01 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -3.55920291e-02 1.58871492e-01 -1.37305696e-04 1.91183423e-02 4.52813592e-02 -3.91347024e-05 -4.12480311e-02 7.12977992e-05 -7.30758397e-02 -1.69467457e-01 -5.07391252e-02 1.32330630e-01 -5.10415110e-02 7.62372868e-02 -1.81419192e-01 7.66916320e-02 -2.45668896e-02 -3.50131019e-02 1.24725772e-02 4.24028776e-02 -3.52217666e-02 -1.48780057e-01 -1.50553997e-01 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 1.58871492e-01 -3.58808593e-02 1.37430565e-04 4.51923078e-02 -4.53900595e-02 7.12977992e-05 4.14573359e-03 -3.92643227e-05 2.31581848e-02 5.37052834e-02 1.60795421e-02 -5.10415110e-02 -1.25559014e-02 -2.41600669e-02 7.66916320e-02 3.62778215e-02 7.78539900e-03 1.24725772e-02 3.91579600e-04 -2.21779461e-02 -1.24299650e-03 1.28584109e-04 1.30117248e-04 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -1.37305696e-04 1.37430565e-04 1.23134994e-01 -3.90577392e-05 7.12977992e-05 3.71060027e-02 -6.77796089e-05 -3.71397476e-02 1.17096127e-03 1.73495615e-02 4.07579921e-03 -7.35223992e-03 2.32997023e-03 -1.52636792e-02 2.45668896e-02 -7.78539900e-03 6.04145709e-04 -8.41388669e-04 2.66641265e-04 -8.58492100e-04 6.04869668e-04 -6.06660721e-03 -1.38395888e-02 7.06744227e-04 2.47326054e-02 -2.13753113e-05 -1.91183423e-02 -4.51923078e-02 3.90577392e-05 -7.62586988e-03 -1.40726582e-02 1.21623842e-05 1.38215649e-02 -2.38907685e-05 1.41678534e-03 2.09918168e-02 2.87225012e-04 -1.01325428e-02 3.53301806e-03 1.39121977e-03 3.50131019e-02 -1.24725772e-02 -8.41388669e-04 2.05259085e-03 -6.99665348e-04 -2.10172243e-04 -1.74816655e-04 2.10728168e-02 4.80728535e-02 4.17155764e-02 -4.17802159e-02 4.87912961e-05 -4.52813592e-02 4.53900595e-02 -7.12977992e-05 -1.40726582e-02 4.89750822e-02 -4.90366322e-05 -2.44919408e-02 4.90935259e-05 -4.48988024e-04 -6.65243636e-03 -9.10233799e-05 3.53301806e-03 -1.03710972e-04 -4.40886135e-04 -1.24725772e-02 -3.91579600e-04 2.66641265e-04 -6.99665348e-04 6.65194459e-05 -4.61315641e-04 -6.93877628e-04 -1.82123158e-05 -4.15472691e-05 -3.60529520e-05 4.87912961e-05 1.46743990e-02 3.91347024e-05 -7.12977992e-05 -3.71060027e-02 1.21623842e-05 -4.90366322e-05 -7.76340215e-03 3.46850220e-05 7.82037819e-03 -2.02282867e-03 -2.99712649e-02 -5.01441593e-03 1.26924669e-02 -6.06627873e-03 1.77023407e-02 -4.24028776e-02 2.21779461e-02 -8.58492100e-04 -2.10172243e-04 -4.61315641e-04 1.60275872e-03 6.26467890e-04 -1.05459825e-02 -2.40582680e-02 -2.82273075e-02 1.35651915e-02 -3.71118284e-05 4.12480311e-02 -4.14573359e-03 6.77796089e-05 1.38215649e-02 -2.44919408e-02 3.46850220e-05 8.39319630e-03 -2.79515653e-05 1.42522885e-03 2.11169200e-02 3.53301806e-03 -1.01929289e-02 3.29211161e-04 -1.24725772e-02 3.52217666e-02 1.24299650e-03 6.04869668e-04 -1.74816655e-04 -6.93877628e-04 6.26467890e-04 2.05051334e-03 1.82288785e-05 4.15850530e-05 4.87912961e-05 -3.61416551e-05 -1.46877442e-02 -7.12977992e-05 3.92643227e-05 3.71397476e-02 -2.38907685e-05 4.90935259e-05 7.82037819e-03 -2.79515653e-05 -7.77761969e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 1 676 + 3.92374918e-02 1.43569413e-01 7.04490824e-02 6.89958743e-05 7.03930517e-02 -1.49282270e-01 -1.46202908e-04 -1.49163540e-01 -6.14498615e-03 -2.08146796e-05 -2.12361802e-02 1.06096349e-02 -2.07981249e-05 1.23706992e-02 6.15231308e-02 3.39513582e-02 1.31325473e-02 1.12794339e-02 -8.41260872e-02 -3.25403718e-02 -2.79486503e-02 -3.03618104e-03 -2.33807497e-03 -2.00815283e-03 -1.18611647e-04 -7.76763094e-04 1.43569413e-01 2.07048455e-01 1.43676788e-01 1.40713055e-04 1.43562517e-01 -1.50519643e-01 -1.47414757e-04 -1.50399929e-01 -1.38830541e-02 -4.70255451e-05 -4.79778198e-02 2.39698076e-02 -4.69881440e-05 6.15231308e-02 1.54844065e-01 1.13664255e-01 4.39658759e-02 3.77619192e-02 -1.72155141e-01 -6.65904296e-02 -5.71939572e-02 -3.58953578e-02 -2.76419742e-02 -2.37414580e-02 -1.40229040e-03 -9.18330918e-03 -7.04490824e-02 -1.43676788e-01 -6.96334486e-02 -1.10992647e-04 -1.13240266e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -6.53646142e-04 4.11329686e-05 4.19659177e-02 -2.83467977e-02 5.55683815e-05 -3.39513582e-02 -1.13664255e-01 -7.13383490e-02 -3.32411204e-02 -2.85505174e-02 1.37362698e-01 6.63630094e-02 5.69986279e-02 1.53617180e-02 1.39802004e-02 1.20074760e-02 7.93220564e-04 5.19463707e-03 -6.89958743e-05 -1.40713055e-04 -1.10992647e-04 4.36968444e-02 -1.10904371e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 2.44393156e-05 -1.47845630e-02 5.55683815e-05 -4.22417099e-05 -1.47728043e-02 -1.31325473e-02 -4.39658759e-02 -3.32411204e-02 1.74154823e-03 -1.10434763e-02 6.63630094e-02 -8.53496881e-03 2.20473411e-02 8.80987727e-03 1.76741563e-03 5.19463707e-03 -1.34895642e-03 5.87176737e-04 -7.03930517e-02 -1.43562517e-01 -1.13240266e-01 -1.10904371e-04 -6.94532486e-02 1.75005510e-01 1.71395535e-04 9.00027746e-02 2.49342156e-02 5.55683815e-05 4.19090325e-02 -1.35513938e-02 4.10445423e-05 -1.12794339e-02 -3.77619192e-02 -2.85505174e-02 -1.10434763e-02 5.11422370e-03 5.69986279e-02 2.20473411e-02 -1.52682224e-02 7.56672913e-03 5.19463707e-03 1.80974500e-04 1.68566005e-03 7.00017999e-05 1.49282270e-01 1.50519643e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -3.55489594e-02 -1.55719463e-04 -1.58872807e-01 1.91751556e-02 -4.43042779e-05 -4.52014465e-02 4.11852851e-02 -8.07357378e-05 8.41260872e-02 1.72155141e-01 1.37362698e-01 6.63630094e-02 5.69986279e-02 -1.68775446e-01 -9.17660807e-02 -7.88171111e-02 -4.64925669e-02 -4.44607238e-02 -3.81869399e-02 -2.59368650e-03 -1.69855153e-02 1.46202908e-04 1.47414757e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -1.55719463e-04 1.23450153e-01 -1.55595614e-04 -4.44328321e-05 3.72643260e-02 -8.07357378e-05 7.68314473e-05 3.72346883e-02 3.25403718e-02 6.65904296e-02 6.63630094e-02 -8.53496881e-03 2.20473411e-02 -9.17660807e-02 3.29703338e-02 -3.04868345e-02 -2.95295225e-02 -2.54240175e-03 -1.69855153e-02 5.66282195e-03 -8.44645222e-04 1.49163540e-01 1.50399929e-01 1.75005510e-01 1.71395535e-04 9.00027746e-02 -1.58872807e-01 -1.55595614e-04 -3.52961440e-02 -4.53326039e-02 -8.07357378e-05 -4.51062441e-02 3.91776154e-03 -4.41758025e-05 2.79486503e-02 5.71939572e-02 5.69986279e-02 2.20473411e-02 -1.52682224e-02 -7.88171111e-02 -3.04868345e-02 4.22810070e-02 -2.53626573e-02 -1.69855153e-02 2.64497125e-03 -6.58711633e-03 1.02308750e-03 -6.14498615e-03 -1.38830541e-02 6.53646142e-04 -2.44393156e-05 -2.49342156e-02 -1.91751556e-02 4.44328321e-05 4.53326039e-02 -7.71510376e-03 1.39644645e-05 1.42472471e-02 -1.39829968e-02 2.74109445e-05 -3.03618104e-03 -3.58953578e-02 -1.53617180e-02 -8.80987727e-03 -7.56672913e-03 4.64925669e-02 2.95295225e-02 2.53626573e-02 4.15388496e-03 1.51567692e-03 1.30180210e-03 -3.91446256e-06 -2.56350040e-05 -2.08146796e-05 -4.70255451e-05 -4.11329686e-05 1.47845630e-02 -5.55683815e-05 4.43042779e-05 -3.72643260e-02 8.07357378e-05 1.39644645e-05 -7.87414572e-03 5.60042492e-05 -3.96375293e-05 -7.93332691e-03 -2.33807497e-03 -2.76419742e-02 -1.39802004e-02 -1.76741563e-03 -5.19463707e-03 4.44607238e-02 2.54240175e-03 1.69855153e-02 1.51567692e-03 2.99062043e-03 9.56829414e-04 9.58095509e-04 1.04178808e-03 -2.12361802e-02 -4.79778198e-02 -4.19659177e-02 -5.55683815e-05 -4.19090325e-02 4.52014465e-02 8.07357378e-05 4.51062441e-02 1.42472471e-02 5.60042492e-05 4.92641434e-02 -2.45734168e-02 5.59473429e-05 -2.00815283e-03 -2.37414580e-02 -1.20074760e-02 -5.19463707e-03 -1.80974500e-04 3.81869399e-02 1.69855153e-02 -2.64497125e-03 1.30180210e-03 9.56829414e-04 2.69840492e-03 -7.56817790e-04 1.13600575e-03 1.06096349e-02 2.39698076e-02 2.83467977e-02 4.22417099e-05 1.35513938e-02 -4.11852851e-02 -7.68314473e-05 -3.91776154e-03 -1.39829968e-02 -3.96375293e-05 -2.45734168e-02 8.37887676e-03 -3.18362629e-05 -1.18611647e-04 -1.40229040e-03 -7.93220564e-04 1.34895642e-03 -1.68566005e-03 2.59368650e-03 -5.66282195e-03 6.58711633e-03 -3.91446256e-06 9.58095509e-04 -7.56817790e-04 1.19175253e-04 1.27804831e-05 -2.07981249e-05 -4.69881440e-05 -5.55683815e-05 1.47728043e-02 -4.10445423e-05 8.07357378e-05 -3.72346883e-02 4.41758025e-05 2.74109445e-05 -7.93332691e-03 5.59473429e-05 -3.18362629e-05 -7.86152136e-03 -7.76763094e-04 -9.18330918e-03 -5.19463707e-03 -5.87176737e-04 -7.00017999e-05 1.69855153e-02 8.44645222e-04 -1.02308750e-03 -2.56350040e-05 1.04178808e-03 1.13600575e-03 1.27804831e-05 2.00920410e-04 1.24338945e-02 6.17723056e-02 1.13152740e-02 -1.31990060e-02 3.41019321e-02 -2.80237262e-02 3.26890301e-02 -8.44578057e-02 1.63543234e-03 7.82653968e-04 -2.02212291e-03 2.59065949e-03 2.35875972e-03 3.90324935e-02 1.43071006e-01 7.00978352e-02 -6.86422865e-05 7.01535788e-02 -1.48682692e-01 1.45595366e-04 -1.48800929e-01 -6.07138617e-03 2.06280218e-05 -2.10821875e-02 1.05494662e-02 2.06444258e-05 6.17723056e-02 1.55089447e-01 3.78145064e-02 -4.41097493e-02 1.13965224e-01 -5.71745301e-02 6.66927702e-02 -1.72312394e-01 1.92266567e-02 9.20112606e-03 -2.37727126e-02 3.04566073e-02 2.77303207e-02 1.43071006e-01 2.06868017e-01 1.43370476e-01 -1.40393455e-04 1.43484488e-01 -1.50424335e-01 1.47300844e-04 -1.50543956e-01 -1.38427655e-02 4.70319070e-05 -4.80674051e-02 2.40527917e-02 4.70693080e-05 -1.13152740e-02 -3.78145064e-02 5.17524973e-03 1.10763141e-02 -2.86175876e-02 -1.54072111e-02 -2.20928118e-02 5.70806292e-02 -5.26910906e-03 -6.22556082e-05 1.60848213e-04 -5.72990161e-03 -5.21699636e-03 -7.00978352e-02 -1.43370476e-01 -6.93202600e-02 1.10463434e-04 -1.12895499e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -7.02935424e-04 -4.08315227e-05 4.17305074e-02 -2.82339372e-02 -5.52514609e-05 1.31990060e-02 4.41097493e-02 1.10763141e-02 1.75051270e-03 3.33817556e-02 -2.20928118e-02 -8.57623191e-03 -6.65832370e-02 3.25587812e-03 5.88598340e-04 -5.21699636e-03 8.35258050e-03 1.77391557e-03 6.86422865e-05 1.40393455e-04 1.10463434e-04 4.34854252e-02 1.10551277e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 -2.42116850e-05 -1.46808232e-02 -5.52514609e-05 4.20237084e-05 -1.46924978e-02 -3.41019321e-02 -1.13965224e-01 -2.86175876e-02 3.33817556e-02 -7.15768052e-02 5.70806292e-02 -6.65832370e-02 1.37682408e-01 -8.41212850e-03 -5.21699636e-03 1.20484016e-02 -1.29571666e-02 -1.40541824e-02 -7.01535788e-02 -1.43484488e-01 -1.12895499e-01 1.10551277e-04 -6.94997435e-02 1.74738923e-01 -1.71110551e-04 9.03413179e-02 2.47447519e-02 -5.52514609e-05 4.17870511e-02 -1.35638376e-02 -4.09193626e-05 2.80237262e-02 5.71745301e-02 -1.54072111e-02 -2.20928118e-02 5.70806292e-02 4.25257067e-02 3.04882304e-02 -7.87716562e-02 1.84445044e-02 -1.05977232e-03 2.73810647e-03 1.86980008e-02 1.70242718e-02 1.48682692e-01 1.50424335e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -3.55921032e-02 1.55449069e-04 -1.58871580e-01 1.91206163e-02 4.43023376e-05 -4.52777390e-02 4.12440938e-02 8.07112526e-05 -3.26890301e-02 -6.66927702e-02 -2.20928118e-02 -8.57623191e-03 -6.65832370e-02 3.04882304e-02 3.30989090e-02 9.18853195e-02 -9.89553597e-03 -8.38048397e-04 1.70242718e-02 -2.85193385e-02 -2.52570725e-03 -1.45595366e-04 -1.47300844e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 1.55449069e-04 1.23153086e-01 1.55572686e-04 4.42274240e-05 3.71153887e-02 8.07112526e-05 -7.67324619e-05 3.71449038e-02 8.44578057e-02 1.72312394e-01 5.70806292e-02 -6.65832370e-02 1.37682408e-01 -7.87716562e-02 9.18853195e-02 -1.68739009e-01 2.55668416e-02 1.70242718e-02 -3.82340501e-02 3.90192549e-02 4.45991373e-02 1.48800929e-01 1.50543956e-01 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -1.58871580e-01 1.55572686e-04 -3.58446805e-02 -4.52011760e-02 8.07112526e-05 -4.53727988e-02 4.13190929e-03 4.44306539e-05 1.63543234e-03 1.92266567e-02 5.26910906e-03 -3.25587812e-03 8.41212850e-03 -1.84445044e-02 9.89553597e-03 -2.55668416e-02 1.13810821e-03 8.31795081e-06 -2.14908754e-05 1.77270573e-03 1.61402411e-03 -6.07138617e-03 -1.38427655e-02 7.02935424e-04 2.42116850e-05 -2.47447519e-02 -1.91206163e-02 -4.42274240e-05 4.52011760e-02 -7.63060578e-03 -1.37801588e-05 1.40835555e-02 -1.38310503e-02 -2.70662122e-05 7.82653968e-04 9.20112606e-03 6.22556082e-05 -5.88598340e-04 5.21699636e-03 1.05977232e-03 8.38048397e-04 -1.70242718e-02 8.31795081e-06 2.01235299e-04 -1.14496448e-03 -1.28280156e-05 1.05192446e-03 2.06280218e-05 4.70319070e-05 4.08315227e-05 1.46808232e-02 5.52514609e-05 -4.43023376e-05 -3.71153887e-02 -8.07112526e-05 -1.37801588e-05 -7.76985917e-03 -5.55388330e-05 3.92849961e-05 -7.82683976e-03 -2.02212291e-03 -2.37727126e-02 -1.60848213e-04 5.21699636e-03 -1.20484016e-02 -2.73810647e-03 -1.70242718e-02 3.82340501e-02 -2.14908754e-05 -1.14496448e-03 2.71629698e-03 -1.53977048e-03 -9.90276353e-04 -2.10821875e-02 -4.80674051e-02 -4.17305074e-02 5.52514609e-05 -4.17870511e-02 4.52777390e-02 -8.07112526e-05 4.53727988e-02 1.40835555e-02 -5.55388330e-05 4.89917140e-02 -2.44961278e-02 -5.55951839e-05 2.59065949e-03 3.04566073e-02 5.72990161e-03 -8.35258050e-03 1.29571666e-02 -1.86980008e-02 2.85193385e-02 -3.90192549e-02 1.77270573e-03 -1.28280156e-05 -1.53977048e-03 3.18753395e-03 8.78722856e-04 1.05494662e-02 2.40527917e-02 2.82339372e-02 -4.20237084e-05 1.35638376e-02 -4.12440938e-02 7.67324619e-05 -4.13190929e-03 -1.38310503e-02 3.92849961e-05 -2.44961278e-02 8.39198690e-03 3.16518569e-05 2.35875972e-03 2.77303207e-02 5.21699636e-03 -1.77391557e-03 1.40541824e-02 -1.70242718e-02 2.52570725e-03 -4.45991373e-02 1.61402411e-03 1.05192446e-03 -9.90276353e-04 8.78722856e-04 3.02248513e-03 2.06444258e-05 4.70693080e-05 5.52514609e-05 1.46924978e-02 4.09193626e-05 -8.07112526e-05 -3.71449038e-02 -4.44306539e-05 -2.70662122e-05 -7.82683976e-03 -5.55951839e-05 3.16518569e-05 -7.78230244e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 -1 2 676 + 1.70719458e-04 1.57005992e-03 3.26398409e-04 3.26740866e-04 6.52560013e-04 -1.06854114e-03 -1.06966225e-03 -2.13630705e-03 -4.52413105e-05 5.23089602e-05 1.04470359e-04 -7.82505410e-05 1.04579970e-04 4.24041064e-05 4.38959897e-04 1.24450625e-04 1.30997376e-04 1.24204683e-04 -4.28590541e-04 -4.51136635e-04 -4.27743554e-04 -1.45151118e-06 5.08769744e-05 4.82388176e-05 2.70494044e-06 5.07764306e-05 1.57005992e-03 1.39845673e-02 2.90120743e-03 2.90425137e-03 5.80031000e-03 -9.36677236e-03 -9.37659996e-03 -1.87267490e-02 -2.86910970e-04 3.31732532e-04 6.62529264e-04 -4.96248635e-04 6.63224388e-04 4.38959897e-04 4.53386238e-03 1.27650110e-03 1.34365171e-03 1.27397846e-03 -4.40031911e-03 -4.63179881e-03 -4.39162314e-03 -1.42913306e-05 5.00925978e-04 4.74951138e-04 2.66323804e-05 4.99936041e-04 -3.26398409e-04 -2.90120743e-03 -4.14764252e-04 -6.44582972e-04 -1.28734761e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 1.33577269e-04 -4.04713759e-05 -8.08285841e-05 1.33601047e-04 -1.78554592e-04 -1.24450625e-04 -1.27650110e-03 -3.26831297e-04 -3.96564312e-04 -3.76001005e-04 1.12156951e-03 1.36301286e-03 1.29233567e-03 3.07868834e-05 -1.29836277e-04 -1.23103792e-04 -8.18221822e-06 -1.53594448e-04 -3.26740866e-04 -2.90425137e-03 -6.44582972e-04 -4.16116134e-04 -1.28869829e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 4.91269703e-05 -4.06162668e-05 -1.78554592e-04 1.82579539e-04 -8.12030661e-05 -1.30997376e-04 -1.34365171e-03 -3.96564312e-04 -3.67511422e-04 -3.95780615e-04 1.36301286e-03 1.26138929e-03 1.36031925e-03 -9.27070681e-06 -1.39134686e-04 -1.53594448e-04 1.54496628e-05 -1.38859726e-04 -6.52560013e-04 -5.80031000e-03 -1.28734761e-03 -1.28869829e-03 -2.34461810e-03 4.16200528e-03 4.16637205e-03 7.55231102e-03 9.81153560e-05 -1.78554592e-04 -3.07818361e-04 1.69566300e-04 -3.08141323e-04 -1.24204683e-04 -1.27397846e-03 -3.76001005e-04 -3.95780615e-04 -3.25343708e-04 1.29233567e-03 1.36031925e-03 1.11645659e-03 -8.78998683e-06 -1.53594448e-04 -1.22770250e-04 -3.09806382e-05 -1.29228604e-04 1.06854114e-03 9.36677236e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -4.11465939e-03 -6.69832648e-03 -1.33777573e-02 -3.95711679e-04 8.86552125e-05 1.77060333e-04 -3.69076357e-04 4.93261692e-04 4.28590541e-04 4.40031911e-03 1.12156951e-03 1.36301286e-03 1.29233567e-03 -3.85395014e-03 -4.69081493e-03 -4.44757905e-03 -1.06802586e-04 4.40698174e-04 4.17846365e-04 2.78814101e-05 5.23382497e-04 1.06966225e-03 9.37659996e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -6.69832648e-03 -4.12870777e-03 -1.33917933e-02 -1.22350018e-04 8.90797389e-05 4.93261692e-04 -5.27528724e-04 1.78094850e-04 4.51136635e-04 4.63179881e-03 1.36301286e-03 1.26138929e-03 1.36031925e-03 -4.69081493e-03 -4.33514053e-03 -4.68154487e-03 3.25875260e-05 4.72469378e-04 5.23382497e-04 -5.43725699e-05 4.71535677e-04 2.13630705e-03 1.87267490e-02 4.16200528e-03 4.16637205e-03 7.55231102e-03 -1.33777573e-02 -1.33917933e-02 -2.41691624e-02 -2.44354893e-04 4.93261692e-04 8.27232454e-04 -4.22200574e-04 8.28100385e-04 4.27743554e-04 4.39162314e-03 1.29233567e-03 1.36031925e-03 1.11645659e-03 -4.44757905e-03 -4.68154487e-03 -3.83635399e-03 3.08977439e-05 5.23382497e-04 4.16706558e-04 1.07205775e-04 4.38627493e-04 -4.52413105e-05 -2.86910970e-04 -1.33577269e-04 -4.91269703e-05 -9.81153560e-05 3.95711679e-04 1.22350018e-04 2.44354893e-04 -2.48554673e-05 1.52245278e-05 3.04061079e-05 -3.45457148e-05 4.61695186e-05 -1.45151118e-06 -1.42913306e-05 -3.07868834e-05 9.27070681e-06 8.78998683e-06 1.06802586e-04 -3.25875260e-05 -3.08977439e-05 -1.85675336e-05 -7.36601271e-06 -6.98405806e-06 5.61252736e-07 1.05356888e-05 5.23089602e-05 3.31732532e-04 4.04713759e-05 4.06162668e-05 1.78554592e-04 -8.86552125e-05 -8.90797389e-05 -4.93261692e-04 1.52245278e-05 -2.55275929e-05 -5.02954556e-05 2.63263767e-05 -5.03291766e-05 5.08769744e-05 5.00925978e-04 1.29836277e-04 1.39134686e-04 1.53594448e-04 -4.40698174e-04 -4.72469378e-04 -5.23382497e-04 -7.36601271e-06 2.94570796e-05 3.59280843e-05 -7.75388385e-06 3.88774620e-05 1.04470359e-04 6.62529264e-04 8.08285841e-05 1.78554592e-04 3.07818361e-04 -1.77060333e-04 -4.93261692e-04 -8.27232454e-04 3.04061079e-05 -5.02954556e-05 -1.00793375e-04 7.07246307e-05 -8.69387726e-05 4.82388176e-05 4.74951138e-04 1.23103792e-04 1.53594448e-04 1.22770250e-04 -4.17846365e-04 -5.23382497e-04 -4.16706558e-04 -6.98405806e-06 3.59280843e-05 2.56291883e-05 1.22702557e-05 3.58162249e-05 -7.82505410e-05 -4.96248635e-04 -1.33601047e-04 -1.82579539e-04 -1.69566300e-04 3.69076357e-04 5.27528724e-04 4.22200574e-04 -3.45457148e-05 2.63263767e-05 7.07246307e-05 -6.46717736e-05 6.17162441e-05 2.70494044e-06 2.66323804e-05 8.18221822e-06 -1.54496628e-05 3.09806382e-05 -2.78814101e-05 5.43725699e-05 -1.07205775e-04 5.61252736e-07 -7.75388385e-06 1.22702557e-05 -1.91511141e-05 2.58858726e-06 1.04579970e-04 6.63224388e-04 1.78554592e-04 8.12030661e-05 3.08141323e-04 -4.93261692e-04 -1.78094850e-04 -8.28100385e-04 4.61695186e-05 -5.03291766e-05 -8.69387726e-05 6.17162441e-05 -1.00975711e-04 5.07764306e-05 4.99936041e-04 1.53594448e-04 1.38859726e-04 1.29228604e-04 -5.23382497e-04 -4.71535677e-04 -4.38627493e-04 1.05356888e-05 3.88774620e-05 3.58162249e-05 2.58858726e-06 2.93032670e-05 6.73401779e-05 6.74330824e-04 6.50856373e-05 5.47604431e-05 3.26836198e-04 -2.21145496e-04 -1.86062945e-04 -1.11051157e-03 -5.08810733e-05 6.19844031e-06 3.69952204e-05 -9.02806542e-05 3.11262937e-05 1.69968586e-04 1.56386115e-03 3.25031918e-04 3.24690943e-04 6.50299618e-04 -1.06428280e-03 -1.06316632e-03 -2.12933765e-03 -4.51727960e-05 5.20923513e-05 1.04331940e-04 -7.83509303e-05 1.04222491e-04 6.74330824e-04 6.69899732e-03 6.42150613e-04 5.40279754e-04 3.22464484e-03 -2.17826892e-03 -1.83270805e-03 -1.09384676e-02 -4.60868631e-04 5.61439944e-05 3.35093886e-04 -8.17740640e-04 2.81934547e-04 1.56386115e-03 1.39379141e-02 2.89071600e-03 2.88768349e-03 5.78352895e-03 -9.33559857e-03 -9.32580505e-03 -1.86779693e-02 -2.87283852e-04 3.31289906e-04 6.63516196e-04 -4.98285673e-04 6.62820133e-04 -6.50856373e-05 -6.42150613e-04 1.91154560e-05 -5.46699404e-05 -3.26296035e-04 -6.99781451e-05 1.85001092e-04 1.10417393e-03 6.31367532e-05 3.75163964e-06 2.23915579e-05 8.81523563e-05 -3.03925149e-05 -3.25031918e-04 -2.89071600e-03 -4.13274076e-04 -6.40689538e-04 -1.28318997e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 1.33398645e-04 -4.04581339e-05 -8.10306217e-05 1.33945083e-04 -1.78173892e-04 -5.47604431e-05 -5.40279754e-04 -5.46699404e-05 3.80964323e-05 -2.74532388e-04 1.85001092e-04 -1.34209080e-04 9.29007628e-04 3.61397796e-05 6.56033613e-06 -3.03925149e-05 8.39718112e-05 3.29436018e-05 -3.24690943e-04 -2.88768349e-03 -6.40689538e-04 -4.11929137e-04 -1.28184384e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 4.90870753e-05 -4.03136771e-05 -1.78173892e-04 1.82401080e-04 -8.06565982e-05 -3.26836198e-04 -3.22464484e-03 -3.26296035e-04 -2.74532388e-04 -1.55444548e-03 1.10417393e-03 9.29007628e-04 5.25489489e-03 2.15699280e-04 -3.03925149e-05 -1.69744376e-04 3.84154156e-04 -1.42816106e-04 -6.50299618e-04 -5.78352895e-03 -1.28318997e-03 -1.28184384e-03 -2.33922250e-03 4.14963185e-03 4.14527867e-03 7.53700469e-03 9.83128941e-05 -1.78173892e-04 -3.08203844e-04 1.70656951e-04 -3.07880522e-04 2.21145496e-04 2.17826892e-03 -6.99781451e-05 1.85001092e-04 1.10417393e-03 2.55915557e-04 -6.26099004e-04 -3.73685467e-03 -2.09741069e-04 -1.37506092e-05 -8.20701323e-05 -2.90156812e-04 1.00038111e-04 1.06428280e-03 9.33559857e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -4.10290906e-03 -6.66159519e-03 -1.33420192e-02 -3.95548216e-04 8.90408852e-05 1.78333442e-04 -3.70593279e-04 4.92963575e-04 1.86062945e-04 1.83270805e-03 1.85001092e-04 -1.34209080e-04 9.29007628e-04 -6.26099004e-04 4.73292241e-04 -3.14403955e-03 -1.18146037e-04 -2.32598795e-05 1.00038111e-04 -2.77798335e-04 -1.16802583e-04 1.06316632e-03 9.32580505e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -6.66159519e-03 -4.08892500e-03 -1.33280228e-02 -1.22592413e-04 8.86171635e-05 4.92963575e-04 -5.27556042e-04 1.77298611e-04 1.11051157e-03 1.09384676e-02 1.10417393e-03 9.29007628e-04 5.25489489e-03 -3.73685467e-03 -3.14403955e-03 -1.77650467e-02 -7.05151368e-04 1.00038111e-04 5.57053744e-04 -1.25609045e-03 4.68682664e-04 2.12933765e-03 1.86779693e-02 4.14963185e-03 4.14527867e-03 7.53700469e-03 -1.33420192e-02 -1.33280228e-02 -2.41280351e-02 -2.45531331e-04 4.92963575e-04 8.29803722e-04 -4.26307571e-04 8.28933215e-04 -5.08810733e-05 -4.60868631e-04 -6.31367532e-05 -3.61397796e-05 -2.15699280e-04 2.09741069e-04 1.18146037e-04 7.05151368e-04 7.63653213e-06 -3.04233497e-06 -1.81580926e-05 1.45999588e-05 -5.03366541e-06 -4.51727960e-05 -2.87283852e-04 -1.33398645e-04 -4.90870753e-05 -9.83128941e-05 3.95548216e-04 1.22592413e-04 2.45531331e-04 -2.47997539e-05 1.49666512e-05 2.99756052e-05 -3.44119357e-05 4.57747934e-05 6.19844031e-06 5.61439944e-05 -3.75163964e-06 -6.56033613e-06 3.03925149e-05 1.37506092e-05 2.32598795e-05 -1.00038111e-04 -3.04233497e-06 1.04869733e-07 -4.19662545e-06 -5.36939620e-06 -5.58426235e-06 5.20923513e-05 3.31289906e-04 4.04581339e-05 4.03136771e-05 1.78173892e-04 -8.90408852e-05 -8.86171635e-05 -4.92963575e-04 1.49666512e-05 -2.52508823e-05 -4.97986593e-05 2.59656156e-05 -4.97656043e-05 3.69952204e-05 3.35093886e-04 -2.23915579e-05 3.03925149e-05 1.69744376e-04 8.20701323e-05 -1.00038111e-04 -5.57053744e-04 -1.81580926e-05 -4.19662545e-06 -2.42394415e-05 -1.79882458e-05 7.44764712e-06 1.04331940e-04 6.63516196e-04 8.10306217e-05 1.78173892e-04 3.08203844e-04 -1.78333442e-04 -4.92963575e-04 -8.29803722e-04 2.99756052e-05 -4.97986593e-05 -1.00124765e-04 7.03034607e-05 -8.59154247e-05 -9.02806542e-05 -8.17740640e-04 -8.81523563e-05 -8.39718112e-05 -3.84154156e-04 2.90156812e-04 2.77798335e-04 1.25609045e-03 1.45999588e-05 -5.36939620e-06 -1.79882458e-05 2.69691655e-05 -2.10488632e-05 -7.83509303e-05 -4.98285673e-04 -1.33945083e-04 -1.82401080e-04 -1.70656951e-04 3.70593279e-04 5.27556042e-04 4.26307571e-04 -3.44119357e-05 2.59656156e-05 7.03034607e-05 -6.46078809e-05 6.10898878e-05 3.11262937e-05 2.81934547e-04 3.03925149e-05 -3.29436018e-05 1.42816106e-04 -1.00038111e-04 1.16802583e-04 -4.68682664e-04 -5.03366541e-06 -5.58426235e-06 7.44764712e-06 -2.10488632e-05 -2.68252065e-05 1.04222491e-04 6.62820133e-04 1.78173892e-04 8.06565982e-05 3.07880522e-04 -4.92963575e-04 -1.77298611e-04 -8.28933215e-04 4.57747934e-05 -4.97656043e-05 -8.59154247e-05 6.10898878e-05 -9.99444110e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 -2 668 + 8.22431014e-06 9.03264335e-05 -1.15092237e-09 -3.29515519e-05 -3.29819549e-05 4.02255197e-09 1.15167916e-04 1.15274176e-04 -1.30567437e-05 7.89159811e-10 7.89887933e-10 -2.08561661e-08 2.26149339e-05 2.53728508e-06 2.74768469e-05 2.62885073e-06 -7.43187067e-06 -1.30984741e-05 -8.95691357e-06 2.53215683e-05 4.46285896e-05 -4.45304629e-06 -1.41504749e-06 -2.49398351e-06 -4.21304414e-06 7.05059541e-06 9.03264335e-05 9.92753883e-04 -1.26493700e-08 -3.62158546e-04 -3.62492694e-04 4.42375729e-08 1.26654648e-03 1.26771507e-03 -1.43999445e-04 8.70343917e-09 8.71146944e-09 -2.30017255e-07 2.49414248e-04 2.74768469e-05 2.96976367e-04 2.85738440e-05 -8.07794490e-05 -1.42371627e-04 -9.70938731e-05 2.74488430e-04 4.83778544e-04 -4.86517600e-05 -1.54601023e-05 -2.72480184e-05 -4.60296164e-05 7.70312846e-05 1.15092237e-09 1.26493700e-08 6.97476357e-06 -4.70251108e-09 -4.70684987e-09 -2.40384979e-05 1.64675606e-08 1.64827544e-08 -2.09658074e-09 -5.16093129e-06 -5.16569305e-06 3.27086392e-09 -2.62885073e-06 -2.85738440e-05 -1.18372102e-06 7.77826686e-06 1.37089881e-05 4.20986619e-06 -2.66257697e-05 -4.69272098e-05 5.06371399e-06 6.11117832e-07 1.07707890e-06 4.44944928e-06 -7.44622311e-06 3.29515519e-05 3.62158546e-04 -4.70251108e-09 -1.27660762e-04 -1.34759748e-04 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.10872854e-05 3.08758929e-09 3.27086392e-09 -5.24729515e-06 8.84809725e-05 7.43187067e-06 8.07794490e-05 7.77826686e-06 -2.04218256e-05 -3.87558813e-05 -2.66257697e-05 7.00637835e-05 1.32665180e-04 -1.27853552e-05 -3.91241332e-06 -7.44622311e-06 -1.34621105e-05 1.94939347e-05 3.29819549e-05 3.62492694e-04 -4.70684987e-09 -1.34759748e-04 -1.27909321e-04 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.11344213e-05 3.27086392e-09 3.09362226e-09 5.07924973e-06 8.85721378e-05 1.30984741e-05 1.42371627e-04 1.37089881e-05 -3.87558813e-05 -6.67385490e-05 -4.69272098e-05 1.32665180e-04 2.28610466e-04 -2.25338479e-05 -7.44622311e-06 -1.28113119e-05 -2.06129137e-05 3.62181131e-05 -4.02255197e-09 -4.42375729e-08 -2.40384979e-05 1.64675606e-08 1.64827544e-08 8.27387335e-05 -5.76693005e-08 -5.77225093e-08 7.38221994e-09 1.78886957e-05 1.79052008e-05 -1.15367526e-08 8.95691357e-06 9.70938731e-05 4.20986619e-06 -2.66257697e-05 -4.69272098e-05 -1.48585488e-05 9.08054378e-05 1.60042165e-04 -1.74106625e-05 -2.20417198e-06 -3.88479439e-06 -1.53338391e-05 2.56614201e-05 -1.15167916e-04 -1.26654648e-03 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.76693005e-08 -1.56836563e-03 -1.65262777e-03 1.80372960e-04 -1.09013067e-08 -1.15367526e-08 1.81933121e-05 -3.12398486e-04 -2.53215683e-05 -2.74488430e-04 -2.66257697e-05 7.00637835e-05 1.32665180e-04 9.08054378e-05 -2.39449006e-04 -4.52445877e-04 4.41179618e-05 1.35177948e-05 2.56614201e-05 4.62954524e-05 -6.73535714e-05 -1.15274176e-04 -1.26771507e-03 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.77225093e-08 -1.65262777e-03 -1.57141384e-03 1.80539382e-04 -1.15367526e-08 -1.09225858e-08 -1.76003043e-05 -3.12719748e-04 -4.46285896e-05 -4.83778544e-04 -4.69272098e-05 1.32665180e-04 2.28610466e-04 1.60042165e-04 -4.52445877e-04 -7.80162049e-04 7.77567323e-05 2.56614201e-05 4.41854731e-05 7.12098339e-05 -1.24914176e-04 -1.30567437e-05 -1.43999445e-04 2.09658074e-09 5.10872854e-05 5.11344213e-05 -7.38221994e-09 -1.80372960e-04 -1.80539382e-04 1.91984898e-05 -1.38221596e-09 -1.38349126e-09 3.03902675e-08 -3.29530311e-05 -4.45304629e-06 -4.86517600e-05 -5.06371399e-06 1.27853552e-05 2.25338479e-05 1.74106625e-05 -4.41179618e-05 -7.77567323e-05 7.35557721e-06 2.67547723e-06 4.71545734e-06 7.05032665e-06 -1.17988322e-05 7.89159811e-10 8.70343917e-09 5.16093129e-06 -3.08758929e-09 -3.27086392e-09 -1.78886957e-05 1.09013067e-08 1.15367526e-08 -1.38221596e-09 -3.66689421e-06 -3.84347757e-06 -1.36204331e-10 2.12570328e-09 -1.41504749e-06 -1.54601023e-05 -6.11117832e-07 3.91241332e-06 7.44622311e-06 2.20417198e-06 -1.35177948e-05 -2.56614201e-05 2.67547723e-06 2.82190927e-07 5.56555548e-07 2.61182921e-06 -3.76100082e-06 7.89887933e-10 8.71146944e-09 5.16569305e-06 -3.27086392e-09 -3.09362226e-09 -1.79052008e-05 1.15367526e-08 1.09225858e-08 -1.38349126e-09 -3.84347757e-06 -3.67398335e-06 1.32157773e-10 2.12791218e-09 -2.49398351e-06 -2.72480184e-05 -1.07707890e-06 7.44622311e-06 1.28113119e-05 3.88479439e-06 -2.56614201e-05 -4.41854731e-05 4.71545734e-06 5.56555548e-07 9.47324283e-07 3.97755186e-06 -7.00256377e-06 -2.08561661e-08 -2.30017255e-07 5.24729515e-06 -5.07924973e-06 -1.81933121e-05 1.76003043e-05 3.03902675e-08 -1.36204331e-10 1.32157773e-10 -7.51386306e-06 -5.97266014e-08 -4.21304414e-06 -4.60296164e-05 -4.44944928e-06 1.34621105e-05 2.06129137e-05 1.53338391e-05 -4.62954524e-05 -7.12098339e-05 7.05032665e-06 2.61182921e-06 3.97755186e-06 5.21621779e-06 -1.21291840e-05 2.26149339e-05 2.49414248e-04 -3.27086392e-09 -8.84809725e-05 -8.85721378e-05 1.15367526e-08 3.12398486e-04 3.12719748e-04 -3.29530311e-05 2.12570328e-09 2.12791218e-09 -5.97266014e-08 5.72493338e-05 7.05059541e-06 7.70312846e-05 7.44622311e-06 -1.94939347e-05 -3.62181131e-05 -2.56614201e-05 6.73535714e-05 1.24914176e-04 -1.17988322e-05 -3.76100082e-06 -7.00256377e-06 -1.21291840e-05 1.82668708e-05 1.71412701e-07 1.73538840e-06 -1.92824511e-07 -9.91475648e-07 -5.75833932e-07 5.99697641e-07 3.08355823e-06 1.79088358e-06 -3.89806755e-07 2.08149996e-07 1.20890342e-07 3.54630462e-07 6.21600594e-07 8.20974861e-06 9.01678303e-05 1.14892157e-09 -3.29264972e-05 -3.28961472e-05 -4.01550972e-09 1.15078934e-04 1.14972860e-04 -1.30380943e-05 -7.88714653e-10 -7.87987654e-10 2.08251874e-08 2.25826322e-05 1.73538840e-06 1.75619930e-05 -1.95355533e-06 -1.00448979e-05 -5.83392349e-06 6.07218762e-06 3.12223074e-05 1.81334399e-05 -3.95175721e-06 2.11016930e-06 1.22555414e-06 3.59514930e-06 6.30162149e-06 9.01678303e-05 9.91019828e-04 1.26276555e-08 -3.61891076e-04 -3.61557502e-04 -4.41608263e-08 1.26558797e-03 1.26442142e-03 -1.43798531e-04 -8.69881791e-09 -8.69079976e-09 2.29683210e-07 2.49066256e-04 1.92824511e-07 1.95355533e-06 -1.69260511e-07 -1.12085445e-06 -6.50975166e-07 5.28777415e-07 3.48920130e-06 2.02647489e-06 -4.54948622e-07 1.83283472e-07 1.06448245e-07 4.03011883e-07 7.06404137e-07 -1.14892157e-09 -1.26276555e-08 6.95938620e-06 4.69902220e-09 4.69469087e-09 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 2.09348108e-09 -5.15529041e-06 -5.15053852e-06 -3.26624168e-09 9.91475648e-07 1.00448979e-05 -1.12085445e-06 -5.71454500e-06 -3.34721982e-06 3.48920130e-06 1.77911560e-05 1.04198398e-05 -2.24702391e-06 1.20593361e-06 7.06404137e-07 2.01896466e-06 3.60129266e-06 3.29264972e-05 3.61891076e-04 4.69902220e-09 -1.27708066e-04 -1.34543323e-04 -1.64551990e-08 4.47598510e-04 4.71148476e-04 -5.10670363e-05 -3.08936886e-09 -3.26624168e-09 -5.06896926e-06 8.84554137e-05 5.75833932e-07 5.83392349e-06 -6.50975166e-07 -3.34721982e-06 -1.89528832e-06 2.02647489e-06 1.04198398e-05 5.90187334e-06 -1.30503721e-06 7.06404137e-07 3.99909849e-07 1.23445365e-06 2.05627840e-06 3.28961472e-05 3.61557502e-04 4.69469087e-09 -1.34543323e-04 -1.27459921e-04 -1.64400314e-08 4.71148476e-04 4.46729545e-04 -5.10199652e-05 -3.26624168e-09 -3.08334476e-09 5.23678033e-06 8.83643803e-05 -5.99697641e-07 -6.07218762e-06 5.28777415e-07 3.48920130e-06 2.02647489e-06 -1.65030369e-06 -1.08529578e-05 -6.30323233e-06 1.41694328e-06 -5.73137481e-07 -3.32869506e-07 -1.25560500e-06 -2.20083974e-06 4.01550972e-09 4.41608263e-08 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 8.25501551e-05 5.76252238e-08 5.75721076e-08 -7.37124160e-09 1.78684916e-05 1.78520213e-05 1.15203707e-08 -3.08355823e-06 -3.12223074e-05 3.48920130e-06 1.77911560e-05 1.04198398e-05 -1.08529578e-05 -5.53439288e-05 -3.24103058e-05 7.00193985e-06 -3.75756043e-06 -2.20083974e-06 -6.29230005e-06 -1.12212435e-05 -1.15078934e-04 -1.26558797e-03 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.76252238e-08 -1.56890876e-03 -1.64993668e-03 1.80300415e-04 1.09075048e-08 1.15203707e-08 1.75640280e-05 -3.12305810e-04 -1.79088358e-06 -1.81334399e-05 2.02647489e-06 1.04198398e-05 5.90187334e-06 -6.30323233e-06 -3.24103058e-05 -1.83630062e-05 4.06661985e-06 -2.20083974e-06 -1.24635043e-06 -3.84478182e-06 -6.40855300e-06 -1.14972860e-04 -1.26442142e-03 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.75721076e-08 -1.64993668e-03 -1.56586569e-03 1.80134223e-04 1.15203707e-08 1.08862571e-08 -1.81562050e-05 -3.11985016e-04 -3.89806755e-07 -3.95175721e-06 4.54948622e-07 2.24702391e-06 1.30503721e-06 -1.41694328e-06 -7.00193985e-06 -4.06661985e-06 8.76588837e-07 -4.89932488e-07 -2.84545315e-07 -8.01140151e-07 -1.40424822e-06 -1.30380943e-05 -1.43798531e-04 -2.09348108e-09 5.10670363e-05 5.10199652e-05 7.37124160e-09 -1.80300415e-04 -1.80134223e-04 1.91798739e-05 1.38189198e-09 1.38061822e-09 -3.03594982e-08 -3.29215468e-05 2.08149996e-07 2.11016930e-06 -1.83283472e-07 -1.20593361e-06 -7.06404137e-07 5.73137481e-07 3.75756043e-06 2.20083974e-06 -4.89932488e-07 1.97808579e-07 1.15932561e-07 4.28369337e-07 7.64184156e-07 -7.88714653e-10 -8.69881791e-09 5.15529041e-06 3.08936886e-09 3.26624168e-09 -1.78684916e-05 -1.09075048e-08 -1.15203707e-08 1.38189198e-09 -3.66746168e-06 -3.83652398e-06 1.31909688e-10 -2.12564295e-09 1.20890342e-07 1.22555414e-06 -1.06448245e-07 -7.06404137e-07 -3.99909849e-07 3.32869506e-07 2.20083974e-06 1.24635043e-06 -2.84545315e-07 1.15932561e-07 6.55267948e-08 2.62004569e-07 4.36287648e-07 -7.87987654e-10 -8.69079976e-09 5.15053852e-06 3.26624168e-09 3.08334476e-09 -1.78520213e-05 -1.15203707e-08 -1.08862571e-08 1.38061822e-09 -3.83652398e-06 -3.66038577e-06 -1.35951600e-10 -2.12343673e-09 3.54630462e-07 3.59514930e-06 -4.03011883e-07 -2.01896466e-06 -1.23445365e-06 1.25560500e-06 6.29230005e-06 3.84478182e-06 -8.01140151e-07 4.28369337e-07 2.62004569e-07 6.71387638e-07 1.31321674e-06 2.08251874e-08 2.29683210e-07 5.06896926e-06 -5.23678033e-06 -1.75640280e-05 1.81562050e-05 -3.03594982e-08 1.31909688e-10 -1.35951600e-10 -7.50039447e-06 5.96600777e-08 6.21600594e-07 6.30162149e-06 -7.06404137e-07 -3.60129266e-06 -2.05627840e-06 2.20083974e-06 1.12212435e-05 6.40855300e-06 -1.40424822e-06 7.64184156e-07 4.36287648e-07 1.31321674e-06 2.22400431e-06 2.25826322e-05 2.49066256e-04 3.26624168e-09 -8.84554137e-05 -8.83643803e-05 -1.15203707e-08 3.12305810e-04 3.11985016e-04 -3.29215468e-05 -2.12564295e-09 -2.12343673e-09 5.96600777e-08 5.71943630e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 360 386 411 437 463 488 514 540 566 592 618 642 668 +0 0 -1 676 + 3.91473712e-02 1.43350481e-01 -4.90810225e-06 -7.02264377e-02 -7.03560908e-02 1.04047658e-05 1.48874167e-01 1.49149021e-01 1.22216249e-02 -1.47672879e-06 -1.47945515e-06 3.90454712e-05 -2.11684393e-02 1.54133804e-02 7.31058106e-02 1.41049760e-02 -1.17750819e-02 -4.21789782e-02 -3.41760352e-02 2.85307548e-02 1.02198702e-01 2.23028207e-03 8.44296723e-04 3.02431639e-03 4.16948288e-03 -2.52475247e-03 1.43350481e-01 2.06969368e-01 -1.00223895e-05 -1.43403025e-01 -1.43667778e-01 1.05066413e-05 1.50331830e-01 1.50609375e-01 2.77227826e-02 -3.34972080e-06 -3.35590511e-06 8.85683466e-05 -4.80171865e-02 7.31058106e-02 1.65470878e-01 4.36363495e-02 -3.64283914e-02 -1.30488462e-01 -6.13236664e-02 5.11940744e-02 1.83379935e-01 2.04508337e-02 7.74187809e-03 2.77318248e-02 3.82325636e-02 -2.31510147e-02 4.90810225e-06 1.00223895e-05 4.36040271e-02 -7.88916809e-06 -7.90373318e-06 -8.47198876e-02 1.22003699e-05 1.22228944e-05 3.46994451e-06 1.47246794e-02 1.47518643e-02 7.28934677e-09 -3.95190762e-06 -1.41049760e-02 -4.36363495e-02 6.19677745e-03 9.87567457e-03 3.53751989e-02 -1.82241193e-02 -1.89358984e-02 -6.78294092e-02 -6.75404693e-03 -2.17045510e-05 -7.77468721e-05 -8.32409476e-03 5.04050008e-03 7.02264377e-02 1.43403025e-01 -7.88916809e-06 -6.92762962e-02 -1.13088725e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 2.41449995e-02 -2.91552205e-06 -3.95190762e-06 1.48289776e-02 -4.17930850e-02 1.17750819e-02 3.64283914e-02 9.87567457e-03 9.78213046e-03 -2.95318377e-02 -1.89358984e-02 -2.50987768e-02 5.66251827e-02 2.75647652e-03 -5.85949630e-04 5.04050008e-03 8.61297819e-03 1.75220125e-03 7.03560908e-02 1.43667778e-01 -7.90373318e-06 -1.13088725e-01 -6.96934836e-02 1.22228944e-05 1.74888437e-01 9.04914302e-02 2.41895763e-02 -3.95190762e-06 -2.93010075e-06 -1.46473741e-02 -4.19246640e-02 4.21789782e-02 1.30488462e-01 3.53751989e-02 -2.95318377e-02 -8.77581179e-02 -6.78294092e-02 5.66251827e-02 1.61927661e-01 9.87384755e-03 5.04050008e-03 1.60622399e-02 1.89319537e-02 -1.34090401e-02 -1.04047658e-05 -1.05066413e-05 -8.47198876e-02 1.22003699e-05 1.22228944e-05 1.23319846e-01 -1.10830618e-05 -1.11035236e-05 -6.32201299e-06 -3.71628842e-02 -3.72314949e-02 -1.06159769e-08 5.75543479e-06 3.41760352e-02 6.13236664e-02 -1.82241193e-02 -1.89358984e-02 -6.78294092e-02 4.85918996e-02 2.39904064e-02 8.59349296e-02 2.18924565e-02 -1.26669767e-03 -4.53737935e-03 2.47123857e-02 -1.49641235e-02 -1.48874167e-01 -1.50331830e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -1.10830618e-05 -3.52595621e-02 -1.58872180e-01 -2.60890459e-02 3.14752702e-06 5.75543479e-06 -3.73147809e-02 4.51188027e-02 -2.85307548e-02 -5.11940744e-02 -1.89358984e-02 -2.50987768e-02 5.66251827e-02 2.39904064e-02 5.73015908e-02 -7.17399893e-02 -7.41483526e-03 3.33407451e-03 -1.49641235e-02 -2.69011500e-02 -9.97008826e-03 -1.49149021e-01 -1.50609375e-01 1.22228944e-05 1.74888437e-01 9.04914302e-02 -1.11035236e-05 -1.58872180e-01 -3.58456459e-02 -2.61372119e-02 5.75543479e-06 3.16875898e-06 3.70793186e-02 4.53394497e-02 -1.02198702e-01 -1.83379935e-01 -6.78294092e-02 5.66251827e-02 1.61927661e-01 8.59349296e-02 -7.17399893e-02 -1.79647307e-01 -2.65603397e-02 -1.49641235e-02 -4.60906969e-02 -5.14365668e-02 3.84773237e-02 1.22216249e-02 2.77227826e-02 -3.46994451e-06 -2.41449995e-02 -2.41895763e-02 6.32201299e-06 2.60890459e-02 2.61372119e-02 1.64208833e-02 -2.92991674e-06 -2.93532599e-06 5.22726833e-05 -2.83395511e-02 2.23028207e-03 2.04508337e-02 6.75404693e-03 -2.75647652e-03 -9.87384755e-03 -2.18924565e-02 7.41483526e-03 2.65603397e-02 1.73550513e-03 4.03677944e-04 1.44599616e-03 3.52598102e-03 -2.13509194e-03 -1.47672879e-06 -3.34972080e-06 -1.47246794e-02 2.91552205e-06 3.95190762e-06 3.71628842e-02 -3.14752702e-06 -5.75543479e-06 -2.92991674e-06 -7.81299182e-03 -7.88653339e-03 -5.58517128e-07 3.97339830e-06 8.44296723e-04 7.74187809e-03 2.17045510e-05 5.85949630e-04 -5.04050008e-03 1.26669767e-03 -3.33407451e-03 1.49641235e-02 4.03677944e-04 -2.36334980e-05 1.22341272e-03 7.68886655e-04 -1.21583046e-03 -1.47945515e-06 -3.35590511e-06 -1.47518643e-02 3.95190762e-06 2.93010075e-06 3.72314949e-02 -5.75543479e-06 -3.16875898e-06 -2.93532599e-06 -7.88653339e-03 -7.84208546e-03 5.42826137e-07 3.98276739e-06 3.02431639e-03 2.77318248e-02 7.77468721e-05 -5.04050008e-03 -1.60622399e-02 4.53737935e-03 1.49641235e-02 4.60906969e-02 1.44599616e-03 1.22341272e-03 4.01715739e-03 4.03771116e-03 -2.23551494e-03 3.90454712e-05 8.85683466e-05 -7.28934677e-09 -1.48289776e-02 1.46473741e-02 1.06159769e-08 3.73147809e-02 -3.70793186e-02 5.22726833e-05 -5.58517128e-07 5.42826137e-07 -1.57138654e-02 -1.19632376e-04 4.16948288e-03 3.82325636e-02 8.32409476e-03 -8.61297819e-03 -1.89319537e-02 -2.47123857e-02 2.69011500e-02 5.14365668e-02 3.52598102e-03 7.68886655e-04 4.03771116e-03 6.17071426e-03 -2.83500067e-03 -2.11684393e-02 -4.80171865e-02 3.95190762e-06 4.17930850e-02 4.19246640e-02 -5.75543479e-06 -4.51188027e-02 -4.53394497e-02 -2.83395511e-02 3.97339830e-06 3.98276739e-06 -1.19632376e-04 4.91444137e-02 -2.52475247e-03 -2.31510147e-02 -5.04050008e-03 -1.75220125e-03 1.34090401e-02 1.49641235e-02 9.97008826e-03 -3.84773237e-02 -2.13509194e-03 -1.21583046e-03 -2.23551494e-03 -2.83500067e-03 3.20555609e-03 9.96821438e-03 5.17518379e-02 -9.15959454e-03 -2.88493403e-02 -9.10543130e-03 2.31476366e-02 7.29065072e-02 2.30107582e-02 1.16023552e-03 -1.42101146e-03 -4.48499762e-04 -2.01490685e-03 -1.41260863e-03 3.91223307e-02 1.43289601e-01 4.90502288e-06 -7.03199719e-02 -7.01904001e-02 -1.03994747e-05 1.49090185e-01 1.48815471e-01 1.22107648e-02 1.47797156e-06 1.47524824e-06 -3.90063207e-05 -2.11496292e-02 5.17518379e-02 1.44484911e-01 -3.30099421e-02 -1.03969128e-01 -3.28147451e-02 5.37604087e-02 1.69325434e-01 5.34425084e-02 1.72356190e-02 -2.11095177e-02 -6.66258781e-03 -2.99319976e-02 -2.09846912e-02 1.43289601e-01 2.06947327e-01 1.00196061e-05 -1.43644268e-01 -1.43379588e-01 -1.05056493e-05 1.50612337e-01 1.50334819e-01 2.77291004e-02 3.35628623e-06 3.35010193e-06 -8.85784145e-05 -4.80281294e-02 9.15959454e-03 3.30099421e-02 4.06067855e-03 -2.46216769e-02 -7.77109582e-03 -1.24677299e-02 5.10345875e-02 1.61075410e-02 4.08002140e-03 -3.43324754e-04 -1.08360189e-04 -5.04073277e-03 -3.53395126e-03 -4.90502288e-06 -1.00196061e-05 4.35782022e-02 7.89988685e-06 7.88533050e-06 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 -3.46730911e-06 1.47406117e-02 1.47134507e-02 7.28342405e-09 3.94914759e-06 2.88493403e-02 1.03969128e-01 -2.46216769e-02 -6.56711894e-02 -2.44760821e-02 5.10345875e-02 1.32069018e-01 5.07328058e-02 7.28782311e-03 -1.01771612e-02 -3.53395126e-03 -1.26647987e-02 -1.01169808e-02 7.03199719e-02 1.43644268e-01 7.89988685e-06 -6.96770937e-02 -1.13046612e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 2.41769599e-02 2.92823710e-06 3.94914759e-06 1.46361945e-02 -4.19027880e-02 9.10543130e-03 3.28147451e-02 -7.77109582e-03 -2.44760821e-02 4.15285721e-03 1.61075410e-02 5.07328058e-02 -1.26587933e-02 2.30018337e-03 -3.53395126e-03 -9.56956539e-05 -6.02458615e-03 -3.01405971e-04 7.01904001e-02 1.43379588e-01 7.88533050e-06 -1.13046612e-01 -6.92601093e-02 -1.21967065e-05 1.74855873e-01 8.98537365e-02 2.41324114e-02 3.94914759e-06 2.91367025e-06 -1.48176760e-02 -4.17713057e-02 -2.31476366e-02 -5.37604087e-02 -1.24677299e-02 5.10345875e-02 1.61075410e-02 3.61214740e-02 -7.67562619e-02 -2.42258181e-02 -1.52940199e-02 -1.18263656e-03 -3.73263854e-04 1.78101569e-02 1.24863248e-02 1.03994747e-05 1.05056493e-05 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 1.23283559e-01 1.11022440e-05 1.10817869e-05 6.32037199e-06 -3.72168976e-02 -3.71483216e-02 -1.06143713e-08 -5.75522155e-06 -7.29065072e-02 -1.69325434e-01 5.10345875e-02 1.32069018e-01 5.07328058e-02 -7.67562619e-02 -1.81262482e-01 -7.63023807e-02 -2.43665324e-02 3.51978052e-02 1.24863248e-02 4.23521815e-02 3.49896708e-02 -1.49090185e-01 -1.50612337e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 1.11022440e-05 -3.58817490e-02 -1.58872031e-01 -2.61493097e-02 -3.16985866e-06 -5.75522155e-06 -3.70647269e-02 4.53603689e-02 -2.30107582e-02 -5.34425084e-02 1.61075410e-02 5.07328058e-02 -1.26587933e-02 -2.42258181e-02 -7.63023807e-02 3.64088341e-02 -7.69056708e-03 1.24863248e-02 -4.22508578e-04 2.20424817e-02 -1.33074600e-03 -1.48815471e-01 -1.50334819e-01 -1.21967065e-05 1.74855873e-01 8.98537365e-02 1.10817869e-05 -1.58872031e-01 -3.52957328e-02 -2.61011269e-02 -5.75522155e-06 -3.14862992e-06 3.73002126e-02 4.51397623e-02 1.16023552e-03 1.72356190e-02 -4.08002140e-03 -7.28782311e-03 -2.30018337e-03 1.52940199e-02 2.43665324e-02 7.69056708e-03 6.05837711e-04 8.53255114e-04 2.69304454e-04 -8.50497520e-04 -5.96265845e-04 1.22107648e-02 2.77291004e-02 3.46730911e-06 -2.41769599e-02 -2.41324114e-02 -6.32037199e-06 2.61493097e-02 2.61011269e-02 1.64085910e-02 2.93214608e-06 2.92674330e-06 -5.22331965e-05 -2.83213775e-02 -1.42101146e-03 -2.11095177e-02 3.43324754e-04 1.01771612e-02 3.53395126e-03 1.18263656e-03 -3.51978052e-02 -1.24863248e-02 8.53255114e-04 2.04024475e-03 6.91366889e-04 1.98285484e-04 -1.84358829e-04 1.47797156e-06 3.35628623e-06 -1.47406117e-02 -2.92823710e-06 -3.94914759e-06 3.72168976e-02 3.16985866e-06 5.75522155e-06 2.93214608e-06 -7.83085215e-03 -7.87352594e-03 5.41863474e-07 -3.97920169e-06 -4.48499762e-04 -6.66258781e-03 1.08360189e-04 3.53395126e-03 9.56956539e-05 3.73263854e-04 -1.24863248e-02 4.22508578e-04 2.69304454e-04 6.91366889e-04 6.79505792e-05 -4.66982868e-04 6.97170953e-04 1.47524824e-06 3.35010193e-06 -1.47134507e-02 -3.94914759e-06 -2.91367025e-06 3.71483216e-02 5.75522155e-06 3.14862992e-06 2.92674330e-06 -7.87352594e-03 -7.80180981e-03 -5.57537750e-07 -3.96984382e-06 -2.01490685e-03 -2.99319976e-02 5.04073277e-03 1.26647987e-02 6.02458615e-03 -1.78101569e-02 -4.23521815e-02 -2.20424817e-02 -8.50497520e-04 1.98285484e-04 -4.66982868e-04 1.58052413e-03 -6.36855308e-04 -3.90063207e-05 -8.85784145e-05 -7.28342405e-09 -1.46361945e-02 1.48176760e-02 1.06143713e-08 3.70647269e-02 -3.73002126e-02 -5.22331965e-05 5.41863474e-07 -5.57537750e-07 -1.56896505e-02 1.19512681e-04 -1.41260863e-03 -2.09846912e-02 3.53395126e-03 1.01169808e-02 3.01405971e-04 -1.24863248e-02 -3.49896708e-02 1.33074600e-03 -5.96265845e-04 -1.84358829e-04 6.97170953e-04 -6.36855308e-04 2.04243156e-03 -2.11496292e-02 -4.80281294e-02 -3.94914759e-06 4.19027880e-02 4.17713057e-02 5.75522155e-06 -4.53603689e-02 -4.51397623e-02 -2.83213775e-02 -3.97920169e-06 -3.96984382e-06 1.19512681e-04 4.91111366e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 0 668 + 9.99996115e-01 3.73073662e-06 -1.21500210e-04 1.70414694e-03 -1.50541854e-03 2.52688712e-05 -3.54418066e-04 3.13087748e-04 4.86977957e-09 6.79433204e-10 -6.00201379e-10 -1.04649914e-09 8.41835040e-09 2.26798423e-01 3.28863755e-01 2.01365024e-01 2.33061202e-01 -2.00989966e-01 -2.22890693e-01 -2.57975153e-01 2.22475542e-01 9.11574578e-03 -1.08817759e-01 9.38434947e-02 -1.61388427e-02 1.08615077e-01 3.73073662e-06 9.99992628e-01 7.58923902e-05 -1.06445729e-03 9.40326039e-04 5.88464601e-05 -8.25373180e-04 7.29122625e-04 7.67480036e-07 1.07079060e-07 -9.45920794e-08 -1.64928861e-07 1.32673682e-06 3.28863755e-01 2.58777893e-01 6.51652915e-02 7.54227365e-02 -6.50439160e-02 -7.78103478e-02 -9.00582078e-02 7.76654199e-02 -5.96907797e-03 7.12549147e-02 -6.14496225e-02 1.05678693e-02 -7.11221969e-02 1.21500210e-04 -7.58923902e-05 9.99996147e-01 3.05943878e-07 -2.70266358e-07 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 1.56786977e-04 -1.90444895e-03 1.68236241e-03 7.97540218e-10 -2.01365024e-01 -6.51652915e-02 4.77335500e-02 -1.93468864e-01 1.66845876e-01 -1.61821489e-01 9.36561562e-02 -8.07682596e-02 -1.12023995e-01 2.24822025e-02 -1.93884571e-02 1.84393514e-02 -1.24097596e-01 -1.70414694e-03 1.06445729e-03 3.05943878e-07 9.99991878e-01 3.79072255e-06 2.23230424e-07 -5.92604429e-06 2.76588179e-06 1.09952768e-03 1.35780203e-04 7.97540218e-10 -1.90444762e-03 1.68235129e-03 -2.33061202e-01 -7.54227365e-02 -1.93468864e-01 -9.03136509e-03 1.93108513e-01 9.36561562e-02 -1.34342216e-01 -9.34817143e-02 4.67468125e-02 5.59035544e-02 -1.24097596e-01 -8.05051400e-02 -5.57994297e-02 1.50541854e-03 -9.40326039e-04 -2.70266358e-07 3.79072255e-06 9.99992820e-01 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -9.71306709e-04 7.97540218e-10 1.35780401e-04 -1.68236370e-03 -1.90443913e-03 2.00989966e-01 6.50439160e-02 1.66845876e-01 1.93108513e-01 4.83556569e-02 -8.07682596e-02 -9.34817143e-02 -1.62122644e-01 -4.03140470e-02 -1.24097596e-01 1.90248516e-02 -1.06236950e-01 2.20194883e-02 -2.52688712e-05 -5.88464601e-05 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 9.99993865e-01 4.87107188e-07 -4.30303383e-07 1.69677373e-04 -2.06102250e-03 1.82067721e-03 -1.52805337e-10 1.22921159e-09 2.22890693e-01 7.78103478e-02 -1.61821489e-01 9.36561562e-02 -8.07682596e-02 1.69962550e-01 -8.95475299e-02 7.72250158e-02 3.49609317e-02 7.47228609e-02 -6.44403493e-02 5.42910408e-03 -3.65380946e-02 3.54418066e-04 8.25373180e-04 2.23230424e-07 -5.92604429e-06 2.76588179e-06 4.87107188e-07 9.99987068e-01 6.03538209e-06 1.18992198e-03 1.46942909e-04 1.22921159e-09 -2.06102046e-03 1.82066005e-03 2.57975153e-01 9.00582078e-02 9.36561562e-02 -1.34342216e-01 -9.34817143e-02 -8.95475299e-02 1.43688772e-01 8.93807407e-02 -2.55558484e-02 7.53010977e-02 -3.65380946e-02 4.44002650e-02 -7.51608435e-02 -3.13087748e-04 -7.29122625e-04 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -4.30303383e-07 6.03538209e-06 9.99988568e-01 -1.05115972e-03 1.22921159e-09 1.46943214e-04 -1.82067919e-03 -2.06100737e-03 -2.22475542e-01 -7.76654199e-02 -8.07682596e-02 -9.34817143e-02 -1.62122644e-01 7.72250158e-02 8.93807407e-02 1.70250494e-01 2.20391428e-02 -3.65380946e-02 6.44428895e-02 2.74524208e-02 7.45866238e-02 4.86977957e-09 7.67480036e-07 -1.56786977e-04 -1.09952768e-03 9.71306709e-04 -1.69677373e-04 -1.18992198e-03 1.05115972e-03 9.99985971e-01 3.86777936e-07 -3.41673985e-07 1.19145002e-06 -9.58437846e-06 9.11574578e-03 -5.96907797e-03 1.12023995e-01 -4.67468125e-02 4.03140470e-02 -3.49609317e-02 2.55558484e-02 -2.20391428e-02 -1.10598484e-01 -6.43050153e-02 5.54560894e-02 1.30749081e-02 -8.79946713e-02 6.79433204e-10 1.07079060e-07 1.90444895e-03 -1.35780203e-04 -7.97540218e-10 2.06102250e-03 -1.46942909e-04 -1.22921159e-09 3.86777936e-07 9.99982167e-01 8.30036538e-06 6.69909830e-07 -5.91781293e-07 -1.08817759e-01 7.12549147e-02 -2.24822025e-02 -5.59035544e-02 1.24097596e-01 -7.47228609e-02 -7.53010977e-02 3.65380946e-02 -6.43050153e-02 3.19193131e-02 -5.09491741e-02 -6.41530090e-02 -8.47478822e-02 -6.00201379e-10 -9.45920794e-08 -1.68236241e-03 -7.97540218e-10 -1.35780401e-04 -1.82067721e-03 -1.22921159e-09 -1.46943214e-04 -3.41673985e-07 8.30036538e-06 9.99984231e-01 5.91790365e-07 6.69903625e-07 9.38434947e-02 -6.14496225e-02 1.93884571e-02 1.24097596e-01 -1.90248516e-02 6.44403493e-02 3.65380946e-02 -6.44428895e-02 5.54560894e-02 -5.09491741e-02 1.67784924e-02 -9.64991144e-02 5.05266756e-02 -1.04649914e-09 -1.64928861e-07 1.90444762e-03 1.68236370e-03 1.52805337e-10 2.06102046e-03 1.82067919e-03 1.19145002e-06 6.69909830e-07 5.91790365e-07 9.99974882e-01 -1.61388427e-02 1.05678693e-02 -1.84393514e-02 8.05051400e-02 1.06236950e-01 -5.42910408e-03 -4.44002650e-02 -2.74524208e-02 1.30749081e-02 -6.41530090e-02 -9.64991144e-02 -1.25216896e-01 -2.38275950e-02 8.41835040e-09 1.32673682e-06 -7.97540218e-10 -1.68235129e-03 1.90443913e-03 -1.22921159e-09 -1.82066005e-03 2.06100737e-03 -9.58437846e-06 -5.91781293e-07 6.69903625e-07 9.99974883e-01 1.08615077e-01 -7.11221969e-02 1.24097596e-01 5.57994297e-02 -2.20194883e-02 3.65380946e-02 7.51608435e-02 -7.45866238e-02 -8.79946713e-02 -8.47478822e-02 5.05266756e-02 -2.38275950e-02 3.16033194e-02 2.26798423e-01 3.28863755e-01 -2.01365024e-01 -2.33061202e-01 2.00989966e-01 2.22890693e-01 2.57975153e-01 -2.22475542e-01 9.11574578e-03 -1.08817759e-01 9.38434947e-02 -1.61388427e-02 1.08615077e-01 9.99996115e-01 3.73073662e-06 1.21500210e-04 -1.70414694e-03 1.50541854e-03 -2.52688712e-05 3.54418066e-04 -3.13087748e-04 4.86977957e-09 6.79433204e-10 -6.00201379e-10 -1.04649914e-09 8.41835040e-09 3.28863755e-01 2.58777893e-01 -6.51652915e-02 -7.54227365e-02 6.50439160e-02 7.78103478e-02 9.00582078e-02 -7.76654199e-02 -5.96907797e-03 7.12549147e-02 -6.14496225e-02 1.05678693e-02 -7.11221969e-02 3.73073662e-06 9.99992628e-01 -7.58923902e-05 1.06445729e-03 -9.40326039e-04 -5.88464601e-05 8.25373180e-04 -7.29122625e-04 7.67480036e-07 1.07079060e-07 -9.45920794e-08 -1.64928861e-07 1.32673682e-06 2.01365024e-01 6.51652915e-02 4.77335500e-02 -1.93468864e-01 1.66845876e-01 -1.61821489e-01 9.36561562e-02 -8.07682596e-02 1.12023995e-01 -2.24822025e-02 1.93884571e-02 -1.84393514e-02 1.24097596e-01 -1.21500210e-04 7.58923902e-05 9.99996147e-01 3.05943878e-07 -2.70266358e-07 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 -1.56786977e-04 1.90444895e-03 -1.68236241e-03 -7.97540218e-10 2.33061202e-01 7.54227365e-02 -1.93468864e-01 -9.03136509e-03 1.93108513e-01 9.36561562e-02 -1.34342216e-01 -9.34817143e-02 -4.67468125e-02 -5.59035544e-02 1.24097596e-01 8.05051400e-02 5.57994297e-02 1.70414694e-03 -1.06445729e-03 3.05943878e-07 9.99991878e-01 3.79072255e-06 2.23230424e-07 -5.92604429e-06 2.76588179e-06 -1.09952768e-03 -1.35780203e-04 -7.97540218e-10 1.90444762e-03 -1.68235129e-03 -2.00989966e-01 -6.50439160e-02 1.66845876e-01 1.93108513e-01 4.83556569e-02 -8.07682596e-02 -9.34817143e-02 -1.62122644e-01 4.03140470e-02 1.24097596e-01 -1.90248516e-02 1.06236950e-01 -2.20194883e-02 -1.50541854e-03 9.40326039e-04 -2.70266358e-07 3.79072255e-06 9.99992820e-01 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 9.71306709e-04 -7.97540218e-10 -1.35780401e-04 1.68236370e-03 1.90443913e-03 -2.22890693e-01 -7.78103478e-02 -1.61821489e-01 9.36561562e-02 -8.07682596e-02 1.69962550e-01 -8.95475299e-02 7.72250158e-02 -3.49609317e-02 -7.47228609e-02 6.44403493e-02 -5.42910408e-03 3.65380946e-02 2.52688712e-05 5.88464601e-05 -2.81095756e-06 2.23230424e-07 -1.97198499e-07 9.99993865e-01 4.87107188e-07 -4.30303383e-07 -1.69677373e-04 2.06102250e-03 -1.82067721e-03 1.52805337e-10 -1.22921159e-09 -2.57975153e-01 -9.00582078e-02 9.36561562e-02 -1.34342216e-01 -9.34817143e-02 -8.95475299e-02 1.43688772e-01 8.93807407e-02 2.55558484e-02 -7.53010977e-02 3.65380946e-02 -4.44002650e-02 7.51608435e-02 -3.54418066e-04 -8.25373180e-04 2.23230424e-07 -5.92604429e-06 2.76588179e-06 4.87107188e-07 9.99987068e-01 6.03538209e-06 -1.18992198e-03 -1.46942909e-04 -1.22921159e-09 2.06102046e-03 -1.82066005e-03 2.22475542e-01 7.76654199e-02 -8.07682596e-02 -9.34817143e-02 -1.62122644e-01 7.72250158e-02 8.93807407e-02 1.70250494e-01 -2.20391428e-02 3.65380946e-02 -6.44428895e-02 -2.74524208e-02 -7.45866238e-02 3.13087748e-04 7.29122625e-04 -1.97198499e-07 2.76588179e-06 -5.23838156e-06 -4.30303383e-07 6.03538209e-06 9.99988568e-01 1.05115972e-03 -1.22921159e-09 -1.46943214e-04 1.82067919e-03 2.06100737e-03 9.11574578e-03 -5.96907797e-03 -1.12023995e-01 4.67468125e-02 -4.03140470e-02 3.49609317e-02 -2.55558484e-02 2.20391428e-02 -1.10598484e-01 -6.43050153e-02 5.54560894e-02 1.30749081e-02 -8.79946713e-02 4.86977957e-09 7.67480036e-07 1.56786977e-04 1.09952768e-03 -9.71306709e-04 1.69677373e-04 1.18992198e-03 -1.05115972e-03 9.99985971e-01 3.86777936e-07 -3.41673985e-07 1.19145002e-06 -9.58437846e-06 -1.08817759e-01 7.12549147e-02 2.24822025e-02 5.59035544e-02 -1.24097596e-01 7.47228609e-02 7.53010977e-02 -3.65380946e-02 -6.43050153e-02 3.19193131e-02 -5.09491741e-02 -6.41530090e-02 -8.47478822e-02 6.79433204e-10 1.07079060e-07 -1.90444895e-03 1.35780203e-04 7.97540218e-10 -2.06102250e-03 1.46942909e-04 1.22921159e-09 3.86777936e-07 9.99982167e-01 8.30036538e-06 6.69909830e-07 -5.91781293e-07 9.38434947e-02 -6.14496225e-02 -1.93884571e-02 -1.24097596e-01 1.90248516e-02 -6.44403493e-02 -3.65380946e-02 6.44428895e-02 5.54560894e-02 -5.09491741e-02 1.67784924e-02 -9.64991144e-02 5.05266756e-02 -6.00201379e-10 -9.45920794e-08 1.68236241e-03 7.97540218e-10 1.35780401e-04 1.82067721e-03 1.22921159e-09 1.46943214e-04 -3.41673985e-07 8.30036538e-06 9.99984231e-01 5.91790365e-07 6.69903625e-07 -1.61388427e-02 1.05678693e-02 1.84393514e-02 -8.05051400e-02 -1.06236950e-01 5.42910408e-03 4.44002650e-02 2.74524208e-02 1.30749081e-02 -6.41530090e-02 -9.64991144e-02 -1.25216896e-01 -2.38275950e-02 -1.04649914e-09 -1.64928861e-07 -1.90444762e-03 -1.68236370e-03 -1.52805337e-10 -2.06102046e-03 -1.82067919e-03 1.19145002e-06 6.69909830e-07 5.91790365e-07 9.99974882e-01 1.08615077e-01 -7.11221969e-02 -1.24097596e-01 -5.57994297e-02 2.20194883e-02 -3.65380946e-02 -7.51608435e-02 7.45866238e-02 -8.79946713e-02 -8.47478822e-02 5.05266756e-02 -2.38275950e-02 3.16033194e-02 8.41835040e-09 1.32673682e-06 7.97540218e-10 1.68235129e-03 -1.90443913e-03 1.22921159e-09 1.82066005e-03 -2.06100737e-03 -9.58437846e-06 -5.91781293e-07 6.69903625e-07 9.99974883e-01 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 26 52 77 103 129 155 181 207 233 259 285 309 334 360 386 411 437 463 489 515 541 567 593 619 643 668 +0 0 1 676 + 3.91223307e-02 1.43289601e-01 -4.90502288e-06 7.03199719e-02 7.01904001e-02 1.03994747e-05 -1.49090185e-01 -1.48815471e-01 1.22107648e-02 1.47797156e-06 1.47524824e-06 -3.90063207e-05 -2.11496292e-02 9.96821438e-03 5.17518379e-02 9.15959454e-03 2.88493403e-02 9.10543130e-03 -2.31476366e-02 -7.29065072e-02 -2.30107582e-02 1.16023552e-03 -1.42101146e-03 -4.48499762e-04 -2.01490685e-03 -1.41260863e-03 1.43289601e-01 2.06947327e-01 -1.00196061e-05 1.43644268e-01 1.43379588e-01 1.05056493e-05 -1.50612337e-01 -1.50334819e-01 2.77291004e-02 3.35628623e-06 3.35010193e-06 -8.85784145e-05 -4.80281294e-02 5.17518379e-02 1.44484911e-01 3.30099421e-02 1.03969128e-01 3.28147451e-02 -5.37604087e-02 -1.69325434e-01 -5.34425084e-02 1.72356190e-02 -2.11095177e-02 -6.66258781e-03 -2.99319976e-02 -2.09846912e-02 4.90502288e-06 1.00196061e-05 4.35782022e-02 7.89988685e-06 7.88533050e-06 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 3.46730911e-06 -1.47406117e-02 -1.47134507e-02 -7.28342405e-09 -3.94914759e-06 -9.15959454e-03 -3.30099421e-02 4.06067855e-03 -2.46216769e-02 -7.77109582e-03 -1.24677299e-02 5.10345875e-02 1.61075410e-02 -4.08002140e-03 3.43324754e-04 1.08360189e-04 5.04073277e-03 3.53395126e-03 -7.03199719e-02 -1.43644268e-01 7.89988685e-06 -6.96770937e-02 -1.13046612e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 -2.41769599e-02 -2.92823710e-06 -3.94914759e-06 -1.46361945e-02 4.19027880e-02 -2.88493403e-02 -1.03969128e-01 -2.46216769e-02 -6.56711894e-02 -2.44760821e-02 5.10345875e-02 1.32069018e-01 5.07328058e-02 -7.28782311e-03 1.01771612e-02 3.53395126e-03 1.26647987e-02 1.01169808e-02 -7.01904001e-02 -1.43379588e-01 7.88533050e-06 -1.13046612e-01 -6.92601093e-02 -1.21967065e-05 1.74855873e-01 8.98537365e-02 -2.41324114e-02 -3.94914759e-06 -2.91367025e-06 1.48176760e-02 4.17713057e-02 -9.10543130e-03 -3.28147451e-02 -7.77109582e-03 -2.44760821e-02 4.15285721e-03 1.61075410e-02 5.07328058e-02 -1.26587933e-02 -2.30018337e-03 3.53395126e-03 9.56956539e-05 6.02458615e-03 3.01405971e-04 -1.03994747e-05 -1.05056493e-05 -8.46799464e-02 -1.22192217e-05 -1.21967065e-05 1.23283559e-01 1.11022440e-05 1.10817869e-05 -6.32037199e-06 3.72168976e-02 3.71483216e-02 1.06143713e-08 5.75522155e-06 2.31476366e-02 5.37604087e-02 -1.24677299e-02 5.10345875e-02 1.61075410e-02 3.61214740e-02 -7.67562619e-02 -2.42258181e-02 1.52940199e-02 1.18263656e-03 3.73263854e-04 -1.78101569e-02 -1.24863248e-02 1.49090185e-01 1.50612337e-01 -1.22192217e-05 9.04987108e-02 1.74855873e-01 1.11022440e-05 -3.58817490e-02 -1.58872031e-01 2.61493097e-02 3.16985866e-06 5.75522155e-06 3.70647269e-02 -4.53603689e-02 7.29065072e-02 1.69325434e-01 5.10345875e-02 1.32069018e-01 5.07328058e-02 -7.67562619e-02 -1.81262482e-01 -7.63023807e-02 2.43665324e-02 -3.51978052e-02 -1.24863248e-02 -4.23521815e-02 -3.49896708e-02 1.48815471e-01 1.50334819e-01 -1.21967065e-05 1.74855873e-01 8.98537365e-02 1.10817869e-05 -1.58872031e-01 -3.52957328e-02 2.61011269e-02 5.75522155e-06 3.14862992e-06 -3.73002126e-02 -4.51397623e-02 2.30107582e-02 5.34425084e-02 1.61075410e-02 5.07328058e-02 -1.26587933e-02 -2.42258181e-02 -7.63023807e-02 3.64088341e-02 7.69056708e-03 -1.24863248e-02 4.22508578e-04 -2.20424817e-02 1.33074600e-03 1.22107648e-02 2.77291004e-02 -3.46730911e-06 2.41769599e-02 2.41324114e-02 6.32037199e-06 -2.61493097e-02 -2.61011269e-02 1.64085910e-02 2.93214608e-06 2.92674330e-06 -5.22331965e-05 -2.83213775e-02 1.16023552e-03 1.72356190e-02 4.08002140e-03 7.28782311e-03 2.30018337e-03 -1.52940199e-02 -2.43665324e-02 -7.69056708e-03 6.05837711e-04 8.53255114e-04 2.69304454e-04 -8.50497520e-04 -5.96265845e-04 1.47797156e-06 3.35628623e-06 1.47406117e-02 2.92823710e-06 3.94914759e-06 -3.72168976e-02 -3.16985866e-06 -5.75522155e-06 2.93214608e-06 -7.83085215e-03 -7.87352594e-03 5.41863474e-07 -3.97920169e-06 -1.42101146e-03 -2.11095177e-02 -3.43324754e-04 -1.01771612e-02 -3.53395126e-03 -1.18263656e-03 3.51978052e-02 1.24863248e-02 8.53255114e-04 2.04024475e-03 6.91366889e-04 1.98285484e-04 -1.84358829e-04 1.47524824e-06 3.35010193e-06 1.47134507e-02 3.94914759e-06 2.91367025e-06 -3.71483216e-02 -5.75522155e-06 -3.14862992e-06 2.92674330e-06 -7.87352594e-03 -7.80180981e-03 -5.57537750e-07 -3.96984382e-06 -4.48499762e-04 -6.66258781e-03 -1.08360189e-04 -3.53395126e-03 -9.56956539e-05 -3.73263854e-04 1.24863248e-02 -4.22508578e-04 2.69304454e-04 6.91366889e-04 6.79505792e-05 -4.66982868e-04 6.97170953e-04 -3.90063207e-05 -8.85784145e-05 7.28342405e-09 1.46361945e-02 -1.48176760e-02 -1.06143713e-08 -3.70647269e-02 3.73002126e-02 -5.22331965e-05 5.41863474e-07 -5.57537750e-07 -1.56896505e-02 1.19512681e-04 -2.01490685e-03 -2.99319976e-02 -5.04073277e-03 -1.26647987e-02 -6.02458615e-03 1.78101569e-02 4.23521815e-02 2.20424817e-02 -8.50497520e-04 1.98285484e-04 -4.66982868e-04 1.58052413e-03 -6.36855308e-04 -2.11496292e-02 -4.80281294e-02 3.94914759e-06 -4.19027880e-02 -4.17713057e-02 -5.75522155e-06 4.53603689e-02 4.51397623e-02 -2.83213775e-02 -3.97920169e-06 -3.96984382e-06 1.19512681e-04 4.91111366e-02 -1.41260863e-03 -2.09846912e-02 -3.53395126e-03 -1.01169808e-02 -3.01405971e-04 1.24863248e-02 3.49896708e-02 -1.33074600e-03 -5.96265845e-04 -1.84358829e-04 6.97170953e-04 -6.36855308e-04 2.04243156e-03 1.54133804e-02 7.31058106e-02 -1.41049760e-02 1.17750819e-02 4.21789782e-02 3.41760352e-02 -2.85307548e-02 -1.02198702e-01 2.23028207e-03 8.44296723e-04 3.02431639e-03 4.16948288e-03 -2.52475247e-03 3.91473712e-02 1.43350481e-01 4.90810225e-06 7.02264377e-02 7.03560908e-02 -1.04047658e-05 -1.48874167e-01 -1.49149021e-01 1.22216249e-02 -1.47672879e-06 -1.47945515e-06 3.90454712e-05 -2.11684393e-02 7.31058106e-02 1.65470878e-01 -4.36363495e-02 3.64283914e-02 1.30488462e-01 6.13236664e-02 -5.11940744e-02 -1.83379935e-01 2.04508337e-02 7.74187809e-03 2.77318248e-02 3.82325636e-02 -2.31510147e-02 1.43350481e-01 2.06969368e-01 1.00223895e-05 1.43403025e-01 1.43667778e-01 -1.05066413e-05 -1.50331830e-01 -1.50609375e-01 2.77227826e-02 -3.34972080e-06 -3.35590511e-06 8.85683466e-05 -4.80171865e-02 1.41049760e-02 4.36363495e-02 6.19677745e-03 9.87567457e-03 3.53751989e-02 -1.82241193e-02 -1.89358984e-02 -6.78294092e-02 6.75404693e-03 2.17045510e-05 7.77468721e-05 8.32409476e-03 -5.04050008e-03 -4.90810225e-06 -1.00223895e-05 4.36040271e-02 -7.88916809e-06 -7.90373318e-06 -8.47198876e-02 1.22003699e-05 1.22228944e-05 -3.46994451e-06 -1.47246794e-02 -1.47518643e-02 -7.28934677e-09 3.95190762e-06 -1.17750819e-02 -3.64283914e-02 9.87567457e-03 9.78213046e-03 -2.95318377e-02 -1.89358984e-02 -2.50987768e-02 5.66251827e-02 -2.75647652e-03 5.85949630e-04 -5.04050008e-03 -8.61297819e-03 -1.75220125e-03 -7.02264377e-02 -1.43403025e-01 -7.88916809e-06 -6.92762962e-02 -1.13088725e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -2.41449995e-02 2.91552205e-06 3.95190762e-06 -1.48289776e-02 4.17930850e-02 -4.21789782e-02 -1.30488462e-01 3.53751989e-02 -2.95318377e-02 -8.77581179e-02 -6.78294092e-02 5.66251827e-02 1.61927661e-01 -9.87384755e-03 -5.04050008e-03 -1.60622399e-02 -1.89319537e-02 1.34090401e-02 -7.03560908e-02 -1.43667778e-01 -7.90373318e-06 -1.13088725e-01 -6.96934836e-02 1.22228944e-05 1.74888437e-01 9.04914302e-02 -2.41895763e-02 3.95190762e-06 2.93010075e-06 1.46473741e-02 4.19246640e-02 -3.41760352e-02 -6.13236664e-02 -1.82241193e-02 -1.89358984e-02 -6.78294092e-02 4.85918996e-02 2.39904064e-02 8.59349296e-02 -2.18924565e-02 1.26669767e-03 4.53737935e-03 -2.47123857e-02 1.49641235e-02 1.04047658e-05 1.05066413e-05 -8.47198876e-02 1.22003699e-05 1.22228944e-05 1.23319846e-01 -1.10830618e-05 -1.11035236e-05 6.32201299e-06 3.71628842e-02 3.72314949e-02 1.06159769e-08 -5.75543479e-06 2.85307548e-02 5.11940744e-02 -1.89358984e-02 -2.50987768e-02 5.66251827e-02 2.39904064e-02 5.73015908e-02 -7.17399893e-02 7.41483526e-03 -3.33407451e-03 1.49641235e-02 2.69011500e-02 9.97008826e-03 1.48874167e-01 1.50331830e-01 1.22003699e-05 8.98462620e-02 1.74888437e-01 -1.10830618e-05 -3.52595621e-02 -1.58872180e-01 2.60890459e-02 -3.14752702e-06 -5.75543479e-06 3.73147809e-02 -4.51188027e-02 1.02198702e-01 1.83379935e-01 -6.78294092e-02 5.66251827e-02 1.61927661e-01 8.59349296e-02 -7.17399893e-02 -1.79647307e-01 2.65603397e-02 1.49641235e-02 4.60906969e-02 5.14365668e-02 -3.84773237e-02 1.49149021e-01 1.50609375e-01 1.22228944e-05 1.74888437e-01 9.04914302e-02 -1.11035236e-05 -1.58872180e-01 -3.58456459e-02 2.61372119e-02 -5.75543479e-06 -3.16875898e-06 -3.70793186e-02 -4.53394497e-02 2.23028207e-03 2.04508337e-02 -6.75404693e-03 2.75647652e-03 9.87384755e-03 2.18924565e-02 -7.41483526e-03 -2.65603397e-02 1.73550513e-03 4.03677944e-04 1.44599616e-03 3.52598102e-03 -2.13509194e-03 1.22216249e-02 2.77227826e-02 3.46994451e-06 2.41449995e-02 2.41895763e-02 -6.32201299e-06 -2.60890459e-02 -2.61372119e-02 1.64208833e-02 -2.92991674e-06 -2.93532599e-06 5.22726833e-05 -2.83395511e-02 8.44296723e-04 7.74187809e-03 -2.17045510e-05 -5.85949630e-04 5.04050008e-03 -1.26669767e-03 3.33407451e-03 -1.49641235e-02 4.03677944e-04 -2.36334980e-05 1.22341272e-03 7.68886655e-04 -1.21583046e-03 -1.47672879e-06 -3.34972080e-06 1.47246794e-02 -2.91552205e-06 -3.95190762e-06 -3.71628842e-02 3.14752702e-06 5.75543479e-06 -2.92991674e-06 -7.81299182e-03 -7.88653339e-03 -5.58517128e-07 3.97339830e-06 3.02431639e-03 2.77318248e-02 -7.77468721e-05 5.04050008e-03 1.60622399e-02 -4.53737935e-03 -1.49641235e-02 -4.60906969e-02 1.44599616e-03 1.22341272e-03 4.01715739e-03 4.03771116e-03 -2.23551494e-03 -1.47945515e-06 -3.35590511e-06 1.47518643e-02 -3.95190762e-06 -2.93010075e-06 -3.72314949e-02 5.75543479e-06 3.16875898e-06 -2.93532599e-06 -7.88653339e-03 -7.84208546e-03 5.42826137e-07 3.98276739e-06 4.16948288e-03 3.82325636e-02 -8.32409476e-03 8.61297819e-03 1.89319537e-02 2.47123857e-02 -2.69011500e-02 -5.14365668e-02 3.52598102e-03 7.68886655e-04 4.03771116e-03 6.17071426e-03 -2.83500067e-03 3.90454712e-05 8.85683466e-05 7.28934677e-09 1.48289776e-02 -1.46473741e-02 -1.06159769e-08 -3.73147809e-02 3.70793186e-02 5.22726833e-05 -5.58517128e-07 5.42826137e-07 -1.57138654e-02 -1.19632376e-04 -2.52475247e-03 -2.31510147e-02 5.04050008e-03 1.75220125e-03 -1.34090401e-02 -1.49641235e-02 -9.97008826e-03 3.84773237e-02 -2.13509194e-03 -1.21583046e-03 -2.23551494e-03 -2.83500067e-03 3.20555609e-03 -2.11684393e-02 -4.80171865e-02 -3.95190762e-06 -4.17930850e-02 -4.19246640e-02 5.75543479e-06 4.51188027e-02 4.53394497e-02 -2.83395511e-02 3.97339830e-06 3.98276739e-06 -1.19632376e-04 4.91444137e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 0 2 668 + 8.20974861e-06 9.01678303e-05 -1.14892157e-09 3.29264972e-05 3.28961472e-05 4.01550972e-09 -1.15078934e-04 -1.14972860e-04 -1.30380943e-05 -7.88714653e-10 -7.87987654e-10 2.08251874e-08 2.25826322e-05 1.71412701e-07 1.73538840e-06 1.92824511e-07 9.91475648e-07 5.75833932e-07 -5.99697641e-07 -3.08355823e-06 -1.79088358e-06 -3.89806755e-07 2.08149996e-07 1.20890342e-07 3.54630462e-07 6.21600594e-07 9.01678303e-05 9.91019828e-04 -1.26276555e-08 3.61891076e-04 3.61557502e-04 4.41608263e-08 -1.26558797e-03 -1.26442142e-03 -1.43798531e-04 -8.69881791e-09 -8.69079976e-09 2.29683210e-07 2.49066256e-04 1.73538840e-06 1.75619930e-05 1.95355533e-06 1.00448979e-05 5.83392349e-06 -6.07218762e-06 -3.12223074e-05 -1.81334399e-05 -3.95175721e-06 2.11016930e-06 1.22555414e-06 3.59514930e-06 6.30162149e-06 1.14892157e-09 1.26276555e-08 6.95938620e-06 4.69902220e-09 4.69469087e-09 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 -2.09348108e-09 5.15529041e-06 5.15053852e-06 3.26624168e-09 -1.92824511e-07 -1.95355533e-06 -1.69260511e-07 -1.12085445e-06 -6.50975166e-07 5.28777415e-07 3.48920130e-06 2.02647489e-06 4.54948622e-07 -1.83283472e-07 -1.06448245e-07 -4.03011883e-07 -7.06404137e-07 -3.29264972e-05 -3.61891076e-04 4.69902220e-09 -1.27708066e-04 -1.34543323e-04 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.10670363e-05 3.08936886e-09 3.26624168e-09 5.06896926e-06 -8.84554137e-05 -9.91475648e-07 -1.00448979e-05 -1.12085445e-06 -5.71454500e-06 -3.34721982e-06 3.48920130e-06 1.77911560e-05 1.04198398e-05 2.24702391e-06 -1.20593361e-06 -7.06404137e-07 -2.01896466e-06 -3.60129266e-06 -3.28961472e-05 -3.61557502e-04 4.69469087e-09 -1.34543323e-04 -1.27459921e-04 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.10199652e-05 3.26624168e-09 3.08334476e-09 -5.23678033e-06 -8.83643803e-05 -5.75833932e-07 -5.83392349e-06 -6.50975166e-07 -3.34721982e-06 -1.89528832e-06 2.02647489e-06 1.04198398e-05 5.90187334e-06 1.30503721e-06 -7.06404137e-07 -3.99909849e-07 -1.23445365e-06 -2.05627840e-06 -4.01550972e-09 -4.41608263e-08 -2.39846486e-05 -1.64551990e-08 -1.64400314e-08 8.25501551e-05 5.76252238e-08 5.75721076e-08 7.37124160e-09 -1.78684916e-05 -1.78520213e-05 -1.15203707e-08 5.99697641e-07 6.07218762e-06 5.28777415e-07 3.48920130e-06 2.02647489e-06 -1.65030369e-06 -1.08529578e-05 -6.30323233e-06 -1.41694328e-06 5.73137481e-07 3.32869506e-07 1.25560500e-06 2.20083974e-06 1.15078934e-04 1.26558797e-03 -1.64551990e-08 4.47598510e-04 4.71148476e-04 5.76252238e-08 -1.56890876e-03 -1.64993668e-03 -1.80300415e-04 -1.09075048e-08 -1.15203707e-08 -1.75640280e-05 3.12305810e-04 3.08355823e-06 3.12223074e-05 3.48920130e-06 1.77911560e-05 1.04198398e-05 -1.08529578e-05 -5.53439288e-05 -3.24103058e-05 -7.00193985e-06 3.75756043e-06 2.20083974e-06 6.29230005e-06 1.12212435e-05 1.14972860e-04 1.26442142e-03 -1.64400314e-08 4.71148476e-04 4.46729545e-04 5.75721076e-08 -1.64993668e-03 -1.56586569e-03 -1.80134223e-04 -1.15203707e-08 -1.08862571e-08 1.81562050e-05 3.11985016e-04 1.79088358e-06 1.81334399e-05 2.02647489e-06 1.04198398e-05 5.90187334e-06 -6.30323233e-06 -3.24103058e-05 -1.83630062e-05 -4.06661985e-06 2.20083974e-06 1.24635043e-06 3.84478182e-06 6.40855300e-06 -1.30380943e-05 -1.43798531e-04 2.09348108e-09 -5.10670363e-05 -5.10199652e-05 -7.37124160e-09 1.80300415e-04 1.80134223e-04 1.91798739e-05 1.38189198e-09 1.38061822e-09 -3.03594982e-08 -3.29215468e-05 -3.89806755e-07 -3.95175721e-06 -4.54948622e-07 -2.24702391e-06 -1.30503721e-06 1.41694328e-06 7.00193985e-06 4.06661985e-06 8.76588837e-07 -4.89932488e-07 -2.84545315e-07 -8.01140151e-07 -1.40424822e-06 -7.88714653e-10 -8.69881791e-09 -5.15529041e-06 -3.08936886e-09 -3.26624168e-09 1.78684916e-05 1.09075048e-08 1.15203707e-08 1.38189198e-09 -3.66746168e-06 -3.83652398e-06 1.31909688e-10 -2.12564295e-09 2.08149996e-07 2.11016930e-06 1.83283472e-07 1.20593361e-06 7.06404137e-07 -5.73137481e-07 -3.75756043e-06 -2.20083974e-06 -4.89932488e-07 1.97808579e-07 1.15932561e-07 4.28369337e-07 7.64184156e-07 -7.87987654e-10 -8.69079976e-09 -5.15053852e-06 -3.26624168e-09 -3.08334476e-09 1.78520213e-05 1.15203707e-08 1.08862571e-08 1.38061822e-09 -3.83652398e-06 -3.66038577e-06 -1.35951600e-10 -2.12343673e-09 1.20890342e-07 1.22555414e-06 1.06448245e-07 7.06404137e-07 3.99909849e-07 -3.32869506e-07 -2.20083974e-06 -1.24635043e-06 -2.84545315e-07 1.15932561e-07 6.55267948e-08 2.62004569e-07 4.36287648e-07 2.08251874e-08 2.29683210e-07 -5.06896926e-06 5.23678033e-06 1.75640280e-05 -1.81562050e-05 -3.03594982e-08 1.31909688e-10 -1.35951600e-10 -7.50039447e-06 5.96600777e-08 3.54630462e-07 3.59514930e-06 4.03011883e-07 2.01896466e-06 1.23445365e-06 -1.25560500e-06 -6.29230005e-06 -3.84478182e-06 -8.01140151e-07 4.28369337e-07 2.62004569e-07 6.71387638e-07 1.31321674e-06 2.25826322e-05 2.49066256e-04 -3.26624168e-09 8.84554137e-05 8.83643803e-05 1.15203707e-08 -3.12305810e-04 -3.11985016e-04 -3.29215468e-05 -2.12564295e-09 -2.12343673e-09 5.96600777e-08 5.71943630e-05 6.21600594e-07 6.30162149e-06 7.06404137e-07 3.60129266e-06 2.05627840e-06 -2.20083974e-06 -1.12212435e-05 -6.40855300e-06 -1.40424822e-06 7.64184156e-07 4.36287648e-07 1.31321674e-06 2.22400431e-06 2.53728508e-06 2.74768469e-05 -2.62885073e-06 7.43187067e-06 1.30984741e-05 8.95691357e-06 -2.53215683e-05 -4.46285896e-05 -4.45304629e-06 -1.41504749e-06 -2.49398351e-06 -4.21304414e-06 7.05059541e-06 8.22431014e-06 9.03264335e-05 1.15092237e-09 3.29515519e-05 3.29819549e-05 -4.02255197e-09 -1.15167916e-04 -1.15274176e-04 -1.30567437e-05 7.89159811e-10 7.89887933e-10 -2.08561661e-08 2.26149339e-05 2.74768469e-05 2.96976367e-04 -2.85738440e-05 8.07794490e-05 1.42371627e-04 9.70938731e-05 -2.74488430e-04 -4.83778544e-04 -4.86517600e-05 -1.54601023e-05 -2.72480184e-05 -4.60296164e-05 7.70312846e-05 9.03264335e-05 9.92753883e-04 1.26493700e-08 3.62158546e-04 3.62492694e-04 -4.42375729e-08 -1.26654648e-03 -1.26771507e-03 -1.43999445e-04 8.70343917e-09 8.71146944e-09 -2.30017255e-07 2.49414248e-04 2.62885073e-06 2.85738440e-05 -1.18372102e-06 7.77826686e-06 1.37089881e-05 4.20986619e-06 -2.66257697e-05 -4.69272098e-05 -5.06371399e-06 -6.11117832e-07 -1.07707890e-06 -4.44944928e-06 7.44622311e-06 -1.15092237e-09 -1.26493700e-08 6.97476357e-06 -4.70251108e-09 -4.70684987e-09 -2.40384979e-05 1.64675606e-08 1.64827544e-08 2.09658074e-09 5.16093129e-06 5.16569305e-06 -3.27086392e-09 -7.43187067e-06 -8.07794490e-05 7.77826686e-06 -2.04218256e-05 -3.87558813e-05 -2.66257697e-05 7.00637835e-05 1.32665180e-04 1.27853552e-05 3.91241332e-06 7.44622311e-06 1.34621105e-05 -1.94939347e-05 -3.29515519e-05 -3.62158546e-04 -4.70251108e-09 -1.27660762e-04 -1.34759748e-04 1.64675606e-08 4.47436982e-04 4.71910490e-04 5.10872854e-05 -3.08758929e-09 -3.27086392e-09 5.24729515e-06 -8.84809725e-05 -1.30984741e-05 -1.42371627e-04 1.37089881e-05 -3.87558813e-05 -6.67385490e-05 -4.69272098e-05 1.32665180e-04 2.28610466e-04 2.25338479e-05 7.44622311e-06 1.28113119e-05 2.06129137e-05 -3.62181131e-05 -3.29819549e-05 -3.62492694e-04 -4.70684987e-09 -1.34759748e-04 -1.27909321e-04 1.64827544e-08 4.71910490e-04 4.48307402e-04 5.11344213e-05 -3.27086392e-09 -3.09362226e-09 -5.07924973e-06 -8.85721378e-05 -8.95691357e-06 -9.70938731e-05 4.20986619e-06 -2.66257697e-05 -4.69272098e-05 -1.48585488e-05 9.08054378e-05 1.60042165e-04 1.74106625e-05 2.20417198e-06 3.88479439e-06 1.53338391e-05 -2.56614201e-05 4.02255197e-09 4.42375729e-08 -2.40384979e-05 1.64675606e-08 1.64827544e-08 8.27387335e-05 -5.76693005e-08 -5.77225093e-08 -7.38221994e-09 -1.78886957e-05 -1.79052008e-05 1.15367526e-08 2.53215683e-05 2.74488430e-04 -2.66257697e-05 7.00637835e-05 1.32665180e-04 9.08054378e-05 -2.39449006e-04 -4.52445877e-04 -4.41179618e-05 -1.35177948e-05 -2.56614201e-05 -4.62954524e-05 6.73535714e-05 1.15167916e-04 1.26654648e-03 1.64675606e-08 4.47436982e-04 4.71910490e-04 -5.76693005e-08 -1.56836563e-03 -1.65262777e-03 -1.80372960e-04 1.09013067e-08 1.15367526e-08 -1.81933121e-05 3.12398486e-04 4.46285896e-05 4.83778544e-04 -4.69272098e-05 1.32665180e-04 2.28610466e-04 1.60042165e-04 -4.52445877e-04 -7.80162049e-04 -7.77567323e-05 -2.56614201e-05 -4.41854731e-05 -7.12098339e-05 1.24914176e-04 1.15274176e-04 1.26771507e-03 1.64827544e-08 4.71910490e-04 4.48307402e-04 -5.77225093e-08 -1.65262777e-03 -1.57141384e-03 -1.80539382e-04 1.15367526e-08 1.09225858e-08 1.76003043e-05 3.12719748e-04 -4.45304629e-06 -4.86517600e-05 5.06371399e-06 -1.27853552e-05 -2.25338479e-05 -1.74106625e-05 4.41179618e-05 7.77567323e-05 7.35557721e-06 2.67547723e-06 4.71545734e-06 7.05032665e-06 -1.17988322e-05 -1.30567437e-05 -1.43999445e-04 -2.09658074e-09 -5.10872854e-05 -5.11344213e-05 7.38221994e-09 1.80372960e-04 1.80539382e-04 1.91984898e-05 -1.38221596e-09 -1.38349126e-09 3.03902675e-08 -3.29530311e-05 -1.41504749e-06 -1.54601023e-05 6.11117832e-07 -3.91241332e-06 -7.44622311e-06 -2.20417198e-06 1.35177948e-05 2.56614201e-05 2.67547723e-06 2.82190927e-07 5.56555548e-07 2.61182921e-06 -3.76100082e-06 7.89159811e-10 8.70343917e-09 -5.16093129e-06 3.08758929e-09 3.27086392e-09 1.78886957e-05 -1.09013067e-08 -1.15367526e-08 -1.38221596e-09 -3.66689421e-06 -3.84347757e-06 -1.36204331e-10 2.12570328e-09 -2.49398351e-06 -2.72480184e-05 1.07707890e-06 -7.44622311e-06 -1.28113119e-05 -3.88479439e-06 2.56614201e-05 4.41854731e-05 4.71545734e-06 5.56555548e-07 9.47324283e-07 3.97755186e-06 -7.00256377e-06 7.89887933e-10 8.71146944e-09 -5.16569305e-06 3.27086392e-09 3.09362226e-09 1.79052008e-05 -1.15367526e-08 -1.09225858e-08 -1.38349126e-09 -3.84347757e-06 -3.67398335e-06 1.32157773e-10 2.12791218e-09 -4.21304414e-06 -4.60296164e-05 4.44944928e-06 -1.34621105e-05 -2.06129137e-05 -1.53338391e-05 4.62954524e-05 7.12098339e-05 7.05032665e-06 2.61182921e-06 3.97755186e-06 5.21621779e-06 -1.21291840e-05 -2.08561661e-08 -2.30017255e-07 -5.24729515e-06 5.07924973e-06 1.81933121e-05 -1.76003043e-05 3.03902675e-08 -1.36204331e-10 1.32157773e-10 -7.51386306e-06 -5.97266014e-08 7.05059541e-06 7.70312846e-05 -7.44622311e-06 1.94939347e-05 3.62181131e-05 2.56614201e-05 -6.73535714e-05 -1.24914176e-04 -1.17988322e-05 -3.76100082e-06 -7.00256377e-06 -1.21291840e-05 1.82668708e-05 2.26149339e-05 2.49414248e-04 3.27086392e-09 8.84809725e-05 8.85721378e-05 -1.15367526e-08 -3.12398486e-04 -3.12719748e-04 -3.29530311e-05 2.12570328e-09 2.12791218e-09 -5.97266014e-08 5.72493338e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 360 386 411 437 463 488 514 540 566 592 618 642 668 +0 1 -2 676 + 1.69968586e-04 1.56386115e-03 -3.25031918e-04 -3.24690943e-04 -6.50299618e-04 1.06428280e-03 1.06316632e-03 2.12933765e-03 -4.51727960e-05 5.20923513e-05 1.04331940e-04 -7.83509303e-05 1.04222491e-04 6.73401779e-05 6.74330824e-04 -6.50856373e-05 -5.47604431e-05 -3.26836198e-04 2.21145496e-04 1.86062945e-04 1.11051157e-03 -5.08810733e-05 6.19844031e-06 3.69952204e-05 -9.02806542e-05 3.11262937e-05 1.56386115e-03 1.39379141e-02 -2.89071600e-03 -2.88768349e-03 -5.78352895e-03 9.33559857e-03 9.32580505e-03 1.86779693e-02 -2.87283852e-04 3.31289906e-04 6.63516196e-04 -4.98285673e-04 6.62820133e-04 6.74330824e-04 6.69899732e-03 -6.42150613e-04 -5.40279754e-04 -3.22464484e-03 2.17826892e-03 1.83270805e-03 1.09384676e-02 -4.60868631e-04 5.61439944e-05 3.35093886e-04 -8.17740640e-04 2.81934547e-04 3.25031918e-04 2.89071600e-03 -4.13274076e-04 -6.40689538e-04 -1.28318997e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -1.33398645e-04 4.04581339e-05 8.10306217e-05 -1.33945083e-04 1.78173892e-04 6.50856373e-05 6.42150613e-04 1.91154560e-05 -5.46699404e-05 -3.26296035e-04 -6.99781451e-05 1.85001092e-04 1.10417393e-03 -6.31367532e-05 -3.75163964e-06 -2.23915579e-05 -8.81523563e-05 3.03925149e-05 3.24690943e-04 2.88768349e-03 -6.40689538e-04 -4.11929137e-04 -1.28184384e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -4.90870753e-05 4.03136771e-05 1.78173892e-04 -1.82401080e-04 8.06565982e-05 5.47604431e-05 5.40279754e-04 -5.46699404e-05 3.80964323e-05 -2.74532388e-04 1.85001092e-04 -1.34209080e-04 9.29007628e-04 -3.61397796e-05 -6.56033613e-06 3.03925149e-05 -8.39718112e-05 -3.29436018e-05 6.50299618e-04 5.78352895e-03 -1.28318997e-03 -1.28184384e-03 -2.33922250e-03 4.14963185e-03 4.14527867e-03 7.53700469e-03 -9.83128941e-05 1.78173892e-04 3.08203844e-04 -1.70656951e-04 3.07880522e-04 3.26836198e-04 3.22464484e-03 -3.26296035e-04 -2.74532388e-04 -1.55444548e-03 1.10417393e-03 9.29007628e-04 5.25489489e-03 -2.15699280e-04 3.03925149e-05 1.69744376e-04 -3.84154156e-04 1.42816106e-04 -1.06428280e-03 -9.33559857e-03 1.30879446e-03 2.07188785e-03 4.14963185e-03 -4.10290906e-03 -6.66159519e-03 -1.33420192e-02 3.95548216e-04 -8.90408852e-05 -1.78333442e-04 3.70593279e-04 -4.92963575e-04 -2.21145496e-04 -2.17826892e-03 -6.99781451e-05 1.85001092e-04 1.10417393e-03 2.55915557e-04 -6.26099004e-04 -3.73685467e-03 2.09741069e-04 1.37506092e-05 8.20701323e-05 2.90156812e-04 -1.00038111e-04 -1.06316632e-03 -9.32580505e-03 2.07188785e-03 1.30444514e-03 4.14527867e-03 -6.66159519e-03 -4.08892500e-03 -1.33280228e-02 1.22592413e-04 -8.86171635e-05 -4.92963575e-04 5.27556042e-04 -1.77298611e-04 -1.86062945e-04 -1.83270805e-03 1.85001092e-04 -1.34209080e-04 9.29007628e-04 -6.26099004e-04 4.73292241e-04 -3.14403955e-03 1.18146037e-04 2.32598795e-05 -1.00038111e-04 2.77798335e-04 1.16802583e-04 -2.12933765e-03 -1.86779693e-02 4.14963185e-03 4.14527867e-03 7.53700469e-03 -1.33420192e-02 -1.33280228e-02 -2.41280351e-02 2.45531331e-04 -4.92963575e-04 -8.29803722e-04 4.26307571e-04 -8.28933215e-04 -1.11051157e-03 -1.09384676e-02 1.10417393e-03 9.29007628e-04 5.25489489e-03 -3.73685467e-03 -3.14403955e-03 -1.77650467e-02 7.05151368e-04 -1.00038111e-04 -5.57053744e-04 1.25609045e-03 -4.68682664e-04 -4.51727960e-05 -2.87283852e-04 1.33398645e-04 4.90870753e-05 9.83128941e-05 -3.95548216e-04 -1.22592413e-04 -2.45531331e-04 -2.47997539e-05 1.49666512e-05 2.99756052e-05 -3.44119357e-05 4.57747934e-05 -5.08810733e-05 -4.60868631e-04 6.31367532e-05 3.61397796e-05 2.15699280e-04 -2.09741069e-04 -1.18146037e-04 -7.05151368e-04 7.63653213e-06 -3.04233497e-06 -1.81580926e-05 1.45999588e-05 -5.03366541e-06 5.20923513e-05 3.31289906e-04 -4.04581339e-05 -4.03136771e-05 -1.78173892e-04 8.90408852e-05 8.86171635e-05 4.92963575e-04 1.49666512e-05 -2.52508823e-05 -4.97986593e-05 2.59656156e-05 -4.97656043e-05 6.19844031e-06 5.61439944e-05 3.75163964e-06 6.56033613e-06 -3.03925149e-05 -1.37506092e-05 -2.32598795e-05 1.00038111e-04 -3.04233497e-06 1.04869733e-07 -4.19662545e-06 -5.36939620e-06 -5.58426235e-06 1.04331940e-04 6.63516196e-04 -8.10306217e-05 -1.78173892e-04 -3.08203844e-04 1.78333442e-04 4.92963575e-04 8.29803722e-04 2.99756052e-05 -4.97986593e-05 -1.00124765e-04 7.03034607e-05 -8.59154247e-05 3.69952204e-05 3.35093886e-04 2.23915579e-05 -3.03925149e-05 -1.69744376e-04 -8.20701323e-05 1.00038111e-04 5.57053744e-04 -1.81580926e-05 -4.19662545e-06 -2.42394415e-05 -1.79882458e-05 7.44764712e-06 -7.83509303e-05 -4.98285673e-04 1.33945083e-04 1.82401080e-04 1.70656951e-04 -3.70593279e-04 -5.27556042e-04 -4.26307571e-04 -3.44119357e-05 2.59656156e-05 7.03034607e-05 -6.46078809e-05 6.10898878e-05 -9.02806542e-05 -8.17740640e-04 8.81523563e-05 8.39718112e-05 3.84154156e-04 -2.90156812e-04 -2.77798335e-04 -1.25609045e-03 1.45999588e-05 -5.36939620e-06 -1.79882458e-05 2.69691655e-05 -2.10488632e-05 1.04222491e-04 6.62820133e-04 -1.78173892e-04 -8.06565982e-05 -3.07880522e-04 4.92963575e-04 1.77298611e-04 8.28933215e-04 4.57747934e-05 -4.97656043e-05 -8.59154247e-05 6.10898878e-05 -9.99444110e-05 3.11262937e-05 2.81934547e-04 -3.03925149e-05 3.29436018e-05 -1.42816106e-04 1.00038111e-04 -1.16802583e-04 4.68682664e-04 -5.03366541e-06 -5.58426235e-06 7.44764712e-06 -2.10488632e-05 -2.68252065e-05 4.24041064e-05 4.38959897e-04 -1.24450625e-04 -1.30997376e-04 -1.24204683e-04 4.28590541e-04 4.51136635e-04 4.27743554e-04 -1.45151118e-06 5.08769744e-05 4.82388176e-05 2.70494044e-06 5.07764306e-05 1.70719458e-04 1.57005992e-03 -3.26398409e-04 -3.26740866e-04 -6.52560013e-04 1.06854114e-03 1.06966225e-03 2.13630705e-03 -4.52413105e-05 5.23089602e-05 1.04470359e-04 -7.82505410e-05 1.04579970e-04 4.38959897e-04 4.53386238e-03 -1.27650110e-03 -1.34365171e-03 -1.27397846e-03 4.40031911e-03 4.63179881e-03 4.39162314e-03 -1.42913306e-05 5.00925978e-04 4.74951138e-04 2.66323804e-05 4.99936041e-04 1.57005992e-03 1.39845673e-02 -2.90120743e-03 -2.90425137e-03 -5.80031000e-03 9.36677236e-03 9.37659996e-03 1.87267490e-02 -2.86910970e-04 3.31732532e-04 6.62529264e-04 -4.96248635e-04 6.63224388e-04 1.24450625e-04 1.27650110e-03 -3.26831297e-04 -3.96564312e-04 -3.76001005e-04 1.12156951e-03 1.36301286e-03 1.29233567e-03 -3.07868834e-05 1.29836277e-04 1.23103792e-04 8.18221822e-06 1.53594448e-04 3.26398409e-04 2.90120743e-03 -4.14764252e-04 -6.44582972e-04 -1.28734761e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -1.33577269e-04 4.04713759e-05 8.08285841e-05 -1.33601047e-04 1.78554592e-04 1.30997376e-04 1.34365171e-03 -3.96564312e-04 -3.67511422e-04 -3.95780615e-04 1.36301286e-03 1.26138929e-03 1.36031925e-03 9.27070681e-06 1.39134686e-04 1.53594448e-04 -1.54496628e-05 1.38859726e-04 3.26740866e-04 2.90425137e-03 -6.44582972e-04 -4.16116134e-04 -1.28869829e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -4.91269703e-05 4.06162668e-05 1.78554592e-04 -1.82579539e-04 8.12030661e-05 1.24204683e-04 1.27397846e-03 -3.76001005e-04 -3.95780615e-04 -3.25343708e-04 1.29233567e-03 1.36031925e-03 1.11645659e-03 8.78998683e-06 1.53594448e-04 1.22770250e-04 3.09806382e-05 1.29228604e-04 6.52560013e-04 5.80031000e-03 -1.28734761e-03 -1.28869829e-03 -2.34461810e-03 4.16200528e-03 4.16637205e-03 7.55231102e-03 -9.81153560e-05 1.78554592e-04 3.07818361e-04 -1.69566300e-04 3.08141323e-04 -4.28590541e-04 -4.40031911e-03 1.12156951e-03 1.36301286e-03 1.29233567e-03 -3.85395014e-03 -4.69081493e-03 -4.44757905e-03 1.06802586e-04 -4.40698174e-04 -4.17846365e-04 -2.78814101e-05 -5.23382497e-04 -1.06854114e-03 -9.36677236e-03 1.31307785e-03 2.08394199e-03 4.16200528e-03 -4.11465939e-03 -6.69832648e-03 -1.33777573e-02 3.95711679e-04 -8.86552125e-05 -1.77060333e-04 3.69076357e-04 -4.93261692e-04 -4.51136635e-04 -4.63179881e-03 1.36301286e-03 1.26138929e-03 1.36031925e-03 -4.69081493e-03 -4.33514053e-03 -4.68154487e-03 -3.25875260e-05 -4.72469378e-04 -5.23382497e-04 5.43725699e-05 -4.71535677e-04 -1.06966225e-03 -9.37659996e-03 2.08394199e-03 1.31744849e-03 4.16637205e-03 -6.69832648e-03 -4.12870777e-03 -1.33917933e-02 1.22350018e-04 -8.90797389e-05 -4.93261692e-04 5.27528724e-04 -1.78094850e-04 -4.27743554e-04 -4.39162314e-03 1.29233567e-03 1.36031925e-03 1.11645659e-03 -4.44757905e-03 -4.68154487e-03 -3.83635399e-03 -3.08977439e-05 -5.23382497e-04 -4.16706558e-04 -1.07205775e-04 -4.38627493e-04 -2.13630705e-03 -1.87267490e-02 4.16200528e-03 4.16637205e-03 7.55231102e-03 -1.33777573e-02 -1.33917933e-02 -2.41691624e-02 2.44354893e-04 -4.93261692e-04 -8.27232454e-04 4.22200574e-04 -8.28100385e-04 -1.45151118e-06 -1.42913306e-05 3.07868834e-05 -9.27070681e-06 -8.78998683e-06 -1.06802586e-04 3.25875260e-05 3.08977439e-05 -1.85675336e-05 -7.36601271e-06 -6.98405806e-06 5.61252736e-07 1.05356888e-05 -4.52413105e-05 -2.86910970e-04 1.33577269e-04 4.91269703e-05 9.81153560e-05 -3.95711679e-04 -1.22350018e-04 -2.44354893e-04 -2.48554673e-05 1.52245278e-05 3.04061079e-05 -3.45457148e-05 4.61695186e-05 5.08769744e-05 5.00925978e-04 -1.29836277e-04 -1.39134686e-04 -1.53594448e-04 4.40698174e-04 4.72469378e-04 5.23382497e-04 -7.36601271e-06 2.94570796e-05 3.59280843e-05 -7.75388385e-06 3.88774620e-05 5.23089602e-05 3.31732532e-04 -4.04713759e-05 -4.06162668e-05 -1.78554592e-04 8.86552125e-05 8.90797389e-05 4.93261692e-04 1.52245278e-05 -2.55275929e-05 -5.02954556e-05 2.63263767e-05 -5.03291766e-05 4.82388176e-05 4.74951138e-04 -1.23103792e-04 -1.53594448e-04 -1.22770250e-04 4.17846365e-04 5.23382497e-04 4.16706558e-04 -6.98405806e-06 3.59280843e-05 2.56291883e-05 1.22702557e-05 3.58162249e-05 1.04470359e-04 6.62529264e-04 -8.08285841e-05 -1.78554592e-04 -3.07818361e-04 1.77060333e-04 4.93261692e-04 8.27232454e-04 3.04061079e-05 -5.02954556e-05 -1.00793375e-04 7.07246307e-05 -8.69387726e-05 2.70494044e-06 2.66323804e-05 -8.18221822e-06 1.54496628e-05 -3.09806382e-05 2.78814101e-05 -5.43725699e-05 1.07205775e-04 5.61252736e-07 -7.75388385e-06 1.22702557e-05 -1.91511141e-05 2.58858726e-06 -7.82505410e-05 -4.96248635e-04 1.33601047e-04 1.82579539e-04 1.69566300e-04 -3.69076357e-04 -5.27528724e-04 -4.22200574e-04 -3.45457148e-05 2.63263767e-05 7.07246307e-05 -6.46717736e-05 6.17162441e-05 5.07764306e-05 4.99936041e-04 -1.53594448e-04 -1.38859726e-04 -1.29228604e-04 5.23382497e-04 4.71535677e-04 4.38627493e-04 1.05356888e-05 3.88774620e-05 3.58162249e-05 2.58858726e-06 2.93032670e-05 1.04579970e-04 6.63224388e-04 -1.78554592e-04 -8.12030661e-05 -3.08141323e-04 4.93261692e-04 1.78094850e-04 8.28100385e-04 4.61695186e-05 -5.03291766e-05 -8.69387726e-05 6.17162441e-05 -1.00975711e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 -1 676 + 3.90324935e-02 1.43071006e-01 -7.00978352e-02 6.86422865e-05 -7.01535788e-02 1.48682692e-01 -1.45595366e-04 1.48800929e-01 -6.07138617e-03 2.06280218e-05 -2.10821875e-02 1.05494662e-02 2.06444258e-05 1.24338945e-02 6.17723056e-02 -1.13152740e-02 1.31990060e-02 -3.41019321e-02 2.80237262e-02 -3.26890301e-02 8.44578057e-02 1.63543234e-03 7.82653968e-04 -2.02212291e-03 2.59065949e-03 2.35875972e-03 1.43071006e-01 2.06868017e-01 -1.43370476e-01 1.40393455e-04 -1.43484488e-01 1.50424335e-01 -1.47300844e-04 1.50543956e-01 -1.38427655e-02 4.70319070e-05 -4.80674051e-02 2.40527917e-02 4.70693080e-05 6.17723056e-02 1.55089447e-01 -3.78145064e-02 4.41097493e-02 -1.13965224e-01 5.71745301e-02 -6.66927702e-02 1.72312394e-01 1.92266567e-02 9.20112606e-03 -2.37727126e-02 3.04566073e-02 2.77303207e-02 7.00978352e-02 1.43370476e-01 -6.93202600e-02 1.10463434e-04 -1.12895499e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 7.02935424e-04 4.08315227e-05 -4.17305074e-02 2.82339372e-02 5.52514609e-05 1.13152740e-02 3.78145064e-02 5.17524973e-03 1.10763141e-02 -2.86175876e-02 -1.54072111e-02 -2.20928118e-02 5.70806292e-02 5.26910906e-03 6.22556082e-05 -1.60848213e-04 5.72990161e-03 5.21699636e-03 -6.86422865e-05 -1.40393455e-04 1.10463434e-04 4.34854252e-02 1.10551277e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 2.42116850e-05 1.46808232e-02 5.52514609e-05 -4.20237084e-05 1.46924978e-02 -1.31990060e-02 -4.41097493e-02 1.10763141e-02 1.75051270e-03 3.33817556e-02 -2.20928118e-02 -8.57623191e-03 -6.65832370e-02 -3.25587812e-03 -5.88598340e-04 5.21699636e-03 -8.35258050e-03 -1.77391557e-03 7.01535788e-02 1.43484488e-01 -1.12895499e-01 1.10551277e-04 -6.94997435e-02 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -2.47447519e-02 5.52514609e-05 -4.17870511e-02 1.35638376e-02 4.09193626e-05 3.41019321e-02 1.13965224e-01 -2.86175876e-02 3.33817556e-02 -7.15768052e-02 5.70806292e-02 -6.65832370e-02 1.37682408e-01 8.41212850e-03 5.21699636e-03 -1.20484016e-02 1.29571666e-02 1.40541824e-02 -1.48682692e-01 -1.50424335e-01 9.00635145e-02 -1.70974588e-04 1.74738923e-01 -3.55921032e-02 1.55449069e-04 -1.58871580e-01 -1.91206163e-02 -4.43023376e-05 4.52777390e-02 -4.12440938e-02 -8.07112526e-05 -2.80237262e-02 -5.71745301e-02 -1.54072111e-02 -2.20928118e-02 5.70806292e-02 4.25257067e-02 3.04882304e-02 -7.87716562e-02 -1.84445044e-02 1.05977232e-03 -2.73810647e-03 -1.86980008e-02 -1.70242718e-02 1.45595366e-04 1.47300844e-04 -1.70974588e-04 -8.45363947e-02 -1.71110551e-04 1.55449069e-04 1.23153086e-01 1.55572686e-04 -4.42274240e-05 -3.71153887e-02 -8.07112526e-05 7.67324619e-05 -3.71449038e-02 3.26890301e-02 6.66927702e-02 -2.20928118e-02 -8.57623191e-03 -6.65832370e-02 3.04882304e-02 3.30989090e-02 9.18853195e-02 9.89553597e-03 8.38048397e-04 -1.70242718e-02 2.85193385e-02 2.52570725e-03 -1.48800929e-01 -1.50543956e-01 1.74738923e-01 -1.71110551e-04 9.03413179e-02 -1.58871580e-01 1.55572686e-04 -3.58446805e-02 4.52011760e-02 -8.07112526e-05 4.53727988e-02 -4.13190929e-03 -4.44306539e-05 -8.44578057e-02 -1.72312394e-01 5.70806292e-02 -6.65832370e-02 1.37682408e-01 -7.87716562e-02 9.18853195e-02 -1.68739009e-01 -2.55668416e-02 -1.70242718e-02 3.82340501e-02 -3.90192549e-02 -4.45991373e-02 -6.07138617e-03 -1.38427655e-02 -7.02935424e-04 -2.42116850e-05 2.47447519e-02 1.91206163e-02 4.42274240e-05 -4.52011760e-02 -7.63060578e-03 -1.37801588e-05 1.40835555e-02 -1.38310503e-02 -2.70662122e-05 1.63543234e-03 1.92266567e-02 -5.26910906e-03 3.25587812e-03 -8.41212850e-03 1.84445044e-02 -9.89553597e-03 2.55668416e-02 1.13810821e-03 8.31795081e-06 -2.14908754e-05 1.77270573e-03 1.61402411e-03 2.06280218e-05 4.70319070e-05 -4.08315227e-05 -1.46808232e-02 -5.52514609e-05 4.43023376e-05 3.71153887e-02 8.07112526e-05 -1.37801588e-05 -7.76985917e-03 -5.55388330e-05 3.92849961e-05 -7.82683976e-03 7.82653968e-04 9.20112606e-03 -6.22556082e-05 5.88598340e-04 -5.21699636e-03 -1.05977232e-03 -8.38048397e-04 1.70242718e-02 8.31795081e-06 2.01235299e-04 -1.14496448e-03 -1.28280156e-05 1.05192446e-03 -2.10821875e-02 -4.80674051e-02 4.17305074e-02 -5.52514609e-05 4.17870511e-02 -4.52777390e-02 8.07112526e-05 -4.53727988e-02 1.40835555e-02 -5.55388330e-05 4.89917140e-02 -2.44961278e-02 -5.55951839e-05 -2.02212291e-03 -2.37727126e-02 1.60848213e-04 -5.21699636e-03 1.20484016e-02 2.73810647e-03 1.70242718e-02 -3.82340501e-02 -2.14908754e-05 -1.14496448e-03 2.71629698e-03 -1.53977048e-03 -9.90276353e-04 1.05494662e-02 2.40527917e-02 -2.82339372e-02 4.20237084e-05 -1.35638376e-02 4.12440938e-02 -7.67324619e-05 4.13190929e-03 -1.38310503e-02 3.92849961e-05 -2.44961278e-02 8.39198690e-03 3.16518569e-05 2.59065949e-03 3.04566073e-02 -5.72990161e-03 8.35258050e-03 -1.29571666e-02 1.86980008e-02 -2.85193385e-02 3.90192549e-02 1.77270573e-03 -1.28280156e-05 -1.53977048e-03 3.18753395e-03 8.78722856e-04 2.06444258e-05 4.70693080e-05 -5.52514609e-05 -1.46924978e-02 -4.09193626e-05 8.07112526e-05 3.71449038e-02 4.44306539e-05 -2.70662122e-05 -7.82683976e-03 -5.55951839e-05 3.16518569e-05 -7.78230244e-03 2.35875972e-03 2.77303207e-02 -5.21699636e-03 1.77391557e-03 -1.40541824e-02 1.70242718e-02 -2.52570725e-03 4.45991373e-02 1.61402411e-03 1.05192446e-03 -9.90276353e-04 8.78722856e-04 3.02248513e-03 1.23706992e-02 6.15231308e-02 -3.39513582e-02 -1.31325473e-02 -1.12794339e-02 8.41260872e-02 3.25403718e-02 2.79486503e-02 -3.03618104e-03 -2.33807497e-03 -2.00815283e-03 -1.18611647e-04 -7.76763094e-04 3.92374918e-02 1.43569413e-01 -7.04490824e-02 -6.89958743e-05 -7.03930517e-02 1.49282270e-01 1.46202908e-04 1.49163540e-01 -6.14498615e-03 -2.08146796e-05 -2.12361802e-02 1.06096349e-02 -2.07981249e-05 6.15231308e-02 1.54844065e-01 -1.13664255e-01 -4.39658759e-02 -3.77619192e-02 1.72155141e-01 6.65904296e-02 5.71939572e-02 -3.58953578e-02 -2.76419742e-02 -2.37414580e-02 -1.40229040e-03 -9.18330918e-03 1.43569413e-01 2.07048455e-01 -1.43676788e-01 -1.40713055e-04 -1.43562517e-01 1.50519643e-01 1.47414757e-04 1.50399929e-01 -1.38830541e-02 -4.70255451e-05 -4.79778198e-02 2.39698076e-02 -4.69881440e-05 3.39513582e-02 1.13664255e-01 -7.13383490e-02 -3.32411204e-02 -2.85505174e-02 1.37362698e-01 6.63630094e-02 5.69986279e-02 -1.53617180e-02 -1.39802004e-02 -1.20074760e-02 -7.93220564e-04 -5.19463707e-03 7.04490824e-02 1.43676788e-01 -6.96334486e-02 -1.10992647e-04 -1.13240266e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 6.53646142e-04 -4.11329686e-05 -4.19659177e-02 2.83467977e-02 -5.55683815e-05 1.31325473e-02 4.39658759e-02 -3.32411204e-02 1.74154823e-03 -1.10434763e-02 6.63630094e-02 -8.53496881e-03 2.20473411e-02 -8.80987727e-03 -1.76741563e-03 -5.19463707e-03 1.34895642e-03 -5.87176737e-04 6.89958743e-05 1.40713055e-04 -1.10992647e-04 4.36968444e-02 -1.10904371e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -2.44393156e-05 1.47845630e-02 -5.55683815e-05 4.22417099e-05 1.47728043e-02 1.12794339e-02 3.77619192e-02 -2.85505174e-02 -1.10434763e-02 5.11422370e-03 5.69986279e-02 2.20473411e-02 -1.52682224e-02 -7.56672913e-03 -5.19463707e-03 -1.80974500e-04 -1.68566005e-03 -7.00017999e-05 7.03930517e-02 1.43562517e-01 -1.13240266e-01 -1.10904371e-04 -6.94532486e-02 1.75005510e-01 1.71395535e-04 9.00027746e-02 -2.49342156e-02 -5.55683815e-05 -4.19090325e-02 1.35513938e-02 -4.10445423e-05 -8.41260872e-02 -1.72155141e-01 1.37362698e-01 6.63630094e-02 5.69986279e-02 -1.68775446e-01 -9.17660807e-02 -7.88171111e-02 4.64925669e-02 4.44607238e-02 3.81869399e-02 2.59368650e-03 1.69855153e-02 -1.49282270e-01 -1.50519643e-01 9.02812621e-02 1.71531961e-04 1.75005510e-01 -3.55489594e-02 -1.55719463e-04 -1.58872807e-01 -1.91751556e-02 4.43042779e-05 4.52014465e-02 -4.11852851e-02 8.07357378e-05 -3.25403718e-02 -6.65904296e-02 6.63630094e-02 -8.53496881e-03 2.20473411e-02 -9.17660807e-02 3.29703338e-02 -3.04868345e-02 2.95295225e-02 2.54240175e-03 1.69855153e-02 -5.66282195e-03 8.44645222e-04 -1.46202908e-04 -1.47414757e-04 1.71531961e-04 -8.48633789e-02 1.71395535e-04 -1.55719463e-04 1.23450153e-01 -1.55595614e-04 4.44328321e-05 -3.72643260e-02 8.07357378e-05 -7.68314473e-05 -3.72346883e-02 -2.79486503e-02 -5.71939572e-02 5.69986279e-02 2.20473411e-02 -1.52682224e-02 -7.88171111e-02 -3.04868345e-02 4.22810070e-02 2.53626573e-02 1.69855153e-02 -2.64497125e-03 6.58711633e-03 -1.02308750e-03 -1.49163540e-01 -1.50399929e-01 1.75005510e-01 1.71395535e-04 9.00027746e-02 -1.58872807e-01 -1.55595614e-04 -3.52961440e-02 4.53326039e-02 8.07357378e-05 4.51062441e-02 -3.91776154e-03 4.41758025e-05 -3.03618104e-03 -3.58953578e-02 1.53617180e-02 8.80987727e-03 7.56672913e-03 -4.64925669e-02 -2.95295225e-02 -2.53626573e-02 4.15388496e-03 1.51567692e-03 1.30180210e-03 -3.91446256e-06 -2.56350040e-05 -6.14498615e-03 -1.38830541e-02 -6.53646142e-04 2.44393156e-05 2.49342156e-02 1.91751556e-02 -4.44328321e-05 -4.53326039e-02 -7.71510376e-03 1.39644645e-05 1.42472471e-02 -1.39829968e-02 2.74109445e-05 -2.33807497e-03 -2.76419742e-02 1.39802004e-02 1.76741563e-03 5.19463707e-03 -4.44607238e-02 -2.54240175e-03 -1.69855153e-02 1.51567692e-03 2.99062043e-03 9.56829414e-04 9.58095509e-04 1.04178808e-03 -2.08146796e-05 -4.70255451e-05 4.11329686e-05 -1.47845630e-02 5.55683815e-05 -4.43042779e-05 3.72643260e-02 -8.07357378e-05 1.39644645e-05 -7.87414572e-03 5.60042492e-05 -3.96375293e-05 -7.93332691e-03 -2.00815283e-03 -2.37414580e-02 1.20074760e-02 5.19463707e-03 1.80974500e-04 -3.81869399e-02 -1.69855153e-02 2.64497125e-03 1.30180210e-03 9.56829414e-04 2.69840492e-03 -7.56817790e-04 1.13600575e-03 -2.12361802e-02 -4.79778198e-02 4.19659177e-02 5.55683815e-05 4.19090325e-02 -4.52014465e-02 -8.07357378e-05 -4.51062441e-02 1.42472471e-02 5.60042492e-05 4.92641434e-02 -2.45734168e-02 5.59473429e-05 -1.18611647e-04 -1.40229040e-03 7.93220564e-04 -1.34895642e-03 1.68566005e-03 -2.59368650e-03 5.66282195e-03 -6.58711633e-03 -3.91446256e-06 9.58095509e-04 -7.56817790e-04 1.19175253e-04 1.27804831e-05 1.06096349e-02 2.39698076e-02 -2.83467977e-02 -4.22417099e-05 -1.35513938e-02 4.11852851e-02 7.68314473e-05 3.91776154e-03 -1.39829968e-02 -3.96375293e-05 -2.45734168e-02 8.37887676e-03 -3.18362629e-05 -7.76763094e-04 -9.18330918e-03 5.19463707e-03 5.87176737e-04 7.00017999e-05 -1.69855153e-02 -8.44645222e-04 1.02308750e-03 -2.56350040e-05 1.04178808e-03 1.13600575e-03 1.27804831e-05 2.00920410e-04 -2.07981249e-05 -4.69881440e-05 5.55683815e-05 -1.47728043e-02 4.10445423e-05 -8.07357378e-05 3.72346883e-02 -4.41758025e-05 2.74109445e-05 -7.93332691e-03 5.59473429e-05 -3.18362629e-05 -7.86152136e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 0 676 + 3.90200104e-02 1.43040610e-01 -7.00758462e-02 7.01395746e-02 -6.06185730e-05 1.48644876e-01 -1.48780057e-01 1.28584109e-04 -6.06660721e-03 2.10728168e-02 -1.82123158e-05 -1.05459825e-02 1.82288785e-05 9.99378977e-03 5.18590704e-02 -9.11151051e-03 2.89227928e-02 -9.16581164e-03 2.30209885e-02 -7.30758397e-02 2.31581848e-02 1.17096127e-03 1.41678534e-03 -4.48988024e-04 -2.02282867e-03 1.42522885e-03 1.43040610e-01 2.06856968e-01 -1.43350536e-01 1.43480902e-01 -1.24004281e-04 1.50417204e-01 -1.50553997e-01 1.30117248e-04 -1.38395888e-02 4.80728535e-02 -4.15472691e-05 -2.40582680e-02 4.15850530e-05 5.18590704e-02 1.44607428e-01 -3.28085725e-02 1.04144702e-01 -3.30040991e-02 5.33871165e-02 -1.69467457e-01 5.37052834e-02 1.73495615e-02 2.09918168e-02 -6.65243636e-03 -2.99712649e-02 2.11169200e-02 7.00758462e-02 1.43350536e-01 -6.92992616e-02 1.12874473e-01 -9.75524806e-05 9.00472379e-02 -1.74722617e-01 1.51005132e-04 7.06744227e-04 4.17155764e-02 -3.60529520e-05 -2.82273075e-02 4.87912961e-05 9.11151051e-03 3.28085725e-02 4.19206060e-03 2.44897752e-02 -7.76096100e-03 -1.27469896e-02 -5.07391252e-02 1.60795421e-02 4.07579921e-03 2.87225012e-04 -9.10233799e-05 -5.01441593e-03 3.53301806e-03 -7.01395746e-02 -1.43480902e-01 1.12874473e-01 -6.95044687e-02 9.76411967e-05 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 2.47326054e-02 -4.17802159e-02 4.87912961e-05 1.35651915e-02 -3.61416551e-05 -2.89227928e-02 -1.04144702e-01 2.44897752e-02 -6.58311864e-02 2.46357250e-02 -5.07391252e-02 1.32330630e-01 -5.10415110e-02 -7.35223992e-03 -1.01325428e-02 3.53301806e-03 1.26924669e-02 -1.01929289e-02 6.06185730e-05 1.24004281e-04 -9.75524806e-05 9.76411967e-05 4.34725702e-02 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -2.13753113e-05 4.87912961e-05 1.46743990e-02 -3.71118284e-05 -1.46877442e-02 9.16581164e-03 3.30040991e-02 -7.76096100e-03 2.46357250e-02 4.09982986e-03 1.60795421e-02 -5.10415110e-02 -1.25559014e-02 2.32997023e-03 3.53301806e-03 -1.03710972e-04 -6.06627873e-03 3.29211161e-04 -1.48644876e-01 -1.50417204e-01 9.00472379e-02 -1.74722617e-01 1.51005132e-04 -3.55920291e-02 1.58871492e-01 -1.37305696e-04 -1.91183423e-02 -4.52813592e-02 3.91347024e-05 4.12480311e-02 -7.12977992e-05 -2.30209885e-02 -5.33871165e-02 -1.27469896e-02 -5.07391252e-02 1.60795421e-02 3.65649381e-02 7.62372868e-02 -2.41600669e-02 -1.52636792e-02 1.39121977e-03 -4.40886135e-04 1.77023407e-02 -1.24725772e-02 1.48780057e-01 1.50553997e-01 -1.74722617e-01 9.03648857e-02 -1.51142459e-04 1.58871492e-01 -3.58808593e-02 1.37430565e-04 -4.51923078e-02 4.53900595e-02 -7.12977992e-05 -4.14573359e-03 3.92643227e-05 7.30758397e-02 1.69467457e-01 -5.07391252e-02 1.32330630e-01 -5.10415110e-02 7.62372868e-02 -1.81419192e-01 7.66916320e-02 2.45668896e-02 3.50131019e-02 -1.24725772e-02 -4.24028776e-02 3.52217666e-02 -1.28584109e-04 -1.30117248e-04 1.51005132e-04 -1.51142459e-04 -8.45164968e-02 -1.37305696e-04 1.37430565e-04 1.23134994e-01 3.90577392e-05 -7.12977992e-05 -3.71060027e-02 6.77796089e-05 3.71397476e-02 -2.31581848e-02 -5.37052834e-02 1.60795421e-02 -5.10415110e-02 -1.25559014e-02 -2.41600669e-02 7.66916320e-02 3.62778215e-02 -7.78539900e-03 -1.24725772e-02 -3.91579600e-04 2.21779461e-02 1.24299650e-03 -6.06660721e-03 -1.38395888e-02 -7.06744227e-04 -2.47326054e-02 2.13753113e-05 1.91183423e-02 4.51923078e-02 -3.90577392e-05 -7.62586988e-03 -1.40726582e-02 1.21623842e-05 1.38215649e-02 -2.38907685e-05 1.17096127e-03 1.73495615e-02 -4.07579921e-03 7.35223992e-03 -2.32997023e-03 1.52636792e-02 -2.45668896e-02 7.78539900e-03 6.04145709e-04 -8.41388669e-04 2.66641265e-04 -8.58492100e-04 6.04869668e-04 2.10728168e-02 4.80728535e-02 -4.17155764e-02 4.17802159e-02 -4.87912961e-05 4.52813592e-02 -4.53900595e-02 7.12977992e-05 -1.40726582e-02 4.89750822e-02 -4.90366322e-05 -2.44919408e-02 4.90935259e-05 1.41678534e-03 2.09918168e-02 -2.87225012e-04 1.01325428e-02 -3.53301806e-03 -1.39121977e-03 -3.50131019e-02 1.24725772e-02 -8.41388669e-04 2.05259085e-03 -6.99665348e-04 -2.10172243e-04 -1.74816655e-04 -1.82123158e-05 -4.15472691e-05 3.60529520e-05 -4.87912961e-05 -1.46743990e-02 -3.91347024e-05 7.12977992e-05 3.71060027e-02 1.21623842e-05 -4.90366322e-05 -7.76340215e-03 3.46850220e-05 7.82037819e-03 -4.48988024e-04 -6.65243636e-03 9.10233799e-05 -3.53301806e-03 1.03710972e-04 4.40886135e-04 1.24725772e-02 3.91579600e-04 2.66641265e-04 -6.99665348e-04 6.65194459e-05 -4.61315641e-04 -6.93877628e-04 -1.05459825e-02 -2.40582680e-02 2.82273075e-02 -1.35651915e-02 3.71118284e-05 -4.12480311e-02 4.14573359e-03 -6.77796089e-05 1.38215649e-02 -2.44919408e-02 3.46850220e-05 8.39319630e-03 -2.79515653e-05 -2.02282867e-03 -2.99712649e-02 5.01441593e-03 -1.26924669e-02 6.06627873e-03 -1.77023407e-02 4.24028776e-02 -2.21779461e-02 -8.58492100e-04 -2.10172243e-04 -4.61315641e-04 1.60275872e-03 6.26467890e-04 1.82288785e-05 4.15850530e-05 -4.87912961e-05 3.61416551e-05 1.46877442e-02 7.12977992e-05 -3.92643227e-05 -3.71397476e-02 -2.38907685e-05 4.90935259e-05 7.82037819e-03 -2.79515653e-05 -7.77761969e-03 1.42522885e-03 2.11169200e-02 -3.53301806e-03 1.01929289e-02 -3.29211161e-04 1.24725772e-02 -3.52217666e-02 -1.24299650e-03 6.04869668e-04 -1.74816655e-04 -6.93877628e-04 6.26467890e-04 2.05051334e-03 1.53743222e-02 7.29622311e-02 -4.20995346e-02 1.17455878e-02 1.40434402e-02 1.02034176e-01 -2.84670929e-02 -3.40362633e-02 -4.71173969e-03 2.51465171e-03 3.00660654e-03 1.50679064e-04 -8.38830200e-04 3.92500494e-02 1.43599898e-01 -7.04711972e-02 7.04071004e-02 6.09690816e-05 1.49320233e-01 -1.49184420e-01 -1.29186361e-04 -6.14982268e-03 2.12456198e-02 1.83976605e-05 -1.06131400e-02 -1.83809269e-05 7.29622311e-02 1.65347928e-01 -1.30364916e-01 3.63712467e-02 4.34867492e-02 1.83364298e-01 -5.11578448e-02 -6.11661289e-02 -4.33380961e-02 2.31295073e-02 2.76544571e-02 1.38593050e-03 -7.71547373e-03 1.43599898e-01 2.07059446e-01 -1.43696713e-01 1.43566014e-01 1.24321098e-04 1.50526721e-01 -1.50389810e-01 -1.30230169e-04 -1.38862174e-02 4.79723254e-02 4.15416713e-05 -2.39643282e-02 -4.15038872e-05 4.20995346e-02 1.30364916e-01 -8.76787727e-02 2.94790858e-02 3.52462378e-02 1.61872875e-01 -5.65511903e-02 -6.76146037e-02 -2.13225981e-02 1.33837026e-02 1.60020283e-02 9.01283632e-04 -5.01744509e-03 7.04711972e-02 1.43696713e-01 -6.96545637e-02 1.13261353e-01 9.80787537e-05 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 6.49774041e-04 4.19809586e-02 3.63534427e-05 -2.83534715e-02 -4.91054568e-05 -1.17455878e-02 -3.63712467e-02 2.94790858e-02 9.75813647e-03 -9.83354765e-03 -5.65511903e-02 -2.50451736e-02 1.88641815e-02 8.82001777e-03 1.74496303e-03 -5.01744509e-03 -1.90908763e-03 -5.82079688e-04 -7.04071004e-02 -1.43566014e-01 1.13261353e-01 -6.94484370e-02 -9.79895466e-05 -1.75021767e-01 8.99790234e-02 1.51422380e-04 2.49464601e-02 -4.19158809e-02 -4.91054568e-05 1.35500312e-02 3.62640747e-05 -1.40434402e-02 -4.34867492e-02 3.52462378e-02 -9.83354765e-03 6.22533626e-03 -6.76146037e-02 1.88641815e-02 -1.82680280e-02 1.05455253e-02 -5.01744509e-03 -5.76042379e-05 1.68127756e-03 1.60713328e-05 -6.09690816e-05 -1.24321098e-04 9.80787537e-05 -9.79895466e-05 4.37098145e-02 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 2.16024059e-05 -4.91054568e-05 1.47910621e-02 3.73270966e-05 -1.47776090e-02 -1.02034176e-01 -1.83364298e-01 1.61872875e-01 -5.65511903e-02 -6.76146037e-02 -1.79837830e-01 7.17187514e-02 8.57494762e-02 5.78963933e-02 -3.84573830e-02 -4.59810076e-02 -2.67902238e-03 1.49141150e-02 -1.49320233e-01 -1.50526721e-01 9.02975491e-02 -1.75021767e-01 -1.51560231e-04 -3.55490351e-02 1.58872868e-01 1.37576080e-04 -1.91774349e-02 -4.51977880e-02 -3.91390585e-05 4.11813359e-02 7.13220712e-05 2.84670929e-02 5.11578448e-02 -5.65511903e-02 -2.50451736e-02 1.88641815e-02 7.17187514e-02 5.72133970e-02 -2.39237324e-02 -2.69820870e-02 -9.93610849e-03 1.49141150e-02 6.99970265e-03 3.31445815e-03 1.49184420e-01 1.50389810e-01 -1.75021767e-01 8.99790234e-02 1.51422380e-04 1.58872868e-01 -3.52598991e-02 -1.37450948e-04 -4.53414527e-02 4.50889048e-02 7.13220712e-05 -3.90395303e-03 -3.90092580e-05 3.40362633e-02 6.11661289e-02 -6.76146037e-02 1.88641815e-02 -1.82680280e-02 8.57494762e-02 -2.39237324e-02 4.86185572e-02 -3.22607378e-02 1.49141150e-02 -4.57806373e-03 -6.58177113e-03 1.27725995e-03 1.29186361e-04 1.30230169e-04 -1.51560231e-04 1.51422380e-04 -8.48834223e-02 1.37576080e-04 -1.37450948e-04 1.23468348e-01 -3.92634651e-05 7.13220712e-05 -3.72737671e-02 -6.78765160e-05 3.72398649e-02 -4.71173969e-03 -4.33380961e-02 2.13225981e-02 -8.82001777e-03 -1.05455253e-02 -5.78963933e-02 2.69820870e-02 3.22607378e-02 8.08020420e-03 -3.49362686e-03 -4.17710386e-03 -1.53438515e-04 8.54192060e-04 -6.14982268e-03 -1.38862174e-02 -6.49774041e-04 -2.49464601e-02 -2.16024059e-05 1.91774349e-02 4.53414527e-02 3.92634651e-05 -7.71985221e-03 -1.42582602e-02 -1.23469512e-05 1.39925551e-02 2.42337454e-05 2.51465171e-03 2.31295073e-02 -1.33837026e-02 -1.74496303e-03 5.01744509e-03 3.84573830e-02 9.93610849e-03 -1.49141150e-02 -3.49362686e-03 3.20044897e-03 2.21055368e-03 -4.36843862e-04 -1.21060436e-03 2.12456198e-02 4.79723254e-02 -4.19809586e-02 4.19158809e-02 4.91054568e-05 4.51977880e-02 -4.50889048e-02 -7.13220712e-05 -1.42582602e-02 4.92807889e-02 4.94990683e-05 -2.45775648e-02 -4.94415450e-05 3.00660654e-03 2.76544571e-02 -1.60020283e-02 5.01744509e-03 5.76042379e-05 4.59810076e-02 -1.49141150e-02 4.57806373e-03 -4.17710386e-03 2.21055368e-03 3.99461246e-03 7.65688611e-04 -1.21607893e-03 1.83976605e-05 4.15416713e-05 -3.63534427e-05 4.91054568e-05 -1.47910621e-02 3.91390585e-05 -7.13220712e-05 3.72737671e-02 -1.23469512e-05 4.94990683e-05 -7.88069639e-03 -3.50341232e-05 7.93987295e-03 1.50679064e-04 1.38593050e-03 -9.01283632e-04 1.90908763e-03 -1.68127756e-03 2.67902238e-03 -6.99970265e-03 6.58177113e-03 -1.53438515e-04 -4.36843862e-04 7.65688611e-04 -2.07788783e-04 -3.39513506e-05 -1.06131400e-02 -2.39643282e-02 2.83534715e-02 -1.35500312e-02 -3.73270966e-05 -4.11813359e-02 3.90395303e-03 6.78765160e-05 1.39925551e-02 -2.45775648e-02 -3.50341232e-05 8.37764785e-03 2.81329305e-05 -8.38830200e-04 -7.71547373e-03 5.01744509e-03 5.82079688e-04 -1.60713328e-05 -1.49141150e-02 -3.31445815e-03 -1.27725995e-03 8.54192060e-04 -1.21060436e-03 -1.21607893e-03 -3.39513506e-05 -2.48803285e-05 -1.83809269e-05 -4.15038872e-05 4.91054568e-05 -3.62640747e-05 1.47776090e-02 -7.13220712e-05 3.90092580e-05 -3.72398649e-02 2.42337454e-05 -4.94415450e-05 7.93987295e-03 2.81329305e-05 -7.86624645e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 1 1 676 + 1.69812269e-04 1.56257026e-03 -3.24737940e-04 6.49748532e-04 3.24434356e-04 1.06336506e-03 -2.12762291e-03 -1.06237096e-03 -4.51611142e-05 -1.04287103e-04 -5.20729446e-05 7.83187515e-05 1.04189610e-04 3.36589120e-05 3.53329930e-04 -3.28578603e-05 1.70274378e-04 3.29195403e-05 1.13778534e-04 -5.89617490e-04 -1.13992116e-04 -3.33667472e-05 -2.31639258e-05 -4.47833547e-06 5.77761039e-05 2.32074085e-05 1.56257026e-03 1.39281933e-02 -2.88844641e-03 5.77931796e-03 2.88574612e-03 9.32883121e-03 -1.86654949e-02 -9.32011008e-03 -2.87377701e-04 -6.63619325e-04 -3.31360362e-04 4.98372620e-04 6.62998935e-04 3.53329930e-04 3.70721251e-03 -3.42508765e-04 1.77493198e-03 3.43151714e-04 1.18796203e-03 -6.15619805e-03 -1.19019204e-03 -3.38468571e-04 -2.34972286e-04 -4.54277368e-05 5.86074369e-04 2.35413370e-04 3.24737940e-04 2.88844641e-03 -4.12926346e-04 1.28212806e-03 6.40195973e-04 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -1.33361885e-04 -8.10521596e-05 -4.04712038e-05 1.33922102e-04 1.78160290e-04 3.28578603e-05 3.42508765e-04 5.19054377e-06 1.71251854e-04 3.31085179e-05 -1.87690470e-05 -5.92304589e-04 -1.14511620e-04 -4.06984097e-05 7.83940667e-06 1.51561067e-06 5.84110525e-05 2.34624536e-05 -6.49748532e-04 -5.77931796e-03 1.28212806e-03 -2.33746393e-03 -1.28092946e-03 -4.14642043e-03 7.53176319e-03 4.14254411e-03 9.83507742e-05 3.08186714e-04 1.78160290e-04 -1.70681803e-04 -3.07898603e-04 -1.70274378e-04 -1.77493198e-03 1.71251854e-04 -8.49215854e-04 -1.71573323e-04 -5.92304589e-04 2.93634542e-03 5.93416448e-04 1.56765014e-04 1.15326316e-04 2.34624536e-05 -2.71436966e-04 -1.15542804e-04 -3.24434356e-04 -2.88574612e-03 6.40195973e-04 -1.28092946e-03 -4.11728801e-04 -2.07040290e-03 4.14254411e-03 1.30390836e-03 4.91087991e-05 1.78160290e-04 4.03425113e-05 -1.82368464e-04 -8.07188943e-05 -3.29195403e-05 -3.43151714e-04 3.31085179e-05 -1.71573323e-04 5.06635927e-06 -1.14511620e-04 5.93416448e-04 -1.83395331e-05 3.03077437e-05 2.34624536e-05 -1.49578885e-06 -6.45638624e-05 7.75140294e-06 -1.06336506e-03 -9.32883121e-03 1.30778124e-03 -4.14642043e-03 -2.07040290e-03 -4.10007140e-03 1.33325342e-02 6.65724034e-03 3.95514409e-04 1.78547270e-04 8.91527502e-05 -3.70647471e-04 -4.93082622e-04 -1.13778534e-04 -1.18796203e-03 -1.87690470e-05 -5.92304589e-04 -1.14511620e-04 6.75139874e-05 2.05173191e-03 3.96666087e-04 1.40634442e-04 -2.84257238e-05 -5.49561109e-06 -2.01394393e-04 -8.08957618e-05 2.12762291e-03 1.86654949e-02 -4.14642043e-03 7.53176319e-03 4.14254411e-03 1.33325342e-02 -2.41128640e-02 -1.33200701e-02 -2.45770524e-04 -8.30070130e-04 -4.93082622e-04 4.26609392e-04 8.29294132e-04 5.89617490e-04 6.15619805e-03 -5.92304589e-04 2.93634542e-03 5.93416448e-04 2.05173191e-03 -1.01689467e-02 -2.05558337e-03 -5.39701008e-04 -3.97362023e-04 -8.08957618e-05 9.34486141e-04 3.98107941e-04 1.06237096e-03 9.32011008e-03 -2.07040290e-03 4.14254411e-03 1.30390836e-03 6.65724034e-03 -1.33200701e-02 -4.08761842e-03 -1.22718864e-04 -4.93082622e-04 -8.87751887e-05 5.27586074e-04 1.77624913e-04 1.13992116e-04 1.19019204e-03 -1.14511620e-04 5.93416448e-04 -1.83395331e-05 3.96666087e-04 -2.05558337e-03 6.60261595e-05 -1.04341647e-04 -8.08957618e-05 5.42676198e-06 2.22878518e-04 -2.81222974e-05 -4.51611142e-05 -2.87377701e-04 1.33361885e-04 -9.83507742e-05 -4.91087991e-05 -3.95514409e-04 2.45770524e-04 1.22718864e-04 -2.47895715e-05 -2.98834622e-05 -1.49214986e-05 3.43621849e-05 4.57129687e-05 -3.33667472e-05 -3.38468571e-04 4.06984097e-05 -1.56765014e-04 -3.03077437e-05 -1.40634442e-04 5.39701008e-04 1.04341647e-04 2.06102268e-05 2.30280306e-05 4.45206254e-06 -3.69806551e-05 -1.48543275e-05 -1.04287103e-04 -6.63619325e-04 8.10521596e-05 -3.08186714e-04 -1.78160290e-04 -1.78547270e-04 8.30070130e-04 4.93082622e-04 -2.98834622e-05 -9.99557848e-05 -4.97128759e-05 7.01632737e-05 8.57249345e-05 -2.31639258e-05 -2.34972286e-04 -7.83940667e-06 -1.15326316e-04 -2.34624536e-05 2.84257238e-05 3.97362023e-04 8.08957618e-05 2.30280306e-05 -1.02826640e-05 -2.02025239e-06 -3.04051856e-05 -1.31996553e-05 -5.20729446e-05 -3.31360362e-04 4.04712038e-05 -1.78160290e-04 -4.03425113e-05 -8.91527502e-05 4.93082622e-04 8.87751887e-05 -1.49214986e-05 -4.97128759e-05 -2.52179989e-05 2.58826758e-05 4.96835272e-05 -4.47833547e-06 -4.54277368e-05 -1.51561067e-06 -2.34624536e-05 1.49578885e-06 5.49561109e-06 8.08957618e-05 -5.42676198e-06 4.45206254e-06 -2.02025239e-06 -2.23607923e-07 -7.70922334e-06 2.00625063e-06 7.83187515e-05 4.98372620e-04 -1.33922102e-04 1.70681803e-04 1.82368464e-04 3.70647471e-04 -4.26609392e-04 -5.27586074e-04 3.43621849e-05 7.01632737e-05 2.58826758e-05 -6.45321359e-05 -6.09423818e-05 5.77761039e-05 5.86074369e-04 -5.84110525e-05 2.71436966e-04 6.45638624e-05 2.01394393e-04 -9.34486141e-04 -2.22878518e-04 -3.69806551e-05 -3.04051856e-05 -7.70922334e-06 6.32732520e-05 3.52063086e-05 1.04189610e-04 6.62998935e-04 -1.78160290e-04 3.07898603e-04 8.07188943e-05 4.93082622e-04 -8.29294132e-04 -1.77624913e-04 4.57129687e-05 8.57249345e-05 4.96835272e-05 -6.09423818e-05 -9.97954284e-05 2.32074085e-05 2.35413370e-04 -2.34624536e-05 1.15542804e-04 -7.75140294e-06 8.08957618e-05 -3.98107941e-04 2.81222974e-05 -1.48543275e-05 -1.31996553e-05 2.00625063e-06 3.52063086e-05 -1.02331543e-05 8.36920400e-05 8.23256641e-04 -2.43113770e-04 2.29692943e-04 2.42962439e-04 8.19823849e-04 -7.74566379e-04 -8.19313531e-04 2.42590059e-06 -7.31058928e-05 -7.73292628e-05 -4.10548237e-06 7.30603863e-05 1.70876587e-04 1.57135665e-03 -3.26693848e-04 6.53113366e-04 3.26999304e-04 1.06946317e-03 -2.13802828e-03 -1.07046310e-03 -4.52529589e-05 -1.04515170e-04 -5.23284157e-05 7.82826168e-05 1.04612890e-04 8.23256641e-04 8.00216601e-03 -2.34807832e-03 2.21845525e-03 2.34661671e-03 7.89001119e-03 -7.45445184e-03 -7.88509987e-03 2.08144515e-05 -6.27255324e-04 -6.63492230e-04 -3.52254186e-05 6.26864874e-04 1.57135665e-03 1.39943214e-02 -2.90348621e-03 5.80453430e-03 2.90620094e-03 9.37356333e-03 -1.87392555e-02 -9.38232751e-03 -2.86815690e-04 -6.62422772e-04 -3.31660316e-04 4.96159440e-04 6.63042130e-04 2.43113770e-04 2.34807832e-03 -6.22857584e-04 6.89443159e-04 7.29272692e-04 2.08061681e-03 -2.31210382e-03 -2.44567540e-03 -4.19748553e-05 -1.71149765e-04 -1.81037186e-04 -1.18622288e-05 2.11097976e-04 3.26693848e-04 2.90348621e-03 -4.15113506e-04 1.28841356e-03 6.45079952e-04 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -1.33613851e-04 -8.08065612e-05 -4.04580439e-05 1.33623619e-04 1.78567779e-04 -2.29692943e-04 -2.21845525e-03 6.89443159e-04 -5.44513868e-04 -6.89013999e-04 -2.31210382e-03 1.81788477e-03 2.31066460e-03 -2.97623893e-05 1.57147242e-04 2.11097976e-04 5.12870831e-05 -1.57049422e-04 -6.53113366e-04 -5.80453430e-03 1.28841356e-03 -2.34638136e-03 -1.28961822e-03 -4.16522749e-03 7.55756377e-03 4.16912193e-03 9.80770187e-05 3.07834441e-04 1.78567779e-04 -1.69540617e-04 -3.08122263e-04 -2.42962439e-04 -2.34661671e-03 7.29272692e-04 -6.89013999e-04 -6.21949397e-04 -2.44567540e-03 2.31066460e-03 2.07757112e-03 -3.14817799e-05 2.11097976e-04 1.80871700e-04 -3.05402781e-05 -1.70886877e-04 -3.26999304e-04 -2.90620094e-03 6.45079952e-04 -1.28961822e-03 -4.16319228e-04 -2.08543656e-03 4.16912193e-03 1.31799284e-03 4.91049770e-05 1.78567779e-04 4.05872025e-05 -1.82611904e-04 -8.11403231e-05 -8.19823849e-04 -7.89001119e-03 2.08061681e-03 -2.31210382e-03 -2.44567540e-03 -6.94238781e-03 7.74809042e-03 8.19570212e-03 1.44191298e-04 5.42185781e-04 5.73508170e-04 3.81082817e-05 -6.78167761e-04 -1.06946317e-03 -9.37356333e-03 1.31409494e-03 -4.16522749e-03 -2.08543656e-03 -4.11750559e-03 1.33872685e-02 6.70270695e-03 3.95744275e-04 1.76844079e-04 8.85418883e-05 -3.69020309e-04 -4.93139890e-04 7.74566379e-04 7.45445184e-03 -2.31210382e-03 1.81788477e-03 2.31066460e-03 7.74809042e-03 -6.06194656e-03 -7.74326744e-03 1.00027946e-04 -4.96754931e-04 -6.78167761e-04 -1.72408940e-04 4.96445715e-04 2.13802828e-03 1.87392555e-02 -4.16522749e-03 7.55756377e-03 4.16912193e-03 1.33872685e-02 -2.41843553e-02 -1.33997855e-02 -2.44113689e-04 -8.26960857e-04 -4.93139890e-04 4.21895582e-04 8.27734056e-04 8.19313531e-04 7.88509987e-03 -2.44567540e-03 2.31066460e-03 2.07757112e-03 8.19570212e-03 -7.74326744e-03 -6.93218143e-03 1.05806619e-04 -6.78167761e-04 -5.72971495e-04 1.06199984e-04 5.41341236e-04 1.07046310e-03 9.38232751e-03 -2.08543656e-03 4.16912193e-03 1.31799284e-03 6.70270695e-03 -1.33997855e-02 -4.13003365e-03 -1.22222283e-04 -4.93139890e-04 -8.89202386e-05 5.27496964e-04 1.77765809e-04 2.42590059e-06 2.08144515e-05 4.19748553e-05 2.97623893e-05 3.14817799e-05 -1.44191298e-04 -1.00027946e-04 -1.05806619e-04 -2.41776686e-05 6.86878223e-06 7.26559579e-06 -8.71383884e-07 1.55069825e-05 -4.52529589e-05 -2.86815690e-04 1.33613851e-04 -9.80770187e-05 -4.91049770e-05 -3.95744275e-04 2.44113689e-04 1.22222283e-04 -2.48654934e-05 -3.04987563e-05 -1.52700474e-05 3.45954558e-05 4.62316000e-05 -7.31058928e-05 -6.27255324e-04 1.71149765e-04 -1.57147242e-04 -2.11097976e-04 -5.42185781e-04 4.96754931e-04 6.78167761e-04 6.86878223e-06 -5.35277731e-06 5.98740490e-06 1.39278394e-05 -4.18916780e-06 -1.04515170e-04 -6.62422772e-04 8.08065612e-05 -3.07834441e-04 -1.78567779e-04 -1.76844079e-04 8.26960857e-04 4.93139890e-04 -3.04987563e-05 -1.00963008e-04 -5.03818370e-05 7.08650300e-05 8.71305384e-05 -7.73292628e-05 -6.63492230e-04 1.81037186e-04 -2.11097976e-04 -1.80871700e-04 -5.73508170e-04 6.78167761e-04 5.72971495e-04 7.26559579e-06 5.98740490e-06 -4.67987681e-06 -1.26092823e-05 -5.96759295e-06 -5.23284157e-05 -3.31660316e-04 4.04580439e-05 -1.78567779e-04 -4.05872025e-05 -8.85418883e-05 4.93139890e-04 8.89202386e-05 -1.52700474e-05 -5.03818370e-05 -2.55607884e-05 2.64098346e-05 5.04119965e-05 -4.10548237e-06 -3.52254186e-05 1.18622288e-05 -5.12870831e-05 3.05402781e-05 -3.81082817e-05 1.72408940e-04 -1.06199984e-04 -8.71383884e-07 1.39278394e-05 -1.26092823e-05 -2.31505545e-05 -1.00298443e-06 7.82826168e-05 4.96159440e-04 -1.33623619e-04 1.69540617e-04 1.82611904e-04 3.69020309e-04 -4.21895582e-04 -5.27496964e-04 3.45954558e-05 7.08650300e-05 2.64098346e-05 -6.47470438e-05 -6.18643903e-05 7.30603863e-05 6.26864874e-04 -2.11097976e-04 1.57049422e-04 1.70886877e-04 6.78167761e-04 -4.96445715e-04 -5.41341236e-04 1.55069825e-05 -4.18916780e-06 -5.96759295e-06 -1.00298443e-06 -5.35799422e-06 1.04612890e-04 6.63042130e-04 -1.78567779e-04 3.08122263e-04 8.11403231e-05 4.93139890e-04 -8.27734056e-04 -1.77765809e-04 4.62316000e-05 8.71305384e-05 5.04119965e-05 -6.18643903e-05 -1.01125864e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 2 -2 676 + 8.15758664e-06 8.95995828e-05 -3.27062093e-05 1.60140991e-08 -3.27192142e-05 1.14303917e-04 -5.59671786e-08 1.14349367e-04 6.47786822e-06 -1.09961516e-08 2.24667923e-05 -1.12378601e-05 -1.10005239e-08 9.16761611e-07 9.62428037e-06 -2.94459776e-06 1.14195204e-06 -4.91605460e-06 9.62626350e-06 -3.73318602e-06 1.60712059e-05 -4.78233232e-07 -6.85165928e-07 2.94960997e-06 -2.32935330e-06 -1.14389583e-06 8.95995828e-05 9.84805909e-04 -3.59497797e-04 1.76022642e-07 -3.59640743e-04 1.25713505e-03 -6.15537104e-07 1.25763492e-03 7.14535282e-05 -1.21292036e-07 2.47817881e-04 -1.23958180e-04 -1.21340265e-07 9.62428037e-06 1.00896020e-04 -3.09897727e-05 1.20182235e-05 -5.17379373e-05 1.01107935e-04 -3.92109283e-05 1.68801367e-04 -5.04632645e-06 -7.22988431e-06 3.11243423e-05 -2.45793817e-05 -1.20704113e-05 3.27062093e-05 3.59497797e-04 -1.26810205e-04 6.54713024e-08 -1.33767722e-04 4.44439428e-04 -2.29262375e-07 4.68417529e-04 2.09343890e-05 -4.30569530e-08 8.79718337e-05 -4.65627599e-05 -4.55793850e-08 2.94459776e-06 3.09897727e-05 -9.10343176e-06 3.69334707e-06 -1.58997009e-05 2.98920798e-05 -1.21136743e-05 5.21488488e-05 -1.85749851e-06 -2.13177469e-06 9.17719874e-06 -7.58920977e-06 -3.72689940e-06 -1.60140991e-08 -1.76022642e-07 6.54713024e-08 6.90431656e-06 6.54973356e-08 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 -1.45878080e-08 -5.11463775e-06 -4.55793850e-08 2.53030645e-08 -5.11667146e-06 -1.14195204e-06 -1.20182235e-05 3.69334707e-06 -1.01222203e-06 6.16610393e-06 -1.21136743e-05 3.35401630e-06 -2.02239792e-05 5.46207240e-07 6.06453501e-07 -3.72689940e-06 3.04373885e-06 1.01248414e-06 3.27192142e-05 3.59640743e-04 -1.33767722e-04 6.54973356e-08 -1.26916563e-04 4.68417529e-04 -2.29353536e-07 4.44811865e-04 2.98050867e-05 -4.55793850e-08 8.80108820e-05 -4.14645807e-05 -4.30931929e-08 4.91605460e-06 5.17379373e-05 -1.58997009e-05 6.16610393e-06 -2.61247089e-05 5.21488488e-05 -2.02239792e-05 8.57195455e-05 -2.35139877e-06 -3.72689940e-06 1.57848730e-05 -1.22374567e-05 -6.12157223e-06 -1.14303917e-04 -1.25713505e-03 4.44439428e-04 -2.29262375e-07 4.68417529e-04 -1.55776448e-03 8.02824710e-07 -1.64029168e-03 -7.41986551e-05 1.52016335e-07 -3.10592247e-04 1.64227548e-04 1.60759170e-07 -9.62626350e-06 -1.01107935e-04 2.98920798e-05 -1.21136743e-05 5.21488488e-05 -9.78678196e-05 3.96189578e-05 -1.70557916e-04 6.08750964e-06 7.02489317e-06 -3.02418642e-05 2.49778859e-05 1.22661082e-05 5.59671786e-08 6.15537104e-07 -2.29262375e-07 -2.37918069e-05 -2.29353536e-07 8.02824710e-07 8.18748505e-05 8.03143934e-07 5.13626078e-08 1.77252502e-05 1.60759170e-07 -8.90904652e-08 1.77322982e-05 3.73318602e-06 3.92109283e-05 -1.21136743e-05 3.35401630e-06 -2.02239792e-05 3.96189578e-05 -1.10724844e-05 6.61445044e-05 -1.80273068e-06 -2.01846201e-06 1.22661082e-05 -1.00089470e-05 -3.36985567e-06 -1.14349367e-04 -1.25763492e-03 4.68417529e-04 -2.29353536e-07 4.44811865e-04 -1.64029168e-03 8.03143934e-07 -1.55906866e-03 -1.04941536e-04 1.60759170e-07 -3.10729845e-04 1.46560472e-04 1.52144154e-07 -1.60712059e-05 -1.68801367e-04 5.21488488e-05 -2.02239792e-05 8.57195455e-05 -1.70557916e-04 6.61445044e-05 -2.80457013e-04 7.76067834e-06 1.22661082e-05 -5.19742337e-05 4.03138977e-05 2.01562613e-05 6.47786822e-06 7.14535282e-05 -2.09343890e-05 1.45878080e-08 -2.98050867e-05 7.41986551e-05 -5.13626078e-08 1.04941536e-04 -8.22186744e-07 -8.01799705e-09 1.63819744e-05 -1.14964989e-05 -1.12537004e-08 -4.78233232e-07 -5.04632645e-06 1.85749851e-06 -5.46207240e-07 2.35139877e-06 -6.08750964e-06 1.80273068e-06 -7.76067834e-06 -1.09979622e-07 4.04167804e-07 -1.73992508e-06 1.00607242e-06 4.94060754e-07 -1.09961516e-08 -1.21292036e-07 4.30569530e-08 5.11463775e-06 4.55793850e-08 -1.52016335e-07 -1.77252502e-05 -1.60759170e-07 -8.01799705e-09 -3.63904034e-06 -2.96775921e-08 1.76437621e-08 -3.81158746e-06 -6.85165928e-07 -7.22988431e-06 2.13177469e-06 -6.06453501e-07 3.72689940e-06 -7.02489317e-06 2.01846201e-06 -1.22661082e-05 4.04167804e-07 3.47729970e-07 -2.16593938e-06 1.85535788e-06 6.11418306e-07 2.24667923e-05 2.47817881e-04 -8.79718337e-05 4.55793850e-08 -8.80108820e-05 3.10592247e-04 -1.60759170e-07 3.10729845e-04 1.63819744e-05 -2.96775921e-08 5.69967315e-05 -2.84256551e-05 -2.96908766e-08 2.94960997e-06 3.11243423e-05 -9.17719874e-06 3.72689940e-06 -1.57848730e-05 3.02418642e-05 -1.22661082e-05 5.19742337e-05 -1.73992508e-06 -2.16593938e-06 9.16887942e-06 -7.44919516e-06 -3.72776060e-06 -1.12378601e-05 -1.23958180e-04 4.65627599e-05 -2.53030645e-08 4.14645807e-05 -1.64227548e-04 8.90904652e-08 -1.46560472e-04 -1.14964989e-05 1.76437621e-08 -2.84256551e-05 1.24829480e-05 1.57844842e-08 -2.32935330e-06 -2.45793817e-05 7.58920977e-06 -3.04373885e-06 1.22374567e-05 -2.49778859e-05 1.00089470e-05 -4.03138977e-05 1.00607242e-06 1.85535788e-06 -7.44919516e-06 5.62756709e-06 2.99322109e-06 -1.10005239e-08 -1.21340265e-07 4.55793850e-08 5.11667146e-06 4.30931929e-08 -1.60759170e-07 -1.77322982e-05 -1.52144154e-07 -1.12537004e-08 -3.81158746e-06 -2.96908766e-08 1.57844842e-08 -3.64207091e-06 -1.14389583e-06 -1.20704113e-05 3.72689940e-06 -1.01248414e-06 6.12157223e-06 -1.22661082e-05 3.36985567e-06 -2.01562613e-05 4.94060754e-07 6.11418306e-07 -3.72776060e-06 2.99322109e-06 1.00227816e-06 8.90254449e-07 9.33806657e-06 -4.78068480e-06 -1.11009197e-06 -2.86423093e-06 1.56106705e-05 3.62485305e-06 9.35275324e-06 2.19749181e-06 1.11371546e-06 2.87358018e-06 -7.31513469e-07 6.67255509e-07 8.27679714e-06 9.08980152e-05 -3.31731044e-05 -1.62438414e-08 -3.31599130e-05 1.15947314e-04 5.67758070e-08 1.15901207e-04 6.56977077e-06 1.11352091e-08 2.27312343e-05 -1.13610948e-05 1.11307811e-08 9.33806657e-06 9.78148514e-05 -5.02681700e-05 -1.16724474e-05 -3.01169505e-05 1.63823142e-04 3.80403146e-05 9.81506479e-05 2.31657426e-05 1.17406789e-05 3.02929997e-05 -7.71154306e-06 7.03414196e-06 9.08980152e-05 9.99002029e-04 -3.64564650e-04 -1.78516013e-07 -3.64419679e-04 1.27504401e-03 6.24349544e-07 1.27453698e-03 7.24475934e-05 1.22792579e-07 2.50666770e-04 -1.25283515e-04 1.22743750e-07 4.78068480e-06 5.02681700e-05 -2.54448777e-05 -6.00230520e-06 -1.54869945e-05 8.33870125e-05 1.96628832e-05 5.07336689e-05 1.14873170e-05 5.96918927e-06 1.54015497e-05 -3.98432869e-06 3.63433536e-06 3.31731044e-05 3.64564650e-04 -1.28563202e-04 -6.63959062e-08 -1.35539521e-04 4.50611937e-04 2.32516738e-07 4.74655879e-04 2.12092296e-05 4.35812986e-08 8.89661525e-05 -4.70642248e-05 4.61101322e-08 1.11009197e-06 1.16724474e-05 -6.00230520e-06 -9.89308139e-07 -3.59613506e-06 1.96628832e-05 3.27329090e-06 1.17805379e-05 2.83518991e-06 9.91358903e-07 3.63433536e-06 -1.02205126e-06 5.93948556e-07 1.62438414e-08 1.78516013e-07 -6.63959062e-08 7.03020590e-06 -6.63695036e-08 2.32516738e-07 -2.42326525e-05 2.32424277e-07 1.47973422e-08 -5.20181119e-06 4.61101322e-08 -2.55930694e-08 -5.19974266e-06 2.86423093e-06 3.01169505e-05 -1.54869945e-05 -3.59613506e-06 -8.87420739e-06 5.07336689e-05 1.17805379e-05 2.91033425e-05 7.31528458e-06 3.63433536e-06 8.96001628e-06 -2.13715655e-06 2.08054756e-06 3.31599130e-05 3.64419679e-04 -1.35539521e-04 -6.63695036e-08 -1.28455384e-04 4.74655879e-04 2.32424277e-07 4.50234363e-04 3.02070532e-05 4.61101322e-08 8.89266385e-05 -4.18457443e-05 4.35446194e-08 -1.56106705e-05 -1.63823142e-04 8.33870125e-05 1.96628832e-05 5.07336689e-05 -2.72506438e-04 -6.42346849e-05 -1.65736693e-04 -3.77998022e-05 -1.96288821e-05 -5.06459400e-05 1.30963945e-05 -1.19459747e-05 -1.15947314e-04 -1.27504401e-03 4.50611937e-04 2.32516738e-07 4.74655879e-04 -1.57956493e-03 -8.14311739e-07 -1.66232271e-03 -7.51733537e-05 -1.53874803e-07 -3.14117514e-04 1.66005504e-04 -1.62640217e-07 -3.62485305e-06 -3.80403146e-05 1.96628832e-05 3.27329090e-06 1.17805379e-05 -6.42346849e-05 -1.07910216e-05 -3.84846479e-05 -9.31441188e-06 -3.29430718e-06 -1.19459747e-05 3.35116090e-06 -1.97370396e-06 -5.67758070e-08 -6.24349544e-07 2.32516738e-07 -2.42326525e-05 2.32424277e-07 -8.14311739e-07 8.34186783e-05 -8.13987924e-07 -5.21042689e-08 1.80327429e-05 -1.62640217e-07 9.01178660e-08 1.80255721e-05 -9.35275324e-06 -9.81506479e-05 5.07336689e-05 1.17805379e-05 2.91033425e-05 -1.65736693e-04 -3.84846479e-05 -9.51726054e-05 -2.40328076e-05 -1.19459747e-05 -2.94870963e-05 7.04619228e-06 -6.84700834e-06 -1.15901207e-04 -1.27453698e-03 4.74655879e-04 2.32424277e-07 4.50234363e-04 -1.66232271e-03 -8.13987924e-07 -1.57824260e-03 -1.06364805e-04 -1.62640217e-07 -3.13978265e-04 1.47913839e-04 -1.53745428e-07 2.19749181e-06 2.31657426e-05 -1.14873170e-05 -2.83518991e-06 -7.31528458e-06 3.77998022e-05 9.31441188e-06 2.40328076e-05 4.95338539e-06 2.77264013e-06 7.15389523e-06 -1.93561526e-06 1.76558601e-06 6.56977077e-06 7.24475934e-05 -2.12092296e-05 -1.47973422e-08 -3.02070532e-05 7.51733537e-05 5.21042689e-08 1.06364805e-04 -8.44098719e-07 8.10990595e-09 1.65554298e-05 -1.16233331e-05 1.13877032e-08 1.11371546e-06 1.17406789e-05 -5.96918927e-06 -9.91358903e-07 -3.63433536e-06 1.96288821e-05 3.29430718e-06 1.19459747e-05 2.77264013e-06 9.83389299e-07 3.64136447e-06 -1.04294324e-06 5.99892467e-07 1.11352091e-08 1.22792579e-07 -4.35812986e-08 5.20181119e-06 -4.61101322e-08 1.53874803e-07 -1.80327429e-05 1.62640217e-07 8.10990595e-09 -3.69543062e-06 2.99513513e-08 -1.78115422e-08 -3.86851395e-06 2.87358018e-06 3.02929997e-05 -1.54015497e-05 -3.63433536e-06 -8.96001628e-06 5.06459400e-05 1.19459747e-05 2.94870963e-05 7.15389523e-06 3.64136447e-06 8.96745872e-06 -2.17168563e-06 2.11712569e-06 2.27312343e-05 2.50666770e-04 -8.89661525e-05 -4.61101322e-08 -8.89266385e-05 3.14117514e-04 1.62640217e-07 3.13978265e-04 1.65554298e-05 2.99513513e-08 5.74467552e-05 -2.86231329e-05 2.99379342e-08 -7.31513469e-07 -7.71154306e-06 3.98432869e-06 1.02205126e-06 2.13715655e-06 -1.30963945e-05 -3.35116090e-06 -7.04619228e-06 -1.93561526e-06 -1.04294324e-06 -2.17168563e-06 4.45481592e-07 -5.64563582e-07 -1.13610948e-05 -1.25283515e-04 4.70642248e-05 2.55930694e-08 4.18457443e-05 -1.66005504e-04 -9.01178660e-08 -1.47913839e-04 -1.16233331e-05 -1.78115422e-08 -2.86231329e-05 1.25469982e-05 -1.59101603e-08 6.67255509e-07 7.03414196e-06 -3.63433536e-06 -5.93948556e-07 -2.08054756e-06 1.19459747e-05 1.97370396e-06 6.84700834e-06 1.76558601e-06 5.99892467e-07 2.11712569e-06 -5.64563582e-07 3.41520390e-07 1.11307811e-08 1.22743750e-07 -4.61101322e-08 5.19974266e-06 -4.35446194e-08 1.62640217e-07 -1.80255721e-05 1.53745428e-07 1.13877032e-08 -3.86851395e-06 2.99379342e-08 -1.59101603e-08 -3.69235334e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 2 -1 676 + 1.69438374e-04 1.55948196e-03 -6.48046884e-04 3.24329437e-04 -3.24292434e-04 2.12226517e-03 -1.06213468e-03 1.06201350e-03 9.01124270e-05 -1.04212802e-04 1.04200912e-04 5.95006197e-09 -5.21496576e-05 4.27528697e-05 4.42336404e-04 -1.25133893e-04 1.32059770e-04 -1.25381829e-04 4.30853287e-04 -4.54700037e-04 4.31706964e-04 -1.64395317e-06 -5.10511092e-05 4.84695790e-05 2.65552855e-06 -5.11522600e-05 1.55948196e-03 1.39049300e-02 -5.76583102e-03 2.88563802e-03 -2.88530880e-03 1.86246236e-02 -9.32110598e-03 9.32004254e-03 5.74223138e-04 -6.64074910e-04 6.63999146e-04 3.79155613e-08 -3.32313100e-04 4.42336404e-04 4.56598541e-03 -1.28272385e-03 1.35371970e-03 -1.28526539e-03 4.42070625e-03 -4.66538229e-03 4.42946528e-03 -1.61669669e-05 -5.02046901e-04 4.76659613e-04 2.61150032e-05 -5.03041639e-04 6.48046884e-04 5.76583102e-03 -2.33022970e-03 1.27999418e-03 -1.27984815e-03 7.50943102e-03 -4.14005158e-03 4.13957924e-03 1.96239779e-04 -3.08003259e-04 3.07968119e-04 2.03596901e-08 -1.78443665e-04 1.25133893e-04 1.28272385e-03 -3.27415119e-04 3.98710005e-04 -3.78548212e-04 1.12326614e-03 -1.37006036e-03 1.30077975e-03 -3.14957453e-05 -1.29717138e-04 1.23157658e-04 8.00913612e-06 -1.54276410e-04 -3.24329437e-04 -2.88563802e-03 1.27999418e-03 -4.13258084e-04 6.40528393e-04 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 -1.82369507e-04 8.13796244e-05 -1.78443665e-04 4.85778526e-05 4.07235914e-05 -1.32059770e-04 -1.35371970e-03 3.98710005e-04 -3.70393163e-04 3.99499995e-04 -1.37006036e-03 1.27094870e-03 -1.37277495e-03 -8.77054214e-06 1.39511113e-04 -1.54276410e-04 1.58017756e-05 1.39787536e-04 3.24292434e-04 2.88530880e-03 -1.27984815e-03 6.40528393e-04 -4.13111920e-04 4.13957924e-03 -2.07174425e-03 1.30864777e-03 1.82348701e-04 -1.78443665e-04 8.13389050e-05 4.85926870e-05 -4.07078591e-05 1.25381829e-04 1.28526539e-03 -3.78548212e-04 3.99499995e-04 -3.28913719e-04 1.30077975e-03 -1.37277495e-03 1.12841568e-03 8.32703720e-06 -1.54276410e-04 1.23492841e-04 3.10527286e-05 -1.30327889e-04 -2.12226517e-03 -1.86246236e-02 7.50943102e-03 -4.14005158e-03 4.13957924e-03 -2.40450711e-02 1.33140646e-02 -1.33125456e-02 -4.90935405e-04 8.30291250e-04 -8.30196522e-04 -5.63909849e-08 4.94242004e-04 -4.30853287e-04 -4.42070625e-03 1.12326614e-03 -1.37006036e-03 1.30077975e-03 -3.85866176e-03 4.71387848e-03 -4.47550913e-03 1.09205058e-04 4.40046165e-04 -4.17794103e-04 -2.72788161e-05 5.25459647e-04 1.06213468e-03 9.32110598e-03 -4.14005158e-03 1.30912052e-03 -2.07174425e-03 1.33140646e-02 -4.10538365e-03 6.66255871e-03 5.18277260e-04 -1.79849679e-04 4.94242004e-04 -1.57344614e-04 -8.99994920e-05 4.54700037e-04 4.66538229e-03 -1.37006036e-03 1.27094870e-03 -1.37277495e-03 4.71387848e-03 -4.36678364e-03 4.72321838e-03 3.08914624e-05 -4.73496669e-04 5.25459647e-04 -5.55857773e-05 -4.74434838e-04 -1.06201350e-03 -9.32004254e-03 4.13957924e-03 -2.07174425e-03 1.30864777e-03 -1.33125456e-02 6.66255871e-03 -4.10386331e-03 -5.18218130e-04 4.94242004e-04 -1.79736897e-04 -1.57383100e-04 8.99533169e-05 -4.31706964e-04 -4.42946528e-03 1.30077975e-03 -1.37277495e-03 1.12841568e-03 -4.47550913e-03 4.72321838e-03 -3.87637945e-03 -2.93293564e-05 5.25459647e-04 -4.18939037e-04 -1.07440671e-04 4.42126360e-04 9.01124270e-05 5.74223138e-04 -1.96239779e-04 1.82369507e-04 -1.82348701e-04 4.90935405e-04 -5.18277260e-04 5.18218130e-04 -8.38016586e-05 7.51629141e-05 -7.51543388e-05 -3.38151966e-09 2.96375220e-05 -1.64395317e-06 -1.61669669e-05 3.14957453e-05 8.77054214e-06 -8.32703720e-06 -1.09205058e-04 -3.08914624e-05 2.93293564e-05 -1.85965399e-05 7.55355996e-06 -7.17159484e-06 5.42118830e-07 -1.04425928e-05 -1.04212802e-04 -6.64074910e-04 3.08003259e-04 -8.13796244e-05 1.78443665e-04 -8.30291250e-04 1.79849679e-04 -4.94242004e-04 7.51629141e-05 -9.95895492e-05 8.53756906e-05 9.20586492e-06 -4.96239640e-05 -5.10511092e-05 -5.02046901e-04 1.29717138e-04 -1.39511113e-04 1.54276410e-04 -4.40046165e-04 4.73496669e-04 -5.25459647e-04 7.55355996e-06 2.91180029e-05 -3.56464936e-05 7.85545774e-06 3.87403530e-05 1.04200912e-04 6.63999146e-04 -3.07968119e-04 1.78443665e-04 -8.13389050e-05 8.30196522e-04 -4.94242004e-04 1.79736897e-04 -7.51543388e-05 8.53756906e-05 -9.95700672e-05 9.19559131e-06 4.96204019e-05 4.84695790e-05 4.76659613e-04 -1.23157658e-04 1.54276410e-04 -1.23492841e-04 4.17794103e-04 -5.25459647e-04 4.18939037e-04 -7.17159484e-06 -3.56464936e-05 2.54168847e-05 1.22485000e-05 -3.57582889e-05 5.95006197e-09 3.79155613e-08 -2.03596901e-08 -4.85778526e-05 -4.85926870e-05 5.63909849e-08 1.57344614e-04 1.57383100e-04 -3.38151966e-09 9.20586492e-06 9.19559131e-06 -5.02786531e-06 2.30800708e-09 2.65552855e-06 2.61150032e-05 -8.00913612e-06 -1.58017756e-05 -3.10527286e-05 2.72788161e-05 5.55857773e-05 1.07440671e-04 5.42118830e-07 7.85545774e-06 1.22485000e-05 -1.92874058e-05 -2.52770220e-06 -5.21496576e-05 -3.32313100e-04 1.78443665e-04 -4.07235914e-05 4.07078591e-05 -4.94242004e-04 8.99994920e-05 -8.99533169e-05 2.96375220e-05 -4.96239640e-05 4.96204019e-05 2.30800708e-09 -2.52565247e-05 -5.11522600e-05 -5.03041639e-04 1.54276410e-04 -1.39787536e-04 1.30327889e-04 -5.25459647e-04 4.74434838e-04 -4.42126360e-04 -1.04425928e-05 3.87403530e-05 -3.57582889e-05 -2.52770220e-06 2.92713686e-05 6.68123100e-05 6.69459754e-04 -3.24435045e-04 5.43378247e-05 -6.47045675e-05 1.10263798e-03 -1.84674714e-04 2.19907542e-04 1.03146910e-04 -3.09724238e-05 3.68814412e-05 -1.08407458e-06 -6.17706785e-06 1.71253570e-04 1.57446716e-03 -6.54828154e-04 3.27104859e-04 -3.27142251e-04 2.14342488e-03 -1.07070029e-03 1.07082268e-03 9.07161630e-05 -1.04589232e-04 1.04601187e-04 -5.97265336e-09 -5.22511997e-05 6.69459754e-04 6.65557416e-03 -3.20330600e-03 5.36503939e-04 -6.38859865e-04 1.08695467e-02 -1.82048003e-03 2.16779700e-03 9.35917804e-04 -2.81032587e-04 3.34648876e-04 -9.83650113e-06 -5.60484825e-05 1.57446716e-03 1.40177114e-02 -5.81810678e-03 2.90630600e-03 -2.90663823e-03 1.87803531e-02 -9.38130822e-03 9.38238062e-03 5.74150680e-04 -6.61954567e-04 6.62030237e-04 -3.78014553e-08 -3.30702499e-04 3.24435045e-04 3.20330600e-03 -1.54391930e-03 2.72544245e-04 -3.24541102e-04 5.22095451e-03 -9.22561107e-04 1.09857025e-03 4.39125390e-04 -1.42277515e-04 1.69421671e-04 -5.32065699e-06 -3.03171571e-05 6.54828154e-04 5.81810678e-03 -2.35366609e-03 1.29055977e-03 -1.29070730e-03 7.58003755e-03 -4.17162800e-03 4.17210487e-03 1.96612803e-04 -3.08014335e-04 3.08049546e-04 -2.03788294e-08 -1.78282284e-04 -5.43378247e-05 -5.36503939e-04 2.72544245e-04 3.77146844e-05 5.43555875e-05 -9.22561107e-04 -1.32869771e-04 -1.83993432e-04 -9.04093720e-05 -3.26690329e-05 -3.03171571e-05 1.06268106e-05 -6.51543560e-06 -3.27104859e-04 -2.90630600e-03 1.29055977e-03 -4.14777029e-04 6.44744162e-04 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 -1.82818190e-04 8.04765421e-05 -1.78282284e-04 4.88566866e-05 4.02048644e-05 6.47045675e-05 6.38859865e-04 -3.24541102e-04 5.43555875e-05 1.86358878e-05 1.09857025e-03 -1.83993432e-04 -6.82881256e-05 1.07657959e-04 -3.03171571e-05 -2.20277189e-05 1.05319485e-05 3.68930036e-06 3.27142251e-04 2.90663823e-03 -1.29070730e-03 6.44744162e-04 -4.14924426e-04 4.17210487e-03 -2.08408231e-03 1.31321506e-03 1.82839088e-04 -1.78282284e-04 8.05172997e-05 4.88419097e-05 -4.02206285e-05 -1.10263798e-03 -1.08695467e-02 5.22095451e-03 -9.22561107e-04 1.09857025e-03 -1.76563665e-02 3.12325812e-03 -3.71912322e-03 -1.43700599e-03 4.67292242e-04 -5.56443740e-04 1.75265240e-05 9.98663103e-05 -2.14342488e-03 -1.87803531e-02 7.58003755e-03 -4.17162800e-03 4.17210487e-03 -2.42525232e-02 1.34058098e-02 -1.34073423e-02 -4.88811673e-04 8.26719605e-04 -8.26814110e-04 5.62356320e-08 4.91972170e-04 1.84674714e-04 1.82048003e-03 -9.22561107e-04 -1.32869771e-04 -1.83993432e-04 3.12325812e-03 4.68584797e-04 6.22895302e-04 2.98608456e-04 1.15837418e-04 9.98663103e-05 -3.63826495e-05 2.31023440e-05 1.07070029e-03 9.38130822e-03 -4.17162800e-03 1.31273862e-03 -2.08408231e-03 1.34058098e-02 -4.11213250e-03 6.69734001e-03 5.17912316e-04 -1.75532526e-04 4.91972170e-04 -1.58070397e-04 -8.76933976e-05 -2.19907542e-04 -2.16779700e-03 1.09857025e-03 -1.83993432e-04 -6.82881256e-05 -3.71912322e-03 6.22895302e-04 2.49948714e-04 -3.55577926e-04 9.98663103e-05 8.07843699e-05 -3.63329489e-05 -1.35301256e-05 -1.07082268e-03 -9.38238062e-03 4.17210487e-03 -2.08408231e-03 1.31321506e-03 -1.34073423e-02 6.69734001e-03 -4.11366360e-03 -5.17971520e-04 4.91972170e-04 -1.75644997e-04 -1.58032277e-04 8.77395568e-05 1.03146910e-04 9.35917804e-04 -4.39125390e-04 9.04093720e-05 -1.07657959e-04 1.43700599e-03 -2.98608456e-04 3.55577926e-04 3.58666862e-05 -2.10425587e-05 2.50571249e-05 -1.09401336e-06 -6.23369915e-06 9.07161630e-05 5.74150680e-04 -1.96612803e-04 1.82818190e-04 -1.82839088e-04 4.88811673e-04 -5.17912316e-04 5.17971520e-04 -8.52979525e-05 7.71688483e-05 -7.71776697e-05 3.51458724e-09 3.07470380e-05 -3.09724238e-05 -2.81032587e-04 1.42277515e-04 3.26690329e-05 3.03171571e-05 -4.67292242e-04 -1.15837418e-04 -9.98663103e-05 -2.10425587e-05 -2.66637012e-05 -7.56530920e-06 6.15389156e-06 -5.55794511e-06 -1.04589232e-04 -6.61954567e-04 3.08014335e-04 -8.04765421e-05 1.78282284e-04 -8.26719605e-04 1.75532526e-04 -4.91972170e-04 7.71688483e-05 -1.01330348e-04 8.74817293e-05 9.01559582e-06 -5.04698362e-05 3.68814412e-05 3.34648876e-04 -1.69421671e-04 3.03171571e-05 2.20277189e-05 5.56443740e-04 -9.98663103e-05 -8.07843699e-05 2.50571249e-05 -7.56530920e-06 -2.40082797e-05 6.71603126e-06 4.15359062e-06 1.04601187e-04 6.62030237e-04 -3.08049546e-04 1.78282284e-04 -8.05172997e-05 8.26814110e-04 -4.91972170e-04 1.75644997e-04 -7.71776697e-05 8.74817293e-05 -1.01350348e-04 9.02610316e-06 5.04735432e-05 -1.08407458e-06 -9.83650113e-06 5.32065699e-06 -1.06268106e-05 -1.05319485e-05 -1.75265240e-05 3.63826495e-05 3.63329489e-05 -1.09401336e-06 6.15389156e-06 6.71603126e-06 -1.87075779e-07 5.12434813e-08 -5.97265336e-09 -3.78014553e-08 2.03788294e-08 -4.88566866e-05 -4.88419097e-05 -5.62356320e-08 1.58070397e-04 1.58032277e-04 3.51458724e-09 9.01559582e-06 9.02610316e-06 -4.81374186e-06 -2.36694876e-09 -6.17706785e-06 -5.60484825e-05 3.03171571e-05 6.51543560e-06 -3.68930036e-06 -9.98663103e-05 -2.31023440e-05 1.35301256e-05 -6.23369915e-06 -5.55794511e-06 4.15359062e-06 5.12434813e-08 9.59168692e-08 -5.22511997e-05 -3.30702499e-04 1.78282284e-04 -4.02048644e-05 4.02206285e-05 -4.91972170e-04 8.76933976e-05 -8.77395568e-05 3.07470380e-05 -5.04698362e-05 5.04735432e-05 -2.36694876e-09 -2.55207716e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +0 2 0 676 + 8.15034854e-06 8.95207190e-05 -3.26777168e-05 3.26925762e-05 -1.41342975e-08 1.14203622e-04 -1.14255554e-04 4.93972079e-08 6.47211935e-06 -2.24507007e-05 9.70632845e-09 1.12304527e-05 -9.71074216e-09 1.75931096e-07 1.78182256e-06 -5.90372646e-07 1.01714292e-06 -1.97447895e-07 1.83708661e-06 -3.16508507e-06 6.14406656e-07 -1.15297428e-07 -6.37044826e-07 1.23663211e-07 5.28097466e-07 -2.13057228e-07 8.95207190e-05 9.83943379e-04 -3.59188453e-04 3.59351785e-04 -1.55362031e-07 1.25604163e-03 -1.25661278e-03 5.43283551e-07 7.13912780e-05 -2.47644416e-04 1.07066504e-07 1.23878490e-04 -1.07115190e-07 1.78182256e-06 1.80387413e-05 -5.98362008e-06 1.03090766e-05 -2.00119906e-06 1.86085179e-05 -3.20602969e-05 6.22354832e-06 -1.16933979e-06 -6.46087147e-06 1.25418507e-06 5.35593369e-06 -2.16081398e-06 3.26777168e-05 3.59188453e-04 -1.26702582e-04 1.33660050e-04 -5.77865415e-08 4.44060464e-04 -4.68038392e-04 2.02351562e-07 2.09169040e-05 -8.79108833e-05 3.80073619e-08 4.65324191e-05 -4.02356286e-08 5.90372646e-07 5.98362008e-06 -1.94062845e-06 3.43024706e-06 -6.65879931e-07 6.04646212e-06 -1.06842412e-05 2.07402605e-06 -4.27776731e-07 -2.10470040e-06 4.08564670e-07 1.79038291e-06 -7.22317461e-07 -3.26925762e-05 -3.59351785e-04 1.33660050e-04 -1.26824112e-04 5.78128185e-08 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 -2.97800920e-05 8.79555064e-05 -4.02356286e-08 -4.14419060e-05 3.80439459e-08 -1.01714292e-06 -1.03090766e-05 3.43024706e-06 -5.85954978e-06 1.14723313e-06 -1.06842412e-05 1.82527843e-05 -3.57330397e-06 6.41674718e-07 3.68903490e-06 -7.22317461e-07 -3.02957867e-06 1.23378375e-06 1.41342975e-08 1.55362031e-07 -5.77865415e-08 5.78128185e-08 6.89669227e-06 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 1.28751150e-08 -4.02356286e-08 -5.10933177e-06 2.23369374e-08 5.11165511e-06 1.97447895e-07 2.00119906e-06 -6.65879931e-07 1.14723313e-06 -1.72336868e-07 2.07402605e-06 -3.57330397e-06 5.38738243e-07 -1.24561966e-07 -7.22317461e-07 1.08269081e-07 6.09471422e-07 -1.86534945e-07 -1.14203622e-04 -1.25604163e-03 4.44060464e-04 -4.68038392e-04 2.02351562e-07 -1.55642601e-03 1.63895261e-03 -7.08584223e-07 -7.41366515e-05 3.10376134e-04 -1.34187914e-07 -1.64119956e-04 1.41911161e-07 -1.83708661e-06 -1.86085179e-05 6.04646212e-06 -1.06842412e-05 2.07402605e-06 -1.88231481e-05 3.32506481e-05 -6.45461941e-06 1.33204848e-06 6.56327528e-06 -1.27406371e-06 -5.58123533e-06 2.25171035e-06 1.14255554e-04 1.25661278e-03 -4.68038392e-04 4.44486025e-04 -2.02443577e-07 1.63895261e-03 -1.55791621e-03 7.08906434e-07 1.04853035e-04 -3.10533377e-04 1.41911161e-07 1.46479937e-04 -1.34316946e-07 3.16508507e-06 3.20602969e-05 -1.06842412e-05 1.82527843e-05 -3.57330397e-06 3.32506481e-05 -5.68106959e-05 1.11205533e-05 -2.00159237e-06 -1.15012622e-05 2.25171035e-06 9.44643689e-06 -3.84655356e-06 -4.93972079e-08 -5.43283551e-07 2.02351562e-07 -2.02443577e-07 -2.37651088e-05 -7.08584223e-07 7.08906434e-07 8.17813602e-05 -4.53321263e-08 1.41911161e-07 1.77065360e-05 -7.86465779e-08 -1.77145876e-05 -6.14406656e-07 -6.22354832e-06 2.07402605e-06 -3.57330397e-06 5.38738243e-07 -6.45461941e-06 1.11205533e-05 -1.68244658e-06 3.88549329e-07 2.25171035e-06 -3.38791506e-07 -1.89950267e-06 5.83698085e-07 6.47211935e-06 7.13912780e-05 -2.09169040e-05 2.97800920e-05 -1.28751150e-08 7.41366515e-05 -1.04853035e-04 4.53321263e-08 -8.21102025e-07 -1.63709222e-05 7.07779903e-09 1.14886294e-05 -9.93398225e-09 -1.15297428e-07 -1.16933979e-06 4.27776731e-07 -6.41674718e-07 1.24561966e-07 -1.33204848e-06 2.00159237e-06 -3.88549329e-07 2.95435607e-08 4.46629121e-07 -8.66996933e-08 -3.19881744e-07 1.29054052e-07 -2.24507007e-05 -2.47644416e-04 8.79108833e-05 -8.79555064e-05 4.02356286e-08 -3.10376134e-04 3.10533377e-04 -1.41911161e-07 -1.63709222e-05 5.69692112e-05 -2.62018624e-08 -2.84138377e-05 2.62152747e-08 -6.37044826e-07 -6.46087147e-06 2.10470040e-06 -3.68903490e-06 7.22317461e-07 -6.56327528e-06 1.15012622e-05 -2.25171035e-06 4.46629121e-07 2.27546399e-06 -4.45583184e-07 -1.91786162e-06 7.81090289e-07 9.70632845e-09 1.07066504e-07 -3.80073619e-08 4.02356286e-08 5.10933177e-06 1.34187914e-07 -1.41911161e-07 -1.77065360e-05 7.07779903e-09 -2.62018624e-08 -3.63558527e-06 1.55772517e-08 3.80813104e-06 1.23663211e-07 1.25418507e-06 -4.08564670e-07 7.22317461e-07 -1.08269081e-07 1.27406371e-06 -2.25171035e-06 3.38791506e-07 -8.66996933e-08 -4.45583184e-07 6.65612199e-08 3.85913833e-07 -1.17870063e-07 1.12304527e-05 1.23878490e-04 -4.65324191e-05 4.14419060e-05 -2.23369374e-08 1.64119956e-04 -1.46479937e-04 7.86465779e-08 1.14886294e-05 -2.84138377e-05 1.55772517e-08 1.24792536e-05 -1.39371751e-08 5.28097466e-07 5.35593369e-06 -1.79038291e-06 3.02957867e-06 -6.09471422e-07 5.58123533e-06 -9.44643689e-06 1.89950267e-06 -3.19881744e-07 -1.91786162e-06 3.85913833e-07 1.55666036e-06 -6.53152945e-07 -9.71074216e-09 -1.07115190e-07 4.02356286e-08 -3.80439459e-08 -5.11165511e-06 -1.41911161e-07 1.34316946e-07 1.77145876e-05 -9.93398225e-09 2.62152747e-08 3.80813104e-06 -1.39371751e-08 -3.63904779e-06 -2.13057228e-07 -2.16081398e-06 7.22317461e-07 -1.23378375e-06 1.86534945e-07 -2.25171035e-06 3.84655356e-06 -5.83698085e-07 1.29054052e-07 7.81090289e-07 -1.17870063e-07 -6.53152945e-07 2.01223096e-07 2.51171570e-06 2.71922122e-05 -1.29759073e-05 7.35957704e-06 2.59842973e-06 4.41944156e-05 -2.50658547e-05 -8.84994638e-06 5.82774978e-06 -6.98933223e-06 -2.46770821e-06 1.73499863e-06 1.39961610e-06 8.28412077e-06 9.09777564e-05 -3.32019247e-05 3.31868258e-05 1.43620391e-08 1.16048744e-04 -1.15995970e-04 -5.01987947e-08 6.57558171e-06 -2.27474444e-05 -9.84425830e-09 1.13685478e-05 9.83978156e-09 2.71922122e-05 2.93815321e-04 -1.40999315e-04 7.99709259e-05 2.82351595e-05 4.78932914e-04 -2.71637551e-04 -9.59064748e-05 6.36516336e-05 -7.63386265e-05 -2.69527115e-05 1.89499380e-05 1.52868353e-05 9.09777564e-05 9.99873567e-04 -3.64877315e-04 3.64711384e-04 1.57833689e-07 1.27614898e-03 -1.27556864e-03 -5.52019250e-07 7.25104506e-05 -2.50841297e-04 -1.08554899e-07 1.25363589e-04 1.08505532e-07 1.29759073e-05 1.40999315e-04 -6.61650330e-05 3.84045902e-05 1.35594245e-05 2.26561172e-04 -1.31413853e-04 -4.63980012e-05 2.89104146e-05 -3.59303796e-05 -1.26858604e-05 9.13571978e-06 7.36974673e-06 3.32019247e-05 3.64877315e-04 -1.28672006e-04 1.35648275e-04 5.87035905e-08 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 2.12268792e-05 -8.90275005e-05 -3.85278318e-08 4.70947387e-05 4.07617534e-08 -7.35957704e-06 -7.99709259e-05 3.84045902e-05 -2.02346886e-05 -7.69053193e-06 -1.31413853e-04 6.93954914e-05 2.63156677e-05 -1.79080407e-05 1.93354978e-05 7.36974673e-06 -4.30923879e-06 -3.87193984e-06 -3.31868258e-05 -3.64711384e-04 1.35648275e-04 -1.28548604e-04 -5.86768947e-08 -4.75038761e-04 4.50562840e-04 2.05485837e-07 -3.02322860e-05 8.89822797e-05 4.07617534e-08 -4.18684747e-05 -3.84907500e-08 -2.59842973e-06 -2.82351595e-05 1.35594245e-05 -7.69053193e-06 -1.16794251e-06 -4.63980012e-05 2.63156677e-05 4.15239009e-06 -6.32275266e-06 7.36974673e-06 1.06405821e-06 -2.13740834e-06 -6.03504497e-07 -1.43620391e-08 -1.57833689e-07 5.87035905e-08 -5.86768947e-08 7.03795935e-06 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 -1.30834228e-08 4.07617534e-08 -5.20719763e-06 -2.26240712e-08 5.20482962e-06 -4.41944156e-05 -4.78932914e-04 2.26561172e-04 -1.31413853e-04 -4.63980012e-05 -7.72871435e-04 4.48007261e-04 1.58176942e-04 -9.97895809e-05 1.23871976e-04 4.37352072e-05 -3.14712599e-05 -2.53877331e-05 -1.16048744e-04 -1.27614898e-03 4.50994993e-04 -4.75038761e-04 -2.05579326e-07 -1.58091757e-03 1.66367474e-03 7.19977313e-07 -7.52359251e-05 3.14334982e-04 1.36032633e-07 -1.66113681e-04 -1.43775825e-07 2.50658547e-05 2.71637551e-04 -1.31413853e-04 6.93954914e-05 2.63156677e-05 4.48007261e-04 -2.37072780e-04 -8.97136026e-05 6.16347107e-05 -6.67789161e-05 -2.53877331e-05 1.49416277e-05 1.33725001e-05 1.15995970e-04 1.27556864e-03 -4.75038761e-04 4.50562840e-04 2.05485837e-07 1.66367474e-03 -1.57940409e-03 -7.19649898e-07 1.06454134e-04 -3.14175621e-04 -1.43775825e-07 1.47994545e-04 1.35901837e-07 8.84994638e-06 9.59064748e-05 -4.63980012e-05 2.63156677e-05 4.15239009e-06 1.58176942e-04 -8.97136026e-05 -1.46503916e-05 2.17612322e-05 -2.53877331e-05 -3.83639621e-06 7.32885275e-06 2.17589821e-06 5.01987947e-08 5.52019250e-07 -2.05579326e-07 2.05485837e-07 -2.42598049e-05 7.19977313e-07 -7.19649898e-07 8.35137710e-05 4.60694388e-08 -1.43775825e-07 1.80517420e-05 7.96638128e-08 -1.80435329e-05 5.82774978e-06 6.36516336e-05 -2.89104146e-05 1.79080407e-05 6.32275266e-06 9.97895809e-05 -6.16347107e-05 -2.17612322e-05 1.17957565e-05 -1.62952327e-05 -5.75332210e-06 4.42089925e-06 3.56632083e-06 6.57558171e-06 7.25104506e-05 -2.12268792e-05 3.02322860e-05 1.30834228e-08 7.52359251e-05 -1.06454134e-04 -4.60694388e-08 -8.45204057e-07 -1.65665211e-05 -7.16938176e-09 1.16312371e-05 1.00671462e-08 -6.98933223e-06 -7.63386265e-05 3.59303796e-05 -1.93354978e-05 -7.36974673e-06 -1.23871976e-04 6.67789161e-05 2.53877331e-05 -1.62952327e-05 1.81401656e-05 6.93872782e-06 -4.12740682e-06 -3.72610274e-06 -2.27474444e-05 -2.50841297e-04 8.90275005e-05 -8.89822797e-05 -4.07617534e-08 -3.14334982e-04 3.14175621e-04 1.43775825e-07 -1.65665211e-05 5.74742044e-05 2.64734900e-08 -2.86348849e-05 -2.64599273e-08 -2.46770821e-06 -2.69527115e-05 1.26858604e-05 -7.36974673e-06 -1.06405821e-06 -4.37352072e-05 2.53877331e-05 3.83639621e-06 -5.75332210e-06 6.93872782e-06 9.37329410e-07 -2.07452622e-06 -5.50381660e-07 -9.84425830e-09 -1.08554899e-07 3.85278318e-08 -4.07617534e-08 5.20719763e-06 -1.36032633e-07 1.43775825e-07 -1.80517420e-05 -7.16938176e-09 2.64734900e-08 -3.69892919e-06 -1.57434652e-08 3.87201115e-06 1.73499863e-06 1.89499380e-05 -9.13571978e-06 4.30923879e-06 2.13740834e-06 3.14712599e-05 -1.49416277e-05 -7.32885275e-06 4.42089925e-06 -4.12740682e-06 -2.07452622e-06 7.12701208e-07 1.00156434e-06 1.13685478e-05 1.25363589e-04 -4.70947387e-05 4.18684747e-05 2.26240712e-08 1.66113681e-04 -1.47994545e-04 -7.96638128e-08 1.16312371e-05 -2.86348849e-05 -1.57434652e-08 1.25506408e-05 1.40613983e-08 1.39961610e-06 1.52868353e-05 -7.36974673e-06 3.87193984e-06 6.03504497e-07 2.53877331e-05 -1.33725001e-05 -2.17589821e-06 3.56632083e-06 -3.72610274e-06 -5.50381660e-07 1.00156434e-06 2.79095092e-07 9.83978156e-09 1.08505532e-07 -4.07617534e-08 3.84907500e-08 -5.20482962e-06 1.43775825e-07 -1.35901837e-07 1.80435329e-05 1.00671462e-08 -2.64599273e-08 3.87201115e-06 1.40613983e-08 -3.69540674e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -2 -1 169 + 3.82255989e-06 4.18025678e-05 1.16993790e-05 -1.88429793e-05 -3.90264479e-06 -4.03907697e-05 6.50532340e-05 1.34734354e-05 -1.31746015e-06 -1.04218335e-05 -2.15850761e-06 8.03267015e-06 3.47648489e-06 4.18025678e-05 4.56459779e-04 1.28362359e-04 -2.06739971e-04 -4.28187420e-05 -4.42250814e-04 7.12287633e-04 1.47524740e-04 -1.45368463e-05 -1.14994440e-04 -2.38169583e-05 8.86324281e-05 3.83595107e-05 -1.16993790e-05 -1.28362359e-04 -3.36233530e-05 5.84252861e-05 1.21006946e-05 1.16800407e-04 -2.02529868e-04 -4.19467708e-05 5.91690015e-06 3.01598311e-05 6.24652321e-06 -2.51689570e-05 -1.08929530e-05 1.88429793e-05 2.06739971e-04 5.84252861e-05 -9.14473601e-05 -1.94893369e-05 -2.02529868e-04 3.17245956e-04 6.75593240e-05 -5.20801513e-06 -5.10447895e-05 -1.08929530e-05 3.80418867e-05 1.70273723e-05 3.90264479e-06 4.28187420e-05 1.21006946e-05 -1.94893369e-05 -1.38431081e-06 -4.19467708e-05 6.75593240e-05 5.04453213e-06 -1.07865284e-06 -1.08929530e-05 -7.06875461e-07 8.91256759e-06 1.13849117e-06 4.03907697e-05 4.42250814e-04 1.16800407e-04 -2.02529868e-04 -4.19467708e-05 -4.04572893e-04 7.00104958e-04 1.45001537e-04 -2.04812854e-05 -1.05591679e-04 -2.18695148e-05 8.79042438e-05 3.80443575e-05 -6.50532340e-05 -7.12287633e-04 -2.02529868e-04 3.17245956e-04 6.75593240e-05 7.00104958e-04 -1.09747278e-03 -2.33538974e-04 1.83374140e-05 1.78436541e-04 3.80443575e-05 -1.33120278e-04 -5.95223420e-05 -1.34734354e-05 -1.47524740e-04 -4.19467708e-05 6.75593240e-05 5.04453213e-06 1.45001537e-04 -2.33538974e-04 -1.82553453e-05 3.79793514e-06 3.80443575e-05 2.62805304e-06 -3.10746106e-05 -4.23273313e-06 -1.31746015e-06 -1.45368463e-05 -5.91690015e-06 5.20801513e-06 1.07865284e-06 2.04812854e-05 -1.83374140e-05 -3.79793514e-06 -1.51153884e-06 4.58486163e-06 9.49589024e-07 -1.57210461e-06 -6.80396158e-07 -1.04218335e-05 -1.14994440e-04 -3.01598311e-05 5.10447895e-05 1.08929530e-05 1.05591679e-04 -1.78436541e-04 -3.80443575e-05 4.58486163e-06 2.63338443e-05 5.63160846e-06 -2.13121547e-05 -9.55537989e-06 -2.15850761e-06 -2.38169583e-05 -6.24652321e-06 1.08929530e-05 7.06875461e-07 2.18695148e-05 -3.80443575e-05 -2.62805304e-06 9.49589024e-07 5.63160846e-06 3.09365703e-07 -5.02273353e-06 -5.72635299e-07 8.03267015e-06 8.86324281e-05 2.51689570e-05 -3.80418867e-05 -8.91256759e-06 -8.79042438e-05 1.33120278e-04 3.10746106e-05 -1.57210461e-06 -2.13121547e-05 -5.02273353e-06 1.51461445e-05 7.59942190e-06 3.47648489e-06 3.83595107e-05 1.08929530e-05 -1.70273723e-05 -1.13849117e-06 -3.80443575e-05 5.95223420e-05 4.23273313e-06 -6.80396158e-07 -9.55537989e-06 -5.72635299e-07 7.59942190e-06 8.76107774e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 -2 0 676 + 1.71672269e-04 1.57792086e-03 3.28189848e-04 -6.56104109e-04 3.27928827e-04 -1.07413122e-03 2.14736046e-03 -1.07327692e-03 -4.53116807e-05 -1.04771720e-04 5.23661820e-05 7.85654639e-05 -1.04688391e-04 1.23539293e-03 8.95053459e-03 3.45021112e-03 -3.25974602e-03 1.14624069e-03 -1.01267710e-02 9.56773377e-03 -3.36434975e-03 5.05204254e-05 -1.65846305e-04 5.83173599e-05 6.86582771e-05 -5.50980145e-05 1.57792086e-03 1.40436697e-02 2.91501960e-03 -5.82759139e-03 2.91270117e-03 -9.40792386e-03 1.88079477e-02 -9.40044139e-03 -2.86330751e-04 -6.62066927e-04 3.30909116e-04 4.96465986e-04 -6.61540361e-04 8.95053459e-03 5.44759122e-02 2.19727430e-02 -2.07597620e-02 7.29985823e-03 -5.83786039e-02 5.51558776e-02 -1.93947352e-02 -1.12049027e-03 3.67829781e-03 -1.29341813e-03 -1.52276887e-03 1.22201641e-03 -3.28189848e-04 -2.91501960e-03 -4.16881756e-04 1.29418310e-03 -6.46848479e-04 1.31924295e-03 -4.18274204e-03 2.09058543e-03 1.33798126e-04 8.07173426e-05 -4.03435112e-05 -1.33942777e-04 1.78478598e-04 -3.45021112e-03 -2.19727430e-02 -8.00046852e-03 9.11616195e-03 -3.20556131e-03 2.16878623e-02 -2.51611824e-02 8.84755155e-03 3.47132377e-04 -8.44845629e-04 2.97077265e-04 3.09250432e-04 -2.48172332e-04 6.56104109e-04 5.82759139e-03 1.29418310e-03 -2.35679785e-03 1.29315379e-03 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 -9.79103764e-05 -3.08119111e-04 1.78478598e-04 1.69869761e-04 -3.07874052e-04 3.25974602e-03 2.07597620e-02 9.11616195e-03 -6.96456876e-03 3.02860184e-03 -2.51611824e-02 1.88287136e-02 -8.35913224e-03 -1.58503494e-04 8.09324874e-04 -2.48172332e-04 -3.90019742e-04 2.68876619e-04 -3.27928827e-04 -2.91270117e-03 -6.46848479e-04 1.29315379e-03 -4.15852421e-04 2.09058543e-03 -4.17941535e-03 1.31591619e-03 4.89367989e-05 1.78478598e-04 -4.02335566e-05 -1.82769519e-04 8.04333283e-05 -1.14624069e-03 -7.29985823e-03 -3.20556131e-03 3.02860184e-03 5.83383234e-04 8.84755155e-03 -8.35913224e-03 -2.00411033e-03 5.57353711e-05 -2.48172332e-04 1.90824010e-04 6.83358480e-05 -1.80289782e-04 1.07413122e-03 9.40792386e-03 1.31924295e-03 -4.18274204e-03 2.09058543e-03 -4.13190580e-03 1.34392678e-02 -6.71710977e-03 -3.95905708e-04 -1.75795878e-04 8.78649213e-05 3.69299930e-04 -4.92091737e-04 1.01267710e-02 5.83786039e-02 2.16878623e-02 -2.51611824e-02 8.84755155e-03 -5.49364915e-02 6.56077406e-02 -2.30699757e-02 -1.58906128e-03 5.27103575e-03 -1.85348049e-03 -2.18963740e-03 1.75717595e-03 -2.14736046e-03 -1.88079477e-02 -4.18274204e-03 7.58896523e-03 -4.17941535e-03 1.34392678e-02 -2.42766998e-02 1.34285790e-02 2.42960040e-04 8.26143021e-04 -4.92091737e-04 -4.21602203e-04 8.25485959e-04 -9.56773377e-03 -5.51558776e-02 -2.51611824e-02 1.88287136e-02 -8.35913224e-03 6.56077406e-02 -4.74812660e-02 2.17964232e-02 1.53269720e-03 -4.97799675e-03 1.75717595e-03 2.05065617e-03 -1.65380674e-03 1.07327692e-03 9.40044139e-03 2.09058543e-03 -4.17941535e-03 1.31591619e-03 -6.71710977e-03 1.34285790e-02 -4.12121681e-03 -1.21434388e-04 -4.92091737e-04 8.75431602e-05 5.27290508e-04 -1.75012809e-04 3.36434975e-03 1.93947352e-02 8.84755155e-03 -8.35913224e-03 -2.00411033e-03 -2.30699757e-02 2.17964232e-02 6.84028716e-03 -5.38949929e-04 1.75717595e-03 -5.98721945e-04 -7.33814919e-04 5.65670162e-04 -4.53116807e-05 -2.86330751e-04 -1.33798126e-04 9.79103764e-05 -4.89367989e-05 3.95905708e-04 -2.42960040e-04 1.21434388e-04 -2.49156491e-05 -3.09770316e-05 1.54826978e-05 3.49006910e-05 -4.65051310e-05 5.05204254e-05 -1.12049027e-03 -3.47132377e-04 1.58503494e-04 -5.57353711e-05 1.58906128e-03 -1.53269720e-03 5.38949929e-04 2.48387812e-04 5.31143823e-04 -1.86768741e-04 -4.14364578e-04 3.32526048e-04 -1.04771720e-04 -6.62066927e-04 -8.07173426e-05 3.08119111e-04 -1.78478598e-04 1.75795878e-04 -8.26143021e-04 4.92091737e-04 -3.09770316e-05 -1.01880734e-04 5.07753127e-05 7.16933507e-05 -8.80483494e-05 -1.65846305e-04 3.67829781e-03 8.44845629e-04 -8.09324874e-04 2.48172332e-04 -5.27103575e-03 4.97799675e-03 -1.75717595e-03 5.31143823e-04 -1.73519276e-03 7.03766636e-04 6.63422635e-04 -6.54676965e-04 5.23661820e-05 3.30909116e-04 4.03435112e-05 -1.78478598e-04 4.02335566e-05 -8.78649213e-05 4.92091737e-04 -8.75431602e-05 1.54826978e-05 5.07753127e-05 -2.56700685e-05 -2.68500618e-05 5.07492181e-05 5.83173599e-05 -1.29341813e-03 -2.97077265e-04 2.48172332e-04 -1.90824010e-04 1.85348049e-03 -1.75717595e-03 5.98721945e-04 -1.86768741e-04 7.03766636e-04 1.87508299e-05 -4.24023668e-04 -7.47735576e-06 7.85654639e-05 4.96465986e-04 1.33942777e-04 -1.69869761e-04 1.82769519e-04 -3.69299930e-04 4.21602203e-04 -5.27290508e-04 3.49006910e-05 7.16933507e-05 -2.68500618e-05 -6.52724471e-05 6.26569537e-05 6.86582771e-05 -1.52276887e-03 -3.09250432e-04 3.90019742e-04 -6.83358480e-05 2.18963740e-03 -2.05065617e-03 7.33814919e-04 -4.14364578e-04 6.63422635e-04 -4.24023668e-04 -1.19845928e-04 3.10510199e-04 -1.04688391e-04 -6.61540361e-04 -1.78478598e-04 3.07874052e-04 -8.04333283e-05 4.92091737e-04 -8.25485959e-04 1.75012809e-04 -4.65051310e-05 -8.80483494e-05 5.07492181e-05 6.26569537e-05 -1.01740622e-04 -5.50980145e-05 1.22201641e-03 2.48172332e-04 -2.68876619e-04 1.80289782e-04 -1.75717595e-03 1.65380674e-03 -5.65670162e-04 3.32526048e-04 -6.54676965e-04 -7.47735576e-06 3.10510199e-04 1.79011531e-05 1.68795702e-07 1.70850623e-06 1.88454833e-07 -9.76601309e-07 5.67964499e-07 -5.85923203e-07 3.03634223e-06 -1.76585325e-06 -3.84682231e-07 -2.03479644e-07 1.18338173e-07 3.48907492e-07 -6.13246222e-07 1.69024978e-04 1.55606641e-03 3.23257248e-04 -6.46785904e-04 3.23514311e-04 -1.05874185e-03 2.11837261e-03 -1.05958378e-03 -4.51020151e-05 -1.04030710e-04 5.20348749e-05 7.80362555e-05 -1.04113438e-04 1.70850623e-06 1.72861068e-05 1.90883623e-06 -9.89187668e-06 5.75284380e-06 -5.93136098e-06 3.07372054e-05 -1.78759145e-05 -3.89885878e-06 -2.06232140e-06 1.19938949e-06 3.53627209e-06 -6.21541685e-06 1.55606641e-03 1.38791892e-02 2.87700957e-03 -5.75643469e-03 2.87929745e-03 -9.29471951e-03 1.85972429e-02 -9.30211091e-03 -2.87847916e-04 -6.63939809e-04 3.32094482e-04 4.98039246e-04 -6.64467791e-04 -1.88454833e-07 -1.90883623e-06 -1.63660712e-07 1.09573145e-06 -6.37247316e-07 5.11130515e-07 -3.40988315e-06 1.98309439e-06 4.45506182e-07 1.77255275e-07 -1.03086800e-07 -3.93517133e-07 6.91652948e-07 -3.23257248e-04 -2.87700957e-03 -4.11174673e-04 1.27641016e-03 -6.38444578e-04 1.30267572e-03 -4.12904699e-03 2.06529824e-03 1.33175778e-04 8.11362673e-05 -4.05833576e-05 -1.33599740e-04 1.78244435e-04 9.76601309e-07 9.89187668e-06 1.09573145e-06 -5.63046262e-06 3.30231151e-06 -3.40988315e-06 1.75236528e-05 -1.02766936e-05 -2.21819723e-06 -1.17919981e-06 6.91652948e-07 1.98702471e-06 -3.55386816e-06 6.46785904e-04 5.75643469e-03 1.27641016e-03 -2.32712940e-03 1.27742520e-03 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 -9.85124053e-05 -3.07892219e-04 1.78244435e-04 1.70345115e-04 -3.08137062e-04 -5.67964499e-07 -5.75284380e-06 -6.37247316e-07 3.30231151e-06 -1.87275100e-06 1.98309439e-06 -1.02766936e-05 5.82976785e-06 1.29004259e-06 6.91652948e-07 -3.92165543e-07 -1.21636205e-06 2.03226087e-06 -3.23514311e-04 -2.87929745e-03 -6.38444578e-04 1.27742520e-03 -4.12189685e-04 2.06529824e-03 -4.13233052e-03 1.30595918e-03 4.92746869e-05 1.78244435e-04 -4.06927391e-05 -1.82207444e-04 8.14196439e-05 5.85923203e-07 5.93136098e-06 5.11130515e-07 -3.40988315e-06 1.98309439e-06 -1.59476564e-06 1.06028909e-05 -6.16635017e-06 -1.38707452e-06 -5.54115547e-07 3.22258384e-07 1.22561170e-06 -2.15415766e-06 1.05874185e-03 9.29471951e-03 1.30267572e-03 -4.12904699e-03 2.06529824e-03 -4.08576704e-03 1.32808933e-02 -6.64293860e-03 -3.95340531e-04 -1.79568636e-04 8.98180109e-05 3.70346319e-04 -4.94104034e-04 -3.03634223e-06 -3.07372054e-05 -3.40988315e-06 1.75236528e-05 -1.02766936e-05 1.06028909e-05 -5.44945017e-05 3.19549547e-05 6.90977509e-06 3.67302171e-06 -2.15415766e-06 -6.19065438e-06 1.10697396e-05 -2.11837261e-03 -1.85972429e-02 -4.12904699e-03 7.50057930e-03 -4.13233052e-03 1.32808933e-02 -2.40210442e-02 1.32914546e-02 2.46901725e-04 8.30831883e-04 -4.94104034e-04 -4.26860795e-04 8.31492582e-04 1.76585325e-06 1.78759145e-05 1.98309439e-06 -1.02766936e-05 5.82976785e-06 -6.16635017e-06 3.19549547e-05 -1.81328490e-05 -4.01853542e-06 -2.15415766e-06 1.22179830e-06 3.78717375e-06 -6.33154269e-06 1.05958378e-03 9.30211091e-03 2.06529824e-03 -4.13233052e-03 1.30595918e-03 -6.64293860e-03 1.32914546e-02 -4.09632811e-03 -1.23497189e-04 -4.94104034e-04 9.01392455e-05 5.27771165e-04 -1.80354172e-04 -3.84682231e-07 -3.89885878e-06 -4.45506182e-07 2.21819723e-06 -1.29004259e-06 1.38707452e-06 -6.90977509e-06 4.01853542e-06 8.67117729e-07 4.79893762e-07 -2.79093032e-07 -7.89992316e-07 1.38850502e-06 -4.51020151e-05 -2.87847916e-04 -1.33175778e-04 9.85124053e-05 -4.92746869e-05 3.95340531e-04 -2.46901725e-04 1.23497189e-04 -2.47376814e-05 -2.94110916e-05 1.47110643e-05 3.40589179e-05 -4.54403024e-05 -2.03479644e-07 -2.06232140e-06 -1.77255275e-07 1.17919981e-06 -6.91652948e-07 5.54115547e-07 -3.67302171e-06 2.15415766e-06 4.79893762e-07 1.91344710e-07 -1.12292036e-07 -4.18394382e-07 7.48398996e-07 -1.04030710e-04 -6.63939809e-04 -8.11362673e-05 3.07892219e-04 -1.78244435e-04 1.79568636e-04 -8.30831883e-04 4.94104034e-04 -2.94110916e-05 -9.90479928e-05 4.93234809e-05 6.93450270e-05 -8.48172275e-05 1.18338173e-07 1.19938949e-06 1.03086800e-07 -6.91652948e-07 3.92165543e-07 -3.22258384e-07 2.15415766e-06 -1.22179830e-06 -2.79093032e-07 -1.12292036e-07 6.35672157e-08 2.56205181e-07 -4.27921057e-07 5.20348749e-05 3.32094482e-04 4.05833576e-05 -1.78244435e-04 4.06927391e-05 -8.98180109e-05 4.94104034e-04 -9.01392455e-05 1.47110643e-05 4.93234809e-05 -2.51090313e-05 -2.54484369e-05 4.93480127e-05 3.48907492e-07 3.53627209e-06 3.93517133e-07 -1.98702471e-06 1.21636205e-06 -1.22561170e-06 6.19065438e-06 -3.78717375e-06 -7.89992316e-07 -4.18394382e-07 2.56205181e-07 6.60022018e-07 -1.29432465e-06 7.80362555e-05 4.98039246e-04 1.33599740e-04 -1.70345115e-04 1.82207444e-04 -3.70346319e-04 4.26860795e-04 -5.27771165e-04 3.40589179e-05 6.93450270e-05 -2.54484369e-05 -6.40115708e-05 6.01592062e-05 -6.13246222e-07 -6.21541685e-06 -6.91652948e-07 3.55386816e-06 -2.03226087e-06 2.15415766e-06 -1.10697396e-05 6.33154269e-06 1.38850502e-06 7.48398996e-07 -4.27921057e-07 -1.29432465e-06 2.19854258e-06 -1.04113438e-04 -6.64467791e-04 -1.78244435e-04 3.08137062e-04 -8.14196439e-05 4.94104034e-04 -8.31492582e-04 1.80354172e-04 -4.54403024e-05 -8.48172275e-05 4.93480127e-05 6.01592062e-05 -9.91828370e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -2 1 676 + 1.71619640e-04 1.57748679e-03 3.28090901e-04 -3.27792487e-04 6.55943768e-04 -1.07382250e-03 1.07284581e-03 -2.14686594e-03 -4.53078102e-05 -5.23517311e-05 1.04760765e-04 -7.85707053e-05 -1.04665480e-04 9.95345080e-04 7.42635303e-03 2.78656541e-03 -7.77439677e-04 2.78105856e-03 -8.28974459e-03 2.31280283e-03 -8.27336227e-03 5.17611903e-05 -5.40169166e-05 1.93229408e-04 -8.88885295e-05 -5.39101676e-05 1.57748679e-03 1.40404080e-02 2.91425705e-03 -2.91160640e-03 5.82639977e-03 -9.40565257e-03 9.39709770e-03 -1.88044812e-02 -2.86362953e-04 -3.30883268e-04 6.62128712e-04 -4.96597364e-04 -6.61526476e-04 7.42635303e-03 4.77116671e-02 1.85589990e-02 -5.17788031e-03 1.85223224e-02 -5.07788860e-02 1.41670892e-02 -5.06785360e-02 -6.73638275e-04 7.02995089e-04 -2.51475525e-03 1.15682648e-03 7.01605820e-04 -3.28090901e-04 -2.91425705e-03 -4.16764814e-04 6.46583847e-04 -1.29387543e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 1.33785987e-04 4.03418768e-05 -8.07279110e-05 1.33962540e-04 1.78453961e-04 -2.78656541e-03 -1.85589990e-02 -6.51604059e-03 2.19160263e-03 -7.83980473e-03 1.80793532e-02 -6.18271911e-03 2.21168335e-02 2.46046287e-04 -1.41994680e-04 5.07943615e-04 -1.76759062e-04 -1.07202928e-04 3.27792487e-04 2.91160640e-03 6.46583847e-04 -4.15588082e-04 1.29269859e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 -4.89367367e-05 -4.02161581e-05 1.78453961e-04 -1.82758178e-04 -8.04031390e-05 7.77439677e-04 5.17788031e-03 2.19160263e-03 7.27840315e-04 2.18727155e-03 -6.18271911e-03 -2.35632260e-03 -6.17050073e-03 -8.75243829e-06 1.53911076e-04 -1.07202928e-04 1.47355362e-05 1.53606915e-04 -6.55943768e-04 -5.82639977e-03 -1.29387543e-03 1.29269859e-03 -2.35640447e-03 4.18182277e-03 -4.17801921e-03 7.58784400e-03 9.79270385e-05 1.78453961e-04 -3.08141237e-04 1.69939378e-04 3.07860969e-04 -2.78105856e-03 -1.85223224e-02 -7.83980473e-03 2.18727155e-03 -6.48502363e-03 2.21168335e-02 -6.17050073e-03 1.79918514e-02 3.13092374e-05 -1.07202928e-04 5.07429200e-04 -3.00107510e-04 -1.41570548e-04 1.07382250e-03 9.40565257e-03 1.31890257e-03 -2.08976768e-03 4.18182277e-03 -4.13095396e-03 6.71462401e-03 -1.34365977e-02 -3.95895217e-04 -8.78896388e-05 1.75875480e-04 -3.69394268e-04 -4.92076893e-04 8.28974459e-03 5.07788860e-02 1.80793532e-02 -6.18271911e-03 2.21168335e-02 -4.74490791e-02 1.66475478e-02 -5.95516367e-02 -1.12433377e-03 1.04202156e-03 -3.72752132e-03 1.64961662e-03 1.00047902e-03 -1.07284581e-03 -9.39709770e-03 -2.08976768e-03 1.31509936e-03 -4.17801921e-03 6.71462401e-03 -4.11873388e-03 1.34243765e-02 1.21458717e-04 8.75217185e-05 -4.92076893e-04 5.27296378e-04 1.74979939e-04 -2.31280283e-03 -1.41670892e-02 -6.18271911e-03 -2.35632260e-03 -6.17050073e-03 1.66475478e-02 7.57588371e-03 1.66146486e-02 2.45161784e-04 -4.21481590e-04 1.00047902e-03 -4.20674427e-04 -4.20648652e-04 2.14686594e-03 1.88044812e-02 4.18182277e-03 -4.17801921e-03 7.58784400e-03 -1.34365977e-02 1.34243765e-02 -2.42736641e-02 -2.43050381e-04 -4.92076893e-04 8.26310254e-04 -4.21871149e-04 -8.25558687e-04 8.27336227e-03 5.06785360e-02 2.21168335e-02 -6.17050073e-03 1.79918514e-02 -5.95516367e-02 1.66146486e-02 -4.72134724e-02 -8.76993157e-04 1.00047902e-03 -3.72071484e-03 1.78787597e-03 1.03806332e-03 -4.53078102e-05 -2.86362953e-04 -1.33785987e-04 4.89367367e-05 -9.79270385e-05 3.95895217e-04 -1.21458717e-04 2.43050381e-04 -2.49123633e-05 -1.54651102e-05 3.09471481e-05 -3.48911273e-05 -4.64791119e-05 5.17611903e-05 -6.73638275e-04 -2.46046287e-04 8.75243829e-06 -3.13092374e-05 1.12433377e-03 -2.45161784e-04 8.76993157e-04 1.98976966e-04 1.13003602e-04 -4.04236679e-04 3.51208311e-04 2.13004974e-04 -5.23517311e-05 -3.30883268e-04 -4.03418768e-05 4.02161581e-05 -1.78453961e-04 8.78896388e-05 -8.75217185e-05 4.92076893e-04 -1.54651102e-05 -2.56512763e-05 5.07406053e-05 -2.68243330e-05 -5.07108039e-05 -5.40169166e-05 7.02995089e-04 1.41994680e-04 -1.53911076e-04 1.07202928e-04 -1.04202156e-03 4.21481590e-04 -1.00047902e-03 1.13003602e-04 5.89912027e-05 4.88951386e-04 -3.09523252e-04 5.48444344e-05 1.04760765e-04 6.62128712e-04 8.07279110e-05 -1.78453961e-04 3.08141237e-04 -1.75875480e-04 4.92076893e-04 -8.26310254e-04 3.09471481e-05 5.07406053e-05 -1.01831601e-04 7.16616535e-05 8.79770935e-05 1.93229408e-04 -2.51475525e-03 -5.07943615e-04 1.07202928e-04 -5.07429200e-04 3.72752132e-03 -1.00047902e-03 3.72071484e-03 -4.04236679e-04 4.88951386e-04 -1.55340110e-03 6.92419575e-04 4.87756180e-04 -7.85707053e-05 -4.96597364e-04 -1.33962540e-04 1.82758178e-04 -1.69939378e-04 3.69394268e-04 -5.27296378e-04 4.21871149e-04 -3.48911273e-05 -2.68243330e-05 7.16616535e-05 -6.52662346e-05 -6.26128393e-05 -8.88885295e-05 1.15682648e-03 1.76759062e-04 -1.47355362e-05 3.00107510e-04 -1.64961662e-03 4.20674427e-04 -1.78787597e-03 3.51208311e-04 -3.09523252e-04 6.92419575e-04 -2.02900654e-04 -2.51046814e-04 -1.04665480e-04 -6.61526476e-04 -1.78453961e-04 8.04031390e-05 -3.07860969e-04 4.92076893e-04 -1.74979939e-04 8.25558687e-04 -4.64791119e-05 -5.07108039e-05 8.79770935e-05 -6.26128393e-05 -1.01671490e-04 -5.39101676e-05 7.01605820e-04 1.07202928e-04 -1.53606915e-04 1.41570548e-04 -1.00047902e-03 4.20648652e-04 -1.03806332e-03 2.13004974e-04 5.48444344e-05 4.87756180e-04 -2.51046814e-04 5.87742193e-05 4.38363308e-07 4.51521917e-06 4.79187413e-07 -1.52109118e-06 2.40630342e-06 -1.52628498e-06 4.84490735e-06 -7.66444334e-06 -9.41387813e-07 -3.10924702e-07 4.91870038e-07 -7.41509184e-07 -1.56134981e-06 1.69076833e-04 1.55649490e-03 3.23354778e-04 -3.23648843e-04 6.46944120e-04 -1.05904640e-03 1.06000952e-03 -2.11886105e-03 -4.51059212e-05 -5.20492749e-05 1.04041689e-04 -7.80311210e-05 -1.04136307e-04 4.51521917e-06 4.64689687e-05 4.94295089e-06 -1.56904769e-05 2.48216864e-05 -1.57254058e-05 4.99173713e-05 -7.89672198e-05 -9.72433996e-06 -3.21178739e-06 5.08091501e-06 -7.65963537e-06 -1.61284182e-05 1.55649490e-03 1.38824192e-02 2.87776317e-03 -2.88038026e-03 5.75761390e-03 -9.29696771e-03 9.30542255e-03 -1.86006795e-02 -2.87817072e-04 -3.32122026e-04 6.63881230e-04 -4.97909991e-04 -6.64484976e-04 -4.79187413e-07 -4.94295089e-06 -3.64936589e-07 1.67271221e-06 -2.64616164e-06 1.17420366e-06 -5.33816927e-06 8.44476332e-06 1.08090228e-06 2.36920844e-07 -3.74798990e-07 8.20684715e-07 1.72806481e-06 -3.23354778e-04 -2.87776317e-03 -4.11290064e-04 6.38705842e-04 -1.27671394e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 1.33188086e-04 4.05852446e-05 -8.11261525e-05 1.33580368e-04 1.78269465e-04 1.52109118e-06 1.56904769e-05 1.67271221e-06 -5.14769753e-06 8.39974720e-06 -5.33816927e-06 1.64375510e-05 -2.68063281e-05 -3.24544151e-06 -1.05858563e-06 1.72806481e-06 -2.71231397e-06 -5.31582877e-06 3.23648843e-04 2.88038026e-03 6.38705842e-04 -4.12451239e-04 1.27787501e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 -4.92750067e-05 -4.07103584e-05 1.78269465e-04 -1.82219018e-04 -8.14502486e-05 -2.40630342e-06 -2.48216864e-05 -2.64616164e-06 8.39974720e-06 -1.31260374e-05 8.44476332e-06 -2.68063281e-05 4.18990309e-05 5.13415444e-06 1.72806481e-06 -2.69995506e-06 3.95158656e-06 8.57050441e-06 -6.46944120e-04 -5.75761390e-03 -1.27671394e-03 1.27787501e-03 -2.32751856e-03 4.12995589e-03 -4.13371175e-03 7.50169058e-03 9.84961837e-05 1.78269465e-04 -3.07871094e-04 1.70276298e-04 3.08151078e-04 1.52628498e-06 1.57254058e-05 1.17420366e-06 -5.33816927e-06 8.44476332e-06 -3.76957244e-06 1.70071384e-05 -2.69045905e-05 -3.45344291e-06 -7.64118956e-07 1.20880463e-06 -2.62389032e-06 -5.52496280e-06 1.05904640e-03 9.29696771e-03 1.30301212e-03 -2.06610649e-03 4.12995589e-03 -4.08670984e-03 6.64539894e-03 -1.32835382e-02 -3.95352170e-04 -8.97947178e-05 1.79491341e-04 -3.70253734e-04 -4.94121524e-04 -4.84490735e-06 -4.99173713e-05 -5.33816927e-06 1.64375510e-05 -2.68063281e-05 1.70071384e-05 -5.23978281e-05 8.54036109e-05 1.03801459e-05 3.38659699e-06 -5.52496280e-06 8.66516435e-06 1.70062479e-05 -1.06000952e-03 -9.30542255e-03 -2.06610649e-03 1.30676833e-03 -4.13371175e-03 6.64539894e-03 -4.09879125e-03 1.32956185e-02 1.23474085e-04 9.01621275e-05 -4.94121524e-04 5.27766916e-04 1.80389660e-04 7.66444334e-06 7.89672198e-05 8.44476332e-06 -2.68063281e-05 4.18990309e-05 -2.69045905e-05 8.54036109e-05 -1.33516821e-04 -1.64209621e-05 -5.52496280e-06 8.63437763e-06 -1.26444974e-05 -2.74082234e-05 2.11886105e-03 1.86006795e-02 4.12995589e-03 -4.13371175e-03 7.50169058e-03 -1.32835382e-02 1.32956185e-02 -2.40240613e-02 -2.46813282e-04 -4.94121524e-04 8.30669595e-04 -4.26594825e-04 -8.31425022e-04 -9.41387813e-07 -9.72433996e-06 -1.08090228e-06 3.24544151e-06 -5.13415444e-06 3.45344291e-06 -1.03801459e-05 1.64209621e-05 1.98336950e-06 6.98100783e-07 -1.10436661e-06 1.57201552e-06 3.31009540e-06 -4.51059212e-05 -2.87817072e-04 -1.33188086e-04 4.92750067e-05 -9.84961837e-05 3.95352170e-04 -1.23474085e-04 2.46813282e-04 -2.47411303e-05 -1.47282984e-05 2.94405072e-05 -3.40685171e-05 -4.54660846e-05 -3.10924702e-07 -3.21178739e-06 -2.36920844e-07 1.05858563e-06 -1.72806481e-06 7.64118956e-07 -3.38659699e-06 5.52496280e-06 6.98100783e-07 1.49619549e-07 -2.45094864e-07 5.62133663e-07 1.10075876e-06 -5.20492749e-05 -3.32122026e-04 -4.05852446e-05 4.07103584e-05 -1.78269465e-04 8.97947178e-05 -9.01621275e-05 4.94121524e-04 -1.47282984e-05 -2.51275068e-05 4.93575935e-05 -2.54736713e-05 -4.93856874e-05 4.91870038e-07 5.08091501e-06 3.74798990e-07 -1.72806481e-06 2.69995506e-06 -1.20880463e-06 5.52496280e-06 -8.63437763e-06 -1.10436661e-06 -2.45094864e-07 3.82418235e-07 -8.18152527e-07 -1.77513074e-06 1.04041689e-04 6.63881230e-04 8.11261525e-05 -1.78269465e-04 3.07871094e-04 -1.79491341e-04 4.94121524e-04 -8.30669595e-04 2.94405072e-05 4.93575935e-05 -9.90964898e-05 6.93765564e-05 8.48872460e-05 -7.41509184e-07 -7.65963537e-06 -8.20684715e-07 2.71231397e-06 -3.95158656e-06 2.62389032e-06 -8.66516435e-06 1.26444974e-05 1.57201552e-06 5.62133663e-07 -8.18152527e-07 1.03884529e-06 2.70995093e-06 -7.80311210e-05 -4.97909991e-04 -1.33580368e-04 1.82219018e-04 -1.70276298e-04 3.70253734e-04 -5.27766916e-04 4.26594825e-04 -3.40685171e-05 -2.54736713e-05 6.93765564e-05 -6.40182947e-05 -6.02027351e-05 -1.56134981e-06 -1.61284182e-05 -1.72806481e-06 5.31582877e-06 -8.57050441e-06 5.52496280e-06 -1.70062479e-05 2.74082234e-05 3.31009540e-06 1.10075876e-06 -1.77513074e-06 2.70995093e-06 5.45802294e-06 -1.04136307e-04 -6.64484976e-04 -1.78269465e-04 8.14502486e-05 -3.08151078e-04 4.94121524e-04 -1.80389660e-04 8.31425022e-04 -4.54660846e-05 -4.93856874e-05 8.48872460e-05 -6.02027351e-05 -9.92508158e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -2 2 169 + 9.11252803e-07 9.56477318e-06 2.93516093e-06 1.13533425e-06 4.88359185e-06 -9.59313637e-06 -3.71067090e-06 -1.59612927e-05 -4.67987968e-07 6.83137386e-07 2.93848633e-06 -2.31244197e-06 1.13662053e-06 9.56477318e-06 1.00255147e-04 3.08847491e-05 1.19463683e-05 5.13867937e-05 -1.00742118e-04 -3.89675316e-05 -1.67617176e-04 -4.93724183e-06 7.20705383e-06 3.10008347e-05 -2.43961085e-05 1.19912707e-05 -2.93516093e-06 -3.08847491e-05 -9.10286800e-06 -3.68226825e-06 -1.58391198e-05 2.98824311e-05 1.20743208e-05 5.19371761e-05 1.82689002e-06 -2.13217309e-06 -9.17145163e-06 7.55524124e-06 -3.71358175e-06 -1.13533425e-06 -1.19463683e-05 -3.68226825e-06 -1.00747946e-06 -6.12664710e-06 1.20743208e-05 3.33729323e-06 2.00895474e-05 5.33821442e-07 -6.05365050e-07 -3.71358175e-06 3.02218583e-06 -1.00722103e-06 -4.88359185e-06 -5.13867937e-05 -1.58391198e-05 -6.12664710e-06 -2.59366718e-05 5.19371761e-05 2.00895474e-05 8.50812200e-05 2.29621017e-06 -3.71358175e-06 -1.57158475e-05 1.21413833e-05 -6.07896478e-06 9.59313637e-06 1.00742118e-04 2.98824311e-05 1.20743208e-05 5.19371761e-05 -9.78118163e-05 -3.94807942e-05 -1.69824953e-04 -5.98536037e-06 7.02424381e-06 3.02144852e-05 -2.48594519e-05 1.22190151e-05 3.71067090e-06 3.89675316e-05 1.20743208e-05 3.33729323e-06 2.00895474e-05 -3.94807942e-05 -1.10141288e-05 -6.56891018e-05 -1.76144646e-06 2.01417913e-06 1.22190151e-05 -9.93544465e-06 3.35124002e-06 1.59612927e-05 1.67617176e-04 5.19371761e-05 2.00895474e-05 8.50812200e-05 -1.69824953e-04 -6.56891018e-05 -2.78301639e-04 -7.57678682e-06 1.22190151e-05 5.17330829e-05 -3.99866249e-05 2.00106032e-05 -4.67987968e-07 -4.93724183e-06 -1.82689002e-06 -5.33821442e-07 -2.29621017e-06 5.98536037e-06 1.76144646e-06 7.57678682e-06 -1.17535291e-07 -3.97200528e-07 -1.70854113e-06 9.79936031e-07 -4.81661994e-07 6.83137386e-07 7.20705383e-06 2.13217309e-06 6.05365050e-07 3.71358175e-06 -7.02424381e-06 -2.01417913e-06 -1.22190151e-05 -3.97200528e-07 3.48259502e-07 2.16511122e-06 -1.84744381e-06 6.10005644e-07 2.93848633e-06 3.10008347e-05 9.17145163e-06 3.71358175e-06 1.57158475e-05 -3.02144852e-05 -1.22190151e-05 -5.17330829e-05 -1.70854113e-06 2.16511122e-06 9.15804943e-06 -7.41171842e-06 3.71232899e-06 -2.31244197e-06 -2.43961085e-05 -7.55524124e-06 -3.02218583e-06 -1.21413833e-05 2.48594519e-05 9.93544465e-06 3.99866249e-05 9.79936031e-07 -1.84744381e-06 -7.41171842e-06 5.57972692e-06 -2.97035490e-06 1.13662053e-06 1.19912707e-05 3.71358175e-06 1.00722103e-06 6.07896478e-06 -1.22190151e-05 -3.35124002e-06 -2.00106032e-05 -4.81661994e-07 6.10005644e-07 3.71232899e-06 -2.97035490e-06 9.96573009e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 -1 -2 169 + 3.83955512e-06 4.19919069e-05 3.92683227e-06 -1.89244487e-05 -1.17426483e-05 -1.35585435e-05 6.53422258e-05 4.05449474e-05 -6.31890728e-06 -3.49681725e-06 -2.16978025e-06 5.18183225e-06 1.04567479e-05 4.19919069e-05 4.58569112e-04 4.30873073e-05 -2.07649189e-04 -1.28846628e-04 -1.48469277e-04 7.15512919e-04 4.43976821e-04 -6.97279786e-05 -3.85867346e-05 -2.39431257e-05 5.71805650e-05 1.15388288e-04 -3.92683227e-06 -4.30873073e-05 -1.40149387e-06 1.96084533e-05 1.21670742e-05 5.10560836e-06 -6.79795362e-05 -4.21814024e-05 7.21752600e-06 1.15275871e-06 7.15288480e-07 -5.42582220e-06 -1.09491107e-05 1.89244487e-05 2.07649189e-04 1.96084533e-05 -9.18310798e-05 -5.86363651e-05 -6.79795362e-05 3.18611280e-04 2.03283392e-04 -3.04379662e-05 -1.71250255e-05 -1.09491107e-05 2.36397712e-05 5.12100181e-05 1.17426483e-05 1.28846628e-04 1.21670742e-05 -5.86363651e-05 -3.37166812e-05 -4.21814024e-05 2.03283392e-04 1.17137466e-04 -1.88868028e-05 -1.09491107e-05 -6.27338109e-06 1.77818275e-05 3.02330913e-05 1.35585435e-05 1.48469277e-04 5.10560836e-06 -6.79795362e-05 -4.21814024e-05 -1.84724174e-05 2.35020262e-04 1.45830419e-04 -2.51488080e-05 -4.28398501e-06 -2.65821901e-06 1.89521527e-05 3.82447507e-05 -6.53422258e-05 -7.15512919e-04 -6.79795362e-05 3.18611280e-04 2.03283392e-04 2.35020262e-04 -1.10233072e-03 -7.02795558e-04 1.06467085e-04 5.98703642e-05 3.82447507e-05 -8.28301074e-05 -1.79034036e-04 -4.05449474e-05 -4.43976821e-04 -4.21814024e-05 2.03283392e-04 1.17137466e-04 1.45830419e-04 -7.02795558e-04 -4.05791278e-04 6.60629829e-05 3.82447507e-05 2.19660589e-05 -6.19513742e-05 -1.05860278e-04 -6.31890728e-06 -6.97279786e-05 -7.21752600e-06 3.04379662e-05 1.88868028e-05 2.51488080e-05 -1.06467085e-04 -6.60629829e-05 9.63911023e-06 6.27171598e-06 3.89160901e-06 -8.02686959e-06 -1.61979292e-05 -3.49681725e-06 -3.85867346e-05 -1.15275871e-06 1.71250255e-05 1.09491107e-05 4.28398501e-06 -5.98703642e-05 -3.82447507e-05 6.27171598e-06 8.87315045e-07 5.79560922e-07 -4.41578077e-06 -9.60072217e-06 -2.16978025e-06 -2.39431257e-05 -7.15288480e-07 1.09491107e-05 6.27338109e-06 2.65821901e-06 -3.82447507e-05 -2.19660589e-05 3.89160901e-06 5.79560922e-07 3.12913232e-07 -3.35260274e-06 -5.65368674e-06 5.18183225e-06 5.71805650e-05 5.42582220e-06 -2.36397712e-05 -1.77818275e-05 -1.89521527e-05 8.28301074e-05 6.19513742e-05 -8.02686959e-06 -4.41578077e-06 -3.35260274e-06 4.03592852e-06 1.46809325e-05 1.04567479e-05 1.15388288e-04 1.09491107e-05 -5.12100181e-05 -3.02330913e-05 -3.82447507e-05 1.79034036e-04 1.05860278e-04 -1.61979292e-05 -9.60072217e-06 -5.65368674e-06 1.46809325e-05 2.63863900e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 -1 -1 668 + 2.52078031e-03 1.64759450e-02 -3.25105461e-07 -9.30795141e-03 -4.02813944e-06 9.10374471e-07 2.60645309e-02 1.12797715e-05 3.83352702e-05 -4.63830420e-09 -6.63986110e-05 -5.74697701e-08 1.92513510e-02 8.66342784e-02 1.75669055e-02 -4.96623746e-02 -1.75341858e-02 -4.14865029e-02 1.17284074e-01 4.14092311e-02 3.05345915e-03 4.27892344e-03 1.51075012e-03 -5.29437942e-03 -4.27095361e-03 1.64759450e-02 8.12351455e-02 -1.75399033e-06 -5.02177252e-02 -2.17323868e-05 4.13034744e-06 1.18254160e-01 5.11760565e-05 6.31590129e-03 -7.64180646e-07 -3.30709311e-10 -1.09394579e-02 -9.46839279e-06 8.66342784e-02 1.76233276e-01 4.99078543e-02 -1.41091586e-01 -4.98148970e-02 -6.50881881e-02 1.84007023e-01 6.49669562e-02 2.10562425e-02 2.95068789e-02 1.04179291e-02 -3.65093264e-02 -2.94519201e-02 3.25105461e-07 1.75399033e-06 3.24514969e-03 -1.17551164e-06 -5.08718255e-10 -9.16018014e-03 2.98721950e-06 1.29275887e-09 9.57225318e-08 1.70084588e-04 7.36063615e-08 -1.53914899e-07 -1.33217453e-10 -1.75669055e-02 -4.99078543e-02 7.70355088e-03 4.12985845e-02 1.45812007e-02 -2.21293801e-02 -7.58032293e-02 -2.67636800e-02 -8.63920236e-03 1.45383338e-04 5.13301765e-05 9.46118283e-03 7.63229640e-03 9.30795141e-03 5.02177252e-02 -1.17551164e-06 -3.04104068e-02 -1.45648885e-05 2.98721950e-06 7.63655869e-02 3.70124103e-05 2.44599452e-03 -3.01889189e-07 -1.33217453e-10 -4.23658515e-03 -3.74048393e-06 4.96623746e-02 1.41091586e-01 4.12985845e-02 -9.44408602e-02 -4.12216626e-02 -7.58032293e-02 1.65355889e-01 7.56620398e-02 1.09273807e-02 1.88608733e-02 7.63229640e-03 -1.89552365e-02 -1.88257435e-02 4.02813944e-06 2.17323868e-05 -5.08718255e-10 -1.45648885e-05 3.24514343e-03 1.29275887e-09 3.70124103e-05 -9.16016422e-03 1.05853658e-06 -1.33217453e-10 5.94060849e-09 -1.98065116e-06 1.70082948e-04 1.75341858e-02 4.98148970e-02 1.45812007e-02 -4.12216626e-02 7.75791880e-03 -2.67636800e-02 7.56620398e-02 -2.22291720e-02 3.85810634e-03 7.63229640e-03 -6.14923226e-05 -1.21946375e-02 1.73841361e-04 -9.10374471e-07 -4.13034744e-06 -9.16018014e-03 2.98721950e-06 1.29275887e-09 2.47718463e-02 -6.81630736e-06 -2.94984743e-09 -5.14364745e-07 -1.73655412e-03 -7.51516832e-07 7.69597852e-07 6.66107483e-10 4.14865029e-02 6.50881881e-02 -2.21293801e-02 -7.58032293e-02 -2.67636800e-02 5.59477659e-02 8.79627814e-02 3.10568264e-02 2.54796519e-02 -7.16039797e-03 -2.52810602e-03 -2.48719613e-02 -2.00641066e-02 -2.60645309e-02 -1.18254160e-01 2.98721950e-06 7.63655869e-02 3.70124103e-05 -6.81630736e-06 -1.70382850e-01 -8.44557838e-05 -1.17187506e-02 1.47854212e-06 6.66107483e-10 2.02974633e-02 1.83195134e-05 -1.17284074e-01 -1.84007023e-01 -7.58032293e-02 1.65355889e-01 7.56620398e-02 8.79627814e-02 -1.61611907e-01 -8.77989439e-02 -2.48129646e-02 -4.71846362e-02 -2.00641066e-02 4.30521270e-02 4.70967511e-02 -1.12797715e-05 -5.11760565e-05 1.29275887e-09 3.70124103e-05 -9.16016422e-03 -2.94984743e-09 -8.44557838e-05 2.47718100e-02 -5.07144479e-06 6.66107483e-10 -6.06535786e-08 1.02870302e-05 -1.73654592e-03 -4.14092311e-02 -6.49669562e-02 -2.67636800e-02 7.56620398e-02 -2.22291720e-02 3.10568264e-02 -8.77989439e-02 5.60635653e-02 -8.76065901e-03 -2.00641066e-02 2.55928648e-03 3.44509506e-02 -7.23520964e-03 3.83352702e-05 6.31590129e-03 -9.57225318e-08 -2.44599452e-03 -1.05853658e-06 5.14364745e-07 1.17187506e-02 5.07144479e-06 -1.04934184e-03 1.95795826e-07 1.68503499e-03 1.45844276e-06 3.05345915e-03 2.10562425e-02 8.63920236e-03 -1.09273807e-02 -3.85810634e-03 -2.54796519e-02 2.48129646e-02 8.76065901e-03 2.34064452e-03 3.63414704e-03 1.28310033e-03 -4.91175923e-03 -3.96229551e-03 -4.63830420e-09 -7.64180646e-07 -1.70084588e-04 3.01889189e-07 1.33217453e-10 1.73655412e-03 -1.47854212e-06 -6.66107483e-10 1.95795826e-07 1.21428062e-03 5.58596407e-07 -2.48961148e-07 -2.34993022e-10 4.27892344e-03 2.95068789e-02 -1.45383338e-04 -1.88608733e-02 -7.63229640e-03 7.16039797e-03 4.71846362e-02 2.00641066e-02 3.63414704e-03 5.23639869e-03 2.04675821e-03 -6.68888885e-03 -5.30801922e-03 -3.30709311e-10 -7.36063615e-08 1.33217453e-10 -5.94060849e-09 7.51516832e-07 -6.66107483e-10 6.06535786e-08 5.58596407e-07 -7.64858284e-05 -1.46762231e-10 4.50834198e-08 1.51075012e-03 1.04179291e-02 -5.13301765e-05 -7.63229640e-03 6.14923226e-05 2.52810602e-03 2.00641066e-02 -2.55928648e-03 1.28310033e-03 2.04675821e-03 1.61974783e-04 -2.22483488e-03 -2.04366695e-03 -6.63986110e-05 -1.09394579e-02 1.53914899e-07 4.23658515e-03 1.98065116e-06 -7.69597852e-07 -2.02974633e-02 -1.02870302e-05 1.68503499e-03 -2.48961148e-07 -1.46762231e-10 -2.99505024e-03 -3.64328844e-06 -5.29437942e-03 -3.65093264e-02 -9.46118283e-03 1.89552365e-02 1.21946375e-02 2.48719613e-02 -4.30521270e-02 -3.44509506e-02 -4.91175923e-03 -6.68888885e-03 -2.22483488e-03 8.02331330e-03 6.48306565e-03 -5.74697701e-08 -9.46839279e-06 1.33217453e-10 3.74048393e-06 -1.70082948e-04 -6.66107483e-10 -1.83195134e-05 1.73654592e-03 1.45844276e-06 -2.34993022e-10 4.50834198e-08 -3.64328844e-06 1.21427773e-03 -4.27095361e-03 -2.94519201e-02 -7.63229640e-03 1.88257435e-02 -1.73841361e-04 2.00641066e-02 -4.70967511e-02 7.23520964e-03 -3.96229551e-03 -5.30801922e-03 -2.04366695e-03 6.48306565e-03 5.21660704e-03 3.33606344e-05 3.50374283e-04 -3.28256531e-05 -1.68784744e-04 3.27645127e-05 1.13688913e-04 5.84571891e-04 -1.13477159e-04 -3.31108290e-05 2.31872694e-05 -4.50111525e-06 5.73664211e-05 -2.31440813e-05 2.49376946e-03 1.63259218e-02 3.21649074e-07 -9.21801592e-03 3.98531392e-06 -9.01360150e-07 2.58317306e-02 -1.11680818e-05 3.46712384e-05 4.19087540e-09 -6.00523242e-05 5.19260133e-08 3.50374283e-04 3.67824742e-03 -3.42370911e-04 -1.76042153e-03 3.41733219e-04 1.18773504e-03 6.10716120e-03 -1.18552279e-03 -3.36216588e-04 2.35449998e-04 -4.57055790e-05 5.82514632e-04 -2.35011454e-04 1.63259218e-02 8.07851388e-02 1.74007357e-06 -4.98680929e-02 2.15599546e-05 -4.10635424e-06 1.17682412e-01 -5.08787746e-05 6.23186384e-03 7.53274645e-07 -3.25670509e-10 -1.07939008e-02 9.33326466e-06 3.28256531e-05 3.42370911e-04 4.56849254e-06 -1.71094309e-04 3.32128458e-05 -1.65917061e-05 5.91891919e-04 -1.14898123e-04 -4.07019730e-05 -7.34711513e-06 1.42622279e-06 5.84654113e-05 -2.35874612e-05 -3.21649074e-07 -1.74007357e-06 3.21232643e-03 1.16469636e-06 -5.03544437e-10 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 -9.38408078e-08 1.61686673e-04 -6.99035624e-08 1.51253354e-07 -1.30785673e-10 1.68784744e-04 1.76042153e-03 -1.71094309e-04 -8.41898788e-04 1.70775632e-04 5.91891919e-04 2.91171810e-03 -5.90789474e-04 -1.55627143e-04 1.15484834e-04 -2.35874612e-05 2.69642067e-04 -1.15269734e-04 9.21801592e-03 4.98680929e-02 1.16469636e-06 -3.01662544e-02 1.44308845e-05 -2.96379028e-06 7.58614025e-02 -3.67221162e-05 2.40929773e-03 2.96864946e-07 -1.30785673e-10 -4.17302446e-03 3.67823227e-06 -3.27645127e-05 -3.41733219e-04 3.32128458e-05 1.70775632e-04 4.69233101e-06 -1.14898123e-04 -5.90789474e-04 -1.70201189e-05 3.02103578e-05 -2.35874612e-05 -1.44598871e-06 -6.43700825e-05 -7.43506409e-06 -3.98531392e-06 -2.15599546e-05 -5.03544437e-10 1.44308845e-05 3.21232023e-03 1.28136410e-09 -3.67221162e-05 -9.07669659e-03 -1.04163497e-06 -1.30785673e-10 -5.64176189e-09 1.94397114e-06 1.61685063e-04 -1.13688913e-04 -1.18773504e-03 -1.65917061e-05 5.91891919e-04 -1.14898123e-04 5.98807016e-05 -2.05076768e-03 3.98095244e-04 1.40695861e-04 2.66954372e-05 -5.18212116e-06 -2.01662792e-04 8.13594426e-05 9.01360150e-07 4.10635424e-06 -9.07671236e-03 -2.96379028e-06 1.28136410e-09 2.45811607e-02 6.77897519e-06 -2.93081987e-09 5.06317042e-07 -1.69536494e-03 7.32973512e-07 -7.58652036e-07 6.55990858e-10 -5.84571891e-04 -6.10716120e-03 5.91891919e-04 2.91171810e-03 -5.90789474e-04 -2.05076768e-03 -1.00860309e-02 2.04694796e-03 5.36018193e-04 -3.98074794e-04 8.13594426e-05 -9.28714104e-04 3.97333349e-04 -2.58317306e-02 -1.17682412e-01 -2.96379028e-06 7.58614025e-02 -3.67221162e-05 6.77897519e-06 -1.69694857e-01 8.39932287e-05 -1.15738852e-02 -1.45814709e-06 6.55990858e-10 2.00465492e-02 -1.80668138e-05 1.13477159e-04 1.18552279e-03 -1.14898123e-04 -5.90789474e-04 -1.70201189e-05 3.98095244e-04 2.04694796e-03 6.13650522e-05 -1.04051910e-04 8.13594426e-05 5.25078932e-06 2.22292276e-04 2.69987966e-05 1.11680818e-05 5.08787746e-05 1.28136410e-09 -3.67221162e-05 -9.07669659e-03 -2.93081987e-09 8.39932287e-05 2.45811246e-02 5.00384967e-06 6.55990858e-10 5.91569780e-08 -1.01328654e-05 -1.69535687e-03 -3.31108290e-05 -3.36216588e-04 4.07019730e-05 1.55627143e-04 -3.02103578e-05 -1.40695861e-04 -5.36018193e-04 1.04051910e-04 2.05421039e-05 -2.31363560e-05 4.49123193e-06 -3.69308277e-05 1.48994841e-05 3.46712384e-05 6.23186384e-03 9.38408078e-08 -2.40929773e-03 1.04163497e-06 -5.06317042e-07 1.15738852e-02 -5.00384967e-06 -1.04403562e-03 -1.94273263e-07 1.67802194e-03 -1.45095116e-06 2.31872694e-05 2.35449998e-04 7.34711513e-06 -1.15484834e-04 2.35874612e-05 -2.66954372e-05 3.98074794e-04 -8.13594426e-05 -2.31363560e-05 -9.93582364e-06 1.95748636e-06 3.06046683e-05 -1.33393269e-05 4.19087540e-09 7.53274645e-07 -1.61686673e-04 -2.96864946e-07 1.30785673e-10 1.69536494e-03 1.45814709e-06 -6.55990858e-10 -1.94273263e-07 1.20161446e-03 -5.52030007e-07 2.47383923e-07 -2.33170086e-10 -4.50111525e-06 -4.57055790e-05 -1.42622279e-06 2.35874612e-05 1.44598871e-06 5.18212116e-06 -8.13594426e-05 -5.25078932e-06 4.49123193e-06 1.95748636e-06 -2.31918317e-07 -7.78104913e-06 -1.97147935e-06 -3.25670509e-10 6.99035624e-08 1.30785673e-10 5.64176189e-09 -7.32973512e-07 -6.55990858e-10 -5.91569780e-08 -5.52030007e-07 -7.52286023e-05 -1.45478430e-10 -4.45534560e-08 5.73664211e-05 5.82514632e-04 -5.84654113e-05 -2.69642067e-04 6.43700825e-05 2.01662792e-04 9.28714104e-04 -2.22292276e-04 -3.69308277e-05 3.06046683e-05 -7.78104913e-06 6.32248316e-05 -3.52783450e-05 -6.00523242e-05 -1.07939008e-02 -1.51253354e-07 4.17302446e-03 -1.94397114e-06 7.58652036e-07 -2.00465492e-02 1.01328654e-05 1.67802194e-03 2.47383923e-07 -1.45478430e-10 -2.98164606e-03 3.61717981e-06 -2.31440813e-05 -2.35011454e-04 2.35874612e-05 1.15269734e-04 7.43506409e-06 -8.13594426e-05 -3.97333349e-04 -2.69987966e-05 1.48994841e-05 -1.33393269e-05 -1.97147935e-06 -3.52783450e-05 -9.98556108e-06 5.19260133e-08 9.33326466e-06 1.30785673e-10 -3.67823227e-06 -1.61685063e-04 -6.55990858e-10 1.80668138e-05 1.69535687e-03 -1.45095116e-06 -2.33170086e-10 -4.45534560e-08 3.61717981e-06 1.20161159e-03 + 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 258 282 308 334 359 385 411 437 463 489 515 541 566 592 616 642 668 +1 -1 0 676 + 3.93376184e-02 1.43812330e-01 -4.93149668e-06 -7.05611715e-02 7.05692375e-02 1.04449263e-05 1.49448795e-01 -1.49465879e-01 1.23041896e-02 -1.48928208e-06 1.48945232e-06 2.43604152e-06 2.13114816e-02 2.99188764e-01 3.37836548e-01 2.67051895e-01 -2.22939615e-01 2.65472743e-01 -2.40007252e-01 2.00362272e-01 -2.38588022e-01 -1.29669484e-02 1.19093219e-01 -1.41814201e-01 2.07772513e-02 1.18388987e-01 1.43812330e-01 2.07135892e-01 -1.00434680e-05 -1.43704622e-01 1.43721049e-01 1.05141295e-05 1.50438973e-01 -1.50456170e-01 2.76747208e-02 -3.34970988e-06 3.35009279e-06 5.47917180e-06 4.79340224e-02 3.37836548e-01 2.95214746e-01 2.56969699e-02 -2.14522820e-02 2.55450165e-02 -9.63297845e-02 8.04177969e-02 -9.57601596e-02 1.14904457e-02 -1.05532476e-01 1.25666297e-01 -1.84114158e-02 -1.04908433e-01 4.93149668e-06 1.00434680e-05 4.38001625e-02 -7.92516748e-06 7.92607343e-06 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 3.48998183e-06 1.48228696e-02 -1.48245640e-02 4.54127846e-10 3.97289502e-06 -2.67051895e-01 -2.56969699e-02 4.96737976e-02 1.91194831e-01 -2.27671588e-01 -2.04824043e-01 -5.15005212e-02 6.13259542e-02 -1.37233944e-01 -3.13721543e-02 3.73574335e-02 -2.47294080e-02 -1.40908416e-01 7.05611715e-02 1.43704622e-01 -7.92516748e-06 -6.95952497e-02 1.13408375e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 2.42616285e-02 -2.93647550e-06 3.97289502e-06 1.48293676e-02 4.20206786e-02 2.22939615e-01 2.14522820e-02 1.91194831e-01 1.19086875e-01 1.90064242e-01 -5.15005212e-02 -2.23521252e-01 -5.11959842e-02 -7.66088443e-02 -1.38812989e-02 -1.40908416e-01 1.31018993e-01 -1.37992149e-02 -7.05692375e-02 -1.43721049e-01 7.92607343e-06 1.13408375e-01 -6.96211764e-02 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 -2.42644019e-02 3.97289502e-06 -2.93738375e-06 1.48180658e-02 -4.20288712e-02 -2.65472743e-01 -2.55450165e-02 -2.27671588e-01 1.90064242e-01 5.23743770e-02 6.13259542e-02 -5.11959842e-02 -2.05551475e-01 9.12245230e-02 -1.40908416e-01 3.55775170e-02 1.06848860e-01 -2.97007364e-02 -1.04449263e-05 -1.05141295e-05 -8.50229909e-02 1.22387294e-05 -1.22401284e-05 1.23594998e-01 -1.11023371e-05 1.11036062e-05 -6.33444089e-06 -3.73055268e-02 3.73097913e-02 -6.58066333e-10 -5.75703181e-06 2.40007252e-01 9.63297845e-02 -2.04824043e-01 -5.15005212e-02 6.13259542e-02 1.68473869e-01 9.04232705e-02 -1.07674509e-01 2.45728579e-02 -8.94038606e-02 1.06460613e-01 -1.35660655e-02 -7.72995777e-02 -1.49448795e-01 -1.50438973e-01 1.22387294e-05 9.00920169e-02 -1.75135027e-01 -1.11023371e-05 -3.52602051e-02 1.58873363e-01 -2.60198035e-02 3.14910296e-06 -5.75703181e-06 -3.73149430e-02 -4.50633570e-02 -2.00362272e-01 -8.04177969e-02 -5.15005212e-02 -2.23521252e-01 -5.11959842e-02 9.04232705e-02 2.01301940e-01 8.98885725e-02 -3.45039972e-04 7.88634261e-02 -7.72995777e-02 -3.19280116e-04 7.83970847e-02 1.49465879e-01 1.50456170e-01 -1.22401284e-05 -1.75135027e-01 9.01320550e-02 1.11036062e-05 1.58873363e-01 -3.52965257e-02 2.60227779e-02 -5.75703181e-06 3.15041910e-06 -3.73003748e-02 4.50770378e-02 2.38588022e-01 9.57601596e-02 6.13259542e-02 -5.11959842e-02 -2.05551475e-01 -1.07674509e-01 8.98885725e-02 1.69751075e-01 4.10867794e-04 -7.72995777e-02 1.05995557e-01 -2.73518845e-02 -8.84869537e-02 1.23041896e-02 2.76747208e-02 -3.48998183e-06 -2.42616285e-02 2.42644019e-02 6.33444089e-06 2.60198035e-02 -2.60227779e-02 1.65141115e-02 -2.95659433e-06 2.95693230e-06 3.25513784e-06 2.84772691e-02 -1.29669484e-02 1.14904457e-02 1.37233944e-01 7.66088443e-02 -9.12245230e-02 -2.45728579e-02 3.45039972e-04 -4.10867794e-04 -1.62410215e-01 4.57066430e-02 -5.44267016e-02 -2.47348883e-02 -1.40939643e-01 -1.48928208e-06 -3.34970988e-06 -1.48228696e-02 2.93647550e-06 -3.97289502e-06 3.73055268e-02 -3.14910296e-06 5.75703181e-06 -2.95659433e-06 -7.91184381e-03 7.98550905e-03 -5.58562361e-07 -4.00482622e-06 1.19093219e-01 -1.05532476e-01 3.13721543e-02 1.38812989e-02 1.40908416e-01 8.94038606e-02 -7.88634261e-02 7.72995777e-02 4.57066430e-02 1.56402795e-02 -7.60018985e-02 1.35144522e-01 2.43821172e-02 1.48945232e-06 3.35009279e-06 1.48245640e-02 -3.97289502e-06 2.93738375e-06 -3.73097913e-02 5.75703181e-06 -3.15041910e-06 2.95693230e-06 7.98550905e-03 -7.91366940e-03 -5.57582947e-07 4.00541161e-06 -1.41814201e-01 1.25666297e-01 -3.73574335e-02 1.40908416e-01 -3.55775170e-02 -1.06460613e-01 7.72995777e-02 -1.05995557e-01 -5.44267016e-02 -7.60018985e-02 4.23169254e-02 9.68632034e-02 -7.42761054e-02 2.43604152e-06 5.47917180e-06 -4.54127846e-10 -1.48293676e-02 -1.48180658e-02 6.58066333e-10 3.73149430e-02 3.73003748e-02 3.25513784e-06 -5.58562361e-07 -5.57582947e-07 -1.58982655e-02 7.46365585e-06 2.07772513e-02 -1.84114158e-02 2.47294080e-02 -1.31018993e-01 -1.06848860e-01 1.35660655e-02 3.19280116e-04 2.73518845e-02 -2.47348883e-02 1.35144522e-01 9.68632034e-02 -1.32327126e-01 2.67411351e-02 2.13114816e-02 4.79340224e-02 -3.97289502e-06 -4.20206786e-02 4.20288712e-02 5.75703181e-06 4.50633570e-02 -4.50770378e-02 2.84772691e-02 -4.00482622e-06 4.00541161e-06 7.46365585e-06 4.93968293e-02 1.18388987e-01 -1.04908433e-01 1.40908416e-01 1.37992149e-02 2.97007364e-02 7.72995777e-02 -7.83970847e-02 8.84869537e-02 -1.40939643e-01 2.43821172e-02 -7.42761054e-02 2.67411351e-02 1.53510654e-02 6.42532556e-04 5.07511162e-03 -6.04452428e-04 -1.90380193e-03 1.80753131e-03 1.84578789e-03 5.81355023e-03 -5.51957316e-03 -1.06032758e-04 6.86072489e-05 -6.51379475e-05 1.06507418e-05 -2.05160480e-04 3.89331986e-02 1.42829079e-01 4.88176312e-06 -6.99865125e-02 6.99785278e-02 -1.03594733e-05 1.48516712e-01 -1.48499767e-01 1.21287926e-02 1.46551442e-06 -1.46534722e-06 -2.39689066e-06 2.10076849e-02 5.07511162e-03 3.59759293e-02 -4.37719419e-03 -1.37865453e-02 1.30893933e-02 1.26139618e-02 3.97293214e-02 -3.77203064e-02 4.00605355e-04 -2.59206984e-04 2.46099518e-04 -4.02398682e-05 7.75122601e-04 1.42829079e-01 2.06779927e-01 9.99851519e-06 -1.43341901e-01 1.43325548e-01 -1.04981073e-05 1.50504214e-01 -1.50487043e-01 2.77767575e-02 3.35624824e-06 -3.35586533e-06 -5.48923978e-06 4.81107552e-02 6.04452428e-04 4.37719419e-03 2.97306159e-04 -1.82039627e-03 1.72834327e-03 -1.04909434e-03 5.34701922e-03 -5.07663349e-03 -6.57679237e-05 -1.30188444e-04 1.23605132e-04 1.46455660e-06 -2.82110993e-05 -4.88176312e-06 -9.99851519e-06 4.33830748e-02 7.86401912e-06 -7.86312192e-06 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 -3.44741836e-06 1.46430081e-02 -1.46413375e-02 4.48205055e-10 -3.92831877e-06 1.90380193e-03 1.37865453e-02 -1.82039627e-03 -4.85829851e-03 5.44364304e-03 5.34701922e-03 1.40943762e-02 -1.59895208e-02 3.46885111e-05 -1.46161394e-05 -2.82110993e-05 -1.35009641e-04 4.37075416e-05 6.99865125e-02 1.43341901e-01 7.86401912e-06 -6.93580099e-02 1.12728223e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 2.40608543e-02 2.90737451e-06 -3.92831877e-06 1.46365828e-02 4.16762926e-02 -1.80753131e-03 -1.30893933e-02 1.72834327e-03 5.44364304e-03 -4.29309378e-03 -5.07663349e-03 -1.59895208e-02 1.24342099e-02 -3.29343976e-05 -2.82110993e-05 -1.75452526e-05 -1.36941640e-04 -5.52610666e-05 -6.99785278e-02 -1.43325548e-01 -7.86312192e-06 1.12728223e-01 -6.93322862e-02 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -2.40581092e-02 -3.92831877e-06 2.90647810e-06 1.46477626e-02 -4.16681967e-02 -1.84578789e-03 -1.26139618e-02 -1.04909434e-03 5.34701922e-03 -5.07663349e-03 3.69162581e-03 -1.52305105e-02 1.44603407e-02 -8.07280792e-05 4.43448271e-04 -4.21024172e-04 1.97534059e-05 -3.80501032e-04 1.03594733e-05 1.04981073e-05 -8.43779188e-02 -1.21808837e-05 1.21794940e-05 1.23008948e-01 1.10829756e-05 -1.10817111e-05 6.30793787e-06 -3.70743003e-02 3.70700705e-02 -6.56460776e-10 5.75358792e-06 -5.81355023e-03 -3.97293214e-02 5.34701922e-03 1.40943762e-02 -1.59895208e-02 -1.52305105e-02 -3.94432082e-02 4.55447332e-02 -8.01948127e-04 5.01161394e-04 -3.80501032e-04 3.78421721e-04 -1.49865377e-03 -1.48516712e-01 -1.50504214e-01 -1.21808837e-05 9.02511126e-02 -1.74609109e-01 1.10829756e-05 -3.58801230e-02 1.58870944e-01 -2.62180358e-02 -3.16820394e-06 5.75358792e-06 -3.70648895e-02 -4.54151998e-02 5.51957316e-03 3.77203064e-02 -5.07663349e-03 -1.59895208e-02 1.24342099e-02 1.44603407e-02 4.55447332e-02 -3.47143716e-02 7.61395564e-04 -3.80501032e-04 4.61654582e-04 2.41146205e-04 1.45404145e-03 1.48499767e-01 1.50487043e-01 1.21794940e-05 -1.74609109e-01 9.02112683e-02 -1.10817111e-05 1.58870944e-01 -3.58438699e-02 2.62150446e-02 5.75358792e-06 -3.16689102e-06 -3.70794811e-02 4.54015593e-02 -1.06032758e-04 4.00605355e-04 6.57679237e-05 -3.46885111e-05 3.29343976e-05 8.07280792e-05 8.01948127e-04 -7.61395564e-04 -2.53714756e-04 2.37178393e-04 -2.25184860e-04 2.75411598e-05 -5.30513056e-04 1.21287926e-02 2.77767575e-02 3.44741836e-06 -2.40608543e-02 2.40581092e-02 -6.30793787e-06 2.62180358e-02 -2.62150446e-02 1.63155837e-02 2.90562388e-06 -2.90529238e-06 -3.21565109e-06 2.81837574e-02 6.86072489e-05 -2.59206984e-04 1.30188444e-04 1.46161394e-05 2.82110993e-05 -4.43448271e-04 -5.01161394e-04 3.80501032e-04 2.37178393e-04 -2.23696430e-05 3.02704483e-05 1.26859109e-05 3.87597996e-04 1.46551442e-06 3.35624824e-06 -1.46430081e-02 -2.90737451e-06 3.92831877e-06 3.70743003e-02 3.16820394e-06 -5.75358792e-06 2.90562388e-06 -7.73263348e-03 7.77543003e-03 5.41908480e-07 3.94790847e-06 -6.51379475e-05 2.46099518e-04 -1.23605132e-04 2.82110993e-05 1.75452526e-05 4.21024172e-04 3.80501032e-04 -4.61654582e-04 -2.25184860e-04 3.02704483e-05 -1.92267109e-05 5.34828434e-05 -3.64596315e-04 -1.46534722e-06 -3.35586533e-06 1.46413375e-02 3.92831877e-06 -2.90647810e-06 -3.70700705e-02 -5.75358792e-06 3.16689102e-06 -2.90529238e-06 7.77543003e-03 -7.73085920e-03 5.42871179e-07 -3.94733429e-06 1.06507418e-05 -4.02398682e-05 -1.46455660e-06 1.35009641e-04 1.36941640e-04 -1.97534059e-05 -3.78421721e-04 -2.41146205e-04 2.75411598e-05 1.26859109e-05 5.34828434e-05 2.01833408e-04 6.52578730e-05 -2.39689066e-06 -5.48923978e-06 -4.48205055e-10 -1.46365828e-02 -1.46477626e-02 6.56460776e-10 3.70648895e-02 3.70794811e-02 -3.21565109e-06 5.41908480e-07 5.42871179e-07 -1.55071762e-02 -7.34396046e-06 -2.05160480e-04 7.75122601e-04 2.82110993e-05 -4.37075416e-05 5.52610666e-05 3.80501032e-04 1.49865377e-03 -1.45404145e-03 -5.30513056e-04 3.87597996e-04 -3.64596315e-04 6.52578730e-05 -1.05181203e-03 2.10076849e-02 4.81107552e-02 3.92831877e-06 -4.16762926e-02 4.16681967e-02 -5.75358792e-06 4.54151998e-02 -4.54015593e-02 2.81837574e-02 3.94790847e-06 -3.94733429e-06 -7.34396046e-06 4.88593834e-02 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 -1 1 668 + 2.51919723e-03 1.64671600e-02 -3.24902890e-07 4.55704780e-06 9.30268310e-03 9.09846362e-07 -1.27613927e-05 -2.60508990e-02 3.81198897e-05 4.61198093e-09 6.60255543e-05 -6.46870749e-08 1.24711616e-02 6.19190671e-02 1.14378084e-02 1.32381946e-02 3.41568515e-02 -2.83190335e-02 -3.27766354e-02 -8.45694373e-02 1.63359495e-03 -7.93167422e-04 -2.04651032e-03 2.59674941e-03 -2.36864449e-03 1.64671600e-02 8.12088709e-02 -1.75317606e-06 2.45898309e-05 5.01972800e-02 4.12894643e-06 -5.79120927e-05 -1.18220802e-01 6.31097933e-03 3.74031330e-10 7.63541461e-07 1.09309316e-02 -1.07093382e-05 6.19190671e-02 1.55233588e-01 3.81840082e-02 4.41944220e-02 1.14029319e-01 -5.76745151e-02 -6.67528627e-02 -1.72234031e-01 1.91416963e-02 -9.29396234e-03 -2.39800442e-02 3.04274867e-02 -2.77546607e-02 3.24902890e-07 1.75317606e-06 3.24322663e-03 5.75530342e-10 1.17487826e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 9.56120788e-08 -8.30764056e-08 -1.69590820e-04 1.53758742e-07 -1.50641723e-10 -1.14378084e-02 -3.81840082e-02 5.04045975e-03 -1.11949249e-02 -2.88848593e-02 -1.51486421e-02 2.23174654e-02 5.75829541e-02 -5.30833333e-03 8.88407690e-05 2.29224682e-04 -5.77942325e-03 5.27174436e-03 -4.55704780e-06 -2.45898309e-05 5.75530342e-10 3.24321860e-03 -1.64786973e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 -1.19715064e-06 5.92300780e-09 -1.50641723e-10 -2.23967753e-06 -1.69588718e-04 -1.32381946e-02 -4.41944220e-02 -1.11949249e-02 1.75580222e-03 -3.34315260e-02 2.23174654e-02 -8.60056502e-03 6.66468894e-02 -3.24018164e-03 5.94708958e-04 5.27174436e-03 -8.36560495e-03 1.77598582e-03 -9.30268310e-03 -5.01972800e-02 1.17487826e-06 -1.64786973e-05 -3.03961175e-02 -2.98584860e-06 4.18791437e-05 7.63361082e-02 -2.44384381e-03 -1.50641723e-10 -3.01594476e-07 -4.23285954e-03 4.23012686e-06 -3.41568515e-02 -1.14029319e-01 -2.88848593e-02 -3.34315260e-02 -7.15462873e-02 5.75829541e-02 6.66468894e-02 1.37529655e-01 -8.36023388e-03 5.27174436e-03 1.21535555e-02 -1.29335887e-02 1.40666049e-02 -9.09846362e-07 -4.12894643e-06 -9.15529304e-03 -1.46265918e-09 -2.98584860e-06 2.47606941e-02 3.33799472e-09 6.81412802e-06 -5.13892822e-07 8.49490276e-07 1.73413560e-03 -7.68956244e-07 7.53367854e-10 2.83190335e-02 5.76745151e-02 -1.51486421e-02 2.23174654e-02 5.75829541e-02 4.22002898e-02 -3.07618203e-02 -7.93708630e-02 1.85681925e-02 9.79846177e-04 2.52817407e-03 1.88372004e-02 -1.71824940e-02 1.27613927e-05 5.79120927e-05 -1.46265918e-09 -9.15527263e-03 4.18791437e-05 3.33799472e-09 2.47606475e-02 -9.55741178e-05 5.73643688e-06 -6.05655645e-08 7.53367854e-10 1.16347756e-05 1.73412509e-03 3.27766354e-02 6.67528627e-02 2.23174654e-02 -8.60056502e-03 6.66468894e-02 -3.07618203e-02 3.31745888e-02 -9.18643583e-02 9.82801276e-03 -8.41597522e-04 -1.71824940e-02 2.85358984e-02 -2.51327182e-03 2.60508990e-02 1.18220802e-01 -2.98584860e-06 4.18791437e-05 7.63361082e-02 6.81412802e-06 -9.55741178e-05 -1.70342752e-01 1.17102688e-02 7.53367854e-10 1.47734692e-06 2.02827699e-02 -2.07210855e-05 8.45694373e-02 1.72234031e-01 5.75829541e-02 6.66468894e-02 1.37529655e-01 -7.93708630e-02 -9.18643583e-02 -1.68247549e-01 2.53579874e-02 -1.71824940e-02 -3.85159984e-02 3.88798767e-02 -4.45786696e-02 3.81198897e-05 6.31097933e-03 -9.56120788e-08 1.19715064e-06 2.44384381e-03 5.13892822e-07 -5.73643688e-06 -1.17102688e-02 -1.04903361e-03 -1.95706982e-07 -1.68462869e-03 1.65047766e-06 1.63359495e-03 1.91416963e-02 5.30833333e-03 3.24018164e-03 8.36023388e-03 -1.85681925e-02 -9.82801276e-03 -2.53579874e-02 1.14583317e-03 -1.31949045e-05 -3.40451556e-05 1.78087290e-03 -1.62443660e-03 3.74031330e-10 8.30764056e-08 -5.92300780e-09 1.50641723e-10 -8.49490276e-07 6.05655645e-08 -7.53367854e-10 -7.64120124e-05 6.31900794e-07 -1.66051241e-10 -4.50523593e-08 -7.93167422e-04 -9.29396234e-03 -8.88407690e-05 -5.94708958e-04 -5.27174436e-03 -9.79846177e-04 8.41597522e-04 1.71824940e-02 -1.31949045e-05 2.07718940e-04 1.15329076e-03 4.22959209e-06 1.06632496e-03 4.61198093e-09 7.63541461e-07 1.69590820e-04 1.50641723e-10 3.01594476e-07 -1.73413560e-03 -7.53367854e-10 -1.47734692e-06 -1.95706982e-07 6.31900794e-07 1.21353966e-03 -2.48869296e-07 2.65893782e-10 -2.04651032e-03 -2.39800442e-02 -2.29224682e-04 -5.27174436e-03 -1.21535555e-02 -2.52817407e-03 1.71824940e-02 3.85159984e-02 -3.40451556e-05 1.15329076e-03 2.73642859e-03 -1.57041360e-03 1.01769300e-03 6.60255543e-05 1.09309316e-02 -1.53758742e-07 2.23967753e-06 4.23285954e-03 7.68956244e-07 -1.16347756e-05 -2.02827699e-02 -1.68462869e-03 -1.66051241e-10 -2.48869296e-07 -2.99427218e-03 4.12251080e-06 2.59674941e-03 3.04274867e-02 5.77942325e-03 8.36560495e-03 1.29335887e-02 -1.88372004e-02 -2.85358984e-02 -3.88798767e-02 1.78087290e-03 4.22959209e-06 -1.57041360e-03 3.20121386e-03 -9.02488072e-04 -6.46870749e-08 -1.07093382e-05 1.50641723e-10 1.69588718e-04 -4.23012686e-06 -7.53367854e-10 -1.73412509e-03 2.07210855e-05 1.65047766e-06 -4.50523593e-08 2.65893782e-10 4.12251080e-06 1.21353595e-03 -2.36864449e-03 -2.77546607e-02 -5.27174436e-03 -1.77598582e-03 -1.40666049e-02 1.71824940e-02 2.51327182e-03 4.45786696e-02 -1.62443660e-03 1.06632496e-03 1.01769300e-03 -9.02488072e-04 3.03502577e-03 5.32524882e-05 5.42774378e-04 -5.20599247e-05 -6.02544989e-05 2.59393037e-04 1.78176672e-04 2.06222851e-04 -8.87780538e-04 -4.43808186e-05 7.36328467e-06 -3.16986251e-05 -7.47094012e-05 -3.66881970e-05 2.49533627e-03 1.63346318e-02 3.21849571e-07 -4.51422233e-06 9.22323548e-03 -9.01883251e-07 1.26497031e-05 -2.58452468e-02 3.48831445e-05 -4.21672991e-09 6.04193497e-05 5.91433329e-08 5.42774378e-04 5.50656007e-03 -5.24434879e-04 -6.06984375e-04 2.61304173e-03 1.79471631e-03 2.07721645e-03 -8.94232786e-03 -4.21297010e-04 6.98979855e-05 -3.00907833e-04 -7.09199341e-04 -3.48272704e-04 1.63346318e-02 8.08113414e-02 1.74088221e-06 -2.44173988e-05 4.98884199e-02 -4.10775119e-06 5.76148107e-05 -1.17715728e-01 6.23674190e-03 3.68992533e-10 -7.53907267e-07 1.08023487e-02 1.05742102e-05 5.20599247e-05 5.24434879e-04 1.21265770e-05 -6.08088620e-05 2.61779546e-04 -4.45421064e-05 2.07524222e-04 -8.93382888e-04 -5.53178821e-05 -3.62020382e-06 1.55848224e-05 -7.46794385e-05 -3.66734829e-05 -3.21849571e-07 -1.74088221e-06 3.21423107e-03 5.70356528e-10 -1.16532421e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 -9.39497938e-08 7.93736167e-08 -1.62172242e-04 -1.51407575e-07 -1.48209947e-10 6.02544989e-05 6.06984375e-04 -6.08088620e-05 -5.71510464e-06 3.02985367e-04 2.07524222e-04 1.63467344e-05 -1.03400723e-03 -4.50064351e-05 -9.68293312e-07 -3.66734829e-05 -9.74150082e-05 4.82460442e-06 4.51422233e-06 2.44173988e-05 5.70356528e-10 3.21422311e-03 1.63446934e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 1.18024906e-06 -5.65901208e-09 -1.48209947e-10 2.20299756e-06 -1.62170174e-04 -2.59393037e-04 -2.61304173e-03 2.61779546e-04 3.02985367e-04 -1.23967355e-03 -8.93382888e-04 -1.03400723e-03 4.22751365e-03 1.93750775e-04 -3.66734829e-05 1.48390584e-04 3.24825968e-04 1.71748237e-04 -9.22323548e-03 -4.98884199e-02 -1.16532421e-06 1.63446934e-05 -3.01804370e-02 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -2.41142642e-03 -1.48209947e-10 2.97156138e-07 -4.17671101e-03 -4.16787528e-06 -1.78176672e-04 -1.79471631e-03 -4.45421064e-05 2.07524222e-04 -8.93382888e-04 1.63228542e-04 -7.08793754e-04 3.05132675e-03 1.86867785e-04 1.32848681e-05 -5.71907879e-05 2.50751530e-04 1.23138740e-04 9.01883251e-07 4.10775119e-06 -9.08155888e-03 -1.45126442e-09 2.96515158e-06 2.45922452e-02 3.31896716e-09 -6.78114931e-06 5.06783606e-07 -8.30946994e-07 1.69774974e-03 7.59286878e-07 7.43251239e-10 -2.06222851e-04 -2.07721645e-03 2.07524222e-04 1.63467344e-05 -1.03400723e-03 -7.08793754e-04 -4.47357598e-05 3.53162563e-03 1.50466339e-04 4.22695177e-06 1.23138740e-04 3.28220159e-04 -2.10611495e-05 -1.26497031e-05 -5.76148107e-05 -1.45126442e-09 -9.08153863e-03 -4.15888498e-05 3.31896716e-09 2.45921989e-02 9.51115626e-05 -5.66884180e-06 5.92434932e-08 7.43251239e-10 -1.14806110e-05 1.69773937e-03 8.87780538e-04 8.94232786e-03 -8.93382888e-04 -1.03400723e-03 4.22751365e-03 3.05132675e-03 3.53162563e-03 -1.44278703e-02 -6.47751144e-04 1.23138740e-04 -4.97276108e-04 -1.08580825e-03 -5.75550635e-04 2.58452468e-02 1.17715728e-01 2.96515158e-06 -4.15888498e-05 7.58907191e-02 -6.78114931e-06 9.51115626e-05 -1.69734988e-01 1.15822968e-02 7.43251239e-10 -1.45933026e-06 2.00611161e-02 2.04683860e-05 -4.43808186e-05 -4.21297010e-04 5.53178821e-05 4.50064351e-05 -1.93750775e-04 -1.86867785e-04 -1.50466339e-04 6.47751144e-04 1.41498048e-05 -5.01265909e-06 2.15792826e-05 2.51107285e-05 1.23313443e-05 3.48831445e-05 6.23674190e-03 9.39497938e-08 -1.18024906e-06 2.41142642e-03 -5.06783606e-07 5.66884180e-06 -1.15822968e-02 -1.04434616e-03 1.94361970e-07 -1.67843343e-03 -1.64298602e-06 7.36328467e-06 6.98979855e-05 3.62020382e-06 9.68293312e-07 3.66734829e-05 -1.32848681e-05 -4.22695177e-06 -1.23138740e-04 -5.01265909e-06 -5.05706469e-07 4.32434166e-06 -8.47934604e-06 2.86304145e-06 3.68992533e-10 -7.93736167e-08 5.65901208e-09 1.48209947e-10 8.30946994e-07 -5.92434932e-08 -7.43251239e-10 -7.53013993e-05 -6.25334397e-07 -1.64767438e-10 4.45841973e-08 -3.16986251e-05 -3.00907833e-04 -1.55848224e-05 3.66734829e-05 -1.48390584e-04 5.71907879e-05 -1.23138740e-04 4.97276108e-04 2.15792826e-05 4.32434166e-06 -1.81173093e-05 2.38881257e-05 1.33632702e-05 -4.21672991e-09 -7.53907267e-07 1.62172242e-04 1.48209947e-10 -2.97156138e-07 -1.69774974e-03 -7.43251239e-10 1.45933026e-06 1.94361970e-07 -6.25334397e-07 1.20235056e-03 2.47475994e-07 2.64070842e-10 -7.47094012e-05 -7.09199341e-04 7.46794385e-05 9.74150082e-05 -3.24825968e-04 -2.50751530e-04 -3.28220159e-04 1.08580825e-03 2.51107285e-05 -8.47934604e-06 2.38881257e-05 3.98081515e-05 3.49486710e-05 6.04193497e-05 1.08023487e-02 1.51407575e-07 -2.20299756e-06 4.17671101e-03 -7.59286878e-07 1.14806110e-05 -2.00611161e-02 -1.67843343e-03 -1.64767438e-10 2.47475994e-07 -2.98243108e-03 -4.09640213e-06 -3.66881970e-05 -3.48272704e-04 3.66734829e-05 -4.82460442e-06 -1.71748237e-04 -1.23138740e-04 2.10611495e-05 5.75550635e-04 1.23313443e-05 2.86304145e-06 1.33632702e-05 3.49486710e-05 -1.41964463e-05 5.91433329e-08 1.05742102e-05 1.48209947e-10 1.62170174e-04 4.16787528e-06 -7.43251239e-10 -1.69773937e-03 -2.04683860e-05 -1.64298602e-06 4.45841973e-08 2.64070842e-10 -4.09640213e-06 1.20234688e-03 + 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 25 51 77 103 129 155 181 207 232 256 282 308 334 359 385 411 437 463 489 515 541 566 590 616 642 668 +1 -1 2 169 + 4.52491277e-07 4.66406907e-06 4.98071733e-07 1.56874203e-06 2.47966756e-06 -1.58799484e-06 -5.00159732e-06 -7.90588791e-06 -9.67947813e-07 3.22905154e-07 5.10407333e-07 -7.62024393e-07 1.60759461e-06 4.66406907e-06 4.80342040e-05 5.14160192e-06 1.61941473e-05 2.55976451e-05 -1.63730087e-05 -5.15689312e-05 -8.15135972e-05 -1.00065894e-05 3.33817511e-06 5.27656197e-06 -7.87776482e-06 1.66192216e-05 -4.98071733e-07 -5.14160192e-06 -3.82779516e-07 -1.73717555e-06 -2.74590582e-06 1.23295009e-06 5.54960935e-06 8.77211550e-06 1.11975496e-06 -2.48285459e-07 -3.92458025e-07 8.49322304e-07 -1.79176149e-06 -1.56874203e-06 -1.61941473e-05 -1.73717555e-06 -5.30269204e-06 -8.64858932e-06 5.54960935e-06 1.69501828e-05 2.76289244e-05 3.33349717e-06 -1.09810721e-06 -1.79176149e-06 2.78666349e-06 -5.46696518e-06 -2.47966756e-06 -2.55976451e-05 -2.74590582e-06 -8.64858932e-06 -1.35018188e-05 8.77211550e-06 2.76289244e-05 4.31432469e-05 5.26916768e-06 -1.79176149e-06 -2.79675182e-06 4.05195898e-06 -8.80873542e-06 1.58799484e-06 1.63730087e-05 1.23295009e-06 5.54960935e-06 8.77211550e-06 -3.96225917e-06 -1.76982805e-05 -2.79751873e-05 -3.58138134e-06 8.01692152e-07 1.26721283e-06 -2.71839064e-06 5.73481661e-06 5.00159732e-06 5.15689312e-05 5.54960935e-06 1.69501828e-05 2.76289244e-05 -1.76982805e-05 -5.40861465e-05 -8.81115091e-05 -1.06734362e-05 3.51689346e-06 5.73481661e-06 -8.91214295e-06 1.75089772e-05 7.90588791e-06 8.15135972e-05 8.77211550e-06 2.76289244e-05 4.31432469e-05 -2.79751873e-05 -8.81115091e-05 -1.37618548e-04 -1.68712083e-05 5.73481661e-06 8.95367473e-06 -1.29800256e-05 2.82007689e-05 -9.67947813e-07 -1.00065894e-05 -1.11975496e-06 -3.33349717e-06 -5.26916768e-06 3.58138134e-06 1.06734362e-05 1.68712083e-05 2.03021692e-06 -7.22481196e-07 -1.14200624e-06 1.60862407e-06 -3.39361234e-06 3.22905154e-07 3.33817511e-06 2.48285459e-07 1.09810721e-06 1.79176149e-06 -8.01692152e-07 -3.51689346e-06 -5.73481661e-06 -7.22481196e-07 1.56602173e-07 2.56426559e-07 -5.81638295e-07 1.14004791e-06 5.10407333e-07 5.27656197e-06 3.92458025e-07 1.79176149e-06 2.79675182e-06 -1.26721283e-06 -5.73481661e-06 -8.95367473e-06 -1.14200624e-06 2.56426559e-07 3.99702381e-07 -8.44852264e-07 1.83736966e-06 -7.62024393e-07 -7.87776482e-06 -8.49322304e-07 -2.78666349e-06 -4.05195898e-06 2.71839064e-06 8.91214295e-06 1.29800256e-05 1.60862407e-06 -5.81638295e-07 -8.44852264e-07 1.05906615e-06 -2.77833963e-06 1.60759461e-06 1.66192216e-05 1.79176149e-06 5.46696518e-06 8.80873542e-06 -5.73481661e-06 -1.75089772e-05 -2.82007689e-05 -3.39361234e-06 1.14004791e-06 1.83736966e-06 -2.77833963e-06 5.60337794e-06 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 0 -2 676 + 1.70812525e-04 1.57082799e-03 -3.26619005e-04 -6.52872566e-04 -3.26878741e-04 1.06923657e-03 2.13727680e-03 1.07008685e-03 -4.52355680e-05 1.04509065e-04 5.23253592e-05 7.82671141e-05 1.04592173e-04 1.24166683e-03 8.98970522e-03 -1.14984027e-03 -3.27612104e-03 -3.46538447e-03 3.37383450e-03 9.61271800e-03 1.01680503e-02 -8.43957108e-05 5.47979606e-05 5.79636708e-05 -9.28026836e-06 1.65149897e-04 1.57082799e-03 1.39903450e-02 -2.90296254e-03 -5.80267706e-03 -2.90527106e-03 9.37210352e-03 1.87337209e-02 9.37955646e-03 -2.86774397e-04 6.62543336e-04 3.31720680e-04 4.96180451e-04 6.63070208e-04 8.98970522e-03 5.46423018e-02 -7.31488549e-03 -2.08415473e-02 -2.20455757e-02 1.94206065e-02 5.53331271e-02 5.85297541e-02 1.89649782e-03 -1.23139212e-03 -1.30253036e-03 2.08541507e-04 -3.71116515e-03 3.26619005e-04 2.90296254e-03 -4.15151071e-04 -1.28812886e-03 -6.44937408e-04 1.31426206e-03 4.16439840e-03 2.08502145e-03 -1.33596014e-04 8.08634926e-05 4.04865482e-05 1.33628939e-04 1.78574888e-04 1.14984027e-03 7.31488549e-03 5.90262354e-04 -3.03752927e-03 -3.21300911e-03 -2.02464935e-03 8.37933323e-03 8.86341220e-03 8.89310520e-05 -1.80542301e-04 -1.90972335e-04 1.41114106e-05 -2.51123989e-04 6.52872566e-04 5.80267706e-03 -1.28812886e-03 -2.34554260e-03 -1.28915322e-03 4.16439840e-03 7.55503474e-03 4.16771003e-03 -9.80472196e-05 3.07854286e-04 1.78574888e-04 1.69538864e-04 3.08099099e-04 3.27612104e-03 2.08415473e-02 -3.03752927e-03 -6.99815565e-03 -9.15449482e-03 8.37933323e-03 1.89087730e-02 2.52536044e-02 4.21767703e-04 -2.71529768e-04 -2.51123989e-04 -5.70113147e-05 -8.18335442e-04 3.26878741e-04 2.90527106e-03 -6.44937408e-04 -1.28915322e-03 -4.16176405e-04 2.08502145e-03 4.16771003e-03 1.31757687e-03 -4.90900573e-05 1.78574888e-04 4.05964083e-05 1.82586078e-04 8.11473946e-05 3.46538447e-03 2.20455757e-02 -3.21300911e-03 -9.15449482e-03 -8.02699272e-03 8.86341220e-03 2.52536044e-02 2.17469247e-02 4.46133470e-04 -2.51123989e-04 -2.99752590e-04 1.45362729e-04 -8.54054077e-04 -1.06923657e-03 -9.37210352e-03 1.31426206e-03 4.16439840e-03 2.08502145e-03 -4.11821518e-03 -1.33849485e-02 -6.70154535e-03 3.95726654e-04 -1.77065778e-04 -8.86528879e-05 -3.69083281e-04 -4.93224043e-04 -3.37383450e-03 -1.94206065e-02 -2.02464935e-03 8.37933323e-03 8.86341220e-03 6.89989769e-03 -2.18317801e-02 -2.30930147e-02 -9.13644374e-04 5.64793667e-04 5.97422127e-04 -9.94624346e-05 1.77001464e-03 -2.13727680e-03 -1.87337209e-02 4.16439840e-03 7.55503474e-03 4.16771003e-03 -1.33849485e-02 -2.41769159e-02 -1.33955926e-02 2.44087177e-04 -8.27141295e-04 -4.93224043e-04 -4.21987254e-04 -8.27799059e-04 -9.61271800e-03 -5.53331271e-02 8.37933323e-03 1.89087730e-02 2.52536044e-02 -2.18317801e-02 -4.76407036e-02 -6.57965404e-02 -2.56416349e-03 1.66544397e-03 1.77001464e-03 -3.05898353e-04 5.01930905e-03 -1.07008685e-03 -9.37955646e-03 2.08502145e-03 4.16771003e-03 1.31757687e-03 -6.70154535e-03 -1.33955926e-02 -4.12886944e-03 1.22209008e-04 -4.93224043e-04 -8.89747330e-05 -5.27473959e-04 -1.77849915e-04 -1.01680503e-02 -5.85297541e-02 8.86341220e-03 2.52536044e-02 2.17469247e-02 -2.30930147e-02 -6.57965404e-02 -5.50353137e-02 -2.71229671e-03 1.77001464e-03 1.86436884e-03 -2.75948778e-04 5.31195346e-03 -4.52355680e-05 -2.86774397e-04 1.33596014e-04 9.80472196e-05 4.90900573e-05 -3.95726654e-04 -2.44087177e-04 -1.22209008e-04 -2.48540403e-05 3.04545512e-05 1.52479149e-05 3.45666355e-05 4.61930859e-05 -8.43957108e-05 1.89649782e-03 -8.89310520e-05 -4.21767703e-04 -4.46133470e-04 9.13644374e-04 2.56416349e-03 2.71229671e-03 -3.88654675e-04 4.36868693e-04 4.62106853e-04 -4.74111545e-05 8.43719923e-04 1.04509065e-04 6.62543336e-04 -8.08634926e-05 -3.07854286e-04 -1.78574888e-04 1.77065778e-04 8.27141295e-04 4.93224043e-04 3.04545512e-05 -1.00913456e-04 -5.03546334e-05 -7.08141106e-05 -8.70566197e-05 5.47979606e-05 -1.23139212e-03 1.80542301e-04 2.71529768e-04 2.51123989e-04 -5.64793667e-04 -1.66544397e-03 -1.77001464e-03 4.36868693e-04 1.91388257e-05 8.91541424e-06 1.32882700e-04 -6.56704038e-04 5.23253592e-05 3.31720680e-04 -4.04865482e-05 -1.78574888e-04 -4.05964083e-05 8.86528879e-05 4.93224043e-04 8.89747330e-05 1.52479149e-05 -5.03546334e-05 -2.55519497e-05 -2.63773034e-05 -5.03802528e-05 5.79636708e-05 -1.30253036e-03 1.90972335e-04 2.51123989e-04 2.99752590e-04 -5.97422127e-04 -1.77001464e-03 -1.86436884e-03 4.62106853e-04 8.91541424e-06 2.01407935e-05 -5.10992902e-05 -7.05412091e-04 7.82671141e-05 4.96180451e-04 -1.33628939e-04 -1.69538864e-04 -1.82586078e-04 3.69083281e-04 4.21987254e-04 5.27473959e-04 3.45666355e-05 -7.08141106e-05 -2.63773034e-05 -6.47122220e-05 -6.17977590e-05 -9.28026836e-06 2.08541507e-04 -1.41114106e-05 5.70113147e-05 -1.45362729e-04 9.94624346e-05 3.05898353e-04 2.75948778e-04 -4.74111545e-05 1.32882700e-04 -5.10992902e-05 5.18686747e-04 1.27444739e-04 1.04592173e-04 6.63070208e-04 -1.78574888e-04 -3.08099099e-04 -8.11473946e-05 4.93224043e-04 8.27799059e-04 1.77849915e-04 4.61930859e-05 -8.70566197e-05 -5.03802528e-05 -6.17977590e-05 -1.01051860e-04 1.65149897e-04 -3.71116515e-03 2.51123989e-04 8.18335442e-04 8.54054077e-04 -1.77001464e-03 -5.01930905e-03 -5.31195346e-03 8.43719923e-04 -6.56704038e-04 -7.05412091e-04 1.27444739e-04 -1.74213418e-03 1.64403073e-07 1.66340445e-06 -5.53781437e-07 -9.51621148e-07 -1.83979123e-07 1.72083694e-06 2.95709591e-06 5.71702208e-07 -1.06845465e-07 5.98164385e-07 1.15644507e-07 4.94734625e-07 1.98724174e-07 1.69875966e-04 1.56309629e-03 -3.24812372e-04 -6.49988216e-04 -3.24554036e-04 1.06359050e-03 2.12837118e-03 1.06274459e-03 -4.51784837e-05 1.04293240e-04 5.20760088e-05 7.83342981e-05 1.04210292e-04 1.66340445e-06 1.68234338e-05 -5.60694767e-06 -9.63501052e-06 -1.86275892e-06 1.74134566e-05 2.99233822e-05 5.78515686e-06 -1.08246142e-06 6.06005942e-06 1.17160534e-06 5.01220283e-06 2.01329323e-06 1.56309629e-03 1.39321547e-02 -2.88896783e-03 -5.78116848e-03 -2.88667012e-03 9.33028603e-03 1.86710129e-02 9.32286531e-03 -2.87419685e-04 6.63500139e-04 3.31300849e-04 4.98352698e-04 6.62972432e-04 5.53781437e-07 5.60694767e-06 -1.82833588e-06 -3.22122833e-06 -6.22767541e-07 5.68832386e-06 1.00188249e-05 1.93696264e-06 -3.97507109e-07 1.98477847e-06 3.83721824e-07 1.68338089e-06 6.76177612e-07 3.24812372e-04 2.88896783e-03 -4.12889039e-04 -1.28241153e-03 -6.40337515e-04 1.30761524e-03 4.14724642e-03 2.07081533e-03 -1.33379801e-04 8.09954742e-05 4.04428995e-05 1.33916930e-04 1.78153411e-04 9.51621148e-07 9.63501052e-06 -3.22122833e-06 -5.48916804e-06 -1.07016726e-06 1.00188249e-05 1.70744265e-05 3.32848754e-06 -5.95554712e-07 3.46808252e-06 6.76177612e-07 2.84219936e-06 1.15217798e-06 6.49988216e-04 5.78116848e-03 -1.28241153e-03 -2.33829995e-03 -1.28139158e-03 4.14724642e-03 7.53428530e-03 4.14394796e-03 -9.83807621e-05 3.08167282e-04 1.78153411e-04 1.70683975e-04 3.07922185e-04 1.83979123e-07 1.86275892e-06 -6.22767541e-07 -1.07016726e-06 -1.60689017e-07 1.93696264e-06 3.32848754e-06 5.01525476e-07 -1.15139973e-07 6.76177612e-07 1.01320739e-07 5.69027876e-07 1.74110130e-07 3.24554036e-04 2.88667012e-03 -6.40337515e-04 -1.28139158e-03 -4.11870065e-04 2.07081533e-03 4.14394796e-03 1.30431994e-03 -4.91237728e-05 1.78153411e-04 4.03334217e-05 1.82394415e-04 8.07119774e-05 -1.72083694e-06 -1.74134566e-05 5.68832386e-06 1.00188249e-05 1.93696264e-06 -1.76833023e-05 -3.11364053e-05 -6.01967344e-06 1.23601462e-06 -6.18004320e-06 -1.19480208e-06 -5.23991199e-06 -2.10475906e-06 -1.06359050e-03 -9.33028603e-03 1.30761524e-03 4.14724642e-03 2.07081533e-03 -4.09936647e-03 -1.33348475e-02 -6.65839545e-03 3.95532628e-04 -1.78326504e-04 -8.90425168e-05 -3.70585174e-04 -4.92999747e-04 -2.95709591e-06 -2.99233822e-05 1.00188249e-05 1.70744265e-05 3.32848754e-06 -3.11364053e-05 -5.30689199e-05 -1.03442408e-05 1.85493418e-06 -1.07963497e-05 -2.10475906e-06 -8.84896384e-06 -3.58679944e-06 -2.12837118e-03 -1.86710129e-02 4.14724642e-03 7.53428530e-03 4.14394796e-03 -1.33348475e-02 -2.41202882e-02 -1.33242418e-02 2.45798143e-04 -8.29891702e-04 -4.92999747e-04 -4.26519386e-04 -8.29231658e-04 -5.71702208e-07 -5.78515686e-06 1.93696264e-06 3.32848754e-06 5.01525476e-07 -6.01967344e-06 -1.03442408e-05 -1.56382132e-06 3.58618725e-07 -2.10475906e-06 -3.16525727e-07 -1.77085151e-06 -5.43919597e-07 -1.06274459e-03 -9.32286531e-03 2.07081533e-03 4.14394796e-03 1.30431994e-03 -6.65839545e-03 -1.33242418e-02 -4.08877092e-03 1.22732655e-04 -4.92999747e-04 -8.87213543e-05 -5.27609947e-04 -1.77541990e-04 -1.06845465e-07 -1.08246142e-06 3.97507109e-07 5.95554712e-07 1.15139973e-07 -1.23601462e-06 -1.85493418e-06 -3.58618725e-07 2.70139281e-08 -4.15541564e-07 -8.03376141e-08 -2.97411032e-07 -1.19463565e-07 -4.51784837e-05 -2.87419685e-04 1.33379801e-04 9.83807621e-05 4.91237728e-05 -3.95532628e-04 -2.45798143e-04 -1.22732655e-04 -2.48009597e-05 2.99273523e-05 1.49434139e-05 3.43909079e-05 4.57511797e-05 5.98164385e-07 6.06005942e-06 -1.98477847e-06 -3.46808252e-06 -6.76177612e-07 6.18004320e-06 1.07963497e-05 2.10475906e-06 -4.15541564e-07 2.14802410e-06 4.18843129e-07 1.80544690e-06 7.31939446e-07 1.04293240e-04 6.63500139e-04 -8.09954742e-05 -3.08167282e-04 -1.78153411e-04 1.78326504e-04 8.29891702e-04 4.92999747e-04 2.99273523e-05 -1.00005292e-04 -4.97399685e-05 -7.02141186e-05 -8.57983503e-05 1.15644507e-07 1.17160534e-06 -3.83721824e-07 -6.76177612e-07 -1.01320739e-07 1.19480208e-06 2.10475906e-06 3.16525727e-07 -8.03376141e-08 4.18843129e-07 6.25586601e-08 3.61542337e-07 1.10410273e-07 5.20760088e-05 3.31300849e-04 -4.04428995e-05 -1.78153411e-04 -4.03334217e-05 8.90425168e-05 4.92999747e-04 8.87213543e-05 1.49434139e-05 -4.97399685e-05 -2.52267750e-05 -2.59150043e-05 -4.97149683e-05 4.94734625e-07 5.01220283e-06 -1.68338089e-06 -2.84219936e-06 -5.69027876e-07 5.23991199e-06 8.84896384e-06 1.77085151e-06 -2.97411032e-07 1.80544690e-06 3.61542337e-07 1.46277688e-06 6.10544002e-07 7.83342981e-05 4.98352698e-04 -1.33916930e-04 -1.70683975e-04 -1.82394415e-04 3.70585174e-04 4.26519386e-04 5.27609947e-04 3.43909079e-05 -7.02141186e-05 -2.59150043e-05 -6.45671275e-05 -6.10086414e-05 1.98724174e-07 2.01329323e-06 -6.76177612e-07 -1.15217798e-06 -1.74110130e-07 2.10475906e-06 3.58679944e-06 5.43919597e-07 -1.19463565e-07 7.31939446e-07 1.10410273e-07 6.10544002e-07 1.88036720e-07 1.04210292e-04 6.62972432e-04 -1.78153411e-04 -3.07922185e-04 -8.07119774e-05 4.92999747e-04 8.29231658e-04 1.77541990e-04 4.57511797e-05 -8.57983503e-05 -4.97149683e-05 -6.10086414e-05 -9.98687600e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 -1 676 + 3.92346948e-02 1.43562622e-01 -7.04539945e-02 -7.03800846e-02 -6.09456872e-05 1.49294660e-01 1.49138042e-01 1.29146200e-04 -6.14904967e-03 -2.12340751e-02 -1.83876633e-05 -1.06058918e-02 -1.83683737e-05 3.00147527e-01 3.37844187e-01 -2.65846355e-01 -2.23672454e-01 -2.67430698e-01 2.38278391e-01 2.00477875e-01 2.39698439e-01 -1.14126464e-02 -1.18728363e-01 -1.41955831e-01 2.14542770e-02 -1.19435939e-01 1.43562622e-01 2.07046006e-01 -1.43692414e-01 -1.43541673e-01 -1.24300020e-04 1.50539086e-01 1.50381163e-01 1.30222681e-04 -1.38939644e-02 -4.79790374e-02 -4.15474836e-05 -2.39643345e-02 -4.15038981e-05 3.37844187e-01 2.95762552e-01 -2.48977502e-02 -2.09479678e-02 -2.50461313e-02 9.59141523e-02 8.06983184e-02 9.64857642e-02 1.01413263e-02 1.05502530e-01 1.26142557e-01 -1.90643621e-02 1.06131285e-01 7.04539945e-02 1.43692414e-01 -6.96603995e-02 -1.13235554e-01 -9.80564135e-05 9.03265538e-02 1.75001865e-01 1.51542997e-04 6.40862982e-04 -4.19725482e-02 -3.63461597e-05 -2.83413534e-02 -4.90844694e-05 2.65846355e-01 2.48977502e-02 5.32326332e-02 -1.90415277e-01 -2.27667241e-01 -2.06359190e-01 5.08045524e-02 6.07437201e-02 1.38717305e-01 -2.94043583e-02 -3.51568910e-02 2.53534041e-02 -1.41142376e-01 7.03800846e-02 1.43541673e-01 -1.13235554e-01 -6.94226948e-02 -9.79535472e-05 1.75001865e-01 8.99591889e-02 1.51384021e-04 -2.49417263e-02 -4.18975121e-02 -4.90844694e-05 -1.35418952e-02 -3.62431213e-05 2.23672454e-01 2.09479678e-02 -1.90415277e-01 1.19343330e-01 -1.91550080e-01 5.08045524e-02 -2.23998134e-01 5.11073283e-02 -7.53764587e-02 1.37646079e-02 -1.41142376e-01 1.32233183e-01 1.38466397e-02 6.09456872e-05 1.24300020e-04 -9.80564135e-05 -9.79535472e-05 4.36939847e-02 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -2.15983067e-05 -4.90844694e-05 1.47851947e-02 -3.73063262e-05 1.47696842e-02 2.67430698e-01 2.50461313e-02 -2.27667241e-01 -1.91550080e-01 5.05270510e-02 6.07437201e-02 5.11073283e-02 -2.05637316e-01 -9.01227605e-02 -1.41142376e-01 -3.69422004e-02 -1.07093669e-01 -3.10816848e-02 -1.49294660e-01 -1.50539086e-01 9.03265538e-02 1.75001865e-01 1.51542997e-04 -3.55933538e-02 -1.58872773e-01 -1.37575997e-04 -1.91573661e-02 4.52189669e-02 3.91573984e-05 4.11804138e-02 7.13204742e-05 -2.38278391e-01 -9.59141523e-02 -2.06359190e-01 5.08045524e-02 6.07437201e-02 1.70024418e-01 -9.01663293e-02 -1.07806053e-01 -2.30222926e-02 -8.87474230e-02 -1.06109558e-01 1.39849680e-02 -7.78543033e-02 -1.49138042e-01 -1.50381163e-01 1.75001865e-01 8.99591889e-02 1.51384021e-04 -1.58872773e-01 -3.52598472e-02 -1.37431673e-04 4.53442356e-02 4.50933797e-02 7.13204742e-05 3.90879932e-03 3.90076821e-05 -2.00477875e-01 -8.06983184e-02 5.08045524e-02 -2.23998134e-01 5.11073283e-02 -9.01663293e-02 2.01329463e-01 -9.07036863e-02 2.96283102e-04 -7.86106626e-02 -7.78543033e-02 4.12037926e-04 -7.90791522e-02 -1.29146200e-04 -1.30222681e-04 1.51542997e-04 1.51384021e-04 -8.48589593e-02 -1.37575997e-04 -1.37431673e-04 1.23446141e-01 3.92658750e-05 7.13204742e-05 -3.72674479e-02 6.78607741e-05 -3.72283524e-02 -2.39698439e-01 -9.64857642e-02 6.07437201e-02 5.11073283e-02 -2.05637316e-01 -1.07806053e-01 -9.07036863e-02 1.68743258e-01 3.54246557e-04 -7.78543033e-02 -1.06580599e-01 2.76439791e-02 -8.96726383e-02 -6.14904967e-03 -1.38939644e-02 -6.40862982e-04 2.49417263e-02 2.15983067e-05 1.91573661e-02 -4.53442356e-02 -3.92658750e-05 -7.70714517e-03 1.42605428e-02 1.23489278e-05 1.39848306e-02 2.42203674e-05 -1.14126464e-02 1.01413263e-02 -1.38717305e-01 7.53764587e-02 9.01227605e-02 2.30222926e-02 -2.96283102e-04 -3.54246557e-04 -1.61559835e-01 -4.77041734e-02 -5.70367973e-02 -2.52085878e-02 1.40336183e-01 -2.12340751e-02 -4.79790374e-02 4.19725482e-02 4.18975121e-02 4.90844694e-05 -4.52189669e-02 -4.50933797e-02 -7.13204742e-05 1.42605428e-02 4.92604167e-02 4.94764240e-05 2.45634125e-02 4.94101171e-05 -1.18728363e-01 1.05502530e-01 2.94043583e-02 -1.37646079e-02 1.41142376e-01 8.87474230e-02 7.86106626e-02 7.78543033e-02 -4.77041734e-02 1.54718337e-02 7.41014246e-02 -1.35716984e-01 2.45960041e-02 -1.83876633e-05 -4.15474836e-05 3.63461597e-05 4.90844694e-05 -1.47851947e-02 -3.91573984e-05 -7.13204742e-05 3.72674479e-02 1.23489278e-05 4.94764240e-05 -7.87491896e-03 3.50080332e-05 -7.93188481e-03 -1.41955831e-01 1.26142557e-01 3.51568910e-02 1.41142376e-01 3.69422004e-02 1.06109558e-01 7.78543033e-02 1.06580599e-01 -5.70367973e-02 7.41014246e-02 4.20935106e-02 9.61928165e-02 7.58351725e-02 -1.06058918e-02 -2.39643345e-02 2.83413534e-02 1.35418952e-02 3.73063262e-05 -4.11804138e-02 -3.90879932e-03 -6.78607741e-05 1.39848306e-02 2.45634125e-02 3.50080332e-05 8.37229921e-03 2.81098497e-05 2.14542770e-02 -1.90643621e-02 -2.53534041e-02 -1.32233183e-01 1.07093669e-01 -1.39849680e-02 -4.12037926e-04 -2.76439791e-02 -2.52085878e-02 -1.35716984e-01 9.61928165e-02 -1.33985954e-01 -2.77965152e-02 -1.83683737e-05 -4.15038981e-05 4.90844694e-05 3.62431213e-05 -1.47696842e-02 -7.13204742e-05 -3.90076821e-05 3.72283524e-02 2.42203674e-05 4.94101171e-05 -7.93188481e-03 2.81098497e-05 -7.85826831e-03 -1.19435939e-01 1.06131285e-01 1.41142376e-01 -1.38466397e-02 3.10816848e-02 7.78543033e-02 7.90791522e-02 8.96726383e-02 1.40336183e-01 2.45960041e-02 7.58351725e-02 -2.77965152e-02 1.57641310e-02 6.40928035e-04 5.06403815e-03 -1.80420044e-03 -1.89911078e-03 6.01839932e-04 5.51020033e-03 5.80006556e-03 -1.83807659e-03 4.39388935e-05 2.05207882e-04 -6.50316449e-05 9.71549090e-05 -6.84526480e-05 3.90352750e-02 1.43077779e-01 -7.00929462e-02 -7.01664876e-02 6.06418327e-05 1.48670356e-01 1.48826341e-01 -1.28624111e-04 -6.06735631e-03 -2.10842729e-02 1.82222169e-05 -1.05531894e-02 1.82413356e-05 5.06403815e-03 3.59162160e-02 -1.30711897e-02 -1.37588024e-02 4.36024943e-03 3.76780554e-02 3.96601173e-02 -1.25685361e-02 -1.64433980e-04 -7.67956269e-04 2.43370084e-04 -3.63586042e-04 2.56172617e-04 1.43077779e-01 2.06870478e-01 -1.43354898e-01 -1.43505305e-01 1.24025372e-04 1.50404918e-01 1.50562723e-01 -1.30124790e-04 -1.38318580e-02 -4.80661849e-02 4.15415057e-05 -2.40582899e-02 4.15850910e-05 1.80420044e-03 1.30711897e-02 -4.28933746e-03 -5.43404580e-03 1.72208267e-03 1.24264610e-02 1.59647875e-02 -5.05933974e-03 -1.34660600e-04 -5.33478689e-05 1.69062691e-05 4.08296338e-05 -2.87674249e-05 7.00929462e-02 1.43354898e-01 -6.92934363e-02 -1.12900170e-01 9.75746892e-05 9.00183821e-02 1.74742533e-01 -1.51022345e-04 7.15622009e-04 -4.17238982e-02 3.60601441e-05 -2.82393576e-02 4.88121249e-05 1.89911078e-03 1.37588024e-02 -5.43404580e-03 -4.84676952e-03 1.81267318e-03 1.59647875e-02 1.40641513e-02 -5.32548736e-03 1.00027465e-04 -4.18352057e-05 -2.87674249e-05 -9.66095944e-05 1.39552662e-05 7.01664876e-02 1.43505305e-01 -1.12900170e-01 -6.95302215e-02 9.76770644e-05 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -2.47372636e-02 -4.17984960e-02 4.88121249e-05 -1.35733224e-02 3.61625176e-05 -6.01839932e-04 -4.36024943e-03 1.72208267e-03 1.81267318e-03 2.98688065e-04 -5.05933974e-03 -5.32548736e-03 -1.05278730e-03 -3.16993212e-05 -2.87674249e-05 -1.23494473e-04 -5.78558379e-05 -1.29990926e-04 -6.06418327e-05 -1.24025372e-04 9.75746892e-05 9.76770644e-05 4.34883186e-02 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 2.13793372e-05 4.88121249e-05 1.46802192e-02 3.71324719e-05 1.46956216e-02 -5.51020033e-03 -3.76780554e-02 1.24264610e-02 1.59647875e-02 -5.05933974e-03 -3.47049294e-02 -4.54875742e-02 1.44152931e-02 5.89087085e-04 1.44546888e-03 -4.58078013e-04 5.34422901e-04 -3.76539519e-04 -1.48670356e-01 -1.50404918e-01 9.00183821e-02 1.74742533e-01 -1.51022345e-04 -3.55477897e-02 -1.58871579e-01 1.37305772e-04 -1.91383675e-02 4.52602299e-02 -3.91164413e-05 4.12489762e-02 -7.12994329e-05 -5.80006556e-03 -3.96601173e-02 1.59647875e-02 1.40641513e-02 -5.32548736e-03 -4.54875742e-02 -3.93711087e-02 1.51736126e-02 7.15776042e-05 1.48902302e-03 -3.76539519e-04 8.79212102e-04 -4.96703967e-04 -1.48826341e-01 -1.50562723e-01 1.74742533e-01 9.03848691e-02 -1.51180797e-04 -1.58871579e-01 -3.58809906e-02 1.37449833e-04 4.51895230e-02 4.53856342e-02 -7.12994329e-05 4.14093649e-03 -3.92659774e-05 1.83807659e-03 1.25685361e-02 -5.05933974e-03 -5.32548736e-03 -1.05278730e-03 1.44152931e-02 1.51736126e-02 3.70073721e-03 -2.26833848e-05 -3.76539519e-04 4.20177221e-04 -7.79147281e-05 4.42280730e-04 1.28624111e-04 1.30124790e-04 -1.51022345e-04 -1.51180797e-04 -8.45408730e-02 1.37305772e-04 1.37449833e-04 1.23157158e-01 -3.90553324e-05 -7.12994329e-05 -3.71123182e-02 -6.77953561e-05 -3.71512564e-02 4.39388935e-05 -1.64433980e-04 1.34660600e-04 -1.00027465e-04 3.16993212e-05 -5.89087085e-04 -7.15776042e-05 2.26833848e-05 1.10930679e-04 -2.09274876e-04 6.63205005e-05 -1.83349362e-04 1.29182863e-04 -6.06735631e-03 -1.38318580e-02 -7.15622009e-04 2.47372636e-02 -2.13793372e-05 1.91383675e-02 -4.51895230e-02 3.90553324e-05 -7.63846481e-03 1.40703716e-02 -1.21604081e-05 1.38292143e-02 -2.39039906e-05 2.05207882e-04 -7.67956269e-04 5.33478689e-05 4.18352057e-05 2.87674249e-05 -1.44546888e-03 -1.48902302e-03 3.76539519e-04 -2.09274876e-04 -1.05007348e-03 3.63268862e-04 -4.91159663e-04 3.85895119e-04 -2.10842729e-02 -4.80661849e-02 4.17238982e-02 4.17984960e-02 -4.88121249e-05 -4.52602299e-02 -4.53856342e-02 7.12994329e-05 1.40703716e-02 4.89954008e-02 -4.90591418e-05 2.45060863e-02 -4.91248191e-05 -6.50316449e-05 2.43370084e-04 -1.69062691e-05 2.87674249e-05 1.23494473e-04 4.58078013e-04 3.76539519e-04 -4.20177221e-04 6.63205005e-05 3.63268862e-04 -1.88977879e-05 2.20783908e-04 -2.98500991e-05 1.82222169e-05 4.15415057e-05 -3.60601441e-05 -4.88121249e-05 -1.46802192e-02 3.91164413e-05 7.12994329e-05 3.71123182e-02 -1.21604081e-05 -4.90591418e-05 -7.76912846e-03 -3.47109323e-05 -7.82829532e-03 9.71549090e-05 -3.63586042e-04 -4.08296338e-05 9.66095944e-05 5.78558379e-05 -5.34422901e-04 -8.79212102e-04 7.79147281e-05 -1.83349362e-04 -4.91159663e-04 2.20783908e-04 -1.63561165e-04 1.98118951e-04 -1.05531894e-02 -2.40582899e-02 2.82393576e-02 1.35733224e-02 -3.71324719e-05 -4.12489762e-02 -4.14093649e-03 6.77953561e-05 1.38292143e-02 2.45060863e-02 -3.47109323e-05 8.39857043e-03 -2.79745566e-05 -6.84526480e-05 2.56172617e-04 2.87674249e-05 -1.39552662e-05 1.29990926e-04 3.76539519e-04 4.96703967e-04 -4.42280730e-04 1.29182863e-04 3.85895119e-04 -2.98500991e-05 1.98118951e-04 -2.19598530e-05 1.82413356e-05 4.15850910e-05 -4.88121249e-05 -3.61625176e-05 -1.46956216e-02 7.12994329e-05 3.92659774e-05 3.71512564e-02 -2.39039906e-05 -4.91248191e-05 -7.82829532e-03 -2.79745566e-05 -7.78554672e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 0 676 + 3.92221425e-02 1.43532144e-01 -7.04318857e-02 6.89694006e-05 7.03660418e-02 1.49256702e-01 -1.46157457e-04 -1.49117168e-01 -6.14421454e-03 2.08033691e-05 2.12246406e-02 1.06023891e-02 -2.07839209e-05 2.29054795e-01 3.29433197e-01 -2.01813597e-01 2.35410905e-01 2.02192437e-01 2.21907085e-01 -2.58849494e-01 -2.22323643e-01 9.88571216e-03 1.09613748e-01 9.41463221e-02 -1.67694287e-02 -1.09819513e-01 1.43532144e-01 2.07035011e-01 -1.43672485e-01 1.40689194e-04 1.43538172e-01 1.50532003e-01 -1.47406277e-04 -1.50391277e-01 -1.38908002e-02 4.70321215e-05 4.79845294e-02 2.39698123e-02 -4.69881531e-05 3.29433197e-01 2.59747786e-01 -6.36379969e-02 7.42322551e-02 6.37574565e-02 7.75677445e-02 -9.04809843e-02 -7.77133527e-02 -6.56006730e-03 -7.27386712e-02 -6.24746300e-02 1.11280380e-02 7.28752144e-02 7.04318857e-02 1.43672485e-01 -6.96392838e-02 1.10967367e-04 1.13214473e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 6.44737024e-04 4.11247302e-05 4.19575125e-02 2.83346836e-02 -5.55446341e-05 2.01813597e-01 6.36379969e-02 5.04786051e-02 1.94092737e-01 1.66704612e-01 -1.64384703e-01 -9.25096806e-02 -7.94557828e-02 1.13498424e-01 2.10636636e-02 1.80914027e-02 -1.90295578e-02 -1.24620630e-01 -6.89694006e-05 -1.40689194e-04 1.10967367e-04 4.36810194e-02 -1.10863628e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 2.44346801e-05 1.47786983e-02 -5.55446341e-05 -4.22182061e-05 -1.47648823e-02 -2.35410905e-01 -7.42322551e-02 1.94092737e-01 -9.53383055e-03 -1.94457083e-01 -9.25096806e-02 -1.35781205e-01 9.26833375e-02 4.65682059e-02 -5.65173415e-02 -1.24620630e-01 -8.11259297e-02 5.66234345e-02 -7.03660418e-02 -1.43538172e-01 1.13214473e-01 -1.10863628e-04 -6.94275057e-02 -1.74985607e-01 1.71352113e-04 8.99829313e-02 2.49294862e-02 -5.55446341e-05 -4.18906689e-02 -1.35432580e-02 4.10208288e-05 -2.02192437e-01 -6.37574565e-02 1.66704612e-01 -1.94457083e-01 4.98533241e-02 -7.94557828e-02 9.26833375e-02 -1.64086678e-01 3.99970385e-02 -1.24620630e-01 -1.84582259e-02 1.07808935e-01 2.15310947e-02 -1.49256702e-01 -1.50532003e-01 9.03102580e-02 -1.71512453e-04 -1.74985607e-01 -3.55932735e-02 1.55719370e-04 1.58872712e-01 -1.91550894e-02 -4.43250336e-05 -4.52226225e-02 -4.11843616e-02 8.07339276e-05 -2.21907085e-01 -7.75677445e-02 -1.64384703e-01 -9.25096806e-02 -7.94557828e-02 1.71388589e-01 8.96538179e-02 7.70029065e-02 -3.38932590e-02 7.53940006e-02 6.47552699e-02 -5.77044721e-03 -3.77894628e-02 1.46157457e-04 1.47406277e-04 -1.71512453e-04 -8.48389209e-02 1.71352113e-04 1.55719370e-04 1.23427948e-01 -1.55573794e-04 -4.44355598e-05 -3.72580070e-02 8.07339276e-05 7.68136271e-05 3.72231760e-02 2.58849494e-01 9.04809843e-02 -9.25096806e-02 -1.35781205e-01 9.26833375e-02 8.96538179e-02 1.43668109e-01 -8.98221138e-02 -2.57199025e-02 -7.62963480e-02 -3.77894628e-02 4.44064359e-02 7.64395696e-02 1.49117168e-01 1.50391277e-01 -1.74985607e-01 1.71352113e-04 8.99829313e-02 1.58872712e-01 -1.55573794e-04 -3.52960874e-02 -4.53353869e-02 8.07339276e-05 4.51107162e-02 3.92260496e-03 -4.41740133e-05 2.22323643e-01 7.77133527e-02 -7.94557828e-02 9.26833375e-02 -1.64086678e-01 7.70029065e-02 -8.98221138e-02 1.71099764e-01 -2.20906068e-02 -3.77894628e-02 -6.47554536e-02 -2.65777538e-02 7.55357426e-02 -6.14421454e-03 -1.38908002e-02 -6.44737024e-04 -2.44346801e-05 -2.49294862e-02 1.91550894e-02 4.44355598e-05 4.53353869e-02 -7.70240327e-03 -1.39667020e-05 -1.42495299e-02 -1.39752767e-02 2.73958109e-05 9.88571216e-03 -6.56006730e-03 -1.13498424e-01 -4.65682059e-02 -3.99970385e-02 3.38932590e-02 2.57199025e-02 2.20906068e-02 -1.10719633e-01 6.59703251e-02 5.66613547e-02 1.34862915e-02 8.83189281e-02 2.08033691e-05 4.70321215e-05 -4.11247302e-05 -1.47786983e-02 5.55446341e-05 4.43250336e-05 3.72580070e-02 -8.07339276e-05 -1.39667020e-05 -7.86837129e-03 5.59786246e-05 3.96080071e-05 7.92534293e-03 1.09613748e-01 -7.27386712e-02 -2.10636636e-02 5.65173415e-02 1.24620630e-01 -7.53940006e-02 7.62963480e-02 3.77894628e-02 6.59703251e-02 3.15563840e-02 4.98516513e-02 6.42242232e-02 -8.57156399e-02 2.12246406e-02 4.79845294e-02 -4.19575125e-02 5.55446341e-05 4.18906689e-02 4.52226225e-02 -8.07339276e-05 -4.51107162e-02 -1.42495299e-02 5.59786246e-05 4.92437744e-02 2.45592648e-02 -5.59117751e-05 9.41463221e-02 -6.24746300e-02 -1.80914027e-02 1.24620630e-01 1.84582259e-02 -6.47552699e-02 3.77894628e-02 6.47554536e-02 5.66613547e-02 4.98516513e-02 1.63316996e-02 -9.76925418e-02 -5.02796199e-02 1.06023891e-02 2.39698123e-02 -2.83346836e-02 4.22182061e-05 1.35432580e-02 4.11843616e-02 -7.68136271e-05 -3.92260496e-03 -1.39752767e-02 3.96080071e-05 2.45592648e-02 8.37352664e-03 -3.18101412e-05 -1.67694287e-02 1.11280380e-02 1.90295578e-02 8.11259297e-02 -1.07808935e-01 5.77044721e-03 -4.44064359e-02 2.65777538e-02 1.34862915e-02 6.42242232e-02 -9.76925418e-02 -1.26781392e-01 2.48056564e-02 -2.07839209e-05 -4.69881531e-05 5.55446341e-05 1.47648823e-02 -4.10208288e-05 -8.07339276e-05 -3.72231760e-02 4.41740133e-05 2.73958109e-05 7.92534293e-03 -5.59117751e-05 -3.18101412e-05 -7.85354621e-03 -1.09819513e-01 7.28752144e-02 1.24620630e-01 -5.66234345e-02 -2.15310947e-02 3.77894628e-02 -7.64395696e-02 -7.55357426e-02 8.83189281e-02 -8.57156399e-02 -5.02796199e-02 2.48056564e-02 3.18778890e-02 7.94007971e-04 6.10361191e-03 -2.22896721e-03 -8.62175147e-04 2.22757974e-03 6.72229135e-03 2.60021436e-03 -6.71810691e-03 4.88278053e-05 7.68246190e-05 -1.98489791e-04 -8.43250536e-05 -7.67767978e-05 3.90477633e-02 1.43108181e-01 -7.01149411e-02 -6.86686256e-05 7.01804978e-02 1.48708178e-01 1.45640658e-04 -1.48847218e-01 -6.07213665e-03 -2.06392362e-05 2.10936488e-02 1.05566754e-02 2.06585336e-05 6.10361191e-03 4.13286412e-02 -1.55183640e-02 -6.00257723e-03 1.55087043e-02 4.36624646e-02 1.68888496e-02 -4.36352859e-02 -3.59102661e-04 -5.65004406e-04 1.45978734e-03 6.20166132e-04 5.64652706e-04 1.43108181e-01 2.06881524e-01 -1.43374834e-01 -1.40417329e-04 1.43508888e-01 1.50412044e-01 1.47309378e-04 -1.50552678e-01 -1.38350338e-02 -4.70253795e-05 4.80607339e-02 2.40528121e-02 4.70693478e-05 2.22896721e-03 1.55183640e-02 -5.25705846e-03 -2.44970269e-03 6.32923379e-03 1.49230913e-02 7.06077634e-03 -1.82427461e-02 -1.77058410e-04 -8.90249758e-05 2.30011539e-04 4.14365150e-05 3.77273752e-05 7.01149411e-02 1.43374834e-01 -6.93144341e-02 -1.10488583e-04 1.12921202e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 7.11815146e-04 -4.08396703e-05 4.17388344e-02 2.82459912e-02 5.52750497e-05 8.62175147e-04 6.00257723e-03 -2.44970269e-03 1.28560878e-04 2.44817782e-03 7.06077634e-03 -5.99875540e-04 -7.05638119e-03 2.03223120e-05 -1.47160309e-04 3.77273752e-05 -3.52462601e-05 1.47068706e-04 6.86686256e-05 1.40417329e-04 -1.10488583e-04 4.35011783e-02 1.10591889e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -2.42162472e-05 1.46866461e-02 5.52750497e-05 4.20470853e-05 -1.47003779e-02 -2.22757974e-03 -1.55087043e-02 6.32923379e-03 2.44817782e-03 -5.24917645e-03 -1.82427461e-02 -7.05638119e-03 1.49003730e-02 -5.25062345e-05 3.77273752e-05 -2.30033339e-04 -1.73886299e-04 -8.89779927e-05 -7.01804978e-02 -1.43508888e-01 1.12921202e-01 1.10591889e-04 -6.95254957e-02 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 2.47494145e-02 5.52750497e-05 -4.18053364e-02 -1.35719689e-02 -4.09429851e-05 -6.72229135e-03 -4.36624646e-02 1.49230913e-02 7.06077634e-03 -1.82427461e-02 -4.04969260e-02 -1.95981352e-02 5.06351974e-02 7.96761349e-04 9.01954522e-04 -2.33035668e-03 -8.85605054e-04 -8.06331182e-04 -1.48708178e-01 -1.50412044e-01 9.00346500e-02 1.70994074e-04 -1.74758838e-01 -3.55478592e-02 -1.55449155e-04 1.58871668e-01 -1.91406441e-02 4.42816606e-05 -4.52566068e-02 -4.12450375e-02 -8.07130995e-05 -2.60021436e-03 -1.68888496e-02 7.06077634e-03 -5.99875540e-04 -7.05638119e-03 -1.95981352e-02 2.58915792e-03 1.95859359e-02 1.43436498e-04 5.58002047e-04 -8.06331182e-04 -2.47435150e-04 -5.57654706e-04 -1.45640658e-04 -1.47309378e-04 1.70994074e-04 -8.45607759e-02 -1.71153952e-04 -1.55449155e-04 1.23175252e-01 1.55594499e-04 4.42246994e-05 -3.71217044e-02 -8.07130995e-05 -7.67502875e-05 3.71564128e-02 6.71810691e-03 4.36352859e-02 -1.82427461e-02 -7.05638119e-03 1.49003730e-02 5.06351974e-02 1.95859359e-02 -4.04338683e-02 -3.70593187e-04 -8.06331182e-04 2.32921215e-03 1.13081575e-03 9.00950371e-04 1.48847218e-01 1.50552678e-01 -1.74758838e-01 -1.71153952e-04 9.03612926e-02 1.58871668e-01 1.55594499e-04 -3.58448071e-02 -4.51983914e-02 -8.07130995e-05 4.53683706e-02 4.12710932e-03 4.44325219e-05 4.88278053e-05 -3.59102661e-04 1.77058410e-04 -2.03223120e-05 5.25062345e-05 -7.96761349e-04 -1.43436498e-04 3.70593187e-04 1.51172622e-04 -1.09553462e-04 2.83050459e-04 2.26032678e-04 2.05799634e-04 -6.07213665e-03 -1.38350338e-02 -7.11815146e-04 2.42162472e-05 -2.47494145e-02 1.91406441e-02 -4.42246994e-05 4.51983914e-02 -7.64320723e-03 1.37779217e-05 -1.40812692e-02 -1.38387040e-02 -2.70811900e-05 7.68246190e-05 -5.65004406e-04 8.90249758e-05 1.47160309e-04 -3.77273752e-05 -9.01954522e-04 -5.58002047e-04 8.06331182e-04 -1.09553462e-04 -6.31855478e-05 5.20328768e-04 3.00318452e-04 7.90145647e-05 -2.06392362e-05 -4.70253795e-05 4.08396703e-05 -1.46866461e-02 -5.52750497e-05 -4.42816606e-05 3.71217044e-02 8.07130995e-05 1.37779217e-05 -7.77558844e-03 -5.55643228e-05 -3.93143386e-05 7.83476102e-03 -1.98489791e-04 1.45978734e-03 -2.30011539e-04 -3.77273752e-05 2.30033339e-04 2.33035668e-03 8.06331182e-04 -2.32921215e-03 2.83050459e-04 5.20328768e-04 -1.20615458e-03 -4.88404682e-04 -5.19935628e-04 2.10936488e-02 4.80607339e-02 -4.17388344e-02 -5.52750497e-05 4.18053364e-02 4.52566068e-02 8.07130995e-05 -4.53683706e-02 -1.40812692e-02 -5.55643228e-05 4.90120357e-02 2.45102737e-02 5.56306169e-05 -8.43250536e-05 6.20166132e-04 -4.14365150e-05 3.52462601e-05 1.73886299e-04 8.85605054e-04 2.47435150e-04 -1.13081575e-03 2.26032678e-04 3.00318452e-04 -4.88404682e-04 -1.09015694e-04 -2.44524386e-04 1.05566754e-02 2.40528121e-02 -2.82459912e-02 -4.20470853e-05 1.35719689e-02 4.12450375e-02 7.67502875e-05 -4.12710932e-03 -1.38387040e-02 -3.93143386e-05 2.45102737e-02 8.39735954e-03 3.16778891e-05 -7.67767978e-05 5.64652706e-04 -3.77273752e-05 -1.47068706e-04 8.89779927e-05 8.06331182e-04 5.57654706e-04 -9.00950371e-04 2.05799634e-04 7.90145647e-05 -5.19935628e-04 -2.44524386e-04 -6.30871483e-05 2.06585336e-05 4.70693478e-05 -5.52750497e-05 1.47003779e-02 4.09429851e-05 8.07130995e-05 -3.71564128e-02 -4.44325219e-05 -2.70811900e-05 7.83476102e-03 5.56306169e-05 3.16778891e-05 -7.79023244e-03 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 0 1 676 + 1.70655454e-04 1.56953167e-03 -3.26323630e-04 3.26620395e-04 6.52319411e-04 1.06831472e-03 -1.06928627e-03 -2.13555614e-03 -4.52239229e-05 -5.23059013e-05 -1.04464250e-04 -7.82350394e-05 1.04559252e-04 6.51185581e-04 5.13476040e-03 -6.07721589e-04 1.92909898e-03 1.82906816e-03 1.85433090e-03 -5.88622801e-03 -5.58100560e-03 -1.06291332e-04 -6.82123778e-05 -6.46753170e-05 1.09366409e-05 2.05299746e-04 1.56953167e-03 1.39805932e-02 -2.90068412e-03 2.90332205e-03 5.79845399e-03 9.36531333e-03 -9.37383033e-03 -1.87212176e-02 -2.86869568e-04 -3.31792785e-04 -6.62649600e-04 -4.96269464e-04 6.63252226e-04 5.13476040e-03 3.62967791e-02 -4.39019907e-03 1.39358691e-02 1.32132435e-02 1.26330562e-02 -4.01012837e-02 -3.80218858e-02 4.22166662e-04 2.70925119e-04 2.56876663e-04 -4.34380215e-05 -8.15407115e-04 3.26323630e-04 2.90068412e-03 -4.14801776e-04 6.44440531e-04 1.28706313e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -1.33559419e-04 -4.04998597e-05 -8.08854715e-05 -1.33606340e-04 1.78561667e-04 6.07721589e-04 4.39019907e-03 3.10492248e-04 1.82945805e-03 1.73459397e-03 -1.08977034e-03 -5.36740048e-03 -5.08908117e-03 -6.36747860e-05 1.31571261e-04 1.24748811e-04 1.31918523e-06 2.47633981e-05 -3.26620395e-04 -2.90332205e-03 6.44440531e-04 -4.15973377e-04 -1.28823361e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 4.91120363e-05 4.06254571e-05 1.78561667e-04 1.82553690e-04 -8.12100987e-05 -1.92909898e-03 -1.39358691e-02 1.82945805e-03 -4.92044970e-03 -5.50614543e-03 -5.36740048e-03 1.42571573e-02 1.61543402e-02 -4.00153716e-05 -1.79230314e-05 2.47633981e-05 1.35611577e-04 5.39431980e-05 -6.52319411e-04 -5.79845399e-03 1.28706313e-03 -1.28823361e-03 -2.34377996e-03 -4.16117676e-03 4.16496101e-03 7.54978362e-03 9.80855301e-05 1.78561667e-04 3.07838138e-04 1.69564494e-04 -3.08118091e-04 -1.82906816e-03 -1.32132435e-02 1.73459397e-03 -5.50614543e-03 -4.33380761e-03 -5.08908117e-03 1.61543402e-02 1.25360230e-02 -3.79404286e-05 2.47633981e-05 -2.05614019e-05 -1.36520363e-04 6.52683401e-05 -1.06831472e-03 -9.36531333e-03 1.31324479e-03 -2.08352714e-03 -4.16117676e-03 -4.11536825e-03 6.69716546e-03 1.33754386e-02 3.95693963e-04 8.87661346e-05 1.77281864e-04 3.69139191e-04 -4.93345668e-04 -1.85433090e-03 -1.26330562e-02 -1.08977034e-03 -5.36740048e-03 -5.08908117e-03 3.81496142e-03 1.52646006e-02 1.44730753e-02 -9.08343437e-05 -4.45122659e-04 -4.22041425e-04 2.10845372e-05 3.95793388e-04 1.06928627e-03 9.37383033e-03 -2.08352714e-03 1.31703267e-03 4.16496101e-03 6.69716546e-03 -4.12754378e-03 -1.33876024e-02 -1.22336657e-04 -8.91341618e-05 -4.93345668e-04 -5.27505568e-04 1.78178773e-04 5.88622801e-03 4.01012837e-02 -5.36740048e-03 1.42571573e-02 1.61543402e-02 1.52646006e-02 -3.98308820e-02 -4.59420816e-02 8.31537876e-04 5.16237601e-04 3.95793388e-04 -3.80546279e-04 -1.55372752e-03 2.13555614e-03 1.87212176e-02 -4.16117676e-03 4.16496101e-03 7.54978362e-03 1.33754386e-02 -1.33876024e-02 -2.41617270e-02 -2.44328210e-04 -4.93345668e-04 -8.27412544e-04 -4.22291964e-04 8.28165009e-04 5.58100560e-03 3.80218858e-02 -5.08908117e-03 1.61543402e-02 1.25360230e-02 1.44730753e-02 -4.59420816e-02 -3.49360679e-02 7.88419602e-04 3.95793388e-04 4.74068527e-04 2.33896713e-04 -1.50484223e-03 -4.52239229e-05 -2.86869568e-04 1.33559419e-04 -4.91120363e-05 -9.80855301e-05 -3.95693963e-04 1.22336657e-04 2.44328210e-04 -2.48440244e-05 -1.52024209e-05 -3.03619565e-05 -3.45169245e-05 4.61310410e-05 -1.06291332e-04 4.22166662e-04 6.36747860e-05 4.00153716e-05 3.79404286e-05 9.08343437e-05 -8.31537876e-04 -7.88419602e-04 -2.58318558e-04 -2.39753339e-04 -2.27321253e-04 2.86852491e-05 5.38471952e-04 -5.23059013e-05 -3.31792785e-04 4.04998597e-05 -4.06254571e-05 -1.78561667e-04 -8.87661346e-05 8.91341618e-05 4.93345668e-04 -1.52024209e-05 -2.55187535e-05 -5.02682615e-05 -2.62938797e-05 5.02974537e-05 -6.82123778e-05 2.70925119e-04 -1.31571261e-04 1.79230314e-05 -2.47633981e-05 4.45122659e-04 -5.16237601e-04 -3.95793388e-04 -2.39753339e-04 -1.99394457e-05 -2.78203501e-05 -1.25449301e-05 3.90601740e-04 -1.04464250e-04 -6.62649600e-04 8.08854715e-05 -1.78561667e-04 -3.07838138e-04 -1.77281864e-04 4.93345668e-04 8.27412544e-04 -3.03619565e-05 -5.02682615e-05 -1.00743841e-04 -7.06737575e-05 8.68649192e-05 -6.46753170e-05 2.56876663e-04 -1.24748811e-04 -2.47633981e-05 2.05614019e-05 4.22041425e-04 -3.95793388e-04 -4.74068527e-04 -2.27321253e-04 -2.78203501e-05 -1.69753779e-05 5.47169206e-05 3.66799122e-04 -7.82350394e-05 -4.96269464e-04 1.33606340e-04 -1.82553690e-04 -1.69564494e-04 -3.69139191e-04 5.27505568e-04 4.22291964e-04 -3.45169245e-05 -2.62938797e-05 -7.06737575e-05 -6.46369762e-05 6.16496861e-05 1.09366409e-05 -4.34380215e-05 -1.31918523e-06 -1.35611577e-04 1.36520363e-04 -2.10845372e-05 3.80546279e-04 -2.33896713e-04 2.86852491e-05 -1.25449301e-05 5.47169206e-05 2.06460806e-04 -6.79660102e-05 1.04559252e-04 6.63252226e-04 -1.78561667e-04 8.12100987e-05 3.08118091e-04 4.93345668e-04 -1.78178773e-04 -8.28165009e-04 4.61310410e-05 5.02974537e-05 8.68649192e-05 6.16496861e-05 -1.00901762e-04 2.05299746e-04 -8.15407115e-04 -2.47633981e-05 -5.39431980e-05 -6.52683401e-05 -3.95793388e-04 1.55372752e-03 1.50484223e-03 5.38471952e-04 3.90601740e-04 3.66799122e-04 -6.79660102e-05 -1.06575861e-03 1.55851385e-06 1.66295777e-05 -4.92005788e-06 1.37267483e-06 8.19277196e-06 1.64391057e-05 -4.58643928e-06 -2.73740367e-05 -7.08847200e-07 -8.05353630e-07 -4.80673098e-06 -3.88968617e-06 1.34105712e-06 1.70032339e-04 1.56438760e-03 -3.25106414e-04 3.24810715e-04 6.50539500e-04 1.06450843e-03 -1.06354021e-03 -2.13008649e-03 -4.51901689e-05 -5.20954131e-05 -1.04338073e-04 -7.83664780e-05 1.04243172e-04 1.66295777e-05 1.77115785e-04 -5.26723064e-05 1.46953453e-05 8.77087640e-05 1.75536251e-04 -4.89738535e-05 -2.92299097e-04 -7.61857792e-06 -8.65581381e-06 -5.16619865e-05 -4.18057335e-05 1.44134704e-05 1.56438760e-03 1.39418779e-02 -2.89123777e-03 2.88860806e-03 5.78538070e-03 9.33705417e-03 -9.32856169e-03 -1.86834904e-02 -2.87325728e-04 -3.31230284e-04 -6.63396783e-04 -4.98265571e-04 6.62793393e-04 4.92005788e-06 5.26723064e-05 -1.48222952e-05 4.36837728e-06 2.60725395e-05 4.98188420e-05 -1.46588531e-05 -8.74909612e-05 -2.86090047e-06 -2.44180532e-06 -1.45738479e-05 -1.24782749e-05 4.30216698e-06 3.25106414e-04 2.89123777e-03 -4.13236729e-04 6.40831182e-04 1.28347366e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -1.33416548e-04 -4.04298092e-05 -8.09738924e-05 -1.33939886e-04 1.78166979e-04 -1.37267483e-06 -1.46953453e-05 4.36837728e-06 -3.83544228e-07 -7.27412558e-06 -1.46588531e-05 1.36709060e-06 2.44095992e-05 5.52569527e-07 2.12554477e-07 4.30216698e-06 3.62318724e-06 -3.53941031e-07 -3.24810715e-04 -2.88860806e-03 6.40831182e-04 -4.12070467e-04 -1.28230628e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 4.91020348e-05 4.03045720e-05 1.78166979e-04 1.82427008e-04 -8.06496427e-05 -8.19277196e-06 -8.77087640e-05 2.60725395e-05 -7.27412558e-06 -4.25802042e-05 -8.74909612e-05 2.44095992e-05 1.42965355e-04 3.29799602e-06 4.30216698e-06 2.51691043e-05 1.99322035e-05 -7.02207106e-06 -6.50539500e-04 -5.78538070e-03 1.28347366e-03 -1.28230628e-03 -2.34005912e-03 -4.15045840e-03 4.14668337e-03 7.53952843e-03 9.83428554e-05 1.78166979e-04 3.08184344e-04 1.70659072e-04 -3.07904036e-04 -1.64391057e-05 -1.75536251e-04 4.98188420e-05 -1.46588531e-05 -8.74909612e-05 -1.66815030e-04 4.90118334e-05 2.92525779e-04 9.58879795e-06 8.25113481e-06 4.92466711e-05 4.20899467e-05 -1.45114593e-05 -1.06450843e-03 -9.33705417e-03 1.30862829e-03 -2.07230055e-03 -4.15045840e-03 -4.10220340e-03 6.66275086e-03 1.33443338e-02 3.95566341e-04 8.89305745e-05 1.78112509e-04 3.70530844e-04 -4.92880524e-04 4.58643928e-06 4.89738535e-05 -1.46588531e-05 1.36709060e-06 2.44095992e-05 4.90118334e-05 -4.81673791e-06 -8.16134250e-05 -1.87238440e-06 -7.69946923e-07 -1.45114593e-05 -1.22064377e-05 1.28209865e-06 1.06354021e-03 9.32856169e-03 -2.07230055e-03 1.30485687e-03 4.14668337e-03 6.66275086e-03 -4.09007772e-03 -1.33321966e-02 -1.22606118e-04 -8.85632582e-05 -4.92880524e-04 -5.27579766e-04 1.77215506e-04 2.73740367e-05 2.92299097e-04 -8.74909612e-05 2.44095992e-05 1.42965355e-04 2.92525779e-04 -8.16134250e-05 -4.78250130e-04 -1.11752748e-05 -1.45114593e-05 -8.49498403e-05 -6.73207161e-05 2.37006374e-05 2.13008649e-03 1.86834904e-02 -4.15045840e-03 4.14668337e-03 7.53952843e-03 1.33443338e-02 -1.33321966e-02 -2.41354632e-02 -2.45558779e-04 -4.92880524e-04 -8.29624947e-04 -4.26217284e-04 8.28870365e-04 -7.08847200e-07 -7.61857792e-06 2.86090047e-06 -5.52569527e-07 -3.29799602e-06 -9.58879795e-06 1.87238440e-06 1.11752748e-05 -3.65465272e-07 4.28432282e-07 2.55708629e-06 1.34172841e-06 -4.62591160e-07 -4.51901689e-05 -2.87325728e-04 1.33416548e-04 -4.91020348e-05 -9.83428554e-05 -3.95566341e-04 1.22606118e-04 2.45558779e-04 -2.48111523e-05 -1.49885919e-05 -3.00195488e-05 -3.44406887e-05 4.58130407e-05 -8.05353630e-07 -8.65581381e-06 2.44180532e-06 -2.12554477e-07 -4.30216698e-06 -8.25113481e-06 7.69946923e-07 1.45114593e-05 4.28432282e-07 1.07184747e-07 2.41993310e-06 2.16240153e-06 -1.96499380e-07 -5.20954131e-05 -3.31230284e-04 4.04298092e-05 -4.03045720e-05 -1.78166979e-04 -8.89305745e-05 8.85632582e-05 4.92880524e-04 -1.49885919e-05 -2.52596577e-05 -4.98257614e-05 -2.59979782e-05 4.97970660e-05 -4.80673098e-06 -5.16619865e-05 1.45738479e-05 -4.30216698e-06 -2.51691043e-05 -4.92466711e-05 1.45114593e-05 8.49498403e-05 2.55708629e-06 2.41993310e-06 1.41450362e-05 1.18681262e-05 -4.18379404e-06 -1.04338073e-04 -6.63396783e-04 8.09738924e-05 -1.78166979e-04 -3.08184344e-04 -1.78112509e-04 4.92880524e-04 8.29624947e-04 -3.00195488e-05 -4.98257614e-05 -1.00174289e-04 -7.03543520e-05 8.59889057e-05 -3.88968617e-06 -4.18057335e-05 1.24782749e-05 -3.62318724e-06 -1.99322035e-05 -4.20899467e-05 1.22064377e-05 6.73207161e-05 1.34172841e-06 2.16240153e-06 1.18681262e-05 9.14877353e-06 -3.45596958e-06 -7.83664780e-05 -4.98265571e-04 1.33939886e-04 -1.82427008e-04 -1.70659072e-04 -3.70530844e-04 5.27579766e-04 4.26217284e-04 -3.44406887e-05 -2.59979782e-05 -7.03543520e-05 -6.46428973e-05 6.11562205e-05 1.34105712e-06 1.44134704e-05 -4.30216698e-06 3.53941031e-07 7.02207106e-06 1.45114593e-05 -1.28209865e-06 -2.37006374e-05 -4.62591160e-07 -1.96499380e-07 -4.18379404e-06 -3.45596958e-06 3.16386152e-07 1.04243172e-04 6.62793393e-04 -1.78166979e-04 8.06496427e-05 3.07904036e-04 4.92880524e-04 -1.77215506e-04 -8.28870365e-04 4.58130407e-05 4.97970660e-05 8.59889057e-05 6.11562205e-05 -1.00017797e-04 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 1 -2 676 + 1.70331981e-04 1.56686156e-03 -6.51407910e-04 -3.25373633e-04 -3.25974342e-04 2.13275773e-03 1.06529736e-03 1.06726413e-03 9.04226467e-05 1.04298820e-04 1.04491378e-04 -9.62701417e-08 5.21927023e-05 1.00290138e-03 7.47514576e-03 -2.80017721e-03 -7.83272793e-04 -2.80572538e-03 8.32636664e-03 2.32907275e-03 8.34286421e-03 5.09296223e-05 5.37707300e-05 1.92609654e-04 -8.89751985e-05 5.38772693e-05 1.56686156e-03 1.39605011e-02 -5.79177921e-03 -2.89295265e-03 -2.89829366e-03 1.87019949e-02 9.34151388e-03 9.35876032e-03 5.74275380e-04 6.62403131e-04 6.63626069e-04 -6.11412895e-07 3.31476517e-04 7.47514576e-03 4.79374688e-02 -1.86211962e-02 -5.20876903e-03 -1.86580916e-02 5.08990549e-02 1.42376149e-02 5.09999045e-02 -6.75074262e-04 -7.12733262e-04 -2.55304898e-03 1.17936996e-03 -7.14145446e-04 6.51407910e-04 5.79177921e-03 -2.34194643e-03 -1.28396912e-03 -1.28633960e-03 7.54477708e-03 4.15163378e-03 4.15929858e-03 1.96475381e-04 3.07730625e-04 3.08298762e-04 -3.28963293e-07 1.78346920e-04 2.80017721e-03 1.86211962e-02 -6.52195395e-03 -2.20170871e-03 -7.88663932e-03 1.80795636e-02 6.20661890e-03 2.22324436e-02 -2.46496442e-04 -1.44574278e-04 -5.17872860e-04 1.82234345e-04 -1.10348603e-04 3.25373633e-04 2.89295265e-03 -1.28396912e-03 -4.12734671e-04 -6.42517511e-04 4.15163378e-03 1.30679162e-03 2.07754015e-03 1.82432375e-04 8.05847531e-05 1.78346920e-04 -4.88316606e-05 4.03258258e-05 7.83272793e-04 5.20876903e-03 -2.20170871e-03 7.33222324e-04 -2.20607109e-03 6.20661890e-03 -2.37278512e-03 6.21891647e-03 -9.29206491e-06 -1.53941828e-04 -1.10348603e-04 1.65311777e-05 -1.54246843e-04 3.25974342e-04 2.89829366e-03 -1.28633960e-03 -6.42517511e-04 -4.15104936e-04 4.15929858e-03 2.07754015e-03 1.31445572e-03 1.82769185e-04 1.78346920e-04 8.12426797e-05 4.85925779e-05 4.05801425e-05 2.80572538e-03 1.86580916e-02 -7.88663932e-03 -2.20607109e-03 -6.55317566e-03 2.22324436e-02 6.21891647e-03 1.81675776e-02 -3.32846776e-05 -1.10348603e-04 -5.18410518e-04 3.05975264e-04 -1.45011127e-04 -2.13275773e-03 -1.87019949e-02 7.54477708e-03 4.15163378e-03 4.15929858e-03 -2.41491129e-02 -1.33465016e-02 -1.33711421e-02 -4.90035601e-04 -8.27789418e-04 -8.29317695e-04 9.09487945e-07 -4.93077425e-04 -8.32636664e-03 -5.08990549e-02 1.80795636e-02 6.20661890e-03 2.22324436e-02 -4.73857583e-02 -1.66940183e-02 -5.97988739e-02 1.11843781e-03 1.05219107e-03 3.76900515e-03 -1.67769231e-03 1.01589524e-03 -1.06529736e-03 -9.34151388e-03 4.15163378e-03 1.30679162e-03 2.07754015e-03 -1.33465016e-02 -4.09549370e-03 -6.67879068e-03 -5.17649483e-04 -1.76754004e-04 -4.93077425e-04 1.58001725e-04 -8.84503696e-05 -2.32907275e-03 -1.42376149e-02 6.20661890e-03 -2.37278512e-03 6.21891647e-03 -1.66940183e-02 7.62517269e-03 -1.67270952e-02 2.46506614e-04 4.20545105e-04 1.01589524e-03 -4.30983716e-04 4.21378358e-04 -1.06726413e-03 -9.35876032e-03 4.15929858e-03 2.07754015e-03 1.31445572e-03 -1.33711421e-02 -6.67879068e-03 -4.12013194e-03 -5.18605175e-04 -4.93077425e-04 -1.78572980e-04 -1.57383187e-04 -8.91959377e-05 -8.34286421e-03 -5.09999045e-02 2.22324436e-02 6.21891647e-03 1.81675776e-02 -5.97988739e-02 -1.67270952e-02 -4.76224907e-02 8.82999985e-04 1.01589524e-03 3.77592973e-03 -1.81822595e-03 1.05621280e-03 9.04226467e-05 5.74275380e-04 -1.96475381e-04 -1.82432375e-04 -1.82769185e-04 4.90035601e-04 5.17649483e-04 5.18605175e-04 -8.45554756e-05 -7.60865049e-05 -7.62269769e-05 5.56751504e-08 -3.01841932e-05 5.09296223e-05 -6.75074262e-04 2.46496442e-04 9.29206491e-06 3.32846776e-05 -1.11843781e-03 -2.46506614e-04 -8.82999985e-04 2.04300104e-04 -1.11558636e-04 -3.99609050e-04 3.52293629e-04 -2.13324826e-04 1.04298820e-04 6.62403131e-04 -3.07730625e-04 -8.05847531e-05 -1.78346920e-04 8.27789418e-04 1.76754004e-04 4.93077425e-04 -7.60865049e-05 -1.00283317e-04 -8.64065121e-05 -9.02835932e-06 -5.00044961e-05 5.37707300e-05 -7.12733262e-04 1.44574278e-04 1.53941828e-04 1.10348603e-04 -1.05219107e-03 -4.20545105e-04 -1.01589524e-03 -1.11558636e-04 5.96970841e-05 -4.91031458e-04 3.12423597e-04 5.58383181e-05 1.04491378e-04 6.63626069e-04 -3.08298762e-04 -1.78346920e-04 -8.12426797e-05 8.29317695e-04 4.93077425e-04 1.78572980e-04 -7.62269769e-05 -8.64065121e-05 -1.00602073e-04 9.19612793e-06 -5.00631691e-05 1.92609654e-04 -2.55304898e-03 5.17872860e-04 1.10348603e-04 5.18410518e-04 -3.76900515e-03 -1.01589524e-03 -3.77592973e-03 -3.99609050e-04 -4.91031458e-04 -1.56212310e-03 6.99937705e-04 -4.92236464e-04 -9.62701417e-08 -6.11412895e-07 3.28963293e-07 4.88316606e-05 -4.85925779e-05 -9.09487945e-07 -1.58001725e-04 1.57383187e-04 5.56751504e-08 -9.02835932e-06 9.19612793e-06 -4.92142382e-06 3.77367705e-08 -8.89751985e-05 1.17936996e-03 -1.82234345e-04 -1.65311777e-05 -3.05975264e-04 1.67769231e-03 4.30983716e-04 1.81822595e-03 3.52293629e-04 3.12423597e-04 6.99937705e-04 -2.06177814e-04 2.54415501e-04 5.21927023e-05 3.31476517e-04 -1.78346920e-04 -4.03258258e-05 -4.05801425e-05 4.93077425e-04 8.84503696e-05 8.91959377e-05 -3.01841932e-05 -5.00044961e-05 -5.00631691e-05 3.77367705e-08 -2.53802836e-05 5.38772693e-05 -7.14145446e-04 1.10348603e-04 1.54246843e-04 1.45011127e-04 -1.01589524e-03 -4.21378358e-04 -1.05621280e-03 -2.13324826e-04 5.58383181e-05 -4.92236464e-04 2.54415501e-04 5.99181374e-05 4.25955339e-07 4.38461509e-06 -2.34089453e-06 -1.47919145e-06 -4.66862535e-07 7.44955330e-06 4.70730972e-06 1.48572151e-06 1.08395201e-06 1.52004922e-06 4.79758069e-07 4.32412210e-07 3.03155066e-07 1.70355257e-04 1.56705372e-03 -6.51449965e-04 -3.26055349e-04 -3.25454559e-04 2.13288205e-03 1.06752266e-03 1.06555564e-03 9.04054609e-05 1.04503554e-04 1.04310995e-04 9.62880926e-08 5.22083963e-05 4.38461509e-06 4.50968444e-05 -2.41308007e-05 -1.52480489e-05 -4.81259052e-06 7.67037380e-05 4.84684433e-05 1.52976143e-05 1.11891140e-05 1.56907352e-05 4.95231122e-06 4.46358275e-06 3.12932358e-06 1.56705372e-03 1.39619473e-02 -5.79205032e-03 -2.89896245e-03 -2.89362082e-03 1.87027028e-02 9.36083599e-03 9.34358769e-03 5.74116144e-04 6.63645499e-04 6.62422665e-04 6.11473553e-07 3.31547263e-04 2.34089453e-06 2.41308007e-05 -1.27852314e-05 -8.17754160e-06 -2.58099640e-06 4.07733653e-05 2.60731641e-05 8.22921433e-06 5.84207448e-06 8.35397799e-06 2.63668326e-06 2.40588100e-06 1.68671235e-06 6.51449965e-04 5.79205032e-03 -2.34189260e-03 -1.28656563e-03 -1.28419500e-03 7.54453669e-03 4.15999622e-03 4.15233100e-03 1.96381450e-04 3.08292601e-04 3.07724540e-04 3.28989932e-07 1.78381732e-04 1.47919145e-06 1.52480489e-05 -8.17754160e-06 -5.01118181e-06 -1.63090979e-06 2.60731641e-05 1.59866897e-05 5.19997093e-06 3.87058759e-06 5.18054503e-06 1.68671235e-06 1.41689276e-06 1.03319580e-06 3.26055349e-04 2.89896245e-03 -1.28656563e-03 -4.15303763e-04 -6.42748746e-04 4.15999622e-03 1.31508200e-03 2.07827125e-03 1.82757759e-04 8.12752461e-05 1.78381732e-04 -4.86026399e-05 4.06038848e-05 4.66862535e-07 4.81259052e-06 -2.58099640e-06 -1.63090979e-06 -3.58610331e-07 8.22921433e-06 5.19997093e-06 1.15249312e-06 1.22163519e-06 1.68671235e-06 3.68783024e-07 5.12446756e-07 2.33030874e-07 3.25454559e-04 2.89362082e-03 -1.28419500e-03 -6.42748746e-04 -4.12932916e-04 4.15233100e-03 2.07827125e-03 1.30741608e-03 1.82421010e-04 1.78381732e-04 8.06172662e-05 4.88418014e-05 4.03495161e-05 -7.44955330e-06 -7.67037380e-05 4.07733653e-05 2.60731641e-05 8.22921433e-06 -1.29814203e-04 -8.29943124e-05 -2.61946721e-05 -1.86717431e-05 -2.66898096e-05 -8.42384004e-06 -7.68464101e-06 -5.38753948e-06 -2.13288205e-03 -1.87027028e-02 7.54453669e-03 4.15999622e-03 4.15233100e-03 -2.41480897e-02 -1.33732595e-02 -1.33486179e-02 -4.89739125e-04 -8.29251221e-04 -8.27723241e-04 -9.09518461e-07 -4.93150284e-04 -4.70730972e-06 -4.84684433e-05 2.60731641e-05 1.59866897e-05 5.19997093e-06 -8.29943124e-05 -5.09149524e-05 -1.65521918e-05 -1.23594266e-05 -1.65572022e-05 -5.38753948e-06 -4.53201809e-06 -3.30212973e-06 -1.06752266e-03 -9.36083599e-03 4.15999622e-03 1.31508200e-03 2.07827125e-03 -1.33732595e-02 -4.12208254e-03 -6.68107836e-03 -5.18554836e-04 -1.78642802e-04 -4.93150284e-04 1.57413656e-04 -8.92472444e-05 -1.48572151e-06 -1.52976143e-05 8.22921433e-06 5.19997093e-06 1.15249312e-06 -2.61946721e-05 -1.65521918e-05 -3.69575262e-06 -3.90088330e-06 -5.38753948e-06 -1.18792019e-06 -1.63481775e-06 -7.50636722e-07 -1.06555564e-03 -9.34358769e-03 4.15233100e-03 2.07827125e-03 1.30741608e-03 -1.33486179e-02 -6.68107836e-03 -4.09743867e-03 -5.17599346e-04 -4.93150284e-04 -1.76823765e-04 -1.58032368e-04 -8.85015542e-05 1.08395201e-06 1.11891140e-05 -5.84207448e-06 -3.87058759e-06 -1.22163519e-06 1.86717431e-05 1.23594266e-05 3.90088330e-06 2.57652339e-06 3.90553575e-06 1.23266553e-06 1.16468609e-06 8.16536816e-07 9.04054609e-05 5.74116144e-04 -1.96381450e-04 -1.82757759e-04 -1.82421010e-04 4.89739125e-04 5.18554836e-04 5.17599346e-04 -8.45382922e-05 -7.62385145e-05 -7.60980373e-05 -5.56923571e-08 -3.01969701e-05 1.52004922e-06 1.56907352e-05 -8.35397799e-06 -5.18054503e-06 -1.68671235e-06 2.66898096e-05 1.65572022e-05 5.38753948e-06 3.90553575e-06 5.32549175e-06 1.73470375e-06 1.47416780e-06 1.07549317e-06 1.04503554e-04 6.63645499e-04 -3.08292601e-04 -8.12752461e-05 -1.78381732e-04 8.29251221e-04 1.78642802e-04 4.93150284e-04 -7.62385145e-05 -1.00634733e-04 -8.64460597e-05 -9.19448866e-06 -5.00888212e-05 4.79758069e-07 4.95231122e-06 -2.63668326e-06 -1.68671235e-06 -3.68783024e-07 8.42384004e-06 5.38753948e-06 1.18792019e-06 1.23266553e-06 1.73470375e-06 3.76822455e-07 5.34033447e-07 2.41374865e-07 1.04310995e-04 6.62422665e-04 -3.07724540e-04 -1.78381732e-04 -8.06172662e-05 8.27723241e-04 4.93150284e-04 1.76823765e-04 -7.60980373e-05 -8.64460597e-05 -1.00315868e-04 9.02664158e-06 -5.00301015e-05 4.32412210e-07 4.46358275e-06 -2.40588100e-06 -1.41689276e-06 -5.12446756e-07 7.68464101e-06 4.53201809e-06 1.63481775e-06 1.16468609e-06 1.47416780e-06 5.34033447e-07 3.76352982e-07 3.15727900e-07 9.62880926e-08 6.11473553e-07 -3.28989932e-07 4.86026399e-05 -4.88418014e-05 9.09518461e-07 -1.57413656e-04 1.58032368e-04 -5.56923571e-08 -9.19448866e-06 9.02664158e-06 -4.92119020e-06 -3.77645891e-08 3.03155066e-07 3.12932358e-06 -1.68671235e-06 -1.03319580e-06 -2.33030874e-07 5.38753948e-06 3.30212973e-06 7.50636722e-07 8.16536816e-07 1.07549317e-06 2.41374865e-07 3.15727900e-07 1.47357382e-07 5.22083963e-05 3.31547263e-04 -1.78381732e-04 -4.06038848e-05 -4.03495161e-05 4.93150284e-04 8.92472444e-05 8.85015542e-05 -3.01969701e-05 -5.00888212e-05 -5.00301015e-05 -3.77645891e-08 -2.53974700e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 1 -1 664 + 2.50627515e-03 1.63954155e-02 -9.25966720e-03 4.53385554e-06 -4.00514183e-06 2.59395698e-02 -1.27009168e-05 1.12198045e-05 -7.27294924e-05 6.16798881e-08 -5.44871132e-08 1.25348575e-02 6.21696002e-02 -3.43082474e-02 1.33051697e-02 -1.14742634e-02 8.49025200e-02 -3.29262648e-02 2.83953261e-02 -3.09097591e-03 2.38957985e-03 -2.06075300e-03 -1.18749038e-04 7.99185926e-04 1.63954155e-02 8.09939371e-02 -5.00301775e-02 2.44965173e-05 -2.16398660e-05 1.17947808e-01 -5.77513548e-05 5.10167042e-05 -1.25415667e-02 1.06361588e-05 -9.39582747e-06 -5.71898835e-10 4.60052435e-09 6.21696002e-02 1.55478993e-01 -1.14330614e-01 4.43388495e-02 -3.82374406e-02 1.72390312e-01 -6.68551305e-02 5.76552866e-02 -3.60150937e-02 2.78426441e-02 -2.40112556e-02 -1.38362700e-03 9.31186682e-03 9.25966720e-03 5.00301775e-02 -3.02793851e-02 1.64061508e-05 -1.44929542e-05 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -4.85257292e-03 4.19640178e-06 -3.70704010e-06 -2.29996550e-10 1.85016066e-09 3.43082474e-02 1.14330614e-01 -7.17850561e-02 3.35728936e-02 -2.89529732e-02 1.37848658e-01 -6.68678020e-02 5.76662144e-02 -1.54463932e-02 1.41409224e-02 -1.21950093e-02 -7.86690705e-04 5.29446092e-03 -4.53385554e-06 -2.44965173e-05 1.64061508e-05 3.22751825e-03 7.09625512e-09 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 2.51640210e-06 1.65565609e-04 1.85016066e-09 -8.10676010e-08 7.16131295e-08 -1.33051697e-02 -4.43388495e-02 3.35728936e-02 1.76484815e-03 1.12283271e-02 -6.68678020e-02 -8.64215419e-03 -2.23636830e-02 8.91679241e-03 -1.78251437e-03 5.29446092e-03 -1.38451946e-03 -5.96155178e-04 4.00514183e-06 2.16398660e-05 -1.44929542e-05 7.09625512e-09 3.22752002e-03 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -2.22295290e-06 1.85016066e-09 1.65566069e-04 -7.16141349e-08 -8.10669134e-08 1.14742634e-02 3.82374406e-02 -2.89529732e-02 1.12283271e-02 5.10162621e-03 5.76662144e-02 -2.23636830e-02 -1.52880816e-02 -7.68976470e-03 5.29446092e-03 -2.09132959e-04 -1.72020906e-03 8.11043912e-05 -2.59395698e-02 -1.17947808e-01 7.60951540e-02 -4.17220445e-05 3.68566454e-05 -1.70014403e-01 9.53240449e-05 -8.42078704e-05 2.32819729e-02 -2.05842404e-05 1.81838176e-05 1.15193620e-09 -9.26651742e-09 -8.49025200e-02 -1.72390312e-01 1.37848658e-01 -6.68678020e-02 5.76662144e-02 -1.68208862e-01 9.19832552e-02 -7.93255642e-02 4.64303995e-02 -4.47162644e-02 3.85629199e-02 2.55890361e-03 -1.72215269e-02 1.27009168e-05 5.77513548e-05 -4.17220445e-05 -9.11535854e-03 -1.80462972e-08 9.53240449e-05 2.46695060e-02 4.12311060e-08 -1.28536127e-05 -1.71440441e-03 -9.26651742e-09 8.39436678e-07 -7.41542074e-07 3.29262648e-02 6.68551305e-02 -6.68678020e-02 -8.64215419e-03 -2.23636830e-02 9.19832552e-02 3.33036943e-02 3.07634512e-02 -2.97433638e-02 2.49611106e-03 -1.72215269e-02 5.78402617e-03 8.34814886e-04 -1.12198045e-05 -5.10167042e-05 3.68566454e-05 -1.80462972e-08 -9.11536303e-03 -8.42078704e-05 4.12311060e-08 2.46695162e-02 1.13546939e-05 -9.26651742e-09 -1.71440671e-03 7.41547110e-07 8.39433234e-07 -2.83953261e-02 -5.76552866e-02 5.76662144e-02 -2.23636830e-02 -1.52880816e-02 -7.93255642e-02 3.07634512e-02 4.24458229e-02 2.56504199e-02 -1.72215269e-02 -2.62169616e-03 6.69972540e-03 1.01672673e-03 -7.27294924e-05 -1.25415667e-02 4.85257292e-03 -2.51640210e-06 2.22295290e-06 -2.32819729e-02 1.28536127e-05 -1.13546939e-05 -3.95858081e-03 4.38119900e-06 -3.87028728e-06 -2.94092631e-10 2.36576860e-09 -3.09097591e-03 -3.60150937e-02 1.54463932e-02 -8.91679241e-03 7.68976470e-03 -4.64303995e-02 2.97433638e-02 -2.56504199e-02 4.28637318e-03 -1.64682255e-03 1.42020553e-03 3.27581665e-06 -2.20463813e-05 6.16798881e-08 1.06361588e-05 -4.19640178e-06 -1.65565609e-04 -1.85016066e-09 2.05842404e-05 1.71440441e-03 9.26651742e-09 4.38119900e-06 1.20748131e-03 3.28228457e-09 -6.28346033e-07 5.55070168e-07 2.38957985e-03 2.78426441e-02 -1.41409224e-02 1.78251437e-03 -5.29446092e-03 4.47162644e-02 -2.49611106e-03 1.72215269e-02 -1.64682255e-03 3.06726892e-03 -1.05186769e-03 -9.55757605e-04 1.07667837e-03 -5.44871132e-08 -9.39582747e-06 3.70704010e-06 -1.85016066e-09 -1.65566069e-04 -1.81838176e-05 9.26651742e-09 1.71440671e-03 -3.87028728e-06 3.28228457e-09 1.20748213e-03 -5.55072100e-07 -6.28344712e-07 -2.06075300e-03 -2.40112556e-02 1.21950093e-02 -5.29446092e-03 2.09132959e-04 -3.85629199e-02 1.72215269e-02 2.62169616e-03 1.42020553e-03 -1.05186769e-03 2.75468015e-03 -7.50032544e-04 -1.16243491e-03 -5.71898835e-10 2.29996550e-10 8.10676010e-08 7.16141349e-08 -1.15193620e-09 -8.39436678e-07 -7.41547110e-07 -2.94092631e-10 -6.28346033e-07 -5.55072100e-07 -7.58100897e-05 -1.18749038e-04 -1.38362700e-03 7.86690705e-04 1.38451946e-03 1.72020906e-03 -2.55890361e-03 -5.78402617e-03 -6.69972540e-03 3.27581665e-06 -9.55757605e-04 -7.50032544e-04 1.13374084e-04 -1.43887294e-05 4.60052435e-09 -1.85016066e-09 -7.16131295e-08 8.10669134e-08 9.26651742e-09 7.41542074e-07 -8.39433234e-07 2.36576860e-09 5.55070168e-07 -6.28344712e-07 -7.58100897e-05 7.99185926e-04 9.31186682e-03 -5.29446092e-03 5.96155178e-04 -8.11043912e-05 1.72215269e-02 -8.34814886e-04 -1.01672673e-03 -2.20463813e-05 1.07667837e-03 -1.16243491e-03 -1.43887294e-05 2.08072841e-04 5.29685325e-05 5.40087053e-04 -2.58127029e-04 -5.99380116e-05 5.16900231e-05 8.83584532e-04 2.05171462e-04 -1.76938096e-04 8.66376762e-05 3.65634888e-05 -3.15320366e-05 1.08793549e-06 -7.32185074e-06 2.50820093e-03 1.64061116e-02 -9.26607928e-03 -4.53731191e-06 4.00819514e-06 2.59561676e-02 1.27099310e-05 -1.12277676e-05 -7.32519544e-05 -6.21273115e-08 5.48823605e-08 5.40087053e-04 5.48175383e-03 -2.60145270e-03 -6.04066544e-04 5.20941766e-04 8.90431324e-03 2.06761312e-03 -1.78309168e-03 8.23213736e-04 3.47418900e-04 -2.99611056e-04 1.03373437e-05 -6.95707499e-05 1.64061116e-02 8.10260212e-02 -5.00551051e-02 -2.45104340e-05 2.16521598e-05 1.17988572e-01 5.77753480e-05 -5.10378994e-05 -1.25535498e-02 -1.06470647e-05 9.40546164e-06 -5.72525213e-10 4.60556313e-09 2.58127029e-04 2.60145270e-03 -1.23426507e-03 -3.01525975e-04 2.60033395e-04 4.20984652e-03 1.02921026e-03 -8.87582033e-04 3.77467627e-04 1.71305676e-04 -1.47732535e-04 5.42224830e-06 -3.64919549e-05 9.26607928e-03 5.00551051e-02 -3.02967924e-02 -1.64169660e-05 1.45025082e-05 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -4.85780563e-03 -4.20142599e-06 3.71147842e-06 -2.30298846e-10 1.85259243e-09 5.99380116e-05 6.04066544e-04 -3.01525975e-04 -5.73882627e-06 6.03806765e-05 1.02921026e-03 1.64704278e-05 -2.06099696e-04 1.06573720e-04 -4.73872980e-06 -3.64919549e-05 -9.66694122e-06 9.48932214e-07 4.53731191e-06 2.45104340e-05 -1.64169660e-05 3.22985843e-03 7.10142892e-09 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -2.51964791e-06 1.66164344e-04 1.85259243e-09 8.13664448e-08 -7.18771226e-08 -5.16900231e-05 -5.20941766e-04 2.60033395e-04 6.03806765e-05 1.22048011e-05 -8.87582033e-04 -2.06099696e-04 -4.47772488e-05 -9.19082550e-05 -3.64919549e-05 -1.55832264e-05 -1.05083006e-05 -3.61848044e-06 -4.00819514e-06 -2.16521598e-05 1.45025082e-05 7.10142892e-09 3.22986019e-03 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 2.22582020e-06 1.85259243e-09 1.66164805e-04 7.18781294e-08 8.13657562e-08 -8.83584532e-04 -8.90431324e-03 4.20984652e-03 1.02921026e-03 -8.87582033e-04 -1.43704396e-02 -3.51591755e-03 3.03209690e-03 -1.26237663e-03 -5.74304067e-04 4.95274863e-04 -1.82134334e-05 1.22577159e-04 -2.59561676e-02 -1.17988572e-01 7.61311007e-02 4.17454737e-05 -3.68773424e-05 -1.70063455e-01 -9.53613771e-05 8.42408491e-05 2.33026297e-02 2.06046353e-05 -1.82018342e-05 1.15319380e-09 -9.27663400e-09 -2.05171462e-04 -2.06761312e-03 1.02921026e-03 1.64704278e-05 -2.06099696e-04 -3.51591755e-03 -4.53155957e-05 7.04063654e-04 -3.58626808e-04 2.07188854e-05 1.22577159e-04 3.35863392e-05 -4.14896366e-06 -1.27099310e-05 -5.77753480e-05 4.17454737e-05 -9.12130949e-03 -1.80576919e-08 -9.53613771e-05 2.46831012e-02 4.12501336e-08 1.28671159e-05 -1.71734103e-03 -9.27663400e-09 -8.40933269e-07 7.42864136e-07 1.76938096e-04 1.78309168e-03 -8.87582033e-04 -2.06099696e-04 -4.47772488e-05 3.03209690e-03 7.04063654e-04 1.63914519e-04 3.09276659e-04 1.22577159e-04 5.71457522e-05 3.62590608e-05 1.32694463e-05 1.12277676e-05 5.10378994e-05 -3.68773424e-05 -1.80576919e-08 -9.12131398e-03 8.42408491e-05 4.12501336e-08 2.46831115e-02 -1.13666224e-05 -9.27663400e-09 -1.71734334e-03 -7.42869178e-07 -8.40929821e-07 8.66376762e-05 8.23213736e-04 -3.77467627e-04 -1.06573720e-04 9.19082550e-05 1.26237663e-03 3.58626808e-04 -3.09276659e-04 5.56549809e-05 3.66023661e-05 -3.15655642e-05 1.46433070e-06 -9.85500605e-06 -7.32519544e-05 -1.25535498e-02 4.85780563e-03 2.51964791e-06 -2.22582020e-06 -2.33026297e-02 -1.28671159e-05 1.13666224e-05 -3.95982519e-03 -4.38332623e-06 3.87216643e-06 -2.94276911e-10 2.36725102e-09 3.65634888e-05 3.47418900e-04 -1.71305676e-04 4.73872980e-06 3.64919549e-05 5.74304067e-04 -2.07188854e-05 -1.22577159e-04 3.66023661e-05 -1.40701793e-05 -1.33934603e-05 -6.76858822e-06 2.83050622e-06 -6.21273115e-08 -1.06470647e-05 4.20142599e-06 -1.66164344e-04 -1.85259243e-09 -2.06046353e-05 1.71734103e-03 9.27663400e-09 -4.38332623e-06 1.20838436e-03 3.28410752e-09 6.28875997e-07 -5.55538330e-07 -3.15320366e-05 -2.99611056e-04 1.47732535e-04 3.64919549e-05 1.55832264e-05 -4.95274863e-04 -1.22577159e-04 -5.71457522e-05 -3.15655642e-05 -1.33934603e-05 -1.80503808e-05 -6.72097472e-06 -4.30698770e-06 5.48823605e-08 9.40546164e-06 -3.71147842e-06 -1.85259243e-09 -1.66164805e-04 1.82018342e-05 9.27663400e-09 1.71734334e-03 3.87216643e-06 3.28410752e-09 1.20838518e-03 5.55540262e-07 6.28874675e-07 1.08793549e-06 1.03373437e-05 -5.42224830e-06 9.66694122e-06 1.05083006e-05 1.82134334e-05 -3.35863392e-05 -3.62590608e-05 1.46433070e-06 -6.76858822e-06 -6.72097472e-06 -1.17747996e-06 -1.02611066e-07 -5.72525213e-10 2.30298846e-10 -8.13664448e-08 -7.18781294e-08 -1.15319380e-09 8.40933269e-07 7.42869178e-07 -2.94276911e-10 6.28875997e-07 5.55540262e-07 -7.58997251e-05 -7.32185074e-06 -6.95707499e-05 3.64919549e-05 -9.48932214e-07 3.61848044e-06 -1.22577159e-04 4.14896366e-06 -1.32694463e-05 -9.85500605e-06 2.83050622e-06 -4.30698770e-06 -1.02611066e-07 -5.02149975e-07 4.60556313e-09 -1.85259243e-09 7.18771226e-08 -8.13657562e-08 9.27663400e-09 -7.42864136e-07 8.40929821e-07 2.36725102e-09 -5.55538330e-07 6.28874675e-07 -7.58997251e-05 + 0 1 2 3 4 5 6 7 8 9 10 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 25 + 0 24 50 76 102 128 154 180 206 232 258 284 308 332 356 382 408 434 460 486 512 538 564 590 616 640 664 +1 1 0 676 + 1.70227538e-04 1.56599930e-03 -6.51015093e-04 3.25814943e-04 3.25214596e-04 2.13153159e-03 -1.06677226e-03 -1.06480662e-03 9.03864428e-05 -1.04469411e-04 -1.04276916e-04 9.62499139e-08 5.21876954e-05 6.52816183e-04 5.14598777e-03 -1.83244406e-03 1.93386568e-03 6.10366854e-04 5.59049427e-03 -5.89991542e-03 -1.86213182e-03 4.35268461e-05 -2.05247358e-04 -6.47801892e-05 9.75148842e-05 6.83656254e-05 1.56599930e-03 1.39540110e-02 -5.78874775e-03 2.89710721e-03 2.89176899e-03 1.86929580e-02 -9.35530547e-03 -9.33806736e-03 5.74270178e-04 -6.63746306e-04 -6.62523286e-04 6.11523737e-07 3.31574473e-04 5.14598777e-03 3.63570199e-02 -1.32316138e-02 1.39639536e-02 4.40730425e-03 3.80643669e-02 -4.01711431e-02 -1.26788197e-02 -1.74473072e-04 8.22713804e-04 2.59665003e-04 -3.90878801e-04 -2.74036870e-04 6.51015093e-04 5.78874775e-03 -2.34057715e-03 1.28572766e-03 1.28335857e-03 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 1.96448112e-04 -3.08295628e-04 -3.07727561e-04 3.28946782e-07 1.78358336e-04 1.83244406e-03 1.32316138e-02 -4.33758697e-03 5.51586552e-03 1.74091796e-03 1.25437761e-02 -1.61793373e-02 -5.10652387e-03 -1.37594005e-04 6.72141510e-05 2.12141362e-05 3.45003151e-05 2.41874422e-05 -3.25814943e-04 -2.89710721e-03 1.28572766e-03 -4.15018849e-04 -6.42285263e-04 -4.15746882e-03 1.31425191e-03 2.07686359e-03 -1.82741080e-04 8.12948157e-05 1.78358336e-04 4.85777434e-05 -4.06108259e-05 -1.93386568e-03 -1.39639536e-02 5.51586552e-03 -4.93215723e-03 -1.83727381e-03 -1.61793373e-02 1.42877913e-02 5.38915835e-03 -9.69826545e-05 -5.58616730e-05 2.41874422e-05 1.03419888e-04 1.86069055e-05 -3.25214596e-04 -2.89176899e-03 1.28335857e-03 -6.42285263e-04 -4.12649712e-04 -4.14980826e-03 2.07686359e-03 1.30659118e-03 -1.82404361e-04 1.78358336e-04 8.06369221e-05 -4.88168847e-05 -4.03565362e-05 -6.10366854e-04 -4.40730425e-03 1.74091796e-03 -1.83727381e-03 3.09118385e-04 -5.10652387e-03 5.38915835e-03 -1.08610900e-03 -3.06096739e-05 2.41874422e-05 -1.24862303e-04 -5.56247411e-05 1.31773148e-04 -2.13153159e-03 -1.86929580e-02 7.54064718e-03 -4.15746882e-03 -4.14980826e-03 -2.41369597e-02 1.33658221e-02 1.33411942e-02 -4.90141923e-04 8.29516416e-04 8.27987948e-04 -9.09635785e-07 -4.93213898e-04 -5.59049427e-03 -3.80643669e-02 1.25437761e-02 -1.61793373e-02 -5.10652387e-03 -3.49452933e-02 4.59996355e-02 1.45184090e-02 5.97170549e-04 -1.51353952e-03 -4.77703477e-04 5.70330471e-04 3.99846645e-04 1.06677226e-03 9.35530547e-03 -4.15746882e-03 1.31425191e-03 2.07686359e-03 1.33658221e-02 -4.11975812e-03 -6.67689653e-03 5.18619923e-04 -1.78822237e-04 -4.93213898e-04 -1.57344700e-04 8.93306502e-05 5.89991542e-03 4.01711431e-02 -1.61793373e-02 1.42877913e-02 5.38915835e-03 4.59996355e-02 -3.99037200e-02 -1.53219699e-02 -8.78837518e-05 1.56355849e-03 3.99846645e-04 -9.15016435e-04 -5.20804042e-04 1.06480662e-03 9.33806736e-03 -4.14980826e-03 2.07686359e-03 1.30659118e-03 1.33411942e-02 -6.67689653e-03 -4.09512968e-03 5.17664313e-04 -4.93213898e-04 -1.77002966e-04 1.57963593e-04 8.85850601e-05 1.86213182e-03 1.26788197e-02 -5.10652387e-03 5.38915835e-03 -1.08610900e-03 1.45184090e-02 -1.53219699e-02 3.80596920e-03 -2.77378774e-05 3.99846645e-04 4.22897547e-04 -9.11439787e-05 -4.46303965e-04 9.03864428e-05 5.74270178e-04 -1.96448112e-04 1.82741080e-04 1.82404361e-04 4.90141923e-04 -5.18619923e-04 -5.17664313e-04 -8.44672508e-05 7.61101121e-05 7.59698714e-05 -5.55509065e-08 -3.01202741e-05 4.35268461e-05 -1.74473072e-04 1.37594005e-04 9.69826545e-05 3.06096739e-05 -5.97170549e-04 8.78837518e-05 2.77378774e-05 1.15988275e-04 2.09825232e-04 6.62250580e-05 -1.87050790e-04 -1.31137357e-04 -1.04469411e-04 -6.63746306e-04 3.08295628e-04 -8.12948157e-05 -1.78358336e-04 -8.29516416e-04 1.78822237e-04 4.93213898e-04 7.61101121e-05 -1.00501109e-04 -8.62860668e-05 9.20640124e-06 5.00150775e-05 -2.05247358e-04 8.22713804e-04 -6.72141510e-05 5.58616730e-05 -2.41874422e-05 1.51353952e-03 -1.56355849e-03 -3.99846645e-04 2.09825232e-04 -1.06750700e-03 -3.68137532e-04 5.01233522e-04 3.92324757e-04 -1.04276916e-04 -6.62523286e-04 3.07727561e-04 -1.78358336e-04 -8.06369221e-05 -8.27987948e-04 4.93213898e-04 1.77002966e-04 7.59698714e-05 -8.62860668e-05 -1.00182833e-04 -9.03884807e-06 4.99565381e-05 -6.47801892e-05 2.59665003e-04 -2.12141362e-05 -2.41874422e-05 1.24862303e-04 4.77703477e-04 -3.99846645e-04 -4.22897547e-04 6.62250580e-05 -3.68137532e-04 -1.73041102e-05 2.25212181e-04 2.82403045e-05 9.62499139e-08 6.11523737e-07 -3.28946782e-07 -4.85777434e-05 4.88168847e-05 9.09635785e-07 1.57344700e-04 -1.57963593e-04 -5.55509065e-08 9.20640124e-06 -9.03884807e-06 -4.93388686e-06 -3.76829102e-08 9.75148842e-05 -3.90878801e-04 -3.45003151e-05 -1.03419888e-04 5.56247411e-05 -5.70330471e-04 9.15016435e-04 9.11439787e-05 -1.87050790e-04 5.01233522e-04 2.25212181e-04 -1.67087006e-04 -2.02316254e-04 5.21876954e-05 3.31574473e-04 -1.78358336e-04 4.06108259e-05 4.03565362e-05 4.93213898e-04 -8.93306502e-05 -8.85850601e-05 -3.01202741e-05 5.00150775e-05 4.99565381e-05 -3.76829102e-08 -2.53658797e-05 6.83656254e-05 -2.74036870e-04 -2.41874422e-05 -1.86069055e-05 -1.31773148e-04 -3.99846645e-04 5.20804042e-04 4.46303965e-04 -1.31137357e-04 3.92324757e-04 2.82403045e-05 -2.02316254e-04 -2.03482101e-05 1.54917794e-06 1.65268354e-05 -8.14861929e-06 1.36476701e-06 4.88866902e-06 2.72196659e-05 -4.55887073e-06 -1.63301208e-05 3.70720664e-06 -1.33426066e-06 -4.77939364e-06 -1.32193676e-06 8.00474108e-07 1.70459777e-04 1.56791653e-03 -6.51843036e-04 3.25613709e-04 3.26214862e-04 2.13410893e-03 -1.06604671e-03 -1.06801486e-03 9.04416656e-05 -1.04332897e-04 -1.04525518e-04 -9.63083198e-08 5.22134005e-05 1.65268354e-05 1.75988914e-04 -8.72188641e-05 1.46078034e-05 5.23259394e-05 2.90594864e-04 -4.86701205e-05 -1.74338996e-04 3.98359713e-05 -1.43373635e-05 -5.13572094e-05 -1.42049364e-05 8.60153389e-06 1.56791653e-03 1.39684405e-02 -5.79508335e-03 2.89480516e-03 2.90014959e-03 1.87117436e-02 -9.34703588e-03 -9.36429252e-03 5.74121068e-04 -6.62302200e-04 -6.63524952e-04 -6.11362418e-07 3.31449151e-04 8.14861929e-06 8.72188641e-05 -4.23780469e-05 7.23646537e-06 2.59214092e-05 1.42249135e-04 -2.42768857e-05 -8.69611138e-05 1.88449162e-05 -6.99095125e-06 -2.50419644e-05 -7.06581405e-06 4.27857170e-06 6.51843036e-04 5.79508335e-03 -2.34326261e-03 1.28480592e-03 1.28717795e-03 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 1.96408637e-04 -3.07727515e-04 -3.08295646e-04 -3.29006363e-07 1.78370270e-04 -1.36476701e-06 -1.46078034e-05 7.23646537e-06 -3.83252426e-07 -4.34143293e-06 -2.42768857e-05 1.36504706e-06 1.45646342e-05 -3.39998997e-06 3.54161607e-07 4.27857170e-06 1.32414862e-06 -2.12475122e-07 -3.25613709e-04 -2.89480516e-03 1.28480592e-03 -4.13017927e-04 -6.42981152e-04 -4.15415752e-03 1.30761661e-03 2.07894822e-03 -1.82448989e-04 8.05650461e-05 1.78370270e-04 4.88565785e-05 -4.03187791e-05 -4.88866902e-06 -5.23259394e-05 2.59214092e-05 -4.34143293e-06 -1.47225039e-05 -8.69611138e-05 1.45646342e-05 4.94703514e-05 -1.21789474e-05 4.27857170e-06 1.44857897e-05 3.73493356e-06 -2.42614450e-06 -3.26214862e-04 -2.90014959e-03 1.28717795e-03 -6.42981152e-04 -4.15389902e-04 -4.16182699e-03 2.07894822e-03 1.31528590e-03 -1.82785829e-04 1.78370270e-04 8.12230588e-05 -4.86174757e-05 -4.05731748e-05 -2.72196659e-05 -2.90594864e-04 1.42249135e-04 -2.42768857e-05 -8.69611138e-05 -4.75732124e-04 8.11490441e-05 2.90680252e-04 -6.36480888e-05 2.35888913e-05 8.44966808e-05 2.38266875e-05 -1.44278055e-05 -2.13410893e-03 -1.87117436e-02 7.54866855e-03 -4.15415752e-03 -4.16182699e-03 -2.41602476e-02 1.33539278e-02 1.33785820e-02 -4.89632371e-04 8.27524231e-04 8.29052018e-04 9.09370158e-07 -4.93013567e-04 4.55887073e-06 4.86701205e-05 -2.42768857e-05 1.36504706e-06 1.45646342e-05 8.11490441e-05 -4.80643689e-06 -4.86844218e-05 1.14566753e-05 -1.28173764e-06 -1.44278055e-05 -4.45052276e-06 7.68963535e-07 1.06604671e-03 9.34703588e-03 -4.15415752e-03 1.30761661e-03 2.07894822e-03 1.33539278e-02 -4.09780267e-03 -6.68297344e-03 5.17584298e-04 -1.76574575e-04 -4.93013567e-04 -1.58070488e-04 8.83667499e-05 1.63301208e-05 1.74338996e-04 -8.69611138e-05 1.45646342e-05 4.94703514e-05 2.90680252e-04 -4.86844218e-05 -1.65605458e-04 4.10384288e-05 -1.44278055e-05 -4.89351126e-05 -1.26470735e-05 8.19587035e-06 1.06801486e-03 9.36429252e-03 -4.16182699e-03 2.07894822e-03 1.31528590e-03 1.33785820e-02 -6.68297344e-03 -4.12245634e-03 5.18539870e-04 -4.93013567e-04 -1.78393315e-04 1.57452132e-04 8.91124179e-05 3.70720664e-06 3.98359713e-05 -1.88449162e-05 3.39998997e-06 1.21789474e-05 6.36480888e-05 -1.14566753e-05 -4.10384288e-05 7.91745545e-06 -3.21375708e-06 -1.15118512e-05 -3.43085394e-06 2.07748951e-06 9.04416656e-05 5.74121068e-04 -1.96408637e-04 1.82448989e-04 1.82785829e-04 4.89632371e-04 -5.17584298e-04 -5.18539870e-04 -8.46265595e-05 7.62147618e-05 7.63554706e-05 5.58167229e-08 -3.02609464e-05 -1.33426066e-06 -1.43373635e-05 6.99095125e-06 -3.54161607e-07 -4.27857170e-06 -2.35888913e-05 1.28173764e-06 1.44278055e-05 -3.21375708e-06 3.17144018e-07 4.16399463e-06 1.31939320e-06 -1.96728993e-07 -1.04332897e-04 -6.62302200e-04 3.07727515e-04 -8.05650461e-05 -1.78370270e-04 -8.27524231e-04 1.76574575e-04 4.93013567e-04 7.62147618e-05 -1.00416407e-04 -8.65665973e-05 9.01613453e-06 5.00780865e-05 -4.77939364e-06 -5.13572094e-05 2.50419644e-05 -4.27857170e-06 -1.44857897e-05 -8.44966808e-05 1.44278055e-05 4.89351126e-05 -1.15118512e-05 4.16399463e-06 1.40703373e-05 3.69588729e-06 -2.40609272e-06 -1.04525518e-04 -6.63524952e-04 3.08295646e-04 -1.78370270e-04 -8.12230588e-05 -8.29052018e-04 4.93013567e-04 1.78393315e-04 7.63554706e-05 -8.65665973e-05 -1.00735753e-04 -9.18419723e-06 5.01369399e-05 -1.32193676e-06 -1.42049364e-05 7.06581405e-06 -1.32414862e-06 -3.73493356e-06 -2.38266875e-05 4.45052276e-06 1.26470735e-05 -3.43085394e-06 1.31939320e-06 3.69588729e-06 8.44913030e-07 -7.05279096e-07 -9.63083198e-08 -6.11362418e-07 3.29006363e-07 -4.88565785e-05 4.86174757e-05 -9.09370158e-07 1.58070488e-04 -1.57452132e-04 5.58167229e-08 9.01613453e-06 -9.18419723e-06 -4.90871085e-06 3.78184949e-08 8.00474108e-07 8.60153389e-06 -4.27857170e-06 2.12475122e-07 2.42614450e-06 1.44278055e-05 -7.68963535e-07 -8.19587035e-06 2.07748951e-06 -1.96728993e-07 -2.40609272e-06 -7.05279096e-07 1.07253919e-07 5.22134005e-05 3.31449151e-04 -1.78370270e-04 4.03187791e-05 4.05731748e-05 4.93013567e-04 -8.83667499e-05 -8.91124179e-05 -3.02609464e-05 5.00780865e-05 5.01369399e-05 3.78184949e-08 -2.54118772e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 598 624 650 676 +1 2 -2 169 + 9.38151096e-07 9.85545732e-06 -5.02063362e-06 1.16763047e-06 -3.01677678e-06 1.64280515e-05 -3.82061208e-06 9.87121708e-06 2.29599919e-06 -1.16712666e-06 3.01547510e-06 -7.70245670e-07 -7.01298055e-07 9.85545732e-06 1.03387001e-04 -5.28760761e-05 1.22971963e-05 -3.17719496e-05 1.72667064e-04 -4.01565498e-05 1.03751444e-04 2.42458447e-05 -1.23249049e-05 3.18435395e-05 -8.13382555e-06 -7.40573594e-06 5.02063362e-06 5.28760761e-05 -2.66231070e-05 6.29230223e-06 -1.62572593e-05 8.74393501e-05 -2.06576948e-05 5.33727543e-05 1.19505203e-05 -6.23258402e-06 1.61029669e-05 -4.18152145e-06 -3.80721758e-06 -1.16763047e-06 -1.22971963e-05 6.29230223e-06 -1.03054104e-06 3.78089155e-06 -2.06576948e-05 3.41868542e-06 -1.24127070e-05 -2.95860988e-06 1.02839968e-06 -3.80721758e-06 1.07601219e-06 6.17940387e-07 3.01677678e-06 3.17719496e-05 -1.62572593e-05 3.78089155e-06 -9.33575543e-06 5.33727543e-05 -1.24127070e-05 3.06847921e-05 7.64408419e-06 -3.80721758e-06 9.39144258e-06 -2.24508433e-06 -2.18413358e-06 -1.64280515e-05 -1.72667064e-04 8.74393501e-05 -2.06576948e-05 5.33727543e-05 -2.86348971e-04 6.76251628e-05 -1.74721392e-04 -3.94173245e-05 2.05430093e-05 -5.30764444e-05 1.37764913e-05 1.25433052e-05 3.82061208e-06 4.01565498e-05 -2.06576948e-05 3.41868542e-06 -1.24127070e-05 6.76251628e-05 -1.12983818e-05 4.06343175e-05 9.74223980e-06 -3.42714512e-06 1.25433052e-05 -3.53598037e-06 -2.05928825e-06 -9.87121708e-06 -1.03751444e-04 5.33727543e-05 -1.24127070e-05 3.06847921e-05 -1.74721392e-04 4.06343175e-05 -1.00556884e-04 -2.51707742e-05 1.25433052e-05 -3.09801277e-05 7.42009640e-06 7.20493539e-06 2.29599919e-06 2.42458447e-05 -1.19505203e-05 2.95860988e-06 -7.64408419e-06 3.94173245e-05 -9.74223980e-06 2.51707742e-05 5.11487143e-06 -2.88005699e-06 7.44112911e-06 -2.02327104e-06 -1.84216037e-06 -1.16712666e-06 -1.23249049e-05 6.23258402e-06 -1.02839968e-06 3.80721758e-06 -2.05430093e-05 3.42714512e-06 -1.25433052e-05 -2.88005699e-06 1.01541745e-06 -3.79943167e-06 1.09418562e-06 6.21546102e-07 3.01547510e-06 3.18435395e-05 -1.61029669e-05 3.80721758e-06 -9.39144258e-06 5.30764444e-05 -1.25433052e-05 3.09801277e-05 7.44112911e-06 -3.79943167e-06 9.36135759e-06 -2.27290081e-06 -2.21446883e-06 -7.70245670e-07 -8.13382555e-06 4.18152145e-06 -1.07601219e-06 2.24508433e-06 -1.37764913e-05 3.53598037e-06 -7.42009640e-06 -2.02327104e-06 1.09418562e-06 -2.27290081e-06 4.65877559e-07 5.93034907e-07 -7.01298055e-07 -7.40573594e-06 3.80721758e-06 -6.17940387e-07 2.18413358e-06 -1.25433052e-05 2.05928825e-06 -7.20493539e-06 -1.84216037e-06 6.21546102e-07 -2.21446883e-06 5.93034907e-07 3.54488950e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +1 2 -1 169 + 4.65392247e-07 4.80012061e-06 -2.54741091e-06 1.61220248e-06 -5.10916922e-07 8.12903714e-06 -5.14469566e-06 1.63038582e-06 1.17368773e-06 -1.65025534e-06 5.22976106e-07 4.69760964e-07 -3.30980516e-07 4.80012061e-06 4.94661558e-05 -2.63146656e-05 1.66539952e-05 -5.27775392e-06 8.38686265e-05 -5.30786797e-05 1.68209614e-05 1.21421163e-05 -1.70723368e-05 5.41032894e-06 4.85980393e-06 -3.42408275e-06 2.54741091e-06 2.63146656e-05 -1.38532533e-05 8.87817958e-06 -2.81354993e-06 4.43073921e-05 -2.83886138e-05 8.99652702e-06 6.29450610e-06 -9.03141129e-06 2.86211000e-06 2.60380433e-06 -1.83456815e-06 -1.61220248e-06 -1.66539952e-05 8.87817958e-06 -5.44382032e-06 1.78063624e-06 -2.83886138e-05 1.74176289e-05 -5.69371166e-06 -4.18400711e-06 5.60622571e-06 -1.83456815e-06 -1.53222210e-06 1.12440265e-06 5.10916922e-07 5.27775392e-06 -2.81354993e-06 1.78063624e-06 -3.89302872e-07 8.99652702e-06 -5.69371166e-06 1.25544811e-06 1.32593769e-06 -1.83456815e-06 3.98617045e-07 5.58884092e-07 -2.52276296e-07 -8.12903714e-06 -8.38686265e-05 4.43073921e-05 -2.83886138e-05 8.99652702e-06 -1.41458118e-04 9.06146246e-05 -2.87163341e-05 -2.01795922e-05 2.89419304e-05 -9.17187644e-06 -8.34198936e-06 5.87753380e-06 5.14469566e-06 5.30786797e-05 -2.83886138e-05 1.74176289e-05 -5.69371166e-06 9.06146246e-05 -5.56277279e-05 1.81739604e-05 1.34003408e-05 -1.79726991e-05 5.87753380e-06 4.91625544e-06 -3.60466232e-06 -1.63038582e-06 -1.68209614e-05 8.99652702e-06 -5.69371166e-06 1.25544811e-06 -2.87163341e-05 1.81739604e-05 -4.03908894e-06 -4.24665073e-06 5.87753380e-06 -1.28872042e-06 -1.78820071e-06 8.15603894e-07 1.17368773e-06 1.21421163e-05 -6.29450610e-06 4.18400711e-06 -1.32593769e-06 2.01795922e-05 -1.34003408e-05 4.24665073e-06 2.75576318e-06 -4.20150163e-06 1.33148181e-06 1.25592006e-06 -8.84886360e-07 -1.65025534e-06 -1.70723368e-05 9.03141129e-06 -5.60622571e-06 1.83456815e-06 -2.89419304e-05 1.79726991e-05 -5.87753380e-06 -4.20150163e-06 5.73914410e-06 -1.87901100e-06 -1.58817302e-06 1.16609774e-06 5.22976106e-07 5.41032894e-06 -2.86211000e-06 1.83456815e-06 -3.98617045e-07 9.17187644e-06 -5.87753380e-06 1.28872042e-06 1.33148181e-06 -1.87901100e-06 4.05379873e-07 5.80332529e-07 -2.60213840e-07 4.69760964e-07 4.85980393e-06 -2.60380433e-06 1.53222210e-06 -5.58884092e-07 8.34198936e-06 -4.91625544e-06 1.78820071e-06 1.25592006e-06 -1.58817302e-06 5.80332529e-07 4.03988503e-07 -3.42904635e-07 -3.30980516e-07 -3.42408275e-06 1.83456815e-06 -1.12440265e-06 2.52276296e-07 -5.87753380e-06 3.60466232e-06 -8.15603894e-07 -8.84886360e-07 1.16609774e-06 -2.60213840e-07 -3.42904635e-07 1.58904699e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -2 -1 169 + 1.05694937e-04 1.01846201e-03 1.02234563e-04 -4.92695537e-04 1.01630021e-04 -3.41676576e-04 1.64663026e-03 -3.39656147e-04 -6.42072371e-05 -4.82545062e-05 9.95362474e-06 1.11328264e-04 -4.79691639e-05 1.01846201e-03 9.64623719e-03 9.63021322e-04 -4.64105578e-03 9.57326709e-04 -3.19865698e-03 1.54151784e-02 -3.17974243e-03 -5.11976979e-04 -3.84772768e-04 7.93684164e-05 8.87711588e-04 -3.82497499e-04 -1.02234563e-04 -9.63021322e-04 3.55266455e-05 4.92456733e-04 -1.01580762e-04 -1.30465172e-04 -1.63361432e-03 3.36971304e-04 8.01689519e-05 -3.74037657e-05 7.71540478e-06 -1.04625144e-04 4.50809210e-05 4.92695537e-04 4.64105578e-03 4.92456733e-04 -2.23556826e-03 4.89544699e-04 -1.63361432e-03 7.40338077e-03 -1.62395430e-03 -2.43023355e-04 -2.01378030e-04 4.50809210e-05 4.21463536e-04 -2.00187226e-04 -1.01630021e-04 -9.57326709e-04 -1.01580762e-04 4.89544699e-04 3.67315693e-05 3.36971304e-04 -1.62395430e-03 -1.34462236e-04 5.01292722e-05 4.50809210e-05 7.87225786e-06 -1.21076184e-04 -3.79385035e-05 3.41676576e-04 3.19865698e-03 -1.30465172e-04 -1.63361432e-03 3.36971304e-04 4.78709131e-04 5.40861892e-03 -1.11565463e-03 -2.53943149e-04 1.37347290e-04 -2.83311030e-05 3.24768438e-04 -1.39936346e-04 -1.64663026e-03 -1.54151784e-02 -1.63361432e-03 7.40338077e-03 -1.62395430e-03 5.40861892e-03 -2.44645724e-02 5.37663625e-03 7.42108438e-04 6.20692820e-04 -1.39936346e-04 -1.28702941e-03 6.17022490e-04 3.39656147e-04 3.17974243e-03 3.36971304e-04 -1.62395430e-03 -1.34462236e-04 -1.11565463e-03 5.37663625e-03 4.91942728e-04 -1.53077287e-04 -1.39936346e-04 -2.88440567e-05 3.80215955e-04 1.39007178e-04 -6.42072371e-05 -5.11976979e-04 -8.01689519e-05 2.43023355e-04 -5.01292722e-05 2.53943149e-04 -7.42108438e-04 1.53077287e-04 -1.38041243e-05 2.64080377e-06 -5.44727773e-07 2.40405692e-05 -1.03586094e-05 -4.82545062e-05 -3.84772768e-04 3.74037657e-05 2.01378030e-04 -4.50809210e-05 -1.37347290e-04 -6.20692820e-04 1.39936346e-04 2.64080377e-06 -3.60026661e-05 7.76173436e-06 1.05107228e-05 -2.83515079e-06 9.95362474e-06 7.93684164e-05 -7.71540478e-06 -4.50809210e-05 -7.87225786e-06 2.83311030e-05 1.39936346e-04 2.88440567e-05 -5.44727773e-07 7.76173436e-06 2.46623871e-08 9.42846477e-07 7.80475496e-06 1.11328264e-04 8.87711588e-04 1.04625144e-04 -4.21463536e-04 1.21076184e-04 -3.24768438e-04 1.28702941e-03 -3.80215955e-04 2.40405692e-05 1.05107228e-05 9.42846477e-07 -4.15488683e-05 2.95237108e-06 -4.79691639e-05 -3.82497499e-04 -4.50809210e-05 2.00187226e-04 3.79385035e-05 1.39936346e-04 -6.17022490e-04 -1.39007178e-04 -1.03586094e-05 -2.83515079e-06 7.80475496e-06 2.95237108e-06 -3.59690363e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -2 0 499 + 8.33525886e-06 9.15344711e-05 -1.16616523e-09 -3.33879637e-05 3.33898711e-05 4.07619778e-09 1.16703825e-04 -1.16710492e-04 -1.31985289e-05 7.98420174e-10 -7.98465787e-10 -1.30595078e-09 -2.28605226e-05 1.24536723e-03 9.01279369e-03 1.16226758e-03 -3.28577893e-03 3.47089230e-03 -3.40965672e-03 9.63924177e-03 -1.01822949e-02 -8.39046569e-05 -5.51093043e-05 5.82140381e-05 -9.02445613e-06 -1.64573514e-04 9.15344711e-05 1.00595728e-03 -1.28147373e-08 -3.66893104e-04 3.66914064e-04 4.48219880e-08 1.28327862e-03 -1.28335193e-03 -1.45525993e-04 8.80332117e-09 -8.80382409e-09 -1.43993157e-08 -2.52058414e-04 9.01279369e-03 5.47402123e-02 7.38925408e-03 -2.08897295e-02 2.20666097e-02 -1.96097004e-02 5.54374412e-02 -5.85606615e-02 1.90007492e-03 1.24798564e-03 -1.31829433e-03 2.04364613e-04 3.72687308e-03 1.16616523e-09 1.28147373e-08 7.09211384e-06 -4.76412594e-09 4.76439811e-09 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 -2.12015265e-09 -5.24241994e-06 5.24271943e-06 -3.30600061e-09 -1.16226758e-03 -7.38925408e-03 5.75144799e-04 3.07001180e-03 -3.24296933e-03 -1.98387705e-03 -8.46630185e-03 8.94327419e-03 -9.03859080e-05 -1.82194626e-04 1.92459060e-04 -1.39761499e-05 -2.54874539e-04 3.33879637e-05 3.66893104e-04 -4.76412594e-09 -1.29307480e-04 1.36407386e-04 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.16210197e-05 3.12270601e-09 -3.30600061e-09 -5.24782727e-06 -8.94099293e-05 3.28577893e-03 2.08897295e-02 3.07001180e-03 -7.01796163e-03 9.16800958e-03 -8.46630185e-03 1.89559549e-02 -2.52830092e-02 4.23268660e-04 2.75538661e-04 -2.54874539e-04 -5.73358429e-05 8.22844098e-04 -3.33898711e-05 -3.66914064e-04 4.76439811e-09 1.36407386e-04 -1.29323065e-04 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.16239687e-05 -3.30600061e-09 3.12308373e-09 -5.23731202e-06 8.94156361e-05 -3.47089230e-03 -2.20666097e-02 -3.24296933e-03 9.16800958e-03 -8.02342476e-03 8.94327419e-03 -2.52830092e-02 2.17287632e-02 -4.47114661e-04 -2.54874539e-04 3.03490961e-04 -1.44040271e-04 -8.57981608e-04 -4.07619778e-09 -4.48219880e-08 -2.44494562e-05 1.66844065e-08 -1.66853597e-08 8.41779804e-05 -5.84346084e-08 5.84379467e-08 7.46569843e-09 1.81761239e-05 -1.81771622e-05 1.16612681e-08 3.40965672e-03 1.96097004e-02 -1.98387705e-03 -8.46630185e-03 8.94327419e-03 6.79730079e-03 2.20480791e-02 -2.32902181e-02 9.23729286e-04 5.74856584e-04 -6.07242707e-04 9.82492296e-05 1.79171141e-03 -1.16703825e-04 -1.28327862e-03 1.66844065e-08 4.53234446e-04 -4.77711192e-04 -5.84346084e-08 -1.58883758e-03 1.67311114e-03 1.82265156e-04 -1.10257515e-08 1.16612681e-08 1.81951971e-05 3.15691473e-04 -9.63924177e-03 -5.54374412e-02 -8.46630185e-03 1.89559549e-02 -2.52830092e-02 2.20480791e-02 -4.77345453e-02 6.58424181e-02 -2.56791512e-03 -1.68726892e-03 1.79171141e-03 -3.02872934e-04 -5.03870952e-03 1.16710492e-04 1.28335193e-03 -1.66853597e-08 -4.77711192e-04 4.53289026e-04 5.84379467e-08 1.67311114e-03 -1.58902874e-03 -1.82275569e-04 1.16612681e-08 -1.10270838e-08 1.81580887e-05 -3.15711584e-04 1.01822949e-02 5.85606615e-02 8.94327419e-03 -2.52830092e-02 2.17287632e-02 -2.32902181e-02 6.58424181e-02 -5.49555373e-02 2.71258566e-03 1.79171141e-03 -1.88376738e-03 2.66869372e-04 5.32548897e-03 -1.31985289e-05 -1.45525993e-04 2.12015265e-09 5.16210197e-05 -5.16239687e-05 -7.46569843e-09 -1.82265156e-04 1.82275569e-04 1.93393473e-05 -1.39493296e-09 1.39501265e-09 1.89611125e-09 3.31912158e-05 -8.39046569e-05 1.90007492e-03 9.03859080e-05 -4.23268660e-04 4.47114661e-04 -9.23729286e-04 2.56791512e-03 -2.71258566e-03 -3.85070245e-04 -4.40407590e-04 4.65219160e-04 -4.61108159e-05 -8.40894886e-04 7.98420174e-10 8.80332117e-09 5.24241994e-06 -3.12270601e-09 3.30600061e-09 -1.81761239e-05 1.10257515e-08 -1.16612681e-08 -1.39493296e-09 -3.71979589e-06 3.89640841e-06 -1.36215115e-10 -2.14391725e-09 -5.51093043e-05 1.24798564e-03 1.82194626e-04 -2.75538661e-04 2.54874539e-04 -5.74856584e-04 1.68726892e-03 -1.79171141e-03 -4.40407590e-04 1.59491888e-05 -5.00815429e-06 -1.33371658e-04 -6.63126188e-04 -7.98465787e-10 -8.80382409e-09 -5.24271943e-06 3.30600061e-09 -3.12308373e-09 1.81771622e-05 -1.16612681e-08 1.10270838e-08 1.39501265e-09 3.89640841e-06 -3.72024107e-06 -1.35962382e-10 2.14405527e-09 5.82140381e-05 -1.31829433e-03 -1.92459060e-04 2.54874539e-04 -3.03490961e-04 6.07242707e-04 -1.79171141e-03 1.88376738e-03 4.65219160e-04 -5.00815429e-06 1.64984372e-05 -5.28411653e-05 7.11108302e-04 -1.30595078e-09 -1.43993157e-08 5.24782727e-06 5.23731202e-06 -1.81951971e-05 -1.81580887e-05 1.89611125e-09 -1.36215115e-10 -1.35962382e-10 -7.61642683e-06 3.72934049e-09 -9.02445613e-06 2.04364613e-04 1.39761499e-05 5.73358429e-05 1.44040271e-04 -9.82492296e-05 3.02872934e-04 -2.66869372e-04 -4.61108159e-05 -1.33371658e-04 -5.28411653e-05 5.20444142e-04 -1.24452527e-04 -2.28605226e-05 -2.52058414e-04 3.30600061e-09 8.94099293e-05 -8.94156361e-05 -1.16612681e-08 -3.15691473e-04 3.15711584e-04 3.31912158e-05 -2.14391725e-09 2.14405527e-09 3.72934049e-09 5.76652620e-05 -1.64573514e-04 3.72687308e-03 2.54874539e-04 -8.22844098e-04 8.57981608e-04 -1.79171141e-03 5.03870952e-03 -5.32548897e-03 -8.40894886e-04 -6.63126188e-04 7.11108302e-04 -1.24452527e-04 -1.74229644e-03 8.10007911e-06 8.89729151e-05 1.13385085e-09 -3.24945913e-05 3.24927368e-05 -3.96246025e-09 1.13558610e-04 -1.13552129e-04 -1.28973321e-05 -7.79525178e-10 7.79480688e-10 1.27497202e-09 -2.23388344e-05 8.89729151e-05 9.77951145e-04 1.24640330e-08 -3.57201882e-04 3.57181495e-04 -4.35824782e-08 1.24901332e-03 -1.24894204e-03 -1.42281146e-04 -8.59958750e-09 8.59909670e-09 1.40652718e-08 -2.46438174e-04 -1.13385085e-09 -1.24640330e-08 6.84375556e-06 4.63803227e-09 -4.63776757e-09 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 2.07009141e-09 -5.07478398e-06 5.07449435e-06 3.23134929e-09 3.24945913e-05 3.57201882e-04 4.63803227e-09 -1.26075811e-04 1.32911980e-04 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 -5.05361622e-05 -3.05445661e-09 3.23134929e-09 -5.06949868e-06 -8.75314902e-05 -3.24927368e-05 -3.57181495e-04 -4.63776757e-09 1.32911980e-04 -1.26060639e-04 1.62395923e-08 -4.65404170e-04 4.41797865e-04 5.05332780e-05 3.23134929e-09 -3.05408776e-09 -5.07977958e-06 8.75259153e-05 3.96246025e-09 4.35824782e-08 -2.35797429e-05 -1.62405192e-08 1.62395923e-08 8.11322711e-05 5.68674213e-08 -5.68641757e-08 -7.28839261e-09 1.75845446e-05 -1.75835410e-05 -1.13966928e-08 -1.13558610e-04 -1.24901332e-03 -1.62405192e-08 4.41850990e-04 -4.65404170e-04 5.68674213e-08 -1.54860907e-03 1.62964833e-03 1.78417889e-04 1.07837565e-08 -1.13966928e-08 1.75659038e-05 3.09029852e-04 1.13552129e-04 1.24894204e-03 1.62395923e-08 -4.65404170e-04 4.41797865e-04 -5.68641757e-08 1.62964833e-03 -1.54842305e-03 -1.78407706e-04 -1.13966928e-08 1.07824556e-08 1.76021816e-05 -3.09010207e-04 -1.28973321e-05 -1.42281146e-04 -2.07009141e-09 5.05361622e-05 -5.05332780e-05 7.28839261e-09 -1.78417889e-04 1.78407706e-04 1.90386979e-05 1.36919555e-09 -1.36911740e-09 -1.86534278e-09 3.26827434e-05 -7.79525178e-10 -8.59958750e-09 5.07478398e-06 3.05445661e-09 -3.23134929e-09 -1.75845446e-05 -1.07837565e-08 1.13966928e-08 1.36919555e-09 -3.61501287e-06 3.78410410e-06 1.31920456e-10 2.10742724e-09 7.79480688e-10 8.59909670e-09 -5.07449435e-06 -3.23134929e-09 3.05408776e-09 1.75835410e-05 1.13966928e-08 -1.07824556e-08 -1.36911740e-09 3.78410410e-06 -3.61458092e-06 1.32168544e-10 -2.10729189e-09 1.27497202e-09 1.40652718e-08 5.06949868e-06 5.07977958e-06 -1.75659038e-05 -1.76021816e-05 -1.86534278e-09 1.31920456e-10 1.32168544e-10 -7.39890095e-06 -3.66281821e-09 -2.23388344e-05 -2.46438174e-04 -3.23134929e-09 8.75314902e-05 -8.75259153e-05 1.13966928e-08 -3.09029852e-04 3.09010207e-04 3.26827434e-05 2.10742724e-09 -2.10729189e-09 -3.66281821e-09 5.67774792e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 16 17 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 77 103 129 154 180 206 232 258 284 308 334 347 360 372 385 398 410 423 436 449 462 475 486 499 +2 -2 1 169 + 6.79341206e-05 6.79806554e-04 6.61652308e-05 -5.52358974e-05 3.29405918e-04 -2.24748589e-04 1.87624072e-04 -1.11891872e-03 -5.10290678e-05 -6.28421786e-06 3.74766891e-05 -9.06664166e-05 -3.12861986e-05 6.79806554e-04 6.74774724e-03 6.52265469e-04 -5.44522676e-04 3.24732647e-03 -2.21178901e-03 1.84644033e-03 -1.10114690e-02 -4.61299386e-04 -5.68089124e-05 3.38786782e-04 -8.19618388e-04 -2.82825159e-04 -6.61652308e-05 -6.52265469e-04 1.83516750e-05 5.55702059e-05 -3.31399607e-04 -6.74700968e-05 -1.87983247e-04 1.12106070e-03 6.38493414e-05 -3.70057052e-06 2.20687974e-05 8.91627445e-05 3.07673275e-05 5.52358974e-05 5.44522676e-04 5.55702059e-05 3.85263783e-05 2.76658215e-04 -1.87983247e-04 -1.35717212e-04 -9.35881177e-04 -3.61889086e-05 6.67643041e-06 3.07673275e-05 -8.43151927e-05 3.32388425e-05 -3.29405918e-04 -3.24732647e-03 -3.31399607e-04 2.76658215e-04 -1.56496718e-03 1.12106070e-03 -9.35881177e-04 5.28859104e-03 2.15816909e-04 3.07673275e-05 -1.71649059e-04 3.84975897e-04 1.43295650e-04 2.24748589e-04 2.21178901e-03 -6.74700968e-05 -1.87983247e-04 1.12106070e-03 2.47709311e-04 6.35954842e-04 -3.79259319e-03 -2.11959358e-04 1.35999106e-05 -8.11047028e-05 -2.93229975e-04 -1.01184668e-04 -1.87624072e-04 -1.84644033e-03 -1.87983247e-04 -1.35717212e-04 -9.35881177e-04 6.35954842e-04 4.78592030e-04 3.16612344e-03 1.18189139e-04 -2.36695508e-05 -1.01184668e-04 2.78717632e-04 -1.17839687e-04 1.11891872e-03 1.10114690e-02 1.12106070e-03 -9.35881177e-04 5.28859104e-03 -3.79259319e-03 3.16612344e-03 -1.78720597e-02 -7.04835148e-04 -1.01184668e-04 5.62790400e-04 -1.25754527e-03 -4.69827316e-04 -5.10290678e-05 -4.61299386e-04 -6.38493414e-05 3.61889086e-05 -2.15816909e-04 2.11959358e-04 -1.18189139e-04 7.04835148e-04 7.23823259e-06 3.03220813e-06 -1.80829379e-05 1.39773625e-05 4.82315897e-06 -6.28421786e-06 -5.68089124e-05 3.70057052e-06 -6.67643041e-06 -3.07673275e-05 -1.35999106e-05 2.36695508e-05 1.01184668e-04 3.03220813e-06 9.26813907e-08 4.20922881e-06 5.35675534e-06 -5.66718176e-06 3.74766891e-05 3.38786782e-04 -2.20687974e-05 -3.07673275e-05 1.71649059e-04 8.11047028e-05 1.01184668e-04 -5.62790400e-04 -1.80829379e-05 4.20922881e-06 -2.43037432e-05 -1.77365596e-05 -7.38058940e-06 -9.06664166e-05 -8.19618388e-04 -8.91627445e-05 8.43151927e-05 -3.84975897e-04 2.93229975e-04 -2.78717632e-04 1.25754527e-03 1.39773625e-05 5.35675534e-06 -1.77365596e-05 2.59582351e-05 2.07377928e-05 -3.12861986e-05 -2.82825159e-04 -3.07673275e-05 -3.32388425e-05 -1.43295650e-04 1.01184668e-04 1.17839687e-04 4.69827316e-04 4.82315897e-06 -5.66718176e-06 -7.38058940e-06 2.07377928e-05 -2.69832582e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -1 -2 169 + 1.05965214e-04 1.02082766e-03 -1.01694893e-04 -4.93935496e-04 -1.02300956e-04 3.39838113e-04 1.65060509e-03 3.41863419e-04 -6.44207984e-05 4.79542328e-05 9.93199291e-06 1.11462065e-04 4.82400218e-05 1.02082766e-03 9.66576073e-03 -9.57664026e-04 -4.65140621e-03 -9.63371339e-04 3.18043370e-03 1.54474729e-02 3.19938787e-03 -5.13214149e-04 3.82031757e-04 7.91241247e-05 8.87972675e-04 3.84308521e-04 1.01694893e-04 9.57664026e-04 3.72403567e-05 -4.89836406e-04 -1.01451977e-04 -1.36191874e-04 1.62471832e-03 3.36501907e-04 -7.97639146e-05 -3.82202747e-05 -7.91595393e-06 1.03900325e-04 4.49673526e-05 4.93935496e-04 4.65140621e-03 -4.89836406e-04 -2.24106051e-03 -4.92755645e-04 1.62471832e-03 7.42061098e-03 1.63440102e-03 -2.43792224e-04 2.00041617e-04 4.49673526e-05 4.21726129e-04 2.01233789e-04 1.02300956e-04 9.63371339e-04 -1.01451977e-04 -4.92755645e-04 3.60347082e-05 3.36501907e-04 1.63440102e-03 -1.32192908e-04 -5.04927823e-05 4.49673526e-05 -7.75903359e-06 1.21693679e-04 -3.76858858e-05 -3.39838113e-04 -3.18043370e-03 -1.36191874e-04 1.62471832e-03 3.36501907e-04 4.97824822e-04 -5.37840882e-03 -1.11394376e-03 2.52565448e-04 1.39941874e-04 2.89839211e-05 -3.22378687e-04 -1.39523298e-04 -1.65060509e-03 -1.54474729e-02 1.62471832e-03 7.42061098e-03 1.63440102e-03 -5.37840882e-03 -2.45179424e-02 -5.41046209e-03 7.44102630e-04 -6.16286541e-04 -1.39523298e-04 -1.28716548e-03 -6.19959374e-04 -3.41863419e-04 -3.19938787e-03 3.36501907e-04 1.63440102e-03 -1.32192908e-04 -1.11394376e-03 -5.41046209e-03 4.84586790e-04 1.54114071e-04 -1.39523298e-04 2.84708330e-05 -3.82009894e-04 1.38283788e-04 -6.44207984e-05 -5.13214149e-04 7.97639146e-05 2.43792224e-04 5.04927823e-05 -2.52565448e-04 -7.44102630e-04 -1.54114071e-04 -1.39503959e-05 -2.48704087e-06 -5.15100978e-07 2.43374034e-05 1.05330623e-05 4.79542328e-05 3.82031757e-04 3.82202747e-05 -2.00041617e-04 -4.49673526e-05 -1.39941874e-04 6.16286541e-04 1.39523298e-04 -2.48704087e-06 -3.60440215e-05 -7.80819344e-06 -1.06512274e-05 -2.92144268e-06 9.93199291e-06 7.91241247e-05 7.91595393e-06 -4.49673526e-05 7.75903359e-06 -2.89839211e-05 1.39523298e-04 -2.84708330e-05 -5.15100978e-07 -7.80819344e-06 3.87715323e-08 8.92876332e-07 -7.76529218e-06 1.11462065e-04 8.87972675e-04 -1.03900325e-04 -4.21726129e-04 -1.21693679e-04 3.22378687e-04 1.28716548e-03 3.82009894e-04 2.43374034e-05 -1.06512274e-05 8.92876332e-07 -4.20669538e-05 -3.18898723e-06 4.82400218e-05 3.84308521e-04 -4.49673526e-05 -2.01233789e-04 3.76858858e-05 1.39523298e-04 6.19959374e-04 -1.38283788e-04 1.05330623e-05 -2.92144268e-06 -7.76529218e-06 -3.18898723e-06 -3.60787397e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 -1 -1 507 + 1.71607917e-04 1.57739011e-03 -3.28114677e-04 -6.55862237e-04 3.27807936e-04 1.07390369e-03 2.14660583e-03 -1.07289974e-03 -4.52942728e-05 1.04765636e-04 -5.23631411e-05 7.85499319e-05 -1.04667695e-04 1.94069976e-02 8.71601541e-02 -1.75692252e-02 -5.00581778e-02 1.76022057e-02 4.14508190e-02 1.18101535e-01 -4.15286295e-02 3.10823884e-03 -4.30769562e-03 1.51473641e-03 -5.37794607e-03 4.31578191e-03 1.57739011e-03 1.40396814e-02 -2.91449415e-03 -5.82572737e-03 2.91176951e-03 9.40646010e-03 1.88023956e-02 -9.39766638e-03 -2.86290008e-04 6.62188680e-04 -3.30969969e-04 4.96487949e-04 -6.61569627e-04 8.71601541e-02 1.76621156e-01 -4.97545082e-02 -1.41760379e-01 4.98479061e-02 6.47155763e-02 1.84387404e-01 -6.48370588e-02 2.12014515e-02 -2.93830058e-02 1.03320923e-02 -3.66832372e-02 2.94381628e-02 3.28114677e-04 2.91449415e-03 -4.16919525e-04 -1.29389719e-03 6.46705581e-04 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -1.33780351e-04 8.07745132e-05 -4.03720857e-05 1.33948236e-04 -1.78485871e-04 1.75692252e-02 4.97545082e-02 7.99247736e-03 -4.12912335e-02 1.45194415e-02 -2.27031984e-02 7.56650641e-02 -2.66064823e-02 8.68434876e-03 2.74194000e-04 -9.64161981e-05 -9.49857284e-03 7.62256972e-03 6.55862237e-04 5.82572737e-03 -1.29389719e-03 -2.35595549e-03 1.29268758e-03 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -9.78807044e-05 3.08139304e-04 -1.78485871e-04 1.69868227e-04 -3.07851237e-04 5.00581778e-02 1.41760379e-01 -4.12912335e-02 -9.51621301e-02 4.13687443e-02 7.56650641e-02 1.66324819e-01 -7.58071006e-02 1.10905588e-02 -1.89109449e-02 7.62256972e-03 -1.91808204e-02 1.89464440e-02 -3.27807936e-04 -2.91176951e-03 6.46705581e-04 1.29268758e-03 -4.15709803e-04 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 4.89219685e-05 -1.78485871e-04 4.02428327e-05 -1.82743816e-04 8.04406389e-05 -1.76022057e-02 -4.98479061e-02 1.45194415e-02 4.13687443e-02 7.93801738e-03 -2.66064823e-02 -7.58071006e-02 -2.26034019e-02 -3.89982829e-03 7.62256972e-03 8.62007958e-05 1.22881595e-02 2.45603020e-04 -1.07390369e-03 -9.40646010e-03 1.31941097e-03 4.18190984e-03 -2.09016949e-03 -4.13261909e-03 -1.34369406e-02 6.71594663e-03 3.95888562e-04 -1.76018488e-04 8.79761846e-05 -3.69363699e-04 4.92176709e-04 -4.14508190e-02 -6.47155763e-02 -2.27031984e-02 7.56650641e-02 -2.66064823e-02 5.67093740e-02 -8.75280199e-02 3.07779124e-02 -2.55055437e-02 -7.59686824e-03 2.67132451e-03 2.48473639e-02 -1.99399180e-02 -2.14660583e-03 -1.88023956e-02 4.18190984e-03 7.58642632e-03 -4.17800035e-03 -1.34369406e-02 -2.42692352e-02 1.34243790e-02 2.42934386e-04 -8.26325317e-04 4.92176709e-04 -4.21695362e-04 8.25552819e-04 -1.18101535e-01 -1.84387404e-01 7.56650641e-02 1.66324819e-01 -7.58071006e-02 -8.75280199e-02 -1.61954923e-01 8.76923253e-02 -2.50399074e-02 4.70546584e-02 -1.99399180e-02 4.32956006e-02 -4.71429883e-02 1.07289974e-03 9.39766638e-03 -2.09016949e-03 -4.17800035e-03 1.31550111e-03 6.71594663e-03 1.34243790e-02 -4.12005630e-03 -1.21421566e-04 4.92176709e-04 -8.75979182e-05 5.27268313e-04 -1.75097826e-04 4.15286295e-02 6.48370588e-02 -2.66064823e-02 -7.58071006e-02 -2.26034019e-02 3.07779124e-02 8.76923253e-02 5.65939312e-02 8.80490704e-03 -1.99399180e-02 -2.64006941e-03 -3.45637664e-02 -7.52207695e-03 -4.52942728e-05 -2.86290008e-04 1.33780351e-04 9.78807044e-05 -4.89219685e-05 -3.95888562e-04 -2.42934386e-04 1.21421566e-04 -2.49041449e-05 3.09325422e-05 -1.54604614e-05 3.48716743e-05 -4.64664662e-05 3.10823884e-03 2.12014515e-02 -8.68434876e-03 -1.10905588e-02 3.89982829e-03 2.55055437e-02 2.50399074e-02 -8.80490704e-03 2.39568271e-03 -3.73280064e-03 1.31258323e-03 -5.02829481e-03 4.03518807e-03 1.04765636e-04 6.62188680e-04 -8.07745132e-05 -3.08139304e-04 1.78485871e-04 1.76018488e-04 8.26325317e-04 -4.92176709e-04 3.09325422e-05 -1.01831063e-04 5.07480848e-05 -7.16420931e-05 8.79741411e-05 -4.30769562e-03 -2.93830058e-02 -2.74194000e-04 1.89109449e-02 -7.62256972e-03 7.59686824e-03 -4.70546584e-02 1.99399180e-02 -3.73280064e-03 5.22424450e-03 -2.03753429e-03 6.79883432e-03 -5.37929462e-03 -5.23631411e-05 -3.30969969e-04 4.03720857e-05 1.78485871e-04 -4.02428327e-05 -8.79761846e-05 -4.92176709e-04 8.75979182e-05 -1.54604614e-05 5.07480848e-05 -2.56612647e-05 2.68173507e-05 -5.07174502e-05 1.51473641e-03 1.03320923e-02 9.64161981e-05 -7.62256972e-03 -8.62007958e-05 -2.67132451e-03 1.99399180e-02 2.64006941e-03 1.31258323e-03 -2.03753429e-03 1.46254107e-04 -2.27099842e-03 2.04071944e-03 7.85499319e-05 4.96487949e-04 -1.33948236e-04 -1.69868227e-04 1.82743816e-04 3.69363699e-04 4.21695362e-04 -5.27268313e-04 3.48716743e-05 -7.16420931e-05 2.68173507e-05 -6.52373474e-05 6.25899070e-05 -5.37794607e-03 -3.66832372e-02 9.49857284e-03 1.91808204e-02 -1.22881595e-02 -2.48473639e-02 -4.32956006e-02 3.45637664e-02 -5.02829481e-03 6.79883432e-03 -2.27099842e-03 8.19049685e-03 -6.64105902e-03 -1.04667695e-04 -6.61569627e-04 1.78485871e-04 3.07851237e-04 -8.04406389e-05 -4.92176709e-04 -8.25552819e-04 1.75097826e-04 -4.64664662e-05 8.79741411e-05 -5.07174502e-05 6.25899070e-05 -1.01666499e-04 4.31578191e-03 2.94381628e-02 -7.62256972e-03 -1.89464440e-02 -2.45603020e-04 1.99399180e-02 4.71429883e-02 7.52207695e-03 4.03518807e-03 -5.37929462e-03 2.04071944e-03 -6.64105902e-03 5.24442133e-03 1.69088388e-04 1.55659037e-03 -3.23331355e-04 -6.47024526e-04 3.23633666e-04 1.05896638e-03 2.11911776e-03 -1.05995650e-03 -4.51193676e-05 1.04036868e-04 -5.20379546e-05 7.80517727e-05 -1.04134141e-04 1.55659037e-03 1.38831389e-02 -2.87752923e-03 -5.75827848e-03 2.88021968e-03 9.29617039e-03 1.86027434e-02 -9.30486221e-03 -2.87890442e-04 6.63821800e-04 -3.32035455e-04 4.98020264e-04 -6.64442466e-04 3.23331355e-04 2.87752923e-03 -4.11137569e-04 -1.27669244e-03 6.38585770e-04 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -1.33193756e-04 8.10798203e-05 -4.05551234e-05 1.33594706e-04 -1.78237719e-04 6.47024526e-04 5.75827848e-03 -1.27669244e-03 -2.32796184e-03 1.27788613e-03 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -9.85425184e-05 3.07873132e-04 -1.78237719e-04 1.70347504e-04 -3.08160990e-04 -3.23633666e-04 -2.88021968e-03 6.38585770e-04 1.27788613e-03 -4.12331153e-04 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 4.92897491e-05 -1.78237719e-04 4.06837196e-05 -1.82233517e-04 8.14129653e-05 -1.05896638e-03 -9.29617039e-03 1.30251061e-03 4.12986990e-03 -2.06570985e-03 -4.08506578e-03 -1.32831996e-02 6.64409216e-03 3.95359218e-04 -1.79348778e-04 8.97080408e-05 -3.70284810e-04 4.94021970e-04 -2.11911776e-03 -1.86027434e-02 4.12986990e-03 7.50309160e-03 -4.13373129e-03 -1.32831996e-02 -2.40284433e-02 1.32956192e-02 2.46930191e-04 -8.30655294e-04 4.94021970e-04 -4.26772258e-04 8.31431947e-04 1.05995650e-03 9.30486221e-03 -2.06570985e-03 -4.13373129e-03 1.30637164e-03 6.64409216e-03 1.32956192e-02 -4.09748428e-03 -1.23511428e-04 4.94021970e-04 -9.00856744e-05 5.27795838e-04 -1.80272157e-04 -4.51193676e-05 -2.87890442e-04 1.33193756e-04 9.85425184e-05 -4.92897491e-05 -3.95359218e-04 -2.46930191e-04 1.23511428e-04 -2.47490182e-05 2.94546993e-05 -1.47328764e-05 3.40874454e-05 -4.54783628e-05 1.04036868e-04 6.63821800e-04 -8.10798203e-05 -3.07873132e-04 1.78237719e-04 1.79348778e-04 8.30655294e-04 -4.94021970e-04 2.94546993e-05 -9.90973788e-05 4.93505482e-05 -6.93955351e-05 8.48903546e-05 -5.20379546e-05 -3.32035455e-04 4.05551234e-05 1.78237719e-04 -4.06837196e-05 -8.97080408e-05 -4.94021970e-04 9.00856744e-05 -1.47328764e-05 4.93505482e-05 -2.51178417e-05 2.54805866e-05 -4.93794285e-05 7.80517727e-05 4.98020264e-04 -1.33594706e-04 -1.70347504e-04 1.82233517e-04 3.70284810e-04 4.26772258e-04 -5.27795838e-04 3.40874454e-05 -6.93955351e-05 2.54805866e-05 -6.40462852e-05 6.02250529e-05 -1.04134141e-04 -6.64442466e-04 1.78237719e-04 3.08160990e-04 -8.14129653e-05 -4.94021970e-04 -8.31431947e-04 1.80272157e-04 -4.54783628e-05 8.48903546e-05 -4.93794285e-05 6.02250529e-05 -9.92560478e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +2 -1 0 507 + 1.71555307e-04 1.57695618e-03 -3.28015751e-04 -3.27671645e-04 6.55701953e-04 1.07359504e-03 1.07246878e-03 -2.14611147e-03 -4.52904035e-05 5.23486899e-05 -1.04754679e-04 -7.85551705e-05 -1.04644786e-04 1.56239965e-02 7.38778744e-02 -1.41842934e-02 -1.19340952e-02 4.26906661e-02 3.43176363e-02 2.88734819e-02 -1.03286269e-01 2.28822325e-03 -8.58733936e-04 3.07186452e-03 4.26146465e-03 2.58454352e-03 1.57695618e-03 1.40364205e-02 -2.91373172e-03 -2.91067506e-03 5.82453608e-03 9.40418907e-03 9.39432358e-03 -1.87989300e-02 -2.86322174e-04 3.30944075e-04 -6.62250393e-04 -4.96619271e-04 -6.61555658e-04 7.38778744e-02 1.66128611e-01 -4.36615885e-02 -3.67351083e-02 1.31408893e-01 6.10770168e-02 5.13877507e-02 -1.83824351e-01 2.06380637e-02 -7.74513834e-03 2.77059223e-02 3.84352264e-02 2.33106511e-02 3.28015751e-04 2.91373172e-03 -4.16802569e-04 -6.46441005e-04 1.29358959e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -1.33768209e-04 4.03704402e-05 -8.07850690e-05 -1.33967991e-04 -1.78461223e-04 1.41842934e-02 4.36615885e-02 6.46524765e-03 -9.92604055e-03 3.55074494e-02 -1.87964941e-02 1.89835159e-02 -6.79078659e-02 6.83153404e-03 8.23690569e-06 -2.94650733e-05 8.38364846e-03 5.08461436e-03 3.27671645e-04 2.91067506e-03 -6.46441005e-04 -4.15445557e-04 1.29223255e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -4.89219038e-05 4.02254279e-05 -1.78461223e-04 -1.82732469e-04 -8.04104422e-05 1.19340952e-02 3.67351083e-02 -9.92604055e-03 9.91149142e-03 2.98745429e-02 1.89835159e-02 -2.53874226e-02 -5.71349530e-02 2.80738314e-03 5.96336891e-04 5.08461436e-03 8.75130344e-03 -1.79480347e-03 -6.55701953e-04 -5.82453608e-03 1.29358959e-03 1.29223255e-03 -2.35556224e-03 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 9.78973564e-05 -1.78461223e-04 3.08161409e-04 1.69937822e-04 3.07838132e-04 -4.26906661e-02 -1.31408893e-01 3.55074494e-02 2.98745429e-02 -8.86044030e-02 -6.79078659e-02 -5.71349530e-02 1.63023862e-01 -1.00425758e-02 5.08461436e-03 -1.61709600e-02 -1.91595899e-02 -1.36055968e-02 -1.07359504e-03 -9.40418907e-03 1.31907052e-03 2.08935189e-03 -4.18099073e-03 -4.13166701e-03 -6.71346123e-03 1.34342709e-02 3.95878040e-04 -8.80008593e-05 1.76098042e-04 3.69458003e-04 4.92161796e-04 -3.43176363e-02 -6.10770168e-02 -1.87964941e-02 1.89835159e-02 -6.79078659e-02 4.94697065e-02 -2.39209963e-02 8.55702293e-02 -2.20188804e-02 -1.38859484e-03 4.96728388e-03 -2.47237307e-02 -1.49947408e-02 -1.07246878e-03 -9.39432358e-03 2.08935189e-03 1.31468454e-03 -4.17660465e-03 -6.71346123e-03 -4.11757408e-03 1.34201776e-02 1.21445868e-04 -8.75764397e-05 4.92161796e-04 5.27274139e-04 1.75064894e-04 -2.88734819e-02 -5.13877507e-02 1.89835159e-02 -2.53874226e-02 -5.71349530e-02 -2.39209963e-02 5.77748896e-02 7.19953567e-02 -7.49140933e-03 -3.38016865e-03 -1.49947408e-02 -2.71722645e-02 1.01733408e-02 2.14611147e-03 1.87989300e-02 -4.18099073e-03 -4.17660465e-03 7.58530542e-03 1.34342709e-02 1.34201776e-02 -2.42662003e-02 -2.43024669e-04 4.92161796e-04 -8.26492446e-04 -4.21964222e-04 -8.25625413e-04 1.03286269e-01 1.83824351e-01 -6.79078659e-02 -5.71349530e-02 1.63023862e-01 8.55702293e-02 7.19953567e-02 -1.79640859e-01 2.67982824e-02 -1.49947408e-02 4.60672927e-02 5.16220436e-02 3.87591712e-02 -4.52904035e-05 -2.86322174e-04 1.33768209e-04 4.89219038e-05 -9.78973564e-05 -3.95878040e-04 -1.21445868e-04 2.43024669e-04 -2.49008625e-05 1.54428858e-05 -3.09026749e-05 -3.48621147e-05 -4.64404637e-05 2.28822325e-03 2.06380637e-02 -6.83153404e-03 -2.80738314e-03 1.00425758e-02 2.20188804e-02 7.49140933e-03 -2.67982824e-02 1.78835262e-03 -4.36083159e-04 1.55995743e-03 3.65184025e-03 2.21481131e-03 5.23486899e-05 3.30944075e-04 -4.03704402e-05 -4.02254279e-05 1.78461223e-04 8.80008593e-05 8.75764397e-05 -4.92161796e-04 1.54428858e-05 -2.56424764e-05 5.07133837e-05 2.67916323e-05 5.06790535e-05 -8.58733936e-04 -7.74513834e-03 -8.23690569e-06 -5.96336891e-04 -5.08461436e-03 1.38859484e-03 3.38016865e-03 1.49947408e-02 -4.36083159e-04 -3.14657535e-05 -1.24054453e-03 -8.25159042e-04 -1.22461693e-03 -1.04754679e-04 -6.62250393e-04 8.07850690e-05 1.78461223e-04 -3.08161409e-04 -1.76098042e-04 -4.92161796e-04 8.26492446e-04 -3.09026749e-05 5.07133837e-05 -1.01781931e-04 -7.16103976e-05 -8.79029123e-05 3.07186452e-03 2.77059223e-02 2.94650733e-05 -5.08461436e-03 1.61709600e-02 -4.96728388e-03 1.49947408e-02 -4.60672927e-02 1.55995743e-03 -1.24054453e-03 4.05942041e-03 4.19013176e-03 2.33884183e-03 -7.85551705e-05 -4.96619271e-04 1.33967991e-04 1.82732469e-04 -1.69937822e-04 -3.69458003e-04 -5.27274139e-04 4.21964222e-04 -3.48621147e-05 2.67916323e-05 -7.16103976e-05 -6.52311227e-05 -6.25458112e-05 4.26146465e-03 3.84352264e-02 -8.38364846e-03 -8.75130344e-03 1.91595899e-02 2.47237307e-02 2.71722645e-02 -5.16220436e-02 3.65184025e-03 -8.25159042e-04 4.19013176e-03 6.37903682e-03 3.00445070e-03 -1.04644786e-04 -6.61555658e-04 1.78461223e-04 8.04104422e-05 -3.07838132e-04 -4.92161796e-04 -1.75064894e-04 8.25625413e-04 -4.64404637e-05 5.06790535e-05 -8.79029123e-05 -6.25458112e-05 -1.01597405e-04 2.58454352e-03 2.33106511e-02 -5.08461436e-03 1.79480347e-03 1.36055968e-02 1.49947408e-02 -1.01733408e-02 -3.87591712e-02 2.21481131e-03 -1.22461693e-03 2.33884183e-03 3.00445070e-03 3.24739280e-03 1.69140261e-04 1.55701900e-03 -3.23428906e-04 -3.23768247e-04 6.47182798e-04 1.05927099e-03 1.06038238e-03 -2.11960636e-03 -4.51232749e-05 5.20523543e-05 -1.04047845e-04 -7.80466354e-05 -1.04157012e-04 1.55701900e-03 1.38863696e-02 -2.87828294e-03 -2.88130283e-03 5.75945802e-03 9.29841885e-03 9.30817474e-03 -1.86061809e-02 -2.87859563e-04 3.32062954e-04 -6.63763150e-04 -4.97890953e-04 -6.64459569e-04 3.23428906e-04 2.87828294e-03 -4.11252946e-04 -6.38847089e-04 1.27699628e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -1.33206059e-04 4.05569994e-05 -8.10696930e-05 -1.33575327e-04 -1.78262737e-04 3.23768247e-04 2.88130283e-03 -6.38847089e-04 -4.12592798e-04 1.27833610e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -4.92900665e-05 4.07013328e-05 -1.78262737e-04 -1.82245085e-04 -8.14435629e-05 -6.47182798e-04 -5.75945802e-03 1.27699628e-03 1.27833610e-03 -2.32835114e-03 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 9.85262868e-05 -1.78262737e-04 3.07851986e-04 1.70278665e-04 3.08174984e-04 -1.05927099e-03 -9.29841885e-03 1.30284695e-03 2.06651825e-03 -4.13077896e-03 -4.08600834e-03 -6.64655287e-03 1.32858448e-02 3.95370826e-04 -8.96847052e-05 1.79271436e-04 3.70192191e-04 4.94039393e-04 -1.06038238e-03 -9.30817474e-03 2.06651825e-03 1.30718106e-03 -4.13511297e-03 -6.64655287e-03 -4.09994813e-03 1.32997843e-02 1.23488297e-04 -9.01085203e-05 4.94039393e-04 5.27791545e-04 1.80307583e-04 2.11960636e-03 1.86061809e-02 -4.13077896e-03 -4.13511297e-03 7.50420321e-03 1.32858448e-02 1.32997843e-02 -2.40314612e-02 -2.46841691e-04 4.94039393e-04 -8.30492903e-04 -4.26506203e-04 -8.31364255e-04 -4.51232749e-05 -2.87859563e-04 1.33206059e-04 4.92900665e-05 -9.85262868e-05 -3.95370826e-04 -1.23488297e-04 2.46841691e-04 -2.47524705e-05 1.47501223e-05 -2.94841310e-05 -3.40970488e-05 -4.55041615e-05 5.20523543e-05 3.32062954e-04 -4.05569994e-05 -4.07013328e-05 1.78262737e-04 8.96847052e-05 9.01085203e-05 -4.94039393e-04 1.47501223e-05 -2.51363211e-05 4.93846671e-05 2.55058314e-05 4.94171207e-05 -1.04047845e-04 -6.63763150e-04 8.10696930e-05 1.78262737e-04 -3.07851986e-04 -1.79271436e-04 -4.94039393e-04 8.30492903e-04 -2.94841310e-05 4.93846671e-05 -9.91458775e-05 -6.94270663e-05 -8.49604000e-05 -7.80466354e-05 -4.97890953e-04 1.33575327e-04 1.82245085e-04 -1.70278665e-04 -3.70192191e-04 -5.27791545e-04 4.26506203e-04 -3.40970488e-05 2.55058314e-05 -6.94270663e-05 -6.40529973e-05 -6.02686003e-05 -1.04157012e-04 -6.64459569e-04 1.78262737e-04 8.14435629e-05 -3.08174984e-04 -4.94039393e-04 -1.80307583e-04 8.31364255e-04 -4.55041615e-05 4.94171207e-05 -8.49604000e-05 -6.02686003e-05 -9.93240647e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +2 -1 1 169 + 5.43332578e-05 5.52988907e-04 -5.26875387e-05 6.14587983e-05 2.64362400e-04 1.80218965e-04 -2.10221265e-04 -9.04257808e-04 -4.49966214e-05 -7.41027543e-06 -3.18749838e-05 -7.56452170e-05 3.71814332e-05 5.52988907e-04 5.60067676e-03 -5.29859586e-04 6.18068982e-04 2.65859737e-03 1.81201067e-03 -2.11366864e-03 -9.09185551e-03 -4.25601334e-04 -7.00902203e-05 -3.01490094e-04 -7.15491613e-04 3.51681238e-04 5.26875387e-05 5.29859586e-04 1.34008375e-05 6.15269629e-05 2.64655607e-04 -4.90106887e-05 -2.09833081e-04 -9.02588049e-04 -5.56509495e-05 3.84629180e-06 1.65446602e-05 -7.49389586e-05 3.68342903e-05 -6.14587983e-05 -6.18068982e-04 6.15269629e-05 -5.62297012e-06 -3.08714660e-04 -2.09833081e-04 1.58685769e-05 1.05284813e-03 4.55384355e-05 -1.02753215e-06 3.68342903e-05 9.86019477e-05 5.15569475e-06 -2.64362400e-04 -2.65859737e-03 2.64655607e-04 -3.08714660e-04 -1.26177613e-03 -9.02588049e-04 1.05284813e-03 4.29988448e-03 1.95881638e-04 3.68342903e-05 1.48850385e-04 3.27887984e-04 -1.73630540e-04 -1.80218965e-04 -1.81201067e-03 -4.90106887e-05 -2.09833081e-04 -9.02588049e-04 1.78932162e-04 7.16157506e-04 3.08052097e-03 1.87753689e-04 -1.40802398e-05 -6.05655509e-05 2.51247751e-04 -1.23494278e-04 2.10221265e-04 2.11366864e-03 -2.09833081e-04 1.58685769e-05 1.05284813e-03 7.16157506e-04 -4.24999066e-05 -3.59335664e-03 -1.51992621e-04 4.46069846e-06 -1.23494278e-04 -3.31767407e-04 -2.23817810e-05 9.04257808e-04 9.09185551e-03 -9.02588049e-04 1.05284813e-03 4.29988448e-03 3.08052097e-03 -3.59335664e-03 -1.46637891e-02 -6.53789776e-04 -1.23494278e-04 -4.98034804e-04 -1.09421334e-03 5.80946108e-04 -4.49966214e-05 -4.25601334e-04 5.56509495e-05 -4.55384355e-05 -1.95881638e-04 -1.87753689e-04 1.51992621e-04 6.53789776e-04 1.37991933e-05 4.93773813e-06 2.12394700e-05 2.44096380e-05 -1.19979208e-05 -7.41027543e-06 -7.00902203e-05 -3.84629180e-06 1.02753215e-06 -3.68342903e-05 1.40802398e-05 -4.46069846e-06 1.23494278e-04 4.93773813e-06 -5.01791981e-07 -4.48054080e-06 8.34420803e-06 2.94550211e-06 -3.18749838e-05 -3.01490094e-04 -1.65446602e-05 -3.68342903e-05 -1.48850385e-04 6.05655509e-05 1.23494278e-04 4.98034804e-04 2.12394700e-05 -4.48054080e-06 -1.87330140e-05 2.32438211e-05 -1.30631480e-05 -7.56452170e-05 -7.15491613e-04 7.49389586e-05 -9.86019477e-05 -3.27887984e-04 -2.51247751e-04 3.31767407e-04 1.09421334e-03 2.44096380e-05 8.34420803e-06 2.32438211e-05 3.85235775e-05 -3.44904342e-05 3.71814332e-05 3.51681238e-04 -3.68342903e-05 -5.15569475e-06 1.73630540e-04 1.23494278e-04 2.23817810e-05 -5.80946108e-04 -1.19979208e-05 2.94550211e-06 -1.30631480e-05 -3.44904342e-05 -1.46939585e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 0 -2 507 + 8.27516628e-06 9.08802576e-05 -3.31690024e-05 -3.31516038e-05 -1.43467963e-08 1.15932821e-04 1.15872009e-04 5.01451490e-08 6.57122653e-06 2.27276232e-05 9.83568045e-09 1.13578487e-05 9.83052120e-09 1.25169292e-03 9.05223723e-03 -3.48615601e-03 -3.30228823e-03 -1.16593167e-03 1.02237949e-02 9.68456873e-03 3.41930945e-03 4.94798864e-05 1.63862739e-04 5.78546582e-05 6.79354878e-05 5.48032723e-05 9.08802576e-05 9.98807942e-04 -3.64520473e-04 -3.64329266e-04 -1.57668323e-07 1.27488695e-03 1.27421822e-03 5.51434836e-07 7.24639184e-05 2.50627890e-04 1.08462544e-07 1.25248189e-04 1.08405650e-07 9.05223723e-03 5.49071970e-02 -2.21396978e-02 -2.09719999e-02 -7.40453804e-03 5.87119722e-02 5.56153696e-02 1.96359966e-02 -1.13537275e-03 -3.76001852e-03 -1.32754150e-03 -1.55885769e-03 -1.25752395e-03 3.31690024e-05 3.64520473e-04 -1.28557904e-04 -1.35515297e-04 -5.86460424e-08 4.50592934e-04 4.74570596e-04 2.05376721e-07 2.12181717e-05 8.89594229e-05 3.84983703e-08 4.70541429e-05 4.07266167e-08 3.48615601e-03 2.21396978e-02 -8.04999795e-03 -9.20655549e-03 -3.25053837e-03 2.17878225e-02 2.53758307e-02 8.95938891e-03 -3.50104163e-04 -8.67259756e-04 -3.06201501e-04 -3.19668178e-04 -2.57874975e-04 3.31516038e-05 3.64329266e-04 -1.35515297e-04 -1.28415700e-04 -5.86152800e-08 4.74570596e-04 4.50094936e-04 2.05268992e-07 3.02107103e-05 8.89073048e-05 4.07266167e-08 4.18311905e-05 3.84556333e-08 3.30228823e-03 2.09719999e-02 -9.20655549e-03 -7.05181246e-03 -3.07909760e-03 2.53758307e-02 1.90365453e-02 8.48685042e-03 -1.64999848e-04 -8.31949611e-04 -2.57874975e-04 -3.99017241e-04 -2.78242395e-04 1.43467963e-08 1.57668323e-07 -5.86460424e-08 -5.86152800e-08 7.02848825e-06 2.05376721e-07 2.05268992e-07 -2.42266373e-05 1.30740856e-08 4.07266167e-08 -5.20098097e-06 2.26022436e-08 -5.19825282e-06 1.16593167e-03 7.40453804e-03 -3.25053837e-03 -3.07909760e-03 5.82038175e-04 8.95938891e-03 8.48685042e-03 -2.00447282e-03 -5.82561346e-05 -2.57874975e-04 -1.92613256e-04 -7.29434793e-05 -1.82454396e-04 -1.15932821e-04 -1.27488695e-03 4.50592934e-04 4.74570596e-04 2.05376721e-07 -1.57949590e-03 -1.66202156e-03 -7.19261877e-07 -7.52048490e-05 -3.14093514e-04 -1.35928135e-07 -1.65969820e-04 -1.43651310e-07 -1.02237949e-02 -5.87119722e-02 2.17878225e-02 2.53758307e-02 8.95938891e-03 -5.50538468e-02 -6.60315567e-02 -2.33136170e-02 1.59337390e-03 5.36665398e-03 1.89479276e-03 2.23721786e-03 1.80475424e-03 -1.15872009e-04 -1.27421822e-03 4.74570596e-04 4.50094936e-04 2.05268992e-07 -1.66202156e-03 -1.57775183e-03 -7.18884592e-07 -1.06377644e-04 -3.13909848e-04 -1.43651310e-07 -1.47862365e-04 -1.35777392e-07 -9.68456873e-03 -5.56153696e-02 2.53758307e-02 1.90365453e-02 8.48685042e-03 -6.60315567e-02 -4.78946284e-02 -2.20840039e-02 1.56059172e-03 5.08039601e-03 1.80475424e-03 2.08962927e-03 1.69911920e-03 -5.01451490e-08 -5.51434836e-07 2.05376721e-07 2.05268992e-07 -2.42266373e-05 -7.19261877e-07 -7.18884592e-07 8.33976123e-05 -4.60363367e-08 -1.43651310e-07 1.80297925e-05 -7.95865317e-08 1.80203351e-05 -3.41930945e-03 -1.96359966e-02 8.95938891e-03 8.48685042e-03 -2.00447282e-03 -2.33136170e-02 -2.20840039e-02 6.85712334e-03 5.50994697e-04 1.80475424e-03 6.05960288e-04 7.58677249e-04 5.74000568e-04 6.57122653e-06 7.24639184e-05 -2.12181717e-05 -3.02107103e-05 -1.30740856e-08 7.52048490e-05 1.06377644e-04 4.60363367e-08 -8.39846215e-07 1.65608232e-05 7.16691593e-09 1.16238799e-05 1.00607783e-08 4.94798864e-05 -1.13537275e-03 3.50104163e-04 1.64999848e-04 5.82561346e-05 -1.59337390e-03 -1.56059172e-03 -5.50994697e-04 2.56560689e-04 -5.29286787e-04 -1.86874126e-04 -4.17387686e-04 -3.36704891e-04 2.27276232e-05 2.50627890e-04 -8.89594229e-05 -8.89073048e-05 -4.07266167e-08 3.14093514e-04 3.13909848e-04 1.43651310e-07 1.65608232e-05 5.74406352e-05 2.64573468e-08 2.86159769e-05 2.64417132e-08 1.63862739e-04 -3.76001852e-03 8.67259756e-04 8.31949611e-04 2.57874975e-04 -5.36665398e-03 -5.08039601e-03 -1.80475424e-03 -5.29286787e-04 -1.74924598e-03 -7.12770120e-04 -6.69560310e-04 -6.65181086e-04 9.83568045e-09 1.08462544e-07 -3.84983703e-08 -4.07266167e-08 5.20098097e-06 1.35928135e-07 1.43651310e-07 -1.80297925e-05 7.16691593e-09 2.64573468e-08 -3.69519580e-06 1.57315850e-08 -3.86773918e-06 5.78546582e-05 -1.32754150e-03 3.06201501e-04 2.57874975e-04 1.92613256e-04 -1.89479276e-03 -1.80475424e-03 -6.05960288e-04 -1.86874126e-04 -7.12770120e-04 1.78888525e-05 -4.31057440e-04 6.44789808e-06 1.13578487e-05 1.25248189e-04 -4.70541429e-05 -4.18311905e-05 -2.26022436e-08 1.65969820e-04 1.47862365e-04 7.95865317e-08 1.16238799e-05 2.86159769e-05 1.57315850e-08 1.25421922e-05 1.40503904e-08 6.79354878e-05 -1.55885769e-03 3.19668178e-04 3.99017241e-04 7.29434793e-05 -2.23721786e-03 -2.08962927e-03 -7.58677249e-04 -4.17387686e-04 -6.69560310e-04 -4.31057440e-04 -1.19670827e-04 -3.16127201e-04 9.83052120e-09 1.08405650e-07 -4.07266167e-08 -3.84556333e-08 5.19825282e-06 1.43651310e-07 1.35777392e-07 -1.80203351e-05 1.00607783e-08 2.64417132e-08 -3.86773918e-06 1.40503904e-08 -3.69113714e-06 5.48032723e-05 -1.25752395e-03 2.57874975e-04 2.78242395e-04 1.82454396e-04 -1.80475424e-03 -1.69911920e-03 -5.74000568e-04 -3.36704891e-04 -6.65181086e-04 6.44789808e-06 -3.16127201e-04 1.71897639e-05 8.15919978e-06 8.96171586e-05 -3.27102754e-05 -3.27274346e-05 1.41493681e-08 1.14318287e-04 1.14378256e-04 -4.94502572e-08 6.47643325e-06 2.24703773e-05 -9.71483541e-09 1.12410803e-05 -9.71993163e-09 8.96171586e-05 9.84998131e-04 -3.59541633e-04 -3.59730242e-04 1.55525653e-07 1.25729095e-03 1.25795050e-03 -5.43861897e-07 7.14374404e-05 2.47856525e-04 -1.07158207e-07 1.23993250e-04 -1.07214420e-07 3.27102754e-05 3.59541633e-04 -1.26815516e-04 -1.33791713e-04 5.78434647e-08 4.44458492e-04 4.68502006e-04 -2.02552001e-07 2.09255703e-05 8.79785547e-05 -3.80366190e-08 4.65727721e-05 -4.02705210e-08 3.27274346e-05 3.59730242e-04 -1.33791713e-04 -1.26955848e-04 5.78738083e-08 4.68502006e-04 4.44949898e-04 -2.02658256e-07 2.98014781e-05 8.80300750e-05 -4.02705210e-08 4.14790332e-05 -3.80788582e-08 -1.41493681e-08 -1.55525653e-07 5.78434647e-08 5.78738083e-08 6.90602458e-06 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 -1.28843611e-08 -4.02705210e-08 -5.11546916e-06 -2.23586072e-08 -5.11815264e-06 -1.14318287e-04 -1.25729095e-03 4.44458492e-04 4.68502006e-04 -2.02552001e-07 -1.55783378e-03 -1.64059005e-03 7.09292153e-07 -7.41676003e-05 -3.10616227e-04 1.34291716e-07 -1.64262990e-04 1.42034839e-07 -1.14378256e-04 -1.25795050e-03 4.68502006e-04 4.44949898e-04 -2.02658256e-07 -1.64059005e-03 -1.55955457e-03 7.09664234e-07 -1.04928872e-04 -3.10797775e-04 1.42034839e-07 -1.46611593e-04 1.34440694e-07 4.94502572e-08 5.43861897e-07 -2.02552001e-07 -2.02658256e-07 -2.37977879e-05 7.09292153e-07 7.09664234e-07 8.18957947e-05 4.53649137e-08 1.42034839e-07 1.77282045e-05 7.87233138e-08 1.77375044e-05 6.47643325e-06 7.14374404e-05 -2.09255703e-05 -2.98014781e-05 1.28843611e-08 7.41676003e-05 1.04928872e-04 -4.53649137e-08 -8.26388656e-07 1.63766450e-05 -7.08027324e-09 1.14959603e-05 -9.94032116e-09 2.24703773e-05 2.47856525e-04 -8.79785547e-05 -8.80300750e-05 4.02705210e-08 3.10616227e-04 3.10797775e-04 -1.42034839e-07 1.63766450e-05 5.70028575e-05 -2.62180073e-08 2.84327888e-05 -2.62334905e-08 -9.71483541e-09 -1.07158207e-07 3.80366190e-08 4.02705210e-08 5.11546916e-06 -1.34291716e-07 -1.42034839e-07 -1.77282045e-05 -7.08027324e-09 -2.62180073e-08 -3.63928211e-06 -1.55891033e-08 -3.81236177e-06 1.12410803e-05 1.23993250e-04 -4.65727721e-05 -4.14790332e-05 2.23586072e-08 1.64262990e-04 1.46611593e-04 -7.87233138e-08 1.14959603e-05 2.84327888e-05 -1.55891033e-08 1.24877430e-05 -1.39481760e-08 -9.71993163e-09 -1.07214420e-07 4.02705210e-08 3.80788582e-08 5.11815264e-06 -1.42034839e-07 -1.34440694e-07 -1.77375044e-05 -9.94032116e-09 -2.62334905e-08 -3.81236177e-06 -1.39481760e-08 -3.64328085e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +2 0 -1 507 + 1.71125195e-04 1.57340803e-03 -6.54391095e-04 -3.26863713e-04 3.26901077e-04 2.14206805e-03 1.06994780e-03 -1.07007011e-03 9.06971384e-05 1.04555142e-04 -1.04567094e-04 -5.97028977e-09 -5.22305220e-05 1.56636817e-02 7.40229425e-02 -4.27711333e-02 -1.19640517e-02 1.42465915e-02 1.03452337e-01 2.89379546e-02 -3.44588295e-02 -4.84926548e-03 -2.59490782e-03 3.08997258e-03 1.51690694e-04 8.64335101e-04 1.57340803e-03 1.40097483e-02 -5.81479070e-03 -2.90444673e-03 2.90477875e-03 1.87705742e-02 9.37576874e-03 -9.37684052e-03 5.74307103e-04 6.62057940e-04 -6.62133622e-04 -3.78047189e-08 -3.30731050e-04 7.40229425e-02 1.66251562e-01 -1.31532582e-01 -3.67926330e-02 4.38120484e-02 1.83839036e-01 5.14239293e-02 -6.12347499e-02 -4.36012777e-02 -2.33316359e-02 2.77829195e-02 1.36389894e-03 7.77150990e-03 6.54391095e-04 5.81479070e-03 -2.35234431e-03 -1.28971937e-03 1.28986680e-03 7.57613124e-03 4.16909440e-03 -4.16957098e-03 1.96680176e-04 3.08018123e-04 -3.08053333e-04 -2.03762001e-08 -1.78259282e-04 4.27711333e-02 1.31532582e-01 -8.86841338e-02 -2.99279431e-02 3.56376911e-02 1.63077642e-01 5.72094649e-02 -6.81240684e-02 -2.16237958e-02 -1.36312740e-02 1.62318917e-02 8.96456045e-04 5.10801557e-03 3.26863713e-04 2.90444673e-03 -1.28971937e-03 -4.14492578e-04 6.44279323e-04 4.16909440e-03 1.31191054e-03 -2.08267114e-03 1.82801830e-04 8.04965969e-05 -1.78259282e-04 -4.88317689e-05 -4.02120757e-05 1.19640517e-02 3.67926330e-02 -2.99279431e-02 9.93586168e-03 9.96866689e-03 5.72094649e-02 -2.54417348e-02 -1.90558401e-02 -9.00010657e-03 1.80218090e-03 5.10801557e-03 1.95477519e-03 -6.00286528e-04 -3.26901077e-04 -2.90477875e-03 1.28986680e-03 6.44279323e-04 -4.14639869e-04 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 -1.82822726e-04 -1.78259282e-04 8.05373493e-05 -4.88169931e-05 4.02278350e-05 -1.42465915e-02 -4.38120484e-02 3.56376911e-02 9.96866689e-03 6.43686229e-03 -6.81240684e-02 -1.90558401e-02 -1.87531400e-02 1.07171755e-02 5.10801557e-03 9.26880819e-06 1.73051422e-03 2.59269494e-06 -2.14206805e-03 -1.87705742e-02 7.57613124e-03 4.16909440e-03 -4.16957098e-03 -2.42413527e-02 -1.33983586e-02 1.33998902e-02 -4.89218183e-04 -8.26988668e-04 8.27083203e-04 5.62431431e-08 4.92037880e-04 -1.03452337e-01 -1.83839036e-01 1.63077642e-01 5.72094649e-02 -6.81240684e-02 -1.79448338e-01 -7.20164250e-02 8.57559473e-02 5.80315077e-02 3.87781055e-02 -4.61763157e-02 -2.64036605e-03 -1.50448323e-02 -1.06994780e-03 -9.37576874e-03 4.16909440e-03 1.31191054e-03 -2.08267114e-03 -1.33983586e-02 -4.10981645e-03 6.69315015e-03 -5.17979214e-04 -1.75713806e-04 4.92037880e-04 1.58001634e-04 8.77778333e-05 -2.89379546e-02 -5.14239293e-02 5.72094649e-02 -2.54417348e-02 -1.90558401e-02 -7.20164250e-02 5.78636443e-02 2.39878748e-02 2.72996742e-02 -1.02078994e-02 -1.50448323e-02 -7.12807723e-03 3.40013841e-03 1.07007011e-03 9.37684052e-03 -4.16957098e-03 -2.08267114e-03 1.31238667e-03 1.33998902e-02 6.69315015e-03 -4.11134659e-03 5.18038425e-04 4.92037880e-04 -1.75826292e-04 1.57963503e-04 -8.78239864e-05 3.44588295e-02 6.12347499e-02 -6.81240684e-02 -1.90558401e-02 -1.87531400e-02 8.57559473e-02 2.39878748e-02 4.94439067e-02 -3.25079927e-02 -1.50448323e-02 -4.92716732e-03 -6.72904099e-03 -1.37823995e-03 9.06971384e-05 5.74307103e-04 -1.96680176e-04 -1.82801830e-04 1.82822726e-04 4.89218183e-04 5.17979214e-04 -5.18038425e-04 -8.52265465e-05 -7.70397886e-05 7.70485953e-05 3.50576416e-09 3.06698501e-05 -4.84926548e-03 -4.36012777e-02 2.16237958e-02 9.00010657e-03 -1.07171755e-02 -5.80315077e-02 -2.72996742e-02 3.25079927e-02 8.42958736e-03 3.73921296e-03 -4.45259189e-03 -1.66145016e-04 -9.46695976e-04 1.04555142e-04 6.62057940e-04 -3.08018123e-04 -8.04965969e-05 1.78259282e-04 8.26988668e-04 1.75713806e-04 -4.92037880e-04 -7.70397886e-05 -1.01196560e-04 8.73209439e-05 -9.02782116e-06 5.03959572e-05 -2.59490782e-03 -2.33316359e-02 1.36312740e-02 -1.80218090e-03 -5.10801557e-03 -3.87781055e-02 1.02078994e-02 1.50448323e-02 3.73921296e-03 3.25250977e-03 -2.36461866e-03 4.10293537e-04 -1.22989747e-03 -1.04567094e-04 -6.62133622e-04 3.08053333e-04 1.78259282e-04 -8.05373493e-05 -8.27083203e-04 -4.92037880e-04 1.75826292e-04 7.70485953e-05 8.73209439e-05 -1.01216522e-04 -9.03831022e-06 -5.03996529e-05 3.08997258e-03 2.77829195e-02 -1.62318917e-02 -5.10801557e-03 -9.26880819e-06 4.61763157e-02 1.50448323e-02 4.92716732e-03 -4.45259189e-03 -2.36461866e-03 4.08249028e-03 7.44859222e-04 1.24807445e-03 -5.97028977e-09 -3.78047189e-08 2.03762001e-08 4.88317689e-05 4.88169931e-05 -5.62431431e-08 -1.58001634e-04 -1.57963503e-04 3.50576416e-09 -9.02782116e-06 -9.03831022e-06 -4.82657881e-06 -2.36186727e-09 1.51690694e-04 1.36389894e-03 -8.96456045e-04 -1.95477519e-03 -1.73051422e-03 2.64036605e-03 7.12807723e-03 6.72904099e-03 -1.66145016e-04 4.10293537e-04 7.44859222e-04 -2.28178138e-04 3.58448514e-05 -5.22305220e-05 -3.30731050e-04 1.78259282e-04 4.02120757e-05 -4.02278350e-05 -4.92037880e-04 -8.77778333e-05 8.78239864e-05 3.06698501e-05 5.03959572e-05 -5.03996529e-05 -2.36186727e-09 -2.54891536e-05 8.64335101e-04 7.77150990e-03 -5.10801557e-03 6.00286528e-04 -2.59269494e-06 1.50448323e-02 -3.40013841e-03 1.37823995e-03 -9.46695976e-04 -1.22989747e-03 1.24807445e-03 3.58448514e-05 -3.02245805e-05 1.69565517e-04 1.56053224e-03 -6.48479832e-04 -3.24568776e-04 3.24531747e-04 2.12361003e-03 1.06288195e-03 -1.06276069e-03 9.01314392e-05 1.04246931e-04 -1.04235037e-04 5.95242619e-09 -5.21703789e-05 1.56053224e-03 1.39128426e-02 -5.76912170e-03 -2.88748651e-03 2.88715708e-03 1.86343382e-02 9.32661905e-03 -9.32555499e-03 5.74071199e-04 6.63976534e-04 -6.63900782e-04 3.79125915e-08 -3.32287071e-04 6.48479832e-04 5.76912170e-03 -2.33153957e-03 -1.28082856e-03 1.28068243e-03 7.51330575e-03 4.14256914e-03 -4.14209652e-03 1.96173742e-04 3.08000907e-04 -3.07965767e-04 2.03623990e-08 -1.78467408e-04 3.24568776e-04 2.88748651e-03 -1.28082856e-03 -4.13541800e-04 6.40990681e-04 4.14256914e-03 1.30994752e-03 -2.07314882e-03 1.82386438e-04 8.13604017e-05 -1.78467408e-04 -4.86027490e-05 -4.07168149e-05 -3.24531747e-04 -2.88715708e-03 1.28068243e-03 6.40990681e-04 -4.13395531e-04 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 -1.82365630e-04 -1.78467408e-04 8.13196769e-05 -4.86175846e-05 4.07010777e-05 -2.12361003e-03 -1.86343382e-02 7.51330575e-03 4.14256914e-03 -4.14209652e-03 -2.40561655e-02 -1.33214770e-02 1.33199571e-02 -4.90535867e-04 -8.30029912e-04 8.29935214e-04 -5.63839373e-08 4.94180235e-04 -1.06288195e-03 -9.32661905e-03 4.14256914e-03 1.30994752e-03 -2.07314882e-03 -1.33214770e-02 -4.10770096e-03 6.66673345e-03 -5.18213874e-04 -1.79672091e-04 4.94180235e-04 1.57413568e-04 8.99169018e-05 1.06276069e-03 9.32555499e-03 -4.14209652e-03 -2.07314882e-03 1.30947444e-03 1.33199571e-02 6.66673345e-03 -4.10617966e-03 5.18154752e-04 4.94180235e-04 -1.79559323e-04 1.57452044e-04 -8.98707205e-05 9.01314392e-05 5.74071199e-04 -1.96173742e-04 -1.82386438e-04 1.82365630e-04 4.90535867e-04 5.18213874e-04 -5.18154752e-04 -8.38723793e-05 -7.52905161e-05 7.52819262e-05 -3.39022091e-09 2.97137846e-05 1.04246931e-04 6.63976534e-04 -3.08000907e-04 -8.13604017e-05 1.78467408e-04 8.30029912e-04 1.79672091e-04 -4.94180235e-04 -7.52905161e-05 -9.97224729e-05 8.55349841e-05 -9.19395180e-06 4.96974181e-05 -1.04235037e-04 -6.63900782e-04 3.07965767e-04 1.78467408e-04 -8.13196769e-05 -8.29935214e-04 -4.94180235e-04 1.79559323e-04 7.52819262e-05 8.55349841e-05 -9.97029545e-05 -9.18366007e-06 -4.96938449e-05 5.95242619e-09 3.79125915e-08 -2.03623990e-08 4.86027490e-05 4.86175846e-05 5.63839373e-08 -1.57413568e-04 -1.57452044e-04 -3.39022091e-09 -9.19395180e-06 -9.18366007e-06 -5.01529191e-06 2.31304312e-09 -5.21703789e-05 -3.32287071e-04 1.78467408e-04 4.07168149e-05 -4.07010777e-05 -4.94180235e-04 -8.99169018e-05 8.98707205e-05 2.97137846e-05 4.96974181e-05 -4.96938449e-05 2.31304312e-09 -2.52880900e-05 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +2 0 0 507 + 8.26784870e-06 9.08005784e-05 -3.31402035e-05 1.62265978e-08 3.31247122e-05 1.15831465e-04 -5.67151192e-08 -1.15777320e-04 6.56541801e-06 -1.11255035e-08 -2.27114216e-05 -1.13503999e-05 1.11203030e-08 8.13218304e-04 6.23184515e-03 -2.27628656e-03 8.82772549e-04 2.27770718e-03 6.85520397e-03 -2.65853429e-03 -6.85948226e-03 4.83816740e-05 -7.66155436e-05 -1.97681468e-04 -8.40461845e-05 7.66633589e-05 9.08005784e-05 9.97937040e-04 -3.64208022e-04 1.78328932e-07 3.64037775e-04 1.27378273e-03 -6.23688385e-07 -1.27318730e-03 7.24010828e-05 -1.22688076e-07 -2.50453438e-04 -1.25168152e-04 1.22630726e-07 6.23184515e-03 4.19707653e-02 -1.57754805e-02 6.11792970e-03 1.57853259e-02 4.42603329e-02 -1.71647136e-02 -4.42879555e-02 -3.79416821e-04 6.00831339e-04 1.55024967e-03 6.59103613e-04 -6.01206315e-04 3.31402035e-05 3.64208022e-04 -1.28449169e-04 6.63308026e-08 1.35406619e-04 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 2.12005244e-05 -4.35479613e-08 -8.88980985e-05 -4.70236432e-05 4.60703732e-08 2.27628656e-03 1.57754805e-02 -5.34418710e-03 2.49968112e-03 6.44961337e-03 1.51333674e-02 -7.18895392e-03 -1.85487552e-02 -1.81970643e-04 9.83022381e-05 2.53636923e-04 5.17735002e-05 -4.72255874e-05 -1.62265978e-08 -1.78328932e-07 6.63308026e-08 7.02074294e-06 -6.62997966e-08 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 -1.47867785e-08 -5.19559917e-06 4.60703732e-08 2.55683707e-08 5.19317051e-06 -8.82772549e-04 -6.11792970e-03 2.49968112e-03 1.31995840e-04 -2.50124116e-03 -7.18895392e-03 -6.15852202e-04 7.19344051e-03 -1.79478680e-05 -1.50083678e-04 -4.72255874e-05 3.10276912e-05 1.50177345e-04 -3.31247122e-05 -3.64037775e-04 1.35406619e-04 -6.62997966e-08 -1.28322549e-04 -4.74187979e-04 2.32178949e-07 4.49766695e-04 -3.01854886e-05 4.60703732e-08 8.88516872e-05 4.18084691e-05 -4.35048805e-08 -2.27770718e-03 -1.57853259e-02 6.44961337e-03 -2.50124116e-03 -5.35223493e-03 -1.85487552e-02 7.19344051e-03 1.51565125e-02 -4.63086306e-05 -4.72255874e-05 -2.53630679e-04 -1.83668480e-04 9.83611662e-05 -1.15831465e-04 -1.27378273e-03 4.50210113e-04 -2.32287531e-07 -4.74187979e-04 -1.57814407e-03 8.13502356e-07 1.66067045e-03 -7.51422849e-05 1.53756556e-07 3.13876127e-04 1.65861691e-04 -1.62499319e-07 -6.85520397e-03 -4.42603329e-02 1.51333674e-02 -7.18895392e-03 -1.85487552e-02 -4.09230602e-02 1.98927024e-02 5.13266426e-02 8.13301097e-04 -9.46753191e-04 -2.44278840e-03 -9.37835283e-04 8.55453503e-04 5.67151192e-08 6.23688385e-07 -2.32287531e-07 -2.41995135e-05 2.32178949e-07 8.13502356e-07 8.33026208e-05 -8.13122088e-07 5.20668178e-08 1.80108098e-05 -1.62499319e-07 -9.00304191e-08 -1.80023907e-05 2.65853429e-03 1.71647136e-02 -7.18895392e-03 -6.15852202e-04 7.19344051e-03 1.98927024e-02 2.65692953e-03 -1.99051173e-02 -1.56348555e-04 5.68346701e-04 8.55453503e-04 2.71871075e-04 -5.68701403e-04 1.15777320e-04 1.27318730e-03 -4.74187979e-04 2.32178949e-07 4.49766695e-04 1.66067045e-03 -8.13122088e-07 -1.57659116e-03 1.06288353e-04 -1.62499319e-07 -3.13712572e-04 -1.47781689e-04 1.53604601e-07 6.85948226e-03 4.42879555e-02 -1.85487552e-02 7.19344051e-03 1.51565125e-02 5.13266426e-02 -1.99051173e-02 -4.09871056e-02 -4.03406546e-04 8.55453503e-04 2.44401727e-03 1.17536636e-03 -9.47820626e-04 6.56541801e-06 7.24010828e-05 -2.12005244e-05 1.47867785e-08 3.01854886e-05 7.51422849e-05 -5.20668178e-08 -1.06288353e-04 -8.38745046e-07 -8.10711403e-09 -1.65497304e-05 -1.16159774e-05 1.13804966e-08 4.83816740e-05 -3.79416821e-04 1.81970643e-04 1.79478680e-05 4.63086306e-05 -8.13301097e-04 1.56348555e-04 4.03406546e-04 1.58605468e-04 1.10903694e-04 2.86150877e-04 2.31482344e-04 -2.11148360e-04 -1.11255035e-08 -1.22688076e-07 4.35479613e-08 5.19559917e-06 -4.60703732e-08 -1.53756556e-07 -1.80108098e-05 1.62499319e-07 -8.10711403e-09 -3.69169936e-06 2.99330769e-08 1.77980956e-08 3.86424439e-06 -7.66155436e-05 6.00831339e-04 -9.83022381e-05 1.50083678e-04 4.72255874e-05 9.46753191e-04 -5.68346701e-04 -8.55453503e-04 1.10903694e-04 -6.32348218e-05 -5.31651989e-04 -3.08426898e-04 7.94762484e-05 -2.27114216e-05 -2.50453438e-04 8.88980985e-05 -4.60703732e-08 -8.88516872e-05 -3.13876127e-04 1.62499319e-07 3.13712572e-04 -1.65497304e-05 2.99330769e-08 5.74131813e-05 2.86042224e-05 -2.99173155e-08 -1.97681468e-04 1.55024967e-03 -2.53636923e-04 4.72255874e-05 2.53630679e-04 2.44278840e-03 -8.55453503e-04 -2.44401727e-03 2.86150877e-04 -5.31651989e-04 -1.22893697e-03 -4.97525740e-04 5.32055958e-04 -1.13503999e-05 -1.25168152e-04 4.70236432e-05 -2.55683707e-08 -4.18084691e-05 -1.65861691e-04 9.00304191e-08 1.47781689e-04 -1.16159774e-05 1.77980956e-08 2.86042224e-05 1.25385472e-05 -1.58976997e-08 -8.40461845e-05 6.59103613e-04 -5.17735002e-05 -3.10276912e-05 1.83668480e-04 9.37835283e-04 -2.71871075e-04 -1.17536636e-03 2.31482344e-04 -3.08426898e-04 -4.97525740e-04 -1.09514280e-04 2.50783062e-04 1.11203030e-08 1.22630726e-07 -4.60703732e-08 -5.19317051e-06 4.35048805e-08 1.62499319e-07 1.80023907e-05 -1.53604601e-07 1.13804966e-08 3.86424439e-06 -2.99173155e-08 -1.58976997e-08 -3.68808587e-06 7.66633589e-05 -6.01206315e-04 4.72255874e-05 -1.50177345e-04 -9.83611662e-05 -8.55453503e-04 5.68701403e-04 9.47820626e-04 -2.11148360e-04 7.94762484e-05 5.32055958e-04 2.50783062e-04 -6.33339923e-05 8.16644387e-06 8.96960839e-05 -3.27387890e-05 -1.60311706e-08 3.27540937e-05 1.14418655e-04 5.60272701e-08 -1.14472143e-04 6.48218452e-06 1.10057862e-08 -2.24864773e-05 -1.12484919e-05 -1.10109312e-08 8.96960839e-05 9.85861294e-04 -3.59851191e-04 -1.76207978e-07 3.60019413e-04 1.25838511e-03 6.16192197e-07 -1.25897338e-03 7.14997122e-05 1.21395888e-07 -2.48030066e-04 -1.24072977e-04 -1.21452638e-07 3.27387890e-05 3.59851191e-04 -1.26923207e-04 -6.55357811e-08 1.33899462e-04 4.44837691e-04 2.29489416e-07 -4.68881408e-04 2.09430578e-05 4.30900857e-08 -8.80395289e-05 -4.66031270e-05 -4.56188997e-08 1.60311706e-08 1.76207978e-07 -6.55357811e-08 6.91365691e-06 6.55664176e-08 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 1.45982806e-08 -5.12077974e-06 -4.56188997e-08 -2.53276054e-08 5.12317359e-06 -3.27540937e-05 -3.60019413e-04 1.33899462e-04 6.55664176e-08 -1.27048368e-04 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 -2.98264839e-05 -4.56188997e-08 8.80854743e-05 4.15017171e-05 4.31327274e-08 -1.14418655e-04 -1.25838511e-03 4.44837691e-04 2.29489416e-07 -4.68881408e-04 -1.55917305e-03 -8.03626587e-07 1.64193004e-03 -7.42296114e-05 -1.52133886e-07 3.10832420e-04 1.64370629e-04 1.60899230e-07 -5.60272701e-08 -6.16192197e-07 2.29489416e-07 -2.38245144e-05 -2.29596697e-07 -8.03626587e-07 8.19893849e-05 8.04002265e-07 -5.13997441e-08 1.77469351e-05 1.60899230e-07 8.91773670e-08 -1.77552314e-05 1.14472143e-04 1.25897338e-03 -4.68881408e-04 -2.29596697e-07 4.45275973e-04 1.64193004e-03 8.04002265e-07 -1.56070783e-03 1.05017411e-04 1.60899230e-07 -3.10994324e-04 -1.46692159e-04 -1.52284284e-07 6.48218452e-06 7.14997122e-05 -2.09430578e-05 -1.45982806e-08 2.98264839e-05 7.42296114e-05 5.13997441e-08 -1.05017411e-04 -8.27477510e-07 8.02079735e-09 -1.63876959e-05 -1.15038314e-05 -1.12608781e-08 1.10057862e-08 1.21395888e-07 -4.30900857e-08 5.12077974e-06 4.56188997e-08 1.52133886e-07 -1.77469351e-05 -1.60899230e-07 8.02079735e-09 -3.64273931e-06 -2.96958683e-08 -1.76571801e-08 3.81582059e-06 -2.24864773e-05 -2.48030066e-04 8.80395289e-05 4.56188997e-08 -8.80854743e-05 -3.10832420e-04 -1.60899230e-07 3.10994324e-04 -1.63876959e-05 -2.96958683e-08 5.70303735e-05 2.84446038e-05 2.97114970e-08 -1.12484919e-05 -1.24072977e-04 4.66031270e-05 2.53276054e-08 -4.15017171e-05 -1.64370629e-04 -8.91773670e-08 1.46692159e-04 -1.15038314e-05 -1.76571801e-08 2.84446038e-05 1.24914350e-05 1.57969378e-08 -1.10109312e-08 -1.21452638e-07 4.56188997e-08 -5.12317359e-06 -4.31327274e-08 -1.60899230e-07 1.77552314e-05 1.52284284e-07 -1.12608781e-08 3.81582059e-06 2.97114970e-08 1.57969378e-08 -3.64630610e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 26 52 78 104 130 156 182 208 234 260 286 312 338 351 364 377 390 403 416 429 442 455 468 481 494 507 +2 1 -2 169 + 6.84702008e-05 6.84744258e-04 -3.31840575e-04 -5.56649743e-05 -6.65550125e-05 1.12689524e-03 1.89032323e-04 2.26013733e-04 1.04514564e-04 3.14408846e-05 3.75918339e-05 -1.13272607e-06 6.30588490e-06 6.84744258e-04 6.79164985e-03 -3.26891143e-03 -5.48347264e-04 -6.55623386e-04 1.10810958e-02 1.85881101e-03 2.22246020e-03 9.43126427e-04 2.83718631e-04 3.39224032e-04 -1.02215791e-05 5.69035208e-05 3.31840575e-04 3.26891143e-03 -1.57561988e-03 -2.78673485e-04 -3.33191876e-04 5.32289812e-03 9.42408354e-04 1.12677677e-03 4.42708517e-04 1.43832812e-04 1.71971598e-04 -5.54034224e-06 3.08430798e-05 5.56649743e-05 5.48347264e-04 -2.78673485e-04 3.89148080e-05 -5.58916500e-05 9.42408354e-04 -1.37079468e-04 1.89012449e-04 9.14957253e-05 -3.35165948e-05 3.08430798e-05 -1.08788955e-05 -6.72219600e-06 6.65550125e-05 6.55623386e-04 -3.33191876e-04 -5.58916500e-05 1.88351745e-05 1.12677677e-03 1.89012449e-04 -6.91748580e-05 1.09395526e-04 3.08430798e-05 -2.24359103e-05 1.07848146e-05 -3.76353727e-06 -1.12689524e-03 -1.10810958e-02 5.32289812e-03 9.42408354e-04 1.12677677e-03 -1.79817595e-02 -3.18713765e-03 -3.81065452e-03 -1.44478763e-03 -4.71200375e-04 -5.63383838e-04 1.82063719e-05 -1.01354854e-04 -1.89032323e-04 -1.85881101e-03 9.42408354e-04 -1.37079468e-04 1.89012449e-04 -3.18713765e-03 4.83378241e-04 -6.39222572e-04 -3.01508446e-04 1.18815441e-04 -1.01354854e-04 3.72048380e-05 2.38300068e-05 -2.26013733e-04 -2.22246020e-03 1.12677677e-03 1.89012449e-04 -6.91748580e-05 -3.81065452e-03 -6.39222572e-04 2.53731147e-04 -3.60494164e-04 -1.01354854e-04 8.24026971e-05 -3.71803635e-05 1.38227341e-05 1.04514564e-04 9.43126427e-04 -4.42708517e-04 -9.14957253e-05 -1.09395526e-04 1.44478763e-03 3.01508446e-04 3.60494164e-04 3.22685180e-05 2.00641382e-05 2.39893934e-05 -1.09400414e-06 6.09031999e-06 3.14408846e-05 2.83718631e-04 -1.43832812e-04 3.35165948e-05 -3.08430798e-05 4.71200375e-04 -1.18815441e-04 1.01354854e-04 2.00641382e-05 -2.71447379e-05 7.25889567e-06 -6.20250478e-06 -5.69368044e-06 3.75918339e-05 3.39224032e-04 -1.71971598e-04 -3.08430798e-05 2.24359103e-05 5.63383838e-04 1.01354854e-04 -8.24026971e-05 2.39893934e-05 7.25889567e-06 -2.45369071e-05 6.80694440e-06 -4.25271016e-06 -1.13272607e-06 -1.02215791e-05 5.54034224e-06 1.08788955e-05 -1.07848146e-05 -1.82063719e-05 -3.72048380e-05 3.71803635e-05 -1.09400414e-06 -6.20250478e-06 6.80694440e-06 -1.73397737e-07 -5.10778372e-08 6.30588490e-06 5.69035208e-05 -3.08430798e-05 6.72219600e-06 3.76353727e-06 1.01354854e-04 -2.38300068e-05 -1.38227341e-05 6.09031999e-06 -5.69368044e-06 -4.25271016e-06 -5.10778372e-08 1.01777421e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +2 1 -1 169 + 5.46238784e-05 5.55731924e-04 -2.65655619e-04 6.17825591e-05 5.30645179e-05 9.08538817e-04 -2.11295562e-04 -1.81479972e-04 8.82636592e-05 -3.73072772e-05 -3.20429051e-05 1.13793518e-06 7.45210165e-06 5.55731924e-04 5.62590488e-03 -2.67039496e-03 6.21044024e-04 5.33409463e-04 9.13048702e-03 -2.12344409e-03 -1.82380818e-03 8.34032707e-04 -3.52528885e-04 -3.02784080e-04 1.07527285e-05 7.04173900e-05 2.65655619e-04 2.67039496e-03 -1.26728728e-03 3.10204618e-04 2.66432125e-04 4.31785735e-03 -1.05773821e-03 -9.08482410e-04 3.82608687e-04 -1.74072610e-04 -1.49509494e-04 5.65243454e-06 3.70166222e-05 -6.17825591e-05 -6.21044024e-04 3.10204618e-04 -5.59770587e-06 -6.19631482e-05 -1.05773821e-03 1.57380451e-05 2.11282443e-04 -1.08455034e-04 -5.24426253e-06 3.70166222e-05 9.92824866e-06 1.04753765e-06 -5.30645179e-05 -5.33409463e-04 2.66432125e-04 -6.19631482e-05 1.33258273e-05 -9.08482410e-04 2.11282443e-04 -4.87875712e-05 -9.31511125e-05 3.70166222e-05 -1.65491316e-05 -1.07854283e-05 3.84877123e-06 -9.08538817e-04 -9.13048702e-03 4.31785735e-03 -1.05773821e-03 -9.08482410e-04 -1.47221012e-02 3.60934185e-03 3.10003321e-03 -1.27629834e-03 5.82178463e-04 5.00028161e-04 -1.89432904e-05 -1.24055683e-04 2.11295562e-04 2.12344409e-03 -1.05773821e-03 1.57380451e-05 2.11282443e-04 3.60934185e-03 -4.18909996e-05 -7.20963426e-04 3.64163618e-04 2.27347526e-05 -1.24055683e-04 -3.44729435e-05 -4.54125041e-06 1.81479972e-04 1.82380818e-03 -9.08482410e-04 2.11282443e-04 -4.87875712e-05 3.10003321e-03 -7.20963426e-04 1.78291087e-04 3.12777054e-04 -1.24055683e-04 6.06213335e-05 3.71763370e-05 -1.40984826e-05 8.82636592e-05 8.34032707e-04 -3.82608687e-04 1.08455034e-04 9.31511125e-05 1.27629834e-03 -3.64163618e-04 -3.12777054e-04 5.29450630e-05 -3.56876375e-05 -3.06518102e-05 1.47927228e-06 9.68744753e-06 -3.73072772e-05 -3.52528885e-04 1.74072610e-04 5.24426253e-06 -3.70166222e-05 -5.82178463e-04 -2.27347526e-05 1.24055683e-04 -3.56876375e-05 -1.48230071e-05 1.30287548e-05 6.88093296e-06 2.97880140e-06 -3.20429051e-05 -3.02784080e-04 1.49509494e-04 -3.70166222e-05 1.65491316e-05 -5.00028161e-04 1.24055683e-04 -6.06213335e-05 -3.06518102e-05 1.30287548e-05 -1.88019862e-05 -6.79489752e-06 4.49850014e-06 1.13793518e-06 1.07527285e-05 -5.65243454e-06 -9.92824866e-06 1.07854283e-05 1.89432904e-05 3.44729435e-05 -3.71763370e-05 1.47927228e-06 6.88093296e-06 -6.79489752e-06 -1.16348685e-06 1.02901584e-07 7.45210165e-06 7.04173900e-05 -3.70166222e-05 -1.04753765e-06 -3.84877123e-06 1.24055683e-04 4.54125041e-06 1.40984826e-05 9.68744753e-06 2.97880140e-06 4.49850014e-06 1.02901584e-07 -5.05318773e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 -2 -1 169 + 3.93137622e-06 4.30147049e-05 -3.98691170e-06 -1.93645635e-05 1.19994638e-05 1.37745286e-05 6.69033461e-05 -4.14573911e-05 -6.45530137e-06 3.54372306e-06 -2.19590680e-06 5.30146504e-06 -1.06655928e-05 4.30147049e-05 4.69962951e-04 -4.37632686e-05 -2.12559660e-04 1.31714921e-04 1.50901407e-04 7.32933180e-04 -4.54170072e-04 -7.12603879e-05 3.91193324e-05 -2.42407227e-05 5.85231322e-05 -1.17738001e-04 3.98691170e-06 4.37632686e-05 -1.34810769e-06 -1.98995693e-05 1.23309860e-05 4.92841635e-06 6.90275021e-05 -4.27736476e-05 -7.31824678e-06 1.09830174e-06 -6.80574698e-07 5.50601590e-06 -1.10771123e-05 1.93645635e-05 2.12559660e-04 -1.98995693e-05 -9.39039190e-05 5.98920116e-05 6.90275021e-05 3.25985439e-04 -2.07753037e-04 -3.10725514e-05 1.73444543e-05 -1.10771123e-05 2.41607517e-05 -5.22018463e-05 -1.19994638e-05 -1.31714921e-04 1.23309860e-05 5.98920116e-05 -3.43637861e-05 -4.27736476e-05 -2.07753037e-04 1.19452996e-04 1.92544468e-05 -1.10771123e-05 6.33242248e-06 -1.81715916e-05 3.07567878e-05 -1.37745286e-05 -1.50901407e-04 4.92841635e-06 6.90275021e-05 -4.27736476e-05 -1.78910138e-05 -2.38796332e-04 1.47972762e-04 2.55147211e-05 -4.10116117e-06 2.54132943e-06 -1.92434368e-05 3.87143288e-05 -6.69033461e-05 -7.32933180e-04 6.90275021e-05 3.25985439e-04 -2.07753037e-04 -2.38796332e-04 -1.12856773e-03 7.18708658e-04 1.08749686e-04 -6.06726568e-05 3.87143288e-05 -8.47040518e-05 1.82607343e-04 4.14573911e-05 4.54170072e-04 -4.27736476e-05 -2.07753037e-04 1.19452996e-04 1.47972762e-04 7.18708658e-04 -4.14081646e-04 -6.73879341e-05 3.87143288e-05 -2.21857833e-05 6.33466876e-05 -1.07757092e-04 -6.45530137e-06 -7.12603879e-05 7.31824678e-06 3.10725514e-05 -1.92544468e-05 -2.55147211e-05 -1.08749686e-04 6.73879341e-05 9.82079520e-06 -6.34537097e-06 3.93197861e-06 -8.18820356e-06 1.64731908e-05 3.54372306e-06 3.91193324e-05 -1.09830174e-06 -1.73444543e-05 1.10771123e-05 4.10116117e-06 6.06726568e-05 -3.87143288e-05 -6.34537097e-06 8.32578561e-07 -5.44340934e-07 4.46899670e-06 -9.69172218e-06 -2.19590680e-06 -2.42407227e-05 6.80574698e-07 1.10771123e-05 -6.33242248e-06 -2.54132943e-06 -3.87143288e-05 2.21857833e-05 3.93197861e-06 -5.44340934e-07 2.91435750e-07 -3.39322013e-06 5.69543604e-06 5.30146504e-06 5.85231322e-05 -5.50601590e-06 -2.41607517e-05 1.81715916e-05 1.92434368e-05 8.47040518e-05 -6.33466876e-05 -8.18820356e-06 4.46899670e-06 -3.39322013e-06 4.11234768e-06 -1.49656927e-05 -1.06655928e-05 -1.17738001e-04 1.10771123e-05 5.22018463e-05 -3.07567878e-05 -3.87143288e-05 -1.82607343e-04 1.07757092e-04 1.64731908e-05 -9.69172218e-06 5.69543604e-06 -1.49656927e-05 2.67817429e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 -2 0 169 + 2.63503108e-06 2.85652760e-05 -2.70535954e-06 -7.70810135e-06 1.35742788e-05 9.23033468e-06 2.62990388e-05 -4.63136728e-05 -4.60543832e-06 1.45253494e-06 -2.55797288e-06 -4.34810055e-06 -7.28816780e-06 2.85652760e-05 3.09068983e-04 -2.94361332e-05 -8.38693324e-05 1.47697293e-04 1.00164911e-04 2.85389530e-04 -5.02582525e-04 -5.03730829e-05 1.58874482e-05 -2.79784401e-05 -4.75583895e-05 -7.97160781e-05 2.70535954e-06 2.94361332e-05 -1.16053378e-06 -7.99596130e-06 1.40812118e-05 4.14342179e-06 2.74083197e-05 -4.82671615e-05 -5.19651135e-06 5.94871449e-07 -1.04759272e-06 -4.55192766e-06 -7.62981725e-06 7.70810135e-06 8.38693324e-05 -7.99596130e-06 -2.11362085e-05 4.01201417e-05 2.74083197e-05 7.26154489e-05 -1.37522635e-04 -1.32024292e-05 4.00764433e-06 -7.62981725e-06 -1.38950915e-05 -2.01085589e-05 -1.35742788e-05 -1.47697293e-04 1.40812118e-05 4.01201417e-05 -6.90073374e-05 -4.82671615e-05 -1.37522635e-04 2.36706689e-04 2.32500127e-05 -7.62981725e-06 1.31114996e-05 2.12092371e-05 3.73572410e-05 -9.23033468e-06 -1.00164911e-04 4.14342179e-06 2.74083197e-05 -4.82671615e-05 -1.46775064e-05 -9.36059416e-05 1.64843856e-04 1.78930078e-05 -2.15575124e-06 3.79636528e-06 1.57099826e-05 2.63326453e-05 -2.62990388e-05 -2.85389530e-04 2.74083197e-05 7.26154489e-05 -1.37522635e-04 -9.36059416e-05 -2.48525792e-04 4.69672564e-04 4.56245801e-05 -1.38675469e-05 2.63326453e-05 4.78531861e-05 6.95811205e-05 4.63136728e-05 5.02582525e-04 -4.82671615e-05 -1.37522635e-04 2.36706689e-04 1.64843856e-04 4.69672564e-04 -8.08936470e-04 -8.03467343e-05 2.63326453e-05 -4.52875121e-05 -7.33798707e-05 -1.29033028e-04 -4.60543832e-06 -5.03730829e-05 5.19651135e-06 1.32024292e-05 -2.32500127e-05 -1.78930078e-05 -4.56245801e-05 8.03467343e-05 7.56918948e-06 -2.73747313e-06 4.82080109e-06 7.23910413e-06 1.21339893e-05 1.45253494e-06 1.58874482e-05 -5.94871449e-07 -4.00764433e-06 7.62981725e-06 2.15575124e-06 1.38675469e-05 -2.63326453e-05 -2.73747313e-06 2.71133710e-07 -5.36788055e-07 -2.66833755e-06 -3.83922168e-06 -2.55797288e-06 -2.79784401e-05 1.04759272e-06 7.62981725e-06 -1.31114996e-05 -3.79636528e-06 -2.63326453e-05 4.52875121e-05 4.82080109e-06 -5.36788055e-07 9.11626218e-07 4.05003892e-06 7.14822346e-06 -4.34810055e-06 -4.75583895e-05 4.55192766e-06 1.38950915e-05 -2.12092371e-05 -1.57099826e-05 -4.78531861e-05 7.33798707e-05 7.23910413e-06 -2.66833755e-06 4.05003892e-06 5.31370153e-06 1.24639382e-05 -7.28816780e-06 -7.97160781e-05 7.62981725e-06 2.01085589e-05 -3.73572410e-05 -2.63326453e-05 -6.95811205e-05 1.29033028e-04 1.21339893e-05 -3.83922168e-06 7.14822346e-06 1.24639382e-05 1.87694649e-05 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 -1 -2 169 + 3.94871045e-06 4.32077606e-05 -1.20434277e-05 -1.94476414e-05 4.01153259e-06 4.16140141e-05 6.71980139e-05 -1.38611679e-05 -1.37449783e-06 1.07009451e-05 -2.20732114e-06 8.27228784e-06 -3.56436646e-06 4.32077606e-05 4.72113427e-04 -1.32206630e-04 -2.13486325e-04 4.40365665e-05 4.55922748e-04 7.36220810e-04 -1.51862826e-04 -1.51741934e-05 1.18136389e-04 -2.43684035e-05 9.13244769e-05 -3.93499246e-05 1.20434277e-05 1.32206630e-04 -3.44580142e-05 -6.01065369e-05 1.23983843e-05 1.19793072e-04 2.08518529e-04 -4.30118419e-05 -6.14988584e-06 3.08304303e-05 -6.35950003e-06 2.58400981e-05 -1.11339911e-05 1.94476414e-05 2.13486325e-04 -6.01065369e-05 -9.42951789e-05 2.00208228e-05 2.08518529e-04 3.27377109e-04 -6.94552163e-05 -5.43430056e-06 5.23691755e-05 -1.11339911e-05 3.91303561e-05 -1.74435933e-05 -4.01153259e-06 -4.40365665e-05 1.23983843e-05 2.00208228e-05 -1.36533544e-06 -4.30118419e-05 -6.94552163e-05 4.98963986e-06 1.12095207e-06 -1.11339911e-05 6.88979274e-07 -9.14254730e-06 1.11255883e-06 -4.16140141e-05 -4.55922748e-04 1.19793072e-04 2.08518529e-04 -4.30118419e-05 -4.15310618e-04 -7.21441628e-04 1.48814272e-04 2.13075514e-05 -1.08026825e-04 2.22830686e-05 -9.03202781e-05 3.89172350e-05 -6.71980139e-05 -7.36220810e-04 2.08518529e-04 3.27377109e-04 -6.94552163e-05 -7.21441628e-04 -1.13351905e-03 2.40304228e-04 1.91469746e-05 -1.83212005e-04 3.89172350e-05 -1.37038000e-04 6.10258930e-05 1.38611679e-05 1.51862826e-04 -4.30118419e-05 -6.94552163e-05 4.98963986e-06 1.48814272e-04 2.40304228e-04 -1.81086280e-05 -3.94951302e-06 3.89172350e-05 -2.57144916e-06 3.19020671e-05 -4.15235781e-06 -1.37449783e-06 -1.51741934e-05 6.14988584e-06 5.43430056e-06 -1.12095207e-06 -2.13075514e-05 -1.91469746e-05 3.94951302e-06 -1.55492865e-06 -4.75485994e-06 9.80801488e-07 -1.63767176e-06 7.05640619e-07 1.07009451e-05 1.18136389e-04 -3.08304303e-05 -5.23691755e-05 1.11339911e-05 1.08026825e-04 1.83212005e-04 -3.89172350e-05 -4.75485994e-06 2.68341828e-05 -5.71761474e-06 2.18056205e-05 -9.73749195e-06 -2.20732114e-06 -2.43684035e-05 6.35950003e-06 1.11339911e-05 -6.88979274e-07 -2.22830686e-05 -3.89172350e-05 2.57144916e-06 9.80801488e-07 -5.71761474e-06 2.94961635e-07 -5.12586607e-06 5.51232994e-07 8.27228784e-06 9.13244769e-05 -2.58400981e-05 -3.91303561e-05 9.14254730e-06 9.03202781e-05 1.37038000e-04 -3.19020671e-05 -1.63767176e-06 2.18056205e-05 -5.12586607e-06 1.55290310e-05 -7.77021155e-06 -3.56436646e-06 -3.93499246e-05 1.11339911e-05 1.74435933e-05 -1.11255883e-06 -3.89172350e-05 -6.10258930e-05 4.15235781e-06 7.05640619e-07 -9.73749195e-06 5.51232994e-07 -7.77021155e-06 8.43724235e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 -1 -1 169 + 8.57768566e-05 8.41990614e-04 -2.48427046e-04 -2.35324440e-04 2.48582088e-04 8.36983153e-04 7.92838764e-04 -8.37505510e-04 2.29053933e-06 7.40843478e-05 -7.82580927e-05 -4.06498094e-06 -7.41305834e-05 8.41990614e-04 8.16293541e-03 -2.39332587e-03 -2.26709644e-03 2.39481953e-03 8.03279270e-03 7.60912500e-03 -8.03780592e-03 1.95176894e-05 6.31272850e-04 -6.66837338e-04 -3.46377093e-05 -6.31666824e-04 2.48427046e-04 2.39332587e-03 -6.33685904e-04 -7.04258034e-04 7.43934342e-04 2.11421572e-03 2.35921009e-03 -2.49212266e-03 -4.32954611e-05 1.72052334e-04 -1.81745375e-04 -1.16856650e-05 -2.13104361e-04 2.35324440e-04 2.26709644e-03 -7.04258034e-04 -5.57329426e-04 7.04697558e-04 2.35921009e-03 1.85842741e-03 -2.36068246e-03 2.98620206e-05 1.58541406e-04 -2.13104361e-04 -5.19884484e-05 -1.58640351e-04 -2.48582088e-04 -2.39481953e-03 7.43934342e-04 7.04697558e-04 -6.34614185e-04 -2.49212266e-03 -2.36068246e-03 2.11732539e-03 -3.15443794e-05 -2.13104361e-04 1.81912736e-04 -3.15314443e-05 1.72318246e-04 -8.36983153e-04 -8.03279270e-03 2.11421572e-03 2.35921009e-03 -2.49212266e-03 -7.04497929e-03 -7.89645526e-03 8.34132372e-03 1.48471421e-04 -5.42920590e-04 5.73507511e-04 3.74220438e-05 6.82443038e-04 -7.92838764e-04 -7.60912500e-03 2.35921009e-03 1.85842741e-03 -2.36068246e-03 -7.89645526e-03 -6.18883640e-03 7.90138339e-03 -1.00282031e-04 -4.99204689e-04 6.82443038e-04 1.74545125e-04 4.99516240e-04 8.37505510e-04 8.03780592e-03 -2.49212266e-03 -2.36068246e-03 2.11732539e-03 8.34132372e-03 7.90138339e-03 -7.05538759e-03 1.05931694e-04 6.82443038e-04 -5.74048777e-04 1.09487806e-04 -5.43772143e-04 2.29053933e-06 1.95176894e-05 4.32954611e-05 -2.98620206e-05 3.15443794e-05 -1.48471421e-04 1.00282031e-04 -1.05931694e-04 -2.41677159e-05 -6.98949032e-06 7.38326243e-06 -8.48298003e-07 -1.54698944e-05 7.40843478e-05 6.31272850e-04 -1.72052334e-04 -1.58541406e-04 2.13104361e-04 5.42920590e-04 4.99204689e-04 -6.82443038e-04 -6.98949032e-06 -7.27060136e-06 -3.90008217e-06 -1.38376198e-05 -2.28822006e-06 -7.82580927e-05 -6.66837338e-04 1.81745375e-04 2.13104361e-04 -1.81912736e-04 -5.73507511e-04 -6.82443038e-04 5.74048777e-04 7.38326243e-06 -3.90008217e-06 -6.84287615e-06 -1.27659499e-05 3.91869947e-06 -4.06498094e-06 -3.46377093e-05 1.16856650e-05 5.19884484e-05 3.15314443e-05 -3.74220438e-05 -1.74545125e-04 -1.09487806e-04 -8.48298003e-07 -1.38376198e-05 -1.27659499e-05 -2.32094341e-05 8.76805483e-07 -7.41305834e-05 -6.31666824e-04 2.13104361e-04 1.58640351e-04 -1.72318246e-04 -6.82443038e-04 -4.99516240e-04 5.43772143e-04 -1.54698944e-05 -2.28822006e-06 3.91869947e-06 8.76805483e-07 -7.26774612e-06 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 -1 0 169 + 1.67040746e-06 1.78624206e-05 -5.24561892e-06 -1.46731805e-06 8.75052771e-06 1.75777090e-05 4.91688211e-06 -2.93224178e-05 -7.60063885e-07 8.55391824e-07 -5.10123203e-06 -4.13519749e-06 -1.42692978e-06 1.78624206e-05 1.90653702e-04 -5.62853712e-05 -1.57442892e-05 9.38929624e-05 1.88110844e-04 5.26188505e-05 -3.13798844e-04 -8.18914084e-06 9.21623071e-06 -5.49621004e-05 -4.45537741e-05 -1.53741405e-05 5.24561892e-06 5.62853712e-05 -1.56959014e-05 -4.64606177e-06 2.77073482e-05 5.29173994e-05 1.56375033e-05 -9.32561316e-05 -3.06498792e-06 2.57589943e-06 -1.53616861e-05 -1.32005509e-05 -4.55510513e-06 1.46731805e-06 1.57442892e-05 -4.64606177e-06 -3.85975541e-07 7.75037090e-06 1.56375033e-05 1.38794758e-06 -2.60858457e-05 -5.89366463e-07 2.10702238e-07 -4.55510513e-06 -3.84721041e-06 -3.51484888e-07 -8.75052771e-06 -9.38929624e-05 2.77073482e-05 7.75037090e-06 -4.53066363e-05 -9.32561316e-05 -2.60858457e-05 1.52579863e-04 3.51475779e-06 -4.55510513e-06 2.66118041e-05 2.10979403e-05 7.44392249e-06 -1.75777090e-05 -1.88110844e-04 5.29173994e-05 1.56375033e-05 -9.32561316e-05 -1.77722414e-04 -5.24374254e-05 3.12716894e-04 1.03041973e-05 -8.73324516e-06 5.20817580e-05 4.46706489e-05 1.54144704e-05 -4.91688211e-06 -5.26188505e-05 1.56375033e-05 1.38794758e-06 -2.60858457e-05 -5.24374254e-05 -4.92809090e-06 8.74739761e-05 2.00388657e-06 -7.71661783e-07 1.54144704e-05 1.30025510e-05 1.28725474e-06 2.93224178e-05 3.13798844e-04 -9.32561316e-05 -2.60858457e-05 1.52579863e-04 3.12716894e-04 8.74739761e-05 -5.11921737e-04 -1.19504186e-05 1.54144704e-05 -9.01129596e-05 -7.14932354e-05 -2.52066295e-05 -7.60063885e-07 -8.18914084e-06 3.06498792e-06 5.89366463e-07 -3.51475779e-06 -1.03041973e-05 -2.00388657e-06 1.19504186e-05 -3.99586945e-07 -4.56556858e-07 2.72273174e-06 1.41664599e-06 4.88841067e-07 8.55391824e-07 9.21623071e-06 -2.57589943e-06 -2.10702238e-07 4.55510513e-06 8.73324516e-06 7.71661783e-07 -1.54144704e-05 -4.56556858e-07 1.03594882e-07 -2.54092234e-06 -2.28180598e-06 -1.91807958e-07 -5.10123203e-06 -5.49621004e-05 1.53616861e-05 4.55510513e-06 -2.66118041e-05 -5.20817580e-05 -1.54144704e-05 9.01129596e-05 2.72273174e-06 -2.54092234e-06 1.48306204e-05 1.24818306e-05 4.40696451e-06 -4.13519749e-06 -4.45537741e-05 1.32005509e-05 3.84721041e-06 -2.10979403e-05 -4.46706489e-05 -1.30025510e-05 7.14932354e-05 1.41664599e-06 -2.28180598e-06 1.24818306e-05 9.62393666e-06 3.64893279e-06 -1.42692978e-06 -1.53741405e-05 4.55510513e-06 3.51484888e-07 -7.44392249e-06 -1.54144704e-05 -1.28725474e-06 2.52066295e-05 4.88841067e-07 -1.91807958e-07 4.40696451e-06 3.64893279e-06 3.08579298e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 0 -2 169 + 2.66142787e-06 2.88592938e-05 -1.37004610e-05 -7.78266508e-06 2.73665718e-06 4.67610013e-05 2.65629902e-05 -9.34047621e-06 6.11669150e-06 7.35094246e-06 -2.58484841e-06 1.82972235e-06 -1.46834544e-06 2.88592938e-05 3.12336818e-04 -1.49110519e-04 -8.47035170e-05 2.97847184e-05 5.07578049e-04 2.88334090e-04 -1.01388348e-04 6.69221508e-05 8.04259754e-05 -2.82805852e-05 2.00188214e-05 -1.60650305e-05 1.37004610e-05 1.49110519e-04 -6.95961486e-05 -4.04817100e-05 1.42347848e-05 2.38811397e-04 1.38811095e-04 -4.88108349e-05 3.02042161e-05 3.76513127e-05 -1.32395181e-05 9.60507949e-06 -7.70804092e-06 7.78266508e-06 8.47035170e-05 -4.04817100e-05 -2.13288728e-05 8.08619232e-06 1.38811095e-04 7.33037292e-05 -2.77274159e-05 1.87811598e-05 2.02706280e-05 -7.70804092e-06 4.51898123e-06 -4.04904329e-06 -2.73665718e-06 -2.97847184e-05 1.42347848e-05 8.08619232e-06 -1.17627614e-06 -4.88108349e-05 -2.77274159e-05 4.20081784e-06 -6.60411250e-06 -7.70804092e-06 1.06046897e-06 -2.24818356e-06 6.02408550e-07 -4.67610013e-05 -5.07578049e-04 2.38811397e-04 1.38811095e-04 -4.88108349e-05 -8.16430466e-04 -4.74246765e-04 1.66761746e-04 -1.04493978e-04 -1.30098449e-04 4.57471637e-05 -3.31624017e-05 2.66127053e-05 -2.65629902e-05 -2.88334090e-04 1.38811095e-04 7.33037292e-05 -2.77274159e-05 -4.74246765e-04 -2.50975119e-04 9.47304486e-05 -6.47836573e-05 -7.01690746e-05 2.66127053e-05 -1.57060912e-05 1.40162219e-05 9.34047621e-06 1.01388348e-04 -4.88108349e-05 -2.77274159e-05 4.20081784e-06 1.66761746e-04 9.47304486e-05 -1.48856897e-05 2.27801992e-05 2.66127053e-05 -3.84427119e-06 7.72552068e-06 -2.18377142e-06 6.11669150e-06 6.69221508e-05 -3.02042161e-05 -1.87811598e-05 6.60411250e-06 1.04493978e-04 6.47836573e-05 -2.27801992e-05 1.22078917e-05 1.69708410e-05 -5.96754111e-06 4.62743732e-06 -3.71350141e-06 7.35094246e-06 8.04259754e-05 -3.76513127e-05 -2.02706280e-05 7.70804092e-06 1.30098449e-04 7.01690746e-05 -2.66127053e-05 1.69708410e-05 1.88979543e-05 -7.21306642e-06 4.30282816e-06 -3.87469038e-06 -2.58484841e-06 -2.82805852e-05 1.32395181e-05 7.70804092e-06 -1.06046897e-06 -4.57471637e-05 -2.66127053e-05 3.84427119e-06 -5.96754111e-06 -7.21306642e-06 9.21382270e-07 -2.17078698e-06 5.42831568e-07 1.82972235e-06 2.00188214e-05 -9.60507949e-06 -4.51898123e-06 2.24818356e-06 3.31624017e-05 1.57060912e-05 -7.72552068e-06 4.62743732e-06 4.30282816e-06 -2.17078698e-06 7.38311070e-07 -1.04631055e-06 -1.46834544e-06 -1.60650305e-05 7.70804092e-06 4.04904329e-06 -6.02408550e-07 -2.66127053e-05 -1.40162219e-05 2.18377142e-06 -3.71350141e-06 -3.87469038e-06 5.42831568e-07 -1.04631055e-06 2.74151682e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 +3 0 -1 169 + 1.68020213e-06 1.79704594e-05 -8.79657498e-06 -1.47559147e-06 5.27848835e-06 2.94838959e-05 4.94580962e-06 -1.76921587e-05 3.97745272e-06 1.43397143e-06 -5.12960507e-06 -1.41876836e-06 -8.60471433e-07 1.79704594e-05 1.91841444e-04 -9.44050684e-05 -1.58360855e-05 5.66488724e-05 3.15585851e-04 5.29383072e-05 -1.89371004e-04 4.28630375e-05 1.54531997e-05 -5.52792126e-05 -1.52893638e-05 -9.27287434e-06 8.79657498e-06 9.44050684e-05 -4.55160276e-05 -7.78956004e-06 2.78648276e-05 1.53323946e-04 2.62243435e-05 -9.38097669e-05 2.00956761e-05 7.47593367e-06 -2.67429228e-05 -7.55087962e-06 -4.57954686e-06 1.47559147e-06 1.58360855e-05 -7.78956004e-06 -3.86097363e-07 4.67421718e-06 2.62243435e-05 1.38946126e-06 -1.57362260e-05 3.64092729e-06 3.51069074e-07 -4.57954686e-06 -1.42248963e-06 -2.10663130e-07 -5.27848835e-06 -5.66488724e-05 2.78648276e-05 4.67421718e-06 -1.58000465e-05 -9.38097669e-05 -1.57362260e-05 5.32820837e-05 -1.30243314e-05 -4.57954686e-06 1.54528283e-05 3.97345603e-06 2.59215225e-06 -2.94838959e-05 -3.15585851e-04 1.53323946e-04 2.62243435e-05 -9.38097669e-05 -5.14546116e-04 -8.79600832e-05 3.14650962e-04 -6.81361293e-05 -2.53219728e-05 9.05818049e-05 2.55591114e-05 1.55013925e-05 -4.94580962e-06 -5.29383072e-05 2.62243435e-05 1.38946126e-06 -1.57362260e-05 -8.79600832e-05 -4.93679389e-06 5.27814831e-05 -1.23146882e-05 -1.28698514e-06 1.55013925e-05 4.79846401e-06 7.72270582e-07 1.76921587e-05 1.89371004e-04 -9.38097669e-05 -1.57362260e-05 5.32820837e-05 3.14650962e-04 5.27814831e-05 -1.78991843e-04 4.40521239e-05 1.55013925e-05 -5.24052080e-05 -1.35090175e-05 -8.79077117e-06 3.97745272e-06 4.28630375e-05 -2.00956761e-05 -3.64092729e-06 1.30243314e-05 6.81361293e-05 1.23146882e-05 -4.40521239e-05 8.35902368e-06 3.41507701e-06 -1.22164194e-05 -3.65057610e-06 -2.21404460e-06 1.43397143e-06 1.54531997e-05 -7.47593367e-06 -3.51069074e-07 4.57954686e-06 2.53219728e-05 1.28698514e-06 -1.55013925e-05 3.41507701e-06 3.07607183e-07 -4.42724079e-06 -1.40937014e-06 -1.91444880e-07 -5.12960507e-06 -5.52792126e-05 2.67429228e-05 4.57954686e-06 -1.54528283e-05 -9.05818049e-05 -1.55013925e-05 5.24052080e-05 -1.22164194e-05 -4.42724079e-06 1.49071138e-05 3.90726724e-06 2.55515739e-06 -1.41876836e-06 -1.52893638e-05 7.55087962e-06 1.42248963e-06 -3.97345603e-06 -2.55591114e-05 -4.79846401e-06 1.35090175e-05 -3.65057610e-06 -1.40937014e-06 3.90726724e-06 8.85788363e-07 7.50569063e-07 -8.60471433e-07 -9.27287434e-06 4.57954686e-06 2.10663130e-07 -2.59215225e-06 -1.55013925e-05 -7.72270582e-07 8.79077117e-06 -2.21404460e-06 -1.91444880e-07 2.55515739e-06 7.50569063e-07 1.03443981e-07 + 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 169 169 169 169 169 169 169 169 169 169 169 169 169 diff --git a/tests/03_NAO_multik/58_NO_MD_2O/INPUT b/tests/03_NAO_multik/58_NO_MD_2O/INPUT index 3ac7645b66..4fafba7b6a 100644 --- a/tests/03_NAO_multik/58_NO_MD_2O/INPUT +++ b/tests/03_NAO_multik/58_NO_MD_2O/INPUT @@ -7,19 +7,19 @@ calculation md #Parameters (Accuracy) ecutwfc 10 -scf_nmax 50 -scf_thr 1.0e-6 +scf_nmax 50 +scf_thr 1.0e-6 basis_type lcao -md_nstep 3 +md_nstep 3 -cal_stress 1 +cal_stress 1 stress_thr 1e-6 -cal_force 1 +cal_force 1 force_thr_ev 1.0e-3 -smearing_method gaussian -smearing_sigma 0.002 +smearing_method gaussian +smearing_sigma 0.002 mixing_type broyden mixing_beta 0.7 @@ -29,6 +29,5 @@ init_vel 1 chg_extrap second-order -read_file_dir ./ pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB diff --git a/tests/03_NAO_multik/58_NO_MD_2O/result.ref b/tests/03_NAO_multik/58_NO_MD_2O/result.ref index 643dc101ab..0650225aaf 100644 --- a/tests/03_NAO_multik/58_NO_MD_2O/result.ref +++ b/tests/03_NAO_multik/58_NO_MD_2O/result.ref @@ -1,5 +1,5 @@ -etotref -204.0642782467743 -etotperatomref -102.0321391234 -totalforceref 4.405896 -totalstressref 1503.234347 -totaltimeref 8.31 +etotref -203.9507557549832 +etotperatomref -101.9753778775 +totalforceref 6.437138 +totalstressref 1540.840989 +totaltimeref 2.21 diff --git a/tests/02_NAO_Gamma/006_NO_GO_OH/INPUT b/tests/03_NAO_multik/59_NO_KP_initHR/INPUT similarity index 70% rename from tests/02_NAO_Gamma/006_NO_GO_OH/INPUT rename to tests/03_NAO_multik/59_NO_KP_initHR/INPUT index 0446a0c709..b146d03d7a 100644 --- a/tests/02_NAO_Gamma/006_NO_GO_OH/INPUT +++ b/tests/03_NAO_multik/59_NO_KP_initHR/INPUT @@ -4,14 +4,11 @@ suffix autotest calculation scf nbands 6 -symmetry 1 -pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB -gamma_only 1 +symmetry 0 #Parameters (2.Iteration) ecutwfc 20 -scf_thr 1e-8 +scf_thr 1e-6 scf_nmax 100 @@ -22,15 +19,12 @@ basis_type lcao smearing_method gauss smearing_sigma 0.002 -out_mat_hs 1 5 -out_ndigits 5 #Parameters (5.Mixing) mixing_type broyden mixing_beta 0.7 -mixing_gg0 1.5 - -ks_solver scalapack_gvx +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB -bx 2 -by 2 -bz 2 +#out_mat_hs2 1 +init_chg hr +read_file_dir ./ diff --git a/tests/03_NAO_multik/33_NO_KP_OW/KPT b/tests/03_NAO_multik/59_NO_KP_initHR/KPT similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/KPT rename to tests/03_NAO_multik/59_NO_KP_initHR/KPT diff --git a/tests/03_NAO_multik/59_NO_KP_initHR/README b/tests/03_NAO_multik/59_NO_KP_initHR/README new file mode 100644 index 0000000000..20da67ae65 --- /dev/null +++ b/tests/03_NAO_multik/59_NO_KP_initHR/README @@ -0,0 +1 @@ +test upf201 pseudopotential, init charge from HR diff --git a/tests/03_NAO_multik/59_NO_KP_initHR/STRU b/tests/03_NAO_multik/59_NO_KP_initHR/STRU new file mode 100644 index 0000000000..ea028ef206 --- /dev/null +++ b/tests/03_NAO_multik/59_NO_KP_initHR/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28 Si.pz-n-nc.UPF upf201 + +NUMERICAL_ORBITAL +Si_gga_8au_60Ry_2s2p1d.orb + +LATTICE_CONSTANT +20.2 // add lattice constant + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Direct + +Si // Element type +0.0 // magnetism +2 +0.00 0.00 0.00 1 1 1 +0.25 0.25 0.25 1 1 1 diff --git a/tests/03_NAO_multik/59_NO_KP_initHR/hrs1_nao.csr b/tests/03_NAO_multik/59_NO_KP_initHR/hrs1_nao.csr new file mode 100644 index 0000000000..72c436a70f --- /dev/null +++ b/tests/03_NAO_multik/59_NO_KP_initHR/hrs1_nao.csr @@ -0,0 +1,55 @@ +STEP: 0 +Matrix Dimension of H(R): 26 +Matrix number of H(R): 13 +-1 0 0 491 + -3.08720237e-05 -3.07390885e-04 -1.04971511e-04 1.40312477e-06 1.04971511e-04 3.59371792e-04 -4.82934036e-06 -3.59371792e-04 -9.57555071e-06 1.01771600e-06 3.34354066e-05 1.65853403e-05 -1.01771600e-06 -1.10678938e-02 -4.01898009e-02 -1.59965704e-02 -1.59965704e-02 1.59965704e-02 3.48221871e-02 3.48221871e-02 -3.48221871e-02 2.30243503e-03 -2.30243503e-03 -2.30243503e-03 -3.07390885e-04 -3.02853625e-03 -1.01904693e-03 1.52691305e-05 1.01904693e-03 3.47759038e-03 -5.25303803e-05 -3.47759038e-03 -7.34123089e-05 1.11116241e-05 2.57169624e-04 1.27153849e-04 -1.11116241e-05 -4.02101705e-02 -8.51941384e-04 -2.06513817e-02 -2.06513817e-02 2.06513817e-02 -1.28347617e-02 -1.28347617e-02 1.28347617e-02 5.95672459e-03 -5.95672459e-03 -5.95672459e-03 1.04971511e-04 1.01904693e-03 3.23522367e-04 -5.62416573e-06 -3.63336653e-04 -1.09979124e-03 1.94156142e-05 1.23944563e-03 4.82254533e-06 -3.96066075e-06 -7.77363679e-05 -4.83364399e-05 4.11041279e-06 1.60075545e-02 2.06367891e-02 9.20684060e-03 1.62457954e-02 -1.62457954e-02 -7.47144879e-03 -1.78038327e-02 1.78038327e-02 2.69551701e-03 -3.61086424e-03 3.61086424e-03 5.94234981e-03 1.40312477e-06 1.52691305e-05 5.62416573e-06 -4.12471245e-05 -5.62416573e-06 -1.93518153e-05 1.44520599e-04 1.93518153e-05 9.71049589e-07 -2.10524692e-05 -4.00502527e-06 -1.68190722e-06 2.10524692e-05 1.60075545e-02 2.06367891e-02 1.62457954e-02 9.20684060e-03 -1.62457954e-02 -1.78038327e-02 -7.47144879e-03 1.78038327e-02 -1.34775851e-03 -3.61086424e-03 5.94234981e-03 2.33438621e-03 3.61086424e-03 -1.04971511e-04 -1.01904693e-03 -3.63336653e-04 5.62416573e-06 3.23522367e-04 1.23944563e-03 -1.94156142e-05 -1.09979124e-03 -3.94493122e-05 4.11041279e-06 7.77363679e-05 2.83446667e-05 -3.96066075e-06 -1.60075545e-02 -2.06367891e-02 -1.62457954e-02 -1.62457954e-02 9.20684060e-03 1.78038327e-02 1.78038327e-02 -7.47144879e-03 1.34775851e-03 5.94234981e-03 -3.61086424e-03 2.33438621e-03 -3.61086424e-03 -3.59371792e-04 -3.47759038e-03 -1.09979124e-03 1.93518153e-05 1.23944563e-03 3.72486395e-03 -6.67426116e-05 -4.21589662e-03 -7.62760775e-06 1.37086540e-05 2.41287214e-04 1.54060042e-04 -1.42204009e-05 -3.48613875e-02 1.27621922e-02 -7.53206233e-03 -1.78560844e-02 1.78560844e-02 -2.05536306e-02 -2.16538149e-02 2.16538149e-02 -7.11790393e-03 9.20772072e-04 -9.20772072e-04 -7.07642391e-03 -4.82934036e-06 -5.25303803e-05 -1.94156142e-05 1.44520599e-04 1.94156142e-05 6.67426116e-05 -5.07533292e-04 -6.67426116e-05 -3.38618226e-06 7.40430828e-05 1.39044038e-05 5.86503972e-06 -7.40430828e-05 -3.48613875e-02 1.27621922e-02 -1.78560844e-02 -7.53206233e-03 1.78560844e-02 -2.16538149e-02 -2.05536306e-02 2.16538149e-02 3.55895196e-03 9.20772072e-04 -7.07642391e-03 -6.16428562e-03 -9.20772072e-04 3.59371792e-04 3.47759038e-03 1.23944563e-03 -1.93518153e-05 -1.09979124e-03 -4.21589662e-03 6.67426116e-05 3.72486395e-03 1.29606106e-04 -1.42204009e-05 -2.41287214e-04 -8.36357232e-05 1.37086540e-05 3.48613875e-02 -1.27621922e-02 1.78560844e-02 1.78560844e-02 -7.53206233e-03 2.16538149e-02 2.16538149e-02 -2.05536306e-02 -3.55895196e-03 -7.07642391e-03 9.20772072e-04 -6.16428562e-03 9.20772072e-04 -9.57555071e-06 -7.34123089e-05 -4.82254533e-06 9.71049589e-07 3.94493122e-05 7.62760775e-06 -3.38618226e-06 -1.29606106e-04 1.60708725e-05 5.81086888e-07 -1.86919672e-05 -2.61781210e-06 -7.73544764e-07 -2.69864160e-03 1.34932080e-03 -1.34932080e-03 7.12031599e-03 -3.56015800e-03 3.56015800e-03 2.45879056e-03 7.22168763e-04 -7.22168763e-04 1.44433753e-03 -1.01771600e-06 -1.11116241e-05 -3.96066075e-06 2.10524692e-05 4.11041279e-06 1.37086540e-05 -7.40430828e-05 -1.42204009e-05 -5.81086888e-07 7.46646087e-06 2.81468585e-06 1.22870323e-06 -8.65011321e-06 2.28290009e-03 5.88060035e-03 3.56615668e-03 3.56615668e-03 -5.90018653e-03 -8.44999113e-04 -8.44999113e-04 7.00213894e-03 7.22214326e-04 -4.89935284e-03 6.10850862e-03 1.25091191e-03 6.10850862e-03 3.34354066e-05 2.57169624e-04 7.77363679e-05 -4.00502527e-06 -7.77363679e-05 -2.41287214e-04 1.39044038e-05 2.41287214e-04 -1.86919672e-05 -2.81468585e-06 6.28234069e-05 3.23754368e-05 2.81468585e-06 -2.28290009e-03 -5.88060035e-03 -3.56615668e-03 -5.90018653e-03 3.56615668e-03 8.44999113e-04 7.00213894e-03 -8.44999113e-04 -7.22214326e-04 6.10850862e-03 -4.89935284e-03 1.25091191e-03 -6.10850862e-03 1.65853403e-05 1.27153849e-04 4.83364399e-05 -1.68190722e-06 -2.83446667e-05 -1.54060042e-04 5.86503972e-06 8.36357232e-05 -2.61781210e-06 -1.22870323e-06 3.23754368e-05 1.90936616e-05 1.11758762e-06 -2.33709218e-03 -2.33709218e-03 6.16637453e-03 6.16637453e-03 1.25083299e-03 1.25083299e-03 2.45879056e-03 1.01771600e-06 1.11116241e-05 4.11041279e-06 -2.10524692e-05 -3.96066075e-06 -1.42204009e-05 7.40430828e-05 1.37086540e-05 7.73544764e-07 -8.65011321e-06 -2.81468585e-06 -1.11758762e-06 7.46646087e-06 -2.28290009e-03 -5.88060035e-03 -5.90018653e-03 -3.56615668e-03 3.56615668e-03 7.00213894e-03 8.44999113e-04 -8.44999113e-04 1.44442865e-03 6.10850862e-03 -6.10850862e-03 -4.89935284e-03 -3.08602939e-05 -3.07263521e-04 -1.04923873e-04 -1.41324097e-06 1.04923873e-04 3.59208493e-04 4.86525398e-06 -3.59208493e-04 -9.56706174e-06 -1.02478251e-06 3.34006108e-05 1.65706370e-05 1.02478251e-06 -3.07263521e-04 -3.02715668e-03 -1.01852759e-03 -1.53820756e-05 1.01852759e-03 3.47581608e-03 5.29298815e-05 -3.47581608e-03 -7.33191558e-05 -1.11912408e-05 2.56788439e-04 1.26992503e-04 1.11912408e-05 1.04923873e-04 1.01852759e-03 3.23331675e-04 5.66366604e-06 -3.63143075e-04 -1.09913471e-03 -1.95566627e-05 1.23877805e-03 4.79009339e-06 3.98776946e-06 -7.75974336e-05 -4.82772103e-05 -4.13755885e-06 -1.41324097e-06 -1.53820756e-05 -5.66366604e-06 -4.12162075e-05 5.66366604e-06 1.94925310e-05 1.44413999e-04 -1.94925310e-05 -9.77693072e-07 -2.10289351e-05 4.03239561e-06 1.69341407e-06 2.10289351e-05 -1.04923873e-04 -1.01852759e-03 -3.63143075e-04 -5.66366604e-06 3.23331675e-04 1.23877805e-03 1.95566627e-05 -1.09913471e-03 -3.94142439e-05 -4.13755885e-06 7.75974336e-05 2.82869477e-05 3.98776946e-06 -3.59208493e-04 -3.47581608e-03 -1.09913471e-03 -1.94925310e-05 1.23877805e-03 3.72261408e-03 6.72429653e-05 -4.21360468e-03 -7.51561916e-06 -1.38061213e-05 2.40805687e-04 1.53853854e-04 1.43184607e-05 4.86525398e-06 5.29298815e-05 1.95566627e-05 1.44413999e-04 -1.95566627e-05 -6.72429653e-05 -5.07169119e-04 6.72429653e-05 3.41053946e-06 7.39612442e-05 -1.40030592e-05 -5.90722763e-06 -7.39612442e-05 3.59208493e-04 3.47581608e-03 1.23877805e-03 1.94925310e-05 -1.09913471e-03 -4.21360468e-03 -6.72429653e-05 3.72261408e-03 1.29483537e-04 1.43184607e-05 -2.40805687e-04 -8.34356441e-05 -1.38061213e-05 -9.56706174e-06 -7.33191558e-05 -4.79009339e-06 -9.77693072e-07 3.94142439e-05 7.51561916e-06 3.41053946e-06 -1.29483537e-04 1.60757249e-05 -5.85506643e-07 -1.87156494e-05 -2.62806909e-06 7.77681284e-07 1.02478251e-06 1.11912408e-05 3.98776946e-06 2.10289351e-05 -4.13755885e-06 -1.38061213e-05 -7.39612442e-05 1.43184607e-05 5.85506643e-07 7.44879307e-06 -2.83293240e-06 -1.23603141e-06 -8.63228531e-06 3.34006108e-05 2.56788439e-04 7.75974336e-05 4.03239561e-06 -7.75974336e-05 -2.40805687e-04 -1.40030592e-05 2.40805687e-04 -1.87156494e-05 2.83293240e-06 6.29222274e-05 3.24164557e-05 -2.83293240e-06 1.65706370e-05 1.26992503e-04 4.82772103e-05 1.69341407e-06 -2.82869477e-05 -1.53853854e-04 -5.90722763e-06 8.34356441e-05 -2.62806909e-06 1.23603141e-06 3.24164557e-05 1.91103577e-05 -1.12507933e-06 -1.02478251e-06 -1.11912408e-05 -4.13755885e-06 -2.10289351e-05 3.98776946e-06 1.43184607e-05 7.39612442e-05 -1.38061213e-05 -7.77681284e-07 -8.63228531e-06 2.83293240e-06 1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 24 48 73 99 125 150 176 202 225 251 277 297 322 335 348 361 374 387 400 413 426 439 452 465 478 491 +-1 0 1 338 + -3.08720237e-05 -3.07390885e-04 -1.04971511e-04 -1.04971511e-04 -1.40312477e-06 3.59371792e-04 3.59371792e-04 4.82934036e-06 -9.57555071e-06 -3.34354066e-05 -1.01771600e-06 -1.65853403e-05 -1.01771600e-06 -3.07390885e-04 -3.02853625e-03 -1.01904693e-03 -1.01904693e-03 -1.52691305e-05 3.47759038e-03 3.47759038e-03 5.25303803e-05 -7.34123089e-05 -2.57169624e-04 -1.11116241e-05 -1.27153849e-04 -1.11116241e-05 1.04971511e-04 1.01904693e-03 3.23522367e-04 3.63336653e-04 5.62416573e-06 -1.09979124e-03 -1.23944563e-03 -1.94156142e-05 4.82254533e-06 7.77363679e-05 3.96066075e-06 4.83364399e-05 4.11041279e-06 1.04971511e-04 1.01904693e-03 3.63336653e-04 3.23522367e-04 5.62416573e-06 -1.23944563e-03 -1.09979124e-03 -1.94156142e-05 3.94493122e-05 7.77363679e-05 4.11041279e-06 2.83446667e-05 3.96066075e-06 -1.40312477e-06 -1.52691305e-05 -5.62416573e-06 -5.62416573e-06 -4.12471245e-05 1.93518153e-05 1.93518153e-05 1.44520599e-04 -9.71049589e-07 -4.00502527e-06 -2.10524692e-05 -1.68190722e-06 -2.10524692e-05 -3.59371792e-04 -3.47759038e-03 -1.09979124e-03 -1.23944563e-03 -1.93518153e-05 3.72486395e-03 4.21589662e-03 6.67426116e-05 -7.62760775e-06 -2.41287214e-04 -1.37086540e-05 -1.54060042e-04 -1.42204009e-05 -3.59371792e-04 -3.47759038e-03 -1.23944563e-03 -1.09979124e-03 -1.93518153e-05 4.21589662e-03 3.72486395e-03 6.67426116e-05 -1.29606106e-04 -2.41287214e-04 -1.42204009e-05 -8.36357232e-05 -1.37086540e-05 4.82934036e-06 5.25303803e-05 1.94156142e-05 1.94156142e-05 1.44520599e-04 -6.67426116e-05 -6.67426116e-05 -5.07533292e-04 3.38618226e-06 1.39044038e-05 7.40430828e-05 5.86503972e-06 7.40430828e-05 -9.57555071e-06 -7.34123089e-05 -4.82254533e-06 -3.94493122e-05 -9.71049589e-07 7.62760775e-06 1.29606106e-04 3.38618226e-06 1.60708725e-05 1.86919672e-05 -5.81086888e-07 2.61781210e-06 -7.73544764e-07 -3.34354066e-05 -2.57169624e-04 -7.77363679e-05 -7.77363679e-05 -4.00502527e-06 2.41287214e-04 2.41287214e-04 1.39044038e-05 1.86919672e-05 6.28234069e-05 -2.81468585e-06 3.23754368e-05 -2.81468585e-06 1.01771600e-06 1.11116241e-05 3.96066075e-06 4.11041279e-06 2.10524692e-05 -1.37086540e-05 -1.42204009e-05 -7.40430828e-05 5.81086888e-07 2.81468585e-06 7.46646087e-06 1.22870323e-06 8.65011321e-06 -1.65853403e-05 -1.27153849e-04 -4.83364399e-05 -2.83446667e-05 -1.68190722e-06 1.54060042e-04 8.36357232e-05 5.86503972e-06 2.61781210e-06 3.23754368e-05 -1.22870323e-06 1.90936616e-05 -1.11758762e-06 1.01771600e-06 1.11116241e-05 4.11041279e-06 3.96066075e-06 2.10524692e-05 -1.42204009e-05 -1.37086540e-05 -7.40430828e-05 7.73544764e-07 2.81468585e-06 8.65011321e-06 1.11758762e-06 7.46646087e-06 -3.08602939e-05 -3.07263521e-04 -1.04923873e-04 -1.04923873e-04 1.41324097e-06 3.59208493e-04 3.59208493e-04 -4.86525398e-06 -9.56706174e-06 -3.34006108e-05 1.02478251e-06 -1.65706370e-05 1.02478251e-06 -3.07263521e-04 -3.02715668e-03 -1.01852759e-03 -1.01852759e-03 1.53820756e-05 3.47581608e-03 3.47581608e-03 -5.29298815e-05 -7.33191558e-05 -2.56788439e-04 1.11912408e-05 -1.26992503e-04 1.11912408e-05 1.04923873e-04 1.01852759e-03 3.23331675e-04 3.63143075e-04 -5.66366604e-06 -1.09913471e-03 -1.23877805e-03 1.95566627e-05 4.79009339e-06 7.75974336e-05 -3.98776946e-06 4.82772103e-05 -4.13755885e-06 1.04923873e-04 1.01852759e-03 3.63143075e-04 3.23331675e-04 -5.66366604e-06 -1.23877805e-03 -1.09913471e-03 1.95566627e-05 3.94142439e-05 7.75974336e-05 -4.13755885e-06 2.82869477e-05 -3.98776946e-06 1.41324097e-06 1.53820756e-05 5.66366604e-06 5.66366604e-06 -4.12162075e-05 -1.94925310e-05 -1.94925310e-05 1.44413999e-04 9.77693072e-07 4.03239561e-06 -2.10289351e-05 1.69341407e-06 -2.10289351e-05 -3.59208493e-04 -3.47581608e-03 -1.09913471e-03 -1.23877805e-03 1.94925310e-05 3.72261408e-03 4.21360468e-03 -6.72429653e-05 -7.51561916e-06 -2.40805687e-04 1.38061213e-05 -1.53853854e-04 1.43184607e-05 -3.59208493e-04 -3.47581608e-03 -1.23877805e-03 -1.09913471e-03 1.94925310e-05 4.21360468e-03 3.72261408e-03 -6.72429653e-05 -1.29483537e-04 -2.40805687e-04 1.43184607e-05 -8.34356441e-05 1.38061213e-05 -4.86525398e-06 -5.29298815e-05 -1.95566627e-05 -1.95566627e-05 1.44413999e-04 6.72429653e-05 6.72429653e-05 -5.07169119e-04 -3.41053946e-06 -1.40030592e-05 7.39612442e-05 -5.90722763e-06 7.39612442e-05 -9.56706174e-06 -7.33191558e-05 -4.79009339e-06 -3.94142439e-05 9.77693072e-07 7.51561916e-06 1.29483537e-04 -3.41053946e-06 1.60757249e-05 1.87156494e-05 5.85506643e-07 2.62806909e-06 7.77681284e-07 -3.34006108e-05 -2.56788439e-04 -7.75974336e-05 -7.75974336e-05 4.03239561e-06 2.40805687e-04 2.40805687e-04 -1.40030592e-05 1.87156494e-05 6.29222274e-05 2.83293240e-06 3.24164557e-05 2.83293240e-06 -1.02478251e-06 -1.11912408e-05 -3.98776946e-06 -4.13755885e-06 2.10289351e-05 1.38061213e-05 1.43184607e-05 -7.39612442e-05 -5.85506643e-07 -2.83293240e-06 7.44879307e-06 -1.23603141e-06 8.63228531e-06 -1.65706370e-05 -1.26992503e-04 -4.82772103e-05 -2.82869477e-05 1.69341407e-06 1.53853854e-04 8.34356441e-05 -5.90722763e-06 2.62806909e-06 3.24164557e-05 1.23603141e-06 1.91103577e-05 1.12507933e-06 -1.02478251e-06 -1.11912408e-05 -4.13755885e-06 -3.98776946e-06 2.10289351e-05 1.43184607e-05 1.38061213e-05 -7.39612442e-05 -7.77681284e-07 -2.83293240e-06 8.63228531e-06 -1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +-1 1 0 314 + -3.08720237e-05 -3.07390885e-04 1.40312477e-06 -1.04971511e-04 1.04971511e-04 -4.82934036e-06 3.59371792e-04 -3.59371792e-04 1.91511014e-05 1.01771600e-06 -1.01771600e-06 3.34354066e-05 -3.07390885e-04 -3.02853625e-03 1.52691305e-05 -1.01904693e-03 1.01904693e-03 -5.25303803e-05 3.47759038e-03 -3.47759038e-03 1.46824618e-04 1.11116241e-05 -1.11116241e-05 2.57169624e-04 1.40312477e-06 1.52691305e-05 -4.12471245e-05 5.62416573e-06 -5.62416573e-06 1.44520599e-04 -1.93518153e-05 1.93518153e-05 -1.94209918e-06 -2.10524692e-05 2.10524692e-05 -4.00502527e-06 1.04971511e-04 1.01904693e-03 -5.62416573e-06 3.23522367e-04 -3.63336653e-04 1.94156142e-05 -1.09979124e-03 1.23944563e-03 -4.42718575e-05 -3.96066075e-06 4.11041279e-06 -1.99917732e-05 -7.77363679e-05 -1.04971511e-04 -1.01904693e-03 5.62416573e-06 -3.63336653e-04 3.23522367e-04 -1.94156142e-05 1.23944563e-03 -1.09979124e-03 4.42718575e-05 4.11041279e-06 -3.96066075e-06 -1.99917732e-05 7.77363679e-05 -4.82934036e-06 -5.25303803e-05 1.44520599e-04 -1.94156142e-05 1.94156142e-05 -5.07533292e-04 6.67426116e-05 -6.67426116e-05 6.77236452e-06 7.40430828e-05 -7.40430828e-05 1.39044038e-05 -3.59371792e-04 -3.47759038e-03 1.93518153e-05 -1.09979124e-03 1.23944563e-03 -6.67426116e-05 3.72486395e-03 -4.21589662e-03 1.37233714e-04 1.37086540e-05 -1.42204009e-05 7.04243190e-05 2.41287214e-04 3.59371792e-04 3.47759038e-03 -1.93518153e-05 1.23944563e-03 -1.09979124e-03 6.67426116e-05 -4.21589662e-03 3.72486395e-03 -1.37233714e-04 -1.42204009e-05 1.37086540e-05 7.04243190e-05 -2.41287214e-04 1.91511014e-05 1.46824618e-04 -1.94209918e-06 4.42718575e-05 -4.42718575e-05 6.77236452e-06 -1.37233714e-04 1.37233714e-04 2.06050561e-05 -1.35463165e-06 1.35463165e-06 3.73839344e-05 -1.01771600e-06 -1.11116241e-05 2.10524692e-05 -3.96066075e-06 4.11041279e-06 -7.40430828e-05 1.37086540e-05 -1.42204009e-05 1.35463165e-06 7.46646087e-06 -8.65011321e-06 1.11115607e-07 2.81468585e-06 1.01771600e-06 1.11116241e-05 -2.10524692e-05 4.11041279e-06 -3.96066075e-06 7.40430828e-05 -1.42204009e-05 1.37086540e-05 -1.35463165e-06 -8.65011321e-06 7.46646087e-06 1.11115607e-07 -2.81468585e-06 1.99917732e-05 1.99917732e-05 -7.04243190e-05 -7.04243190e-05 -1.11115607e-07 -1.11115607e-07 1.45594780e-05 3.34354066e-05 2.57169624e-04 -4.00502527e-06 7.77363679e-05 -7.77363679e-05 1.39044038e-05 -2.41287214e-04 2.41287214e-04 3.73839344e-05 -2.81468585e-06 2.81468585e-06 6.28234069e-05 -3.08602939e-05 -3.07263521e-04 -1.41324097e-06 -1.04923873e-04 1.04923873e-04 4.86525398e-06 3.59208493e-04 -3.59208493e-04 1.91341235e-05 -1.02478251e-06 1.02478251e-06 3.34006108e-05 -3.07263521e-04 -3.02715668e-03 -1.53820756e-05 -1.01852759e-03 1.01852759e-03 5.29298815e-05 3.47581608e-03 -3.47581608e-03 1.46638312e-04 -1.11912408e-05 1.11912408e-05 2.56788439e-04 -1.41324097e-06 -1.53820756e-05 -4.12162075e-05 -5.66366604e-06 5.66366604e-06 1.44413999e-04 1.94925310e-05 -1.94925310e-05 1.95538614e-06 -2.10289351e-05 2.10289351e-05 4.03239561e-06 1.04923873e-04 1.01852759e-03 5.66366604e-06 3.23331675e-04 -3.63143075e-04 -1.95566627e-05 -1.09913471e-03 1.23877805e-03 -4.42043373e-05 3.98776946e-06 -4.13755885e-06 -1.99902626e-05 -7.75974336e-05 -1.04923873e-04 -1.01852759e-03 -5.66366604e-06 -3.63143075e-04 3.23331675e-04 1.95566627e-05 1.23877805e-03 -1.09913471e-03 4.42043373e-05 -4.13755885e-06 3.98776946e-06 -1.99902626e-05 7.75974336e-05 4.86525398e-06 5.29298815e-05 1.44413999e-04 1.95566627e-05 -1.95566627e-05 -5.07169119e-04 -6.72429653e-05 6.72429653e-05 -6.82107892e-06 7.39612442e-05 -7.39612442e-05 -1.40030592e-05 -3.59208493e-04 -3.47581608e-03 -1.94925310e-05 -1.09913471e-03 1.23877805e-03 6.72429653e-05 3.72261408e-03 -4.21360468e-03 1.36999156e-04 -1.38061213e-05 1.43184607e-05 7.04182099e-05 2.40805687e-04 3.59208493e-04 3.47581608e-03 1.94925310e-05 1.23877805e-03 -1.09913471e-03 -6.72429653e-05 -4.21360468e-03 3.72261408e-03 -1.36999156e-04 1.43184607e-05 -1.38061213e-05 7.04182099e-05 -2.40805687e-04 1.91341235e-05 1.46638312e-04 1.95538614e-06 4.42043373e-05 -4.42043373e-05 -6.82107892e-06 -1.36999156e-04 1.36999156e-04 2.06276741e-05 1.36318793e-06 -1.36318793e-06 3.74312988e-05 1.02478251e-06 1.11912408e-05 2.10289351e-05 3.98776946e-06 -4.13755885e-06 -7.39612442e-05 -1.38061213e-05 1.43184607e-05 -1.36318793e-06 7.44879307e-06 -8.63228531e-06 -1.10952081e-07 -2.83293240e-06 -1.02478251e-06 -1.11912408e-05 -2.10289351e-05 -4.13755885e-06 3.98776946e-06 7.39612442e-05 1.43184607e-05 -1.38061213e-05 1.36318793e-06 -8.63228531e-06 7.44879307e-06 -1.10952081e-07 2.83293240e-06 1.99902626e-05 1.99902626e-05 -7.04182099e-05 -7.04182099e-05 1.10952081e-07 1.10952081e-07 1.45584085e-05 3.34006108e-05 2.56788439e-04 4.03239561e-06 7.75974336e-05 -7.75974336e-05 -1.40030592e-05 -2.40805687e-04 2.40805687e-04 3.74312988e-05 2.83293240e-06 -2.83293240e-06 6.29222274e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 169 181 193 206 219 231 244 257 269 282 295 302 314 +0 -1 0 491 + -3.08720237e-05 -3.07390885e-04 -1.04971511e-04 1.04971511e-04 1.40312477e-06 3.59371792e-04 -3.59371792e-04 -4.82934036e-06 -9.57555071e-06 3.34354066e-05 1.01771600e-06 -1.65853403e-05 -1.01771600e-06 -1.10678938e-02 -4.01898009e-02 -1.59965704e-02 1.59965704e-02 -1.59965704e-02 3.48221871e-02 -3.48221871e-02 3.48221871e-02 -2.30243503e-03 2.30243503e-03 -2.30243503e-03 -3.07390885e-04 -3.02853625e-03 -1.01904693e-03 1.01904693e-03 1.52691305e-05 3.47759038e-03 -3.47759038e-03 -5.25303803e-05 -7.34123089e-05 2.57169624e-04 1.11116241e-05 -1.27153849e-04 -1.11116241e-05 -4.02101705e-02 -8.51941384e-04 -2.06513817e-02 2.06513817e-02 -2.06513817e-02 -1.28347617e-02 1.28347617e-02 -1.28347617e-02 -5.95672459e-03 5.95672459e-03 -5.95672459e-03 1.04971511e-04 1.01904693e-03 3.23522367e-04 -3.63336653e-04 -5.62416573e-06 -1.09979124e-03 1.23944563e-03 1.94156142e-05 4.82254533e-06 -7.77363679e-05 -3.96066075e-06 4.83364399e-05 4.11041279e-06 1.60075545e-02 2.06367891e-02 9.20684060e-03 -1.62457954e-02 1.62457954e-02 -7.47144879e-03 1.78038327e-02 -1.78038327e-02 2.69551701e-03 3.61086424e-03 -3.61086424e-03 5.94234981e-03 -1.04971511e-04 -1.01904693e-03 -3.63336653e-04 3.23522367e-04 5.62416573e-06 1.23944563e-03 -1.09979124e-03 -1.94156142e-05 -3.94493122e-05 7.77363679e-05 4.11041279e-06 -2.83446667e-05 -3.96066075e-06 -1.60075545e-02 -2.06367891e-02 -1.62457954e-02 9.20684060e-03 -1.62457954e-02 1.78038327e-02 -7.47144879e-03 1.78038327e-02 1.34775851e-03 -3.61086424e-03 5.94234981e-03 -2.33438621e-03 -3.61086424e-03 1.40312477e-06 1.52691305e-05 5.62416573e-06 -5.62416573e-06 -4.12471245e-05 -1.93518153e-05 1.93518153e-05 1.44520599e-04 9.71049589e-07 -4.00502527e-06 -2.10524692e-05 1.68190722e-06 2.10524692e-05 1.60075545e-02 2.06367891e-02 1.62457954e-02 -1.62457954e-02 9.20684060e-03 -1.78038327e-02 1.78038327e-02 -7.47144879e-03 -1.34775851e-03 5.94234981e-03 -3.61086424e-03 -2.33438621e-03 3.61086424e-03 -3.59371792e-04 -3.47759038e-03 -1.09979124e-03 1.23944563e-03 1.93518153e-05 3.72486395e-03 -4.21589662e-03 -6.67426116e-05 -7.62760775e-06 2.41287214e-04 1.37086540e-05 -1.54060042e-04 -1.42204009e-05 -3.48613875e-02 1.27621922e-02 -7.53206233e-03 1.78560844e-02 -1.78560844e-02 -2.05536306e-02 2.16538149e-02 -2.16538149e-02 -7.11790393e-03 -9.20772072e-04 9.20772072e-04 -7.07642391e-03 3.59371792e-04 3.47759038e-03 1.23944563e-03 -1.09979124e-03 -1.93518153e-05 -4.21589662e-03 3.72486395e-03 6.67426116e-05 1.29606106e-04 -2.41287214e-04 -1.42204009e-05 8.36357232e-05 1.37086540e-05 3.48613875e-02 -1.27621922e-02 1.78560844e-02 -7.53206233e-03 1.78560844e-02 2.16538149e-02 -2.05536306e-02 2.16538149e-02 -3.55895196e-03 9.20772072e-04 -7.07642391e-03 6.16428562e-03 9.20772072e-04 -4.82934036e-06 -5.25303803e-05 -1.94156142e-05 1.94156142e-05 1.44520599e-04 6.67426116e-05 -6.67426116e-05 -5.07533292e-04 -3.38618226e-06 1.39044038e-05 7.40430828e-05 -5.86503972e-06 -7.40430828e-05 -3.48613875e-02 1.27621922e-02 -1.78560844e-02 1.78560844e-02 -7.53206233e-03 -2.16538149e-02 2.16538149e-02 -2.05536306e-02 3.55895196e-03 -7.07642391e-03 9.20772072e-04 6.16428562e-03 -9.20772072e-04 -9.57555071e-06 -7.34123089e-05 -4.82254533e-06 3.94493122e-05 9.71049589e-07 7.62760775e-06 -1.29606106e-04 -3.38618226e-06 1.60708725e-05 -1.86919672e-05 5.81086888e-07 2.61781210e-06 -7.73544764e-07 -2.69864160e-03 -1.34932080e-03 1.34932080e-03 7.12031599e-03 3.56015800e-03 -3.56015800e-03 2.45879056e-03 -7.22168763e-04 7.22168763e-04 1.44433753e-03 3.34354066e-05 2.57169624e-04 7.77363679e-05 -7.77363679e-05 -4.00502527e-06 -2.41287214e-04 2.41287214e-04 1.39044038e-05 -1.86919672e-05 6.28234069e-05 -2.81468585e-06 -3.23754368e-05 2.81468585e-06 -2.28290009e-03 -5.88060035e-03 -3.56615668e-03 3.56615668e-03 -5.90018653e-03 8.44999113e-04 -8.44999113e-04 7.00213894e-03 -7.22214326e-04 -4.89935284e-03 6.10850862e-03 -1.25091191e-03 -6.10850862e-03 -1.01771600e-06 -1.11116241e-05 -3.96066075e-06 4.11041279e-06 2.10524692e-05 1.37086540e-05 -1.42204009e-05 -7.40430828e-05 -5.81086888e-07 2.81468585e-06 7.46646087e-06 -1.22870323e-06 -8.65011321e-06 2.28290009e-03 5.88060035e-03 3.56615668e-03 -5.90018653e-03 3.56615668e-03 -8.44999113e-04 7.00213894e-03 -8.44999113e-04 7.22214326e-04 6.10850862e-03 -4.89935284e-03 -1.25091191e-03 6.10850862e-03 -1.65853403e-05 -1.27153849e-04 -4.83364399e-05 2.83446667e-05 1.68190722e-06 1.54060042e-04 -8.36357232e-05 -5.86503972e-06 2.61781210e-06 -3.23754368e-05 1.22870323e-06 1.90936616e-05 -1.11758762e-06 2.33709218e-03 2.33709218e-03 -6.16637453e-03 -6.16637453e-03 -1.25083299e-03 -1.25083299e-03 2.45879056e-03 1.01771600e-06 1.11116241e-05 4.11041279e-06 -3.96066075e-06 -2.10524692e-05 -1.42204009e-05 1.37086540e-05 7.40430828e-05 7.73544764e-07 -2.81468585e-06 -8.65011321e-06 1.11758762e-06 7.46646087e-06 -2.28290009e-03 -5.88060035e-03 -5.90018653e-03 3.56615668e-03 -3.56615668e-03 7.00213894e-03 -8.44999113e-04 8.44999113e-04 1.44442865e-03 -6.10850862e-03 6.10850862e-03 -4.89935284e-03 -3.08602939e-05 -3.07263521e-04 -1.04923873e-04 1.04923873e-04 -1.41324097e-06 3.59208493e-04 -3.59208493e-04 4.86525398e-06 -9.56706174e-06 3.34006108e-05 -1.02478251e-06 -1.65706370e-05 1.02478251e-06 -3.07263521e-04 -3.02715668e-03 -1.01852759e-03 1.01852759e-03 -1.53820756e-05 3.47581608e-03 -3.47581608e-03 5.29298815e-05 -7.33191558e-05 2.56788439e-04 -1.11912408e-05 -1.26992503e-04 1.11912408e-05 1.04923873e-04 1.01852759e-03 3.23331675e-04 -3.63143075e-04 5.66366604e-06 -1.09913471e-03 1.23877805e-03 -1.95566627e-05 4.79009339e-06 -7.75974336e-05 3.98776946e-06 4.82772103e-05 -4.13755885e-06 -1.04923873e-04 -1.01852759e-03 -3.63143075e-04 3.23331675e-04 -5.66366604e-06 1.23877805e-03 -1.09913471e-03 1.95566627e-05 -3.94142439e-05 7.75974336e-05 -4.13755885e-06 -2.82869477e-05 3.98776946e-06 -1.41324097e-06 -1.53820756e-05 -5.66366604e-06 5.66366604e-06 -4.12162075e-05 1.94925310e-05 -1.94925310e-05 1.44413999e-04 -9.77693072e-07 4.03239561e-06 -2.10289351e-05 -1.69341407e-06 2.10289351e-05 -3.59208493e-04 -3.47581608e-03 -1.09913471e-03 1.23877805e-03 -1.94925310e-05 3.72261408e-03 -4.21360468e-03 6.72429653e-05 -7.51561916e-06 2.40805687e-04 -1.38061213e-05 -1.53853854e-04 1.43184607e-05 3.59208493e-04 3.47581608e-03 1.23877805e-03 -1.09913471e-03 1.94925310e-05 -4.21360468e-03 3.72261408e-03 -6.72429653e-05 1.29483537e-04 -2.40805687e-04 1.43184607e-05 8.34356441e-05 -1.38061213e-05 4.86525398e-06 5.29298815e-05 1.95566627e-05 -1.95566627e-05 1.44413999e-04 -6.72429653e-05 6.72429653e-05 -5.07169119e-04 3.41053946e-06 -1.40030592e-05 7.39612442e-05 5.90722763e-06 -7.39612442e-05 -9.56706174e-06 -7.33191558e-05 -4.79009339e-06 3.94142439e-05 -9.77693072e-07 7.51561916e-06 -1.29483537e-04 3.41053946e-06 1.60757249e-05 -1.87156494e-05 -5.85506643e-07 2.62806909e-06 7.77681284e-07 3.34006108e-05 2.56788439e-04 7.75974336e-05 -7.75974336e-05 4.03239561e-06 -2.40805687e-04 2.40805687e-04 -1.40030592e-05 -1.87156494e-05 6.29222274e-05 2.83293240e-06 -3.24164557e-05 -2.83293240e-06 1.02478251e-06 1.11912408e-05 3.98776946e-06 -4.13755885e-06 2.10289351e-05 -1.38061213e-05 1.43184607e-05 -7.39612442e-05 5.85506643e-07 -2.83293240e-06 7.44879307e-06 1.23603141e-06 -8.63228531e-06 -1.65706370e-05 -1.26992503e-04 -4.82772103e-05 2.82869477e-05 -1.69341407e-06 1.53853854e-04 -8.34356441e-05 5.90722763e-06 2.62806909e-06 -3.24164557e-05 -1.23603141e-06 1.91103577e-05 1.12507933e-06 -1.02478251e-06 -1.11912408e-05 -4.13755885e-06 3.98776946e-06 -2.10289351e-05 1.43184607e-05 -1.38061213e-05 7.39612442e-05 -7.77681284e-07 2.83293240e-06 -8.63228531e-06 -1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 24 48 73 99 125 150 176 202 225 251 277 297 322 335 348 361 374 387 400 413 426 439 452 465 478 491 +0 -1 1 338 + -3.08720237e-05 -3.07390885e-04 -1.04971511e-04 -1.40312477e-06 -1.04971511e-04 3.59371792e-04 4.82934036e-06 3.59371792e-04 -9.57555071e-06 -1.01771600e-06 -3.34354066e-05 1.65853403e-05 -1.01771600e-06 -3.07390885e-04 -3.02853625e-03 -1.01904693e-03 -1.52691305e-05 -1.01904693e-03 3.47759038e-03 5.25303803e-05 3.47759038e-03 -7.34123089e-05 -1.11116241e-05 -2.57169624e-04 1.27153849e-04 -1.11116241e-05 1.04971511e-04 1.01904693e-03 3.23522367e-04 5.62416573e-06 3.63336653e-04 -1.09979124e-03 -1.94156142e-05 -1.23944563e-03 4.82254533e-06 3.96066075e-06 7.77363679e-05 -4.83364399e-05 4.11041279e-06 -1.40312477e-06 -1.52691305e-05 -5.62416573e-06 -4.12471245e-05 -5.62416573e-06 1.93518153e-05 1.44520599e-04 1.93518153e-05 -9.71049589e-07 -2.10524692e-05 -4.00502527e-06 1.68190722e-06 -2.10524692e-05 1.04971511e-04 1.01904693e-03 3.63336653e-04 5.62416573e-06 3.23522367e-04 -1.23944563e-03 -1.94156142e-05 -1.09979124e-03 3.94493122e-05 4.11041279e-06 7.77363679e-05 -2.83446667e-05 3.96066075e-06 -3.59371792e-04 -3.47759038e-03 -1.09979124e-03 -1.93518153e-05 -1.23944563e-03 3.72486395e-03 6.67426116e-05 4.21589662e-03 -7.62760775e-06 -1.37086540e-05 -2.41287214e-04 1.54060042e-04 -1.42204009e-05 4.82934036e-06 5.25303803e-05 1.94156142e-05 1.44520599e-04 1.94156142e-05 -6.67426116e-05 -5.07533292e-04 -6.67426116e-05 3.38618226e-06 7.40430828e-05 1.39044038e-05 -5.86503972e-06 7.40430828e-05 -3.59371792e-04 -3.47759038e-03 -1.23944563e-03 -1.93518153e-05 -1.09979124e-03 4.21589662e-03 6.67426116e-05 3.72486395e-03 -1.29606106e-04 -1.42204009e-05 -2.41287214e-04 8.36357232e-05 -1.37086540e-05 -9.57555071e-06 -7.34123089e-05 -4.82254533e-06 -9.71049589e-07 -3.94493122e-05 7.62760775e-06 3.38618226e-06 1.29606106e-04 1.60708725e-05 -5.81086888e-07 1.86919672e-05 -2.61781210e-06 -7.73544764e-07 1.01771600e-06 1.11116241e-05 3.96066075e-06 2.10524692e-05 4.11041279e-06 -1.37086540e-05 -7.40430828e-05 -1.42204009e-05 5.81086888e-07 7.46646087e-06 2.81468585e-06 -1.22870323e-06 8.65011321e-06 -3.34354066e-05 -2.57169624e-04 -7.77363679e-05 -4.00502527e-06 -7.77363679e-05 2.41287214e-04 1.39044038e-05 2.41287214e-04 1.86919672e-05 -2.81468585e-06 6.28234069e-05 -3.23754368e-05 -2.81468585e-06 1.65853403e-05 1.27153849e-04 4.83364399e-05 1.68190722e-06 2.83446667e-05 -1.54060042e-04 -5.86503972e-06 -8.36357232e-05 -2.61781210e-06 1.22870323e-06 -3.23754368e-05 1.90936616e-05 1.11758762e-06 1.01771600e-06 1.11116241e-05 4.11041279e-06 2.10524692e-05 3.96066075e-06 -1.42204009e-05 -7.40430828e-05 -1.37086540e-05 7.73544764e-07 8.65011321e-06 2.81468585e-06 -1.11758762e-06 7.46646087e-06 -3.08602939e-05 -3.07263521e-04 -1.04923873e-04 1.41324097e-06 -1.04923873e-04 3.59208493e-04 -4.86525398e-06 3.59208493e-04 -9.56706174e-06 1.02478251e-06 -3.34006108e-05 1.65706370e-05 1.02478251e-06 -3.07263521e-04 -3.02715668e-03 -1.01852759e-03 1.53820756e-05 -1.01852759e-03 3.47581608e-03 -5.29298815e-05 3.47581608e-03 -7.33191558e-05 1.11912408e-05 -2.56788439e-04 1.26992503e-04 1.11912408e-05 1.04923873e-04 1.01852759e-03 3.23331675e-04 -5.66366604e-06 3.63143075e-04 -1.09913471e-03 1.95566627e-05 -1.23877805e-03 4.79009339e-06 -3.98776946e-06 7.75974336e-05 -4.82772103e-05 -4.13755885e-06 1.41324097e-06 1.53820756e-05 5.66366604e-06 -4.12162075e-05 5.66366604e-06 -1.94925310e-05 1.44413999e-04 -1.94925310e-05 9.77693072e-07 -2.10289351e-05 4.03239561e-06 -1.69341407e-06 -2.10289351e-05 1.04923873e-04 1.01852759e-03 3.63143075e-04 -5.66366604e-06 3.23331675e-04 -1.23877805e-03 1.95566627e-05 -1.09913471e-03 3.94142439e-05 -4.13755885e-06 7.75974336e-05 -2.82869477e-05 -3.98776946e-06 -3.59208493e-04 -3.47581608e-03 -1.09913471e-03 1.94925310e-05 -1.23877805e-03 3.72261408e-03 -6.72429653e-05 4.21360468e-03 -7.51561916e-06 1.38061213e-05 -2.40805687e-04 1.53853854e-04 1.43184607e-05 -4.86525398e-06 -5.29298815e-05 -1.95566627e-05 1.44413999e-04 -1.95566627e-05 6.72429653e-05 -5.07169119e-04 6.72429653e-05 -3.41053946e-06 7.39612442e-05 -1.40030592e-05 5.90722763e-06 7.39612442e-05 -3.59208493e-04 -3.47581608e-03 -1.23877805e-03 1.94925310e-05 -1.09913471e-03 4.21360468e-03 -6.72429653e-05 3.72261408e-03 -1.29483537e-04 1.43184607e-05 -2.40805687e-04 8.34356441e-05 1.38061213e-05 -9.56706174e-06 -7.33191558e-05 -4.79009339e-06 9.77693072e-07 -3.94142439e-05 7.51561916e-06 -3.41053946e-06 1.29483537e-04 1.60757249e-05 5.85506643e-07 1.87156494e-05 -2.62806909e-06 7.77681284e-07 -1.02478251e-06 -1.11912408e-05 -3.98776946e-06 2.10289351e-05 -4.13755885e-06 1.38061213e-05 -7.39612442e-05 1.43184607e-05 -5.85506643e-07 7.44879307e-06 -2.83293240e-06 1.23603141e-06 8.63228531e-06 -3.34006108e-05 -2.56788439e-04 -7.75974336e-05 4.03239561e-06 -7.75974336e-05 2.40805687e-04 -1.40030592e-05 2.40805687e-04 1.87156494e-05 2.83293240e-06 6.29222274e-05 -3.24164557e-05 2.83293240e-06 1.65706370e-05 1.26992503e-04 4.82772103e-05 -1.69341407e-06 2.82869477e-05 -1.53853854e-04 5.90722763e-06 -8.34356441e-05 -2.62806909e-06 -1.23603141e-06 -3.24164557e-05 1.91103577e-05 -1.12507933e-06 -1.02478251e-06 -1.11912408e-05 -4.13755885e-06 2.10289351e-05 -3.98776946e-06 1.43184607e-05 -7.39612442e-05 1.38061213e-05 -7.77681284e-07 8.63228531e-06 -2.83293240e-06 1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +0 0 -1 467 + -3.08720237e-05 -3.07390885e-04 -1.40312477e-06 1.04971511e-04 1.04971511e-04 4.82934036e-06 -3.59371792e-04 -3.59371792e-04 1.91511014e-05 1.01771600e-06 1.01771600e-06 -3.34354066e-05 -1.10678938e-02 -4.01898009e-02 1.59965704e-02 1.59965704e-02 1.59965704e-02 -3.48221871e-02 -3.48221871e-02 -3.48221871e-02 2.30243503e-03 2.30243503e-03 2.30243503e-03 -3.07390885e-04 -3.02853625e-03 -1.52691305e-05 1.01904693e-03 1.01904693e-03 5.25303803e-05 -3.47759038e-03 -3.47759038e-03 1.46824618e-04 1.11116241e-05 1.11116241e-05 -2.57169624e-04 -4.02101705e-02 -8.51941384e-04 2.06513817e-02 2.06513817e-02 2.06513817e-02 1.28347617e-02 1.28347617e-02 1.28347617e-02 5.95672459e-03 5.95672459e-03 5.95672459e-03 -1.40312477e-06 -1.52691305e-05 -4.12471245e-05 5.62416573e-06 5.62416573e-06 1.44520599e-04 -1.93518153e-05 -1.93518153e-05 1.94209918e-06 2.10524692e-05 2.10524692e-05 -4.00502527e-06 -1.60075545e-02 -2.06367891e-02 9.20684060e-03 1.62457954e-02 1.62457954e-02 -7.47144879e-03 -1.78038327e-02 -1.78038327e-02 -2.69551701e-03 3.61086424e-03 3.61086424e-03 5.94234981e-03 -1.04971511e-04 -1.01904693e-03 -5.62416573e-06 3.23522367e-04 3.63336653e-04 1.94156142e-05 -1.09979124e-03 -1.23944563e-03 4.42718575e-05 3.96066075e-06 4.11041279e-06 1.99917732e-05 -7.77363679e-05 -1.60075545e-02 -2.06367891e-02 1.62457954e-02 9.20684060e-03 1.62457954e-02 -1.78038327e-02 -7.47144879e-03 -1.78038327e-02 1.34775851e-03 3.61086424e-03 5.94234981e-03 -2.33438621e-03 3.61086424e-03 -1.04971511e-04 -1.01904693e-03 -5.62416573e-06 3.63336653e-04 3.23522367e-04 1.94156142e-05 -1.23944563e-03 -1.09979124e-03 4.42718575e-05 4.11041279e-06 3.96066075e-06 -1.99917732e-05 -7.77363679e-05 -1.60075545e-02 -2.06367891e-02 1.62457954e-02 1.62457954e-02 9.20684060e-03 -1.78038327e-02 -1.78038327e-02 -7.47144879e-03 1.34775851e-03 5.94234981e-03 3.61086424e-03 2.33438621e-03 3.61086424e-03 4.82934036e-06 5.25303803e-05 1.44520599e-04 -1.94156142e-05 -1.94156142e-05 -5.07533292e-04 6.67426116e-05 6.67426116e-05 -6.77236452e-06 -7.40430828e-05 -7.40430828e-05 1.39044038e-05 3.48613875e-02 -1.27621922e-02 -7.53206233e-03 -1.78560844e-02 -1.78560844e-02 -2.05536306e-02 -2.16538149e-02 -2.16538149e-02 7.11790393e-03 -9.20772072e-04 -9.20772072e-04 -7.07642391e-03 3.59371792e-04 3.47759038e-03 1.93518153e-05 -1.09979124e-03 -1.23944563e-03 -6.67426116e-05 3.72486395e-03 4.21589662e-03 -1.37233714e-04 -1.37086540e-05 -1.42204009e-05 -7.04243190e-05 2.41287214e-04 3.48613875e-02 -1.27621922e-02 -1.78560844e-02 -7.53206233e-03 -1.78560844e-02 -2.16538149e-02 -2.05536306e-02 -2.16538149e-02 -3.55895196e-03 -9.20772072e-04 -7.07642391e-03 6.16428562e-03 -9.20772072e-04 3.59371792e-04 3.47759038e-03 1.93518153e-05 -1.23944563e-03 -1.09979124e-03 -6.67426116e-05 4.21589662e-03 3.72486395e-03 -1.37233714e-04 -1.42204009e-05 -1.37086540e-05 7.04243190e-05 2.41287214e-04 3.48613875e-02 -1.27621922e-02 -1.78560844e-02 -1.78560844e-02 -7.53206233e-03 -2.16538149e-02 -2.16538149e-02 -2.05536306e-02 -3.55895196e-03 -7.07642391e-03 -9.20772072e-04 -6.16428562e-03 -9.20772072e-04 1.91511014e-05 1.46824618e-04 1.94209918e-06 -4.42718575e-05 -4.42718575e-05 -6.77236452e-06 1.37233714e-04 1.37233714e-04 2.06050561e-05 -1.35463165e-06 -1.35463165e-06 -3.73839344e-05 2.69864160e-03 -1.34932080e-03 -1.34932080e-03 -7.12031599e-03 3.56015800e-03 3.56015800e-03 2.45879056e-03 7.22168763e-04 7.22168763e-04 -1.44433753e-03 -1.01771600e-06 -1.11116241e-05 -2.10524692e-05 3.96066075e-06 4.11041279e-06 7.40430828e-05 -1.37086540e-05 -1.42204009e-05 1.35463165e-06 7.46646087e-06 8.65011321e-06 1.11115607e-07 -2.81468585e-06 2.28290009e-03 5.88060035e-03 -3.56615668e-03 -3.56615668e-03 -5.90018653e-03 8.44999113e-04 8.44999113e-04 7.00213894e-03 7.22214326e-04 -4.89935284e-03 -6.10850862e-03 1.25091191e-03 -6.10850862e-03 -1.01771600e-06 -1.11116241e-05 -2.10524692e-05 4.11041279e-06 3.96066075e-06 7.40430828e-05 -1.42204009e-05 -1.37086540e-05 1.35463165e-06 8.65011321e-06 7.46646087e-06 -1.11115607e-07 -2.81468585e-06 2.28290009e-03 5.88060035e-03 -3.56615668e-03 -5.90018653e-03 -3.56615668e-03 8.44999113e-04 7.00213894e-03 8.44999113e-04 7.22214326e-04 -6.10850862e-03 -4.89935284e-03 -1.25091191e-03 -6.10850862e-03 -1.99917732e-05 1.99917732e-05 7.04243190e-05 -7.04243190e-05 -1.11115607e-07 1.11115607e-07 1.45594780e-05 2.33709218e-03 -2.33709218e-03 -6.16637453e-03 6.16637453e-03 1.25083299e-03 -1.25083299e-03 2.45879056e-03 -3.34354066e-05 -2.57169624e-04 -4.00502527e-06 7.77363679e-05 7.77363679e-05 1.39044038e-05 -2.41287214e-04 -2.41287214e-04 -3.73839344e-05 2.81468585e-06 2.81468585e-06 6.28234069e-05 2.28290009e-03 5.88060035e-03 -5.90018653e-03 -3.56615668e-03 -3.56615668e-03 7.00213894e-03 8.44999113e-04 8.44999113e-04 -1.44442865e-03 -6.10850862e-03 -6.10850862e-03 -4.89935284e-03 -3.08602939e-05 -3.07263521e-04 1.41324097e-06 1.04923873e-04 1.04923873e-04 -4.86525398e-06 -3.59208493e-04 -3.59208493e-04 1.91341235e-05 -1.02478251e-06 -1.02478251e-06 -3.34006108e-05 -3.07263521e-04 -3.02715668e-03 1.53820756e-05 1.01852759e-03 1.01852759e-03 -5.29298815e-05 -3.47581608e-03 -3.47581608e-03 1.46638312e-04 -1.11912408e-05 -1.11912408e-05 -2.56788439e-04 1.41324097e-06 1.53820756e-05 -4.12162075e-05 -5.66366604e-06 -5.66366604e-06 1.44413999e-04 1.94925310e-05 1.94925310e-05 -1.95538614e-06 2.10289351e-05 2.10289351e-05 4.03239561e-06 -1.04923873e-04 -1.01852759e-03 5.66366604e-06 3.23331675e-04 3.63143075e-04 -1.95566627e-05 -1.09913471e-03 -1.23877805e-03 4.42043373e-05 -3.98776946e-06 -4.13755885e-06 1.99902626e-05 -7.75974336e-05 -1.04923873e-04 -1.01852759e-03 5.66366604e-06 3.63143075e-04 3.23331675e-04 -1.95566627e-05 -1.23877805e-03 -1.09913471e-03 4.42043373e-05 -4.13755885e-06 -3.98776946e-06 -1.99902626e-05 -7.75974336e-05 -4.86525398e-06 -5.29298815e-05 1.44413999e-04 1.95566627e-05 1.95566627e-05 -5.07169119e-04 -6.72429653e-05 -6.72429653e-05 6.82107892e-06 -7.39612442e-05 -7.39612442e-05 -1.40030592e-05 3.59208493e-04 3.47581608e-03 -1.94925310e-05 -1.09913471e-03 -1.23877805e-03 6.72429653e-05 3.72261408e-03 4.21360468e-03 -1.36999156e-04 1.38061213e-05 1.43184607e-05 -7.04182099e-05 2.40805687e-04 3.59208493e-04 3.47581608e-03 -1.94925310e-05 -1.23877805e-03 -1.09913471e-03 6.72429653e-05 4.21360468e-03 3.72261408e-03 -1.36999156e-04 1.43184607e-05 1.38061213e-05 7.04182099e-05 2.40805687e-04 1.91341235e-05 1.46638312e-04 -1.95538614e-06 -4.42043373e-05 -4.42043373e-05 6.82107892e-06 1.36999156e-04 1.36999156e-04 2.06276741e-05 1.36318793e-06 1.36318793e-06 -3.74312988e-05 1.02478251e-06 1.11912408e-05 -2.10289351e-05 -3.98776946e-06 -4.13755885e-06 7.39612442e-05 1.38061213e-05 1.43184607e-05 -1.36318793e-06 7.44879307e-06 8.63228531e-06 -1.10952081e-07 2.83293240e-06 1.02478251e-06 1.11912408e-05 -2.10289351e-05 -4.13755885e-06 -3.98776946e-06 7.39612442e-05 1.43184607e-05 1.38061213e-05 -1.36318793e-06 8.63228531e-06 7.44879307e-06 1.10952081e-07 2.83293240e-06 -1.99902626e-05 1.99902626e-05 7.04182099e-05 -7.04182099e-05 1.10952081e-07 -1.10952081e-07 1.45584085e-05 -3.34006108e-05 -2.56788439e-04 4.03239561e-06 7.75974336e-05 7.75974336e-05 -1.40030592e-05 -2.40805687e-04 -2.40805687e-04 -3.74312988e-05 -2.83293240e-06 -2.83293240e-06 6.29222274e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 23 46 70 96 122 146 172 198 220 246 272 286 310 322 334 346 359 372 384 397 410 422 435 448 455 467 +0 0 0 372 + -6.85962295e-01 -2.49343638e-03 -1.10678938e-02 -4.01898009e-02 1.59965704e-02 -1.59965704e-02 -1.59965704e-02 -3.48221871e-02 3.48221871e-02 3.48221871e-02 -2.30243503e-03 -2.30243503e-03 2.30243503e-03 -2.49343638e-03 4.23563560e-01 -4.02101705e-02 -8.51941384e-04 2.06513817e-02 -2.06513817e-02 -2.06513817e-02 1.28347617e-02 -1.28347617e-02 -1.28347617e-02 -5.95672459e-03 -5.95672459e-03 5.95672459e-03 -1.83358455e-01 1.59157921e-02 7.03211926e-04 -1.60075545e-02 -2.06367891e-02 9.20684060e-03 -1.62457954e-02 -1.62457954e-02 -7.47144879e-03 1.78038327e-02 1.78038327e-02 -2.69551701e-03 -3.61086424e-03 -3.61086424e-03 5.94234981e-03 -1.83358455e-01 1.59157921e-02 7.03211926e-04 1.60075545e-02 2.06367891e-02 -1.62457954e-02 9.20684060e-03 1.62457954e-02 1.78038327e-02 -7.47144879e-03 -1.78038327e-02 -1.34775851e-03 3.61086424e-03 5.94234981e-03 2.33438621e-03 -3.61086424e-03 -1.83358455e-01 1.59157921e-02 7.03211926e-04 1.60075545e-02 2.06367891e-02 -1.62457954e-02 1.62457954e-02 9.20684060e-03 1.78038327e-02 -1.78038327e-02 -7.47144879e-03 -1.34775851e-03 5.94234981e-03 3.61086424e-03 -2.33438621e-03 -3.61086424e-03 1.59157921e-02 6.01587239e-01 -1.47714525e-03 3.48613875e-02 -1.27621922e-02 -7.53206234e-03 1.78560844e-02 1.78560844e-02 -2.05536306e-02 2.16538149e-02 2.16538149e-02 7.11790393e-03 9.20772072e-04 9.20772072e-04 -7.07642391e-03 1.59157921e-02 6.01587239e-01 -1.47714525e-03 -3.48613875e-02 1.27621922e-02 1.78560844e-02 -7.53206234e-03 -1.78560844e-02 2.16538149e-02 -2.05536306e-02 -2.16538149e-02 3.55895196e-03 -9.20772072e-04 -7.07642391e-03 -6.16428562e-03 9.20772072e-04 1.59157921e-02 6.01587239e-01 -1.47714525e-03 -3.48613875e-02 1.27621922e-02 1.78560844e-02 -1.78560844e-02 -7.53206234e-03 2.16538149e-02 -2.16538149e-02 -2.05536306e-02 3.55895196e-03 -7.07642391e-03 -9.20772072e-04 6.16428562e-03 9.20772072e-04 7.26235429e-01 2.69864160e-03 1.34932080e-03 1.34932080e-03 -7.12031599e-03 -3.56015800e-03 -3.56015800e-03 2.45879056e-03 -7.22168763e-04 -7.22168763e-04 -1.44433753e-03 7.03211926e-04 -1.47714525e-03 7.25552655e-01 -2.28290009e-03 -5.88060035e-03 3.56615668e-03 -3.56615668e-03 -5.90018653e-03 -8.44999113e-04 8.44999113e-04 7.00213894e-03 -7.22214326e-04 -4.89935284e-03 -6.10850862e-03 -1.25091191e-03 6.10850862e-03 7.03211926e-04 -1.47714525e-03 7.25552655e-01 -2.28290009e-03 -5.88060035e-03 3.56615668e-03 -5.90018653e-03 -3.56615668e-03 -8.44999113e-04 7.00213894e-03 8.44999113e-04 -7.22214326e-04 -6.10850862e-03 -4.89935284e-03 1.25091191e-03 6.10850862e-03 7.26235429e-01 -2.33709218e-03 2.33709218e-03 6.16637453e-03 -6.16637453e-03 -1.25083299e-03 1.25083299e-03 2.45879056e-03 7.03211926e-04 -1.47714525e-03 7.25552655e-01 2.28290009e-03 5.88060035e-03 -5.90018653e-03 3.56615668e-03 3.56615668e-03 7.00213894e-03 -8.44999113e-04 -8.44999113e-04 -1.44442865e-03 6.10850862e-03 6.10850862e-03 -4.89935284e-03 -1.10678938e-02 -4.02101705e-02 -1.60075545e-02 1.60075545e-02 1.60075545e-02 3.48613875e-02 -3.48613875e-02 -3.48613875e-02 -2.28290009e-03 -2.28290009e-03 2.28290009e-03 -6.85940189e-01 -2.50823111e-03 -4.01898009e-02 -8.51941384e-04 -2.06367891e-02 2.06367891e-02 2.06367891e-02 -1.27621922e-02 1.27621922e-02 1.27621922e-02 -5.88060035e-03 -5.88060035e-03 5.88060035e-03 -2.50823111e-03 4.23515229e-01 1.59965704e-02 2.06513817e-02 9.20684060e-03 -1.62457954e-02 -1.62457954e-02 -7.53206234e-03 1.78560844e-02 1.78560844e-02 2.69864160e-03 3.56615668e-03 3.56615668e-03 -5.90018653e-03 -1.83349369e-01 1.59486915e-02 -7.01697013e-04 -1.59965704e-02 -2.06513817e-02 -1.62457954e-02 9.20684060e-03 1.62457954e-02 1.78560844e-02 -7.53206234e-03 -1.78560844e-02 1.34932080e-03 -3.56615668e-03 -5.90018653e-03 -2.33709218e-03 3.56615668e-03 -1.83349369e-01 1.59486915e-02 -7.01697013e-04 -1.59965704e-02 -2.06513817e-02 -1.62457954e-02 1.62457954e-02 9.20684060e-03 1.78560844e-02 -1.78560844e-02 -7.53206234e-03 1.34932080e-03 -5.90018653e-03 -3.56615668e-03 2.33709218e-03 3.56615668e-03 -1.83349369e-01 1.59486915e-02 -7.01697013e-04 -3.48221871e-02 1.28347617e-02 -7.47144879e-03 1.78038327e-02 1.78038327e-02 -2.05536306e-02 2.16538149e-02 2.16538149e-02 -7.12031599e-03 -8.44999113e-04 -8.44999113e-04 7.00213894e-03 1.59486915e-02 6.01537957e-01 1.46884921e-03 3.48221871e-02 -1.28347617e-02 1.78038327e-02 -7.47144879e-03 -1.78038327e-02 2.16538149e-02 -2.05536306e-02 -2.16538149e-02 -3.56015800e-03 8.44999113e-04 7.00213894e-03 6.16637453e-03 -8.44999113e-04 1.59486915e-02 6.01537957e-01 1.46884921e-03 3.48221871e-02 -1.28347617e-02 1.78038327e-02 -1.78038327e-02 -7.47144879e-03 2.16538149e-02 -2.16538149e-02 -2.05536306e-02 -3.56015800e-03 7.00213894e-03 8.44999113e-04 -6.16637453e-03 -8.44999113e-04 1.59486915e-02 6.01537957e-01 1.46884921e-03 -2.69551701e-03 -1.34775851e-03 -1.34775851e-03 7.11790393e-03 3.55895196e-03 3.55895196e-03 2.45879056e-03 -7.22214326e-04 -7.22214326e-04 -1.44442865e-03 7.26258908e-01 -2.30243503e-03 -5.95672459e-03 -3.61086424e-03 3.61086424e-03 5.94234981e-03 9.20772072e-04 -9.20772072e-04 -7.07642391e-03 -7.22168763e-04 -4.89935284e-03 -6.10850862e-03 -1.25083299e-03 6.10850862e-03 -7.01697013e-04 1.46884921e-03 7.25573052e-01 -2.30243503e-03 -5.95672459e-03 -3.61086424e-03 5.94234981e-03 3.61086424e-03 9.20772072e-04 -7.07642391e-03 -9.20772072e-04 -7.22168763e-04 -6.10850862e-03 -4.89935284e-03 1.25083299e-03 6.10850862e-03 -7.01697013e-04 1.46884921e-03 7.25573052e-01 2.33438621e-03 -2.33438621e-03 -6.16428562e-03 6.16428562e-03 -1.25091191e-03 1.25091191e-03 2.45879056e-03 7.26258908e-01 2.30243503e-03 5.95672459e-03 5.94234981e-03 -3.61086424e-03 -3.61086424e-03 -7.07642391e-03 9.20772072e-04 9.20772072e-04 -1.44433753e-03 6.10850862e-03 6.10850862e-03 -4.89935284e-03 -7.01697013e-04 1.46884921e-03 7.25573052e-01 + 0 1 13 14 15 16 17 18 19 20 22 23 25 0 1 13 14 15 16 17 18 19 20 22 23 25 2 5 12 13 14 15 16 17 18 19 20 21 22 23 25 3 6 10 13 14 15 16 17 18 19 20 21 22 23 24 25 4 7 9 13 14 15 16 17 18 19 20 21 22 23 24 25 2 5 12 13 14 15 16 17 18 19 20 21 22 23 25 3 6 10 13 14 15 16 17 18 19 20 21 22 23 24 25 4 7 9 13 14 15 16 17 18 19 20 21 22 23 24 25 8 15 16 17 18 19 20 21 22 23 25 4 7 9 13 14 15 16 17 18 19 20 21 22 23 24 25 3 6 10 13 14 15 16 17 18 19 20 21 22 23 24 25 11 16 17 19 20 22 23 24 2 5 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 9 10 12 13 14 0 1 2 3 4 5 6 7 9 10 12 13 14 0 1 2 3 4 5 6 7 8 9 10 12 15 18 25 0 1 2 3 4 5 6 7 8 9 10 11 12 16 19 23 0 1 2 3 4 5 6 7 8 9 10 11 12 17 20 22 0 1 2 3 4 5 6 7 8 9 10 12 15 18 25 0 1 2 3 4 5 6 7 8 9 10 11 12 16 19 23 0 1 2 3 4 5 6 7 8 9 10 11 12 17 20 22 2 3 4 5 6 7 8 9 10 12 21 0 1 2 3 4 5 6 7 8 9 10 11 12 17 20 22 0 1 2 3 4 5 6 7 8 9 10 11 12 16 19 23 3 4 6 7 9 10 11 24 0 1 2 3 4 5 6 7 8 9 10 12 15 18 25 + 0 13 26 41 57 73 88 104 120 131 147 163 171 186 199 212 227 243 259 274 290 306 317 333 349 357 372 +0 0 1 467 + -3.08720237e-05 -3.07390885e-04 -1.40312477e-06 -1.04971511e-04 -1.04971511e-04 4.82934036e-06 3.59371792e-04 3.59371792e-04 1.91511014e-05 -1.01771600e-06 -1.01771600e-06 -3.34354066e-05 -3.07390885e-04 -3.02853625e-03 -1.52691305e-05 -1.01904693e-03 -1.01904693e-03 5.25303803e-05 3.47759038e-03 3.47759038e-03 1.46824618e-04 -1.11116241e-05 -1.11116241e-05 -2.57169624e-04 -1.40312477e-06 -1.52691305e-05 -4.12471245e-05 -5.62416573e-06 -5.62416573e-06 1.44520599e-04 1.93518153e-05 1.93518153e-05 1.94209918e-06 -2.10524692e-05 -2.10524692e-05 -4.00502527e-06 1.04971511e-04 1.01904693e-03 5.62416573e-06 3.23522367e-04 3.63336653e-04 -1.94156142e-05 -1.09979124e-03 -1.23944563e-03 -4.42718575e-05 3.96066075e-06 4.11041279e-06 -1.99917732e-05 7.77363679e-05 1.04971511e-04 1.01904693e-03 5.62416573e-06 3.63336653e-04 3.23522367e-04 -1.94156142e-05 -1.23944563e-03 -1.09979124e-03 -4.42718575e-05 4.11041279e-06 3.96066075e-06 1.99917732e-05 7.77363679e-05 4.82934036e-06 5.25303803e-05 1.44520599e-04 1.94156142e-05 1.94156142e-05 -5.07533292e-04 -6.67426116e-05 -6.67426116e-05 -6.77236452e-06 7.40430828e-05 7.40430828e-05 1.39044038e-05 -3.59371792e-04 -3.47759038e-03 -1.93518153e-05 -1.09979124e-03 -1.23944563e-03 6.67426116e-05 3.72486395e-03 4.21589662e-03 1.37233714e-04 -1.37086540e-05 -1.42204009e-05 7.04243190e-05 -2.41287214e-04 -3.59371792e-04 -3.47759038e-03 -1.93518153e-05 -1.23944563e-03 -1.09979124e-03 6.67426116e-05 4.21589662e-03 3.72486395e-03 1.37233714e-04 -1.42204009e-05 -1.37086540e-05 -7.04243190e-05 -2.41287214e-04 1.91511014e-05 1.46824618e-04 1.94209918e-06 4.42718575e-05 4.42718575e-05 -6.77236452e-06 -1.37233714e-04 -1.37233714e-04 2.06050561e-05 1.35463165e-06 1.35463165e-06 -3.73839344e-05 1.01771600e-06 1.11116241e-05 2.10524692e-05 3.96066075e-06 4.11041279e-06 -7.40430828e-05 -1.37086540e-05 -1.42204009e-05 -1.35463165e-06 7.46646087e-06 8.65011321e-06 -1.11115607e-07 2.81468585e-06 1.01771600e-06 1.11116241e-05 2.10524692e-05 4.11041279e-06 3.96066075e-06 -7.40430828e-05 -1.42204009e-05 -1.37086540e-05 -1.35463165e-06 8.65011321e-06 7.46646087e-06 1.11115607e-07 2.81468585e-06 1.99917732e-05 -1.99917732e-05 -7.04243190e-05 7.04243190e-05 1.11115607e-07 -1.11115607e-07 1.45594780e-05 -3.34354066e-05 -2.57169624e-04 -4.00502527e-06 -7.77363679e-05 -7.77363679e-05 1.39044038e-05 2.41287214e-04 2.41287214e-04 -3.73839344e-05 -2.81468585e-06 -2.81468585e-06 6.28234069e-05 -1.10678938e-02 -4.02101705e-02 -1.60075545e-02 -1.60075545e-02 -1.60075545e-02 3.48613875e-02 3.48613875e-02 3.48613875e-02 2.28290009e-03 2.28290009e-03 2.28290009e-03 -3.08602939e-05 -3.07263521e-04 1.41324097e-06 -1.04923873e-04 -1.04923873e-04 -4.86525398e-06 3.59208493e-04 3.59208493e-04 1.91341235e-05 1.02478251e-06 1.02478251e-06 -3.34006108e-05 -4.01898009e-02 -8.51941384e-04 -2.06367891e-02 -2.06367891e-02 -2.06367891e-02 -1.27621922e-02 -1.27621922e-02 -1.27621922e-02 5.88060035e-03 5.88060035e-03 5.88060035e-03 -3.07263521e-04 -3.02715668e-03 1.53820756e-05 -1.01852759e-03 -1.01852759e-03 -5.29298815e-05 3.47581608e-03 3.47581608e-03 1.46638312e-04 1.11912408e-05 1.11912408e-05 -2.56788439e-04 1.59965704e-02 2.06513817e-02 9.20684060e-03 1.62457954e-02 1.62457954e-02 -7.53206233e-03 -1.78560844e-02 -1.78560844e-02 2.69864160e-03 -3.56615668e-03 -3.56615668e-03 -5.90018653e-03 1.41324097e-06 1.53820756e-05 -4.12162075e-05 5.66366604e-06 5.66366604e-06 1.44413999e-04 -1.94925310e-05 -1.94925310e-05 -1.95538614e-06 -2.10289351e-05 -2.10289351e-05 4.03239561e-06 1.59965704e-02 2.06513817e-02 1.62457954e-02 9.20684060e-03 1.62457954e-02 -1.78560844e-02 -7.53206233e-03 -1.78560844e-02 -1.34932080e-03 -3.56615668e-03 -5.90018653e-03 2.33709218e-03 -3.56615668e-03 1.04923873e-04 1.01852759e-03 -5.66366604e-06 3.23331675e-04 3.63143075e-04 1.95566627e-05 -1.09913471e-03 -1.23877805e-03 -4.42043373e-05 -3.98776946e-06 -4.13755885e-06 -1.99902626e-05 7.75974336e-05 1.59965704e-02 2.06513817e-02 1.62457954e-02 1.62457954e-02 9.20684060e-03 -1.78560844e-02 -1.78560844e-02 -7.53206233e-03 -1.34932080e-03 -5.90018653e-03 -3.56615668e-03 -2.33709218e-03 -3.56615668e-03 1.04923873e-04 1.01852759e-03 -5.66366604e-06 3.63143075e-04 3.23331675e-04 1.95566627e-05 -1.23877805e-03 -1.09913471e-03 -4.42043373e-05 -4.13755885e-06 -3.98776946e-06 1.99902626e-05 7.75974336e-05 -3.48221871e-02 1.28347617e-02 -7.47144879e-03 -1.78038327e-02 -1.78038327e-02 -2.05536306e-02 -2.16538149e-02 -2.16538149e-02 -7.12031599e-03 8.44999113e-04 8.44999113e-04 7.00213894e-03 -4.86525398e-06 -5.29298815e-05 1.44413999e-04 -1.95566627e-05 -1.95566627e-05 -5.07169119e-04 6.72429653e-05 6.72429653e-05 6.82107892e-06 7.39612442e-05 7.39612442e-05 -1.40030592e-05 -3.48221871e-02 1.28347617e-02 -1.78038327e-02 -7.47144879e-03 -1.78038327e-02 -2.16538149e-02 -2.05536306e-02 -2.16538149e-02 3.56015800e-03 8.44999113e-04 7.00213894e-03 -6.16637453e-03 8.44999113e-04 -3.59208493e-04 -3.47581608e-03 1.94925310e-05 -1.09913471e-03 -1.23877805e-03 -6.72429653e-05 3.72261408e-03 4.21360468e-03 1.36999156e-04 1.38061213e-05 1.43184607e-05 7.04182099e-05 -2.40805687e-04 -3.48221871e-02 1.28347617e-02 -1.78038327e-02 -1.78038327e-02 -7.47144879e-03 -2.16538149e-02 -2.16538149e-02 -2.05536306e-02 3.56015800e-03 7.00213894e-03 8.44999113e-04 6.16637453e-03 8.44999113e-04 -3.59208493e-04 -3.47581608e-03 1.94925310e-05 -1.23877805e-03 -1.09913471e-03 -6.72429653e-05 4.21360468e-03 3.72261408e-03 1.36999156e-04 1.43184607e-05 1.38061213e-05 -7.04182099e-05 -2.40805687e-04 -2.69551701e-03 1.34775851e-03 1.34775851e-03 7.11790393e-03 -3.55895196e-03 -3.55895196e-03 2.45879056e-03 7.22214326e-04 7.22214326e-04 -1.44442865e-03 1.91341235e-05 1.46638312e-04 -1.95538614e-06 4.42043373e-05 4.42043373e-05 6.82107892e-06 -1.36999156e-04 -1.36999156e-04 2.06276741e-05 -1.36318793e-06 -1.36318793e-06 -3.74312988e-05 2.30243503e-03 5.95672459e-03 3.61086424e-03 3.61086424e-03 5.94234981e-03 -9.20772072e-04 -9.20772072e-04 -7.07642391e-03 7.22168763e-04 -4.89935284e-03 -6.10850862e-03 1.25083299e-03 -6.10850862e-03 -1.02478251e-06 -1.11912408e-05 2.10289351e-05 -3.98776946e-06 -4.13755885e-06 -7.39612442e-05 1.38061213e-05 1.43184607e-05 1.36318793e-06 7.44879307e-06 8.63228531e-06 1.10952081e-07 -2.83293240e-06 2.30243503e-03 5.95672459e-03 3.61086424e-03 5.94234981e-03 3.61086424e-03 -9.20772072e-04 -7.07642391e-03 -9.20772072e-04 7.22168763e-04 -6.10850862e-03 -4.89935284e-03 -1.25083299e-03 -6.10850862e-03 -1.02478251e-06 -1.11912408e-05 2.10289351e-05 -4.13755885e-06 -3.98776946e-06 -7.39612442e-05 1.43184607e-05 1.38061213e-05 1.36318793e-06 8.63228531e-06 7.44879307e-06 -1.10952081e-07 -2.83293240e-06 -2.33438621e-03 2.33438621e-03 6.16428562e-03 -6.16428562e-03 1.25091191e-03 -1.25091191e-03 2.45879056e-03 1.99902626e-05 -1.99902626e-05 -7.04182099e-05 7.04182099e-05 -1.10952081e-07 1.10952081e-07 1.45584085e-05 2.30243503e-03 5.95672459e-03 5.94234981e-03 3.61086424e-03 3.61086424e-03 -7.07642391e-03 -9.20772072e-04 -9.20772072e-04 -1.44433753e-03 -6.10850862e-03 -6.10850862e-03 -4.89935284e-03 -3.34006108e-05 -2.56788439e-04 4.03239561e-06 -7.75974336e-05 -7.75974336e-05 -1.40030592e-05 2.40805687e-04 2.40805687e-04 -3.74312988e-05 2.83293240e-06 2.83293240e-06 6.29222274e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 16 17 19 20 22 23 24 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 180 203 227 253 279 303 329 355 377 403 429 443 467 +0 1 -1 338 + -3.08720237e-05 -3.07390885e-04 1.04971511e-04 -1.40312477e-06 1.04971511e-04 -3.59371792e-04 4.82934036e-06 -3.59371792e-04 -9.57555071e-06 1.01771600e-06 -3.34354066e-05 1.65853403e-05 1.01771600e-06 -3.07390885e-04 -3.02853625e-03 1.01904693e-03 -1.52691305e-05 1.01904693e-03 -3.47759038e-03 5.25303803e-05 -3.47759038e-03 -7.34123089e-05 1.11116241e-05 -2.57169624e-04 1.27153849e-04 1.11116241e-05 -1.04971511e-04 -1.01904693e-03 3.23522367e-04 -5.62416573e-06 3.63336653e-04 -1.09979124e-03 1.94156142e-05 -1.23944563e-03 -4.82254533e-06 3.96066075e-06 -7.77363679e-05 4.83364399e-05 4.11041279e-06 -1.40312477e-06 -1.52691305e-05 5.62416573e-06 -4.12471245e-05 5.62416573e-06 -1.93518153e-05 1.44520599e-04 -1.93518153e-05 -9.71049589e-07 2.10524692e-05 -4.00502527e-06 1.68190722e-06 2.10524692e-05 -1.04971511e-04 -1.01904693e-03 3.63336653e-04 -5.62416573e-06 3.23522367e-04 -1.23944563e-03 1.94156142e-05 -1.09979124e-03 -3.94493122e-05 4.11041279e-06 -7.77363679e-05 2.83446667e-05 3.96066075e-06 3.59371792e-04 3.47759038e-03 -1.09979124e-03 1.93518153e-05 -1.23944563e-03 3.72486395e-03 -6.67426116e-05 4.21589662e-03 7.62760775e-06 -1.37086540e-05 2.41287214e-04 -1.54060042e-04 -1.42204009e-05 4.82934036e-06 5.25303803e-05 -1.94156142e-05 1.44520599e-04 -1.94156142e-05 6.67426116e-05 -5.07533292e-04 6.67426116e-05 3.38618226e-06 -7.40430828e-05 1.39044038e-05 -5.86503972e-06 -7.40430828e-05 3.59371792e-04 3.47759038e-03 -1.23944563e-03 1.93518153e-05 -1.09979124e-03 4.21589662e-03 -6.67426116e-05 3.72486395e-03 1.29606106e-04 -1.42204009e-05 2.41287214e-04 -8.36357232e-05 -1.37086540e-05 -9.57555071e-06 -7.34123089e-05 4.82254533e-06 -9.71049589e-07 3.94493122e-05 -7.62760775e-06 3.38618226e-06 -1.29606106e-04 1.60708725e-05 5.81086888e-07 1.86919672e-05 -2.61781210e-06 7.73544764e-07 -1.01771600e-06 -1.11116241e-05 3.96066075e-06 -2.10524692e-05 4.11041279e-06 -1.37086540e-05 7.40430828e-05 -1.42204009e-05 -5.81086888e-07 7.46646087e-06 -2.81468585e-06 1.22870323e-06 8.65011321e-06 -3.34354066e-05 -2.57169624e-04 7.77363679e-05 -4.00502527e-06 7.77363679e-05 -2.41287214e-04 1.39044038e-05 -2.41287214e-04 1.86919672e-05 2.81468585e-06 6.28234069e-05 -3.23754368e-05 2.81468585e-06 1.65853403e-05 1.27153849e-04 -4.83364399e-05 1.68190722e-06 -2.83446667e-05 1.54060042e-04 -5.86503972e-06 8.36357232e-05 -2.61781210e-06 -1.22870323e-06 -3.23754368e-05 1.90936616e-05 -1.11758762e-06 -1.01771600e-06 -1.11116241e-05 4.11041279e-06 -2.10524692e-05 3.96066075e-06 -1.42204009e-05 7.40430828e-05 -1.37086540e-05 -7.73544764e-07 8.65011321e-06 -2.81468585e-06 1.11758762e-06 7.46646087e-06 -3.08602939e-05 -3.07263521e-04 1.04923873e-04 1.41324097e-06 1.04923873e-04 -3.59208493e-04 -4.86525398e-06 -3.59208493e-04 -9.56706174e-06 -1.02478251e-06 -3.34006108e-05 1.65706370e-05 -1.02478251e-06 -3.07263521e-04 -3.02715668e-03 1.01852759e-03 1.53820756e-05 1.01852759e-03 -3.47581608e-03 -5.29298815e-05 -3.47581608e-03 -7.33191558e-05 -1.11912408e-05 -2.56788439e-04 1.26992503e-04 -1.11912408e-05 -1.04923873e-04 -1.01852759e-03 3.23331675e-04 5.66366604e-06 3.63143075e-04 -1.09913471e-03 -1.95566627e-05 -1.23877805e-03 -4.79009339e-06 -3.98776946e-06 -7.75974336e-05 4.82772103e-05 -4.13755885e-06 1.41324097e-06 1.53820756e-05 -5.66366604e-06 -4.12162075e-05 -5.66366604e-06 1.94925310e-05 1.44413999e-04 1.94925310e-05 9.77693072e-07 2.10289351e-05 4.03239561e-06 -1.69341407e-06 2.10289351e-05 -1.04923873e-04 -1.01852759e-03 3.63143075e-04 5.66366604e-06 3.23331675e-04 -1.23877805e-03 -1.95566627e-05 -1.09913471e-03 -3.94142439e-05 -4.13755885e-06 -7.75974336e-05 2.82869477e-05 -3.98776946e-06 3.59208493e-04 3.47581608e-03 -1.09913471e-03 -1.94925310e-05 -1.23877805e-03 3.72261408e-03 6.72429653e-05 4.21360468e-03 7.51561916e-06 1.38061213e-05 2.40805687e-04 -1.53853854e-04 1.43184607e-05 -4.86525398e-06 -5.29298815e-05 1.95566627e-05 1.44413999e-04 1.95566627e-05 -6.72429653e-05 -5.07169119e-04 -6.72429653e-05 -3.41053946e-06 -7.39612442e-05 -1.40030592e-05 5.90722763e-06 -7.39612442e-05 3.59208493e-04 3.47581608e-03 -1.23877805e-03 -1.94925310e-05 -1.09913471e-03 4.21360468e-03 6.72429653e-05 3.72261408e-03 1.29483537e-04 1.43184607e-05 2.40805687e-04 -8.34356441e-05 1.38061213e-05 -9.56706174e-06 -7.33191558e-05 4.79009339e-06 9.77693072e-07 3.94142439e-05 -7.51561916e-06 -3.41053946e-06 -1.29483537e-04 1.60757249e-05 -5.85506643e-07 1.87156494e-05 -2.62806909e-06 -7.77681284e-07 1.02478251e-06 1.11912408e-05 -3.98776946e-06 -2.10289351e-05 -4.13755885e-06 1.38061213e-05 7.39612442e-05 1.43184607e-05 5.85506643e-07 7.44879307e-06 2.83293240e-06 -1.23603141e-06 8.63228531e-06 -3.34006108e-05 -2.56788439e-04 7.75974336e-05 4.03239561e-06 7.75974336e-05 -2.40805687e-04 -1.40030592e-05 -2.40805687e-04 1.87156494e-05 -2.83293240e-06 6.29222274e-05 -3.24164557e-05 -2.83293240e-06 1.65706370e-05 1.26992503e-04 -4.82772103e-05 -1.69341407e-06 -2.82869477e-05 1.53853854e-04 5.90722763e-06 8.34356441e-05 -2.62806909e-06 1.23603141e-06 -3.24164557e-05 1.91103577e-05 1.12507933e-06 1.02478251e-06 1.11912408e-05 -4.13755885e-06 -2.10289351e-05 -3.98776946e-06 1.43184607e-05 7.39612442e-05 1.38061213e-05 7.77681284e-07 8.63228531e-06 2.83293240e-06 -1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +0 1 0 491 + -3.08720237e-05 -3.07390885e-04 1.04971511e-04 -1.04971511e-04 1.40312477e-06 -3.59371792e-04 3.59371792e-04 -4.82934036e-06 -9.57555071e-06 3.34354066e-05 -1.01771600e-06 -1.65853403e-05 1.01771600e-06 -3.07390885e-04 -3.02853625e-03 1.01904693e-03 -1.01904693e-03 1.52691305e-05 -3.47759038e-03 3.47759038e-03 -5.25303803e-05 -7.34123089e-05 2.57169624e-04 -1.11116241e-05 -1.27153849e-04 1.11116241e-05 -1.04971511e-04 -1.01904693e-03 3.23522367e-04 -3.63336653e-04 5.62416573e-06 -1.09979124e-03 1.23944563e-03 -1.94156142e-05 -4.82254533e-06 7.77363679e-05 -3.96066075e-06 -4.83364399e-05 4.11041279e-06 1.04971511e-04 1.01904693e-03 -3.63336653e-04 3.23522367e-04 -5.62416573e-06 1.23944563e-03 -1.09979124e-03 1.94156142e-05 3.94493122e-05 -7.77363679e-05 4.11041279e-06 2.83446667e-05 -3.96066075e-06 1.40312477e-06 1.52691305e-05 -5.62416573e-06 5.62416573e-06 -4.12471245e-05 1.93518153e-05 -1.93518153e-05 1.44520599e-04 9.71049589e-07 -4.00502527e-06 2.10524692e-05 1.68190722e-06 -2.10524692e-05 3.59371792e-04 3.47759038e-03 -1.09979124e-03 1.23944563e-03 -1.93518153e-05 3.72486395e-03 -4.21589662e-03 6.67426116e-05 7.62760775e-06 -2.41287214e-04 1.37086540e-05 1.54060042e-04 -1.42204009e-05 -3.59371792e-04 -3.47759038e-03 1.23944563e-03 -1.09979124e-03 1.93518153e-05 -4.21589662e-03 3.72486395e-03 -6.67426116e-05 -1.29606106e-04 2.41287214e-04 -1.42204009e-05 -8.36357232e-05 1.37086540e-05 -4.82934036e-06 -5.25303803e-05 1.94156142e-05 -1.94156142e-05 1.44520599e-04 -6.67426116e-05 6.67426116e-05 -5.07533292e-04 -3.38618226e-06 1.39044038e-05 -7.40430828e-05 -5.86503972e-06 7.40430828e-05 -9.57555071e-06 -7.34123089e-05 4.82254533e-06 -3.94493122e-05 9.71049589e-07 -7.62760775e-06 1.29606106e-04 -3.38618226e-06 1.60708725e-05 -1.86919672e-05 -5.81086888e-07 2.61781210e-06 7.73544764e-07 3.34354066e-05 2.57169624e-04 -7.77363679e-05 7.77363679e-05 -4.00502527e-06 2.41287214e-04 -2.41287214e-04 1.39044038e-05 -1.86919672e-05 6.28234069e-05 2.81468585e-06 -3.23754368e-05 -2.81468585e-06 1.01771600e-06 1.11116241e-05 -3.96066075e-06 4.11041279e-06 -2.10524692e-05 1.37086540e-05 -1.42204009e-05 7.40430828e-05 5.81086888e-07 -2.81468585e-06 7.46646087e-06 1.22870323e-06 -8.65011321e-06 -1.65853403e-05 -1.27153849e-04 4.83364399e-05 -2.83446667e-05 1.68190722e-06 -1.54060042e-04 8.36357232e-05 -5.86503972e-06 2.61781210e-06 -3.23754368e-05 -1.22870323e-06 1.90936616e-05 1.11758762e-06 -1.01771600e-06 -1.11116241e-05 4.11041279e-06 -3.96066075e-06 2.10524692e-05 -1.42204009e-05 1.37086540e-05 -7.40430828e-05 -7.73544764e-07 2.81468585e-06 -8.65011321e-06 -1.11758762e-06 7.46646087e-06 -1.10678938e-02 -4.02101705e-02 1.60075545e-02 -1.60075545e-02 1.60075545e-02 -3.48613875e-02 3.48613875e-02 -3.48613875e-02 -2.28290009e-03 2.28290009e-03 -2.28290009e-03 -3.08602939e-05 -3.07263521e-04 1.04923873e-04 -1.04923873e-04 -1.41324097e-06 -3.59208493e-04 3.59208493e-04 4.86525398e-06 -9.56706174e-06 3.34006108e-05 1.02478251e-06 -1.65706370e-05 -1.02478251e-06 -4.01898009e-02 -8.51941384e-04 2.06367891e-02 -2.06367891e-02 2.06367891e-02 1.27621922e-02 -1.27621922e-02 1.27621922e-02 -5.88060035e-03 5.88060035e-03 -5.88060035e-03 -3.07263521e-04 -3.02715668e-03 1.01852759e-03 -1.01852759e-03 -1.53820756e-05 -3.47581608e-03 3.47581608e-03 5.29298815e-05 -7.33191558e-05 2.56788439e-04 1.11912408e-05 -1.26992503e-04 -1.11912408e-05 -1.59965704e-02 -2.06513817e-02 9.20684060e-03 -1.62457954e-02 1.62457954e-02 -7.53206233e-03 1.78560844e-02 -1.78560844e-02 -2.69864160e-03 -3.56615668e-03 3.56615668e-03 -5.90018653e-03 -1.04923873e-04 -1.01852759e-03 3.23331675e-04 -3.63143075e-04 -5.66366604e-06 -1.09913471e-03 1.23877805e-03 1.95566627e-05 -4.79009339e-06 7.75974336e-05 3.98776946e-06 -4.82772103e-05 -4.13755885e-06 1.59965704e-02 2.06513817e-02 -1.62457954e-02 9.20684060e-03 -1.62457954e-02 1.78560844e-02 -7.53206233e-03 1.78560844e-02 -1.34932080e-03 3.56615668e-03 -5.90018653e-03 2.33709218e-03 3.56615668e-03 1.04923873e-04 1.01852759e-03 -3.63143075e-04 3.23331675e-04 5.66366604e-06 1.23877805e-03 -1.09913471e-03 -1.95566627e-05 3.94142439e-05 -7.75974336e-05 -4.13755885e-06 2.82869477e-05 3.98776946e-06 -1.59965704e-02 -2.06513817e-02 1.62457954e-02 -1.62457954e-02 9.20684060e-03 -1.78560844e-02 1.78560844e-02 -7.53206233e-03 1.34932080e-03 -5.90018653e-03 3.56615668e-03 2.33709218e-03 -3.56615668e-03 -1.41324097e-06 -1.53820756e-05 5.66366604e-06 -5.66366604e-06 -4.12162075e-05 -1.94925310e-05 1.94925310e-05 1.44413999e-04 -9.77693072e-07 4.03239561e-06 2.10289351e-05 -1.69341407e-06 -2.10289351e-05 3.48221871e-02 -1.28347617e-02 -7.47144879e-03 1.78038327e-02 -1.78038327e-02 -2.05536306e-02 2.16538149e-02 -2.16538149e-02 7.12031599e-03 8.44999113e-04 -8.44999113e-04 7.00213894e-03 3.59208493e-04 3.47581608e-03 -1.09913471e-03 1.23877805e-03 1.94925310e-05 3.72261408e-03 -4.21360468e-03 -6.72429653e-05 7.51561916e-06 -2.40805687e-04 -1.38061213e-05 1.53853854e-04 1.43184607e-05 -3.48221871e-02 1.28347617e-02 1.78038327e-02 -7.47144879e-03 1.78038327e-02 2.16538149e-02 -2.05536306e-02 2.16538149e-02 3.56015800e-03 -8.44999113e-04 7.00213894e-03 -6.16637453e-03 -8.44999113e-04 -3.59208493e-04 -3.47581608e-03 1.23877805e-03 -1.09913471e-03 -1.94925310e-05 -4.21360468e-03 3.72261408e-03 6.72429653e-05 -1.29483537e-04 2.40805687e-04 1.43184607e-05 -8.34356441e-05 -1.38061213e-05 3.48221871e-02 -1.28347617e-02 -1.78038327e-02 1.78038327e-02 -7.47144879e-03 -2.16538149e-02 2.16538149e-02 -2.05536306e-02 -3.56015800e-03 7.00213894e-03 -8.44999113e-04 -6.16637453e-03 8.44999113e-04 4.86525398e-06 5.29298815e-05 -1.95566627e-05 1.95566627e-05 1.44413999e-04 6.72429653e-05 -6.72429653e-05 -5.07169119e-04 3.41053946e-06 -1.40030592e-05 -7.39612442e-05 5.90722763e-06 7.39612442e-05 2.69551701e-03 1.34775851e-03 -1.34775851e-03 -7.11790393e-03 -3.55895196e-03 3.55895196e-03 2.45879056e-03 -7.22214326e-04 7.22214326e-04 1.44442865e-03 -9.56706174e-06 -7.33191558e-05 4.79009339e-06 -3.94142439e-05 -9.77693072e-07 -7.51561916e-06 1.29483537e-04 3.41053946e-06 1.60757249e-05 -1.87156494e-05 5.85506643e-07 2.62806909e-06 -7.77681284e-07 -2.30243503e-03 -5.95672459e-03 3.61086424e-03 -3.61086424e-03 5.94234981e-03 -9.20772072e-04 9.20772072e-04 -7.07642391e-03 -7.22168763e-04 -4.89935284e-03 6.10850862e-03 -1.25083299e-03 -6.10850862e-03 3.34006108e-05 2.56788439e-04 -7.75974336e-05 7.75974336e-05 4.03239561e-06 2.40805687e-04 -2.40805687e-04 -1.40030592e-05 -1.87156494e-05 6.29222274e-05 -2.83293240e-06 -3.24164557e-05 2.83293240e-06 2.30243503e-03 5.95672459e-03 -3.61086424e-03 5.94234981e-03 -3.61086424e-03 9.20772072e-04 -7.07642391e-03 9.20772072e-04 7.22168763e-04 6.10850862e-03 -4.89935284e-03 -1.25083299e-03 6.10850862e-03 -1.02478251e-06 -1.11912408e-05 3.98776946e-06 -4.13755885e-06 -2.10289351e-05 -1.38061213e-05 1.43184607e-05 7.39612442e-05 -5.85506643e-07 2.83293240e-06 7.44879307e-06 -1.23603141e-06 -8.63228531e-06 -2.33438621e-03 -2.33438621e-03 6.16428562e-03 6.16428562e-03 -1.25091191e-03 -1.25091191e-03 2.45879056e-03 -1.65706370e-05 -1.26992503e-04 4.82772103e-05 -2.82869477e-05 -1.69341407e-06 -1.53853854e-04 8.34356441e-05 5.90722763e-06 2.62806909e-06 -3.24164557e-05 1.23603141e-06 1.91103577e-05 -1.12507933e-06 -2.30243503e-03 -5.95672459e-03 5.94234981e-03 -3.61086424e-03 3.61086424e-03 -7.07642391e-03 9.20772072e-04 -9.20772072e-04 1.44433753e-03 -6.10850862e-03 6.10850862e-03 -4.89935284e-03 1.02478251e-06 1.11912408e-05 -4.13755885e-06 3.98776946e-06 2.10289351e-05 1.43184607e-05 -1.38061213e-05 -7.39612442e-05 7.77681284e-07 -2.83293240e-06 -8.63228531e-06 1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 193 217 242 268 294 319 345 371 394 420 446 466 491 +1 -1 0 314 + -3.08720237e-05 -3.07390885e-04 1.40312477e-06 1.04971511e-04 -1.04971511e-04 -4.82934036e-06 -3.59371792e-04 3.59371792e-04 1.91511014e-05 -1.01771600e-06 1.01771600e-06 3.34354066e-05 -3.07390885e-04 -3.02853625e-03 1.52691305e-05 1.01904693e-03 -1.01904693e-03 -5.25303803e-05 -3.47759038e-03 3.47759038e-03 1.46824618e-04 -1.11116241e-05 1.11116241e-05 2.57169624e-04 1.40312477e-06 1.52691305e-05 -4.12471245e-05 -5.62416573e-06 5.62416573e-06 1.44520599e-04 1.93518153e-05 -1.93518153e-05 -1.94209918e-06 2.10524692e-05 -2.10524692e-05 -4.00502527e-06 -1.04971511e-04 -1.01904693e-03 5.62416573e-06 3.23522367e-04 -3.63336653e-04 -1.94156142e-05 -1.09979124e-03 1.23944563e-03 4.42718575e-05 -3.96066075e-06 4.11041279e-06 1.99917732e-05 7.77363679e-05 1.04971511e-04 1.01904693e-03 -5.62416573e-06 -3.63336653e-04 3.23522367e-04 1.94156142e-05 1.23944563e-03 -1.09979124e-03 -4.42718575e-05 4.11041279e-06 -3.96066075e-06 1.99917732e-05 -7.77363679e-05 -4.82934036e-06 -5.25303803e-05 1.44520599e-04 1.94156142e-05 -1.94156142e-05 -5.07533292e-04 -6.67426116e-05 6.67426116e-05 6.77236452e-06 -7.40430828e-05 7.40430828e-05 1.39044038e-05 3.59371792e-04 3.47759038e-03 -1.93518153e-05 -1.09979124e-03 1.23944563e-03 6.67426116e-05 3.72486395e-03 -4.21589662e-03 -1.37233714e-04 1.37086540e-05 -1.42204009e-05 -7.04243190e-05 -2.41287214e-04 -3.59371792e-04 -3.47759038e-03 1.93518153e-05 1.23944563e-03 -1.09979124e-03 -6.67426116e-05 -4.21589662e-03 3.72486395e-03 1.37233714e-04 -1.42204009e-05 1.37086540e-05 -7.04243190e-05 2.41287214e-04 1.91511014e-05 1.46824618e-04 -1.94209918e-06 -4.42718575e-05 4.42718575e-05 6.77236452e-06 1.37233714e-04 -1.37233714e-04 2.06050561e-05 1.35463165e-06 -1.35463165e-06 3.73839344e-05 1.01771600e-06 1.11116241e-05 -2.10524692e-05 -3.96066075e-06 4.11041279e-06 7.40430828e-05 1.37086540e-05 -1.42204009e-05 -1.35463165e-06 7.46646087e-06 -8.65011321e-06 -1.11115607e-07 -2.81468585e-06 -1.01771600e-06 -1.11116241e-05 2.10524692e-05 4.11041279e-06 -3.96066075e-06 -7.40430828e-05 -1.42204009e-05 1.37086540e-05 1.35463165e-06 -8.65011321e-06 7.46646087e-06 -1.11115607e-07 2.81468585e-06 -1.99917732e-05 -1.99917732e-05 7.04243190e-05 7.04243190e-05 1.11115607e-07 1.11115607e-07 1.45594780e-05 3.34354066e-05 2.57169624e-04 -4.00502527e-06 -7.77363679e-05 7.77363679e-05 1.39044038e-05 2.41287214e-04 -2.41287214e-04 3.73839344e-05 2.81468585e-06 -2.81468585e-06 6.28234069e-05 -3.08602939e-05 -3.07263521e-04 -1.41324097e-06 1.04923873e-04 -1.04923873e-04 4.86525398e-06 -3.59208493e-04 3.59208493e-04 1.91341235e-05 1.02478251e-06 -1.02478251e-06 3.34006108e-05 -3.07263521e-04 -3.02715668e-03 -1.53820756e-05 1.01852759e-03 -1.01852759e-03 5.29298815e-05 -3.47581608e-03 3.47581608e-03 1.46638312e-04 1.11912408e-05 -1.11912408e-05 2.56788439e-04 -1.41324097e-06 -1.53820756e-05 -4.12162075e-05 5.66366604e-06 -5.66366604e-06 1.44413999e-04 -1.94925310e-05 1.94925310e-05 1.95538614e-06 2.10289351e-05 -2.10289351e-05 4.03239561e-06 -1.04923873e-04 -1.01852759e-03 -5.66366604e-06 3.23331675e-04 -3.63143075e-04 1.95566627e-05 -1.09913471e-03 1.23877805e-03 4.42043373e-05 3.98776946e-06 -4.13755885e-06 1.99902626e-05 7.75974336e-05 1.04923873e-04 1.01852759e-03 5.66366604e-06 -3.63143075e-04 3.23331675e-04 -1.95566627e-05 1.23877805e-03 -1.09913471e-03 -4.42043373e-05 -4.13755885e-06 3.98776946e-06 1.99902626e-05 -7.75974336e-05 4.86525398e-06 5.29298815e-05 1.44413999e-04 -1.95566627e-05 1.95566627e-05 -5.07169119e-04 6.72429653e-05 -6.72429653e-05 -6.82107892e-06 -7.39612442e-05 7.39612442e-05 -1.40030592e-05 3.59208493e-04 3.47581608e-03 1.94925310e-05 -1.09913471e-03 1.23877805e-03 -6.72429653e-05 3.72261408e-03 -4.21360468e-03 -1.36999156e-04 -1.38061213e-05 1.43184607e-05 -7.04182099e-05 -2.40805687e-04 -3.59208493e-04 -3.47581608e-03 -1.94925310e-05 1.23877805e-03 -1.09913471e-03 6.72429653e-05 -4.21360468e-03 3.72261408e-03 1.36999156e-04 1.43184607e-05 -1.38061213e-05 -7.04182099e-05 2.40805687e-04 1.91341235e-05 1.46638312e-04 1.95538614e-06 -4.42043373e-05 4.42043373e-05 -6.82107892e-06 1.36999156e-04 -1.36999156e-04 2.06276741e-05 -1.36318793e-06 1.36318793e-06 3.74312988e-05 -1.02478251e-06 -1.11912408e-05 -2.10289351e-05 3.98776946e-06 -4.13755885e-06 7.39612442e-05 -1.38061213e-05 1.43184607e-05 1.36318793e-06 7.44879307e-06 -8.63228531e-06 1.10952081e-07 2.83293240e-06 1.02478251e-06 1.11912408e-05 2.10289351e-05 -4.13755885e-06 3.98776946e-06 -7.39612442e-05 1.43184607e-05 -1.38061213e-05 -1.36318793e-06 -8.63228531e-06 7.44879307e-06 1.10952081e-07 -2.83293240e-06 -1.99902626e-05 -1.99902626e-05 7.04182099e-05 7.04182099e-05 -1.10952081e-07 -1.10952081e-07 1.45584085e-05 3.34006108e-05 2.56788439e-04 4.03239561e-06 -7.75974336e-05 7.75974336e-05 -1.40030592e-05 2.40805687e-04 -2.40805687e-04 3.74312988e-05 -2.83293240e-06 2.83293240e-06 6.29222274e-05 + 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 3 4 6 7 9 10 11 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 16 17 19 20 22 23 24 13 14 15 16 17 18 19 20 21 22 23 25 + 0 12 24 36 49 62 74 87 100 112 125 138 145 157 169 181 193 206 219 231 244 257 269 282 295 302 314 +1 0 -1 338 + -3.08720237e-05 -3.07390885e-04 1.04971511e-04 1.04971511e-04 -1.40312477e-06 -3.59371792e-04 -3.59371792e-04 4.82934036e-06 -9.57555071e-06 -3.34354066e-05 1.01771600e-06 -1.65853403e-05 1.01771600e-06 -3.07390885e-04 -3.02853625e-03 1.01904693e-03 1.01904693e-03 -1.52691305e-05 -3.47759038e-03 -3.47759038e-03 5.25303803e-05 -7.34123089e-05 -2.57169624e-04 1.11116241e-05 -1.27153849e-04 1.11116241e-05 -1.04971511e-04 -1.01904693e-03 3.23522367e-04 3.63336653e-04 -5.62416573e-06 -1.09979124e-03 -1.23944563e-03 1.94156142e-05 -4.82254533e-06 -7.77363679e-05 3.96066075e-06 -4.83364399e-05 4.11041279e-06 -1.04971511e-04 -1.01904693e-03 3.63336653e-04 3.23522367e-04 -5.62416573e-06 -1.23944563e-03 -1.09979124e-03 1.94156142e-05 -3.94493122e-05 -7.77363679e-05 4.11041279e-06 -2.83446667e-05 3.96066075e-06 -1.40312477e-06 -1.52691305e-05 5.62416573e-06 5.62416573e-06 -4.12471245e-05 -1.93518153e-05 -1.93518153e-05 1.44520599e-04 -9.71049589e-07 -4.00502527e-06 2.10524692e-05 -1.68190722e-06 2.10524692e-05 3.59371792e-04 3.47759038e-03 -1.09979124e-03 -1.23944563e-03 1.93518153e-05 3.72486395e-03 4.21589662e-03 -6.67426116e-05 7.62760775e-06 2.41287214e-04 -1.37086540e-05 1.54060042e-04 -1.42204009e-05 3.59371792e-04 3.47759038e-03 -1.23944563e-03 -1.09979124e-03 1.93518153e-05 4.21589662e-03 3.72486395e-03 -6.67426116e-05 1.29606106e-04 2.41287214e-04 -1.42204009e-05 8.36357232e-05 -1.37086540e-05 4.82934036e-06 5.25303803e-05 -1.94156142e-05 -1.94156142e-05 1.44520599e-04 6.67426116e-05 6.67426116e-05 -5.07533292e-04 3.38618226e-06 1.39044038e-05 -7.40430828e-05 5.86503972e-06 -7.40430828e-05 -9.57555071e-06 -7.34123089e-05 4.82254533e-06 3.94493122e-05 -9.71049589e-07 -7.62760775e-06 -1.29606106e-04 3.38618226e-06 1.60708725e-05 1.86919672e-05 5.81086888e-07 2.61781210e-06 7.73544764e-07 -3.34354066e-05 -2.57169624e-04 7.77363679e-05 7.77363679e-05 -4.00502527e-06 -2.41287214e-04 -2.41287214e-04 1.39044038e-05 1.86919672e-05 6.28234069e-05 2.81468585e-06 3.23754368e-05 2.81468585e-06 -1.01771600e-06 -1.11116241e-05 3.96066075e-06 4.11041279e-06 -2.10524692e-05 -1.37086540e-05 -1.42204009e-05 7.40430828e-05 -5.81086888e-07 -2.81468585e-06 7.46646087e-06 -1.22870323e-06 8.65011321e-06 -1.65853403e-05 -1.27153849e-04 4.83364399e-05 2.83446667e-05 -1.68190722e-06 -1.54060042e-04 -8.36357232e-05 5.86503972e-06 2.61781210e-06 3.23754368e-05 1.22870323e-06 1.90936616e-05 1.11758762e-06 -1.01771600e-06 -1.11116241e-05 4.11041279e-06 3.96066075e-06 -2.10524692e-05 -1.42204009e-05 -1.37086540e-05 7.40430828e-05 -7.73544764e-07 -2.81468585e-06 8.65011321e-06 -1.11758762e-06 7.46646087e-06 -3.08602939e-05 -3.07263521e-04 1.04923873e-04 1.04923873e-04 1.41324097e-06 -3.59208493e-04 -3.59208493e-04 -4.86525398e-06 -9.56706174e-06 -3.34006108e-05 -1.02478251e-06 -1.65706370e-05 -1.02478251e-06 -3.07263521e-04 -3.02715668e-03 1.01852759e-03 1.01852759e-03 1.53820756e-05 -3.47581608e-03 -3.47581608e-03 -5.29298815e-05 -7.33191558e-05 -2.56788439e-04 -1.11912408e-05 -1.26992503e-04 -1.11912408e-05 -1.04923873e-04 -1.01852759e-03 3.23331675e-04 3.63143075e-04 5.66366604e-06 -1.09913471e-03 -1.23877805e-03 -1.95566627e-05 -4.79009339e-06 -7.75974336e-05 -3.98776946e-06 -4.82772103e-05 -4.13755885e-06 -1.04923873e-04 -1.01852759e-03 3.63143075e-04 3.23331675e-04 5.66366604e-06 -1.23877805e-03 -1.09913471e-03 -1.95566627e-05 -3.94142439e-05 -7.75974336e-05 -4.13755885e-06 -2.82869477e-05 -3.98776946e-06 1.41324097e-06 1.53820756e-05 -5.66366604e-06 -5.66366604e-06 -4.12162075e-05 1.94925310e-05 1.94925310e-05 1.44413999e-04 9.77693072e-07 4.03239561e-06 2.10289351e-05 1.69341407e-06 2.10289351e-05 3.59208493e-04 3.47581608e-03 -1.09913471e-03 -1.23877805e-03 -1.94925310e-05 3.72261408e-03 4.21360468e-03 6.72429653e-05 7.51561916e-06 2.40805687e-04 1.38061213e-05 1.53853854e-04 1.43184607e-05 3.59208493e-04 3.47581608e-03 -1.23877805e-03 -1.09913471e-03 -1.94925310e-05 4.21360468e-03 3.72261408e-03 6.72429653e-05 1.29483537e-04 2.40805687e-04 1.43184607e-05 8.34356441e-05 1.38061213e-05 -4.86525398e-06 -5.29298815e-05 1.95566627e-05 1.95566627e-05 1.44413999e-04 -6.72429653e-05 -6.72429653e-05 -5.07169119e-04 -3.41053946e-06 -1.40030592e-05 -7.39612442e-05 -5.90722763e-06 -7.39612442e-05 -9.56706174e-06 -7.33191558e-05 4.79009339e-06 3.94142439e-05 9.77693072e-07 -7.51561916e-06 -1.29483537e-04 -3.41053946e-06 1.60757249e-05 1.87156494e-05 -5.85506643e-07 2.62806909e-06 -7.77681284e-07 -3.34006108e-05 -2.56788439e-04 7.75974336e-05 7.75974336e-05 4.03239561e-06 -2.40805687e-04 -2.40805687e-04 -1.40030592e-05 1.87156494e-05 6.29222274e-05 -2.83293240e-06 3.24164557e-05 -2.83293240e-06 1.02478251e-06 1.11912408e-05 -3.98776946e-06 -4.13755885e-06 -2.10289351e-05 1.38061213e-05 1.43184607e-05 7.39612442e-05 5.85506643e-07 2.83293240e-06 7.44879307e-06 1.23603141e-06 8.63228531e-06 -1.65706370e-05 -1.26992503e-04 4.82772103e-05 2.82869477e-05 1.69341407e-06 -1.53853854e-04 -8.34356441e-05 -5.90722763e-06 2.62806909e-06 3.24164557e-05 -1.23603141e-06 1.91103577e-05 -1.12507933e-06 1.02478251e-06 1.11912408e-05 -4.13755885e-06 -3.98776946e-06 -2.10289351e-05 1.43184607e-05 1.38061213e-05 7.39612442e-05 7.77681284e-07 2.83293240e-06 8.63228531e-06 1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 +1 0 0 491 + -3.08720237e-05 -3.07390885e-04 1.04971511e-04 1.40312477e-06 -1.04971511e-04 -3.59371792e-04 -4.82934036e-06 3.59371792e-04 -9.57555071e-06 -1.01771600e-06 3.34354066e-05 1.65853403e-05 1.01771600e-06 -3.07390885e-04 -3.02853625e-03 1.01904693e-03 1.52691305e-05 -1.01904693e-03 -3.47759038e-03 -5.25303803e-05 3.47759038e-03 -7.34123089e-05 -1.11116241e-05 2.57169624e-04 1.27153849e-04 1.11116241e-05 -1.04971511e-04 -1.01904693e-03 3.23522367e-04 5.62416573e-06 -3.63336653e-04 -1.09979124e-03 -1.94156142e-05 1.23944563e-03 -4.82254533e-06 -3.96066075e-06 7.77363679e-05 4.83364399e-05 4.11041279e-06 1.40312477e-06 1.52691305e-05 -5.62416573e-06 -4.12471245e-05 5.62416573e-06 1.93518153e-05 1.44520599e-04 -1.93518153e-05 9.71049589e-07 2.10524692e-05 -4.00502527e-06 -1.68190722e-06 -2.10524692e-05 1.04971511e-04 1.01904693e-03 -3.63336653e-04 -5.62416573e-06 3.23522367e-04 1.23944563e-03 1.94156142e-05 -1.09979124e-03 3.94493122e-05 4.11041279e-06 -7.77363679e-05 -2.83446667e-05 -3.96066075e-06 3.59371792e-04 3.47759038e-03 -1.09979124e-03 -1.93518153e-05 1.23944563e-03 3.72486395e-03 6.67426116e-05 -4.21589662e-03 7.62760775e-06 1.37086540e-05 -2.41287214e-04 -1.54060042e-04 -1.42204009e-05 -4.82934036e-06 -5.25303803e-05 1.94156142e-05 1.44520599e-04 -1.94156142e-05 -6.67426116e-05 -5.07533292e-04 6.67426116e-05 -3.38618226e-06 -7.40430828e-05 1.39044038e-05 5.86503972e-06 7.40430828e-05 -3.59371792e-04 -3.47759038e-03 1.23944563e-03 1.93518153e-05 -1.09979124e-03 -4.21589662e-03 -6.67426116e-05 3.72486395e-03 -1.29606106e-04 -1.42204009e-05 2.41287214e-04 8.36357232e-05 1.37086540e-05 -9.57555071e-06 -7.34123089e-05 4.82254533e-06 9.71049589e-07 -3.94493122e-05 -7.62760775e-06 -3.38618226e-06 1.29606106e-04 1.60708725e-05 -5.81086888e-07 -1.86919672e-05 -2.61781210e-06 7.73544764e-07 1.01771600e-06 1.11116241e-05 -3.96066075e-06 -2.10524692e-05 4.11041279e-06 1.37086540e-05 7.40430828e-05 -1.42204009e-05 5.81086888e-07 7.46646087e-06 -2.81468585e-06 -1.22870323e-06 -8.65011321e-06 3.34354066e-05 2.57169624e-04 -7.77363679e-05 -4.00502527e-06 7.77363679e-05 2.41287214e-04 1.39044038e-05 -2.41287214e-04 -1.86919672e-05 2.81468585e-06 6.28234069e-05 3.23754368e-05 -2.81468585e-06 1.65853403e-05 1.27153849e-04 -4.83364399e-05 -1.68190722e-06 2.83446667e-05 1.54060042e-04 5.86503972e-06 -8.36357232e-05 -2.61781210e-06 1.22870323e-06 3.23754368e-05 1.90936616e-05 -1.11758762e-06 -1.01771600e-06 -1.11116241e-05 4.11041279e-06 2.10524692e-05 -3.96066075e-06 -1.42204009e-05 -7.40430828e-05 1.37086540e-05 -7.73544764e-07 -8.65011321e-06 2.81468585e-06 1.11758762e-06 7.46646087e-06 -1.10678938e-02 -4.02101705e-02 1.60075545e-02 1.60075545e-02 -1.60075545e-02 -3.48613875e-02 -3.48613875e-02 3.48613875e-02 2.28290009e-03 -2.28290009e-03 -2.28290009e-03 -3.08602939e-05 -3.07263521e-04 1.04923873e-04 -1.41324097e-06 -1.04923873e-04 -3.59208493e-04 4.86525398e-06 3.59208493e-04 -9.56706174e-06 1.02478251e-06 3.34006108e-05 1.65706370e-05 -1.02478251e-06 -4.01898009e-02 -8.51941384e-04 2.06367891e-02 2.06367891e-02 -2.06367891e-02 1.27621922e-02 1.27621922e-02 -1.27621922e-02 5.88060035e-03 -5.88060035e-03 -5.88060035e-03 -3.07263521e-04 -3.02715668e-03 1.01852759e-03 -1.53820756e-05 -1.01852759e-03 -3.47581608e-03 5.29298815e-05 3.47581608e-03 -7.33191558e-05 1.11912408e-05 2.56788439e-04 1.26992503e-04 -1.11912408e-05 -1.59965704e-02 -2.06513817e-02 9.20684060e-03 1.62457954e-02 -1.62457954e-02 -7.53206233e-03 -1.78560844e-02 1.78560844e-02 -2.69864160e-03 3.56615668e-03 -3.56615668e-03 -5.90018653e-03 -1.04923873e-04 -1.01852759e-03 3.23331675e-04 -5.66366604e-06 -3.63143075e-04 -1.09913471e-03 1.95566627e-05 1.23877805e-03 -4.79009339e-06 3.98776946e-06 7.75974336e-05 4.82772103e-05 -4.13755885e-06 -1.59965704e-02 -2.06513817e-02 1.62457954e-02 9.20684060e-03 -1.62457954e-02 -1.78560844e-02 -7.53206233e-03 1.78560844e-02 1.34932080e-03 3.56615668e-03 -5.90018653e-03 -2.33709218e-03 -3.56615668e-03 -1.41324097e-06 -1.53820756e-05 5.66366604e-06 -4.12162075e-05 -5.66366604e-06 -1.94925310e-05 1.44413999e-04 1.94925310e-05 -9.77693072e-07 2.10289351e-05 4.03239561e-06 1.69341407e-06 -2.10289351e-05 1.59965704e-02 2.06513817e-02 -1.62457954e-02 -1.62457954e-02 9.20684060e-03 1.78560844e-02 1.78560844e-02 -7.53206233e-03 -1.34932080e-03 -5.90018653e-03 3.56615668e-03 -2.33709218e-03 3.56615668e-03 1.04923873e-04 1.01852759e-03 -3.63143075e-04 5.66366604e-06 3.23331675e-04 1.23877805e-03 -1.95566627e-05 -1.09913471e-03 3.94142439e-05 -4.13755885e-06 -7.75974336e-05 -2.82869477e-05 3.98776946e-06 3.48221871e-02 -1.28347617e-02 -7.47144879e-03 -1.78038327e-02 1.78038327e-02 -2.05536306e-02 -2.16538149e-02 2.16538149e-02 7.12031599e-03 -8.44999113e-04 8.44999113e-04 7.00213894e-03 3.59208493e-04 3.47581608e-03 -1.09913471e-03 1.94925310e-05 1.23877805e-03 3.72261408e-03 -6.72429653e-05 -4.21360468e-03 7.51561916e-06 -1.38061213e-05 -2.40805687e-04 -1.53853854e-04 1.43184607e-05 3.48221871e-02 -1.28347617e-02 -1.78038327e-02 -7.47144879e-03 1.78038327e-02 -2.16538149e-02 -2.05536306e-02 2.16538149e-02 -3.56015800e-03 -8.44999113e-04 7.00213894e-03 6.16637453e-03 8.44999113e-04 4.86525398e-06 5.29298815e-05 -1.95566627e-05 1.44413999e-04 1.95566627e-05 6.72429653e-05 -5.07169119e-04 -6.72429653e-05 3.41053946e-06 -7.39612442e-05 -1.40030592e-05 -5.90722763e-06 7.39612442e-05 -3.48221871e-02 1.28347617e-02 1.78038327e-02 1.78038327e-02 -7.47144879e-03 2.16538149e-02 2.16538149e-02 -2.05536306e-02 3.56015800e-03 7.00213894e-03 -8.44999113e-04 6.16637453e-03 -8.44999113e-04 -3.59208493e-04 -3.47581608e-03 1.23877805e-03 -1.94925310e-05 -1.09913471e-03 -4.21360468e-03 6.72429653e-05 3.72261408e-03 -1.29483537e-04 1.43184607e-05 2.40805687e-04 8.34356441e-05 -1.38061213e-05 2.69551701e-03 -1.34775851e-03 1.34775851e-03 -7.11790393e-03 3.55895196e-03 -3.55895196e-03 2.45879056e-03 7.22214326e-04 -7.22214326e-04 1.44442865e-03 -9.56706174e-06 -7.33191558e-05 4.79009339e-06 -9.77693072e-07 -3.94142439e-05 -7.51561916e-06 3.41053946e-06 1.29483537e-04 1.60757249e-05 5.85506643e-07 -1.87156494e-05 -2.62806909e-06 -7.77681284e-07 2.30243503e-03 5.95672459e-03 -3.61086424e-03 -3.61086424e-03 5.94234981e-03 9.20772072e-04 9.20772072e-04 -7.07642391e-03 7.22168763e-04 -4.89935284e-03 6.10850862e-03 1.25083299e-03 6.10850862e-03 -1.02478251e-06 -1.11912408e-05 3.98776946e-06 -2.10289351e-05 -4.13755885e-06 -1.38061213e-05 7.39612442e-05 1.43184607e-05 -5.85506643e-07 7.44879307e-06 2.83293240e-06 1.23603141e-06 -8.63228531e-06 -2.30243503e-03 -5.95672459e-03 3.61086424e-03 5.94234981e-03 -3.61086424e-03 -9.20772072e-04 -7.07642391e-03 9.20772072e-04 -7.22168763e-04 6.10850862e-03 -4.89935284e-03 1.25083299e-03 -6.10850862e-03 3.34006108e-05 2.56788439e-04 -7.75974336e-05 4.03239561e-06 7.75974336e-05 2.40805687e-04 -1.40030592e-05 -2.40805687e-04 -1.87156494e-05 -2.83293240e-06 6.29222274e-05 3.24164557e-05 2.83293240e-06 2.33438621e-03 2.33438621e-03 -6.16428562e-03 -6.16428562e-03 1.25091191e-03 1.25091191e-03 2.45879056e-03 1.65706370e-05 1.26992503e-04 -4.82772103e-05 1.69341407e-06 2.82869477e-05 1.53853854e-04 -5.90722763e-06 -8.34356441e-05 -2.62806909e-06 -1.23603141e-06 3.24164557e-05 1.91103577e-05 1.12507933e-06 -2.30243503e-03 -5.95672459e-03 5.94234981e-03 3.61086424e-03 -3.61086424e-03 -7.07642391e-03 -9.20772072e-04 9.20772072e-04 1.44433753e-03 6.10850862e-03 -6.10850862e-03 -4.89935284e-03 1.02478251e-06 1.11912408e-05 -4.13755885e-06 2.10289351e-05 3.98776946e-06 1.43184607e-05 -7.39612442e-05 -1.38061213e-05 7.77681284e-07 -8.63228531e-06 -2.83293240e-06 -1.12507933e-06 7.44879307e-06 + 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 4 6 7 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 0 13 26 39 52 65 78 91 104 117 130 143 156 169 193 217 242 268 294 319 345 371 394 420 446 466 491 diff --git a/tests/03_NAO_multik/59_NO_KP_initHR/result.ref b/tests/03_NAO_multik/59_NO_KP_initHR/result.ref new file mode 100644 index 0000000000..3c21042a34 --- /dev/null +++ b/tests/03_NAO_multik/59_NO_KP_initHR/result.ref @@ -0,0 +1,3 @@ +etotref -252.9538842277285 +etotperatomref -126.4769421139 +totaltimeref 0.28 diff --git a/tests/03_NAO_multik/33_NO_KP_OW/INPUT b/tests/03_NAO_multik/60_NO_KP_OW/INPUT similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/INPUT rename to tests/03_NAO_multik/60_NO_KP_OW/INPUT diff --git a/tests/03_NAO_multik/37_NO_KP_restart/KPT b/tests/03_NAO_multik/60_NO_KP_OW/KPT similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/KPT rename to tests/03_NAO_multik/60_NO_KP_OW/KPT diff --git a/tests/03_NAO_multik/33_NO_KP_OW/README b/tests/03_NAO_multik/60_NO_KP_OW/README similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/README rename to tests/03_NAO_multik/60_NO_KP_OW/README diff --git a/tests/03_NAO_multik/60_NO_KP_OW/STRU b/tests/03_NAO_multik/60_NO_KP_OW/STRU new file mode 100644 index 0000000000..30af97b4b4 --- /dev/null +++ b/tests/03_NAO_multik/60_NO_KP_OW/STRU @@ -0,0 +1,19 @@ +#This is the atom file containing all the information +#about the lattice structure. + +ATOMIC_SPECIES +H 1.0008 H_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +H_gga_6au_60Ry_2s1p.orb + +LATTICE_CONSTANT +10.0 #Lattice constant + +ATOMIC_POSITIONS +Cartesian #Cartesian(Unit is LATTICE_CONSTANT) +H #Name of element +0.0 #Magnetic for this element. +2 #Number of atoms +0.00 0.00 -0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z +0.00 0.00 0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z diff --git a/tests/03_NAO_multik/33_NO_KP_OW/result.ref b/tests/03_NAO_multik/60_NO_KP_OW/result.ref similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/result.ref rename to tests/03_NAO_multik/60_NO_KP_OW/result.ref diff --git a/tests/03_NAO_multik/33_NO_KP_OW/wfk2_nao_mod.txt.ref b/tests/03_NAO_multik/60_NO_KP_OW/wfk2_nao_mod.txt.ref similarity index 100% rename from tests/03_NAO_multik/33_NO_KP_OW/wfk2_nao_mod.txt.ref rename to tests/03_NAO_multik/60_NO_KP_OW/wfk2_nao_mod.txt.ref diff --git a/tests/03_NAO_multik/36_NO_KP_sol_H2/INPUT b/tests/03_NAO_multik/61_NO_KP_sol/INPUT similarity index 100% rename from tests/03_NAO_multik/36_NO_KP_sol_H2/INPUT rename to tests/03_NAO_multik/61_NO_KP_sol/INPUT diff --git a/tests/03_NAO_multik/36_NO_KP_sol_H2/KPT b/tests/03_NAO_multik/61_NO_KP_sol/KPT similarity index 100% rename from tests/03_NAO_multik/36_NO_KP_sol_H2/KPT rename to tests/03_NAO_multik/61_NO_KP_sol/KPT diff --git a/tests/03_NAO_multik/36_NO_KP_sol_H2/README b/tests/03_NAO_multik/61_NO_KP_sol/README similarity index 100% rename from tests/03_NAO_multik/36_NO_KP_sol_H2/README rename to tests/03_NAO_multik/61_NO_KP_sol/README diff --git a/tests/03_NAO_multik/36_NO_KP_sol_H2/STRU b/tests/03_NAO_multik/61_NO_KP_sol/STRU similarity index 100% rename from tests/03_NAO_multik/36_NO_KP_sol_H2/STRU rename to tests/03_NAO_multik/61_NO_KP_sol/STRU diff --git a/tests/03_NAO_multik/36_NO_KP_sol_H2/result.ref b/tests/03_NAO_multik/61_NO_KP_sol/result.ref similarity index 100% rename from tests/03_NAO_multik/36_NO_KP_sol_H2/result.ref rename to tests/03_NAO_multik/61_NO_KP_sol/result.ref diff --git a/tests/03_NAO_multik/37_NO_KP_restart/INPUT b/tests/03_NAO_multik/62_NO_KP_restart/INPUT similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/INPUT rename to tests/03_NAO_multik/62_NO_KP_restart/INPUT diff --git a/tests/03_NAO_multik/62_NO_KP_restart/KPT b/tests/03_NAO_multik/62_NO_KP_restart/KPT new file mode 100644 index 0000000000..f5f7f4ec34 --- /dev/null +++ b/tests/03_NAO_multik/62_NO_KP_restart/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/03_NAO_multik/37_NO_KP_restart/README b/tests/03_NAO_multik/62_NO_KP_restart/README similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/README rename to tests/03_NAO_multik/62_NO_KP_restart/README diff --git a/tests/03_NAO_multik/37_NO_KP_restart/STRU b/tests/03_NAO_multik/62_NO_KP_restart/STRU similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/STRU rename to tests/03_NAO_multik/62_NO_KP_restart/STRU diff --git a/tests/03_NAO_multik/37_NO_KP_restart/restart/charge_0_0 b/tests/03_NAO_multik/62_NO_KP_restart/restart/charge_0_0 similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/restart/charge_0_0 rename to tests/03_NAO_multik/62_NO_KP_restart/restart/charge_0_0 diff --git a/tests/03_NAO_multik/37_NO_KP_restart/restart/charge_1_0 b/tests/03_NAO_multik/62_NO_KP_restart/restart/charge_1_0 similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/restart/charge_1_0 rename to tests/03_NAO_multik/62_NO_KP_restart/restart/charge_1_0 diff --git a/tests/03_NAO_multik/37_NO_KP_restart/restart/charge_2_0 b/tests/03_NAO_multik/62_NO_KP_restart/restart/charge_2_0 similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/restart/charge_2_0 rename to tests/03_NAO_multik/62_NO_KP_restart/restart/charge_2_0 diff --git a/tests/03_NAO_multik/37_NO_KP_restart/restart/charge_3_0 b/tests/03_NAO_multik/62_NO_KP_restart/restart/charge_3_0 similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/restart/charge_3_0 rename to tests/03_NAO_multik/62_NO_KP_restart/restart/charge_3_0 diff --git a/tests/03_NAO_multik/37_NO_KP_restart/result.ref b/tests/03_NAO_multik/62_NO_KP_restart/result.ref similarity index 100% rename from tests/03_NAO_multik/37_NO_KP_restart/result.ref rename to tests/03_NAO_multik/62_NO_KP_restart/result.ref diff --git a/tests/03_NAO_multik/63_NO_KP_out_elf/INPUT b/tests/03_NAO_multik/63_NO_KP_out_elf/INPUT new file mode 100644 index 0000000000..6f61b6ba1a --- /dev/null +++ b/tests/03_NAO_multik/63_NO_KP_out_elf/INPUT @@ -0,0 +1,28 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf + +nbands 20 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB + +#Parameters (2.Iteration) +ecutwfc 5 +scf_thr 1e-7 +scf_nmax 100 + +nspin 4 +#Parameters (3.Basis) +basis_type lcao + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 + +#Parameters (5.Mixing) +mixing_type plain +mixing_beta 0.7 +mixing_gg0 0.0 + +out_elf 1 diff --git a/tests/09_DeePKS/103_NO_KP_deepks_basic/KPT b/tests/03_NAO_multik/63_NO_KP_out_elf/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_basic/KPT rename to tests/03_NAO_multik/63_NO_KP_out_elf/KPT diff --git a/tests/03_NAO_multik/63_NO_KP_out_elf/README b/tests/03_NAO_multik/63_NO_KP_out_elf/README new file mode 100644 index 0000000000..d79ca6f30b --- /dev/null +++ b/tests/03_NAO_multik/63_NO_KP_out_elf/README @@ -0,0 +1 @@ +test out_elf for nspin=4 diff --git a/tests/03_NAO_multik/63_NO_KP_out_elf/STRU b/tests/03_NAO_multik/63_NO_KP_out_elf/STRU new file mode 100644 index 0000000000..40f8c4857a --- /dev/null +++ b/tests/03_NAO_multik/63_NO_KP_out_elf/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +C 12.0 C_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +C_gga_8au_100Ry_2s2p1d.orb + +LATTICE_CONSTANT +1.89035917 + +LATTICE_VECTORS +4.0 0.0 0.0 #latvec3 +0.0 4.0 0.0 +0.0 0.0 4.0 + +ATOMIC_POSITIONS +Direct + +C #label +0 #magnetism +1 #number of atoms +0.0 0.0000000000000000 0.0000000000000000 1 1 1 + diff --git a/tests/03_NAO_multik/63_NO_KP_out_elf/refelf.cube b/tests/03_NAO_multik/63_NO_KP_out_elf/refelf.cube new file mode 100644 index 0000000000..470588e8b5 --- /dev/null +++ b/tests/03_NAO_multik/63_NO_KP_out_elf/refelf.cube @@ -0,0 +1,295 @@ +STEP: 0 Cubefile created from ABACUS. Inner loop is z, followed by y and x +4 (nspin) +1 0.0 0.0 0.0 +12 0.630120 0.000000 0.000000 +12 0.000000 0.630120 0.000000 +12 0.000000 0.000000 0.630120 + 6 4.000000 0.000000 0.000000 0.000000 + 4.485e-02 1.509e-01 9.975e-01 8.082e-02 1.589e-02 1.478e-03 + 5.736e-04 1.478e-03 1.589e-02 8.082e-02 9.975e-01 1.509e-01 + 1.509e-01 3.764e-01 7.635e-01 6.868e-02 5.471e-02 1.544e-02 + 6.055e-07 1.544e-02 5.471e-02 6.868e-02 7.635e-01 3.764e-01 + 9.975e-01 7.635e-01 9.510e-01 7.489e-03 3.927e-03 3.699e-05 + 3.190e-04 3.699e-05 3.927e-03 7.489e-03 9.510e-01 7.635e-01 + 8.082e-02 6.868e-02 7.489e-03 9.488e-02 2.017e-03 1.419e-07 + 3.688e-04 1.419e-07 2.017e-03 9.488e-02 7.489e-03 6.868e-02 + 1.589e-02 5.471e-02 3.927e-03 2.017e-03 9.237e-11 3.368e-02 + 1.140e-04 3.368e-02 9.237e-11 2.017e-03 3.927e-03 5.471e-02 + 1.478e-03 1.544e-02 3.699e-05 1.419e-07 3.368e-02 9.707e-05 + 0.000e+00 9.707e-05 3.368e-02 1.419e-07 3.699e-05 1.544e-02 + 5.736e-04 6.055e-07 3.190e-04 3.688e-04 1.140e-04 0.000e+00 + 0.000e+00 0.000e+00 1.140e-04 3.688e-04 3.190e-04 6.055e-07 + 1.478e-03 1.544e-02 3.699e-05 1.419e-07 3.368e-02 9.707e-05 + 0.000e+00 9.707e-05 3.368e-02 1.419e-07 3.699e-05 1.544e-02 + 1.589e-02 5.471e-02 3.927e-03 2.017e-03 9.237e-11 3.368e-02 + 1.140e-04 3.368e-02 9.237e-11 2.017e-03 3.927e-03 5.471e-02 + 8.082e-02 6.868e-02 7.489e-03 9.488e-02 2.017e-03 1.419e-07 + 3.688e-04 1.419e-07 2.017e-03 9.488e-02 7.489e-03 6.868e-02 + 9.975e-01 7.635e-01 9.510e-01 7.489e-03 3.927e-03 3.699e-05 + 3.190e-04 3.699e-05 3.927e-03 7.489e-03 9.510e-01 7.635e-01 + 1.509e-01 3.764e-01 7.635e-01 6.868e-02 5.471e-02 1.544e-02 + 6.055e-07 1.544e-02 5.471e-02 6.868e-02 7.635e-01 3.764e-01 + 1.509e-01 3.764e-01 7.635e-01 6.868e-02 5.471e-02 1.544e-02 + 6.055e-07 1.544e-02 5.471e-02 6.868e-02 7.635e-01 3.764e-01 + 3.764e-01 7.933e-01 5.081e-01 6.566e-02 7.184e-03 1.439e-06 + 0.000e+00 1.439e-06 7.184e-03 6.566e-02 5.081e-01 7.933e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 6.055e-07 0.000e+00 2.610e-04 2.192e-04 0.000e+00 4.913e-05 + 0.000e+00 4.913e-05 0.000e+00 2.192e-04 2.610e-04 0.000e+00 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 3.764e-01 7.933e-01 5.081e-01 6.566e-02 7.184e-03 1.439e-06 + 0.000e+00 1.439e-06 7.184e-03 6.566e-02 5.081e-01 7.933e-01 + 9.975e-01 7.635e-01 9.510e-01 7.489e-03 3.927e-03 3.699e-05 + 3.190e-04 3.699e-05 3.927e-03 7.489e-03 9.510e-01 7.635e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 9.510e-01 5.054e-01 4.380e-03 8.176e-01 1.579e-03 0.000e+00 + 4.735e-04 0.000e+00 1.579e-03 8.176e-01 4.380e-03 5.054e-01 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 3.190e-04 2.610e-04 4.735e-04 2.131e-04 0.000e+00 0.000e+00 + 1.909e-06 0.000e+00 0.000e+00 2.131e-04 4.735e-04 2.610e-04 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 9.510e-01 5.054e-01 4.380e-03 8.176e-01 1.579e-03 0.000e+00 + 4.735e-04 0.000e+00 1.579e-03 8.176e-01 4.380e-03 5.054e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 8.082e-02 6.868e-02 7.489e-03 9.488e-02 2.017e-03 1.419e-07 + 3.688e-04 1.419e-07 2.017e-03 9.488e-02 7.489e-03 6.868e-02 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 9.488e-02 1.182e-02 3.283e-03 4.084e-04 0.000e+00 8.567e-04 + 1.907e-04 8.567e-04 0.000e+00 4.084e-04 3.283e-03 1.182e-02 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.688e-04 2.192e-04 2.131e-04 1.907e-04 0.000e+00 0.000e+00 + 0.000e+00 0.000e+00 0.000e+00 1.907e-04 2.131e-04 2.192e-04 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 9.488e-02 1.182e-02 3.283e-03 4.084e-04 0.000e+00 8.567e-04 + 1.907e-04 8.567e-04 0.000e+00 4.084e-04 3.283e-03 1.182e-02 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 1.589e-02 5.471e-02 3.927e-03 2.017e-03 9.237e-11 3.368e-02 + 1.140e-04 3.368e-02 9.237e-11 2.017e-03 3.927e-03 5.471e-02 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 9.237e-11 1.433e-03 3.439e-04 1.924e-04 9.639e-05 0.000e+00 + 0.000e+00 0.000e+00 9.639e-05 1.924e-04 3.439e-04 1.433e-03 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 1.140e-04 0.000e+00 0.000e+00 0.000e+00 0.000e+00 3.073e-05 + 1.965e-04 3.073e-05 0.000e+00 0.000e+00 0.000e+00 0.000e+00 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 9.237e-11 1.433e-03 3.439e-04 1.924e-04 9.639e-05 0.000e+00 + 0.000e+00 0.000e+00 9.639e-05 1.924e-04 3.439e-04 1.433e-03 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 1.478e-03 1.544e-02 3.699e-05 1.419e-07 3.368e-02 9.707e-05 + 0.000e+00 9.707e-05 3.368e-02 1.419e-07 3.699e-05 1.544e-02 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 9.707e-05 1.549e-04 1.055e-04 5.037e-05 0.000e+00 0.000e+00 + 2.542e-05 0.000e+00 0.000e+00 5.037e-05 1.055e-04 1.549e-04 + 0.000e+00 4.913e-05 0.000e+00 0.000e+00 3.073e-05 2.542e-05 + 0.000e+00 2.542e-05 3.073e-05 0.000e+00 0.000e+00 4.913e-05 + 9.707e-05 1.549e-04 1.055e-04 5.037e-05 0.000e+00 0.000e+00 + 2.542e-05 0.000e+00 0.000e+00 5.037e-05 1.055e-04 1.549e-04 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 5.736e-04 6.055e-07 3.190e-04 3.688e-04 1.140e-04 0.000e+00 + 0.000e+00 0.000e+00 1.140e-04 3.688e-04 3.190e-04 6.055e-07 + 6.055e-07 0.000e+00 2.610e-04 2.192e-04 0.000e+00 4.913e-05 + 0.000e+00 4.913e-05 0.000e+00 2.192e-04 2.610e-04 0.000e+00 + 3.190e-04 2.610e-04 4.735e-04 2.131e-04 0.000e+00 0.000e+00 + 1.909e-06 0.000e+00 0.000e+00 2.131e-04 4.735e-04 2.610e-04 + 3.688e-04 2.192e-04 2.131e-04 1.907e-04 0.000e+00 0.000e+00 + 0.000e+00 0.000e+00 0.000e+00 1.907e-04 2.131e-04 2.192e-04 + 1.140e-04 0.000e+00 0.000e+00 0.000e+00 0.000e+00 3.073e-05 + 1.965e-04 3.073e-05 0.000e+00 0.000e+00 0.000e+00 0.000e+00 + 0.000e+00 4.913e-05 0.000e+00 0.000e+00 3.073e-05 2.542e-05 + 0.000e+00 2.542e-05 3.073e-05 0.000e+00 0.000e+00 4.913e-05 + 0.000e+00 0.000e+00 1.909e-06 0.000e+00 1.965e-04 0.000e+00 + 0.000e+00 0.000e+00 1.965e-04 0.000e+00 1.909e-06 0.000e+00 + 0.000e+00 4.913e-05 0.000e+00 0.000e+00 3.073e-05 2.542e-05 + 0.000e+00 2.542e-05 3.073e-05 0.000e+00 0.000e+00 4.913e-05 + 1.140e-04 0.000e+00 0.000e+00 0.000e+00 0.000e+00 3.073e-05 + 1.965e-04 3.073e-05 0.000e+00 0.000e+00 0.000e+00 0.000e+00 + 3.688e-04 2.192e-04 2.131e-04 1.907e-04 0.000e+00 0.000e+00 + 0.000e+00 0.000e+00 0.000e+00 1.907e-04 2.131e-04 2.192e-04 + 3.190e-04 2.610e-04 4.735e-04 2.131e-04 0.000e+00 0.000e+00 + 1.909e-06 0.000e+00 0.000e+00 2.131e-04 4.735e-04 2.610e-04 + 6.055e-07 0.000e+00 2.610e-04 2.192e-04 0.000e+00 4.913e-05 + 0.000e+00 4.913e-05 0.000e+00 2.192e-04 2.610e-04 0.000e+00 + 1.478e-03 1.544e-02 3.699e-05 1.419e-07 3.368e-02 9.707e-05 + 0.000e+00 9.707e-05 3.368e-02 1.419e-07 3.699e-05 1.544e-02 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 9.707e-05 1.549e-04 1.055e-04 5.037e-05 0.000e+00 0.000e+00 + 2.542e-05 0.000e+00 0.000e+00 5.037e-05 1.055e-04 1.549e-04 + 0.000e+00 4.913e-05 0.000e+00 0.000e+00 3.073e-05 2.542e-05 + 0.000e+00 2.542e-05 3.073e-05 0.000e+00 0.000e+00 4.913e-05 + 9.707e-05 1.549e-04 1.055e-04 5.037e-05 0.000e+00 0.000e+00 + 2.542e-05 0.000e+00 0.000e+00 5.037e-05 1.055e-04 1.549e-04 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 1.589e-02 5.471e-02 3.927e-03 2.017e-03 9.237e-11 3.368e-02 + 1.140e-04 3.368e-02 9.237e-11 2.017e-03 3.927e-03 5.471e-02 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 9.237e-11 1.433e-03 3.439e-04 1.924e-04 9.639e-05 0.000e+00 + 0.000e+00 0.000e+00 9.639e-05 1.924e-04 3.439e-04 1.433e-03 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 1.140e-04 0.000e+00 0.000e+00 0.000e+00 0.000e+00 3.073e-05 + 1.965e-04 3.073e-05 0.000e+00 0.000e+00 0.000e+00 0.000e+00 + 3.368e-02 1.332e-07 2.366e-04 1.041e-04 0.000e+00 0.000e+00 + 3.073e-05 0.000e+00 0.000e+00 1.041e-04 2.366e-04 1.332e-07 + 9.237e-11 1.433e-03 3.439e-04 1.924e-04 9.639e-05 0.000e+00 + 0.000e+00 0.000e+00 9.639e-05 1.924e-04 3.439e-04 1.433e-03 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 8.082e-02 6.868e-02 7.489e-03 9.488e-02 2.017e-03 1.419e-07 + 3.688e-04 1.419e-07 2.017e-03 9.488e-02 7.489e-03 6.868e-02 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 9.488e-02 1.182e-02 3.283e-03 4.084e-04 0.000e+00 8.567e-04 + 1.907e-04 8.567e-04 0.000e+00 4.084e-04 3.283e-03 1.182e-02 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 3.688e-04 2.192e-04 2.131e-04 1.907e-04 0.000e+00 0.000e+00 + 0.000e+00 0.000e+00 0.000e+00 1.907e-04 2.131e-04 2.192e-04 + 1.419e-07 0.000e+00 0.000e+00 8.567e-04 1.041e-04 5.037e-05 + 0.000e+00 5.037e-05 1.041e-04 8.567e-04 0.000e+00 0.000e+00 + 2.017e-03 1.111e-03 1.333e-04 0.000e+00 1.924e-04 1.041e-04 + 0.000e+00 1.041e-04 1.924e-04 0.000e+00 1.333e-04 1.111e-03 + 9.488e-02 1.182e-02 3.283e-03 4.084e-04 0.000e+00 8.567e-04 + 1.907e-04 8.567e-04 0.000e+00 4.084e-04 3.283e-03 1.182e-02 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 9.975e-01 7.635e-01 9.510e-01 7.489e-03 3.927e-03 3.699e-05 + 3.190e-04 3.699e-05 3.927e-03 7.489e-03 9.510e-01 7.635e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 9.510e-01 5.054e-01 4.380e-03 8.176e-01 1.579e-03 0.000e+00 + 4.735e-04 0.000e+00 1.579e-03 8.176e-01 4.380e-03 5.054e-01 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 3.190e-04 2.610e-04 4.735e-04 2.131e-04 0.000e+00 0.000e+00 + 1.909e-06 0.000e+00 0.000e+00 2.131e-04 4.735e-04 2.610e-04 + 3.699e-05 0.000e+00 0.000e+00 0.000e+00 2.366e-04 1.055e-04 + 0.000e+00 1.055e-04 2.366e-04 0.000e+00 0.000e+00 0.000e+00 + 3.927e-03 2.287e-03 1.579e-03 1.333e-04 3.439e-04 2.366e-04 + 0.000e+00 2.366e-04 3.439e-04 1.333e-04 1.579e-03 2.287e-03 + 7.489e-03 2.038e-02 8.176e-01 3.283e-03 1.333e-04 0.000e+00 + 2.131e-04 0.000e+00 1.333e-04 3.283e-03 8.176e-01 2.038e-02 + 9.510e-01 5.054e-01 4.380e-03 8.176e-01 1.579e-03 0.000e+00 + 4.735e-04 0.000e+00 1.579e-03 8.176e-01 4.380e-03 5.054e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 1.509e-01 3.764e-01 7.635e-01 6.868e-02 5.471e-02 1.544e-02 + 6.055e-07 1.544e-02 5.471e-02 6.868e-02 7.635e-01 3.764e-01 + 3.764e-01 7.933e-01 5.081e-01 6.566e-02 7.184e-03 1.439e-06 + 0.000e+00 1.439e-06 7.184e-03 6.566e-02 5.081e-01 7.933e-01 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 6.055e-07 0.000e+00 2.610e-04 2.192e-04 0.000e+00 4.913e-05 + 0.000e+00 4.913e-05 0.000e+00 2.192e-04 2.610e-04 0.000e+00 + 1.544e-02 1.439e-06 0.000e+00 0.000e+00 1.332e-07 1.549e-04 + 4.913e-05 1.549e-04 1.332e-07 0.000e+00 0.000e+00 1.439e-06 + 5.471e-02 7.184e-03 2.287e-03 1.111e-03 1.433e-03 1.332e-07 + 0.000e+00 1.332e-07 1.433e-03 1.111e-03 2.287e-03 7.184e-03 + 6.868e-02 6.566e-02 2.038e-02 1.182e-02 1.111e-03 0.000e+00 + 2.192e-04 0.000e+00 1.111e-03 1.182e-02 2.038e-02 6.566e-02 + 7.635e-01 5.081e-01 5.054e-01 2.038e-02 2.287e-03 0.000e+00 + 2.610e-04 0.000e+00 2.287e-03 2.038e-02 5.054e-01 5.081e-01 + 3.764e-01 7.933e-01 5.081e-01 6.566e-02 7.184e-03 1.439e-06 + 0.000e+00 1.439e-06 7.184e-03 6.566e-02 5.081e-01 7.933e-01 diff --git a/tests/03_NAO_multik/63_NO_KP_out_elf/result.ref b/tests/03_NAO_multik/63_NO_KP_out_elf/result.ref new file mode 100644 index 0000000000..dc363cbe4c --- /dev/null +++ b/tests/03_NAO_multik/63_NO_KP_out_elf/result.ref @@ -0,0 +1,4 @@ +etotref -146.7749964274117 +etotperatomref -146.7749964274 +ComparePot1_pass 0 +totaltimeref 1.39 diff --git a/tests/03_NAO_multik/CASES_CPU.txt b/tests/03_NAO_multik/CASES_CPU.txt index c7efa3ad29..7fb1376b38 100644 --- a/tests/03_NAO_multik/CASES_CPU.txt +++ b/tests/03_NAO_multik/CASES_CPU.txt @@ -29,12 +29,12 @@ 29_NO_KP_S2_eadd 30_NO_KP_S2_eminus 31_NO_KP_nupdown0 -32_NO_KP_get_wf -33_NO_KP_OW -34_NO_KP_MU -35_NO_KP_MU_nscf -36_NO_KP_sol_H2 -37_NO_KP_restart +32_NO_KP_wf +33_NO_KP_wf0 +34_NO_KP_pchg +35_NO_KP_pchg_k +36_NO_KP_MU +37_NO_KP_MU_nscf 38_NO_OP3 39_NO_OP_nscf 40_NO_ELF @@ -56,3 +56,8 @@ 56_NO_PK_PU_SO 57_NO_MD_1O 58_NO_MD_2O +59_NO_KP_initHR +60_NO_KP_OW +61_NO_KP_sol +62_NO_KP_restart +63_NO_KP_out_elf diff --git a/tests/04_FF/01_LJ_Anderson/INPUT b/tests/04_FF/01_LJ_Anderson/INPUT index 1a9900435a..2b2d8604c1 100644 --- a/tests/04_FF/01_LJ_Anderson/INPUT +++ b/tests/04_FF/01_LJ_Anderson/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type nvt md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/02_LJ_Berendsen/INPUT b/tests/04_FF/02_LJ_Berendsen/INPUT index c015bbb9b9..87df0c69c2 100644 --- a/tests/04_FF/02_LJ_Berendsen/INPUT +++ b/tests/04_FF/02_LJ_Berendsen/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type nvt md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/04_LJ_Langevin/INPUT b/tests/04_FF/04_LJ_Langevin/INPUT index c585cacca6..b1359b82a1 100644 --- a/tests/04_FF/04_LJ_Langevin/INPUT +++ b/tests/04_FF/04_LJ_Langevin/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type langevin md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/05_LJ_MSST/INPUT b/tests/04_FF/05_LJ_MSST/INPUT index 233aac73f8..a8402a55f7 100644 --- a/tests/04_FF/05_LJ_MSST/INPUT +++ b/tests/04_FF/05_LJ_MSST/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type msst md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/06_LJ_NHC_NVT/INPUT b/tests/04_FF/06_LJ_NHC_NVT/INPUT index 435d4d71f5..2ac541fca8 100644 --- a/tests/04_FF/06_LJ_NHC_NVT/INPUT +++ b/tests/04_FF/06_LJ_NHC_NVT/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type nvt md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/07_LJ_NPT_aniso_none/INPUT b/tests/04_FF/07_LJ_NPT_aniso_none/INPUT index 427d6c30ca..315f0d335a 100644 --- a/tests/04_FF/07_LJ_NPT_aniso_none/INPUT +++ b/tests/04_FF/07_LJ_NPT_aniso_none/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/08_LJ_NPT_aniso_xy/INPUT b/tests/04_FF/08_LJ_NPT_aniso_xy/INPUT index b5e4b05980..246b0f6979 100644 --- a/tests/04_FF/08_LJ_NPT_aniso_xy/INPUT +++ b/tests/04_FF/08_LJ_NPT_aniso_xy/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/09_LJ_NPT_aniso_xz/INPUT b/tests/04_FF/09_LJ_NPT_aniso_xz/INPUT index 90105325a5..33d21ffbe9 100644 --- a/tests/04_FF/09_LJ_NPT_aniso_xz/INPUT +++ b/tests/04_FF/09_LJ_NPT_aniso_xz/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/101_NEP_HfO2/INPUT b/tests/04_FF/101_NEP_HfO2/INPUT index c22347b7a2..9265e9d3a2 100644 --- a/tests/04_FF/101_NEP_HfO2/INPUT +++ b/tests/04_FF/101_NEP_HfO2/INPUT @@ -10,7 +10,7 @@ pot_file ../../PP_ORB/nep_hfo2.txt cal_force 1 cal_stress 1 -md_nstep 3 +md_nstep 4 md_type npt md_dt 1 md_tfirst 300 @@ -18,4 +18,4 @@ md_thermostat nhc md_dumpfreq 1 md_seed 1 -init_vel 1 \ No newline at end of file +init_vel 1 diff --git a/tests/04_FF/10_LJ_NPT_aniso_yz/INPUT b/tests/04_FF/10_LJ_NPT_aniso_yz/INPUT index 64f323152c..df5f47d646 100644 --- a/tests/04_FF/10_LJ_NPT_aniso_yz/INPUT +++ b/tests/04_FF/10_LJ_NPT_aniso_yz/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/11_LJ_NPT_iso/INPUT b/tests/04_FF/11_LJ_NPT_iso/INPUT index ec888fcd77..aad17dcbf7 100644 --- a/tests/04_FF/11_LJ_NPT_iso/INPUT +++ b/tests/04_FF/11_LJ_NPT_iso/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/12_LJ_NPT_tri/INPUT b/tests/04_FF/12_LJ_NPT_tri/INPUT index 33c05e6132..566b964a6e 100644 --- a/tests/04_FF/12_LJ_NPT_tri/INPUT +++ b/tests/04_FF/12_LJ_NPT_tri/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type npt md_dt 1 md_tchain 3 diff --git a/tests/04_FF/13_LJ_NVE/INPUT b/tests/04_FF/13_LJ_NVE/INPUT index 9673def0f2..0f2e033e63 100644 --- a/tests/04_FF/13_LJ_NVE/INPUT +++ b/tests/04_FF/13_LJ_NVE/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 160 +md_nstep 161 md_type nve md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/13_LJ_NVE/Restart_md.dat b/tests/04_FF/13_LJ_NVE/Restart_md.txt similarity index 100% rename from tests/04_FF/13_LJ_NVE/Restart_md.dat rename to tests/04_FF/13_LJ_NVE/Restart_md.txt diff --git a/tests/04_FF/14_LJ_rescale_v/INPUT b/tests/04_FF/14_LJ_rescale_v/INPUT index 41bcb07bcd..54cfab3c71 100644 --- a/tests/04_FF/14_LJ_rescale_v/INPUT +++ b/tests/04_FF/14_LJ_rescale_v/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 14 +md_nstep 15 md_type nvt md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/14_LJ_rescale_v/OUT.autotest/Restart_md.dat b/tests/04_FF/14_LJ_rescale_v/OUT.autotest/Restart_md.txt similarity index 100% rename from tests/04_FF/14_LJ_rescale_v/OUT.autotest/Restart_md.dat rename to tests/04_FF/14_LJ_rescale_v/OUT.autotest/Restart_md.txt diff --git a/tests/04_FF/15_LJ_rescaling/INPUT b/tests/04_FF/15_LJ_rescaling/INPUT index 714eaf3434..0a83481e79 100644 --- a/tests/04_FF/15_LJ_rescaling/INPUT +++ b/tests/04_FF/15_LJ_rescaling/INPUT @@ -15,7 +15,7 @@ cal_force 1 cal_stress 1 #Parameters (MD) -md_nstep 5 +md_nstep 6 md_type nvt md_dt 1 md_tfirst 300 diff --git a/tests/04_FF/50_DP_Al/INPUT b/tests/04_FF/50_DP_Al/INPUT index 5a0498ea07..e67b738de4 100644 --- a/tests/04_FF/50_DP_Al/INPUT +++ b/tests/04_FF/50_DP_Al/INPUT @@ -10,7 +10,7 @@ pot_file ../../PP_ORB/Al-SCAN.pb cal_force 1 cal_stress 1 -md_nstep 3 +md_nstep 4 md_type msst md_dt 1 md_tfirst 200 diff --git a/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/INPUT b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/INPUT index 673a3b581c..24e0683c81 100644 --- a/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/INPUT +++ b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/INPUT @@ -4,19 +4,19 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 -calculation md esolver_type tddft - -#Parameter (Accuracy) +calculation md +basis_type lcao +gamma_only 0 ecutwfc 20 +nbands 5 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,8 +28,9 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Paramter (MD) md_type nve md_dt 0.05 init_vel 1 ocp 1 -ocp_set 1*1 1*1 3*0 +ocp_set 1*1 1*1 3*0 diff --git a/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/README b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/README new file mode 100644 index 0000000000..e199572a48 --- /dev/null +++ b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/README @@ -0,0 +1 @@ +set different occupations in rt-TDDFT (LCAO) diff --git a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/INPUT b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/INPUT index 63e34a60ee..b2de466abb 100644 --- a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/INPUT +++ b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/INPUT @@ -7,19 +7,17 @@ orbital_dir ../../PP_ORB nbands 10 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 ecutwfc 5 + +#Parameter (Electronic Structure) scf_nmax 50 smearing_method gaussian smearing_sigma 0.02 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -31,8 +29,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1e-3 -md_type nve -md_dt 0.01 -init_vel 1 -out_wfc_lcao 1 -out_app_flag 0 +#Paramters (Output) +out_dipole 1 +out_wfc_lcao 1 +out_app_flag 0 + +#Parameters (MD) +md_nstep 3 +estep_per_md 1 +md_type nve +md_dt 0.01 +init_vel 1 diff --git a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/README b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/README new file mode 100644 index 0000000000..3e72b0c4a9 --- /dev/null +++ b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/README @@ -0,0 +1 @@ +output wave functions, dipole from rt-TDDFT (LCAO) diff --git a/tests/05_rtTDDFT/03_NO_CO_TDDFT/INPUT b/tests/05_rtTDDFT/03_NO_CO_TDDFT/INPUT index 22cbe3b7dc..c7a118e2a4 100644 --- a/tests/05_rtTDDFT/03_NO_CO_TDDFT/INPUT +++ b/tests/05_rtTDDFT/03_NO_CO_TDDFT/INPUT @@ -4,19 +4,17 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 10 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 +nbands 10 ecutwfc 20 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,7 +26,10 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Paramter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 ocp 1 diff --git a/tests/05_rtTDDFT/03_NO_CO_TDDFT/README b/tests/05_rtTDDFT/03_NO_CO_TDDFT/README new file mode 100644 index 0000000000..fa6de273a2 --- /dev/null +++ b/tests/05_rtTDDFT/03_NO_CO_TDDFT/README @@ -0,0 +1 @@ +rt-TDDFT for CO (two elements) diff --git a/tests/05_rtTDDFT/04_NO_CO_ocp_TDDFT/INPUT b/tests/05_rtTDDFT/04_NO_CO_ocp_TDDFT/INPUT index e5a908356c..e14e17b1a3 100644 --- a/tests/05_rtTDDFT/04_NO_CO_ocp_TDDFT/INPUT +++ b/tests/05_rtTDDFT/04_NO_CO_ocp_TDDFT/INPUT @@ -7,16 +7,14 @@ orbital_dir ../../PP_ORB nbands 10 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 ecutwfc 20 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,7 +26,10 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 ocp 1 diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/INPUT b/tests/05_rtTDDFT/05_NO_cur_TDDFT/INPUT index cae0409438..acf4887281 100644 --- a/tests/05_rtTDDFT/05_NO_cur_TDDFT/INPUT +++ b/tests/05_rtTDDFT/05_NO_cur_TDDFT/INPUT @@ -6,16 +6,14 @@ orbital_dir ../../PP_ORB nbands 5 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 -#Parameter (Accuracy) +#Parameter (Electronic Structure) ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 3 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -27,10 +25,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) +md_nstep 4 +estep_per_md 1 md_type nve md_dt 0.05 init_vel 1 +#Parameter (External Field) td_vext 1 td_vext_dire 1 td_stype 0 @@ -38,13 +40,13 @@ td_ttype 0 td_tstart 1 td_tend 2 -# Gauss external field +#Parameter (Gauss external field) td_gauss_freq 2.44 td_gauss_phase 0.0 td_gauss_sigma 0.5 td_gauss_t0 0 td_gauss_amp 0.1 -# print out information +#Parameter (print out information) out_current 1 out_current_k 1 diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/README b/tests/05_rtTDDFT/05_NO_cur_TDDFT/README index 26c2f588bb..203dc22d46 100644 --- a/tests/05_rtTDDFT/05_NO_cur_TDDFT/README +++ b/tests/05_rtTDDFT/05_NO_cur_TDDFT/README @@ -1 +1 @@ -test TDDFT length-gauge current output for non-periodic system +Test rt-TDDFT length gauge current output for non-periodic system (output currents) diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/current_tot.txt.ref b/tests/05_rtTDDFT/05_NO_cur_TDDFT/current_tot.txt.ref new file mode 100644 index 0000000000..82c0d4abd5 --- /dev/null +++ b/tests/05_rtTDDFT/05_NO_cur_TDDFT/current_tot.txt.ref @@ -0,0 +1,4 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 1.3253329345180294e-07 -1.1309759467631443e-08 -1.8100967210899005e-08 +3 -1.8712729254912170e-07 -1.9255546268413473e-08 -3.0821009248506392e-08 +4 1.6157844599855616e-08 1.2274265605918762e-08 1.9637494049601714e-08 diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/refcurrent_total.dat b/tests/05_rtTDDFT/05_NO_cur_TDDFT/refcurrent_total.dat deleted file mode 100644 index 56a9f6e13b..0000000000 --- a/tests/05_rtTDDFT/05_NO_cur_TDDFT/refcurrent_total.dat +++ /dev/null @@ -1,4 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 1.3253329345174151e-07 -1.1309759467952081e-08 -1.8100967211240555e-08 -2 -1.8712729254901428e-07 -1.9255546268328018e-08 -3.0821009248708681e-08 -3 1.6157844599780660e-08 1.2274265606089292e-08 1.9637494050295524e-08 diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref b/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref index d3cd1841df..6f2c4d9b7b 100644 --- a/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref +++ b/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref @@ -1,6 +1,6 @@ -etotref -30.91255300422832 +etotref -30.91255300422819 etotperatomref -15.4562765021 totalforceref 0.479532 totalstressref 0.981046 CompareCurrent_pass 0 -totaltimeref 1.72 +totaltimeref 1.73 diff --git a/tests/05_rtTDDFT/06_NO_dir_TDDFT/INPUT b/tests/05_rtTDDFT/06_NO_dir_TDDFT/INPUT index aefea252be..0044bf39af 100644 --- a/tests/05_rtTDDFT/06_NO_dir_TDDFT/INPUT +++ b/tests/05_rtTDDFT/06_NO_dir_TDDFT/INPUT @@ -4,19 +4,17 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 +nbands 5 -#Parameter (Accuracy) +#Parameter (Electronic Structure) ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,10 +26,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 +#Parameter (External Field) td_vext 1 td_vext_dire 2 td_stype 0 diff --git a/tests/05_rtTDDFT/07_NO_EDM_TDDFT/INPUT b/tests/05_rtTDDFT/07_NO_EDM_TDDFT/INPUT index 2ef3cb7c96..d0840a04df 100644 --- a/tests/05_rtTDDFT/07_NO_EDM_TDDFT/INPUT +++ b/tests/05_rtTDDFT/07_NO_EDM_TDDFT/INPUT @@ -7,16 +7,14 @@ orbital_dir ../../PP_ORB nbands 5 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 #Parameter (Accuracy) ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,9 +26,12 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 ocp 1 -ocp_set 1*0.5 1*0.5 3*0 1*0.5 1*0.5 3*0 +ocp_set 1*0.5 1*0.5 3*0 1*0.5 1*0.5 3*0 td_edm 1 diff --git a/tests/05_rtTDDFT/08_NO_ETRS_TDDFT/INPUT b/tests/05_rtTDDFT/08_NO_ETRS_TDDFT/INPUT index d0144baf53..f08a94a5d2 100644 --- a/tests/05_rtTDDFT/08_NO_ETRS_TDDFT/INPUT +++ b/tests/05_rtTDDFT/08_NO_ETRS_TDDFT/INPUT @@ -6,7 +6,7 @@ esolver_type tddft gamma_only 0 # multiple k points md_type nve md_dt 0.05 # MD time step -md_nstep 2 # number of MD steps +md_nstep 3 # number of MD steps estep_per_md 1 init_vel 1 # initial velocity diff --git a/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/INPUT b/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/INPUT index 51499b8a4e..67fceb063b 100644 --- a/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/INPUT +++ b/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/INPUT @@ -7,16 +7,14 @@ orbital_dir ../../PP_ORB nbands 5 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 ecutwfc 20 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,7 +26,10 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 diff --git a/tests/05_rtTDDFT/10_NO_HHG_TDDFT/INPUT b/tests/05_rtTDDFT/10_NO_HHG_TDDFT/INPUT index 67adfbee74..15329700dd 100644 --- a/tests/05_rtTDDFT/10_NO_HHG_TDDFT/INPUT +++ b/tests/05_rtTDDFT/10_NO_HHG_TDDFT/INPUT @@ -3,19 +3,17 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 +nbands 5 ecutwfc 20 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -27,7 +25,10 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 @@ -39,7 +40,7 @@ td_tstart 1 td_tend 2 td_lcut1 0.05 td_lcut2 0.95 -td_gauss_freq 1.164656 0.029116 +td_gauss_freq 1.164656 0.029116 td_gauss_amp 2.0 5.0 td_gauss_phase 2*0.0 td_gauss_t0 2*0 diff --git a/tests/05_rtTDDFT/11_NO_O3_TDDFT/INPUT b/tests/05_rtTDDFT/11_NO_O3_TDDFT/INPUT index 9fb483ce2f..8216ead07f 100644 --- a/tests/05_rtTDDFT/11_NO_O3_TDDFT/INPUT +++ b/tests/05_rtTDDFT/11_NO_O3_TDDFT/INPUT @@ -4,20 +4,18 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 18 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 +nbands 18 -#Parameter (Accuracy) +#Parameter (Electronic Structure) ecutwfc 20 scf_nmax 30 ks_solver genelpa -basis_type lcao -out_chg 1 -gamma_only 0 -md_nstep 2 -estep_per_md 1 +# out_chg 1 mixing_type broyden mixing_beta 0.7 @@ -29,7 +27,10 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 ocp 1 diff --git a/tests/05_rtTDDFT/12_NO_re_TDDFT/INPUT b/tests/05_rtTDDFT/12_NO_re_TDDFT/INPUT index 679c171d33..f34c8de7a1 100644 --- a/tests/05_rtTDDFT/12_NO_re_TDDFT/INPUT +++ b/tests/05_rtTDDFT/12_NO_re_TDDFT/INPUT @@ -4,36 +4,37 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 ecutwfc 100 +nbands 5 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 mixing_gg0 0.0 scf_thr 1.0e-6 -read_file_dir restart -init_wfc file - cal_stress 1 stress_thr 1e-6 cal_force 1 force_thr_ev 1e-3 +#Parameter (MD) md_type nve +md_nstep 2 +estep_per_md 1 md_dt 0.05 md_restart 1 init_vel 1 ocp 1 -ocp_set 1*1 1*1 3*0 +ocp_set 1*1 1*1 3*0 + +read_file_dir restart +init_wfc file diff --git a/tests/05_rtTDDFT/12_NO_re_TDDFT/restart/Restart_md.dat b/tests/05_rtTDDFT/12_NO_re_TDDFT/restart/Restart_md.txt similarity index 100% rename from tests/05_rtTDDFT/12_NO_re_TDDFT/restart/Restart_md.dat rename to tests/05_rtTDDFT/12_NO_re_TDDFT/restart/Restart_md.txt diff --git a/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/INPUT b/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/INPUT index 64c81c8fc9..edf4a10824 100644 --- a/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/INPUT +++ b/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/INPUT @@ -4,19 +4,17 @@ suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 +ecutwfc 20 +nbands 5 #Parameter (Accuracy) -ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -28,10 +26,12 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1e-3 -td_propagator 1 - +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 ocp 1 -ocp_set 1*1 1*1 3*0 +ocp_set 1*1 1*1 3*0 +td_propagator 1 diff --git a/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/INPUT b/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/INPUT index 8b3cc43a28..50b3e21f39 100644 --- a/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/INPUT +++ b/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/INPUT @@ -3,19 +3,18 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 + calculation md esolver_type tddft +basis_type lcao +gamma_only 0 +nbands 5 +ecutwfc 20 #Parameter (Accuracy) -ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -27,10 +26,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 +#Parameter (External Field) td_vext 1 td_vext_dire 1 td_stype 0 diff --git a/tests/05_rtTDDFT/15_NO_TRI_TDDFT/INPUT b/tests/05_rtTDDFT/15_NO_TRI_TDDFT/INPUT index 4e255477d6..db7bc89d3a 100644 --- a/tests/05_rtTDDFT/15_NO_TRI_TDDFT/INPUT +++ b/tests/05_rtTDDFT/15_NO_TRI_TDDFT/INPUT @@ -2,20 +2,19 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB -nbands 5 +orbital_dir ../../PP_ORB + calculation md esolver_type tddft - -#Parameter (Accuracy) +basis_type lcao +gamma_only 0 ecutwfc 20 +nbands 5 + +#Parameter (Electronic Structure) scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 2 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -27,10 +26,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 3 +estep_per_md 1 md_dt 0.05 init_vel 1 +#Parameter (External Field) td_vext 1 td_vext_dire 1 td_stype 0 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/INPUT b/tests/05_rtTDDFT/16_NO_vel_TDDFT/INPUT index 7a258e2e94..52fb355cfe 100644 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/INPUT +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/INPUT @@ -3,19 +3,17 @@ INPUT_PARAMETERS suffix autotest pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB -nbands 5 calculation md esolver_type tddft +basis_type lcao +gamma_only 0 +nbands 5 +ecutwfc 20 #Parameter (Accuracy) -ecutwfc 20 scf_nmax 50 ks_solver scalapack_gvx -basis_type lcao -gamma_only 0 -md_nstep 3 -estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -27,10 +25,14 @@ stress_thr 1e-6 cal_force 1 force_thr_ev 1.0e-3 +#Parameter (MD) md_type nve +md_nstep 4 +estep_per_md 1 md_dt 0.05 init_vel 1 +#Parameter (External Field) td_vext 1 td_vext_dire 1 td_stype 1 @@ -43,4 +45,5 @@ td_gauss_sigma 0.5 td_gauss_t0 0 td_gauss_amp 0.1 +#Parameter (Output) out_current 1 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/README b/tests/05_rtTDDFT/16_NO_vel_TDDFT/README index 127af73539..18c2e75edd 100644 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/README +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/README @@ -1 +1 @@ -test TDDFT velocity-gauge output for non-periodic system +Test RT-TDDFT velocity gauge output for non-periodic system diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref b/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref new file mode 100644 index 0000000000..3dff6c2cc8 --- /dev/null +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref @@ -0,0 +1,4 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 2.7669187278007763e-07 -1.3892875564214303e-09 -2.2297436845106647e-09 +3 2.2955881029815729e-07 3.4521250840365067e-09 5.5110950480092966e-09 +4 1.3457006814280224e-07 1.5269022219512386e-08 2.4393767949903552e-08 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/refcurrent_total.dat b/tests/05_rtTDDFT/16_NO_vel_TDDFT/refcurrent_total.dat deleted file mode 100644 index 77e00cbc27..0000000000 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/refcurrent_total.dat +++ /dev/null @@ -1,4 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 2.7669187278007260e-07 -1.3892875565558252e-09 -2.2297436846799228e-09 -2 2.2955881029817558e-07 3.4521250836946458e-09 5.5110950473557321e-09 -3 1.3457006814286624e-07 1.5269022218929118e-08 2.4393767948848288e-08 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref b/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref index dcbb5f1498..ea0efc68e2 100644 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref @@ -1,6 +1,6 @@ -etotref -30.91272578807960 +etotref -30.91272578807966 etotperatomref -15.4563628940 totalforceref 0.479236 totalstressref 0.980314 CompareCurrent_pass 0 -totaltimeref 1.81 +totaltimeref 1.10 diff --git a/tests/05_rtTDDFT/17_NO_vel_TDDFT/INPUT b/tests/05_rtTDDFT/17_NO_vel_TDDFT/INPUT index 9148d55634..099ad8be4c 100644 --- a/tests/05_rtTDDFT/17_NO_vel_TDDFT/INPUT +++ b/tests/05_rtTDDFT/17_NO_vel_TDDFT/INPUT @@ -4,8 +4,8 @@ INPUT_PARAMETERS calculation md esolver_type tddft md_type nve -md_nstep 2 -estep_per_md 1 +md_nstep 3 +estep_per_md 1 md_dt 0.05 md_tfirst 0 diff --git a/tests/05_rtTDDFT/17_NO_vel_TDDFT/README b/tests/05_rtTDDFT/17_NO_vel_TDDFT/README index cf7f610eb0..3d074619ac 100644 --- a/tests/05_rtTDDFT/17_NO_vel_TDDFT/README +++ b/tests/05_rtTDDFT/17_NO_vel_TDDFT/README @@ -1 +1 @@ -test TDDFT velocity gauge output for periodic system +Test RT-TDDFT velocity gauge output for periodic system diff --git a/tests/05_rtTDDFT/17_NO_vel_TDDFT/current_tot.txt.ref b/tests/05_rtTDDFT/17_NO_vel_TDDFT/current_tot.txt.ref new file mode 100644 index 0000000000..02366c9d8d --- /dev/null +++ b/tests/05_rtTDDFT/17_NO_vel_TDDFT/current_tot.txt.ref @@ -0,0 +1,3 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 6.8191006588607104e-18 1.3391450275092762e-18 5.1985933203095592e-06 +3 1.1447467359283047e-17 1.3353524657917940e-18 1.3886066143094786e-05 diff --git a/tests/05_rtTDDFT/17_NO_vel_TDDFT/refcurrent_total.dat b/tests/05_rtTDDFT/17_NO_vel_TDDFT/refcurrent_total.dat deleted file mode 100644 index b17941d582..0000000000 --- a/tests/05_rtTDDFT/17_NO_vel_TDDFT/refcurrent_total.dat +++ /dev/null @@ -1,3 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 -1.4281057782732242e-18 5.1480765086224919e-18 5.1985933203093457e-06 -2 -3.1989018653041680e-18 1.4638762354532585e-17 1.3886066143094195e-05 diff --git a/tests/05_rtTDDFT/17_NO_vel_TDDFT/result.ref b/tests/05_rtTDDFT/17_NO_vel_TDDFT/result.ref index 2ab84c92e8..aa36e31008 100644 --- a/tests/05_rtTDDFT/17_NO_vel_TDDFT/result.ref +++ b/tests/05_rtTDDFT/17_NO_vel_TDDFT/result.ref @@ -1,4 +1,4 @@ etotref -194.7715239600903 etotperatomref -97.3857619800 CompareCurrent_pass 0 -totaltimeref 6.74 +totaltimeref 3.65 diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/INPUT b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/INPUT new file mode 100644 index 0000000000..b562b3e03a --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/INPUT @@ -0,0 +1,40 @@ +INPUT_PARAMETERS + +# general information +calculation md +esolver_type tddft +md_type nve +md_nstep 1 +estep_per_md 10 +td_dt 0.005 +md_tfirst 0 + +# rt-TDDFT parameters +td_vext 1 # add time-dependent external potential +td_vext_dire 3 # direction along z +td_stype 2 # 2: hybrid gauge +td_ttype 3 # Heaviside type potential +td_tstart 1 # the step electric field starts +td_tend 10 # the step electric field ends +td_heavi_t0 3 +td_heavi_amp 0.05 + +# print out current information +out_current 1 + +suffix autotest +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +basis_type lcao +gamma_only 0 + +# electronic structure calculations +ecutwfc 20 +scf_nmax 50 +scf_thr 1e-6 +ks_solver scalapack_gvx + +# charge mixing +mixing_type broyden +mixing_beta 0.7 +mixing_gg0 0.0 diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/KPT b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/KPT new file mode 100644 index 0000000000..e769af7638 --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 1 1 0 0 0 diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/README b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/README new file mode 100644 index 0000000000..a47d3411f7 --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/README @@ -0,0 +1 @@ +Test RT-TDDFT hybrid gauge output and parameter td_dt for periodic system diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/STRU b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/STRU new file mode 100644 index 0000000000..822d2c7cc6 --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28.085 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_6au_100Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 // add lattice constant + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Cartesian //Cartesian or Direct coordinate. + +Si // Element type +0.0 // magnetism +2 // number of atoms +0.00 0.00 0.00 0 0 0 +0.25 0.25 0.25 1 1 1 diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/current_tot.txt.ref b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/current_tot.txt.ref new file mode 100644 index 0000000000..e19d79a92b --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/current_tot.txt.ref @@ -0,0 +1,11 @@ +1 -1.2080528880846261e-19 1.2080528880846066e-19 1.2080528880845773e-19 +2 9.6988649203065955e-09 -9.6988647723290744e-09 2.4283263685858898e-06 +3 2.6772041590862983e-08 -2.6772038966231164e-08 7.2673271979666816e-06 +4 2.7319060127512691e-08 -2.7319057936239790e-08 9.6256951598233973e-06 +5 9.5656716023055945e-09 -9.5656714606956783e-09 9.4882668471607465e-06 +6 -1.5805949584040751e-08 1.5805949767647706e-08 9.2880215292310497e-06 +7 -4.7582174004461010e-08 4.7582174205200823e-08 9.0311994708317000e-06 +8 -8.4545887860098823e-08 8.4545888087037147e-08 8.7249297042081756e-06 +9 -1.2566554788492410e-07 1.2566554814454782e-07 8.3765586452439330e-06 +10 -1.7019855732619671e-07 1.7019855762999082e-07 7.9931205849008677e-06 +11 -2.1769144339022118e-07 2.1769144375450180e-07 7.5810111633604005e-06 diff --git a/tests/05_rtTDDFT/18_NO_hyb_TDDFT/result.ref b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/result.ref new file mode 100644 index 0000000000..fe01bf77eb --- /dev/null +++ b/tests/05_rtTDDFT/18_NO_hyb_TDDFT/result.ref @@ -0,0 +1,4 @@ +etotref -202.3030324186811 +etotperatomref -101.1515162093 +CompareCurrent_pass 0 +totaltimeref 5.26 diff --git a/tests/05_rtTDDFT/CASES_CPU.txt b/tests/05_rtTDDFT/CASES_CPU.txt index 90ead8173b..1d0ef0832a 100644 --- a/tests/05_rtTDDFT/CASES_CPU.txt +++ b/tests/05_rtTDDFT/CASES_CPU.txt @@ -15,3 +15,4 @@ 15_NO_TRI_TDDFT 16_NO_vel_TDDFT 17_NO_vel_TDDFT +18_NO_hyb_TDDFT \ No newline at end of file diff --git a/tests/06_SDFT/01_PW_SDFT_10S_M/INPUT b/tests/06_SDFT/01_PW_SDFT_10S_M/INPUT index 9cf2dd3026..99a517e9d9 100644 --- a/tests/06_SDFT/01_PW_SDFT_10S_M/INPUT +++ b/tests/06_SDFT/01_PW_SDFT_10S_M/INPUT @@ -4,6 +4,7 @@ suffix autotest calculation scf esolver_type sdft method_sto 1 +init_wfc random symmetry 0 pseudo_dir ../../PP_ORB diff --git a/tests/06_SDFT/05_PW_MD_SDFT_10S/INPUT b/tests/06_SDFT/05_PW_MD_SDFT_10S/INPUT index e0dd83a2dc..bd98327e54 100644 --- a/tests/06_SDFT/05_PW_MD_SDFT_10S/INPUT +++ b/tests/06_SDFT/05_PW_MD_SDFT_10S/INPUT @@ -37,5 +37,5 @@ mixing_beta 0.4 #MD md_tfirst 10 md_tfreq 0.1 -md_nstep 3 +md_nstep 4 init_vel 1 diff --git a/tests/06_SDFT/06_PW_MD_SDFT_5D10S/INPUT b/tests/06_SDFT/06_PW_MD_SDFT_5D10S/INPUT index 615cdc3cd7..f87bca6141 100644 --- a/tests/06_SDFT/06_PW_MD_SDFT_5D10S/INPUT +++ b/tests/06_SDFT/06_PW_MD_SDFT_5D10S/INPUT @@ -37,5 +37,5 @@ mixing_beta 0.4 #MD md_tfirst 10 md_tfreq 0.1 -md_nstep 3 +md_nstep 4 init_vel 1 diff --git a/tests/06_SDFT/07_PW_MD_SDFT_ALL/INPUT b/tests/06_SDFT/07_PW_MD_SDFT_ALL/INPUT index 1428d2eef9..9ba59243ec 100644 --- a/tests/06_SDFT/07_PW_MD_SDFT_ALL/INPUT +++ b/tests/06_SDFT/07_PW_MD_SDFT_ALL/INPUT @@ -39,5 +39,5 @@ mixing_beta 0.4 #MD md_tfirst 10 md_tfreq 0.1 -md_nstep 2 +md_nstep 3 init_vel 1 diff --git a/tests/07_OFDFT/04_OF_KE_CPN5/INPUT b/tests/07_OFDFT/04_OF_KE_CPN5/INPUT index 432af30174..e92ee00849 100644 --- a/tests/07_OFDFT/04_OF_KE_CPN5/INPUT +++ b/tests/07_OFDFT/04_OF_KE_CPN5/INPUT @@ -5,7 +5,6 @@ calculation scf esolver_type ofdft ntype 1 symmetry 1 -out_chg 1 pseudo_dir ../../PP_ORB/ pseudo_rcut 16 diff --git a/tests/07_OFDFT/23_OF_LPS/INPUT b/tests/07_OFDFT/23_OF_LPS/INPUT index 3c0bc2e6c5..1424de11fc 100644 --- a/tests/07_OFDFT/23_OF_LPS/INPUT +++ b/tests/07_OFDFT/23_OF_LPS/INPUT @@ -21,8 +21,7 @@ scf_nmax 50 of_kinetic wt of_method tn of_conv energy -of_tole 2e-6 +of_tole 2e-10 #Parameters (3.Basis) basis_type pw - diff --git a/tests/07_OFDFT/23_OF_LPS/result.ref b/tests/07_OFDFT/23_OF_LPS/result.ref index db38ca5101..98a09f87f3 100644 --- a/tests/07_OFDFT/23_OF_LPS/result.ref +++ b/tests/07_OFDFT/23_OF_LPS/result.ref @@ -1,8 +1,8 @@ -etotref -55.9081453813626368 -etotperatomref -55.9081453814 +etotref -55.9081453854520234 +etotperatomref -55.9081453855 totalforceref 0.000000 -totalstressref 282.735417 +totalstressref 282.762102 pointgroupref O_h spacegroupref O_h nksibzref 1 -totaltimeref 0.54 +totaltimeref 0.96 diff --git a/tests/07_OFDFT/25_OF_MD_LDA/INPUT b/tests/07_OFDFT/25_OF_MD_LDA/INPUT index 47a88e2397..8a37804625 100644 --- a/tests/07_OFDFT/25_OF_MD_LDA/INPUT +++ b/tests/07_OFDFT/25_OF_MD_LDA/INPUT @@ -24,7 +24,7 @@ basis_type pw md_restart 0 md_type nvt -md_nstep 2 +md_nstep 3 md_dt 0.25 md_tfirst 58022.52706 md_dumpfreq 10 diff --git a/tests/07_OFDFT/26_OF_MD_LibxcPBE/INPUT b/tests/07_OFDFT/26_OF_MD_LibxcPBE/INPUT index c72751096f..e27257cee5 100644 --- a/tests/07_OFDFT/26_OF_MD_LibxcPBE/INPUT +++ b/tests/07_OFDFT/26_OF_MD_LibxcPBE/INPUT @@ -24,7 +24,7 @@ basis_type pw md_restart 0 md_type nvt -md_nstep 2 +md_nstep 3 md_dt 0.25 md_tfirst 58022.52706 md_dumpfreq 10 diff --git a/tests/07_OFDFT/30_TDOFDFT_Al/INPUT b/tests/07_OFDFT/30_TDOFDFT_Al/INPUT index 17fa540e80..6201da0767 100644 --- a/tests/07_OFDFT/30_TDOFDFT_Al/INPUT +++ b/tests/07_OFDFT/30_TDOFDFT_Al/INPUT @@ -27,7 +27,7 @@ init_vel 1 md_restart 0 md_type nve -md_nstep 2 +md_nstep 3 md_dt 0.25 md_tfirst 58022.52706 md_dumpfreq 10 diff --git a/tests/07_OFDFT/30_TDOFDFT_Al/result.ref b/tests/07_OFDFT/30_TDOFDFT_Al/result.ref index 404887187c..b53afa1a10 100644 --- a/tests/07_OFDFT/30_TDOFDFT_Al/result.ref +++ b/tests/07_OFDFT/30_TDOFDFT_Al/result.ref @@ -1,5 +1,5 @@ -etotref -100.6027239728818614 -etotperatomref -50.3013619864 -totalforceref 5.786358 -totalstressref 11367.508779 -totaltimeref 0.10 +etotref 226.9979568201541724 +etotperatomref 113.4989784101 +totalforceref 562.524006 +totalstressref 194931.772028 +totaltimeref 0.45 diff --git a/tests/07_OFDFT/30_TDOFDFT_Al/threshold b/tests/07_OFDFT/30_TDOFDFT_Al/threshold new file mode 100644 index 0000000000..a137b5cae7 --- /dev/null +++ b/tests/07_OFDFT/30_TDOFDFT_Al/threshold @@ -0,0 +1,4 @@ +threshold 0.0001 +force_threshold 0.001 +stress_threshold 0.01 +fatal_threshold 1 diff --git a/tests/07_OFDFT/31_TDOFDFT_Al_CD/INPUT b/tests/07_OFDFT/31_TDOFDFT_Al_CD/INPUT index b14e49962e..255850ba96 100644 --- a/tests/07_OFDFT/31_TDOFDFT_Al_CD/INPUT +++ b/tests/07_OFDFT/31_TDOFDFT_Al_CD/INPUT @@ -28,7 +28,7 @@ init_vel 1 md_restart 0 md_type nve -md_nstep 2 +md_nstep 3 md_dt 0.25 md_tfirst 58022.52706 md_dumpfreq 10 diff --git a/tests/07_OFDFT/31_TDOFDFT_Al_CD/result.ref b/tests/07_OFDFT/31_TDOFDFT_Al_CD/result.ref index b94d694de2..286a081395 100644 --- a/tests/07_OFDFT/31_TDOFDFT_Al_CD/result.ref +++ b/tests/07_OFDFT/31_TDOFDFT_Al_CD/result.ref @@ -1,5 +1,5 @@ -etotref -100.6027239728818614 -etotperatomref -50.3013619864 -totalforceref 5.786358 -totalstressref 11367.508779 -totaltimeref 0.13 +etotref 225.6175831066692297 +etotperatomref 112.8087915533 +totalforceref 488.530072 +totalstressref 185999.479726 +totaltimeref 0.09 diff --git a/tests/07_OFDFT/31_TDOFDFT_Al_CD/threshold b/tests/07_OFDFT/31_TDOFDFT_Al_CD/threshold new file mode 100644 index 0000000000..a137b5cae7 --- /dev/null +++ b/tests/07_OFDFT/31_TDOFDFT_Al_CD/threshold @@ -0,0 +1,4 @@ +threshold 0.0001 +force_threshold 0.001 +stress_threshold 0.01 +fatal_threshold 1 diff --git a/tests/07_OFDFT/32_TDOFDFT_Al_mCD/INPUT b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/INPUT index b4c1593e9f..4ed6311b27 100644 --- a/tests/07_OFDFT/32_TDOFDFT_Al_mCD/INPUT +++ b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/INPUT @@ -28,7 +28,7 @@ init_vel 1 md_restart 0 md_type nve -md_nstep 2 +md_nstep 3 md_dt 0.25 md_tfirst 58022.52706 md_dumpfreq 10 diff --git a/tests/07_OFDFT/32_TDOFDFT_Al_mCD/result.ref b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/result.ref index 3b61275a93..a6e3cab7f3 100644 --- a/tests/07_OFDFT/32_TDOFDFT_Al_mCD/result.ref +++ b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/result.ref @@ -1,5 +1,5 @@ -etotref -100.6027239728818614 -etotperatomref -50.3013619864 -totalforceref 5.786358 -totalstressref 11367.508779 -totaltimeref 0.11 +etotref 223.1193797466232809 +etotperatomref 111.5596898733 +totalforceref 386.437466 +totalstressref 181323.311310 +totaltimeref 0.08 diff --git a/tests/07_OFDFT/32_TDOFDFT_Al_mCD/threshold b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/threshold new file mode 100644 index 0000000000..a137b5cae7 --- /dev/null +++ b/tests/07_OFDFT/32_TDOFDFT_Al_mCD/threshold @@ -0,0 +1,4 @@ +threshold 0.0001 +force_threshold 0.001 +stress_threshold 0.01 +fatal_threshold 1 diff --git a/tests/07_OFDFT/33_OF_out_chg/INPUT b/tests/07_OFDFT/33_OF_out_chg/INPUT new file mode 100644 index 0000000000..f2e9b6a262 --- /dev/null +++ b/tests/07_OFDFT/33_OF_out_chg/INPUT @@ -0,0 +1,25 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf +esolver_type ofdft + +symmetry 1 +pseudo_dir ../../PP_ORB/ +pseudo_rcut 16 +nspin 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_nmax 50 + +#OFDFT +of_kinetic wt +of_method tn +of_conv energy +of_tole 2e-6 + +#Parameters (3.Basis) +basis_type pw + +out_chg 1 \ No newline at end of file diff --git a/tests/02_NAO_Gamma/026_NO_GO_PU_AF/KPT b/tests/07_OFDFT/33_OF_out_chg/KPT similarity index 100% rename from tests/02_NAO_Gamma/026_NO_GO_PU_AF/KPT rename to tests/07_OFDFT/33_OF_out_chg/KPT diff --git a/tests/07_OFDFT/33_OF_out_chg/README b/tests/07_OFDFT/33_OF_out_chg/README new file mode 100644 index 0000000000..2466695ab4 --- /dev/null +++ b/tests/07_OFDFT/33_OF_out_chg/README @@ -0,0 +1 @@ +Test out_chg in OFDFT, symmetry=on diff --git a/tests/07_OFDFT/33_OF_out_chg/STRU b/tests/07_OFDFT/33_OF_out_chg/STRU new file mode 100644 index 0000000000..e797c06432 --- /dev/null +++ b/tests/07_OFDFT/33_OF_out_chg/STRU @@ -0,0 +1,18 @@ +ATOMIC_SPECIES +Al 26.98 al.lda.lps blps + +LATTICE_CONSTANT +7.50241114482312 // add lattice constant + +LATTICE_VECTORS +0.000000000000 0.500000000000 0.500000000000 +0.500000000000 0.000000000000 0.500000000000 +0.500000000000 0.500000000000 0.000000000000 + +ATOMIC_POSITIONS +Direct + +Al +0 +1 + 0.000000000000 0.000000000000 0.000000000000 1 1 1 diff --git a/tests/07_OFDFT/33_OF_out_chg/chg.cube.ref b/tests/07_OFDFT/33_OF_out_chg/chg.cube.ref new file mode 100644 index 0000000000..c69798f5fb --- /dev/null +++ b/tests/07_OFDFT/33_OF_out_chg/chg.cube.ref @@ -0,0 +1,682 @@ +STEP: -1 Cubefile created from ABACUS. Inner loop is z, followed by y and x +1 (nspin) 0.603379 (fermi energy, in Ry) +1 0.0 0.0 0.0 +15 0.000000 0.250080 0.250080 +15 0.250080 0.000000 0.250080 +15 0.250080 0.250080 0.000000 + 13 3.000000 0.000000 0.000000 0.000000 + 4.393e-03 5.807e-03 1.087e-02 2.000e-02 2.921e-02 3.333e-02 + 3.299e-02 3.184e-02 3.184e-02 3.299e-02 3.333e-02 2.921e-02 + 2.000e-02 1.087e-02 5.807e-03 + 5.807e-03 9.080e-03 1.644e-02 2.596e-02 3.227e-02 3.332e-02 + 3.208e-02 3.140e-02 3.208e-02 3.332e-02 3.227e-02 2.596e-02 + 1.644e-02 9.080e-03 5.807e-03 + 1.087e-02 1.644e-02 2.463e-02 3.124e-02 3.319e-02 3.209e-02 + 3.088e-02 3.088e-02 3.209e-02 3.319e-02 3.124e-02 2.463e-02 + 1.644e-02 1.087e-02 9.080e-03 + 2.000e-02 2.596e-02 3.124e-02 3.306e-02 3.200e-02 3.044e-02 + 2.980e-02 3.044e-02 3.200e-02 3.306e-02 3.124e-02 2.596e-02 + 2.000e-02 1.644e-02 1.644e-02 + 2.921e-02 3.227e-02 3.319e-02 3.200e-02 3.026e-02 2.918e-02 + 2.918e-02 3.026e-02 3.200e-02 3.319e-02 3.227e-02 2.921e-02 + 2.596e-02 2.463e-02 2.596e-02 + 3.333e-02 3.332e-02 3.209e-02 3.044e-02 2.918e-02 2.874e-02 + 2.918e-02 3.044e-02 3.209e-02 3.332e-02 3.333e-02 3.227e-02 + 3.124e-02 3.124e-02 3.227e-02 + 3.299e-02 3.208e-02 3.088e-02 2.980e-02 2.918e-02 2.918e-02 + 2.980e-02 3.088e-02 3.208e-02 3.299e-02 3.332e-02 3.319e-02 + 3.306e-02 3.319e-02 3.332e-02 + 3.184e-02 3.140e-02 3.088e-02 3.044e-02 3.026e-02 3.044e-02 + 3.088e-02 3.140e-02 3.184e-02 3.208e-02 3.209e-02 3.200e-02 + 3.200e-02 3.209e-02 3.208e-02 + 3.184e-02 3.208e-02 3.209e-02 3.200e-02 3.200e-02 3.209e-02 + 3.208e-02 3.184e-02 3.140e-02 3.088e-02 3.044e-02 3.026e-02 + 3.044e-02 3.088e-02 3.140e-02 + 3.299e-02 3.332e-02 3.319e-02 3.306e-02 3.319e-02 3.332e-02 + 3.299e-02 3.208e-02 3.088e-02 2.980e-02 2.918e-02 2.918e-02 + 2.980e-02 3.088e-02 3.208e-02 + 3.333e-02 3.227e-02 3.124e-02 3.124e-02 3.227e-02 3.333e-02 + 3.332e-02 3.209e-02 3.044e-02 2.918e-02 2.874e-02 2.918e-02 + 3.044e-02 3.209e-02 3.332e-02 + 2.921e-02 2.596e-02 2.463e-02 2.596e-02 2.921e-02 3.227e-02 + 3.319e-02 3.200e-02 3.026e-02 2.918e-02 2.918e-02 3.026e-02 + 3.200e-02 3.319e-02 3.227e-02 + 2.000e-02 1.644e-02 1.644e-02 2.000e-02 2.596e-02 3.124e-02 + 3.306e-02 3.200e-02 3.044e-02 2.980e-02 3.044e-02 3.200e-02 + 3.306e-02 3.124e-02 2.596e-02 + 1.087e-02 9.080e-03 1.087e-02 1.644e-02 2.463e-02 3.124e-02 + 3.319e-02 3.209e-02 3.088e-02 3.088e-02 3.209e-02 3.319e-02 + 3.124e-02 2.463e-02 1.644e-02 + 5.807e-03 5.807e-03 9.080e-03 1.644e-02 2.596e-02 3.227e-02 + 3.332e-02 3.208e-02 3.140e-02 3.208e-02 3.332e-02 3.227e-02 + 2.596e-02 1.644e-02 9.080e-03 + 5.807e-03 9.080e-03 1.644e-02 2.596e-02 3.227e-02 3.332e-02 + 3.208e-02 3.140e-02 3.208e-02 3.332e-02 3.227e-02 2.596e-02 + 1.644e-02 9.080e-03 5.807e-03 + 9.080e-03 1.461e-02 2.329e-02 3.085e-02 3.352e-02 3.267e-02 + 3.148e-02 3.148e-02 3.267e-02 3.352e-02 3.085e-02 2.329e-02 + 1.461e-02 9.080e-03 7.373e-03 + 1.644e-02 2.329e-02 3.016e-02 3.336e-02 3.290e-02 3.142e-02 + 3.078e-02 3.142e-02 3.290e-02 3.336e-02 3.016e-02 2.329e-02 + 1.644e-02 1.268e-02 1.268e-02 + 2.596e-02 3.085e-02 3.336e-02 3.293e-02 3.132e-02 3.022e-02 + 3.022e-02 3.132e-02 3.293e-02 3.336e-02 3.085e-02 2.596e-02 + 2.154e-02 1.985e-02 2.154e-02 + 3.227e-02 3.352e-02 3.290e-02 3.132e-02 3.001e-02 2.953e-02 + 3.001e-02 3.132e-02 3.290e-02 3.352e-02 3.227e-02 2.979e-02 + 2.787e-02 2.787e-02 2.979e-02 + 3.332e-02 3.267e-02 3.142e-02 3.022e-02 2.953e-02 2.953e-02 + 3.022e-02 3.142e-02 3.267e-02 3.332e-02 3.303e-02 3.226e-02 + 3.186e-02 3.226e-02 3.303e-02 + 3.208e-02 3.148e-02 3.078e-02 3.022e-02 3.001e-02 3.022e-02 + 3.078e-02 3.148e-02 3.208e-02 3.236e-02 3.228e-02 3.208e-02 + 3.208e-02 3.228e-02 3.236e-02 + 3.140e-02 3.148e-02 3.142e-02 3.132e-02 3.132e-02 3.142e-02 + 3.148e-02 3.140e-02 3.117e-02 3.081e-02 3.046e-02 3.030e-02 + 3.046e-02 3.081e-02 3.117e-02 + 3.208e-02 3.267e-02 3.290e-02 3.293e-02 3.290e-02 3.267e-02 + 3.208e-02 3.117e-02 3.012e-02 2.921e-02 2.866e-02 2.866e-02 + 2.921e-02 3.012e-02 3.117e-02 + 3.332e-02 3.352e-02 3.336e-02 3.336e-02 3.352e-02 3.332e-02 + 3.236e-02 3.081e-02 2.921e-02 2.806e-02 2.765e-02 2.806e-02 + 2.921e-02 3.081e-02 3.236e-02 + 3.227e-02 3.085e-02 3.016e-02 3.085e-02 3.227e-02 3.303e-02 + 3.228e-02 3.046e-02 2.866e-02 2.765e-02 2.765e-02 2.866e-02 + 3.046e-02 3.228e-02 3.303e-02 + 2.596e-02 2.329e-02 2.329e-02 2.596e-02 2.979e-02 3.226e-02 + 3.208e-02 3.030e-02 2.866e-02 2.806e-02 2.866e-02 3.030e-02 + 3.208e-02 3.226e-02 2.979e-02 + 1.644e-02 1.461e-02 1.644e-02 2.154e-02 2.787e-02 3.186e-02 + 3.208e-02 3.046e-02 2.921e-02 2.921e-02 3.046e-02 3.208e-02 + 3.186e-02 2.787e-02 2.154e-02 + 9.080e-03 9.080e-03 1.268e-02 1.985e-02 2.787e-02 3.226e-02 + 3.228e-02 3.081e-02 3.012e-02 3.081e-02 3.228e-02 3.226e-02 + 2.787e-02 1.985e-02 1.268e-02 + 5.807e-03 7.373e-03 1.268e-02 2.154e-02 2.979e-02 3.303e-02 + 3.236e-02 3.117e-02 3.117e-02 3.236e-02 3.303e-02 2.979e-02 + 2.154e-02 1.268e-02 7.373e-03 + 1.087e-02 1.644e-02 2.463e-02 3.124e-02 3.319e-02 3.209e-02 + 3.088e-02 3.088e-02 3.209e-02 3.319e-02 3.124e-02 2.463e-02 + 1.644e-02 1.087e-02 9.080e-03 + 1.644e-02 2.329e-02 3.016e-02 3.336e-02 3.290e-02 3.142e-02 + 3.078e-02 3.142e-02 3.290e-02 3.336e-02 3.016e-02 2.329e-02 + 1.644e-02 1.268e-02 1.268e-02 + 2.463e-02 3.016e-02 3.332e-02 3.322e-02 3.169e-02 3.059e-02 + 3.059e-02 3.169e-02 3.322e-02 3.332e-02 3.016e-02 2.463e-02 + 1.985e-02 1.806e-02 1.985e-02 + 3.124e-02 3.336e-02 3.322e-02 3.177e-02 3.043e-02 2.994e-02 + 3.043e-02 3.177e-02 3.322e-02 3.336e-02 3.124e-02 2.787e-02 + 2.546e-02 2.546e-02 2.787e-02 + 3.319e-02 3.290e-02 3.169e-02 3.043e-02 2.971e-02 2.971e-02 + 3.043e-02 3.169e-02 3.290e-02 3.319e-02 3.226e-02 3.088e-02 + 3.024e-02 3.088e-02 3.226e-02 + 3.209e-02 3.142e-02 3.059e-02 2.994e-02 2.971e-02 2.994e-02 + 3.059e-02 3.142e-02 3.209e-02 3.228e-02 3.197e-02 3.160e-02 + 3.160e-02 3.197e-02 3.228e-02 + 3.088e-02 3.078e-02 3.059e-02 3.043e-02 3.043e-02 3.059e-02 + 3.078e-02 3.088e-02 3.081e-02 3.056e-02 3.024e-02 3.010e-02 + 3.024e-02 3.056e-02 3.081e-02 + 3.088e-02 3.142e-02 3.169e-02 3.177e-02 3.169e-02 3.142e-02 + 3.088e-02 3.012e-02 2.929e-02 2.853e-02 2.806e-02 2.806e-02 + 2.853e-02 2.929e-02 3.012e-02 + 3.209e-02 3.290e-02 3.322e-02 3.322e-02 3.290e-02 3.209e-02 + 3.081e-02 2.929e-02 2.785e-02 2.683e-02 2.646e-02 2.683e-02 + 2.785e-02 2.929e-02 3.081e-02 + 3.319e-02 3.336e-02 3.332e-02 3.336e-02 3.319e-02 3.228e-02 + 3.056e-02 2.853e-02 2.683e-02 2.590e-02 2.590e-02 2.683e-02 + 2.853e-02 3.056e-02 3.228e-02 + 3.124e-02 3.016e-02 3.016e-02 3.124e-02 3.226e-02 3.197e-02 + 3.024e-02 2.806e-02 2.646e-02 2.590e-02 2.646e-02 2.806e-02 + 3.024e-02 3.197e-02 3.226e-02 + 2.463e-02 2.329e-02 2.463e-02 2.787e-02 3.088e-02 3.160e-02 + 3.010e-02 2.806e-02 2.683e-02 2.683e-02 2.806e-02 3.010e-02 + 3.160e-02 3.088e-02 2.787e-02 + 1.644e-02 1.644e-02 1.985e-02 2.546e-02 3.024e-02 3.160e-02 + 3.024e-02 2.853e-02 2.785e-02 2.853e-02 3.024e-02 3.160e-02 + 3.024e-02 2.546e-02 1.985e-02 + 1.087e-02 1.268e-02 1.806e-02 2.546e-02 3.088e-02 3.197e-02 + 3.056e-02 2.929e-02 2.929e-02 3.056e-02 3.197e-02 3.088e-02 + 2.546e-02 1.806e-02 1.268e-02 + 9.080e-03 1.268e-02 1.985e-02 2.787e-02 3.226e-02 3.228e-02 + 3.081e-02 3.012e-02 3.081e-02 3.228e-02 3.226e-02 2.787e-02 + 1.985e-02 1.268e-02 9.080e-03 + 2.000e-02 2.596e-02 3.124e-02 3.306e-02 3.200e-02 3.044e-02 + 2.980e-02 3.044e-02 3.200e-02 3.306e-02 3.124e-02 2.596e-02 + 2.000e-02 1.644e-02 1.644e-02 + 2.596e-02 3.085e-02 3.336e-02 3.293e-02 3.132e-02 3.022e-02 + 3.022e-02 3.132e-02 3.293e-02 3.336e-02 3.085e-02 2.596e-02 + 2.154e-02 1.985e-02 2.154e-02 + 3.124e-02 3.336e-02 3.322e-02 3.177e-02 3.043e-02 2.994e-02 + 3.043e-02 3.177e-02 3.322e-02 3.336e-02 3.124e-02 2.787e-02 + 2.546e-02 2.546e-02 2.787e-02 + 3.306e-02 3.293e-02 3.177e-02 3.049e-02 2.975e-02 2.975e-02 + 3.049e-02 3.177e-02 3.293e-02 3.306e-02 3.186e-02 3.024e-02 + 2.950e-02 3.024e-02 3.186e-02 + 3.200e-02 3.132e-02 3.043e-02 2.975e-02 2.951e-02 2.975e-02 + 3.043e-02 3.132e-02 3.200e-02 3.208e-02 3.160e-02 3.108e-02 + 3.108e-02 3.160e-02 3.208e-02 + 3.044e-02 3.022e-02 2.994e-02 2.975e-02 2.975e-02 2.994e-02 + 3.022e-02 3.044e-02 3.046e-02 3.024e-02 2.993e-02 2.978e-02 + 2.993e-02 3.024e-02 3.046e-02 + 2.980e-02 3.022e-02 3.043e-02 3.049e-02 3.043e-02 3.022e-02 + 2.980e-02 2.921e-02 2.853e-02 2.791e-02 2.752e-02 2.752e-02 + 2.791e-02 2.853e-02 2.921e-02 + 3.044e-02 3.132e-02 3.177e-02 3.177e-02 3.132e-02 3.044e-02 + 2.921e-02 2.785e-02 2.661e-02 2.572e-02 2.540e-02 2.572e-02 + 2.661e-02 2.785e-02 2.921e-02 + 3.200e-02 3.293e-02 3.322e-02 3.293e-02 3.200e-02 3.046e-02 + 2.853e-02 2.661e-02 2.508e-02 2.424e-02 2.424e-02 2.508e-02 + 2.661e-02 2.853e-02 3.046e-02 + 3.306e-02 3.336e-02 3.336e-02 3.306e-02 3.208e-02 3.024e-02 + 2.791e-02 2.572e-02 2.424e-02 2.372e-02 2.424e-02 2.572e-02 + 2.791e-02 3.024e-02 3.208e-02 + 3.124e-02 3.085e-02 3.124e-02 3.186e-02 3.160e-02 2.993e-02 + 2.752e-02 2.540e-02 2.424e-02 2.424e-02 2.540e-02 2.752e-02 + 2.993e-02 3.160e-02 3.186e-02 + 2.596e-02 2.596e-02 2.787e-02 3.024e-02 3.108e-02 2.978e-02 + 2.752e-02 2.572e-02 2.508e-02 2.572e-02 2.752e-02 2.978e-02 + 3.108e-02 3.024e-02 2.787e-02 + 2.000e-02 2.154e-02 2.546e-02 2.950e-02 3.108e-02 2.993e-02 + 2.791e-02 2.661e-02 2.661e-02 2.791e-02 2.993e-02 3.108e-02 + 2.950e-02 2.546e-02 2.154e-02 + 1.644e-02 1.985e-02 2.546e-02 3.024e-02 3.160e-02 3.024e-02 + 2.853e-02 2.785e-02 2.853e-02 3.024e-02 3.160e-02 3.024e-02 + 2.546e-02 1.985e-02 1.644e-02 + 1.644e-02 2.154e-02 2.787e-02 3.186e-02 3.208e-02 3.046e-02 + 2.921e-02 2.921e-02 3.046e-02 3.208e-02 3.186e-02 2.787e-02 + 2.154e-02 1.644e-02 1.461e-02 + 2.921e-02 3.227e-02 3.319e-02 3.200e-02 3.026e-02 2.918e-02 + 2.918e-02 3.026e-02 3.200e-02 3.319e-02 3.227e-02 2.921e-02 + 2.596e-02 2.463e-02 2.596e-02 + 3.227e-02 3.352e-02 3.290e-02 3.132e-02 3.001e-02 2.953e-02 + 3.001e-02 3.132e-02 3.290e-02 3.352e-02 3.227e-02 2.979e-02 + 2.787e-02 2.787e-02 2.979e-02 + 3.319e-02 3.290e-02 3.169e-02 3.043e-02 2.971e-02 2.971e-02 + 3.043e-02 3.169e-02 3.290e-02 3.319e-02 3.226e-02 3.088e-02 + 3.024e-02 3.088e-02 3.226e-02 + 3.200e-02 3.132e-02 3.043e-02 2.975e-02 2.951e-02 2.975e-02 + 3.043e-02 3.132e-02 3.200e-02 3.208e-02 3.160e-02 3.108e-02 + 3.108e-02 3.160e-02 3.208e-02 + 3.026e-02 3.001e-02 2.971e-02 2.951e-02 2.951e-02 2.971e-02 + 3.001e-02 3.026e-02 3.030e-02 3.010e-02 2.978e-02 2.963e-02 + 2.978e-02 3.010e-02 3.030e-02 + 2.918e-02 2.953e-02 2.971e-02 2.975e-02 2.971e-02 2.953e-02 + 2.918e-02 2.866e-02 2.806e-02 2.751e-02 2.718e-02 2.718e-02 + 2.752e-02 2.806e-02 2.866e-02 + 2.918e-02 3.001e-02 3.043e-02 3.043e-02 3.001e-02 2.918e-02 + 2.806e-02 2.683e-02 2.572e-02 2.494e-02 2.466e-02 2.494e-02 + 2.572e-02 2.683e-02 2.806e-02 + 3.026e-02 3.132e-02 3.169e-02 3.132e-02 3.026e-02 2.866e-02 + 2.683e-02 2.508e-02 2.371e-02 2.295e-02 2.295e-02 2.371e-02 + 2.508e-02 2.683e-02 2.866e-02 + 3.200e-02 3.290e-02 3.290e-02 3.200e-02 3.030e-02 2.806e-02 + 2.572e-02 2.371e-02 2.236e-02 2.189e-02 2.236e-02 2.371e-02 + 2.572e-02 2.806e-02 3.030e-02 + 3.319e-02 3.352e-02 3.319e-02 3.208e-02 3.010e-02 2.751e-02 + 2.494e-02 2.295e-02 2.189e-02 2.189e-02 2.295e-02 2.494e-02 + 2.752e-02 3.010e-02 3.208e-02 + 3.227e-02 3.227e-02 3.226e-02 3.160e-02 2.978e-02 2.718e-02 + 2.466e-02 2.295e-02 2.236e-02 2.295e-02 2.466e-02 2.718e-02 + 2.978e-02 3.160e-02 3.226e-02 + 2.921e-02 2.979e-02 3.088e-02 3.108e-02 2.963e-02 2.718e-02 + 2.494e-02 2.371e-02 2.371e-02 2.494e-02 2.718e-02 2.963e-02 + 3.108e-02 3.088e-02 2.979e-02 + 2.596e-02 2.787e-02 3.024e-02 3.108e-02 2.978e-02 2.752e-02 + 2.572e-02 2.508e-02 2.572e-02 2.752e-02 2.978e-02 3.108e-02 + 3.024e-02 2.787e-02 2.596e-02 + 2.463e-02 2.787e-02 3.088e-02 3.160e-02 3.010e-02 2.806e-02 + 2.683e-02 2.683e-02 2.806e-02 3.010e-02 3.160e-02 3.088e-02 + 2.787e-02 2.463e-02 2.329e-02 + 2.596e-02 2.979e-02 3.226e-02 3.208e-02 3.030e-02 2.866e-02 + 2.806e-02 2.866e-02 3.030e-02 3.208e-02 3.226e-02 2.979e-02 + 2.596e-02 2.329e-02 2.329e-02 + 3.333e-02 3.332e-02 3.209e-02 3.044e-02 2.918e-02 2.874e-02 + 2.918e-02 3.044e-02 3.209e-02 3.332e-02 3.333e-02 3.227e-02 + 3.124e-02 3.124e-02 3.227e-02 + 3.332e-02 3.267e-02 3.142e-02 3.022e-02 2.953e-02 2.953e-02 + 3.022e-02 3.142e-02 3.267e-02 3.332e-02 3.303e-02 3.226e-02 + 3.186e-02 3.226e-02 3.303e-02 + 3.209e-02 3.142e-02 3.059e-02 2.994e-02 2.971e-02 2.994e-02 + 3.059e-02 3.142e-02 3.209e-02 3.228e-02 3.197e-02 3.160e-02 + 3.160e-02 3.197e-02 3.228e-02 + 3.044e-02 3.022e-02 2.994e-02 2.975e-02 2.975e-02 2.994e-02 + 3.022e-02 3.044e-02 3.046e-02 3.024e-02 2.993e-02 2.978e-02 + 2.993e-02 3.024e-02 3.046e-02 + 2.918e-02 2.953e-02 2.971e-02 2.975e-02 2.971e-02 2.953e-02 + 2.918e-02 2.866e-02 2.806e-02 2.751e-02 2.718e-02 2.718e-02 + 2.752e-02 2.806e-02 2.866e-02 + 2.874e-02 2.953e-02 2.994e-02 2.994e-02 2.953e-02 2.874e-02 + 2.765e-02 2.646e-02 2.540e-02 2.466e-02 2.440e-02 2.466e-02 + 2.540e-02 2.646e-02 2.765e-02 + 2.918e-02 3.022e-02 3.059e-02 3.022e-02 2.918e-02 2.765e-02 + 2.590e-02 2.424e-02 2.295e-02 2.226e-02 2.226e-02 2.295e-02 + 2.424e-02 2.590e-02 2.765e-02 + 3.044e-02 3.142e-02 3.142e-02 3.044e-02 2.866e-02 2.646e-02 + 2.424e-02 2.236e-02 2.112e-02 2.069e-02 2.112e-02 2.236e-02 + 2.424e-02 2.646e-02 2.866e-02 + 3.209e-02 3.267e-02 3.209e-02 3.046e-02 2.806e-02 2.540e-02 + 2.295e-02 2.112e-02 2.014e-02 2.014e-02 2.112e-02 2.295e-02 + 2.540e-02 2.806e-02 3.046e-02 + 3.332e-02 3.332e-02 3.228e-02 3.024e-02 2.751e-02 2.466e-02 + 2.226e-02 2.069e-02 2.014e-02 2.069e-02 2.226e-02 2.466e-02 + 2.752e-02 3.024e-02 3.228e-02 + 3.333e-02 3.303e-02 3.197e-02 2.993e-02 2.718e-02 2.440e-02 + 2.226e-02 2.112e-02 2.112e-02 2.226e-02 2.440e-02 2.718e-02 + 2.993e-02 3.197e-02 3.303e-02 + 3.227e-02 3.226e-02 3.160e-02 2.978e-02 2.718e-02 2.466e-02 + 2.295e-02 2.236e-02 2.295e-02 2.466e-02 2.718e-02 2.978e-02 + 3.160e-02 3.226e-02 3.227e-02 + 3.124e-02 3.186e-02 3.160e-02 2.993e-02 2.752e-02 2.540e-02 + 2.424e-02 2.424e-02 2.540e-02 2.752e-02 2.993e-02 3.160e-02 + 3.186e-02 3.124e-02 3.085e-02 + 3.124e-02 3.226e-02 3.197e-02 3.024e-02 2.806e-02 2.646e-02 + 2.590e-02 2.646e-02 2.806e-02 3.024e-02 3.197e-02 3.226e-02 + 3.124e-02 3.016e-02 3.016e-02 + 3.227e-02 3.303e-02 3.228e-02 3.046e-02 2.866e-02 2.765e-02 + 2.765e-02 2.866e-02 3.046e-02 3.228e-02 3.303e-02 3.227e-02 + 3.085e-02 3.016e-02 3.085e-02 + 3.299e-02 3.208e-02 3.088e-02 2.980e-02 2.918e-02 2.918e-02 + 2.980e-02 3.088e-02 3.208e-02 3.299e-02 3.332e-02 3.319e-02 + 3.306e-02 3.319e-02 3.332e-02 + 3.208e-02 3.148e-02 3.078e-02 3.022e-02 3.001e-02 3.022e-02 + 3.078e-02 3.148e-02 3.208e-02 3.236e-02 3.228e-02 3.208e-02 + 3.208e-02 3.228e-02 3.236e-02 + 3.088e-02 3.078e-02 3.059e-02 3.043e-02 3.043e-02 3.059e-02 + 3.078e-02 3.088e-02 3.081e-02 3.056e-02 3.024e-02 3.010e-02 + 3.024e-02 3.056e-02 3.081e-02 + 2.980e-02 3.022e-02 3.043e-02 3.049e-02 3.043e-02 3.022e-02 + 2.980e-02 2.921e-02 2.853e-02 2.791e-02 2.752e-02 2.752e-02 + 2.791e-02 2.853e-02 2.921e-02 + 2.918e-02 3.001e-02 3.043e-02 3.043e-02 3.001e-02 2.918e-02 + 2.806e-02 2.683e-02 2.572e-02 2.494e-02 2.466e-02 2.494e-02 + 2.572e-02 2.683e-02 2.806e-02 + 2.918e-02 3.022e-02 3.059e-02 3.022e-02 2.918e-02 2.765e-02 + 2.590e-02 2.424e-02 2.295e-02 2.226e-02 2.226e-02 2.295e-02 + 2.424e-02 2.590e-02 2.765e-02 + 2.980e-02 3.078e-02 3.078e-02 2.980e-02 2.806e-02 2.590e-02 + 2.372e-02 2.189e-02 2.069e-02 2.027e-02 2.069e-02 2.189e-02 + 2.372e-02 2.590e-02 2.806e-02 + 3.088e-02 3.148e-02 3.088e-02 2.921e-02 2.683e-02 2.424e-02 + 2.189e-02 2.014e-02 1.922e-02 1.922e-02 2.014e-02 2.189e-02 + 2.424e-02 2.683e-02 2.921e-02 + 3.208e-02 3.208e-02 3.081e-02 2.853e-02 2.572e-02 2.295e-02 + 2.069e-02 1.922e-02 1.871e-02 1.922e-02 2.069e-02 2.295e-02 + 2.572e-02 2.853e-02 3.081e-02 + 3.299e-02 3.236e-02 3.056e-02 2.791e-02 2.494e-02 2.226e-02 + 2.027e-02 1.922e-02 1.922e-02 2.027e-02 2.226e-02 2.494e-02 + 2.791e-02 3.056e-02 3.236e-02 + 3.332e-02 3.228e-02 3.024e-02 2.752e-02 2.466e-02 2.226e-02 + 2.069e-02 2.014e-02 2.069e-02 2.226e-02 2.466e-02 2.751e-02 + 3.024e-02 3.228e-02 3.332e-02 + 3.319e-02 3.208e-02 3.010e-02 2.752e-02 2.494e-02 2.295e-02 + 2.189e-02 2.189e-02 2.295e-02 2.494e-02 2.751e-02 3.010e-02 + 3.208e-02 3.319e-02 3.352e-02 + 3.306e-02 3.208e-02 3.024e-02 2.791e-02 2.572e-02 2.424e-02 + 2.372e-02 2.424e-02 2.572e-02 2.791e-02 3.024e-02 3.208e-02 + 3.306e-02 3.336e-02 3.336e-02 + 3.319e-02 3.228e-02 3.056e-02 2.853e-02 2.683e-02 2.590e-02 + 2.590e-02 2.683e-02 2.853e-02 3.056e-02 3.228e-02 3.319e-02 + 3.336e-02 3.332e-02 3.336e-02 + 3.332e-02 3.236e-02 3.081e-02 2.921e-02 2.806e-02 2.765e-02 + 2.806e-02 2.921e-02 3.081e-02 3.236e-02 3.332e-02 3.352e-02 + 3.336e-02 3.336e-02 3.352e-02 + 3.184e-02 3.140e-02 3.088e-02 3.044e-02 3.026e-02 3.044e-02 + 3.088e-02 3.140e-02 3.184e-02 3.208e-02 3.209e-02 3.200e-02 + 3.200e-02 3.209e-02 3.208e-02 + 3.140e-02 3.148e-02 3.142e-02 3.132e-02 3.132e-02 3.142e-02 + 3.148e-02 3.140e-02 3.117e-02 3.081e-02 3.046e-02 3.030e-02 + 3.046e-02 3.081e-02 3.117e-02 + 3.088e-02 3.142e-02 3.169e-02 3.177e-02 3.169e-02 3.142e-02 + 3.088e-02 3.012e-02 2.929e-02 2.853e-02 2.806e-02 2.806e-02 + 2.853e-02 2.929e-02 3.012e-02 + 3.044e-02 3.132e-02 3.177e-02 3.177e-02 3.132e-02 3.044e-02 + 2.921e-02 2.785e-02 2.661e-02 2.572e-02 2.540e-02 2.572e-02 + 2.661e-02 2.785e-02 2.921e-02 + 3.026e-02 3.132e-02 3.169e-02 3.132e-02 3.026e-02 2.866e-02 + 2.683e-02 2.508e-02 2.371e-02 2.295e-02 2.295e-02 2.371e-02 + 2.508e-02 2.683e-02 2.866e-02 + 3.044e-02 3.142e-02 3.142e-02 3.044e-02 2.866e-02 2.646e-02 + 2.424e-02 2.236e-02 2.112e-02 2.069e-02 2.112e-02 2.236e-02 + 2.424e-02 2.646e-02 2.866e-02 + 3.088e-02 3.148e-02 3.088e-02 2.921e-02 2.683e-02 2.424e-02 + 2.189e-02 2.014e-02 1.922e-02 1.922e-02 2.014e-02 2.189e-02 + 2.424e-02 2.683e-02 2.921e-02 + 3.140e-02 3.140e-02 3.012e-02 2.785e-02 2.508e-02 2.236e-02 + 2.014e-02 1.871e-02 1.822e-02 1.871e-02 2.014e-02 2.236e-02 + 2.508e-02 2.785e-02 3.012e-02 + 3.184e-02 3.117e-02 2.929e-02 2.661e-02 2.371e-02 2.112e-02 + 1.922e-02 1.822e-02 1.822e-02 1.922e-02 2.112e-02 2.371e-02 + 2.661e-02 2.929e-02 3.117e-02 + 3.208e-02 3.081e-02 2.853e-02 2.572e-02 2.295e-02 2.069e-02 + 1.922e-02 1.871e-02 1.922e-02 2.069e-02 2.295e-02 2.572e-02 + 2.853e-02 3.081e-02 3.208e-02 + 3.209e-02 3.046e-02 2.806e-02 2.540e-02 2.295e-02 2.112e-02 + 2.014e-02 2.014e-02 2.112e-02 2.295e-02 2.540e-02 2.806e-02 + 3.046e-02 3.209e-02 3.267e-02 + 3.200e-02 3.030e-02 2.806e-02 2.572e-02 2.371e-02 2.236e-02 + 2.189e-02 2.236e-02 2.371e-02 2.572e-02 2.806e-02 3.030e-02 + 3.200e-02 3.290e-02 3.290e-02 + 3.200e-02 3.046e-02 2.853e-02 2.661e-02 2.508e-02 2.424e-02 + 2.424e-02 2.508e-02 2.661e-02 2.853e-02 3.046e-02 3.200e-02 + 3.293e-02 3.322e-02 3.293e-02 + 3.209e-02 3.081e-02 2.929e-02 2.785e-02 2.683e-02 2.646e-02 + 2.683e-02 2.785e-02 2.929e-02 3.081e-02 3.209e-02 3.290e-02 + 3.322e-02 3.322e-02 3.290e-02 + 3.208e-02 3.117e-02 3.012e-02 2.921e-02 2.866e-02 2.866e-02 + 2.921e-02 3.012e-02 3.117e-02 3.208e-02 3.267e-02 3.290e-02 + 3.293e-02 3.290e-02 3.267e-02 + 3.184e-02 3.208e-02 3.209e-02 3.200e-02 3.200e-02 3.209e-02 + 3.208e-02 3.184e-02 3.140e-02 3.088e-02 3.044e-02 3.026e-02 + 3.044e-02 3.088e-02 3.140e-02 + 3.208e-02 3.267e-02 3.290e-02 3.293e-02 3.290e-02 3.267e-02 + 3.208e-02 3.117e-02 3.012e-02 2.921e-02 2.866e-02 2.866e-02 + 2.921e-02 3.012e-02 3.117e-02 + 3.209e-02 3.290e-02 3.322e-02 3.322e-02 3.290e-02 3.209e-02 + 3.081e-02 2.929e-02 2.785e-02 2.683e-02 2.646e-02 2.683e-02 + 2.785e-02 2.929e-02 3.081e-02 + 3.200e-02 3.293e-02 3.322e-02 3.293e-02 3.200e-02 3.046e-02 + 2.853e-02 2.661e-02 2.508e-02 2.424e-02 2.424e-02 2.508e-02 + 2.661e-02 2.853e-02 3.046e-02 + 3.200e-02 3.290e-02 3.290e-02 3.200e-02 3.030e-02 2.806e-02 + 2.572e-02 2.371e-02 2.236e-02 2.189e-02 2.236e-02 2.371e-02 + 2.572e-02 2.806e-02 3.030e-02 + 3.209e-02 3.267e-02 3.209e-02 3.046e-02 2.806e-02 2.540e-02 + 2.295e-02 2.112e-02 2.014e-02 2.014e-02 2.112e-02 2.295e-02 + 2.540e-02 2.806e-02 3.046e-02 + 3.208e-02 3.208e-02 3.081e-02 2.853e-02 2.572e-02 2.295e-02 + 2.069e-02 1.922e-02 1.871e-02 1.922e-02 2.069e-02 2.295e-02 + 2.572e-02 2.853e-02 3.081e-02 + 3.184e-02 3.117e-02 2.929e-02 2.661e-02 2.371e-02 2.112e-02 + 1.922e-02 1.822e-02 1.822e-02 1.922e-02 2.112e-02 2.371e-02 + 2.661e-02 2.929e-02 3.117e-02 + 3.140e-02 3.012e-02 2.785e-02 2.508e-02 2.236e-02 2.014e-02 + 1.871e-02 1.822e-02 1.871e-02 2.014e-02 2.236e-02 2.508e-02 + 2.785e-02 3.012e-02 3.140e-02 + 3.088e-02 2.921e-02 2.683e-02 2.424e-02 2.189e-02 2.014e-02 + 1.922e-02 1.922e-02 2.014e-02 2.189e-02 2.424e-02 2.683e-02 + 2.921e-02 3.088e-02 3.148e-02 + 3.044e-02 2.866e-02 2.646e-02 2.424e-02 2.236e-02 2.112e-02 + 2.069e-02 2.112e-02 2.236e-02 2.424e-02 2.646e-02 2.866e-02 + 3.044e-02 3.142e-02 3.142e-02 + 3.026e-02 2.866e-02 2.683e-02 2.508e-02 2.371e-02 2.295e-02 + 2.295e-02 2.371e-02 2.508e-02 2.683e-02 2.866e-02 3.026e-02 + 3.132e-02 3.169e-02 3.132e-02 + 3.044e-02 2.921e-02 2.785e-02 2.661e-02 2.572e-02 2.540e-02 + 2.572e-02 2.661e-02 2.785e-02 2.921e-02 3.044e-02 3.132e-02 + 3.177e-02 3.177e-02 3.132e-02 + 3.088e-02 3.012e-02 2.929e-02 2.853e-02 2.806e-02 2.806e-02 + 2.853e-02 2.929e-02 3.012e-02 3.088e-02 3.142e-02 3.169e-02 + 3.177e-02 3.169e-02 3.142e-02 + 3.140e-02 3.117e-02 3.081e-02 3.046e-02 3.030e-02 3.046e-02 + 3.081e-02 3.117e-02 3.140e-02 3.148e-02 3.142e-02 3.132e-02 + 3.132e-02 3.142e-02 3.148e-02 + 3.299e-02 3.332e-02 3.319e-02 3.306e-02 3.319e-02 3.332e-02 + 3.299e-02 3.208e-02 3.088e-02 2.980e-02 2.918e-02 2.918e-02 + 2.980e-02 3.088e-02 3.208e-02 + 3.332e-02 3.352e-02 3.336e-02 3.336e-02 3.352e-02 3.332e-02 + 3.236e-02 3.081e-02 2.921e-02 2.806e-02 2.765e-02 2.806e-02 + 2.921e-02 3.081e-02 3.236e-02 + 3.319e-02 3.336e-02 3.332e-02 3.336e-02 3.319e-02 3.228e-02 + 3.056e-02 2.853e-02 2.683e-02 2.590e-02 2.590e-02 2.683e-02 + 2.853e-02 3.056e-02 3.228e-02 + 3.306e-02 3.336e-02 3.336e-02 3.306e-02 3.208e-02 3.024e-02 + 2.791e-02 2.572e-02 2.424e-02 2.372e-02 2.424e-02 2.572e-02 + 2.791e-02 3.024e-02 3.208e-02 + 3.319e-02 3.352e-02 3.319e-02 3.208e-02 3.010e-02 2.751e-02 + 2.494e-02 2.295e-02 2.189e-02 2.189e-02 2.295e-02 2.494e-02 + 2.752e-02 3.010e-02 3.208e-02 + 3.332e-02 3.332e-02 3.228e-02 3.024e-02 2.751e-02 2.466e-02 + 2.226e-02 2.069e-02 2.014e-02 2.069e-02 2.226e-02 2.466e-02 + 2.752e-02 3.024e-02 3.228e-02 + 3.299e-02 3.236e-02 3.056e-02 2.791e-02 2.494e-02 2.226e-02 + 2.027e-02 1.922e-02 1.922e-02 2.027e-02 2.226e-02 2.494e-02 + 2.791e-02 3.056e-02 3.236e-02 + 3.208e-02 3.081e-02 2.853e-02 2.572e-02 2.295e-02 2.069e-02 + 1.922e-02 1.871e-02 1.922e-02 2.069e-02 2.295e-02 2.572e-02 + 2.853e-02 3.081e-02 3.208e-02 + 3.088e-02 2.921e-02 2.683e-02 2.424e-02 2.189e-02 2.014e-02 + 1.922e-02 1.922e-02 2.014e-02 2.189e-02 2.424e-02 2.683e-02 + 2.921e-02 3.088e-02 3.148e-02 + 2.980e-02 2.806e-02 2.590e-02 2.372e-02 2.189e-02 2.069e-02 + 2.027e-02 2.069e-02 2.189e-02 2.372e-02 2.590e-02 2.806e-02 + 2.980e-02 3.078e-02 3.078e-02 + 2.918e-02 2.765e-02 2.590e-02 2.424e-02 2.295e-02 2.226e-02 + 2.226e-02 2.295e-02 2.424e-02 2.590e-02 2.765e-02 2.918e-02 + 3.022e-02 3.059e-02 3.022e-02 + 2.918e-02 2.806e-02 2.683e-02 2.572e-02 2.494e-02 2.466e-02 + 2.494e-02 2.572e-02 2.683e-02 2.806e-02 2.918e-02 3.001e-02 + 3.043e-02 3.043e-02 3.001e-02 + 2.980e-02 2.921e-02 2.853e-02 2.791e-02 2.752e-02 2.752e-02 + 2.791e-02 2.853e-02 2.921e-02 2.980e-02 3.022e-02 3.043e-02 + 3.049e-02 3.043e-02 3.022e-02 + 3.088e-02 3.081e-02 3.056e-02 3.024e-02 3.010e-02 3.024e-02 + 3.056e-02 3.081e-02 3.088e-02 3.078e-02 3.059e-02 3.043e-02 + 3.043e-02 3.059e-02 3.078e-02 + 3.208e-02 3.236e-02 3.228e-02 3.208e-02 3.208e-02 3.228e-02 + 3.236e-02 3.208e-02 3.148e-02 3.078e-02 3.022e-02 3.001e-02 + 3.022e-02 3.078e-02 3.148e-02 + 3.333e-02 3.227e-02 3.124e-02 3.124e-02 3.227e-02 3.333e-02 + 3.332e-02 3.209e-02 3.044e-02 2.918e-02 2.874e-02 2.918e-02 + 3.044e-02 3.209e-02 3.332e-02 + 3.227e-02 3.085e-02 3.016e-02 3.085e-02 3.227e-02 3.303e-02 + 3.228e-02 3.046e-02 2.866e-02 2.765e-02 2.765e-02 2.866e-02 + 3.046e-02 3.228e-02 3.303e-02 + 3.124e-02 3.016e-02 3.016e-02 3.124e-02 3.226e-02 3.197e-02 + 3.024e-02 2.806e-02 2.646e-02 2.590e-02 2.646e-02 2.806e-02 + 3.024e-02 3.197e-02 3.226e-02 + 3.124e-02 3.085e-02 3.124e-02 3.186e-02 3.160e-02 2.993e-02 + 2.752e-02 2.540e-02 2.424e-02 2.424e-02 2.540e-02 2.752e-02 + 2.993e-02 3.160e-02 3.186e-02 + 3.227e-02 3.227e-02 3.226e-02 3.160e-02 2.978e-02 2.718e-02 + 2.466e-02 2.295e-02 2.236e-02 2.295e-02 2.466e-02 2.718e-02 + 2.978e-02 3.160e-02 3.226e-02 + 3.333e-02 3.303e-02 3.197e-02 2.993e-02 2.718e-02 2.440e-02 + 2.226e-02 2.112e-02 2.112e-02 2.226e-02 2.440e-02 2.718e-02 + 2.993e-02 3.197e-02 3.303e-02 + 3.332e-02 3.228e-02 3.024e-02 2.752e-02 2.466e-02 2.226e-02 + 2.069e-02 2.014e-02 2.069e-02 2.226e-02 2.466e-02 2.751e-02 + 3.024e-02 3.228e-02 3.332e-02 + 3.209e-02 3.046e-02 2.806e-02 2.540e-02 2.295e-02 2.112e-02 + 2.014e-02 2.014e-02 2.112e-02 2.295e-02 2.540e-02 2.806e-02 + 3.046e-02 3.209e-02 3.267e-02 + 3.044e-02 2.866e-02 2.646e-02 2.424e-02 2.236e-02 2.112e-02 + 2.069e-02 2.112e-02 2.236e-02 2.424e-02 2.646e-02 2.866e-02 + 3.044e-02 3.142e-02 3.142e-02 + 2.918e-02 2.765e-02 2.590e-02 2.424e-02 2.295e-02 2.226e-02 + 2.226e-02 2.295e-02 2.424e-02 2.590e-02 2.765e-02 2.918e-02 + 3.022e-02 3.059e-02 3.022e-02 + 2.874e-02 2.765e-02 2.646e-02 2.540e-02 2.466e-02 2.440e-02 + 2.466e-02 2.540e-02 2.646e-02 2.765e-02 2.874e-02 2.953e-02 + 2.994e-02 2.994e-02 2.953e-02 + 2.918e-02 2.866e-02 2.806e-02 2.752e-02 2.718e-02 2.718e-02 + 2.751e-02 2.806e-02 2.866e-02 2.918e-02 2.953e-02 2.971e-02 + 2.975e-02 2.971e-02 2.953e-02 + 3.044e-02 3.046e-02 3.024e-02 2.993e-02 2.978e-02 2.993e-02 + 3.024e-02 3.046e-02 3.044e-02 3.022e-02 2.994e-02 2.975e-02 + 2.975e-02 2.994e-02 3.022e-02 + 3.209e-02 3.228e-02 3.197e-02 3.160e-02 3.160e-02 3.197e-02 + 3.228e-02 3.209e-02 3.142e-02 3.059e-02 2.994e-02 2.971e-02 + 2.994e-02 3.059e-02 3.142e-02 + 3.332e-02 3.303e-02 3.226e-02 3.186e-02 3.226e-02 3.303e-02 + 3.332e-02 3.267e-02 3.142e-02 3.022e-02 2.953e-02 2.953e-02 + 3.022e-02 3.142e-02 3.267e-02 + 2.921e-02 2.596e-02 2.463e-02 2.596e-02 2.921e-02 3.227e-02 + 3.319e-02 3.200e-02 3.026e-02 2.918e-02 2.918e-02 3.026e-02 + 3.200e-02 3.319e-02 3.227e-02 + 2.596e-02 2.329e-02 2.329e-02 2.596e-02 2.979e-02 3.226e-02 + 3.208e-02 3.030e-02 2.866e-02 2.806e-02 2.866e-02 3.030e-02 + 3.208e-02 3.226e-02 2.979e-02 + 2.463e-02 2.329e-02 2.463e-02 2.787e-02 3.088e-02 3.160e-02 + 3.010e-02 2.806e-02 2.683e-02 2.683e-02 2.806e-02 3.010e-02 + 3.160e-02 3.088e-02 2.787e-02 + 2.596e-02 2.596e-02 2.787e-02 3.024e-02 3.108e-02 2.978e-02 + 2.752e-02 2.572e-02 2.508e-02 2.572e-02 2.752e-02 2.978e-02 + 3.108e-02 3.024e-02 2.787e-02 + 2.921e-02 2.979e-02 3.088e-02 3.108e-02 2.963e-02 2.718e-02 + 2.494e-02 2.371e-02 2.371e-02 2.494e-02 2.718e-02 2.963e-02 + 3.108e-02 3.088e-02 2.979e-02 + 3.227e-02 3.226e-02 3.160e-02 2.978e-02 2.718e-02 2.466e-02 + 2.295e-02 2.236e-02 2.295e-02 2.466e-02 2.718e-02 2.978e-02 + 3.160e-02 3.226e-02 3.227e-02 + 3.319e-02 3.208e-02 3.010e-02 2.752e-02 2.494e-02 2.295e-02 + 2.189e-02 2.189e-02 2.295e-02 2.494e-02 2.751e-02 3.010e-02 + 3.208e-02 3.319e-02 3.352e-02 + 3.200e-02 3.030e-02 2.806e-02 2.572e-02 2.371e-02 2.236e-02 + 2.189e-02 2.236e-02 2.371e-02 2.572e-02 2.806e-02 3.030e-02 + 3.200e-02 3.290e-02 3.290e-02 + 3.026e-02 2.866e-02 2.683e-02 2.508e-02 2.371e-02 2.295e-02 + 2.295e-02 2.371e-02 2.508e-02 2.683e-02 2.866e-02 3.026e-02 + 3.132e-02 3.169e-02 3.132e-02 + 2.918e-02 2.806e-02 2.683e-02 2.572e-02 2.494e-02 2.466e-02 + 2.494e-02 2.572e-02 2.683e-02 2.806e-02 2.918e-02 3.001e-02 + 3.043e-02 3.043e-02 3.001e-02 + 2.918e-02 2.866e-02 2.806e-02 2.752e-02 2.718e-02 2.718e-02 + 2.751e-02 2.806e-02 2.866e-02 2.918e-02 2.953e-02 2.971e-02 + 2.975e-02 2.971e-02 2.953e-02 + 3.026e-02 3.030e-02 3.010e-02 2.978e-02 2.963e-02 2.978e-02 + 3.010e-02 3.030e-02 3.026e-02 3.001e-02 2.971e-02 2.951e-02 + 2.951e-02 2.971e-02 3.001e-02 + 3.200e-02 3.208e-02 3.160e-02 3.108e-02 3.108e-02 3.160e-02 + 3.208e-02 3.200e-02 3.132e-02 3.043e-02 2.975e-02 2.951e-02 + 2.975e-02 3.043e-02 3.132e-02 + 3.319e-02 3.226e-02 3.088e-02 3.024e-02 3.088e-02 3.226e-02 + 3.319e-02 3.290e-02 3.169e-02 3.043e-02 2.971e-02 2.971e-02 + 3.043e-02 3.169e-02 3.290e-02 + 3.227e-02 2.979e-02 2.787e-02 2.787e-02 2.979e-02 3.227e-02 + 3.352e-02 3.290e-02 3.132e-02 3.001e-02 2.953e-02 3.001e-02 + 3.132e-02 3.290e-02 3.352e-02 + 2.000e-02 1.644e-02 1.644e-02 2.000e-02 2.596e-02 3.124e-02 + 3.306e-02 3.200e-02 3.044e-02 2.980e-02 3.044e-02 3.200e-02 + 3.306e-02 3.124e-02 2.596e-02 + 1.644e-02 1.461e-02 1.644e-02 2.154e-02 2.787e-02 3.186e-02 + 3.208e-02 3.046e-02 2.921e-02 2.921e-02 3.046e-02 3.208e-02 + 3.186e-02 2.787e-02 2.154e-02 + 1.644e-02 1.644e-02 1.985e-02 2.546e-02 3.024e-02 3.160e-02 + 3.024e-02 2.853e-02 2.785e-02 2.853e-02 3.024e-02 3.160e-02 + 3.024e-02 2.546e-02 1.985e-02 + 2.000e-02 2.154e-02 2.546e-02 2.950e-02 3.108e-02 2.993e-02 + 2.791e-02 2.661e-02 2.661e-02 2.791e-02 2.993e-02 3.108e-02 + 2.950e-02 2.546e-02 2.154e-02 + 2.596e-02 2.787e-02 3.024e-02 3.108e-02 2.978e-02 2.752e-02 + 2.572e-02 2.508e-02 2.572e-02 2.752e-02 2.978e-02 3.108e-02 + 3.024e-02 2.787e-02 2.596e-02 + 3.124e-02 3.186e-02 3.160e-02 2.993e-02 2.752e-02 2.540e-02 + 2.424e-02 2.424e-02 2.540e-02 2.752e-02 2.993e-02 3.160e-02 + 3.186e-02 3.124e-02 3.085e-02 + 3.306e-02 3.208e-02 3.024e-02 2.791e-02 2.572e-02 2.424e-02 + 2.372e-02 2.424e-02 2.572e-02 2.791e-02 3.024e-02 3.208e-02 + 3.306e-02 3.336e-02 3.336e-02 + 3.200e-02 3.046e-02 2.853e-02 2.661e-02 2.508e-02 2.424e-02 + 2.424e-02 2.508e-02 2.661e-02 2.853e-02 3.046e-02 3.200e-02 + 3.293e-02 3.322e-02 3.293e-02 + 3.044e-02 2.921e-02 2.785e-02 2.661e-02 2.572e-02 2.540e-02 + 2.572e-02 2.661e-02 2.785e-02 2.921e-02 3.044e-02 3.132e-02 + 3.177e-02 3.177e-02 3.132e-02 + 2.980e-02 2.921e-02 2.853e-02 2.791e-02 2.752e-02 2.752e-02 + 2.791e-02 2.853e-02 2.921e-02 2.980e-02 3.022e-02 3.043e-02 + 3.049e-02 3.043e-02 3.022e-02 + 3.044e-02 3.046e-02 3.024e-02 2.993e-02 2.978e-02 2.993e-02 + 3.024e-02 3.046e-02 3.044e-02 3.022e-02 2.994e-02 2.975e-02 + 2.975e-02 2.994e-02 3.022e-02 + 3.200e-02 3.208e-02 3.160e-02 3.108e-02 3.108e-02 3.160e-02 + 3.208e-02 3.200e-02 3.132e-02 3.043e-02 2.975e-02 2.951e-02 + 2.975e-02 3.043e-02 3.132e-02 + 3.306e-02 3.186e-02 3.024e-02 2.950e-02 3.024e-02 3.186e-02 + 3.306e-02 3.293e-02 3.177e-02 3.049e-02 2.975e-02 2.975e-02 + 3.049e-02 3.177e-02 3.293e-02 + 3.124e-02 2.787e-02 2.546e-02 2.546e-02 2.787e-02 3.124e-02 + 3.336e-02 3.322e-02 3.177e-02 3.043e-02 2.994e-02 3.043e-02 + 3.177e-02 3.322e-02 3.336e-02 + 2.596e-02 2.154e-02 1.985e-02 2.154e-02 2.596e-02 3.085e-02 + 3.336e-02 3.293e-02 3.132e-02 3.022e-02 3.022e-02 3.132e-02 + 3.293e-02 3.336e-02 3.085e-02 + 1.087e-02 9.080e-03 1.087e-02 1.644e-02 2.463e-02 3.124e-02 + 3.319e-02 3.209e-02 3.088e-02 3.088e-02 3.209e-02 3.319e-02 + 3.124e-02 2.463e-02 1.644e-02 + 9.080e-03 9.080e-03 1.268e-02 1.985e-02 2.787e-02 3.226e-02 + 3.228e-02 3.081e-02 3.012e-02 3.081e-02 3.228e-02 3.226e-02 + 2.787e-02 1.985e-02 1.268e-02 + 1.087e-02 1.268e-02 1.806e-02 2.546e-02 3.088e-02 3.197e-02 + 3.056e-02 2.929e-02 2.929e-02 3.056e-02 3.197e-02 3.088e-02 + 2.546e-02 1.806e-02 1.268e-02 + 1.644e-02 1.985e-02 2.546e-02 3.024e-02 3.160e-02 3.024e-02 + 2.853e-02 2.785e-02 2.853e-02 3.024e-02 3.160e-02 3.024e-02 + 2.546e-02 1.985e-02 1.644e-02 + 2.463e-02 2.787e-02 3.088e-02 3.160e-02 3.010e-02 2.806e-02 + 2.683e-02 2.683e-02 2.806e-02 3.010e-02 3.160e-02 3.088e-02 + 2.787e-02 2.463e-02 2.329e-02 + 3.124e-02 3.226e-02 3.197e-02 3.024e-02 2.806e-02 2.646e-02 + 2.590e-02 2.646e-02 2.806e-02 3.024e-02 3.197e-02 3.226e-02 + 3.124e-02 3.016e-02 3.016e-02 + 3.319e-02 3.228e-02 3.056e-02 2.853e-02 2.683e-02 2.590e-02 + 2.590e-02 2.683e-02 2.853e-02 3.056e-02 3.228e-02 3.319e-02 + 3.336e-02 3.332e-02 3.336e-02 + 3.209e-02 3.081e-02 2.929e-02 2.785e-02 2.683e-02 2.646e-02 + 2.683e-02 2.785e-02 2.929e-02 3.081e-02 3.209e-02 3.290e-02 + 3.322e-02 3.322e-02 3.290e-02 + 3.088e-02 3.012e-02 2.929e-02 2.853e-02 2.806e-02 2.806e-02 + 2.853e-02 2.929e-02 3.012e-02 3.088e-02 3.142e-02 3.169e-02 + 3.177e-02 3.169e-02 3.142e-02 + 3.088e-02 3.081e-02 3.056e-02 3.024e-02 3.010e-02 3.024e-02 + 3.056e-02 3.081e-02 3.088e-02 3.078e-02 3.059e-02 3.043e-02 + 3.043e-02 3.059e-02 3.078e-02 + 3.209e-02 3.228e-02 3.197e-02 3.160e-02 3.160e-02 3.197e-02 + 3.228e-02 3.209e-02 3.142e-02 3.059e-02 2.994e-02 2.971e-02 + 2.994e-02 3.059e-02 3.142e-02 + 3.319e-02 3.226e-02 3.088e-02 3.024e-02 3.088e-02 3.226e-02 + 3.319e-02 3.290e-02 3.169e-02 3.043e-02 2.971e-02 2.971e-02 + 3.043e-02 3.169e-02 3.290e-02 + 3.124e-02 2.787e-02 2.546e-02 2.546e-02 2.787e-02 3.124e-02 + 3.336e-02 3.322e-02 3.177e-02 3.043e-02 2.994e-02 3.043e-02 + 3.177e-02 3.322e-02 3.336e-02 + 2.463e-02 1.985e-02 1.806e-02 1.985e-02 2.463e-02 3.016e-02 + 3.332e-02 3.322e-02 3.169e-02 3.059e-02 3.059e-02 3.169e-02 + 3.322e-02 3.332e-02 3.016e-02 + 1.644e-02 1.268e-02 1.268e-02 1.644e-02 2.329e-02 3.016e-02 + 3.336e-02 3.290e-02 3.142e-02 3.078e-02 3.142e-02 3.290e-02 + 3.336e-02 3.016e-02 2.329e-02 + 5.807e-03 5.807e-03 9.080e-03 1.644e-02 2.596e-02 3.227e-02 + 3.332e-02 3.208e-02 3.140e-02 3.208e-02 3.332e-02 3.227e-02 + 2.596e-02 1.644e-02 9.080e-03 + 5.807e-03 7.373e-03 1.268e-02 2.154e-02 2.979e-02 3.303e-02 + 3.236e-02 3.117e-02 3.117e-02 3.236e-02 3.303e-02 2.979e-02 + 2.154e-02 1.268e-02 7.373e-03 + 9.080e-03 1.268e-02 1.985e-02 2.787e-02 3.226e-02 3.228e-02 + 3.081e-02 3.012e-02 3.081e-02 3.228e-02 3.226e-02 2.787e-02 + 1.985e-02 1.268e-02 9.080e-03 + 1.644e-02 2.154e-02 2.787e-02 3.186e-02 3.208e-02 3.046e-02 + 2.921e-02 2.921e-02 3.046e-02 3.208e-02 3.186e-02 2.787e-02 + 2.154e-02 1.644e-02 1.461e-02 + 2.596e-02 2.979e-02 3.226e-02 3.208e-02 3.030e-02 2.866e-02 + 2.806e-02 2.866e-02 3.030e-02 3.208e-02 3.226e-02 2.979e-02 + 2.596e-02 2.329e-02 2.329e-02 + 3.227e-02 3.303e-02 3.228e-02 3.046e-02 2.866e-02 2.765e-02 + 2.765e-02 2.866e-02 3.046e-02 3.228e-02 3.303e-02 3.227e-02 + 3.085e-02 3.016e-02 3.085e-02 + 3.332e-02 3.236e-02 3.081e-02 2.921e-02 2.806e-02 2.765e-02 + 2.806e-02 2.921e-02 3.081e-02 3.236e-02 3.332e-02 3.352e-02 + 3.336e-02 3.336e-02 3.352e-02 + 3.208e-02 3.117e-02 3.012e-02 2.921e-02 2.866e-02 2.866e-02 + 2.921e-02 3.012e-02 3.117e-02 3.208e-02 3.267e-02 3.290e-02 + 3.293e-02 3.290e-02 3.267e-02 + 3.140e-02 3.117e-02 3.081e-02 3.046e-02 3.030e-02 3.046e-02 + 3.081e-02 3.117e-02 3.140e-02 3.148e-02 3.142e-02 3.132e-02 + 3.132e-02 3.142e-02 3.148e-02 + 3.208e-02 3.236e-02 3.228e-02 3.208e-02 3.208e-02 3.228e-02 + 3.236e-02 3.208e-02 3.148e-02 3.078e-02 3.022e-02 3.001e-02 + 3.022e-02 3.078e-02 3.148e-02 + 3.332e-02 3.303e-02 3.226e-02 3.186e-02 3.226e-02 3.303e-02 + 3.332e-02 3.267e-02 3.142e-02 3.022e-02 2.953e-02 2.953e-02 + 3.022e-02 3.142e-02 3.267e-02 + 3.227e-02 2.979e-02 2.787e-02 2.787e-02 2.979e-02 3.227e-02 + 3.352e-02 3.290e-02 3.132e-02 3.001e-02 2.953e-02 3.001e-02 + 3.132e-02 3.290e-02 3.352e-02 + 2.596e-02 2.154e-02 1.985e-02 2.154e-02 2.596e-02 3.085e-02 + 3.336e-02 3.293e-02 3.132e-02 3.022e-02 3.022e-02 3.132e-02 + 3.293e-02 3.336e-02 3.085e-02 + 1.644e-02 1.268e-02 1.268e-02 1.644e-02 2.329e-02 3.016e-02 + 3.336e-02 3.290e-02 3.142e-02 3.078e-02 3.142e-02 3.290e-02 + 3.336e-02 3.016e-02 2.329e-02 + 9.080e-03 7.373e-03 9.080e-03 1.461e-02 2.329e-02 3.085e-02 + 3.352e-02 3.267e-02 3.148e-02 3.148e-02 3.267e-02 3.352e-02 + 3.085e-02 2.329e-02 1.461e-02 diff --git a/tests/07_OFDFT/33_OF_out_chg/result.ref b/tests/07_OFDFT/33_OF_out_chg/result.ref new file mode 100644 index 0000000000..9ab70af1b8 --- /dev/null +++ b/tests/07_OFDFT/33_OF_out_chg/result.ref @@ -0,0 +1,7 @@ +etotref -57.93385514279165 +etotperatomref -57.9338551428 +pointgroupref O_h +spacegroupref O_h +chg.cube_pass 0 +nksibzref 1 +totaltimeref 0.34 diff --git a/tests/07_OFDFT/CASES_CPU.txt b/tests/07_OFDFT/CASES_CPU.txt index e94290c382..a6e6110ca3 100644 --- a/tests/07_OFDFT/CASES_CPU.txt +++ b/tests/07_OFDFT/CASES_CPU.txt @@ -30,3 +30,4 @@ 30_TDOFDFT_Al 31_TDOFDFT_Al_CD 32_TDOFDFT_Al_mCD +33_OF_out_chg diff --git a/tests/08_EXX/06_KP_MD_HSE/INPUT b/tests/08_EXX/06_KP_MD_HSE/INPUT index 61dc49d3ea..327d987f4c 100644 --- a/tests/08_EXX/06_KP_MD_HSE/INPUT +++ b/tests/08_EXX/06_KP_MD_HSE/INPUT @@ -28,7 +28,7 @@ mixing_beta 0.4 #Parameters (9.Molecular dynamics) md_type nve -md_nstep 2 +md_nstep 3 md_dt 1 md_tfirst 300 diff --git a/tests/08_EXX/12_KP_OXC/vxck2_nao.txt.ref b/tests/08_EXX/12_KP_OXC/vxck2_nao.txt.ref index 6730bdcb9b..ff015bac04 100644 --- a/tests/08_EXX/12_KP_OXC/vxck2_nao.txt.ref +++ b/tests/08_EXX/12_KP_OXC/vxck2_nao.txt.ref @@ -1,6 +1,19 @@ -6 (-1.0452169,1.2123838e-15) (4.9059386e-11,1.4179809e-15) (-0.00019949431,-2.2604179e-17) (-2.2290933e-10,-1.8623075e-17) (-1.1384613e-11,-6.5945089e-18) (-2.7169425e-11,-6.6468877e-24) - (-1.0970771,-2.3647759e-15) (2.3737271e-11,-2.6964156e-19) (-3.3538934e-11,-1.2422321e-24) (-0.000365275,-3.0685935e-17) (3.0494717e-11,1.4798433e-16) - (-1.1051481,1.1617971e-15) (2.667783e-10,-3.3313604e-17) (-2.1070688e-10,-1.4118254e-15) (-1.2088768e-12,-7.0485115e-22) - (-1.1046712,1.1602589e-15) (1.2991642e-12,-6.9476958e-22) (2.3448149e-10,1.4093508e-15) - (-0.80125376,-1.73914e-15) (-9.4467851e-11,3.7782225e-17) - (-0.80058031,-1.7305258e-15) +#------------------------------------------------------------------------ +# ionic step 0 +# filename OUT.autotest/vxck2_nao.txt +# gamma only 0 +# rows 6 +# columns 6 +#------------------------------------------------------------------------ +Row 1 + (-1.04521692e+00,1.21238377e-15) (-2.94170695e-11,1.41798087e-15) (-1.99490049e-04,-2.26049394e-17) (2.79409680e-10,-1.86234457e-17) (-1.03725452e-10,-6.59450471e-18) (-4.06431774e-12,1.49751217e-23) +Row 2 + (-1.09707710e+00,-2.36477591e-15) (1.01850879e-10,-2.69600684e-19) (-5.02033582e-12,9.26336605e-24) (-3.65275222e-04,-3.06863320e-17) (-3.82248902e-11,1.47984502e-16) +Row 3 + (-1.10514811e+00,1.16179705e-15) (-3.34409897e-10,-3.33120847e-17) (2.31186850e-10,-1.41182530e-15) (-1.79607311e-13,8.86811471e-22) +Row 4 + (-1.10467119e+00,1.16025891e-15) (1.96365784e-13,8.74104627e-22) (-3.08273934e-10,1.40935092e-15) +Row 5 + (-8.01253751e-01,-1.73913949e-15) (1.18411485e-10,3.77818493e-17) +Row 6 + (-8.00580320e-01,-1.73052617e-15) diff --git a/tests/09_DeePKS/102_NO_GO_deepks_scf/INPUT b/tests/09_DeePKS/01_NO_GO_deepks_scf/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_scf/INPUT rename to tests/09_DeePKS/01_NO_GO_deepks_scf/INPUT diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/KPT b/tests/09_DeePKS/01_NO_GO_deepks_scf/KPT similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/KPT rename to tests/09_DeePKS/01_NO_GO_deepks_scf/KPT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_scf/README b/tests/09_DeePKS/01_NO_GO_deepks_scf/README similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_scf/README rename to tests/09_DeePKS/01_NO_GO_deepks_scf/README diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/STRU b/tests/09_DeePKS/01_NO_GO_deepks_scf/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/STRU rename to tests/09_DeePKS/01_NO_GO_deepks_scf/STRU diff --git a/tests/09_DeePKS/102_NO_GO_deepks_scf/result.ref b/tests/09_DeePKS/01_NO_GO_deepks_scf/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_scf/result.ref rename to tests/09_DeePKS/01_NO_GO_deepks_scf/result.ref diff --git a/tests/09_DeePKS/102_NO_KP_deepks_scf/INPUT b/tests/09_DeePKS/02_NO_KP_deepks_scf/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_scf/INPUT rename to tests/09_DeePKS/02_NO_KP_deepks_scf/INPUT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/KPT b/tests/09_DeePKS/02_NO_KP_deepks_scf/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/KPT rename to tests/09_DeePKS/02_NO_KP_deepks_scf/KPT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_scf/README b/tests/09_DeePKS/02_NO_KP_deepks_scf/README similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_scf/README rename to tests/09_DeePKS/02_NO_KP_deepks_scf/README diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/STRU b/tests/09_DeePKS/02_NO_KP_deepks_scf/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/STRU rename to tests/09_DeePKS/02_NO_KP_deepks_scf/STRU diff --git a/tests/09_DeePKS/102_NO_KP_deepks_scf/result.ref b/tests/09_DeePKS/02_NO_KP_deepks_scf/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_scf/result.ref rename to tests/09_DeePKS/02_NO_KP_deepks_scf/result.ref diff --git a/tests/09_DeePKS/102_NO_GO_deepks_md/INPUT b/tests/09_DeePKS/03_NO_GO_deepks_md/INPUT similarity index 97% rename from tests/09_DeePKS/102_NO_GO_deepks_md/INPUT rename to tests/09_DeePKS/03_NO_GO_deepks_md/INPUT index 76cb63f2e1..8cb1526c4a 100644 --- a/tests/09_DeePKS/102_NO_GO_deepks_md/INPUT +++ b/tests/09_DeePKS/03_NO_GO_deepks_md/INPUT @@ -35,7 +35,7 @@ cal_force 1 cal_stress 1 md_type nvt -md_nstep 1 +md_nstep 2 md_dt 1 md_tfirst 300 md_tfreq 0.025 diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/KPT b/tests/09_DeePKS/03_NO_GO_deepks_md/KPT similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/KPT rename to tests/09_DeePKS/03_NO_GO_deepks_md/KPT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_md/README b/tests/09_DeePKS/03_NO_GO_deepks_md/README similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_md/README rename to tests/09_DeePKS/03_NO_GO_deepks_md/README diff --git a/tests/09_DeePKS/102_NO_GO_deepks_md/STRU b/tests/09_DeePKS/03_NO_GO_deepks_md/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_md/STRU rename to tests/09_DeePKS/03_NO_GO_deepks_md/STRU diff --git a/tests/09_DeePKS/102_NO_GO_deepks_md/result.ref b/tests/09_DeePKS/03_NO_GO_deepks_md/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_md/result.ref rename to tests/09_DeePKS/03_NO_GO_deepks_md/result.ref diff --git a/tests/09_DeePKS/102_NO_KP_deepks_md/INPUT b/tests/09_DeePKS/04_NO_KP_deepks_md/INPUT similarity index 94% rename from tests/09_DeePKS/102_NO_KP_deepks_md/INPUT rename to tests/09_DeePKS/04_NO_KP_deepks_md/INPUT index 92ddd973d0..1231091480 100644 --- a/tests/09_DeePKS/102_NO_KP_deepks_md/INPUT +++ b/tests/09_DeePKS/04_NO_KP_deepks_md/INPUT @@ -35,8 +35,8 @@ cal_stress 1 deepks_model ../Model_ProjOrb/model_lda_pbe_18.ptg md_type nvt -md_nstep 1 +md_nstep 2 md_dt 1 md_tfirst 300 md_tfreq 0.025 -md_tchain 1 \ No newline at end of file +md_tchain 1 diff --git a/tests/09_DeePKS/102_NO_KP_deepks_md/KPT b/tests/09_DeePKS/04_NO_KP_deepks_md/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_md/KPT rename to tests/09_DeePKS/04_NO_KP_deepks_md/KPT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_md/README b/tests/09_DeePKS/04_NO_KP_deepks_md/README similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_md/README rename to tests/09_DeePKS/04_NO_KP_deepks_md/README diff --git a/tests/09_DeePKS/102_NO_KP_deepks_md/STRU b/tests/09_DeePKS/04_NO_KP_deepks_md/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_md/STRU rename to tests/09_DeePKS/04_NO_KP_deepks_md/STRU diff --git a/tests/09_DeePKS/102_NO_KP_deepks_md/result.ref b/tests/09_DeePKS/04_NO_KP_deepks_md/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_md/result.ref rename to tests/09_DeePKS/04_NO_KP_deepks_md/result.ref diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/INPUT b/tests/09_DeePKS/05_NO_GO_deepks_nscf/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/INPUT rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/INPUT diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/KPT b/tests/09_DeePKS/05_NO_GO_deepks_nscf/KPT similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/KPT rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/KPT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/README b/tests/09_DeePKS/05_NO_GO_deepks_nscf/README similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/README rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/README diff --git a/tests/09_DeePKS/102_NO_GO_deepks_scf/STRU b/tests/09_DeePKS/05_NO_GO_deepks_nscf/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_scf/STRU rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/STRU diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/chg.cube b/tests/09_DeePKS/05_NO_GO_deepks_nscf/chg.cube similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/chg.cube rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/chg.cube diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/OUT.autotest/deepks_projdm.dat b/tests/09_DeePKS/05_NO_GO_deepks_nscf/deepks_projdm.dat similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/OUT.autotest/deepks_projdm.dat rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/deepks_projdm.dat diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/result.ref b/tests/09_DeePKS/05_NO_GO_deepks_nscf/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/result.ref rename to tests/09_DeePKS/05_NO_GO_deepks_nscf/result.ref diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/INPUT b/tests/09_DeePKS/06_NO_KP_deepks_nscf/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/INPUT rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/INPUT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_scf/KPT b/tests/09_DeePKS/06_NO_KP_deepks_nscf/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_scf/KPT rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/KPT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/README b/tests/09_DeePKS/06_NO_KP_deepks_nscf/README similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/README rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/README diff --git a/tests/09_DeePKS/102_NO_KP_deepks_scf/STRU b/tests/09_DeePKS/06_NO_KP_deepks_nscf/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_scf/STRU rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/STRU diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/chg.cube b/tests/09_DeePKS/06_NO_KP_deepks_nscf/chg.cube similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/chg.cube rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/chg.cube diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/OUT.autotest/deepks_projdm.dat b/tests/09_DeePKS/06_NO_KP_deepks_nscf/deepks_projdm.dat similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/OUT.autotest/deepks_projdm.dat rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/deepks_projdm.dat diff --git a/tests/09_DeePKS/102_NO_KP_deepks_nscf/result.ref b/tests/09_DeePKS/06_NO_KP_deepks_nscf/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_nscf/result.ref rename to tests/09_DeePKS/06_NO_KP_deepks_nscf/result.ref diff --git a/tests/09_DeePKS/102_NO_GO_deepks_relax/INPUT b/tests/09_DeePKS/07_NO_GO_deepks_relax/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_relax/INPUT rename to tests/09_DeePKS/07_NO_GO_deepks_relax/INPUT diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/KPT b/tests/09_DeePKS/07_NO_GO_deepks_relax/KPT similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/KPT rename to tests/09_DeePKS/07_NO_GO_deepks_relax/KPT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_relax/README b/tests/09_DeePKS/07_NO_GO_deepks_relax/README similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_relax/README rename to tests/09_DeePKS/07_NO_GO_deepks_relax/README diff --git a/tests/09_DeePKS/102_NO_GO_deepks_relax/STRU b/tests/09_DeePKS/07_NO_GO_deepks_relax/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_relax/STRU rename to tests/09_DeePKS/07_NO_GO_deepks_relax/STRU diff --git a/tests/09_DeePKS/102_NO_GO_deepks_relax/result.ref b/tests/09_DeePKS/07_NO_GO_deepks_relax/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_relax/result.ref rename to tests/09_DeePKS/07_NO_GO_deepks_relax/result.ref diff --git a/tests/09_DeePKS/102_NO_KP_deepks_relax/INPUT b/tests/09_DeePKS/08_NO_KP_deepks_relax/INPUT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_relax/INPUT rename to tests/09_DeePKS/08_NO_KP_deepks_relax/INPUT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_relax/KPT b/tests/09_DeePKS/08_NO_KP_deepks_relax/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_relax/KPT rename to tests/09_DeePKS/08_NO_KP_deepks_relax/KPT diff --git a/tests/09_DeePKS/102_NO_KP_deepks_relax/README b/tests/09_DeePKS/08_NO_KP_deepks_relax/README similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_relax/README rename to tests/09_DeePKS/08_NO_KP_deepks_relax/README diff --git a/tests/09_DeePKS/102_NO_KP_deepks_relax/STRU b/tests/09_DeePKS/08_NO_KP_deepks_relax/STRU similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_relax/STRU rename to tests/09_DeePKS/08_NO_KP_deepks_relax/STRU diff --git a/tests/09_DeePKS/102_NO_KP_deepks_relax/result.ref b/tests/09_DeePKS/08_NO_KP_deepks_relax/result.ref similarity index 100% rename from tests/09_DeePKS/102_NO_KP_deepks_relax/result.ref rename to tests/09_DeePKS/08_NO_KP_deepks_relax/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_basic/INPUT b/tests/09_DeePKS/09_NO_GO_deepks_basic/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_basic/INPUT rename to tests/09_DeePKS/09_NO_GO_deepks_basic/INPUT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_md/KPT b/tests/09_DeePKS/09_NO_GO_deepks_basic/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_md/KPT rename to tests/09_DeePKS/09_NO_GO_deepks_basic/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_basic/README b/tests/09_DeePKS/09_NO_GO_deepks_basic/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_basic/README rename to tests/09_DeePKS/09_NO_GO_deepks_basic/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_basic/STRU b/tests/09_DeePKS/09_NO_GO_deepks_basic/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_basic/STRU rename to tests/09_DeePKS/09_NO_GO_deepks_basic/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_basic/result.ref b/tests/09_DeePKS/09_NO_GO_deepks_basic/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_basic/result.ref rename to tests/09_DeePKS/09_NO_GO_deepks_basic/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_basic/INPUT b/tests/09_DeePKS/10_NO_KP_deepks_basic/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_basic/INPUT rename to tests/09_DeePKS/10_NO_KP_deepks_basic/INPUT diff --git a/tests/09_DeePKS/10_NO_KP_deepks_basic/KPT b/tests/09_DeePKS/10_NO_KP_deepks_basic/KPT new file mode 100644 index 0000000000..e769af7638 --- /dev/null +++ b/tests/09_DeePKS/10_NO_KP_deepks_basic/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 1 1 0 0 0 diff --git a/tests/09_DeePKS/103_NO_KP_deepks_basic/README b/tests/09_DeePKS/10_NO_KP_deepks_basic/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_basic/README rename to tests/09_DeePKS/10_NO_KP_deepks_basic/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_basic/STRU b/tests/09_DeePKS/10_NO_KP_deepks_basic/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_basic/STRU rename to tests/09_DeePKS/10_NO_KP_deepks_basic/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_basic/result.ref b/tests/09_DeePKS/10_NO_KP_deepks_basic/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_basic/result.ref rename to tests/09_DeePKS/10_NO_KP_deepks_basic/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap/INPUT b/tests/09_DeePKS/11_NO_GO_deepks_bandgap/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap/INPUT rename to tests/09_DeePKS/11_NO_GO_deepks_bandgap/INPUT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_nscf/KPT b/tests/09_DeePKS/11_NO_GO_deepks_bandgap/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_nscf/KPT rename to tests/09_DeePKS/11_NO_GO_deepks_bandgap/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap/README b/tests/09_DeePKS/11_NO_GO_deepks_bandgap/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap/README rename to tests/09_DeePKS/11_NO_GO_deepks_bandgap/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap/STRU b/tests/09_DeePKS/11_NO_GO_deepks_bandgap/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap/STRU rename to tests/09_DeePKS/11_NO_GO_deepks_bandgap/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap/result.ref b/tests/09_DeePKS/11_NO_GO_deepks_bandgap/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap/result.ref rename to tests/09_DeePKS/11_NO_GO_deepks_bandgap/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/INPUT b/tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/INPUT rename to tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/INPUT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_relax/KPT b/tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_relax/KPT rename to tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/README b/tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/README rename to tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/STRU b/tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/STRU rename to tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/result.ref b/tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/result.ref rename to tests/09_DeePKS/12_NO_GO_deepks_bandgap_2/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/INPUT b/tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/INPUT rename to tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/INPUT diff --git a/tests/09_DeePKS/102_NO_GO_deepks_scf/KPT b/tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/KPT similarity index 100% rename from tests/09_DeePKS/102_NO_GO_deepks_scf/KPT rename to tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/README b/tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/README rename to tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/STRU b/tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/STRU rename to tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/result.ref b/tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/result.ref rename to tests/09_DeePKS/13_NO_GO_deepks_bandgap_3/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap/INPUT b/tests/09_DeePKS/14_NO_KP_deepks_bandgap/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap/INPUT rename to tests/09_DeePKS/14_NO_KP_deepks_bandgap/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap/KPT b/tests/09_DeePKS/14_NO_KP_deepks_bandgap/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap/KPT rename to tests/09_DeePKS/14_NO_KP_deepks_bandgap/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap/README b/tests/09_DeePKS/14_NO_KP_deepks_bandgap/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap/README rename to tests/09_DeePKS/14_NO_KP_deepks_bandgap/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap/STRU b/tests/09_DeePKS/14_NO_KP_deepks_bandgap/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap/STRU rename to tests/09_DeePKS/14_NO_KP_deepks_bandgap/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap/result.ref b/tests/09_DeePKS/14_NO_KP_deepks_bandgap/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap/result.ref rename to tests/09_DeePKS/14_NO_KP_deepks_bandgap/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/INPUT b/tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/INPUT rename to tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/KPT b/tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/KPT rename to tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/README b/tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/README rename to tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/STRU b/tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/STRU rename to tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/result.ref b/tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_2/result.ref rename to tests/09_DeePKS/15_NO_KP_deepks_bandgap_2/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/INPUT b/tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/INPUT rename to tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/KPT b/tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/KPT rename to tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/README b/tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/README rename to tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/STRU b/tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/STRU rename to tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/result.ref b/tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_bandgap_3/result.ref rename to tests/09_DeePKS/16_NO_KP_deepks_bandgap_3/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/INPUT b/tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/INPUT rename to tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap/KPT b/tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap/KPT rename to tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/README b/tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/README rename to tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/STRU b/tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/STRU rename to tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/result.ref b/tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/result.ref rename to tests/09_DeePKS/17_NO_GO_deepks_vdelta_1/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/INPUT b/tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/INPUT rename to tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/KPT b/tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_2/KPT rename to tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/README b/tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/README rename to tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/STRU b/tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/STRU rename to tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/result.ref b/tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/result.ref rename to tests/09_DeePKS/18_NO_GO_deepks_vdelta_2/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/INPUT b/tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/INPUT rename to tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/KPT b/tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/KPT rename to tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/README b/tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/README rename to tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/STRU b/tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/STRU rename to tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/result.ref b/tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/result.ref rename to tests/09_DeePKS/19_NO_KP_deepks_vdelta_1/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/INPUT b/tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/INPUT rename to tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/KPT b/tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/KPT rename to tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/README b/tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/README rename to tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/STRU b/tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/STRU rename to tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/result.ref b/tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/result.ref rename to tests/09_DeePKS/20_NO_KP_deepks_vdelta_2/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/INPUT b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/INPUT rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/KPT b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_bandgap_3/KPT rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/README b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/README rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/STRU b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_1/STRU rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/deepks_hrdelta.csr.ref b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/deepks_hrdelta.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/deepks_hrdelta.csr.ref rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/deepks_hrdelta.csr.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/deepks_hrtot.csr.ref b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/deepks_hrtot.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/deepks_hrtot.csr.ref rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/deepks_hrtot.csr.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/result.ref b/tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/result.ref rename to tests/09_DeePKS/21_NO_GO_deepks_vdelta_r_1/result.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/INPUT b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/INPUT rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_basic/KPT b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_basic/KPT rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/README b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/README rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/STRU b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_2/STRU rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/deepks_hrdelta.csr.ref b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/deepks_hrdelta.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/deepks_hrdelta.csr.ref rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/deepks_hrdelta.csr.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/deepks_hrtot.csr.ref b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/deepks_hrtot.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/deepks_hrtot.csr.ref rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/deepks_hrtot.csr.ref diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/result.ref b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/result.ref similarity index 87% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/result.ref rename to tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/result.ref index 3de8b5a4c8..5678831f58 100644 --- a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/result.ref +++ b/tests/09_DeePKS/22_NO_GO_deepks_vdelta_r_2/result.ref @@ -6,6 +6,6 @@ deepks_e_label 17.126764505645642 deepks_edelta 0.09815855485768665 deepks_hr_label_pass 0 deepks_vdelta_r_pass 0 -deepks_phialpha_r 73.40481582340394 +deepks_phialpha_r 40.10770566607966 deepks_gevdm 54.0 totaltimeref 1.81 diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/INPUT b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/INPUT rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/KPT b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/KPT rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/README b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/README rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/STRU b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/STRU rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/deepks_hrdelta.csr.ref b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/deepks_hrdelta.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/deepks_hrdelta.csr.ref rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/deepks_hrdelta.csr.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/deepks_hrtot.csr.ref b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/deepks_hrtot.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/deepks_hrtot.csr.ref rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/deepks_hrtot.csr.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/result.ref b/tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_1/result.ref rename to tests/09_DeePKS/23_NO_KP_deepks_vdelta_r_1/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/INPUT b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/INPUT rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/KPT b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/KPT rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/README b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/README rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/STRU b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/STRU rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/deepks_hrdelta.csr.ref b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/deepks_hrdelta.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/deepks_hrdelta.csr.ref rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/deepks_hrdelta.csr.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/deepks_hrtot.csr.ref b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/deepks_hrtot.csr.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/deepks_hrtot.csr.ref rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/deepks_hrtot.csr.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/result.ref b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/result.ref similarity index 87% rename from tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/result.ref rename to tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/result.ref index 3fce0adcd5..b7e5a997dd 100644 --- a/tests/09_DeePKS/103_NO_KP_deepks_vdelta_r_2/result.ref +++ b/tests/09_DeePKS/24_NO_KP_deepks_vdelta_r_2/result.ref @@ -6,6 +6,6 @@ deepks_e_label 17.12676450564565 deepks_edelta 0.09815855485768665 deepks_hr_label_pass 0 deepks_vdelta_r_pass 0 -deepks_phialpha_r 73.40481582340394 +deepks_phialpha_r 40.10770566607966 deepks_gevdm 54.0 totaltimeref 1.81 diff --git a/tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/INPUT b/tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/INPUT rename to tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/KPT b/tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/KPT rename to tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/KPT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/README b/tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/README similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/README rename to tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/README diff --git a/tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/STRU b/tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/STRU rename to tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/STRU diff --git a/tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/result.ref b/tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_out_freq_elec/result.ref rename to tests/09_DeePKS/25_NO_GO_deepks_out_freq_elec/result.ref diff --git a/tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/INPUT b/tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/INPUT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/INPUT rename to tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/KPT b/tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_1/KPT rename to tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/KPT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/README b/tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/README similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/README rename to tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/README diff --git a/tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/STRU b/tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/STRU similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/STRU rename to tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/STRU diff --git a/tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/result.ref b/tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/result.ref similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/result.ref rename to tests/09_DeePKS/26_NO_KP_deepks_out_freq_elec/result.ref diff --git a/tests/09_DeePKS/104_NO_GO_deepks_out_2/INPUT b/tests/09_DeePKS/27_NO_GO_deepks_out_2/INPUT similarity index 100% rename from tests/09_DeePKS/104_NO_GO_deepks_out_2/INPUT rename to tests/09_DeePKS/27_NO_GO_deepks_out_2/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/KPT b/tests/09_DeePKS/27_NO_GO_deepks_out_2/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_2/KPT rename to tests/09_DeePKS/27_NO_GO_deepks_out_2/KPT diff --git a/tests/09_DeePKS/104_NO_GO_deepks_out_2/README b/tests/09_DeePKS/27_NO_GO_deepks_out_2/README similarity index 100% rename from tests/09_DeePKS/104_NO_GO_deepks_out_2/README rename to tests/09_DeePKS/27_NO_GO_deepks_out_2/README diff --git a/tests/09_DeePKS/104_NO_GO_deepks_out_2/STRU b/tests/09_DeePKS/27_NO_GO_deepks_out_2/STRU similarity index 100% rename from tests/09_DeePKS/104_NO_GO_deepks_out_2/STRU rename to tests/09_DeePKS/27_NO_GO_deepks_out_2/STRU diff --git a/tests/09_DeePKS/104_NO_GO_deepks_out_2/result.ref b/tests/09_DeePKS/27_NO_GO_deepks_out_2/result.ref similarity index 100% rename from tests/09_DeePKS/104_NO_GO_deepks_out_2/result.ref rename to tests/09_DeePKS/27_NO_GO_deepks_out_2/result.ref diff --git a/tests/09_DeePKS/104_NO_KP_deepks_out_2/INPUT b/tests/09_DeePKS/28_NO_KP_deepks_out_2/INPUT similarity index 100% rename from tests/09_DeePKS/104_NO_KP_deepks_out_2/INPUT rename to tests/09_DeePKS/28_NO_KP_deepks_out_2/INPUT diff --git a/tests/09_DeePKS/104_NO_KP_deepks_out_2/KPT b/tests/09_DeePKS/28_NO_KP_deepks_out_2/KPT similarity index 100% rename from tests/09_DeePKS/104_NO_KP_deepks_out_2/KPT rename to tests/09_DeePKS/28_NO_KP_deepks_out_2/KPT diff --git a/tests/09_DeePKS/104_NO_KP_deepks_out_2/README b/tests/09_DeePKS/28_NO_KP_deepks_out_2/README similarity index 100% rename from tests/09_DeePKS/104_NO_KP_deepks_out_2/README rename to tests/09_DeePKS/28_NO_KP_deepks_out_2/README diff --git a/tests/09_DeePKS/104_NO_KP_deepks_out_2/STRU b/tests/09_DeePKS/28_NO_KP_deepks_out_2/STRU similarity index 100% rename from tests/09_DeePKS/104_NO_KP_deepks_out_2/STRU rename to tests/09_DeePKS/28_NO_KP_deepks_out_2/STRU diff --git a/tests/09_DeePKS/104_NO_KP_deepks_out_2/result.ref b/tests/09_DeePKS/28_NO_KP_deepks_out_2/result.ref similarity index 100% rename from tests/09_DeePKS/104_NO_KP_deepks_out_2/result.ref rename to tests/09_DeePKS/28_NO_KP_deepks_out_2/result.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/INPUT b/tests/09_DeePKS/97_PW_ORB_deepks_s/INPUT similarity index 79% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/INPUT rename to tests/09_DeePKS/97_PW_ORB_deepks_s/INPUT index 9f8840ad7b..c0676b867b 100644 --- a/tests/09_DeePKS/101_PW_ORB_deepks_s/INPUT +++ b/tests/09_DeePKS/97_PW_ORB_deepks_s/INPUT @@ -9,16 +9,16 @@ symmetry 0 #Parameters (2.Iteration) ecutwfc 20 -scf_thr 1e-8 -scf_nmax 50 +scf_thr 1e-8 +scf_nmax 50 #Parameters (3.Basis) basis_type pw gamma_only 1 #Parameters (4.Smearing) -smearing_method gaussian -smearing_sigma 0.1 +smearing_method gaussian +smearing_sigma 0.1 #Parameters (5.Mixing) mixing_type broyden diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/KPT b/tests/09_DeePKS/97_PW_ORB_deepks_s/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_1/KPT rename to tests/09_DeePKS/97_PW_ORB_deepks_s/KPT diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/README b/tests/09_DeePKS/97_PW_ORB_deepks_s/README similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/README rename to tests/09_DeePKS/97_PW_ORB_deepks_s/README diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/STRU b/tests/09_DeePKS/97_PW_ORB_deepks_s/STRU similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/STRU rename to tests/09_DeePKS/97_PW_ORB_deepks_s/STRU diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/descriptor.dat.ref b/tests/09_DeePKS/97_PW_ORB_deepks_s/descriptor.dat.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/descriptor.dat.ref rename to tests/09_DeePKS/97_PW_ORB_deepks_s/descriptor.dat.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/jle.orb.ref b/tests/09_DeePKS/97_PW_ORB_deepks_s/jle.orb.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/jle.orb.ref rename to tests/09_DeePKS/97_PW_ORB_deepks_s/jle.orb.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/result.ref b/tests/09_DeePKS/97_PW_ORB_deepks_s/result.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/result.ref rename to tests/09_DeePKS/97_PW_ORB_deepks_s/result.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/INPUT b/tests/09_DeePKS/98_PW_ORB_deepks_p/INPUT similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/INPUT rename to tests/09_DeePKS/98_PW_ORB_deepks_p/INPUT diff --git a/tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/KPT b/tests/09_DeePKS/98_PW_ORB_deepks_p/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_GO_deepks_vdelta_r_2/KPT rename to tests/09_DeePKS/98_PW_ORB_deepks_p/KPT diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/README b/tests/09_DeePKS/98_PW_ORB_deepks_p/README similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/README rename to tests/09_DeePKS/98_PW_ORB_deepks_p/README diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/STRU b/tests/09_DeePKS/98_PW_ORB_deepks_p/STRU similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/STRU rename to tests/09_DeePKS/98_PW_ORB_deepks_p/STRU diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/descriptor.dat.ref b/tests/09_DeePKS/98_PW_ORB_deepks_p/descriptor.dat.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/descriptor.dat.ref rename to tests/09_DeePKS/98_PW_ORB_deepks_p/descriptor.dat.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/jle.orb.ref b/tests/09_DeePKS/98_PW_ORB_deepks_p/jle.orb.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/jle.orb.ref rename to tests/09_DeePKS/98_PW_ORB_deepks_p/jle.orb.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/result.ref b/tests/09_DeePKS/98_PW_ORB_deepks_p/result.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/result.ref rename to tests/09_DeePKS/98_PW_ORB_deepks_p/result.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/INPUT b/tests/09_DeePKS/99_PW_ORB_deepks_d/INPUT similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/INPUT rename to tests/09_DeePKS/99_PW_ORB_deepks_d/INPUT diff --git a/tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/KPT b/tests/09_DeePKS/99_PW_ORB_deepks_d/KPT similarity index 100% rename from tests/09_DeePKS/103_NO_KP_deepks_out_freq_elec/KPT rename to tests/09_DeePKS/99_PW_ORB_deepks_d/KPT diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_s/README b/tests/09_DeePKS/99_PW_ORB_deepks_d/README similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_s/README rename to tests/09_DeePKS/99_PW_ORB_deepks_d/README diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_p/STRU b/tests/09_DeePKS/99_PW_ORB_deepks_d/STRU similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_p/STRU rename to tests/09_DeePKS/99_PW_ORB_deepks_d/STRU diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/descriptor.dat.ref b/tests/09_DeePKS/99_PW_ORB_deepks_d/descriptor.dat.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/descriptor.dat.ref rename to tests/09_DeePKS/99_PW_ORB_deepks_d/descriptor.dat.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/jle.orb.ref b/tests/09_DeePKS/99_PW_ORB_deepks_d/jle.orb.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/jle.orb.ref rename to tests/09_DeePKS/99_PW_ORB_deepks_d/jle.orb.ref diff --git a/tests/09_DeePKS/101_PW_ORB_deepks_d/result.ref b/tests/09_DeePKS/99_PW_ORB_deepks_d/result.ref similarity index 100% rename from tests/09_DeePKS/101_PW_ORB_deepks_d/result.ref rename to tests/09_DeePKS/99_PW_ORB_deepks_d/result.ref diff --git a/tests/09_DeePKS/CASES1 b/tests/09_DeePKS/CASES1 index e22d970cbd..217c3b26c8 100644 --- a/tests/09_DeePKS/CASES1 +++ b/tests/09_DeePKS/CASES1 @@ -1,2 +1,2 @@ -100_NO_GO_deepks_UT -100_NO_KP_deepks_UT \ No newline at end of file +NO_GO_deepks_UT +NO_KP_deepks_UT diff --git a/tests/09_DeePKS/CASES_CPU.txt b/tests/09_DeePKS/CASES_CPU.txt index e90fd05bef..6d0393047d 100644 --- a/tests/09_DeePKS/CASES_CPU.txt +++ b/tests/09_DeePKS/CASES_CPU.txt @@ -1,31 +1,28 @@ -#101_PW_ORB_deepks_s -#101_PW_ORB_deepks_p -#101_PW_ORB_deepks_d -102_NO_GO_deepks_scf -102_NO_KP_deepks_scf -102_NO_GO_deepks_md -102_NO_KP_deepks_md -102_NO_GO_deepks_nscf -102_NO_KP_deepks_nscf -102_NO_GO_deepks_relax -102_NO_KP_deepks_relax -103_NO_GO_deepks_basic -103_NO_KP_deepks_basic -103_NO_GO_deepks_bandgap -103_NO_GO_deepks_bandgap_2 -103_NO_GO_deepks_bandgap_3 -103_NO_KP_deepks_bandgap -103_NO_KP_deepks_bandgap_2 -103_NO_KP_deepks_bandgap_3 -103_NO_GO_deepks_vdelta_1 -103_NO_KP_deepks_vdelta_1 -103_NO_GO_deepks_vdelta_2 -103_NO_KP_deepks_vdelta_2 -103_NO_GO_deepks_vdelta_r_1 -103_NO_KP_deepks_vdelta_r_1 -103_NO_GO_deepks_vdelta_r_2 -103_NO_KP_deepks_vdelta_r_2 -103_NO_GO_deepks_out_freq_elec -103_NO_KP_deepks_out_freq_elec -104_NO_GO_deepks_out_2 -104_NO_KP_deepks_out_2 \ No newline at end of file +01_NO_GO_deepks_scf +02_NO_KP_deepks_scf +03_NO_GO_deepks_md +04_NO_KP_deepks_md +05_NO_GO_deepks_nscf +06_NO_KP_deepks_nscf +07_NO_GO_deepks_relax +08_NO_KP_deepks_relax +09_NO_GO_deepks_basic +10_NO_KP_deepks_basic +11_NO_GO_deepks_bandgap +12_NO_GO_deepks_bandgap_2 +13_NO_GO_deepks_bandgap_3 +14_NO_KP_deepks_bandgap +15_NO_KP_deepks_bandgap_2 +16_NO_KP_deepks_bandgap_3 +17_NO_GO_deepks_vdelta_1 +18_NO_GO_deepks_vdelta_2 +19_NO_KP_deepks_vdelta_1 +20_NO_KP_deepks_vdelta_2 +21_NO_GO_deepks_vdelta_r_1 +22_NO_GO_deepks_vdelta_r_2 +23_NO_KP_deepks_vdelta_r_1 +24_NO_KP_deepks_vdelta_r_2 +25_NO_GO_deepks_out_freq_elec +26_NO_KP_deepks_out_freq_elec +27_NO_GO_deepks_out_2 +28_NO_KP_deepks_out_2 diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/E_delta_bands_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/E_delta_bands_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/E_delta_bands_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/E_delta_bands_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/E_delta_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/E_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/E_delta_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/E_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/F_delta_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/F_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/F_delta_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/F_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/INPUT b/tests/09_DeePKS/NO_GO_deepks_UT/INPUT similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/INPUT rename to tests/09_DeePKS/NO_GO_deepks_UT/INPUT diff --git a/tests/09_DeePKS/104_NO_GO_deepks_out_2/KPT b/tests/09_DeePKS/NO_GO_deepks_UT/KPT similarity index 100% rename from tests/09_DeePKS/104_NO_GO_deepks_out_2/KPT rename to tests/09_DeePKS/NO_GO_deepks_UT/KPT diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/STRU b/tests/09_DeePKS/NO_GO_deepks_UT/STRU similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/STRU rename to tests/09_DeePKS/NO_GO_deepks_UT/STRU diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/S_I_mu_alpha_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/S_I_mu_alpha_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/S_I_mu_alpha_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/S_I_mu_alpha_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/descriptor_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/descriptor_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/descriptor_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/descriptor_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/dm b/tests/09_DeePKS/NO_GO_deepks_UT/dm similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/dm rename to tests/09_DeePKS/NO_GO_deepks_UT/dm diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_x_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_x_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_x_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_x_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_y_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_y_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_y_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_y_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_z_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_z_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/dphialpha_z_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/dphialpha_z_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/gdmepsl_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/gdmepsl_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/gdmepsl_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/gdmepsl_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/gdmx_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/gdmx_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/gdmx_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/gdmx_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/gedm_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/gedm_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/gedm_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/gedm_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/gvepsl_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/gvepsl_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/gvepsl_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/gvepsl_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/gvx_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/gvx_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/gvx_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/gvx_ref.dat diff --git a/tests/09_DeePKS/NO_GO_deepks_UT/iRmat_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/iRmat_ref.dat new file mode 100644 index 0000000000..af12828313 --- /dev/null +++ b/tests/09_DeePKS/NO_GO_deepks_UT/iRmat_ref.dat @@ -0,0 +1,125 @@ +0 0 0 +0 1 0 +0 1 1 +1 1 0 +0 1 1 +0 2 0 +0 0 0 +0 0 1 +1 0 0 +0 0 1 +0 2 2 +0 0 2 +0 0 0 +1 0 2 +0 0 0 +2 2 0 +2 0 0 +2 0 1 +0 0 0 +2 0 1 +0 2 2 +0 0 2 +0 0 0 +1 0 2 +0 0 0 +0 0 0 +0 1 0 +0 1 1 +1 1 0 +0 1 1 +0 2 0 +0 0 0 +0 0 1 +1 0 0 +0 0 1 +0 2 2 +0 0 2 +0 0 0 +1 0 2 +0 0 0 +2 2 0 +2 0 0 +2 0 1 +0 0 0 +2 0 1 +0 2 2 +0 0 2 +0 0 0 +1 0 2 +0 0 0 +0 0 0 +0 1 0 +0 1 1 +0 1 1 +1 1 0 +0 2 0 +0 0 0 +0 0 1 +0 0 1 +1 0 0 +0 2 2 +0 0 2 +0 0 0 +0 0 0 +1 0 2 +0 2 2 +0 0 2 +0 0 0 +0 0 0 +1 0 2 +2 2 0 +2 0 0 +2 0 1 +2 0 1 +0 0 0 +0 0 0 +0 0 1 +0 0 1 +1 0 0 +0 2 0 +0 0 2 +0 0 0 +0 0 0 +1 0 2 +0 2 2 +0 0 2 +0 0 0 +0 0 0 +1 0 2 +0 2 2 +2 0 0 +2 0 1 +2 0 1 +0 0 0 +2 2 0 +0 1 0 +0 1 1 +0 1 1 +1 1 0 +0 0 0 +0 0 0 +0 1 1 +0 1 1 +1 1 0 +0 1 0 +0 2 2 +0 0 0 +0 0 0 +1 0 2 +0 0 2 +0 2 2 +0 0 0 +0 0 0 +1 0 2 +0 0 2 +2 2 0 +2 0 1 +2 0 1 +0 0 0 +2 0 0 +0 2 0 +0 0 1 +0 0 1 +1 0 0 +0 0 0 diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/jle.orb b/tests/09_DeePKS/NO_GO_deepks_UT/jle.orb similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/jle.orb rename to tests/09_DeePKS/NO_GO_deepks_UT/jle.orb diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/model.ptg b/tests/09_DeePKS/NO_GO_deepks_UT/model.ptg similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/model.ptg rename to tests/09_DeePKS/NO_GO_deepks_UT/model.ptg diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/o_delta_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/o_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/o_delta_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/o_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/orbpre_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/orbpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/orbpre_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/orbpre_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/pdm_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/pdm_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/pdm_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/pdm_ref.dat diff --git a/tests/09_DeePKS/NO_GO_deepks_UT/phialpha_r_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/phialpha_r_ref.dat new file mode 100644 index 0000000000..20267a8218 --- /dev/null +++ b/tests/09_DeePKS/NO_GO_deepks_UT/phialpha_r_ref.dat @@ -0,0 +1,200 @@ +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.3164811566 -0.1534527887 -0.08570920339 0.1156008495 0.2071111386 0.04376523785 -0.05902865122 -0.1057560668 -0.04843479778 -0.03999389619 -0.07165329159 -0.05960192152 0.09664284637 0.02577082509 0.02127965328 0.03812474768 0.0317125448 -0.05142100316 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.3322570668 -0.1586938262 -0.0903368452 0.120593251 -0.2161250816 0.04535098 -0.06054032659 0.1084992976 -0.05005969208 -0.0420453347 0.07535290178 -0.06207471837 -0.1005907542 0.02610664785 0.02192707748 -0.03929731865 0.0323726085 0.05245912008 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.4114648095 -0.1794735013 0.3147366589 0.00616018533 0.0008881864795 -0.1415856307 -0.00277118569 -0.0003995544826 0.1812524527 0.00614576416 0.0008861072096 5.889370801e-05 1.73433392e-05 -0.08212807954 -0.00278473367 -0.0004015078544 -2.66855817e-05 -7.858515125e-06 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.2888131094 -0.1435047394 -0.07183317419 -0.2203678974 6.227069716e-05 0.03767474148 0.1155775679 -3.265945635e-05 -0.04849447325 0.06953694541 -1.964947762e-05 0.1066617855 -6.028014379e-05 0.02659435774 -0.03813404454 1.077576891e-05 -0.05849329812 3.30576167e-05 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8170531799 -0.247178539 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.8150193757 0 0 0.02256967339 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.8150193757 0 0 0.02256967339 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0.8150193757 0 0 0.02256967339 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1150935953 -0.06410311347 -0.07219303423 0.02672869898 0.04955194699 0.04282914818 -0.01585703416 -0.0293971254 0.02212911648 -0.02039197394 -0.03780438443 -0.009199155668 0.0139966691 -0.01369969442 0.01262426414 0.02340394 0.005695013702 -0.008665058534 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1192926978 -0.06631180479 -0.07548975067 0.02728433166 -0.05095474957 0.04467427619 -0.0161466657 0.03015464398 0.02373719934 -0.02102182856 0.03925923579 -0.009450806053 -0.01418950255 -0.01465640929 0.01297981784 -0.02424040932 0.005835350652 0.008761233963 +0.4396940853 -0.1615590582 -0.2875027763 -0.005627149984 -0.0008113324951 0.1066242109 0.002086903071 0.0003008933973 0.101011939 0.003425032573 0.0004938272893 3.282144628e-05 9.665437873e-06 -0.03734667878 -0.001266321512 -0.0001825804883 -1.213492211e-05 -3.57355781e-06 +0.5744883648 -0.1122607916 -0.264174326 -0.01109747707 -0.001600053986 -0.001574581052 0.002595663622 0.0003742473986 0.0933320631 0.008411901177 0.001212842876 0.0001308736388 3.854038041e-05 0.04085026979 -0.0009523410587 -0.000137310228 -3.151678617e-05 -9.281234472e-06 +0.0112441773 -0.002197225083 -0.01109747707 0.3026016138 -3.131706718e-05 0.002595663622 -0.1341416212 7.324959673e-06 0.01091173032 -0.267721887 3.854038041e-05 -0.005242658682 -0.0007555108486 -0.003247473646 0.1193145981 -9.281234472e-06 0.002335928811 0.0003367056548 +0.001621205486 -0.0003167998213 -0.001600053986 -3.131706718e-05 0.3028143039 0.0003742473986 7.324959673e-06 -0.1341913688 0.001573272688 3.854038041e-05 -0.2679836342 0.0007566345057 -0.005245111447 -0.0004682265274 -9.281234472e-06 0.1193776317 -0.0003369762521 0.002336519482 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1059639845 -0.05925714388 -0.06358704877 -0.05471114836 -0.0001147382641 0.03792215417 0.03262872933 6.842780449e-05 0.01683755767 0.03983957875 8.355014007e-05 0.01713917818 7.188765948e-05 -0.01048499156 -0.02480868396 -5.202788496e-05 -0.01067281503 -4.476548901e-05 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.083970075 -0.04734479653 -0.0005828940149 0.05700333953 0.03215589146 0.000351764923 -0.03440037954 -0.01940543975 -0.01774617636 -0.0004769440117 -0.000269046691 0.01589994474 0.02631106082 0.01121348344 0.0003013721755 0.0001700056706 -0.01004688353 -0.01662547687 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.08767473994 -0.04937413925 -0.0003705339936 0.05996259465 -0.03321317421 0.0002231864639 -0.03611771037 0.02000553535 -0.01867033849 -0.0003058479934 0.000169408658 0.0171547553 -0.02741498179 0.01176822392 0.0001927810615 -0.0001067810861 -0.01081292671 0.01728011759 +0.3230572918 -0.1446202823 0.07747822275 0.237685627 -6.716427333e-05 -0.03466476827 -0.1063436523 3.005017266e-05 -0.04188394327 0.0600580083 -1.69709567e-05 0.09212217131 -5.206304871e-05 0.01791384367 -0.02568692648 7.258511056e-06 -0.03940083111 2.226746678e-05 +-0.146857873 0.05155932492 0.1452936884 -0.144083087 4.071443426e-05 -0.07923392798 0.05857215097 -1.655108896e-05 0.102011228 0.1100781004 -3.110543838e-05 -0.0865347701 4.890531656e-05 -0.0508813716 -0.06407838456 1.810701888e-05 0.03822967435 -2.160558495e-05 +-0.4505266692 0.1581723229 -0.144083087 -0.2497538998 0.0001249026564 0.05857215097 0.08135943147 -5.077498963e-05 0.02457218512 -0.1187977918 4.890531656e-05 -0.09897559591 0.0001029833556 -0.001936895948 0.04744750208 -2.160558495e-05 0.02827818753 -4.113126096e-05 +0.0001273080612 -4.469571537e-05 4.071443426e-05 0.0001249026564 0.1922603193 -1.655108896e-05 -5.077498963e-05 -0.09832663799 -6.943511807e-06 4.890531656e-05 0.05427174835 0.0001220622787 0.1664934233 5.473204692e-07 -2.160558495e-05 -0.02901184662 -5.829029298e-05 -0.0890017699 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1059639845 -0.05925714388 0.06358704877 0.05471114836 0.0001147382641 -0.03792215417 -0.03262872933 -6.842780449e-05 0.01683755767 0.03983957875 8.355014007e-05 0.01713917818 7.188765948e-05 -0.01048499156 -0.02480868396 -5.202788496e-05 -0.01067281503 -4.476548901e-05 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.09289685966 -0.05221929161 0.0002685632109 -0.000570033376 -0.07291767165 -0.0001613215545 0.0003424097814 0.04380045987 -0.01997563887 -1.99231389e-06 -0.0002548533054 -0.03459553134 0.0005409336953 0.01254696941 1.251399347e-06 0.000160076814 0.02172992194 -0.0003397677827 +0.3508189026 -0.1500864749 0.08914085147 -0.1202293073 -0.2154035099 -0.03795971177 0.05119840989 0.09172736198 -0.03814920318 -0.03150080814 -0.05643702679 -0.04694488092 0.07611980955 0.01534048149 0.01266704214 0.02269434464 0.01887738188 -0.03060914599 +-0.1706457715 0.05466627924 0.1565431659 0.08031206029 0.1438875434 -0.08537396789 -0.03001504274 -0.05377512106 0.1188507876 -0.05554711773 -0.09951853164 0.05139868212 -0.08334152344 -0.05683263389 0.03267010273 0.05853194161 -0.02080802258 0.03373962581 +0.2301596021 -0.0737315022 0.08031206029 0.1077670091 -0.1940692666 -0.03001504274 -0.06714484484 0.07252954677 -0.004352982816 0.02023740889 -0.08334152344 -0.1593608109 -0.04890248224 -0.004116710019 -0.01574247999 0.03373962581 0.07469759414 0.03804075672 +0.4123552504 -0.1320977781 0.1438875434 -0.1940692666 -0.131607174 -0.05377512106 0.07252954677 0.02231651763 -0.007798828739 -0.08334152344 -0.08255995535 0.03710808178 0.1113532806 -0.007375521054 0.03373962581 0.02587356517 -0.0332659621 -0.0348971405 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1150935953 -0.06410311347 0.07219303423 -0.02672869898 -0.04955194699 -0.04282914818 0.01585703416 0.0293971254 0.02212911648 -0.02039197394 -0.03780438443 -0.009199155668 0.0139966691 -0.01369969442 0.01262426414 0.02340394 0.005695013702 -0.008665058534 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.083970075 -0.04734479653 0.0005828940149 -0.05700333953 -0.03215589146 -0.000351764923 0.03440037954 0.01940543975 -0.01774617636 -0.0004769440117 -0.000269046691 0.01589994474 0.02631106082 0.01121348344 0.0003013721755 0.0001700056706 -0.01004688353 -0.01662547687 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.09289685966 -0.05221929161 -0.0002685632109 0.000570033376 0.07291767165 0.0001613215545 -0.0003424097814 -0.04380045987 -0.01997563887 -1.99231389e-06 -0.0002548533054 -0.03459553134 0.0005409336953 0.01254696941 1.251399347e-06 0.000160076814 0.02172992194 -0.0003397677827 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.3662277175 -0.1526733097 0.09197392871 -0.1227786408 0.2200416984 -0.03811860367 0.05088561957 -0.09119630325 -0.03733268828 -0.03135587353 0.0561954394 -0.04629305564 -0.07501690712 0.01455628605 0.01222588261 -0.02191100958 0.0180499983 0.02924963641 +-0.1772065705 0.05345772271 0.1678497891 0.08293590189 -0.1486362497 -0.09072180452 -0.0293105681 0.05252987935 0.1253013898 -0.05959116734 0.1067982313 0.05297278213 0.08584126111 -0.05821576032 0.03477040377 -0.06231489983 -0.02021050449 -0.03275069052 +0.2365581439 -0.07136225042 0.08293590189 0.1192638574 0.1984188016 -0.0293105681 -0.07355093851 -0.07012364566 -0.001907026722 0.02362039255 0.08584126111 -0.1661863379 0.05651026729 -0.006220721217 -0.0180271203 -0.03275069052 0.07543925459 -0.04312872381 +-0.4239553023 0.1278941572 -0.1486362497 0.1984188016 -0.1256252743 0.05252987935 -0.07012364566 0.01299589353 0.003417739406 0.08584126111 -0.0823251717 -0.04436826569 0.1098982377 0.01114866603 -0.03275069052 0.02239388869 0.03849623203 -0.02989424561 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.1192926978 -0.06631180479 0.07548975067 -0.02728433166 0.05095474957 -0.04467427619 0.0161466657 -0.03015464398 0.02373719934 -0.02102182856 0.03925923579 -0.009450806053 -0.01418950255 -0.01465640929 0.01297981784 -0.02424040932 0.005835350652 0.008761233963 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.08767473994 -0.04937413925 0.0003705339936 -0.05996259465 0.03321317421 -0.0002231864639 0.03611771037 -0.02000553535 -0.01867033849 -0.0003058479934 0.000169408658 0.0171547553 -0.02741498179 0.01176822392 0.0001927810615 -0.0001067810861 -0.01081292671 0.01728011759 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/phialpha_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/phialpha_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/phialpha_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/phialpha_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/stress_delta_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/stress_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/stress_delta_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/stress_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/vdpre_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/vdpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/vdpre_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/vdpre_ref.dat diff --git a/tests/09_DeePKS/100_NO_GO_deepks_UT/vdrpre_ref.dat b/tests/09_DeePKS/NO_GO_deepks_UT/vdrpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_GO_deepks_UT/vdrpre_ref.dat rename to tests/09_DeePKS/NO_GO_deepks_UT/vdrpre_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/E_delta_bands_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/E_delta_bands_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/E_delta_bands_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/E_delta_bands_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/E_delta_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/E_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/E_delta_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/E_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/F_delta_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/F_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/F_delta_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/F_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/INPUT b/tests/09_DeePKS/NO_KP_deepks_UT/INPUT similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/INPUT rename to tests/09_DeePKS/NO_KP_deepks_UT/INPUT diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/KPT b/tests/09_DeePKS/NO_KP_deepks_UT/KPT similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/KPT rename to tests/09_DeePKS/NO_KP_deepks_UT/KPT diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/STRU b/tests/09_DeePKS/NO_KP_deepks_UT/STRU similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/STRU rename to tests/09_DeePKS/NO_KP_deepks_UT/STRU diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/S_I_mu_alpha_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/S_I_mu_alpha_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/S_I_mu_alpha_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/S_I_mu_alpha_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/descriptor_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/descriptor_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/descriptor_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/descriptor_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_0 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_0 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_0 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_0 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_1 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_1 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_1 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_1 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_2 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_2 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_2 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_2 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_3 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_3 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_3 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_3 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_4 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_4 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_4 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_4 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_5 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_5 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_5 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_5 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_6 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_6 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_6 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_6 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_7 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_7 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_7 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_7 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dm_8 b/tests/09_DeePKS/NO_KP_deepks_UT/dm_8 similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dm_8 rename to tests/09_DeePKS/NO_KP_deepks_UT/dm_8 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_x_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_x_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_x_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_x_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_y_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_y_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_y_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_y_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_z_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_z_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/dphialpha_z_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/dphialpha_z_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/gdmepsl_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/gdmepsl_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/gdmepsl_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/gdmepsl_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/gdmx_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/gdmx_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/gdmx_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/gdmx_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/gedm_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/gedm_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/gedm_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/gedm_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/gvepsl_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/gvepsl_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/gvepsl_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/gvepsl_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/gvx_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/gvx_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/gvx_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/gvx_ref.dat diff --git a/tests/09_DeePKS/NO_KP_deepks_UT/iRmat_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/iRmat_ref.dat new file mode 100644 index 0000000000..3578fe72ea --- /dev/null +++ b/tests/09_DeePKS/NO_KP_deepks_UT/iRmat_ref.dat @@ -0,0 +1,75 @@ +0 0 0 +0 0 1 +0 1 0 +0 1 1 +0 1 1 +0 0 2 +0 0 0 +0 1 2 +0 1 0 +0 1 0 +0 2 0 +0 2 1 +0 0 0 +0 0 1 +0 0 1 +0 2 2 +0 2 0 +0 0 2 +0 0 0 +0 0 0 +0 2 2 +0 2 0 +0 0 2 +0 0 0 +0 0 0 +0 0 0 +0 1 0 +0 1 0 +0 1 1 +0 1 0 +0 2 0 +0 0 0 +0 0 0 +0 0 1 +0 0 0 +0 2 0 +0 0 0 +0 0 0 +0 0 1 +0 0 0 +0 2 2 +0 0 2 +0 0 2 +0 0 0 +0 0 2 +0 2 0 +0 0 0 +0 0 0 +0 0 1 +0 0 0 +0 0 0 +0 1 0 +0 1 0 +0 1 1 +0 0 0 +0 2 0 +0 0 0 +0 0 0 +0 0 1 +0 2 0 +0 2 0 +0 0 0 +0 0 0 +0 0 1 +0 2 0 +0 2 2 +0 0 2 +0 0 2 +0 0 0 +0 2 2 +0 0 0 +0 1 0 +0 1 0 +0 1 1 +0 0 0 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/jle.orb b/tests/09_DeePKS/NO_KP_deepks_UT/jle.orb similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/jle.orb rename to tests/09_DeePKS/NO_KP_deepks_UT/jle.orb diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/model.ptg b/tests/09_DeePKS/NO_KP_deepks_UT/model.ptg similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/model.ptg rename to tests/09_DeePKS/NO_KP_deepks_UT/model.ptg diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/o_delta_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/o_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/o_delta_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/o_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/orbpre_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/orbpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/orbpre_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/orbpre_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/pdm_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/pdm_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/pdm_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/pdm_ref.dat diff --git a/tests/09_DeePKS/NO_KP_deepks_UT/phialpha_r_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/phialpha_r_ref.dat new file mode 100644 index 0000000000..e737ce22e4 --- /dev/null +++ b/tests/09_DeePKS/NO_KP_deepks_UT/phialpha_r_ref.dat @@ -0,0 +1,90 @@ +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.01543554467 -0.008065153447 -0.01244641558 -0.001923079779 0.002999569923 0.007741992235 0.001196205335 -0.001865810032 0.003518338782 0.0009817979232 -0.001531382916 -0.0001086824711 -0.0002366120191 -0.002833911453 -0.0007908074096 0.001233480871 8.754031902e-05 0.0001905835544 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.01242662179 -0.006477161275 0.01097039075 -0.00162689654 0.002537590993 -0.006348711177 0.0009415066869 -0.001468537692 0.003015181109 -0.0008048659007 0.00125540894 -8.551568097e-05 -0.0001861757259 -0.002752907546 0.0007348551651 -0.001146208012 7.807715522e-05 0.0001699813518 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.05764787604 -0.03269664837 -0.02891309865 -0.02565587961 -0.02018788394 0.01762729729 0.01564148563 0.01230784137 0.003618889031 0.01534123614 0.01207158356 0.002592132746 0.01071165351 -0.002325372903 -0.009857747643 -0.007756782004 -0.001665614833 -0.006882937995 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-3.235665827e-12 6.459383561e-12 -7.496419526e-12 2.186899137e-12 1.720808899e-12 1.285653335e-11 -3.750582742e-12 -2.951227174e-12 -1.081805427e-11 5.870671048e-12 4.619464525e-12 -3.261123371e-13 -1.347617079e-12 1.701898686e-11 -9.235752656e-12 -7.267351792e-12 5.130406489e-13 2.120074165e-12 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.949842409 -0.03558002646 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.8831112507 0 0 0.1909716474 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.8831112507 0 0 0.1909716474 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0.8831112507 0 0 0.1909716474 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.04257844364 -0.02417633078 -0.01875373391 0.01113470711 0.02250388227 0.01145805784 -0.006803024862 -0.01374930378 0.0005859403333 -0.00580624991 -0.01173476438 -0.005316990868 0.006967314615 -0.000377863047 0.003744352724 0.007567551803 0.003428837812 -0.004493103787 +-8.823436698e-13 1.761408977e-12 2.044140447e-12 -5.963285493e-13 -4.692340205e-13 -3.505813654e-12 1.022736365e-12 8.047622355e-13 -2.9499256e-12 1.600846362e-12 1.259660594e-12 -8.892607748e-14 -3.674755204e-13 4.640947554e-12 -2.518519113e-12 -1.981751252e-12 1.399022612e-13 5.781280102e-13 +-2.438582561e-12 4.86819372e-12 5.650113754e-12 -1.649916376e-12 -1.298272396e-12 -9.690033745e-12 2.829639951e-12 2.226563415e-12 -8.146925528e-12 4.425258164e-12 3.482110127e-12 -2.4602072e-13 -1.016648824e-12 1.28164617e-11 -6.961689698e-12 -5.477956155e-12 3.870340474e-13 1.599368172e-12 +7.113974986e-13 -1.420177807e-12 -1.649916376e-12 4.757278704e-13 3.7873958e-13 2.829639951e-12 -8.158573101e-13 -6.495460392e-13 2.38291152e-12 -1.279658162e-12 -1.016648824e-12 6.816620704e-14 2.937465207e-13 -3.748754012e-12 2.013049372e-12 1.599368172e-12 -1.072144542e-13 -4.620970402e-13 +5.597785128e-13 -1.117497633e-12 -1.298272396e-12 3.7873958e-13 2.924240944e-13 2.226563415e-12 -6.495460392e-13 -5.014876272e-13 1.875045484e-12 -1.016648824e-12 -7.876167218e-13 5.931043831e-14 2.297681345e-13 -2.949788198e-12 1.599368172e-12 1.238981277e-12 -9.332391695e-14 -3.614428298e-13 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5.816977142e-06 -1.130009148e-05 -4.443707969e-06 2.638375214e-06 -1.300541872e-05 7.347779566e-06 -4.362617799e-06 2.150477722e-05 -7.675952679e-06 -2.282055052e-06 1.124899951e-05 -1.578378151e-05 -6.678900075e-06 1.153176835e-05 3.428386197e-06 -1.689964255e-05 2.371235462e-05 1.003387224e-05 +0.02620624272 -0.01765994681 0.01837713881 0.0163068534 0.01283140039 -0.01229302457 -0.01090814797 -0.008583312227 0.00296628903 0.01257472668 0.009894695743 0.002124689335 0.008780004033 -0.002019636009 -0.008561664272 -0.006736930763 -0.00144662204 -0.005977978586 +-0.0464567146 0.02679448593 -0.01898647553 -0.02982218359 -0.02346623036 0.01141316902 0.01812643311 0.01426317606 0.005154366219 -0.01533640357 -0.01206778095 -0.003982504916 -0.01645718678 -0.003357712502 0.009722637692 0.007650467816 0.002539024192 0.01049218927 +-0.04122311106 0.02377594023 -0.02982218359 -0.01184067845 -0.02082263089 0.01812643311 0.007069831373 0.01265635109 -0.009687295039 -0.01163579488 -0.01645718678 0.004699734615 -0.008124417219 0.006207837528 0.007356351899 0.01049218927 -0.003051292448 0.00513639787 +-0.0324372968 0.01870861296 -0.02346623036 -0.02082263089 -0.001762864906 0.01426317606 0.01265635109 0.0009443639846 -0.007622657685 -0.01645718678 -0.003670785049 -0.009259466665 -0.003257250993 0.004884771265 0.01049218927 0.002278303515 0.005946602068 0.002021640136 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5.816977142e-06 -1.130009148e-05 4.443707969e-06 -2.638375214e-06 1.300541872e-05 -7.347779566e-06 4.362617799e-06 -2.150477722e-05 -7.675952679e-06 -2.282055052e-06 1.124899951e-05 -1.578378151e-05 -6.678900075e-06 1.153176835e-05 3.428386197e-06 -1.689964255e-05 2.371235462e-05 1.003387224e-05 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.003090520969 -0.001951458591 -0.003181413023 0.0004717999529 -0.0007359013201 0.002079048377 -0.0003083205228 0.0004809103483 0.001471587277 -0.0003928223135 0.0006127140481 -4.173672609e-05 -9.086480033e-05 -0.001129028787 0.0003013804938 -0.0004700854714 3.202118283e-05 6.971314372e-05 +0.01110414519 -0.006405338519 -0.01079981165 0.001852244286 -0.002889082558 0.006534436311 -0.001121743466 0.001749666341 0.004187020407 -0.001385658729 0.002161314518 -0.0001736254316 -0.0003779989868 -0.003238551237 0.001037660671 -0.00161851618 0.0001273100938 0.0002771661156 +-0.001646732172 0.0009499044576 0.001852244286 0.001415444712 0.0004284476757 -0.001121743466 -0.0008632833679 -0.0002594735394 -0.001051324618 -0.001433248674 -0.0003779989868 0.0002742366783 -0.0003315286583 0.0007583897246 0.0009050529002 0.0002771661156 -0.0001794504284 0.0002093502539 +0.002568530098 -0.001481636316 -0.002889082558 0.0004284476757 0.001021848881 0.001749666341 -0.0002594735394 -0.0006249165636 0.00163982885 -0.0003779989868 -0.00108599781 0.0003474237086 0.000161052247 -0.001182916607 0.0002771661156 0.0006504327127 -0.0002210052305 -9.645843562e-05 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.04257844364 -0.02417633078 0.01875373391 -0.01113470711 -0.02250388227 -0.01145805784 0.006803024862 0.01374930378 0.0005859403333 -0.00580624991 -0.01173476438 -0.005316990868 0.006967314615 -0.000377863047 0.003744352724 0.007567551803 0.003428837812 -0.004493103787 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.00406420697 -0.002591654052 0.00401526231 0.0006203930529 -0.0009676729803 -0.002711808927 -0.0004189981349 0.0006535424149 0.001947926272 0.0005435718634 -0.0008478492831 -6.017198847e-05 -0.0001310001102 -0.00139810647 -0.0003901437904 0.0006085361573 4.318790069e-05 9.402414469e-05 +-0.01419405342 0.008149246796 -0.01291285755 -0.0023437266 0.003655683914 0.008129862255 0.001469242087 -0.00229168567 -0.00511471444 -0.001779628247 0.002775817947 0.0002329346753 0.00050712082 0.003628639963 0.001245910782 -0.001943339298 -0.0001617149694 -0.000352068784 +-0.002193105071 0.001259129718 -0.0023437266 0.001893911254 0.0005648350541 0.001469242087 -0.001152247654 -0.0003540854269 -0.001352524437 0.001775850084 0.00050712082 0.0003606093461 -0.0004279775544 0.0009329841386 -0.001165552804 -0.000352068784 -0.0002399498199 0.0002808967057 +0.003420748363 -0.00196395785 0.003655683914 0.0005648350541 0.001375022403 -0.00229168567 -0.0003540854269 -0.0008269651152 0.00210963251 0.00050712082 0.001309980734 0.0004501951918 0.0002024034506 -0.001455244442 -0.000352068784 -0.000842122865 -0.0002963213072 -0.0001301153287 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.8778350314 -0.01899237841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/phialpha_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/phialpha_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/phialpha_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/phialpha_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/stress_delta_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/stress_delta_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/stress_delta_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/stress_delta_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/vdpre_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/vdpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/vdpre_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/vdpre_ref.dat diff --git a/tests/09_DeePKS/100_NO_KP_deepks_UT/vdrpre_ref.dat b/tests/09_DeePKS/NO_KP_deepks_UT/vdrpre_ref.dat similarity index 100% rename from tests/09_DeePKS/100_NO_KP_deepks_UT/vdrpre_ref.dat rename to tests/09_DeePKS/NO_KP_deepks_UT/vdrpre_ref.dat diff --git a/tests/10_others/05_Alllog_filename/INPUT b/tests/10_others/05_Alllog_filename/INPUT index 44c80a4996..d3d4eb764d 100644 --- a/tests/10_others/05_Alllog_filename/INPUT +++ b/tests/10_others/05_Alllog_filename/INPUT @@ -4,7 +4,7 @@ suffix autotest calculation md esolver_type ksdft md_type nve -md_nstep 3 +md_nstep 4 symmetry -1 #Parameters (2.Iteration) @@ -18,4 +18,4 @@ basis_type lcao smearing_method gauss smearing_sigma 0.002 -out_alllog 1 \ No newline at end of file +out_alllog 1 diff --git a/tests/11_PW_GPU/002_PW_CG_GPU/README b/tests/11_PW_GPU/002_PW_CG_GPU/README index b8f97be67a..84a084c7b0 100644 --- a/tests/11_PW_GPU/002_PW_CG_GPU/README +++ b/tests/11_PW_GPU/002_PW_CG_GPU/README @@ -4,6 +4,6 @@ This test for: *kpoints 2*2*2 *sg15 pseudopotential *smearing_method gauss -*ks_solver bpcg +*ks_solver cg *mixing_type broyden-kerker *mixing_beta 0.4 diff --git a/tests/11_PW_GPU/003_PW_DA_GPU/README b/tests/11_PW_GPU/003_PW_DA_GPU/README index b8f97be67a..2a580efb1a 100644 --- a/tests/11_PW_GPU/003_PW_DA_GPU/README +++ b/tests/11_PW_GPU/003_PW_DA_GPU/README @@ -4,6 +4,6 @@ This test for: *kpoints 2*2*2 *sg15 pseudopotential *smearing_method gauss -*ks_solver bpcg +*ks_solver dav *mixing_type broyden-kerker *mixing_beta 0.4 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/INPUT b/tests/11_PW_GPU/004_PW_DS_GPU/INPUT new file mode 100644 index 0000000000..eaceb2ad98 --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/INPUT @@ -0,0 +1,33 @@ +INPUT_PARAMETERS +#Parameters (General) +suffix autotest +pseudo_dir ../../PP_ORB + +gamma_only 0 +calculation scf +symmetry 1 +relax_nmax 1 +out_level ie +smearing_method gaussian +smearing_sigma 0.02 + +#Parameters (3.PW) +ecutwfc 40 +scf_thr 1e-7 +scf_nmax 100 + +#Parameters (LCAO) +basis_type pw +ks_solver dav_subspace +device gpu +chg_extrap second-order +pw_diag_thr 0.00001 + +cal_force 1 +#test_force 1 +cal_stress 1 +#test_stress 1 + +mixing_type broyden +mixing_beta 0.4 +mixing_gg0 1.5 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/KPT b/tests/11_PW_GPU/004_PW_DS_GPU/KPT new file mode 100644 index 0000000000..28006d5e2d --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/README b/tests/11_PW_GPU/004_PW_DS_GPU/README new file mode 100644 index 0000000000..11f8fbe4e2 --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/README @@ -0,0 +1,9 @@ +This test for: +*GaAs-deformation +*PW +*kpoints 2*2*2 +*sg15 pseudopotential +*smearing_method gauss +*ks_solver dav_subspace +*mixing_type broyden-kerker +*mixing_beta 0.4 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/STRU b/tests/11_PW_GPU/004_PW_DS_GPU/STRU new file mode 100644 index 0000000000..b03baadd25 --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/STRU @@ -0,0 +1,23 @@ +ATOMIC_SPECIES +As 1 As_dojo.upf upf201 +Ga 1 Ga_dojo.upf upf201 + +LATTICE_CONSTANT +1 // add lattice constant, 10.58 ang + +LATTICE_VECTORS +5.33 5.33 0.0 +0.0 5.33 5.33 +5.33 0.0 5.33 +ATOMIC_POSITIONS +Direct //Cartesian or Direct coordinate. + +As +0 +1 +0.300000 0.3300000 0.27000000 0 0 0 + +Ga //Element Label +0 +1 //number of atom +0.00000 0.00000 0.000000 0 0 0 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/result.ref b/tests/11_PW_GPU/004_PW_DS_GPU/result.ref new file mode 100644 index 0000000000..5c69f05f9a --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/result.ref @@ -0,0 +1,8 @@ +etotref -4869.7470518365098542 +etotperatomref -2434.8735259183 +totalforceref 5.200640 +totalstressref 37241.467259 +pointgroupref C_1 +spacegroupref C_1 +nksibzref 8 +totaltimeref 4.79 diff --git a/tests/11_PW_GPU/004_PW_DS_GPU/threshold b/tests/11_PW_GPU/004_PW_DS_GPU/threshold new file mode 100644 index 0000000000..b343d16034 --- /dev/null +++ b/tests/11_PW_GPU/004_PW_DS_GPU/threshold @@ -0,0 +1,4 @@ +threshold 1 +force_threshold 1 +stress_threshold 1 +fatal_threshold 1 diff --git a/tests/11_PW_GPU/006_PW_get_wf_GPU/INPUT b/tests/11_PW_GPU/006_PW_get_wf_GPU/INPUT index c6775e868b..bd85c845f0 100644 --- a/tests/11_PW_GPU/006_PW_get_wf_GPU/INPUT +++ b/tests/11_PW_GPU/006_PW_get_wf_GPU/INPUT @@ -8,6 +8,7 @@ symmetry 0 pseudo_dir ../../PP_ORB device gpu +init_wfc random #Parameters (2.Iteration) ecutwfc 100 diff --git a/tests/11_PW_GPU/007_PW_OW_GPU/INPUT b/tests/11_PW_GPU/007_PW_OW_GPU/INPUT index 891a98ce04..bb5e81efe0 100644 --- a/tests/11_PW_GPU/007_PW_OW_GPU/INPUT +++ b/tests/11_PW_GPU/007_PW_OW_GPU/INPUT @@ -8,6 +8,7 @@ symmetry 1 pseudo_dir ../../PP_ORB device gpu +init_wfc random #Parameters (2.Iteration) ecutwfc 20 diff --git a/tests/11_PW_GPU/CASES_GPU.txt b/tests/11_PW_GPU/CASES_GPU.txt index db34fab78a..f550b7f044 100644 --- a/tests/11_PW_GPU/CASES_GPU.txt +++ b/tests/11_PW_GPU/CASES_GPU.txt @@ -1,6 +1,7 @@ 001_PW_BPCG_GPU 002_PW_CG_GPU 003_PW_DA_GPU +004_PW_DS_GPU 005_PW_CG_GPU_float 006_PW_get_wf_GPU 007_PW_OW_GPU diff --git a/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/INPUT index dff6576bfb..781dafc4e5 100644 --- a/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -32,4 +33,4 @@ md_type nve md_dt 0.05 init_vel 1 ocp 1 -ocp_set 1*1 1*1 3*0 +ocp_set 1*1 1*1 3*0 diff --git a/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/result.ref index c513b14752..0c5a7f4b0e 100644 --- a/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/01_NO_KP_ocp_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -18.06593168523523 +etotref -18.06593168523521 etotperatomref -9.0329658426 totalforceref 40.752890 totalstressref 72.113950 diff --git a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/INPUT similarity index 88% rename from tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/INPUT rename to tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/INPUT index 80421d200c..3886a0fe37 100644 --- a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/INPUT @@ -19,7 +19,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -34,3 +35,5 @@ force_thr_ev 1e-3 md_type nve md_dt 0.01 init_vel 1 +out_wfc_lcao 1 +out_app_flag 0 diff --git a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/KPT b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/KPT similarity index 100% rename from tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/KPT rename to tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/KPT diff --git a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/STRU b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/STRU similarity index 100% rename from tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/STRU rename to tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/STRU diff --git a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/result.ref similarity index 54% rename from tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/result.ref rename to tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/result.ref index ded16345fe..64e2f2ae8f 100644 --- a/tests/15_rtTDDFT_GPU/02_NO_CH_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/result.ref @@ -1,5 +1,6 @@ -etotref -323.5398327660267 +etotref -323.5398327660280 etotperatomref -107.8466109220 totalforceref 19.450256 totalstressref 329.292627 -totaltimeref 2.06 +Compare_wfc_lcao_pass 0 +totaltimeref 2.08 diff --git a/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/wfk1g3_nao_mod.txt.ref b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/wfk1g3_nao_mod.txt.ref new file mode 100644 index 0000000000..5ed19da4f9 --- /dev/null +++ b/tests/15_rtTDDFT_GPU/02_NO_CH_OW_TDDFT_GPU/wfk1g3_nao_mod.txt.ref @@ -0,0 +1,104 @@ +1 (index of k points) +0 0 0 +10 (number of bands) +31 (number of orbitals) +1 (band) +-1.61755584e+00 (Ry) +1.00000000e+00 (Occupations) +1.7973033228e-02 5.6365835155e-03 4.0292551523e-03 9.3613124647e-07 3.1049073715e-04 +4.4881324147e-01 6.1982212024e-02 2.1866639499e-03 5.3854752435e-05 1.3443886400e-02 +2.4004885492e-03 5.6446362484e-05 2.1372116215e-03 1.1018527223e-02 3.0207201941e-08 +3.4647693721e-05 2.2873348749e-03 1.7856076996e-05 4.7006748870e-01 4.4279989219e-02 +2.3897932195e-03 1.0152249673e-04 1.3497145623e-02 2.1842163251e-03 4.9876850598e-05 +2.2483079886e-03 8.2943956363e-03 5.4581218803e-08 2.2605006631e-05 2.5123017963e-03 +1.9513113148e-05 +2 (band) +-7.07747396e-01 (Ry) +1.00000000e+00 (Occupations) +2.0653072429e-01 1.2922034155e-03 5.5721322331e-03 7.2160303746e-07 1.1946461441e-04 +2.4049835276e-02 9.0533892005e-03 4.1353078277e-01 6.9010744273e-08 1.0850266122e-03 +8.5128606326e-03 2.6178316195e-06 2.3615553384e-03 6.7178999601e-03 6.4624310555e-06 +2.8515458235e-03 7.4052768556e-05 1.8573055905e-06 1.8685652776e-02 1.1546953779e-02 +4.1059371287e-01 1.0518947039e-05 2.0025618623e-03 5.0072529498e-03 4.5336636824e-06 +3.1909624844e-04 6.5641355509e-03 6.4650077421e-06 2.5762193433e-03 6.2135728577e-04 +2.3593124810e-07 +3 (band) +-4.79113246e-01 (Ry) +1.00000000e+00 (Occupations) +7.0949989237e-01 8.1390285943e-02 4.9575171275e-03 2.7504618329e-06 8.1835591429e-05 +5.7799204671e-02 3.6790251304e-03 2.2770658483e-01 2.2533967243e-05 7.3942524577e-03 +1.1242094504e-03 1.1736100212e-05 2.4009897873e-03 1.2402323127e-02 3.1370837973e-06 +5.0148798457e-04 2.4032930056e-04 3.7185915214e-07 4.8045592677e-02 8.0553442983e-03 +2.2283814985e-01 4.5776182772e-05 1.5502909712e-02 6.2832313743e-04 3.2578627130e-06 +2.8429788855e-03 1.2036482557e-02 4.3300276852e-06 2.8188339374e-04 1.5085617131e-03 +5.1181029768e-06 +4 (band) +-4.50651346e-01 (Ry) +1.00000000e+00 (Occupations) +1.3215965624e-02 7.3798641996e-04 1.2038973025e-03 1.7937550905e-06 6.7028378581e-04 +6.9718289138e-03 2.5739994415e-03 2.8137532816e-03 3.8119796372e-03 6.3187318495e-01 +3.1901058225e-04 8.0847071103e-04 1.2861262374e-01 3.1525406399e-03 6.1162723759e-06 +1.0276720894e-03 6.6002797230e-02 3.2862533094e-04 8.4196142496e-03 3.4694204484e-03 +2.9150739715e-03 4.0961852049e-03 6.7963857691e-01 2.1227695507e-04 6.8941250116e-04 +1.1232828913e-01 3.2277363043e-03 6.4199729130e-06 1.0253152403e-03 7.2324966855e-02 +3.6949273003e-04 +5 (band) +-4.29244383e-01 (Ry) +1.00000000e+00 (Occupations) +1.2546784263e-04 1.1549555323e-05 5.4861100875e-06 1.7618788451e-04 4.0258885017e-06 +2.4553679476e-05 1.3128486248e-05 2.6970170350e-05 6.3651768261e-01 3.8382457432e-03 +1.6118902935e-06 1.3046899203e-01 7.5113869585e-04 1.7036696317e-05 1.0434795778e-03 +6.3775793448e-06 4.0369713070e-04 5.5551262544e-02 1.4438094641e-04 7.4707587826e-05 +2.7467298158e-05 6.8689923238e-01 4.1429029353e-03 4.1973262045e-07 1.1228566368e-01 +6.6495939232e-04 1.4345339069e-05 1.0445406969e-03 6.1207392476e-06 4.4277257659e-04 +6.2664476162e-02 +6 (band) +4.03555951e-01 (Ry) +0.00000000e+00 (Occupations) +8.1683925769e-06 1.4722915207e-06 1.9948122052e-06 1.3200895008e-04 2.4021948885e-06 +2.4242079429e-04 1.6150496660e-06 6.9023730019e-06 9.7310837647e-01 7.7981683079e-03 +6.0647157972e-06 5.6610304955e-02 4.9202412347e-04 9.7624398044e-06 1.3864041088e-03 +1.0077421290e-05 1.1828407394e-03 1.6453337227e-01 2.3314812432e-04 1.7930229814e-05 +2.1137369530e-06 9.7075032389e-01 7.7723245275e-03 2.2152868719e-06 6.3595469597e-02 +5.5426047813e-04 6.1501583800e-06 1.3430510326e-03 9.4412376964e-06 1.2903623626e-03 +1.7669219433e-01 +7 (band) +4.29135221e-01 (Ry) +0.00000000e+00 (Occupations) +2.0483430953e-03 2.1290771690e-04 4.7751193802e-04 1.4707473235e-06 1.0462721745e-04 +9.8666649512e-02 1.1655949473e-02 8.5225424258e-04 7.7099091869e-03 9.9362720904e-01 +1.1296245859e-03 4.8817605249e-04 6.7644953642e-02 6.7149093710e-04 1.0840345166e-05 +1.2451690036e-03 1.5673285862e-01 1.3488300546e-03 9.5609188618e-02 1.6675102183e-02 +4.1262849603e-04 7.6976327316e-03 9.9115499004e-01 2.8451518740e-04 5.3136929190e-04 +7.4105703116e-02 2.4097974271e-03 1.0772646344e-05 1.2234030864e-03 1.6933164045e-01 +1.4384194040e-03 +8 (band) +4.92284914e-01 (Ry) +0.00000000e+00 (Occupations) +2.5847673924e-01 3.5257716671e-02 5.4429773382e-02 4.3001919268e-08 1.1703814288e-04 +2.5391739847e-01 3.0906462859e-01 1.0309388450e-01 1.5712488430e-05 1.6757312373e-02 +7.4477641576e-02 7.1409157814e-06 2.7625711336e-03 2.1035588378e-01 4.3173293094e-06 +6.4592574702e-04 1.0158460762e-03 3.3313116902e-05 1.5848502785e-01 3.3347675036e-01 +9.6591033633e-02 8.9410837584e-06 2.2780796705e-03 7.3586838421e-02 5.0767785523e-05 +3.0484527462e-03 2.0961786979e-01 5.5400550591e-06 5.4738032999e-04 2.0896375541e-03 +7.0185962671e-06 +9 (band) +7.32222369e-01 (Ry) +0.00000000e+00 (Occupations) +2.4578695350e-03 8.5843807140e-04 6.2468854349e-04 2.5395126951e-07 1.2683386927e-03 +2.2778058062e+00 3.7725419109e-01 4.7386829956e-02 2.8867590703e-04 3.8786144228e-02 +1.0678273189e-02 8.5392123886e-05 4.7205991655e-03 1.4010791076e-01 7.5925567125e-07 +1.1082943750e-04 7.8127831595e-03 5.1040821121e-05 2.2812710521e+00 3.7121246547e-01 +4.2697505218e-02 3.5566666679e-04 3.9610957533e-02 1.5859332778e-02 1.6142457000e-04 +5.7494172987e-03 1.3199569563e-01 6.0546882772e-07 1.5523585585e-04 8.4274708110e-03 +5.9663287292e-05 +10 (band) +9.17560598e-01 (Ry) +0.00000000e+00 (Occupations) +1.4605760895e-02 3.2672341171e-03 3.5046933774e-03 3.2981741935e-07 1.4169970771e-03 +6.0584781494e-02 1.2710680005e-02 1.4913804403e+00 7.1951578087e-06 2.9200959258e-03 +3.1644331888e-01 2.5015543231e-06 1.5440221499e-03 5.6773360365e-03 9.5832726527e-07 +3.3827355085e-03 3.7440570824e-04 8.0049775928e-07 6.2704352743e-02 3.8212494469e-03 +1.4740759426e+00 1.0482135474e-05 3.1784866569e-03 3.4460812261e-01 6.4696964585e-06 +1.4877818341e-03 1.8027792019e-03 7.7708899765e-08 2.5473307995e-03 3.9643734513e-04 +1.7671374051e-06 diff --git a/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/INPUT index 9a2bf58c77..dd4f653ed9 100644 --- a/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/result.ref index c4d08e3f9f..07685a2d0c 100644 --- a/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/03_NO_CO_TDDFT_GPU/result.ref @@ -1,5 +1,5 @@ -etotref -603.4339802028381 -etotperatomref -301.7169901014 -totalforceref 12.079250 -totalstressref 28.046553 +etotref -603.4336857561682 +etotperatomref -301.7168428781 +totalforceref 12.095750 +totalstressref 27.935490 totaltimeref 2.53 diff --git a/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/INPUT index db1b78eeb9..12d113cb80 100644 --- a/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/result.ref index afac7efc1f..34c12e8623 100644 --- a/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/04_NO_CO_ocp_TDDFT_GPU/result.ref @@ -1,5 +1,5 @@ -etotref -603.4337824685499 -etotperatomref -301.7168912343 -totalforceref 12.090612 -totalstressref 27.990852 +etotref -603.4337279119619 +etotperatomref -301.7168639560 +totalforceref 12.106586 +totalstressref 27.960198 totaltimeref 2.71 diff --git a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/INPUT index 6668e7fe6d..0d8d5df6b8 100644 --- a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/INPUT @@ -15,7 +15,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 3 +md_nstep 4 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/README b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/README index 26c2f588bb..a90ee94200 100644 --- a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/README +++ b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/README @@ -1 +1 @@ -test TDDFT length-gauge current output for non-periodic system +Test RT-TDDFT length gauge current output for non-periodic system diff --git a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/current_tot.txt.ref b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/current_tot.txt.ref new file mode 100644 index 0000000000..de17d65e7b --- /dev/null +++ b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/current_tot.txt.ref @@ -0,0 +1,4 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 1.3253329345174151e-07 -1.1309759467952081e-08 -1.8100967211240555e-08 +3 -1.8712729254901428e-07 -1.9255546268328018e-08 -3.0821009248708681e-08 +4 1.6157844599780660e-08 1.2274265606089292e-08 1.9637494050295524e-08 diff --git a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/refcurrent_total.dat b/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/refcurrent_total.dat deleted file mode 100644 index 4c3b1c5d5e..0000000000 --- a/tests/15_rtTDDFT_GPU/05_NO_cur_TDDFT_GPU/refcurrent_total.dat +++ /dev/null @@ -1,4 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 1.3253329345179453e-07 -1.1309759467848516e-08 -1.8100967211060974e-08 -2 -1.8712729254911609e-07 -1.9255546268139507e-08 -3.0821009248084689e-08 -3 1.6157844599821334e-08 1.2274265606153575e-08 1.9637494050035531e-08 diff --git a/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/INPUT index f5443e21c8..1845443146 100755 --- a/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/result.ref index 8cab4cc796..5fbff0177d 100644 --- a/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/06_NO_dir_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -30.45454376271162 +etotref -30.45454376271165 etotperatomref -15.2272718814 totalforceref 0.595498 totalstressref 4.286358 diff --git a/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/INPUT index 153facbc2f..2b0dbe03ef 100644 --- a/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -32,5 +33,5 @@ md_type nve md_dt 0.05 init_vel 1 ocp 1 -ocp_set 1*0.5 1*0.5 3*0 1*0.5 1*0.5 3*0 +ocp_set 1*0.5 1*0.5 3*0 1*0.5 1*0.5 3*0 td_edm 1 diff --git a/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/result.ref index dc986d3d6b..e319cfc11e 100644 --- a/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/07_NO_EDM_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -18.06494189760856 +etotref -18.06494189760862 etotperatomref -9.0324709488 totalforceref 41.359252 totalstressref 73.228950 diff --git a/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/INPUT index 3fcd5bb4cb..63f1d0b627 100644 --- a/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/INPUT @@ -16,7 +16,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/result.ref index 19989e81b8..16bc961000 100644 --- a/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/09_NO_HEAV_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -22.97638349080424 +etotref -22.97638349080425 etotperatomref -11.4881917454 totalforceref 0.582042 totalstressref 76.025571 diff --git a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/INPUT old mode 100755 new mode 100644 index 0aade88b68..fff4203905 --- a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/INPUT @@ -15,7 +15,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -39,7 +40,7 @@ td_tstart 1 td_tend 2 td_lcut1 0.05 td_lcut2 0.95 -td_gauss_freq 1.164656 0.029116 +td_gauss_freq 1.164656 0.029116 td_gauss_amp 2.0 5.0 td_gauss_phase 2*0.0 td_gauss_t0 2*0 diff --git a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/KPT b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/KPT old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/STRU b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/STRU old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/result.ref index 91dd29c0e7..e47c61dabb 100644 --- a/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/10_NO_HHG_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref 20.47683114572230 +etotref 20.47683114572229 etotperatomref 10.2384155729 totalforceref 0.451670 totalstressref 487.779801 diff --git a/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/INPUT index 975bd05f6f..8e4f1020c8 100644 --- a/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/INPUT @@ -15,9 +15,10 @@ scf_nmax 30 device gpu ks_solver cusolver basis_type lcao -out_chg 1 +# out_chg 1 gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/result.ref index 777bb60370..bee5bb6a00 100644 --- a/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -1336.999498209980 +etotref -1336.999498209979 etotperatomref -445.6664994033 totalforceref 11.627501 totalstressref 64.927558 diff --git a/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/INPUT index 464f3d7a06..d27fc181e8 100644 --- a/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/INPUT @@ -17,6 +17,7 @@ ks_solver cusolver basis_type lcao gamma_only 0 md_nstep 2 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 @@ -36,4 +37,4 @@ md_dt 0.05 md_restart 1 init_vel 1 ocp 1 -ocp_set 1*1 1*1 3*0 +ocp_set 1*1 1*1 3*0 diff --git a/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/restart/Restart_md.dat b/tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/restart/Restart_md.txt similarity index 100% rename from tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/restart/Restart_md.dat rename to tests/15_rtTDDFT_GPU/12_NO_re_TDDFT_GPU/restart/Restart_md.txt diff --git a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/INPUT old mode 100755 new mode 100644 index bfce981848..804b26e8e1 --- a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/INPUT @@ -15,7 +15,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/KPT b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/KPT old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/STRU b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/STRU old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/result.ref index 86ddde6b25..c46aedc830 100644 --- a/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/14_NO_TRAP_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -30.89964815765920 +etotref -30.89964815765915 etotperatomref -15.4498240788 totalforceref 0.596612 totalstressref 1.073053 diff --git a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/INPUT old mode 100755 new mode 100644 index 3b6fdd0aea..c6766d797d --- a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/INPUT @@ -2,7 +2,7 @@ INPUT_PARAMETERS #Parameters (General) suffix autotest pseudo_dir ../../PP_ORB -orbital_dir ../../PP_ORB +orbital_dir ../../PP_ORB nbands 5 calculation md esolver_type tddft @@ -15,7 +15,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 2 +md_nstep 3 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/KPT b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/KPT old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/STRU b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/STRU old mode 100755 new mode 100644 diff --git a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/result.ref index 39d05e0518..0db2ec45d1 100644 --- a/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/15_NO_TRI_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -30.90911715730047 +etotref -30.90911715730050 etotperatomref -15.4545585787 totalforceref 0.596616 totalstressref 1.147852 diff --git a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/INPUT index bed4719481..cfc259d049 100644 --- a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/INPUT @@ -15,7 +15,8 @@ device gpu ks_solver cusolver basis_type lcao gamma_only 0 -md_nstep 3 +md_nstep 4 +estep_per_md 1 mixing_type broyden mixing_beta 0.7 diff --git a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/README b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/README index 127af73539..18c2e75edd 100644 --- a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/README +++ b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/README @@ -1 +1 @@ -test TDDFT velocity-gauge output for non-periodic system +Test RT-TDDFT velocity gauge output for non-periodic system diff --git a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/current_tot.txt.ref b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/current_tot.txt.ref new file mode 100644 index 0000000000..697c73a444 --- /dev/null +++ b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/current_tot.txt.ref @@ -0,0 +1,4 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 2.7669187278007260e-07 -1.3892875565558252e-09 -2.2297436846799228e-09 +3 2.2955881029817558e-07 3.4521250836946458e-09 5.5110950473557321e-09 +4 1.3457006814286624e-07 1.5269022218929118e-08 2.4393767948848288e-08 diff --git a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/refcurrent_total.dat b/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/refcurrent_total.dat deleted file mode 100644 index 0173583ef3..0000000000 --- a/tests/15_rtTDDFT_GPU/16_NO_vel_TDDFT_GPU/refcurrent_total.dat +++ /dev/null @@ -1,4 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 2.7669187278010950e-07 -1.3892875566265775e-09 -2.2297436847453706e-09 -2 2.2955881029815080e-07 3.4521250838755370e-09 5.5110950477892839e-09 -3 1.3457006814283194e-07 1.5269022219384739e-08 2.4393767949504196e-08 diff --git a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/INPUT index 5683e3b789..316b4ebab1 100644 --- a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/INPUT +++ b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/INPUT @@ -4,7 +4,8 @@ INPUT_PARAMETERS calculation md esolver_type tddft md_type nve -md_nstep 2 +md_nstep 3 +estep_per_md 1 md_dt 0.05 md_tfirst 0 diff --git a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/README b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/README index cf7f610eb0..3d074619ac 100644 --- a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/README +++ b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/README @@ -1 +1 @@ -test TDDFT velocity gauge output for periodic system +Test RT-TDDFT velocity gauge output for periodic system diff --git a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/current_tot.txt.ref b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/current_tot.txt.ref new file mode 100644 index 0000000000..35175e6f9f --- /dev/null +++ b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/current_tot.txt.ref @@ -0,0 +1,3 @@ +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 -1.4281057782732242e-18 5.1480765086224919e-18 5.1985933203093457e-06 +3 -3.1989018653041680e-18 1.4638762354532585e-17 1.3886066143094195e-05 diff --git a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/refcurrent_total.dat b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/refcurrent_total.dat deleted file mode 100644 index 8802e3f5cd..0000000000 --- a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/refcurrent_total.dat +++ /dev/null @@ -1,3 +0,0 @@ -0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1 3.9383095821745186e-19 -7.1789081877293453e-18 5.1985933203197939e-06 -2 -3.7148491227321649e-18 -1.9227633196995937e-17 1.3886066143115769e-05 diff --git a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/result.ref index cbb6ccf527..2ab84c92e8 100644 --- a/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/result.ref +++ b/tests/15_rtTDDFT_GPU/17_NO_vel_TDDFT_GPU/result.ref @@ -1,4 +1,4 @@ -etotref -194.7715239600904 +etotref -194.7715239600903 etotperatomref -97.3857619800 CompareCurrent_pass 0 totaltimeref 6.74 diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/INPUT b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/INPUT new file mode 100644 index 0000000000..3416946f7a --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/INPUT @@ -0,0 +1,41 @@ +INPUT_PARAMETERS + +# general information +calculation md +esolver_type tddft +md_type nve +md_nstep 1 +estep_per_md 10 +td_dt 0.005 +md_tfirst 0 + +# rt-TDDFT parameters +td_vext 1 # add time-dependent external potential +td_vext_dire 3 # direction along z +td_stype 2 # 2: hybrid gauge +td_ttype 3 # Heaviside type potential +td_tstart 1 # the step electric field starts +td_tend 10 # the step electric field ends +td_heavi_t0 3 +td_heavi_amp 0.05 + +# print out current information +out_current 1 + +suffix autotest +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +basis_type lcao +gamma_only 0 + +# electronic structure calculations +ecutwfc 20 +scf_nmax 50 +scf_thr 1e-6 +device gpu +ks_solver cusolver + +# charge mixing +mixing_type broyden +mixing_beta 0.7 +mixing_gg0 0.0 diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/KPT b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/KPT new file mode 100644 index 0000000000..e769af7638 --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 1 1 0 0 0 diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/README b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/README new file mode 100644 index 0000000000..a47d3411f7 --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/README @@ -0,0 +1 @@ +Test RT-TDDFT hybrid gauge output and parameter td_dt for periodic system diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/STRU b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/STRU new file mode 100644 index 0000000000..822d2c7cc6 --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Si 28.085 Si_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Si_gga_6au_100Ry_2s2p1d.orb + +LATTICE_CONSTANT +10.2 // add lattice constant + +LATTICE_VECTORS +0.0 0.5 0.5 +0.5 0.0 0.5 +0.5 0.5 0.0 + +ATOMIC_POSITIONS +Cartesian //Cartesian or Direct coordinate. + +Si // Element type +0.0 // magnetism +2 // number of atoms +0.00 0.00 0.00 0 0 0 +0.25 0.25 0.25 1 1 1 diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/current_tot.txt.ref b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/current_tot.txt.ref new file mode 100644 index 0000000000..e19d79a92b --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/current_tot.txt.ref @@ -0,0 +1,11 @@ +1 -1.2080528880846261e-19 1.2080528880846066e-19 1.2080528880845773e-19 +2 9.6988649203065955e-09 -9.6988647723290744e-09 2.4283263685858898e-06 +3 2.6772041590862983e-08 -2.6772038966231164e-08 7.2673271979666816e-06 +4 2.7319060127512691e-08 -2.7319057936239790e-08 9.6256951598233973e-06 +5 9.5656716023055945e-09 -9.5656714606956783e-09 9.4882668471607465e-06 +6 -1.5805949584040751e-08 1.5805949767647706e-08 9.2880215292310497e-06 +7 -4.7582174004461010e-08 4.7582174205200823e-08 9.0311994708317000e-06 +8 -8.4545887860098823e-08 8.4545888087037147e-08 8.7249297042081756e-06 +9 -1.2566554788492410e-07 1.2566554814454782e-07 8.3765586452439330e-06 +10 -1.7019855732619671e-07 1.7019855762999082e-07 7.9931205849008677e-06 +11 -2.1769144339022118e-07 2.1769144375450180e-07 7.5810111633604005e-06 diff --git a/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/result.ref b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/result.ref new file mode 100644 index 0000000000..6bc6181add --- /dev/null +++ b/tests/15_rtTDDFT_GPU/18_NO_hyb_TDDFT_GPU/result.ref @@ -0,0 +1,4 @@ +etotref -202.3030324186810 +etotperatomref -101.1515162093 +CompareCurrent_pass 0 +totaltimeref 6.74 diff --git a/tests/15_rtTDDFT_GPU/CASES_GPU.txt b/tests/15_rtTDDFT_GPU/CASES_GPU.txt index c930799511..53bce2d505 100644 --- a/tests/15_rtTDDFT_GPU/CASES_GPU.txt +++ b/tests/15_rtTDDFT_GPU/CASES_GPU.txt @@ -1,5 +1,5 @@ 01_NO_KP_ocp_TDDFT_GPU -02_NO_CH_TDDFT_GPU +02_NO_CH_OW_TDDFT_GPU 03_NO_CO_TDDFT_GPU 04_NO_CO_ocp_TDDFT_GPU 05_NO_cur_TDDFT_GPU @@ -13,3 +13,4 @@ 15_NO_TRI_TDDFT_GPU 16_NO_vel_TDDFT_GPU 17_NO_vel_TDDFT_GPU +18_NO_hyb_TDDFT_GPU diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/INPUT b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/INPUT similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/INPUT rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/INPUT diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/KPT b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/KPT rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/KPT diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/README b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/README rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/README diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/STRU b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/STRU rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/STRU diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/refOnsager.txt b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/refOnsager.txt similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/refOnsager.txt rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/refOnsager.txt diff --git a/tests/16_SDFT_GPU/186_PW_KG_100_GPU/result.ref b/tests/16_SDFT_GPU/001_PW_KG_100_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/186_PW_KG_100_GPU/result.ref rename to tests/16_SDFT_GPU/001_PW_KG_100_GPU/result.ref diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/INPUT b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/INPUT similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/INPUT rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/INPUT diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/KPT b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/KPT rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/KPT diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/README b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/README rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/README diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/STRU b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/STRU rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/STRU diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/refOnsager.txt b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/refOnsager.txt similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/refOnsager.txt rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/refOnsager.txt diff --git a/tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/result.ref b/tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/186_PW_SKG_MALL_GPU/result.ref rename to tests/16_SDFT_GPU/002_PW_SKG_MALL_GPU/result.ref diff --git a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/INPUT b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/INPUT similarity index 97% rename from tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/INPUT rename to tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/INPUT index beef5ef8b4..e4c4825cb3 100644 --- a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/INPUT +++ b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/INPUT @@ -39,5 +39,5 @@ mixing_beta 0.4 #MD md_tfirst 10 md_tfreq 0.1 -md_nstep 2 +md_nstep 3 init_vel 1 diff --git a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/KPT b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/KPT rename to tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/KPT diff --git a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/README b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/README rename to tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/README diff --git a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/STRU b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/STRU rename to tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/STRU diff --git a/tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/result.ref b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/187_PW_MD_SDFT_ALL_GPU/result.ref rename to tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/result.ref diff --git a/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/threshold b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/threshold new file mode 100644 index 0000000000..521e97582a --- /dev/null +++ b/tests/16_SDFT_GPU/003_PW_MD_SDFT_ALL_GPU/threshold @@ -0,0 +1 @@ +threshold 1e-5 \ No newline at end of file diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/INPUT b/tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/INPUT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/INPUT rename to tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/INPUT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/KPT b/tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/KPT rename to tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/KPT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/README b/tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/README rename to tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/README diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/STRU b/tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/STRU rename to tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/STRU diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/result.ref b/tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_ALL_GPU/result.ref rename to tests/16_SDFT_GPU/004_PW_SDFT_ALL_GPU/result.ref diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/INPUT b/tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/INPUT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/INPUT rename to tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/INPUT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/KPT b/tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/KPT rename to tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/KPT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/README b/tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/README rename to tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/README diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/STRU b/tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/STRU rename to tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/STRU diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/result.ref b/tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_BPCG_GPU/result.ref rename to tests/16_SDFT_GPU/005_PW_SDFT_MALL_BPCG_GPU/result.ref diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/INPUT b/tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/INPUT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/INPUT rename to tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/INPUT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/KPT b/tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/KPT similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/KPT rename to tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/KPT diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/README b/tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/README similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/README rename to tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/README diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/STRU b/tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/STRU similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/STRU rename to tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/STRU diff --git a/tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/result.ref b/tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/result.ref similarity index 100% rename from tests/16_SDFT_GPU/187_PW_SDFT_MALL_GPU/result.ref rename to tests/16_SDFT_GPU/006_PW_SDFT_MALL_GPU/result.ref diff --git a/tests/16_SDFT_GPU/CASES_GPU.txt b/tests/16_SDFT_GPU/CASES_GPU.txt index d3e55c120b..5c63d300ea 100644 --- a/tests/16_SDFT_GPU/CASES_GPU.txt +++ b/tests/16_SDFT_GPU/CASES_GPU.txt @@ -1,6 +1,6 @@ -186_PW_KG_100_GPU -186_PW_SKG_MALL_GPU -187_PW_MD_SDFT_ALL_GPU -187_PW_SDFT_ALL_GPU -187_PW_SDFT_MALL_BPCG_GPU -187_PW_SDFT_MALL_GPU +001_PW_KG_100_GPU +002_PW_SKG_MALL_GPU +003_PW_MD_SDFT_ALL_GPU +004_PW_SDFT_ALL_GPU +005_PW_SDFT_MALL_BPCG_GPU +006_PW_SDFT_MALL_GPU diff --git a/tests/integrate/CMakeLists.txt b/tests/integrate/CMakeLists.txt index 8da79197aa..c1db9c03d2 100644 --- a/tests/integrate/CMakeLists.txt +++ b/tests/integrate/CMakeLists.txt @@ -1,5 +1,6 @@ find_program(BASH bash) find_package(Python3 REQUIRED) + if(ENABLE_ASAN) add_test( NAME integrated_test_with_asan @@ -13,10 +14,4 @@ else() COMMAND ${BASH} Autotest.sh -a ${ABACUS_BIN_PATH} -n 4 WORKING_DIRECTORY ${ABACUS_TEST_DIR}/integrate ) - add_executable(sum_cube.exe ${ABACUS_TEST_DIR}/integrate/tools/sum_cube.cpp) - install(TARGETS sum_cube.exe DESTINATION ${ABACUS_TEST_DIR}/integrate/tools/) - - if(ENABLE_COVERAGE) - add_coverage(sum_cube.exe) - endif() -endif() +endif() \ No newline at end of file diff --git a/tests/integrate/README.md b/tests/integrate/README.md index 79ffff96d4..58c6c17d1c 100644 --- a/tests/integrate/README.md +++ b/tests/integrate/README.md @@ -1,4 +1,4 @@ -1. Modify the file general_info +1. Modify the file general_info to include the EXEC address 2. try this script for autotest: ./Autotest.sh > check.txt @@ -21,50 +21,7 @@ NOTES: ####################### -"simple" scripts - ---- - -0-99 Structure Tests (Bravis Lattices, symmetry analysis) - ---- - -100-200 PW basic properties - -100-110: pseudopotentials -(1) Semiconductor (Si), UPF1.0 (s,p,d,f) -(2) UPF2.0 (s,p,d,f) -(3) dojo (s,p,d) - -110-120: smearing methods -(1) Metals -(2) - -120-130: charge mixing -(1) Metals, Charge Mixing Methods, -(2) Surfaces, Charge Mixing Methods - -130-140: diagonalization methods -(1) CG (number of bands/trial wave functions) -(2) Davidson - -140-150: force tests - -* test every components of forces -* small displacements .vs. large displacements - -150-160: stress tests - -160-170: ion relaxatoin - -170-180: cell relaxation - -180-190: md simulations - ---- - -200-300 LCAO basic properties -300-400 LCAO basic Gamma Only properties +ABBREVIATIONS USED IN NAMING THE INTEGRATE TESTS _PW plain wave bases _NO numerical atoms orbitals bases @@ -102,7 +59,8 @@ _MD molecular dynamics _TD real time TDDFT _LR linear response TDDFT -_OH output Halmitonian matrix +_OHK output Hamiltonian and Overlap matrices for each k point +_OHR output Hamiltonian and Overlap matrices with Bravais lattice vectors _OB output bands file _OD output DOS file _OW output wave functions @@ -137,11 +95,7 @@ _MB move ions method: bfgs _1O first-order charge extrapolation _2O second-order charge extrapolation ---- - -900-1000 Orbital free DFT properties - _OF orbital free density functional theory (OFDFT) _OP optimization method used in OFDFT -_KE kinetic energy functional used in OFDFT +_KE kinetic energy functional used in OFDFT _CO convergence check diff --git a/tests/integrate/clean.sh b/tests/integrate/clean.sh index 8738266bd8..0d182f5e39 100755 --- a/tests/integrate/clean.sh +++ b/tests/integrate/clean.sh @@ -55,7 +55,7 @@ for directory in `ls | grep $module`; do #-------------------------------------------- # delete exec files in tools directory (if it exists) #-------------------------------------------- - sumfile1="$directory/sum_cube.exe" + sumfile1="$directory/sum_cube" test -e "$sumfile1" && rm -rf $sumfile1 #-------------------------------------------- diff --git a/tests/integrate/tools/catch_properties.sh b/tests/integrate/tools/catch_properties.sh index ca7a423b42..c78e639072 100755 --- a/tests/integrate/tools/catch_properties.sh +++ b/tests/integrate/tools/catch_properties.sh @@ -3,7 +3,8 @@ # mohan add 2025-05-03 # this compare script is used in different integrate tests COMPARE_SCRIPT="../../integrate/tools/CompareFile.py" -SUM_CUBE_EXE="../../integrate/tools/sum_cube.exe" +#COMPARE_SCRIPT="../../integrate/tools/compare_file.py" +SUM_CUBE_EXE="python3 ../../integrate/tools/sum_cube.py" sum_file(){ @@ -77,6 +78,7 @@ out_pband=$(get_input_key_value "out_proj_band" "INPUT") toW90=$(get_input_key_value "towannier90" "INPUT") has_mat_r=$(get_input_key_value "out_mat_r" "INPUT") has_mat_t=$(get_input_key_value "out_mat_t" "INPUT") +has_mat_syns=$(get_input_key_value "cal_syns" "INPUT") has_mat_dh=$(get_input_key_value "out_mat_dh" "INPUT") has_scan=$(get_input_key_value "dft_functional" "INPUT") out_chg=$(get_input_key_value "out_chg" "INPUT") @@ -256,27 +258,83 @@ if ! test -z "$has_band" && [ $has_band == 1 ]; then fi + #-------------------------------- # Hamiltonian and overlap matrix # echo $has_hs #-------------------------------- -if ! test -z "$has_hs" && [ $has_hs == 1 ]; then - if ! test -z "$gamma_only" && [ $gamma_only == 1 ]; then - href=hk_nao.txt.ref - hcal=OUT.autotest/hk_nao.txt - sref=sk_nao.txt.ref - scal=OUT.autotest/sk_nao.txt - else # multiple k-points - href=hk2_nao.txt.ref - hcal=OUT.autotest/hk2_nao.txt - sref=sk2_nao.txt.ref - scal=OUT.autotest/sk2_nao.txt +if ! test -z "$has_hs" && [ $has_hs == 1 ]; then + if ! test -z "$gamma_only" && [ $gamma_only == 1 ]; then + # ========== Γ-point (single k-point) calculation ========== + if ! test -z "$nspin" && [ $nspin == 2 ]; then + # nspin=2 (spin-polarized): compare hks1 + hks2 Hamiltonian + sk overlap matrix + h1ref=hks1_nao.txt.ref + h1cal=OUT.autotest/hks1_nao.txt + h2ref=hks2_nao.txt.ref + h2cal=OUT.autotest/hks2_nao.txt + sref=sk_nao.txt.ref + scal=OUT.autotest/sk_nao.txt + # Compare Hamiltonian matrix for spin 1 + python3 $COMPARE_SCRIPT $h1ref $h1cal 6 + echo "CompareH1_pass $?" >>$1 + # Compare Hamiltonian matrix for spin 2 + python3 $COMPARE_SCRIPT $h2ref $h2cal 6 + echo "CompareH2_pass $?" >>$1 + # Compare overlap matrix + python3 $COMPARE_SCRIPT $sref $scal 8 + echo "CompareS_pass $?" >>$1 + elif ! test -z "$nspin" && [ $nspin == 4 ]; then + # nspin=4 : do nothing, only matching condition without any operation + true + else + # nspin=1 (non-spin-polarized, default case): compare single hk + sk matrix set + href=hk_nao.txt.ref + hcal=OUT.autotest/hk_nao.txt + sref=sk_nao.txt.ref + scal=OUT.autotest/sk_nao.txt + # Compare Hamiltonian matrix + python3 $COMPARE_SCRIPT $href $hcal 6 + echo "CompareH_pass $?" >>$1 + # Compare overlap matrix + python3 $COMPARE_SCRIPT $sref $scal 8 + echo "CompareS_pass $?" >>$1 fi - - python3 $COMPARE_SCRIPT $href $hcal 6 - echo "CompareH_pass $?" >>$1 - python3 $COMPARE_SCRIPT $sref $scal 8 - echo "CompareS_pass $?" >>$1 + else + # ========== Multiple k-points calculation ========== + if ! test -z "$nspin" && [ $nspin == 2 ]; then + # nspin=2 (spin-polarized): compare hks1_2 + hks2_2 Hamiltonian + sk2 overlap matrix + h1ref=hks1_2_nao.txt.ref + h1cal=OUT.autotest/hks1_2_nao.txt + h2ref=hks2_2_nao.txt.ref + h2cal=OUT.autotest/hks2_2_nao.txt + sref=sk2_nao.txt.ref + scal=OUT.autotest/sk2_nao.txt + # Compare Hamiltonian matrix for spin 1 + python3 $COMPARE_SCRIPT $h1ref $h1cal 6 + echo "CompareH1_pass $?" >>$1 + # Compare Hamiltonian matrix for spin 2 + python3 $COMPARE_SCRIPT $h2ref $h2cal 6 + echo "CompareH2_pass $?" >>$1 + # Compare overlap matrix + python3 $COMPARE_SCRIPT $sref $scal 8 + echo "CompareS_pass $?" >>$1 + elif ! test -z "$nspin" && [ $nspin == 4 ]; then + # nspin=4 : do nothing, only matching condition without any operation + true + else + # nspin=1 (non-spin-polarized, default case): compare single hk2 + sk2 matrix set + href=hk2_nao.txt.ref + hcal=OUT.autotest/hk2_nao.txt + sref=sk2_nao.txt.ref + scal=OUT.autotest/sk2_nao.txt + # Compare Hamiltonian matrix + python3 $COMPARE_SCRIPT $href $hcal 6 + echo "CompareH_pass $?" >>$1 + # Compare overlap matrix + python3 $COMPARE_SCRIPT $sref $scal 8 + echo "CompareS_pass $?" >>$1 + fi + fi fi #-------------------------------- @@ -359,6 +417,15 @@ if ! test -z "$has_mat_t" && [ $has_mat_t == 1 ]; then echo "ComparerTR_pass $?" >>$1 fi +#----------------------------------- +# Asynchronous overlap matrix for Hefei-NAMD +#----------------------------------- +#echo $has_mat_syns +if ! test -z "$has_mat_syns" && [ $has_mat_syns == 1 ]; then + python3 $COMPARE_SCRIPT syns_nao.csr.ref OUT.autotest/syns_nao.csr 8 + echo "CompareSYNS_pass $?" >>$1 +fi + #----------------------------------- # matrix #----------------------------------- @@ -372,14 +439,21 @@ if ! test -z "$has_mat_dh" && [ $has_mat_dh == 1 ]; then echo "ComparerdHRz_pass $?" >>$1 fi +#--------------------------------------- +# Charge density +#--------------------------------------- +#echo $out_chg +if ! test -z "$out_chg" && [ $out_chg == 1 ]; then + python3 $COMPARE_SCRIPT chg.cube.ref OUT.autotest/chg.cube 8 + echo "chg.cube_pass $?" >>$1 +fi + #--------------------------------------- # SCAN exchange-correlation information #echo $has_scan #--------------------------------------- if ! test -z "$has_scan" && [ $has_scan == "scan" ] && \ ! test -z "$out_chg" && [ $out_chg == 1 ]; then - python3 $COMPARE_SCRIPT chg.cube.ref OUT.autotest/chg.cube 8 - echo "chg.cube_pass $?" >>$1 python3 $COMPARE_SCRIPT tau.cube.ref OUT.autotest/tau.cube 8 echo "tau.cube_pass $?" >>$1 fi @@ -389,7 +463,7 @@ fi # echo $has_ldos #--------------------------------------- if ! test -z "$has_ldos" && [ $has_ldos == 1 ]; then - stm_bias=$(get_input_key_value "stm_bias" "OUT.autotest/INPUT") + stm_bias=$(get_input_key_value "stm_bias" "OUT.autotest/INPUT.info") python3 $COMPARE_SCRIPT LDOS.cube.ref OUT.autotest/LDOS_"$stm_bias"eV.cube 8 echo "LDOS.cube_pass $?" >> $1 fi @@ -591,8 +665,8 @@ fi # check currents in rt-TDDFT #-------------------------------------------- if ! test -z "$out_current" && [ $out_current ]; then - current1ref=refcurrent_total.dat - current1cal=OUT.autotest/current_total.dat + current1ref=current_tot.txt.ref + current1cal=OUT.autotest/current_tot.txt python3 $COMPARE_SCRIPT $current1ref $current1cal 10 echo "CompareCurrent_pass $?" >>$1 fi diff --git a/tests/integrate/tools/sum_cube.py b/tests/integrate/tools/sum_cube.py new file mode 100755 index 0000000000..3e5657fdf3 --- /dev/null +++ b/tests/integrate/tools/sum_cube.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +import sys + +def main(): + if len(sys.argv) < 2: + print(f"Can't find {sys.argv[1] if len(sys.argv) > 1 else 'file'} !") + sys.exit(1) + + input_file = sys.argv[1] + + try: + with open(input_file, 'r') as inp: + # skip the first two lines + inp.readline() + inp.readline() + + # read the 3rd line: number of atoms + origin coordinates + line = inp.readline().split() + if not line: + return + natom = int(line[0]) + # origin_x = float(line[1]) + # origin_y = float(line[2]) + # origin_z = float(line[3]) + + # read the grid vectors (support non-orthogonal) + line = inp.readline().split() + nx = int(line[0]) + v1 = [float(line[1]), float(line[2]), float(line[3])] + + line = inp.readline().split() + ny = int(line[0]) + v2 = [float(line[1]), float(line[2]), float(line[3])] + + line = inp.readline().split() + nz = int(line[0]) + v3 = [float(line[1]), float(line[2]), float(line[3])] + + # calculate the volume element |v1 · (v2 × v3)| + val0 = v2[1] * v3[2] - v2[2] * v3[1] + val1 = v2[0] * v3[2] - v2[2] * v3[0] + val2 = v2[0] * v3[1] - v2[1] * v3[0] + + volume = abs(v1[0] * val0 - v1[1] * val1 + v1[2] * val2) + + # skip the atom coordinates + # natom can be negative in cube files sometimes? + # C++ code: for (int i = 0; i < natom; ++i) + # If natom is negative, loop doesn't run. + + atoms_to_skip = natom + if atoms_to_skip < 0: + # In some cube formats, negative natom means second line of header contains units or something? + # Standard: "If the number of atoms is negative, that indicates that the file contains input lines... One line for each non-zero E value." + # But the C++ code simple loops < natom. If natom < 0, it skips 0 lines. + # We will mimic C++ behavior assuming it works for the files they have. + atoms_to_skip = 0 # Loop won't run if natom < 0 + + for _ in range(atoms_to_skip): + inp.readline() + + nr = nx * ny * nz + + total_sum = 0.0 + count = 0 + + # Read grid values + # iterate over remaining lines to handle values spread across lines + for line in inp: + parts = line.split() + for part in parts: + total_sum += float(part) + count += 1 + if count >= nr: + break + if count >= nr: + break + + ne = total_sum * volume + # cout default precision is 6, but setprecision(10) changes it. + # Python's default float printing is usually sufficient, but let's use formatting to be sure. + # {:.10g} prints up to 10 significant digits. + print(f"{ne:.10g}") + + except FileNotFoundError: + print(f"Can't find {input_file} !") + sys.exit(1) + except Exception as e: + # C++ doesn't print other errors generally, but let's be safe. + # But to be functionally equivalent, maybe we shouldn't. + # The C++ code crashes or behaves weirdly on bad input. + # Let's just exit 1. + sys.exit(1) + +if __name__ == "__main__": + main() diff --git a/toolchain/README.md b/toolchain/README.md index 8727e7f35d..ccff2bfdfe 100644 --- a/toolchain/README.md +++ b/toolchain/README.md @@ -292,32 +292,30 @@ cmake -B $BUILD_DIR \ #### Multi-GPU with cuSolverMP -1. **Check or install cuSolverMP manually:** -One may use NVIDIA HPC_SDK as an easy way to install cuSolverMP. +cuSolverMP requires NVIDIA HPC SDK. Follow these steps to build with cuSolverMP: -2. **Install dependencies normally:** -```bash -./toolchain_gnu.sh -``` +1. Load the NVHPC module: + + - **For NVIDIA HPC SDK version < 25.9**: cuSolverMP relies on HPC-X for communication, so you need to load the `nvhpc-hpcx-cudaxx/xx.x` module. For example, with HPC SDK 25.3: + ```bash + module use /opt/nvidia/hpc_sdk/modulefiles + module load nvhpc-hpcx-cuda12/25.3 + ``` + + - **For NVIDIA HPC SDK version >= 25.9**: cuSolverMP uses NCCL for communication instead of HPC-X, so only the base `nvhpc/xx.x` module is needed. For example, with HPC SDK 26.1: + ```bash + module use /opt/nvidia/hpc_sdk/modulefiles + module load nvhpc/26.1 + ``` -3. **Build with cuSolverMP:** +2. Build with cuSolverMP enabled: ```bash cmake -B $BUILD_DIR \ -DUSE_CUDA=ON \ -DENABLE_CUSOLVERMP=ON \ - -DCAL_CUSOLVERMP_PATH=/path/to/math_libs/lib \ # ... other options ``` -3. **Set environment variables:** -```bash -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/hpcx/ucc/lib -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/hpcx/ucx/lib -export CPATH=$CPATH:/path/to/math_libs/include -``` - -**Note**: cuSolverMP requires NVIDIA HPC SDK or system installation via package manager. - ## Troubleshooting ### Common Issues diff --git a/toolchain/build_abacus_aocc-aocl.sh b/toolchain/build_abacus_aocc-aocl.sh index a586442421..ac174db099 100755 --- a/toolchain/build_abacus_aocc-aocl.sh +++ b/toolchain/build_abacus_aocc-aocl.sh @@ -66,7 +66,6 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DDeePMD_DIR=$DEEPMD \ # -DENABLE_CUSOLVERMP=ON \ -# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib cmake --build $BUILD_DIR -j `nproc` cmake --install $BUILD_DIR 2>/dev/null diff --git a/toolchain/build_abacus_gcc-aocl.sh b/toolchain/build_abacus_gcc-aocl.sh index 65e2491ee9..e2515f609b 100755 --- a/toolchain/build_abacus_gcc-aocl.sh +++ b/toolchain/build_abacus_gcc-aocl.sh @@ -64,7 +64,6 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DDeePMD_DIR=$DEEPMD \ # -DENABLE_CUSOLVERMP=ON \ -# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib cmake --build $BUILD_DIR -j `nproc` cmake --install $BUILD_DIR 2>/dev/null diff --git a/toolchain/build_abacus_gnu.sh b/toolchain/build_abacus_gnu.sh index 37f5603f6e..0485738c1e 100755 --- a/toolchain/build_abacus_gnu.sh +++ b/toolchain/build_abacus_gnu.sh @@ -62,7 +62,6 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DDeePMD_DIR=$DEEPMD \ # -DENABLE_CUSOLVERMP=ON \ -# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib cmake --build $BUILD_DIR -j `nproc` cmake --install $BUILD_DIR 2>/dev/null diff --git a/toolchain/build_abacus_intel.sh b/toolchain/build_abacus_intel.sh index c347b623a1..06fcdc5ac8 100755 --- a/toolchain/build_abacus_intel.sh +++ b/toolchain/build_abacus_intel.sh @@ -60,7 +60,6 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DDeePMD_DIR=$DEEPMD \ # -DENABLE_CUSOLVERMP=ON \ -# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib cmake --build $BUILD_DIR -j `nproc` cmake --install $BUILD_DIR 2>/dev/null diff --git a/toolchain/scripts/stage1/install_mpich.sh b/toolchain/scripts/stage1/install_mpich.sh index cafda9200d..c0909b4a9c 100755 --- a/toolchain/scripts/stage1/install_mpich.sh +++ b/toolchain/scripts/stage1/install_mpich.sh @@ -81,6 +81,8 @@ case "${with_mpich}" in MPICC="" \ FFLAGS="${FCFLAGS} ${compat_flag}" \ FCFLAGS="${FCFLAGS} ${compat_flag}" \ + --without-x \ + --enable-gl=no \ --with-device=${MPICH_DEVICE} \ > configure.log 2>&1 || tail -n ${LOG_LINES} configure.log make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log @@ -90,19 +92,19 @@ case "${with_mpich}" in fi if [ "${PACK_RUN}" = "__TRUE__" ]; then echo "--pack-run mode specified, skip system check" - else - check_dir "${pkg_install_dir}/bin" - check_dir "${pkg_install_dir}/lib" - check_dir "${pkg_install_dir}/include" - check_install ${pkg_install_dir}/bin/mpiexec "mpich" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1 - check_install ${pkg_install_dir}/bin/mpicc "mpich" && MPICC="${pkg_install_dir}/bin/mpicc" || exit 1 - check_install ${pkg_install_dir}/bin/mpicxx "mpich" && MPICXX="${pkg_install_dir}/bin/mpicxx" || exit 1 - check_install ${pkg_install_dir}/bin/mpifort "mpich" && MPIFC="${pkg_install_dir}/bin/mpifort" || exit 1 - MPIFORT="${MPIFC}" - MPIF77="${MPIFC}" - MPICH_CFLAGS="-I'${pkg_install_dir}/include'" - MPICH_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'" + exit 0 fi + check_dir "${pkg_install_dir}/bin" + check_dir "${pkg_install_dir}/lib" + check_dir "${pkg_install_dir}/include" + check_install ${pkg_install_dir}/bin/mpiexec "mpich" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1 + check_install ${pkg_install_dir}/bin/mpicc "mpich" && MPICC="${pkg_install_dir}/bin/mpicc" || exit 1 + check_install ${pkg_install_dir}/bin/mpicxx "mpich" && MPICXX="${pkg_install_dir}/bin/mpicxx" || exit 1 + check_install ${pkg_install_dir}/bin/mpifort "mpich" && MPIFC="${pkg_install_dir}/bin/mpifort" || exit 1 + MPIFORT="${MPIFC}" + MPIF77="${MPIFC}" + MPICH_CFLAGS="-I'${pkg_install_dir}/include'" + MPICH_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'" ;; __SYSTEM__) echo "==================== Finding MPICH from system paths ====================" @@ -176,9 +178,9 @@ EOF prepend_path PATH "${pkg_install_dir}/bin" export PATH="${pkg_install_dir}/bin":\${PATH} export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH} -export LD_RUN_PATH "${pkg_install_dir}/lib":\${LD_RUN_PATH} -export LIBRARY_PATH "${pkg_install_dir}/lib":\${LIBRARY_PATH} -export CPATH "${pkg_install_dir}/include":\${CPATH} +export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH} +export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH} +export CPATH="${pkg_install_dir}/include":\${CPATH} EOF fi cat "${BUILDDIR}/setup_mpich" >> ${SETUPFILE} @@ -189,6 +191,8 @@ cat << EOF >> ${INSTALLDIR}/lsan.supp # MPICH 3.3.2 with GCC 10.3.0 leak:MPIR_Find_local_and_external leak:MPIU_Find_local_and_external +# MPICH 4.2.3 +leak:MPL_malloc EOF load "${BUILDDIR}/setup_mpich" diff --git a/toolchain/scripts/stage1/install_openmpi.sh b/toolchain/scripts/stage1/install_openmpi.sh index 6656fb9a97..6798e8ef17 100755 --- a/toolchain/scripts/stage1/install_openmpi.sh +++ b/toolchain/scripts/stage1/install_openmpi.sh @@ -91,7 +91,12 @@ case "${with_openmpi}" in # else # EXTRA_CONFIGURE_FLAGS="" # fi - ./configure CFLAGS="${CFLAGS}" \ + ./configure \ + CC=gcc \ + CXX=g++ \ + FC=gfortran \ + F77=gfortran \ + CFLAGS="${CFLAGS}" \ --prefix=${pkg_install_dir} \ --libdir="${pkg_install_dir}/lib" \ --with-libevent=internal \ diff --git a/toolchain/scripts/stage4/install_nep.sh b/toolchain/scripts/stage4/install_nep.sh index 3a5ad8eb6f..a7dac17a18 100755 --- a/toolchain/scripts/stage4/install_nep.sh +++ b/toolchain/scripts/stage4/install_nep.sh @@ -63,7 +63,7 @@ CXXFLAGS = -O2 -fPIC -std=c++11 INCLUDES = -I./src # Source files -SRCS = ./src/nep.cpp +SRCS = ./src/nep.cpp ./src/ewald_nep.cpp ./src/neighbor_nep.cpp # Object files OBJS = \$(SRCS:.cpp=.o) @@ -91,7 +91,7 @@ install: mkdir -p \$(PREFIX)/lib mkdir -p \$(PREFIX)/include cp \$(TARGET) \$(PREFIX)/lib/ - cp src/nep.h \$(PREFIX)/include/ + cp src/*.h \$(PREFIX)/include/ EOF make > make.log 2>&1 || tail -n ${LOG_LINES} make.log @@ -154,4 +154,4 @@ load "${BUILDDIR}/setup_nep" write_toolchain_env "${INSTALLDIR}" cd "${ROOTDIR}" -report_timing "nep" \ No newline at end of file +report_timing "nep" diff --git a/toolchain/toolchain_gnu.sh b/toolchain/toolchain_gnu.sh index 23176722b4..44cfbe4b36 100755 --- a/toolchain/toolchain_gnu.sh +++ b/toolchain/toolchain_gnu.sh @@ -66,6 +66,7 @@ PACK_RUN_MODE="no" # Set to "yes" to enable pack-run mode CMAKE_VERSION="main" # main=3.31.7, alt=3.30.5 OPENMPI_VERSION="main" # main=5.0.8, alt=4.1.6 +MPICH_VERSION="main" # main=4.1.6, alt=4.1.5 OPENBLAS_VERSION="main" # main=0.3.30, alt=0.3.27 ELPA_VERSION="main" # main=2025.06.001, alt=2024.05.001 LIBXC_VERSION="main" # main=7.0.0, alt=6.2.2 @@ -104,6 +105,7 @@ exec ./install_abacus_toolchain_new.sh \ --with-4th-openmpi="$WITH_4TH_OPENMPI" \ --package-version cmake:"$CMAKE_VERSION" \ --package-version openmpi:"$OPENMPI_VERSION" \ + --package-version mpich:"$MPICH_VERSION" \ --package-version openblas:"$OPENBLAS_VERSION" \ --package-version elpa:"$ELPA_VERSION" \ --package-version libxc:"$LIBXC_VERSION" \ diff --git a/tools/README.md b/tools/README.md index 2223589f03..a3ce30b113 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,14 +1,25 @@ SIAB: codes to generate numerical atomic orbitals. + molden: generate molden style file for Multiwfn analysis. plot-tools: band structure, dos and pdos, dipole and adsorption. + rt-tddft-tools: tools for real-time tddft. + average_pot: python script used to calculate and plot the average electrostatic potential. + stm: generate figures related to Scanning tunneling microscope technique. generate_orbital.sh: script used to generate numerical atomic orbitals (NAO). + opt_abfs_bash: related to generating NAO basis set. + opt_lcao_bash: related to generating NAO basis set. + opt_orb_pytorch: related to generating NAO basis set. + opt_orb_pytorch_dpsi: related to generating NAO basis set. + qo: generate quasiatomic orbital (qo). + +selective_dynamics: used to do selective dynamics with ABACUS + Phonopy. \ No newline at end of file diff --git a/tools/rt-tddft-tools/dipole.py b/tools/rt-tddft-tools/dipole.py index 236e11e792..91fcbdb53f 100644 --- a/tools/rt-tddft-tools/dipole.py +++ b/tools/rt-tddft-tools/dipole.py @@ -154,9 +154,9 @@ def plot_abs(self, fig: Figure, ax: axes.Axes, directions: list = [0, 1, 2], x_r if __name__ == "__main__": - dipolefile = './SPIN1_DIPOLE' + dipolefile = './dipole_s1.txt' dipole = Dipole(dipolefile, dt=0.0024) - Efile=[[],[],["efield_0.dat"]] + Efile=[[],[],["efield_0.txt"]] Abs = Absorption(dipolefile, Efile, dt=0.0024) import matplotlib.pyplot as plt diff --git a/tools/rt-tddft-tools/examples/Absorpation-N2/Abs_plot.py b/tools/rt-tddft-tools/examples/Absorpation-N2/Abs_plot.py index 28128f26ed..d832badc0f 100644 --- a/tools/rt-tddft-tools/examples/Absorpation-N2/Abs_plot.py +++ b/tools/rt-tddft-tools/examples/Absorpation-N2/Abs_plot.py @@ -2,9 +2,9 @@ from abacus_plot.dipole import Absorption import matplotlib.pyplot as plt -dipolefile = './SPIN1_DIPOLE' +dipolefile = './dipole_s1.txt' dipole = Dipole(dipolefile, dt=0.0024) -Efile=[[],[],["efield_0.dat","efield_1.dat"]] +Efile=[[],[],["efield_0.txt","efield_1.txt"]] Abs = Absorption(dipolefile, Efile, dt=0.0024) fig1, ax1 = plt.subplots() diff --git a/tools/rt-tddft-tools/examples/Absorpation-N2/SPIN1_DIPOLE b/tools/rt-tddft-tools/examples/Absorpation-N2/dipole_s1.txt similarity index 100% rename from tools/rt-tddft-tools/examples/Absorpation-N2/SPIN1_DIPOLE rename to tools/rt-tddft-tools/examples/Absorpation-N2/dipole_s1.txt diff --git a/tools/rt-tddft-tools/examples/Absorpation-N2/efield_0.dat b/tools/rt-tddft-tools/examples/Absorpation-N2/efield_0.txt similarity index 100% rename from tools/rt-tddft-tools/examples/Absorpation-N2/efield_0.dat rename to tools/rt-tddft-tools/examples/Absorpation-N2/efield_0.txt diff --git a/tools/rt-tddft-tools/examples/Absorpation-N2/efield_1.dat b/tools/rt-tddft-tools/examples/Absorpation-N2/efield_1.txt similarity index 100% rename from tools/rt-tddft-tools/examples/Absorpation-N2/efield_1.dat rename to tools/rt-tddft-tools/examples/Absorpation-N2/efield_1.txt diff --git a/tools/selective_dynamics/README.md b/tools/selective_dynamics/README.md new file mode 100644 index 0000000000..eef94a6f85 --- /dev/null +++ b/tools/selective_dynamics/README.md @@ -0,0 +1,105 @@ +# Selective Dynamics for ABACUS+Phonopy + +## Requirements + +- [ase-abacus](https://gitlab.com/1041176461/ase-abacus) +- [Phonopy](https://github.com/phonopy/phonopy) + +## Usage + +### Setting + +There is a setting file named `config.yaml`: +```yaml +origin_structure: 'STRU' # the original structure +selected_indices: [18, 19] # the atom index that you concerned about, start from 0 +tasks_per_batch: 12 # how much jobs per batch +wait_time: 600 # s, sleep time between batches + +setting_conf: | + SYMMETRY = .FALSE. + DIM = 1 1 1 + DISPLACEMENT_DISTANCE = 0.03 + +mesh.conf: | + DIM = 1 1 1 + MESH = 31 31 31 + TMAX = 2000 + TSTEP = 2 + +input: | + INPUT_PARAMETERS + #Parameters (1.General) + suffix phonon + calculation scf + symmetry 1 + nspin 1 + pseudo_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/pseudo + orbital_dir /fs2/home/chenkg/2_liuyu/3_abacus/PP_ORB/efficiency + kpoint_file ../KPT + + #Parameters (2.Iteration) + ecutwfc 100 + scf_thr 1e-8 + scf_nmax 100 + + #Parameters (3.Basis) + basis_type lcao + ks_solver genelpa + gamma_only 0 + + #Parameters (4.Smearing) + smearing_method gaussian + smearing_sigma 0.001 + + #Parameters (5.Mixing) + mixing_type broyden + mixing_beta 0.7 + + cal_force 1 + cal_stress 1 + +kpt: | + K_POINTS + 0 + Gamma + 5 5 1 0 0 0 + +job_script: | + #!/bin/bash + #SBATCH -p cp6 + #SBATCH -N 1 + #SBATCH -J abacus + #SBATCH -n 28 + + source /fs2/home/chenkg/2_liuyu/3_abacus/abacus_env.sh + export OMP_NUM_THREADS=28 + + mpirun -n 1 abacus +``` + +- origin_structure: The `STRU` filename, which contains both the fixed atoms and the free atoms. +- selected_indices: The indexs of the free atoms. Note that the index starts from 0. +- tasks_per_batch: How much jobs submitted per batch. +- wait_time: Sleep time between batches, the unit is second. +- setting_conf: The `setting.conf` file for Phonopy. +- mesh.conf: The `mesh.conf` file for Phonopy. +- input: The `INPUT` file for ABACUS. +- kpt: The `KPT` file for ABACUS. +- job_script: The script used to submit jobs. + +### Submit jobs + +Use the following command +```bash +python3 path_to_selective_dynamics.py --submit +``` +to generate displaced structures and submit jobs. + +### Postprocess + +Use the following command +```bash +python3 path_to_selective_dynamics.py --post +``` +to generate `FORCE_SETS` and results of phonon calculations. diff --git a/tools/selective_dynamics/selective_dynamics.py b/tools/selective_dynamics/selective_dynamics.py new file mode 100755 index 0000000000..4e5c0e91fc --- /dev/null +++ b/tools/selective_dynamics/selective_dynamics.py @@ -0,0 +1,254 @@ +#!/usr/bin/env python3 +import os +import re +import sys +import glob +import time +import yaml +import shutil +import subprocess +from ase import Atoms +from ase.io import read, write + + +def split_stru_with_index(input_file, selected_indices, output1, output2): + + atoms = read(input_file, verbose=True) + pp = atoms.info["pp"] + basis = atoms.info["basis"] + + for i, atom in enumerate(atoms): + atom.tag = i + + atoms1 = atoms[selected_indices] + + + remaining_indices = [i for i in range(len(atoms)) if i not in selected_indices] + atoms2 = atoms[remaining_indices] + + + write(output1, atoms1, format='abacus', pp=pp, basis=basis) + write(output2, atoms2, format='abacus', pp=pp, basis=basis) + + print(f" Success! \n A.stru: {len(atoms1)} atoms\n B.stru: {len(atoms2)} atoms\n") + return selected_indices, remaining_indices, pp, basis + + +def merge_stru_by_index(file1, file2, indices1, indices2, pp, basis, output_file): + + atoms1 = read(file1) + atoms2 = read(file2) + + + total_atoms = len(atoms1) + len(atoms2) + merged_atoms = [None] * total_atoms + + for i, idx in enumerate(indices1): + merged_atoms[idx] = atoms1[i] + + for i, idx in enumerate(indices2): + merged_atoms[idx] = atoms2[i] + + + cell = atoms2.get_cell() + pbc = atoms2.get_pbc() + + positions = [atom.position for atom in merged_atoms] + symbols = [atom.symbol for atom in merged_atoms] + + merged = Atoms(symbols=symbols, positions=positions, cell=cell, pbc=pbc) + + write(output_file, merged, format='abacus', pp=pp, basis=basis) + print(f"success! total {len(merged)} atoms") + + +def parse_forces_from_file(indices, file_path="running_scf.log"): + + with open(file_path, 'r', encoding='utf-8') as f: + contents = f.read() + + lines = contents.split('\n') + + start_index = -1 + for i, line in enumerate(lines): + if "#TOTAL-FORCE (eV/Angstrom)#" in line: + start_index = i+4 + break + + results = [] + for i in indices: + results.append(lines[start_index+i]) + + result_text = '\n'.join(results) + return result_text + + +def load_config(config_file="config.yaml"): + + with open(config_file, 'r', encoding='utf-8') as f: + return yaml.safe_load(f) + +def submit_jobs(): + + # loading settings + config = load_config() + + # split structure into A and B + origin_structure = config['origin_structure'] + selected_indices = config['selected_indices'] + indices1, indices2, pp, basis = split_stru_with_index(origin_structure, selected_indices, + 'A.stru', 'B.stru') + + + # setting.conf for phonopy + setting_conf_content = config['setting.conf'] + with open("setting.conf", "w", encoding="utf-8") as f: + f.write(setting_conf_content) + + + # generate perturbed structures + result = subprocess.run("phonopy setting.conf --abacus -d -c A.stru", + shell=True, capture_output=True, text=True) + print(result.stdout) + + + all_files = sorted(glob.glob("STRU-*")) + TOTAL_TASKS = len(all_files) + TASKS_PER_BATCH = config['tasks_per_batch'] + WAIT_TIME = config['wait_time'] + TOTAL_BATCHES = (TOTAL_TASKS + TASKS_PER_BATCH - 1) // TASKS_PER_BATCH + print(f' TOTAL_TASKS = {TOTAL_TASKS}\n TASKS_PER_BATCH = {TASKS_PER_BATCH}\n TOTAL_BATCHES = {TOTAL_BATCHES}\n') + + + # job script + job_script_content = config['job_script'] + with open("job.sh", "w", encoding="utf-8") as f: + f.write(job_script_content) + os.chmod("job.sh", 0o755) + + # KPT + kpt_content = config['kpt'] + with open("KPT", "w", encoding="utf-8") as f: + f.write(kpt_content) + + input_content = config['input'] + + num_digits = len(str(TOTAL_TASKS)) + for batch in range(1, TOTAL_BATCHES + 1): + print("-" * 30) + print(f"Current batch: {batch}/{TOTAL_BATCHES}") + print("-" * 30) + + for task in range(1, TASKS_PER_BATCH + 1): + index = task - 1 + (batch - 1) * TASKS_PER_BATCH + + if index >= TOTAL_TASKS: + break + + + new_index = f"{index+1:0{num_digits+1}d}" + + dir_name = f"job_{new_index}" + os.makedirs(dir_name, exist_ok=True) + os.chdir(dir_name) + + + # STRU + perturbed_stru = f"../{all_files[index]}" + merge_stru_by_index(perturbed_stru, '../B.stru', indices1, indices2, + pp, basis, 'STRU') + + # INPUT + with open("INPUT", "w") as f: + f.write(input_content) + + + # submit job + try: + result = subprocess.run(["sbatch", "../job.sh"], + check=True, capture_output=True, text=True) + print(f"submit job: {new_index}") + except subprocess.CalledProcessError as e: + print(f"Failed - {e}") + + os.chdir("..") + + # sleep if not the last batch + if batch < TOTAL_BATCHES: + print(f"wait {WAIT_TIME} seconds...") + time.sleep(WAIT_TIME) + + print("-" * 30) + + print("All job submitted!") + print("-" * 30) + +def postprocess(): + + # loading settings + config = load_config() + + selected_indices = config['selected_indices'] + natom = len(selected_indices) + + all_files = sorted(glob.glob("STRU-*")) + TOTAL_TASKS = len(all_files) + num_digits = len(str(TOTAL_TASKS)) + + for task in range(1, TOTAL_TASKS + 1): + + new_index = f"{task:0{num_digits+1}d}" + dir_name = f"job_{new_index}" + os.chdir(dir_name) + + out_folders = glob.glob("OUT.*") + out_folder = out_folders[0] + os.chdir(out_folder) + + atom_forces = parse_forces_from_file(selected_indices) + + # phonon.log + log = f"""TOTAL ATOM NUMBER = {natom} + + #TOTAL-FORCE (eV/Angstrom)# + ------------------------------------------------------------------------- + Atoms Force_x Force_y Force_z + -------------------------------------------------------------------------\n""" + + with open("phonon.log", "w") as f: + f.write(log) + f.write(str(atom_forces)) + f.write("\n -------------------------------------------------------------------------") + + + os.chdir("../..") + + result = subprocess.run("phonopy -f job_*/OUT*/phonon.log", + shell=True, check=True, capture_output=True, text=True) + + + mesh_content = config['mesh.conf'] + with open("mesh.conf", "w") as f: + f.write(mesh_content) + + result = subprocess.run("phonopy -t mesh.conf", + shell=True, check=True, capture_output=True, text=True) + + + + +def main(): + if len(sys.argv) != 2: + print("usage: python3 selective_dynamics.py --submit") + print("usage: python3 selective_dynamics.py --post") + sys.exit(1) + + if sys.argv[1] == "--submit": + submit_jobs() + elif sys.argv[1] == "--post": + postprocess() + else: + print(f"No such parameter: {sys.argv[1]}") + +if __name__ == "__main__": + main() \ No newline at end of file